Skip to main content
Jamesarm
Associate
August 26, 2019
Question

Can a OneShot Timer be used to trigger the reset / restart of a PWM Timer via hardware?

  • August 26, 2019
  • 0 replies
  • 529 views

I am trying to start a one shot timer for a variable delay from an external interrupt (not a timer interrupt) which I know how to do by calling the follow code:

 HAL_TIM_Base_Start_IT(&htim6);

HAL_TIM_OnePulse_Start_IT(&htim6, TIM_CHANNEL_ALL);

What I would like timer6 (or another free timer) to do is somehow reset or retrigger the start of Timer3 which is an auto reloading PWM timer. Can Timer3 (or another timer) somehow be configured to use the Master / Slave bits and reset or restart (I would like Timer3 to just start counting from 0 again right as the timer6 / one shot expires). I can see how to manually restart the Timer3 in an interrupt but would really like it to be hardware based and automatic if possible. I can't wrap my head around the various Master/Slave options with the timers.

This topic has been closed for replies.