Skip to main content
Puzamoya
Associate II
Nov 25, 2020 8:35 AM UTC
Solved

Is there a maximum buffer size For ADC DMA Length is stated as Uint32

Hi

I am doing an ADC DMA sample using HAL_ADC_Start_DMA. Using ADC1

Setup in multimode with 2 channels Rank1 and Rank2. Using STM32H750

I have a buffer Uint16 buffer [131072] setup in RAM_D2

When i set the length in the HAL_ADC_Start_DMA

HAL_ADC_Start_DMA(&hadc1, (uint32_t *)&buffer, 32768 ) This works

HAL_ADC_Start_DMA(&hadc1, (uint32_t *)&buffer, 65536 ) THis does not work it never comes back to get called by the DMA complete. However if I read the status of the DMA is says busy and the DMA counter counts down to 0.

Thanks

Robin

This topic has been closed for replies.
TDK
TDKBest answer
Nov 25, 2020 11:52 PM UTC

Max value of NDTR is 65535, so that's the limit of the number of transfers you can do per DMA call.

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

1 reply

TDK
TDKBest answer
Nov 25, 2020 11:52 PM UTC

Max value of NDTR is 65535, so that's the limit of the number of transfers you can do per DMA call.

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