DMA integration with Timer to control PWM is not sending data
- March 19, 2024
- 1 reply
- 2902 views
Hello All,
I am using the STM32L011K4 to control the PWM duty cycle through the use of the DMA.
I have gone through my register initialization to ensure that the registers are being configured correctly and I have gone through and used the solution from this post: https://community.st.com/t5/stm32cubemx-mcus/ll-dma-burst-to-a-timer-not-working-on-stm32h7/m-p/137972 to initialize my DMA first, despite this the system is not working.
I have confirmed through the example code section and reading through the reference manual that the steps I am taking are indeed correct and nothing additional needs to happen. I think my mistake is something not configuring correctly despite me verifying the main settings outline the manual are verified and correct.
Further, I have verified that if a PWM is initialized the correct signal is being produced on TIM Channel 3, but I am unable to change it.
I am currently using the timer 2 burst registers to set the new duty cycles in CCR3.
I have attached my code.
UPDATE: I have found that the DMA trigger was not occuring when using I have found one issue with the DMA was that is was not being triggered from ```LL_TIM_EnableDMAReq_UPDATE```, when I enabled ```LL_TIM_EnableDMAReq_CC3``` the interrupt started working.
Correct me but isn't the UPDATE enable suppose to trigger the DMA when the timer autoreloads? Why didn't that mechanism trigger the DMA? THE CC3 enable triggers when the PWM duty cycle changes, but that isn't necessarily the best implementation nor my intention with the design.

