Turning off interrupts in ISR

My interrupt service routines generally look like this:

#pragma vector = PORT1_VECTOR

__interrupt void PORT1_ISR(void)

{

__disable_interrupt(); // Disable global INTs so nothing can interrupt this ISR

// General content of ISR

__enable_interrupt(); // Re-enable global INTs

}

I was wondering - is it necessary to manually disable/enable interrupts as I currently do, or does IAR automatically look after this for you when it compiles hence making my calls to __disable_interrupt() and __enable_interrupt() redundant?

stube40:
I was wondering - is it necessary to manually disable/enable interrupts as I currently do, or does IAR automatically look after this for you when it compiles hence making my calls to __disable_interrupt() and __enable_interrupt() redundant?

Read the user guide for the particular MSP430 family you are using. I checked one to verify my memory of interrupt processing:

"The SR is cleared. This terminates any low-power mode. Because the GIE bit is cleared, further

interrupts are disabled."

The hardware does it.

UhClem:

stube40:
I was wondering - is it necessary to manually disable/enable interrupts as I currently do, or does IAR automatically look after this for you when it compiles hence making my calls to __disable_interrupt() and __enable_interrupt() redundant?

Read the user guide for the particular MSP430 family you are using. I checked one to verify my memory of interrupt processing:

"The SR is cleared. This terminates any low-power mode. Because the GIE bit is cleared, further

interrupts are disabled."

The hardware does it.

Many thanks!