cancel
Showing results for 
Search instead for 
Did you mean: 

get interrupt state

dungeonlords789
Senior III

How to get interrupt state (enabled or disabled) via HAL?

In my void I need to do HAL_TIM_OC_Stop_IT() only if this interrupt enabled.

1 ACCEPTED SOLUTION

Accepted Solutions
dungeonlords789
Senior III

if (__HAL_TIM_GET_IT_SOURCE(&htim3,TIM_IT_CC1)==SET){

}

it works for tim3 compare interrupt via chanel 1 !

View solution in original post

2 REPLIES 2

I'm sure they are all enumerated in the TIM's include and/or source file. Do a search/grep on the function you're using to enable them.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
dungeonlords789
Senior III

if (__HAL_TIM_GET_IT_SOURCE(&htim3,TIM_IT_CC1)==SET){

}

it works for tim3 compare interrupt via chanel 1 !