cancel
Showing results for 
Search instead for 
Did you mean: 

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.

DGrön.1
Associate II

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();

 }

2 REPLIES 2
Ozone
Lead

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...

TDK
Guru

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.

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