This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430FR5994 LPM3进入和退出

Expert 2115 points


进入LPM3模式是不是可以通过以下函数完成?进入后程序相当于卡在__no_operation()处,当__bic_SR_register_on_exit(LPM3_bits)时程序继续往下执行?

__bis_SR_register(LPM3_bits + GIE);
__no_operation();

__bic_SR_register_on_exit(LPM3_bits)

  • __bis_SR_register(LPM3_bits + GIE);这句代码一般放在主循环里,执行完这一句进入低功耗状态,并使能中断。

    __bic_SR_register_on_exit(LPM3_bits)一般放在中断服务程序中。mcu进入低功耗状态后,可以通过中断唤醒并执行中断服务程序,执行这句后退出低功耗状态,执行完中断服务程序后会继续执行主循环的代码