Skip to main content
Visitor II
November 30, 2020
Question

Is there a limitation on the buffer length parameter to HAL_ADCEx_MultiModeStart_DMA? Length 32767 * 2 is OK and gives HAL_ADC_ConvHalfCpltCallback and HAL_ADC_ConvCpltCallback interrupts but 32768 * 2 fails with no interrupts.

  • November 30, 2020
  • 2 replies
  • 738 views

I use STM32H753IITx and there is space in RAM_D1 to use length 2*65536.

I call like this:

 if (HAL_ADCEx_MultiModeStart_DMA(&hadc1, guiaAdc12Data, (uint32_t)(ADC12_MAX_COUNT * 2)) != HAL_OK)

 {

Error_Handler();

 }

    This topic has been closed for replies.

    2 replies

    Explorer
    November 30, 2020

    I don't know the H7, but all other STM32 models could address a maximum of 64kByte per DMA.

    This is a limit of the DMA peripheral unit.

    I would expect a configuration function to catch this...

    Super User
    November 30, 2020

    The maximum transfers per DMA call is 65535. Your last parameter to HAL_ADCEx_MultiModeStart_DMA can't be higher than this or it won't work.

    You can access more than 64kB if the transfer size is more than a byte, but you are limited to that many transfers.