Skip to main content
Visitor II
November 5, 2025
Question

Timer using DMA

  • November 5, 2025
  • 1 reply
  • 135 views

Hi

I currently use a timer in interrupt mode that triggers every 50 µs and executes my function inside HAL_TIM_PeriodElapsedCallback. I also have another timer running every 1 second. To reduce CPU load, I want to replace the 50 µs interrupt-based timer with a DMA-based implementation. My goal is for the DMA-driven timer to invoke HAL_DMA_XferCpltCallback every 50 µs. Is this approach possible, and if so, how can I implement it? If there is any other approach to implement the timer to trigger every 50us using DMA please let me know.

NOTE: I am implementing using STM32CubeIDE on STM32F439ZIT6 Nucleo Board.

Thanks and Regards

@avbST

    This topic has been closed for replies.

    1 reply

    Technical Moderator
    November 5, 2025

    Hello @avbST 

    If you want to transfer data between memory and a peripheral, you can use a timer to trigger DMA transfers. However, the HAL_DMA_XferCpltCallback is not triggered every 50 µs; instead, it is called only when the entire DMA transfer is complete.