ReSpeaker DSP V02
Dependencies: mbed MbedJSONValue
Diff: filters.h
- Revision:
- 10:273127efdc6e
- Parent:
- 8:8a3e6241c104
- Child:
- 12:9d30df1529be
--- a/filters.h Sun Aug 26 09:55:14 2018 +0000 +++ b/filters.h Mon Aug 27 10:32:08 2018 +0000 @@ -53,6 +53,10 @@ // off mode, output vdd/2 inline void offMode(void) { + // generate some delay (limit loop speeds, creates crashes to the Switch mcu +// for (int ii=0; ii<10; ii++){ +// __ASM volatile ("nop"); // one tick operation, Use to adjust frequency by slowing down the proccess +// } uint16_t ADCValueOut; // set to vdd/2 ADCValueOut=(uint16_t)((0.0f +1.0f) * Float2ADC); @@ -454,9 +458,7 @@ // HAL_DAC_SetValue(&hdac1, DAC_CHANNEL_1, DAC_ALIGN_12B_R, ADCValueOut); *(__IO uint32_t *) Dac_Reg = ADCValueOut; //wait_us(1); - } - - + } } } else if (ADCFloatFiltered >= trigTresh) { trigFlag=1;