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 :)
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2020-06-24 1:03 AM
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2020-06-24 1:58 AM
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 :)
