2024-04-24 01:00 AM
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!
2024-05-06 02:58 AM
Hello @Safaa_Alzubaidi
First let me thank you for posting.
Could you share the ioc file used for the configuration.
BR,
Semer.
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.