Functional Description
1323
SLAU723A – October 2017 – Revised October 2018
Copyright © 2017–2018, Texas Instruments Incorporated
Inter-Integrated Circuit (I
2
C) Interface
NOTE:
High-Speed mode is 3.4 Mbps it the correct system clock frequency is set and there is
appropriate pull strength on SCL and SDA lines.
19.3.3 Interrupts
The I
2
C can generate interrupts when the following conditions are observed in the master module:
•
Master transaction completed (RIS bit)
•
Master arbitration lost (ARBLOSTRIS bit)
•
Master Address/Data NACK (NACKRIS bit)
•
Master bus time-out (CLKRIS bit)
•
Next byte request (RIS bit)
•
Stop condition on bus detected (STOPRIS bit)
•
Start condition on bus detected (STARTRIS bit)
•
RX DMA interrupt pending (DMARXRIS bit)
•
TX DMA interrupt pending (DMATXRIS bit)
•
Trigger value for FIFO has been reached and a TX FIFO request interrupt is pending (TXRIS bit)
•
Trigger value for FIFO has been reached and a RX FIFO request interrupt is pending (RXRIS bit)
•
Transmit FIFO is empty (TXFERIS bit)
•
Receive FIFO is full (RXFFRIS bit)
Interrupts are generated when the following conditions are observed in the slave module:
•
Slave transaction received (DATARIS bit)
•
Slave transaction requested (DATARIS bit)
•
Slave next byte transfer request (DATARIS bit)
•
Stop condition on bus detected (STOPRIS bit)
•
Start condition on bus detected (STARTRIS bit)
•
RX DMA interrupt pending (DMARXRIS bit)
•
TX DMA interrupt pending (DMATXRIS bit)
•
Programmable trigger value for FIFO has been reached and a TX FIFO request interrupt is pending
(TXRIS bit)
•
Programmable trigger value for FIFO has been reached and a RX FIFO request interrupt is pending
(RXRIS bit)
•
Transmit FIFO is empty (TXFERIS bit)
•
Receive FIFO is full (RXFFRIS bit)
The I
2
C master and slave modules have separate interrupt registers. Interrupts can be masked by clearing
the appropriate bit in the I2CMIMR or I2CSIMR register. Note that the RIS bit in the Master Raw Interrupt
Status (I2CMRIS) register and the DATARIS bit in the Slave Raw Interrupt Status (I2CSRIS) register have
multiple interrupt causes, including a next byte transfer request interrupt. This interrupt is generated when
the master and slave are requesting a receive or transmit transaction.
19.3.4 Loopback Operation
The I
2
C modules can be placed into an internal loopback mode for diagnostic or debug work by setting the
LPBK bit in the I
2
C Master Configuration (I2CMCR) register. In loopback mode, the SDA and SCL signals
from the master and are tied to the SDA and SCL signals of the slave module to allow internal testing of
the device without having to go through I/O.