Skip to main content
dungeonlords789
Associate III
May 13, 2019 10:28 PM UTC
Solved

get interrupt state

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.

This topic has been closed for replies.
dungeonlords789
dungeonlords789Best answer
Associate III
May 13, 2019 11:34 PM UTC

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

}

it works for tim3 compare interrupt via chanel 1 !

2 replies

Tesla DeLorean
Guru
May 13, 2019 11:27 PM UTC

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 (See Profile) Up vote any posts that you find helpful, it shows what's working..
dungeonlords789
dungeonlords789AuthorBest answer
Associate III
May 13, 2019 11:34 PM UTC

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

}

it works for tim3 compare interrupt via chanel 1 !