2022-04-04 01:21 AM
I have initialise the code in Low layer(No HAL).So now i have config the timer channel as PWM generation output and set clock, ARR,duty cycle as per the requirement.
Earlier when I was using HAL, after initialising i can just wrote HAL_TIM_PWM_Start function and it will automatically start the timer as pwm. But now when I'm using Low layer, there is not function for that. So how can i Start the timer in pwm or any mode(output,input compare mode etc.) using the register or any low layer functions.
For ref.- There is a register (TIM1->CR1 |= TIM_CR_CEN ) this will start the timer.
Solved! Go to Solution.
2022-04-04 02:12 AM
Generally, the procedure is:
If there's any problem, read out and check/post GPIO and TIM registers content.
JW
2022-04-04 01:36 AM
Which STM32? Which timer?
> There is a register (TIM1->CR1 |= TIM_CR_CEN ) this will start the timer.
OK, so if you know how to start the timer, what exactly is your problem?
Cube/LL is open source, so if you for some reason must use LL functions/macros, just look up which one does what you need.
JW
PS. If still no PWM output, read out and check/post the timer and relevant GPIO registers content. Note, that Advanced timers need to have TIMx_BDTR.MOE set to enable outputs.
2022-04-04 02:03 AM
Thank you for replying.
Sorry there was a mistake..that register will start the counter value of the timer.
2022-04-04 02:12 AM
Generally, the procedure is:
If there's any problem, read out and check/post GPIO and TIM registers content.
JW
2022-04-04 02:17 AM
Thank you sir.