2020-02-16 11:43 PM
HI
stm32f051 config with stmcubemx
but, timer1 and timer2 and timer3and16and17 not working for pwm generation
only timer15 good work
why????
Solved! Go to Solution.
2020-02-27 05:44 PM
You enable only the "inverted" of the complementary channels (TIMx_CHyN), look up the CCER register's description in RM:
TIM2 and TIM3 don't have complementary channels, that's why CCER there is completely zero.
However, in the GPIO AF, you have chosen the "direct" channels (without N at the end) - in all timers, except TIM15 - which you say does work.
You enable the "inverted" channels probably using HAL_TIMEx_PWMN_Start(); functions. You have to find some Cube/HAL function, probably similarly sounding, which enables the "direct" channel. I don't use Cube/HAL.
JW
2020-02-29 01:24 AM
HI
Thank you all
especially JW
The problem was solved
HAL_TIMEx_PWMN_Start() function is false
HAL_TIM_PWM_Start() function is true