Operational Information
1778
SPNU563A – March 2018
Copyright © 2018, Texas Instruments Incorporated
Inter-Integrated Circuit (I2C) Module
31.5 Operational Information
The following section provides specific information about how the I2C module operates.
31.5.1 I2C Module Interrupts
The I2C module generates seven types of interrupts. These seven interrupts are accompanied with seven
interrupt mask bits in the interrupt mask register (I2CIMR) and with seven interrupt flag bits in the status
register (I2CSR).
31.5.1.1 I2C Interrupt Requests
The I2C module generates the interrupt requests described below. All requests are multiplexed through an
arbiter into a single I2C interrupt request to the CPU. Each interrupt request has a flag bit and an enable
bit. Interrupts must be enabled prior to the occurrence of the expected interrupt condition. When one of the
specified events occurs, the flag bit is set. If the corresponding enable bit is 0, the interrupt request is
blocked. If the enable bit is 1, the interrupt request is forwarded to the CPU as an I2C interrupt request. As
an alternative, the CPU can poll all of the bits shown in
Table 31-2. Interrupt Requests Generated by I2C Module
Flag
Name
Generated
AL
Arbitration-lost interrupt
Generated when the I2C module has lost an arbitration contest with another
master-transmitter
NACK
No-acknowledge interrupt
Generated when the master I2C does not receive an acknowledge from the
receiver
ARDY
Register-access-ready interrupt
Generated when the previously programmed address, data and command
have been performed and the status bits have been updated. The interrupt is
used to notify the device that the I2C registers are ready to be accessed.
RXRDY
Receive-data-ready interrupt
Generated when the received data in the receive-shift register (I2CSR) has
been copied into the data receive register (I2CDRR). The RXRDY bit can also
be polled by the device to determine when to read the received data in the
I2CDRR.
TXRDY
Transmit-data-ready interrupt
Generated when the transmitted data has been copied from the data transmit
register (I2CDXR) into the transmit-shift register (I2CXSR). The TXRDY bit
can also be polled by the device to determine when to write the next data into
I2CDXR.
SCD
Stop-condition-detect interrupt
Generated when a STOP condition has been detected.
AAS
Address-as-slave interrupt
Generated when the I2C has recognized its own slave address or an address
of all zeroes.
The interrupt vector register (I2CIVR) contains the binary-coded-interrupt vector that indicates the highest
priority interrupt that is pending and enabled. When I2CIVR is read, the corresponding interrupt flags for
AL, NACK and SCD are automatically cleared, if their interrupts are enabled. Reading the I2CIVR will not
clear the AAS, ARDY, RXRDY, or TXRDY interrupt pending flags. Please see
for the
method to clear these four flags.
If more than one interrupt is pending, a new interrupt will be generated for the next highest priority pending
interrupt when you re-enable the I2C interrupt.
A transmit interrupt is generated just after the START condition in master transmitter mode. This ensures
that the CPU will get an interrupt even if no slave returns an ACK to the slave address following the
START condition.
It is important to note that when the I2C is configured to generate interrupts as a slave transmitter and the
backward compatibility mode (BCM) bit is set to 1, an extra transmit interrupt occurs. The application
should monitor the ACK from the master to determine whether to load another byte into I2CDXR.