MSP430: _bis_sr vs. _bis_sr_irq ?

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

Reply to
<ralf.adler
Loading thread data ...

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

Reply to
Thad Smith

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.