Skip to main content
dungeonlords789
Associate III
May 13, 2019
Solved

get interrupt state

  • May 13, 2019
  • 2 replies
  • 850 views

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.
Best answer by dungeonlords789

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

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

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

}

it works for tim3 compare interrupt via chanel 1 !