cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F7: Can I use ADC conversions at highest speed (2.4Msps) with 216MHz clock?

fbar
Senior

I'm currently using an STM32F4 board for a project that requires fast ADC conversion (2.4msps per channel, all 3 channels simultaneously) *and* pretty extensive cross correlation. Due to the clock tree of the F4, if I want to use the highest ADC clock, I need to run the F4 at 144MHz instead of 168MHz, making all the cross correlation code slower than it could be.

I'm thinking of moving to an F7 board (Nucleo767), for the additional RAM and much faster core/DSP. But playing with the clock tree of the F7 in STM32CubeMX, I seem to bump into the same limits as the F4, where I need to use 144MHz in order to get a 36MHz ADC clock, and there is no prescaler that works for 216MHz, making it even worse (in proportion) than the F4 loss (I know it would still be faster overall, but running at 144MHz vs 216MHz is a significant difference)

Is there any way to run 2.4Msps on an F7 with a 216MHz clock?

12 REPLIES 12

I'm using it right now. According to CubeMX, 8MHz HSE, M=4, N=168, P=2, Q=7, resulting in a 48MHz clock for the USB. With 144MHz, Q is 6, still resulting in a 48MHz USB clock

When using the SPL, I'm using RCC_PLLConfig(RCC_PLLSource_HSE, 8, 288, 2, 6); for 144MHz, RCC_PLLConfig(RCC_PLLSource_HSE, 8, 336, 2, 7); for 168MHz. USB runs stable in either configuration

What am I missing?

  • F4: max ADCCLK 36MHz at 144MHz, max core at 168MHz, but ADCCLK reduced dramatically to 21MHz; Max 2.4Msps per ADC at 12bit, 36MHz ADCCLK, dropping to 1.4Msps when running at 168MHz
  • F7: max ADCCLK at 144MHz, max core at 216MHz with ADCCLK at 27MHz (not as much of a loss) Max 2.4Msps per ADC at 12bit, 36MHz ADCCLK, dropping to 1.8Msps per ADC when runining at 216MHz
  • H7: Max ADCCLK 36MHz at max core of 400MHz, no compromise. Max 3.6Msps at 16 bit, 4.5Msps at 12 bit, for each ADC. The H7 is a beast, both for ADC and core. Please note that the F4 and F7 can sample at max ADC speed any of the exposed channels, the H7 has only 6 channels called high speed, the remaining can only do 1 Msps, no matter the resolution (16 or 12 or even 6 bits it's all 1Msps). Luckily I only need to convert 6 channels, so the H7 would be much, much faster. If someone needed, say, 12 channels (each ADC sampling 4 inputs), the timing and management of the conversion would be a lot more challenging with an H7 than an F4 or F7 (might still be faster in some cases)

My cubemx is doing crazy stuff. I will reinstall it and give it one more chance.​