We are using on chip i2c module for sensor interface and it is working fine. However upon read data from Rx data register (I2CDRR), the I2CDRR is gets assigned to 0x0080. There is no such information in TRM. Could you please explain this behavior?
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.
We are using on chip i2c module for sensor interface and it is working fine. However upon read data from Rx data register (I2CDRR), the I2CDRR is gets assigned to 0x0080. There is no such information in TRM. Could you please explain this behavior?
Definitely 0x0080 is not the received data as we are reading data from temperature sensor. It looks garbage data. we haven't probed the i2c lines yet. When we are reading the data from I2CDRR when the "RXRDY" is set is correct data. However after reading data from I2CDRR , it gets 0x0080. At the next cycle we are receiving sensor data and the cycle goes on.
When We are reading the data from I2CDRR by using a CCS command "this.debugSession.memory.readRegister(RegisterName)", through the Scripting Console, the read is successful, data is read, but RXRDY bit of I2CSTR is not cleared. Also, I2CDRR retains the data.
The RXRDY flag should be polled to determine when to read the received data in the I2CDRR. The RXRDY flag is only set when the received data in the shift register has been copied into the data register.
If the read is not from CPU or DMA, the RXRDY is not cleared.