cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L476 running a PWM from TIM1 at 80MHz with a prescaler of 32 and a reload of 1000 reveals a PWM of 25KHz and not 2.5KHz as calculated. Why is this? My bad maths :)

Graham1904
Associate III
 
1 REPLY 1
Graham1904
Associate III

I think I have found the answer. The initial MX_TIM1_Init() the htim1.Init.Period was set to 1000 but in the code after the MX_TIM1_Init() I set htim1.Instance->ARR = 100 :) It seems that the ARR isn't updated in STM32CubeIDE when you change the IOC file :)