Interrupt disabling in HCS12 microcontroller

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

Interrupt disabling in HCS12 microcontroller

1,327件の閲覧回数
Jagadish
Contributor I

Hello,

I am currently using HCS12x microcontroller and third party operating system(OS) for an application. The OS  has two macro's SuspendAllInterrupts() and DisableInterrupts().

I find SuspendAllInterrupts() changes IPL level to 0x07 and does not do anything with I bit.

But DisableInterrupts() changes the I bit value to 1.

 

My question is, I want to enter a critical region in code.

1. Should I use SuspendAllInterrupts() or DisableInterrupt()

2. What is the difference between these two macro's?

 

Regards,

ラベル(1)
0 件の賞賛
返信
1 返信

755件の閲覧回数
kef
Specialist I

2. The effects of setting I bit or setting IPL to 7 are almost the same. In first case CPU masks all I-bit maskable interrupts. In the second interrupt controller inhibits all I-bit maskable interrupts.

 

1. I don't know. In both cases your critical section should end with restoring I-bit and/or restoring IPL.

0 件の賞賛
返信