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.
Tool/software: Code Composer Studio
Is there any way for the MCU to read the GIE bit in the status register? The reason is that, while debugging a project, the GIE bit gets cleared, and I have no idea why. If I can read the bit, perhaps I can find the code that is causing the problem.
Thanks, Bruce. I hunted around and could not find the __get_SR_register() command.
There's a list in CC User Guide (SLAU132S) Table 6-5. There's not a whole lot of explanation, but mostly you can guess.
Alternatively, once you've typed (e.g.) __get_SR_register(), right-click on it and "Go To Declaration" then see what's declared nearby.
Does the GIE bit get cleared after you have set a breakpoint in the debugger?Lee Gordon said:The reason is that, while debugging a project, the GIE bit gets cleared, and I have no idea why. If I can read the bit, perhaps I can find the code that is causing the problem.
If so, it may be same problem as described in CCS/MSP430F2274: Placing new software breakpoint clears GIE, preventing interrupts from triggering, which is an outstanding issue in the MSPDebugStack.
Probably so, though I haven't paid sufficient attention to the sequence to be sure.
A more prosaic goof (presumably a copy/paste slip-up) that I've seen more than once here:
> __bic_SR_register_on_exit(LPM0_bits | GIE);
**Attention** This is a public forum