Functional Description
interrupt is used to let the CPU know that the I2C registers are ready for access.
•
Receive interrupt/status (RRDY) is generated when there is received data ready to be read by the CPU
from the I2C_DATA register (see the FIFO Management subsection for a complete description of
required conditions for interrupt generation). The CPU can alternatively poll this bit to read the received
data from the I2C_DATA register.
•
Transmit interrupt/status (XRDY) is generated when the CPU needs to put more data in the I2C_DATA
register after the transmitted data has been shifted out on the SDA pin (see the FIFO Management
subsection for a complete description of required conditions for interrupt generation). The CPU can
alternatively poll this bit to write the next transmitted data into the I2C_DATA register.
•
Receive draining interrupt (RDR) is generated when the transfer length is not a multiple of threshold
value, to inform the CPU that it can read the amount of data left to be transferred and to enable the
draining mechanism. (see the Draining Feature subsection for additional details).
•
Transmit draining interrupt (XDR) is generated when the transfer length is not a multiple of threshold
value, to inform the CPU that it can read the amount of data left to be written and to enable the
draining mechanism. (see the Draining Feature subsection for additional details).
When the interrupt signal is activated, the Local Host must read the I2C_IRQSTATUS_RAW register to
define the type of the interrupt, process the request, and then write into these registers the correct value to
clear the interrupt flag.
21.3.12 DMA Events
The I2C module can generate two DMA requests events, read (I2C_DMA_RX) and write (I2C_DMA_TX)
that can be used by the DMA controller to synchronously read received data from the I2C_DATA or write
transmitted data to the I2C_DATA register. The DMA read and write requests are generated in a similar
manner as RRDY and XRDY, respectively.
The I2C DMA request signals (I2C_DMA_TX and I2C_DMA_RX) are activated according to the FIFO
Management subsection.
21.3.13 Interrupt and DMA Events
I2C has two DMA channels (Tx and Rx).
I2C has one interrupt line for all the interrupt requests.
For the event and interrupt numbers, see AM335x ARM Cortex-A8 Microprocessors (MPUs) (literature
number
).
21.3.14 FIFO Management
The I2C module implements two internal 32-bytes FIFOs with dual clock for RX and TX modes. The depth
of the FIFOs can be configured at integration via a generic parameter which will also be reflected in
I2C_IRQSTATUS_RAW.FIFODEPTH register.
21.3.14.1 FIFO Interrupt Mode Operation
In FIFO interrupt mode (relevant interrupts enabled via I2C_IRQENABLE_SET register), the processor is
informed of the status of the receiver and transmitter by an interrupt signal. These interrupts are raised
when receive/transmit FIFO threshold (defined by I2C_BUF.TXTRSH or I2C_BUF.RXTRSH) are reached;
the interrupt signals instruct the Local Host to transfer data to the destination (from the I2C module in
receive mode and/or from any source to the I2C FIFO in transmit mode).
and
, respectively, illustrate receive and transmit operations from FIFO
management point of view.
3709
SPRUH73H – October 2011 – Revised April 2013
I2C
Copyright © 2011–2013, Texas Instruments Incorporated