Facing an issue in SDK 4.30, the device does not enter LPDS after an error condition on I2C.
Using CC3235 as an I2C master and in I2C_MODE_CALLBACK mode.
Sometimes following errors occur on the I2C bus. I am able to recover from these conditions through a reattempt. I2C_STATUS_DATA_NACK, I2C_STATUS_ADDR_NACK, I2C_STATUS_ARB_LOST.
The issue is after this condition occurs, MCU does not enter LPDS. I2C continues to function as normal.
How to debug the issue. I have verified that I am calling I2C_CloseConnection(). in both failures and success.
Below is the code flow:
void I2C_Callback(I2C_Handle Handle, I2C_Transaction *I2CTransaction_struct, Bool Result)
lastI2CTransStatus = I2CTransaction_struct->status;
i2cParams.bitRate = I2C_400kHz;
i2cParams.transferMode = I2C_MODE_CALLBACK;
i2cParams.transferCallbackFxn = (I2C_CallbackFxn)&I2C_Callback;
i2cHandle = I2C_open(CONFIG_I2C_0, &i2cParams);
error = sem_timedwait(&App_CB.i2cTransfer, &ts);
The semaphore returns -1 in an error condition