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.

Compiler/MSP430G2955: GIE is disabled automatically when step debugging

Part Number: MSP430G2955


Tool/software: TI C/C++ Compiler

Hi,

I'm running a i2c/smbus testing, the sample project I used is SMB_Master01_ReadByte_Echo from msp430_smbuslib_1_10_00_00.

When the code is free-running, it works fine, but when I perform step over execution, it always fail.

Firstly, I set a breakpoint at below line and start execution,

        ret = SMBus_masterReadByteWord(&sSMBMaster,     // SMB struct
                                       SLAVE_ADDRESS,   // Slave Addr
                                       cmd,            // SMB Command
                                       Resp_Buff,       // ResponsePtr
                                       1);              // 1 byte expected

when code stops at breakpoint, I press F6 to step over, then SMBus_masterWaitUntilDone will return timeout. 

I find the reason is that GIE is cleared due to unknown reason, and i2c interrupt could not be raised to do further processing. 

In waveform, I can see that 8bit addr/rw bit has been sent, but since there is no interrupt, master failed to generate 9th clock to check device ACK.

so my question is why GIE is cleared? how to avoid this issue?

Falong 

  • the CCS version is Version: 8.2.0.00007
    TI compiler version is: v18.1.3.LTS
  • Hi Falong,

    from what you describe the scenario you see is linked to the fact, that GIE is cleared for step operation per default. It's on by default for stepping because the MSP430 hardware doesn't have the ability to suppress an interrupt any other way. That means that you'd end up in an ISR on every single step, effectively meaning that stepping some applications would be impossible.

    You can disable this option in the Project Properties -> Debug -> Program/Memory Load Options -> Disable Interrupts.
    Please let me know if this works.

    Best regards,
    Britta
  • Hi Falong,

    as I didn't hear back from you I assume that the issue has been solved.
    Please note that I am going to close this thread. Please reply back to re-open it in case you need further assistance.

    Thanks and best regards,
    Britta

**Attention** This is a public forum