TIM_Cmd(TIM8, ENABLE); /* Main Output Enable */ TIM_CtrlPWMOutputs(TIM8, ENABLE); -------------- and in the main loop TIM8->CCR1= 500; ------------------ this code is working with my application
I looked at the supplied example code that uses the TIM3 timer and was able to change the TIM->CCR1 register inside a while loop in order to change the PWM duty cycle while the MCU is running. However, when I tried to do the same with TIM8, the duty cycle seems to stay constant at the initial TIM->CCR1 value that it was initialized with (duty cycle remains constant). Are there special conditions for TIM8 that I should be aware of when dealing with TIM8 specifically?