Skip to main content
Senior III
January 20, 2026
Solved

ADC sampling frequency questions

  • January 20, 2026
  • 1 reply
  • 324 views

Doing the set up in MX
I have four ADC channels on APB2 with PCLK2 at 84 MHz sampling 4 microphones.

The recommended audio sampling rate stretch from 44.1 kHz up to 96 kHz, so initially I'm happy anywhere in that range for now. 

I have set the clock pre-scaler to divide PCLK2 / 4 so the ADC clock is at 21 MHz

I have 12 bit resolution which takes 15 ADC cycles but then in the "rank" section of the parameter settings there is a pull down for sampling time for each channel. I'm guessing that the value I pass in the "rank" section is what I would use to get the final sampling rate.

e.g. if I chose 84 cycles for each channel then I would have a sample rate of 250 kHz per channel giving a sample rate for all conversions of 62.5 kHz?

Or do I add the sample time to the resolution time e.g. 84+15 giving a sample rate of ~212 kHz per channel?

 

 

Best answer by TDK

The total time to convert a channel is sampling time + conversion time.

I believe 12-bit resolution requires 12 cycles to convert, not 15. So your total time would be 84 + 12 cycles per sample.

1 reply

TDK
TDKBest answer
Super User
January 20, 2026

The total time to convert a channel is sampling time + conversion time.

I believe 12-bit resolution requires 12 cycles to convert, not 15. So your total time would be 84 + 12 cycles per sample.

"If you feel a post has answered your question, please click ""Accept as Solution""."
Senior III
January 20, 2026

Thanks, MX is saying "15 ADC clock cycles" for 12 bits which is an annoying number for sure.

TDK
Super User
January 20, 2026

If you want a specific sampling time, it's easier to have them triggered from a timer rather than in continuous mode. Set up the conversions to complete at least as fast as the timer triggers.

"If you feel a post has answered your question, please click ""Accept as Solution""."