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: cannot single step

Part Number: MSP430F5438A


Hi Team,

I'm using MSP-EXP430F5438, I got an error when I debugging an TI's routine:

Basically it occurs when exiting ISR. Besides, if i don't set break point it will break after i press 'suspend'.

I thought there are some issues about GIE sets and clears, so I add some __no_operation() line but it didn't help.

At first I just want to see the GIE bit set after exiting ISR, but now I got this problem.

Best Regards,

Ben

  • Hi Ben

    Please hlep to try this code.

    you can set the breakpoint at these 2 lines.

    __bis_SR_register(LPM3_bits | GIE);     // Enter LPM3
    __no_operation();                       // For debug

    MSP430 device can stop at the first line BP because MCU is in active mode at this line.

    device can't stop at the second line (__no_operation();  ) becasue MCU is in sleep mode at this line.

    Thanks!

  • Hi Xiaodong,

    It will break as the same:

    Best,

    Ben

  • Hi Ben

    May I know the version of CCS you are using?

    and could you please try run the basic example code msp430x54xA_LPM3_1.c of MSP430F543xA, MSP430F541xA Code Examples (Rev. K)

    Please check if the PC can stop at the breakpoint of this example code.

    Thanks!

  • Hi Xiaodong,

    Thanks for your help.

    CCS Version: 12.0.0.00009 

    The program stop at second BP:

    Seems like it doesn't go into LPM.

    Best,

    Ben

  • Hi Ben

    program stoping at second BP is the normal phenomenon.

    at this time, MCU is till in the active mode.

    after this BP. MCU will enter the LPM mode. at the LPM mode, the debug features are not supported.

    Thanks

  • Hi Xiaodong,

    But I use this example msp430x54xA_RTC_01 , and it has ISR, program stoping at first BP:

    after i press resume it stops at first BP, then i press resume and it runs then I press suspend and it break:

     

    I set a BP in ISR, then I single step after this BP, then I get this error at the end of ISR.

    I cannot understand since I use other boards it goes well.

    Thanks,

    Ben

  • Hi Ben

    >> But I use this example msp430x54xA_RTC_01 , and it has ISR, program stoping at first BP:

    PC can stop at this BP because MCU is in active mode at this time

    >> after i press resume it stops at first BP, then i press resume and it runs then I press suspend and it break:

    Press "run", device will enter LPM mode. at this time, device can't execute the debug command. once press "suspend. the debug feature breaks.

    >> I set a BP in ISR, then I single step after this BP, then I get this error at the end of ISR.

    you press single step from the BP in interrupt handling. at the end of this handling, MCU will be back to LPM mode. So, the error is happened at the end of handling.

    Thanks!

  • Hi Xiaodong,

    I think I know your meaning.

    But in this example msp430x54xA_RTC_01, the RTC should keep triggering interrupt, which wake the MCU up. In this case, i press single step at the end of this handling, it should go back to the LPM line. Is my understanding correct?

    Best,

    Ben

  • Hi Ben

    >> In this case, i press single step at the end of this handling, it should go back to the LPM line

    once the handling completed, MCU will return to the LPM mode. but it will not go back to the LPM line because the LPM line is actually active mode.

    as we discussed, once MCU enter the low power mode, debug is "break".

    Thanks

**Attention** This is a public forum