Jagadish R

Interrupt disabling in HCS12 microcontroller

Discussion created by Jagadish R on Sep 16, 2009
Latest reply on Sep 17, 2009 by kef


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?