If I have a conditional go to sleep code like this:
if (cell_pwr() || g_debug_bps > 9600) {
__bis_SR_register(LPM1_bits + GIE); // Go to sleep
} else {
__bis_SR_register(LPM2_bits + GIE); // Go to sleep
}
can I wake up using the code below, considering that sometimes the uC will be in LPM1 and the ISR will attempt to wake it up from LPM2?
__bic_SR_register_on_exit(LPM2_bits); // wake up