2025-11-04 10:31 PM
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
2025-11-05 6:20 AM
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.