Mehdi
Mehdi

Reputation: 62

STM32F401RE PWM Mode doesn't work in Protues

I'm trying to generate PWM wave but it seems that proteus has a problem with it. I've tried to do so using CMSIS and CubeMX and neither of them works.

tested timers: TIM 1, 2, 4, 5 with all their channels

Timer configuration in CubeMX Proteus Result

Edited: CubeMX doesn't generate HAL_TIM_PWM_Start as part of the generated codes for TIM's. adding HAL_TIM_PWM_Start to the code and changing the value of Pulse to a non-zero amount, fixed my problem.

Upvotes: 1

Views: 641

Answers (1)

recep
recep

Reputation: 124

You should set Pulse value greater than zero. It is the PWM's duty value.

Upvotes: 1

Related Questions