Skip to main content
Associate
August 28, 2025
Solved

Problem with PWM setup

  • August 28, 2025
  • 2 replies
  • 351 views

Hello,
I'm just a begginer with embedded and STM32 so bare with me please.

I was trying to follow a program tutorial to periodically blink an LED using a timer channel in PWM generation mode. I have an STM32 Nucleo h755zi-q board, I set the integrated LED on pin PB0 to it's alternate function which is timer 3 channel 3, I assigned timer 3 to core C7 turned on internal clock as source and set channel 3 to PWM generation. I used different setups but for example 200 Mhz on the clock, prescaler 19999, autoreload 9999, pulse 5000. I left everything else as default and generated the code and only added this line

"HAL_TIM_PWM_Start(&htim3, TIM_CHANNEL_3);"

right before the infinite loop in the main function. This should make the user LED on pin PB0 blink periodically with 1 Hz frequency I think. But the LED isn't doing anything at all.

I'm using CubeIDE obviously and using just a basic timer with interrupt works flawlessly, so where is the mistake?

Sorry for low details, I'm currently in a rush, will provide any details you ask for later.
Thanks in advance for all the suggestions :)

Best answer by Superposition

Thanks for the reply and help, however I finally managed to solve the problem myself.
If anyone ever needs it, what I had to do was turn off the "human machine interface".

I don't really know what it is but whenever starting a project, a box called human machine interface pops up and asks to configure some pins for me, I also don't really know if this is intended or a bug, but if I leave it turned on, timer channels literally don't work and I can't even turn UART on.

So in short my problem was solved by clicking "unselect all" in the human machine interface thus turning it off.

2 replies

Technical Moderator
August 29, 2025
"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.Saket_Om"
SuperpositionAuthorBest answer
Associate
August 29, 2025

Thanks for the reply and help, however I finally managed to solve the problem myself.
If anyone ever needs it, what I had to do was turn off the "human machine interface".

I don't really know what it is but whenever starting a project, a box called human machine interface pops up and asks to configure some pins for me, I also don't really know if this is intended or a bug, but if I leave it turned on, timer channels literally don't work and I can't even turn UART on.

So in short my problem was solved by clicking "unselect all" in the human machine interface thus turning it off.