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