cancel
Showing results for 
Search instead for 
Did you mean: 

How can I measure the sampling frequency of ADC1 on the Nucleo-l476rg board?

8bit
Associate

I am using HSI as a system clock and PLLSAI1R ADC clock.

With PLL, ADC1 clock value becomes 80 MHz.

I am using End of conversion interrupt in continuous conversion mode on the channel 5.

How can I measure sampling rate of the ADC,?

2 REPLIES 2

Use a relatively high-impedance ADC input source and observe the ADC pin using an oscilloscope. You'll see the sampling as thin pulses as the sampling capacitor charges.

Other option is sofware: set up a DMA to convert some number of samples, and duration of that number of conversion will give you the sampling rate.

JW

+1

Time Stamp the DMA completion, or toggle a GPIO and scope it

or work the math on the clocks/settings, it's all gear ratios.

Usually if you want defined timing, you use a TIM to trigger the ADC, and set the ADC to optimal speed/performance settings to meet delivery deadlines.

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