cancel
Showing results for 
Search instead for 
Did you mean: 

When using HAL_TIM_OC_Start_IT, shouldn't I get a Period Elapsed interrupt, too?

john doe
Lead
Posted on July 30, 2017 at 15:59

Playing around with timer/counters, trying to learn things.

When I use HAL_TIM_OC_Start_IT, the callback HAL_TIM_OC_DelayElapsedCallback gets called at the appropriate time. The counter continues on happily about its way, and when it rolls over, shouldn't I expect to also get a callback for PeriodElapsed?

1 ACCEPTED SOLUTION

Accepted Solutions
Posted on July 30, 2017 at 17:19

Hello!

The answer is no, with this callback function.

When you start your timer with  HAL_TIM_Base_Start_IT... you get callback  HAL_TIM_PeriodElapsedCallback  , means that timer's 'Update Flag' is set.

You can call both functions to get two types of callbacks.

View solution in original post

2 REPLIES 2
Posted on July 30, 2017 at 17:19

Hello!

The answer is no, with this callback function.

When you start your timer with  HAL_TIM_Base_Start_IT... you get callback  HAL_TIM_PeriodElapsedCallback  , means that timer's 'Update Flag' is set.

You can call both functions to get two types of callbacks.

Posted on July 30, 2017 at 18:07

>You can call both functions to get two types of callbacks.

I learned something new today.