How can I mask all Interrupts on MK21FN1M0VMC12

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How can I mask all Interrupts on MK21FN1M0VMC12

ソリューションへジャンプ
849件の閲覧回数
brentgreenwald
Contributor III


I see the ARM has a non-maskable interrupt (NMI). Is there an easy way to mask all maskable interrupts, like a single flag or bit?

ラベル(2)
0 件の賞賛
1 解決策
658件の閲覧回数
BlackNight
NXP Employee
NXP Employee

Hi Brent,

yes, the 'I' bit in the PRIMASK ARM core register. Below how to enable/disable all maskable interrupts:

#define DisableInterrupts()          __asm volatile("cpsid i")
#define EnableInterrrupts()        __asm volatile("cpsie i")

I hope this helps,

Erich

元の投稿で解決策を見る

0 件の賞賛
1 返信
659件の閲覧回数
BlackNight
NXP Employee
NXP Employee

Hi Brent,

yes, the 'I' bit in the PRIMASK ARM core register. Below how to enable/disable all maskable interrupts:

#define DisableInterrupts()          __asm volatile("cpsid i")
#define EnableInterrrupts()        __asm volatile("cpsie i")

I hope this helps,

Erich

0 件の賞賛