SLAU847D October 2022 – May 2024 MSPM0L1105 , MSPM0L1106 , MSPM0L1227 , MSPM0L1228 , MSPM0L1228-Q1 , MSPM0L1303 , MSPM0L1304 , MSPM0L1304-Q1 , MSPM0L1305 , MSPM0L1305-Q1 , MSPM0L1306 , MSPM0L1306-Q1 , MSPM0L1343 , MSPM0L1344 , MSPM0L1345 , MSPM0L1346 , MSPM0L2227 , MSPM0L2228 , MSPM0L2228-Q1
A typical I2C transaction must first write the target to set the register number and then do a repeated start + read to read the data value. However, the RD_ON_EMPTY flag enables two I2C transactions with a single setup of the I2C controller. Software can set up both the write and read together, with the limitation being that the "write" phase cannot send more data than fits in the TX FIFO. This is an optimization to minimize interrupt processing requirements. The high-level set up is:
The expected behavior with this set up is that the controller does a START, transmits all TXFIFO data, and when TXFIFO is empty automatically does a repeated START, reads the MBLEN bytes, then STOP.