Part Number:CC1310
I have an issue where I am unable to clear a missing data acknowledgment error in the i2c module. The reproduction is quite simple:
1. Start i2c transaction: Write 1 byte (no read) to a device not on the the bus (I use address 0x70)
2. This obviously fails, and inspecting MSTAT I see both DATACK_N and ADRACK_N set (0x0c)
3. Start i2c transaction: Read 2 bytes (no write) to a present device.
4. Observe that the read fails. Inspecting MSTAT I see ADRACK_N has been cleared, but DATACK_N remains (0x08) causing the read to fail.
So,
1. Are my expectations of the error being cleared, and the read in step 3. to be successful, correct?
2. I would expect only a ADRACK_N after step 1, not also DATACK_N - is this assumption correct?
Some notes:
* If step 1 was a read instead of a write it works: Error would be 0x04, which would be cleared when doing the read in step 3.
* If I simply ignore the error in step 3, I see the read is actually successful - I get 2 bytes correctly transferred.
* If I do a write towards an existing device after step 1, or after step 4, the error will be cleared and everything works again.
* I do not power down the SERIAL domain in between any of the steps (I have not tried, but I am guessing it would clear the errors).
Disclaimer: I am not using the coresdk i2c libraries. I have modified the contiki-ng i2c library to match the coresdk at least to the extent that the I2C module commands are identical (including error handling).