PWM stop work
Hello
I have configured TIM2 CH1 with PWM Generation on my board STM32F412G-DISCO. I capture the rising and falling edges by other board NUCLEO-G071RB, using interrupt input capture for both edges (one channel for each edge).
Now I try to change the period of the PWM in the F412G board. However, sometimes the signal stops (I capture it using an oscilloscope too).
The code I use to change the period:
fanCount=(int)(fanPeriod/1000*clock/(htim2.Init.Prescaler+1));
__HAL_TIM_SET_AUTORELOAD(&htim2,fanCount);
Do anyone have an idea what is the problem?
