cancel
Showing results for 
Search instead for 
Did you mean: 

how to check if global interrupts are enabled

Clonimus74
Senior II
Posted on January 20, 2016 at 16:53

Hi all,

How can I check if interrupts are enabled (i.e. find out if __enable_irq() or

__disable_irq() were previously called)?

I use STM32L4 (M4)

Thank you

#interrupts #arm-cortex-m4
1 REPLY 1
Clonimus74
Senior II
Posted on January 20, 2016 at 17:56

Found it:

if (__get_PRIMASK() & 0x01) //Global interrupts disabled