Skip to main content
Polzuchy_haos
Associate
Jan 18, 2022 5:30 PM UTC
Solved

Hi.I use the LL library and stm32f030, I configure timers 16 and 17 in cubeMx to output PWM, I use two commands to start: LL_TIM_EnableCounter and LL_TIM_CC_EnableChannel, but the output is zero, and everything works on timer 3 or 14. What to do?

..

This topic has been closed for replies.
waclawek.jan
waclawek.janBest answer
Super User
Jan 18, 2022 6:31 PM UTC

TIM16 and TIM17 have TIMx_BDTR, so you have to set the MOE bit in it to enable output.

I don't know the Cube/LL incantation for this but Cube/LL is open source so you can easily find it yourself.

JW

2 replies

waclawek.jan
waclawek.janBest answer
Super User
Jan 18, 2022 6:31 PM UTC

TIM16 and TIM17 have TIMx_BDTR, so you have to set the MOE bit in it to enable output.

I don't know the Cube/LL incantation for this but Cube/LL is open source so you can easily find it yourself.

JW

Polzuchy_haos
Associate
Jan 18, 2022 7:43 PM UTC

Thank you very much, the generation on the output really appeared, here I also tried to set the AOE bit in TIMx_BDTR and the generation also works.