When several interactions are possible from a set of pending commands, the interaction with the highest priority, i.e., the interaction
closest to the top of
Table 15.2 I2C Interactions in Prioritized Order on page 406
Pending commands can be cleared by setting the CLEARPC command bit in I2Cn_CMD.
15.3.7.3 Automatic ACK Interaction
When receiving addresses and data, an ACK command in I2Cn_CMD is normally required after each received byte. When AUTOACK
is set in I2Cn_CTRL, an ACK is always pending, and the ACK-pending bit PACK in I2Cn_STATUS is thus always set, even after an
ACK has been consumed. This is used when data is picked using I2Cn_RXDOUBLE and can also be used with I2Cn_RXDATA in order
to reduce the amount of software interaction required during a transfer.
15.3.7.4 Reset State
After a reset, the state of the I
2
C-bus is unknown. To avoid interrupting transfers on the I
2
C-bus after a reset of the I
2
C module or the
entire MCU, the I
2
C-bus is assumed to be busy when coming out of a reset, and the BUSY flag in I2Cn_STATUS is thus set. To be able
to carry through master operations on the I
2
C-bus, the bus must be idle.
The bus goes idle when a STOP condition is detected on the bus, but on buses with little activity, the time before the I
2
C module de-
tects that the bus is idle can be significant. There are two ways of assuring that the I
2
C module gets out of the busy state.
• Use the ABORT command in I2Cn_CMD. When the ABORT command is issued, the I
2
C module is instructed that the bus is idle.
The I
2
C module can then initiate master operations.
• Use the Bus Idle Timeout. When SCL has been high for a long period of time, it is very likely that the bus is idle. Set BITO in
I2Cn_CTRL to an appropriate timeout period and set GIBITO in I2Cn_CTRL. If activity has not been detected on the bus within the
timeout period, the bus is then automatically assumed idle, and master operations can be initiated.
Note:
If operating in slave mode, the above approach is not necessary.
EFM32JG1 Reference Manual
I2C - Inter-Integrated Circuit Interface
silabs.com
| Smart. Connected. Energy-friendly.
Preliminary Rev. 0.6 | 407