Skip to main content
MD SABBIR BIN ZAMAN
Associate II
February 11, 2017
Question

how to select ADC sampling rate and calculate from stm32cubemx

  • February 11, 2017
  • 1 reply
  • 1047 views
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
This topic has been closed for replies.

1 reply

Tesla DeLorean
Guru
February 11, 2017
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 (See Profile) Up vote any posts that you find helpful, it shows what's working..