Skip to main content
Clonimus74
Senior II
January 20, 2016
Question

how to check if global interrupts are enabled

  • January 20, 2016
  • 1 reply
  • 751 views
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
This topic has been closed for replies.

1 reply

Clonimus74
Senior II
January 20, 2016
Posted on January 20, 2016 at 17:56

Found it:

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