2025-06-27 2:56 AM
I'm able to generate a simple PWM signal but I wasn't able to generate arbitrary waveform with DMA (HAL_TIM_DMABurst_MultiWriteStart).
How should be configured the DMA ?
Is there an example that use PWM with DMA on STM32U5 ?
Solved! Go to Solution.
2025-07-01 1:46 AM
I have already tried this (__HAL_TIM_CLEAR_FLAG(&htim1, TIM_FLAG_UPDATE);) and it didn't help.
2025-07-01 3:17 AM
Hello @nicolas
Did you check the example below and compare with your code :
2025-07-01 7:18 AM
It doesn't help me because it use HAL_TIM_DMABurst_WriteStart() instead of HAL_TIM_DMABurst_MultiWriteStart() and the STM32U0 use DMA instead of GPDMA.
2025-07-02 4:27 AM
Looks like RCR and CCR1 are preloaded and my config was using an ARR not preloaded.
With a preloaded ARR, my ARR values doesn't need to be shifted.
htim.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_ENABLE;