Issue with HR Timer PWM Frequency on STM32
- 1 reply
- 1236 views
Hello STM Community,
I'm encountering an issue with generating a PWM signal using the HR Timer (High-Resolution Timer) on an STM32 microcontroller. My goal is to generate a PWM signal with a frequency of 16 kHz, but I'm consistently getting a frequency of 83 kHz instead.
Here are the details of my configuration:
- I'm using the HR Timer (HT Timer) on an STM32 microcontroller.
- I've tried adjusting the prescaler ratio in the .ioc file to achieve the desired frequency. Initially, I set the prescaler ratio to 170 MHz x 4 to theoretically achieve a minimum frequency of 10.4 kHz. However, even with this setting, I'm still getting a frequency of 83 kHz.
-The HR Timer is crucial for my application, and I need to accurately generate a PWM signal with a frequency of 16 kHz.
Could anyone please provide insights into what might be causing this discrepancy and how I can achieve the desired PWM frequency of 16 kHz using the HR Timer on STM32?
Any help or suggestions would be greatly appreciated.
Thank you!
