AnsweredAssumed Answered

STM32 F429 Discovery ADC DMA example very slow

Question asked by campbell.robert on Nov 2, 2015
Latest reply on Nov 2, 2015 by campbell.robert
Hi,

I have an STM32F429I-DISCOVERY board and loaded up the example from the STM32Cube package.

The example project directory in question is STM32Cube_FW_F4_V1.9.0\Projects\STM32F429I-Discovery\Examples\ADC\ADC_RegularConversion_DMA

This sets up 3 cycle sampling, 12 bit continuous conversion, with a callback upon DMA completion.

In the callback, instead of turning on the LED I set it to toggle so I could easily scope it.

void HAL_ADC_ConvCpltCallback(ADC_HandleTypeDef* AdcHandle)
{
  /* Turn LED3 on: Transfer process is correct */
  BSP_LED_On(LED3);
}
 
To
 
void HAL_ADC_ConvCpltCallback(ADC_HandleTypeDef* AdcHandle)
{
  /* Toggle LED line for scope */
  BSP_LED_Toggle(LED3);
}


I'm generally getting right around 400KHz, or 800K samples per second,  0.8Msps  instead of the 2.4Msps as the readme.txt claims:

In this example, the system clock is 144MHz, APB2 = 72MHz and ADC clock = APB2/2.
Since ADC3 clock is 36 MHz and sampling time is set to 3 cycles, the conversion time to 12bit data is 12 cycles so the total conversion time is (12+3)/36= 0.41us(2.4Msps).

Any ideas what I'm doing wrong?  I didn't change anything from the example other than that one line, perhaps there is a configuration issue with that demonstration?

Thanks,

Robert

Outcomes