1

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.

1 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

3 Comments

I fixed that. But still, the problem didn't resolve.
Do you start PWM using 'HAL_TIM_PWM_Start' function? Can you please share your clock configuration?
I thought CubeMX write HAL_TIM_PWM_Start as part of the generated codes. It seems that was the problem. thank you for your help.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.