RX FIFO Max
Level
Progammable
Threshold
(RXTRSH)
Zero Byte
DMA RX Active
Time
RXTRSH
Functional Description
interrupt condition is not met.
•
When detecting an interrupt request (XRDY or RRDY type), the CPU can be programmed to write/read
the amount of data bytes specified by the corresponding FIFO threshold (I2C_BUF. 1 or
I2C_BUF. 1). In this case, the interrupt condition will be cleared and the next interrupt will
be asserted again when the XRDY or RRDY condition will be again met.
If the second interrupt serving approach is used, an additional mechanism (draining feature) is
implemented for the case when the transfer length is not a multiple of FIFO threshold (see the Draining
Feature subsection).
In slave TX mode, the draining feature cannot be used, since the transfer length is not known at the
configuration time, and the external master can end the transfer at any point by not acknowledging one
data byte.
21.3.14.2 FIFO Polling Mode Operation
In FIFO polled mode (I2C_IRQENABLE_SET.XRDY_IE and I2C_IRQENABLE_SET.RRDY_IE disabled
and DMA disabled), the status of the module (receiver or transmitter) can be checked by polling the XRDY
and RRDY status registers (I2C_IRQSTATUS_RAW) (RDR and XDR can also be polled if draining feature
must be used). The XRDY and RRDY flags are accurately reflecting the interrupt conditions mentioned in
Interrupt Mode. This mode is an alternative to the FIFO interrupt mode of operation, where the status of
the receiver and transmitter is automatically known by means of interrupts sent to the CPU.
21.3.14.3 FIFO DMA Mode Operation
In receive mode, a DMA request is generated as soon as the receive FIFO exceeds its threshold level
defined in the threshold level register (I2C_BUF.1). This request should be de-asserted when
the number of bytes defined by the threshold level has been read by the DMA, by setting the
I2C_DMARXENABLE_CLR.DMARX_ENABLE_CLEAR field.
Figure 21-13. Receive FIFO DMA Request Generation
In transmit mode, a DMA request is automatically asserted when the transmit FIFO is empty. This request
should be de-asserted when the number of bytes defined by the number in the threshold register
(I2C_BUF.1) has been written in the FIFO by the DMA, by setting the
I2C_DMATXENABLE_CLR. DMATX_ENABLE_CLEAR field. If an insufficient number of characters are
written, then the DMA request will remain active.
and
illustrate DMA TX
transfers with different values for TXTRSH.
3711
SPRUH73H – October 2011 – Revised April 2013
I2C
Copyright © 2011–2013, Texas Instruments Incorporated