Other Parts Discussed in Thread: INA219,
Hi,
We are currently using the CC1312R controller which is connected to an INA219 sensor IC, in an noisy environment.
Because of the noisy environment, we see that some I2C operations may fail due to the noise, which is acceptable for us.
The problem we have is that we are not able to recover from an I2C error.
We already tried the following with no success:
- Call I2C_cancel to cancel all transactions
- Call the following sequence:
I2C_cancel(i2c0Handle); I2C_close(i2c0Handle); i2c0Handle = I2C_open(Board_I2C0, &i2cParams);
At the next I2C transfer, the code reports an I2C bus error in function I2CCC26XX_primeTransfer, at the following line (either read or write transfer):
/* Check bus status, return with error if busy */
if (I2CMasterBusBusy(hwAttrs->baseAddr))
{
return I2C_STATUS_ERROR;
}
The MSTAT value reports active IDLE, BUSBSY and Arbitration lost flag.
We tried the I2C drivers from SDK version 2.30 and also 3.20.
Do you have any advise how we can reset/recover the I2C bus?
Thank you in advance,
Stefan