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.

请问MSP430f5438a+MSP-FET430UIF硬件仿真如何查看LPM3状态?

Other Parts Discussed in Thread: ENERGYTRACE, MSP430F5438A

while(1)  //main函数中的循环
{
      Uart1_SendString(uart2_recv_buf);   //将字符串发送
      UART2_Recv_Buf_CLR();              //清空缓冲字符串
     __bis_SR_register(LPM3_bits + GIE);    //数据处理结束,进入LPM3低功耗模式
}

#pragma vector=USCI_A2_VECTOR
__interrupt void USCI_A2_ISR(void)
{
            data = UCA2RXBUF;
            *uart2_recv_ptr++ = data;   //数据缓冲字符串
           if(data == '*')
                    __bic_SR_register_on_exit(LPM3_bits + GIE);   //判断到数据结尾后,退出低功耗模式,处理数据
}

请问这个代码在硬件debug的时候怎么查看是否处于LPM3模式,以及LPM3模式下所占的时间?

  • 你好:

       查看是否处于LPM3状态有两种方法:1.在寄存器窗口中查看

    因为LPM3对应的位为

    相应位为1则为LPM3模式

    2.使用EnergyTrace++ 里面可以看到CPU工作模式以及各个外设的工作状态

    时间的话需要你自己用定时器的测量,需要自己写代码。

  • 感谢,请问MSP430f5438a是否支持EnergyTrace++?debug时我调出过EnergyTrace++,但是没有数据,是不是仿真器和芯片管脚连接上需要调整?

  • EnergyTrace++对仿真器和msp430的型号有要求的

    具体可以查看http://www.ti.com.cn/tool/cn/EnergyTrace