cancel
Showing results for 
Search instead for 
Did you mean: 

stm32u5: HAL_ADC_Start_DMA cannot handle transfer size larger than 64k

billw
Associate

We use STM32CubeMX and STM32U5.   STM32U5 supports linked list DMA transfers.   But HAL_ADC_Start_DMA() will not do a transfer larger than 64k.  It only creates the first element in the list and exits.  In addition, HAL_ADC_Start_DMA() doesn't give an error when Length > 64k, instead it trucates the uint32_t to 16-bits silently.

2 REPLIES 2
AScha.3
Chief II

you could read the rm , to see, what the dma can or not can do :

 

AScha3_0-1701763142062.png

 

so one block transfer is max. 64K.

>it trucates the uint32_t to 16-

- the register is 16bits - so what should it do?  give error message : RTFM ! 

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

No, it should create a linked list of more than 1 transfer.

I'm complaining because my code worked on previous STM32: 52000 size, half-word(uint16_t) transfer size.  Now same code no longer works and gave no error.   Also I would expect the call HAL_ADC_Start_DMA() to work.

Is there another HAL call I should be using that doesn't just create one linked list entry and then "gives up"?