MSP430: _bis_sr vs. _bis_sr_irq ?

Sep 08, 2003 1 Replies

Hallo, can anybody tell me the difference between _bis_sr() and _bis_sr_irq() and when witch type of command should be used ?



Thanks. Ralf


The following pertains to the IAR C compiler. Based on a quick look at generated code:

The intrinsic functions _BIS_SR() and _BIC_SR() set and clear bits in the status register. They could be used to enable/disable interrupts or enter sleep mode.

_BIS_SR_IRQ() and _BIC_SR_IRQ() set and clear bits for the status register which will be restored at the end of the current IRQ routine. They are normally used to exit sleep modes from an interrupt routine.

Thad

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required