Skip to main content
Visitor II
December 5, 2023
Question

stm32u5: HAL_ADC_Start_DMA cannot handle transfer size larger than 64k

  • December 5, 2023
  • 1 reply
  • 1201 views

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.

    This topic has been closed for replies.

    1 reply

    Super User
    December 5, 2023

    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 !  :)

    billwAuthor
    Visitor II
    December 5, 2023

    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"?