2021-04-16 12:39 PM
Using an Advanced Timer (Timer 1 in STM32H743ZI) in PWM One-Shot mode, and using the Repetition Counter, I generate a string of 5 pulses. For each pulse, I generate a Capture/Compare Interrupt and have a CallBack routine (using "HAL_TIM_PulseFinishedCallBack(...)". This works fine.
I have also enabled the Update Interrupt for Timer 1 and expected it to service that routine at the completion of the 5 pulses as well but it does not. The code for the Interrupt is generated in the stm32h7xx_it.c file "(void TIM1_UP_IRQHandler(void))" but execution does not appear to reach it. Both Timer 1 Capture/Compare and Update Interrupts are enabled in the NVIC. I am using "void HAL_TIM_Period_ElapsedCallback(...)" as the call back routine for the Update Interrupt.
How do I get the Update Interrupt to work?
2023-09-19 02:02 PM
You can use the HAL_TIM_Base_Start_IT to start the timer including the PeriodElapsed interrupt, and then use HAL_TIM_PWM_Start to start generate PWM. If you need the compare interrupts too, then use HAL_TIM_PWM_Start_IT.
2024-02-07 03:44 AM
what is PWM One-Shot mode and PWM ONE-Pulse mode?? Are both are same or different?
2024-02-07 05:18 AM
I don't remember seeing "One-shot" anywhere else but in the opening post here, so it may be misspelling of One-pulse mode.
KW