cancel
Showing results for 
Search instead for 
Did you mean: 

how to select ADC sampling rate and calculate from stm32cubemx

MD SABBIR BIN ZAMAN
Associate II
Posted on February 11, 2017 at 09:10

Hello All,

I am using a single channel for AD Conversion from an analog front end on STM32L76. But I want a specific sampling rate of ADC. Currently, I am achieving this by using a timer enabling conversion at the frequency I want. But this implementation requires the usage of two peripheral: TIMER and ADC. Could you please help me to select ADC sample frequency? I am using STMCUBEMX for generating initialization code. If possible, then how do I select the specification from STMCUBEMX. Based on application, I sometimes need to change the ADC sampling rate from software end. So I need to understand the concept.

#stmcubemx #stm32 #adc-sampling-rate
1 REPLY 1
Posted on February 11, 2017 at 23:41

The reference manual no doubt provides detail of the conversion times for the different bit widths, and the sample time you select. You'd add these up, and apply the ADC clock and any prescalers used there. These tend to be rather inflexible. The use of the TIM triggering is generally the easiest and most flexible.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..