2025-11-12 6:44 AM - edited 2025-11-12 6:44 AM
Hi, I am using a STM32F411CEU6. I am trying to make the One Pulse Mode of TIM1 start every time TIM2 has counted its ARR.
However, I don't seem to really understand what the relevancy of the ARR of TIM1 is when having TIM2 controlling the start(except if it is longer than TIM2 ARR i guess). Now I have 90MHz on both APB1 and APB2 and the PSC of both TIM1 and TIM2 is 90. I was following an example online where he sat the ARR of TIM1 to 50000 and ARR of TIM2 to 60000. The Pulse of TIM1 was 10000. From my understanding when I am running in output compare mode PWM1, TIM1 should start every 60ms and have a ON time of 10ms.
Instead I see an ON time of 20ms and a period of 60ms. However when I change the ARR of TIM1 this ON time also changes.
Is there something I am missing completely here? (I also have to change the OCMODE of TIM1 to PWM1 because it does not seem to be an option in MX)
Thanks in advance!
Solved! Go to Solution.
2025-11-12 7:25 AM
I didn't know that the TIM1 signal went high again after the ARR of TIM1. I figured it out now.
2025-11-12 7:25 AM
I didn't know that the TIM1 signal went high again after the ARR of TIM1. I figured it out now.