2014-12-23 10:32 AM
I've posted on this before, thought I'd nailed it correct, but did not, as there are inconsistent results. I am using the Discovery STM32F4 development board, along with IAR compiler/workbench.
Can someone please point me to a previous post (if there is one) or alternately, sample code, or alternately, pseudo-code that would explain the correct procedure to set up the ADC for an exact sampling rate? Since this is critical in any DSP operations, there must be a way to control that? I realize a timer interrupt is one way - but how about allowing the ADC to ''self-interrupt'', and then set a HW interrupt? If that can be done, can someone provide a link or sample code? Would be a nice ''ST'' Christmas present all wrapped up under the Discovery STM32F4 development board 8--) Thanks, and best wishes to everyone for a wonderful Christmas break. Gary #adc #stm32f4 #sampling-rate2015-10-06 10:13 AM
2015-10-06 10:15 AM
Is there some example or direction for setting the ADC sampling rate to 19200. I am creating a software UART to demodulate Bell 202 modem audio tones and need 16 samples in a 1200 Hz cycle. Thanks
2015-10-06 11:43 AM
You'd just adjust the Period/Prescaler of the TIM to get the desired periodicity. I think the timer is explained a handful of posts above this, and I've list a bunch of examples. They don't have your specific sample rate, but that's why the TIM is adjustable.