Functional Description
Note that in I2C Slave TX Mode, the TX FIFO threshold should be set to 1 (I2C_BUF.TXTRSH=0, default
value), since the length of the transfer may not be known at configuration time. In this way, the interrupt
(or accordingly, DMA) requests will be generated for each byte requested by the remote I2C master to be
transferred over the I2C bus. This configuration will prevent the I2C core to request additional data from
the CPU or from the DMA controller (using IRQ or DMA), data that will eventually not be extracted from
the FIFO by the external master (which can use not acknowledge at any time to end the transfer). If the
TX threshold is not set to 1, the module will generate an interrupt or assert a DMA only when the external
master requests a byte and the FIFO is empty. However, in this case the TX FIFO will require to be
cleared at the end of the transfer.
The I2C module offers the possibility to the user to clear the RX or TX FIFO. This is achieved through
I2C_BUF.RXFIFO_CLR and I2C_BUF.TXFIFO_CLR registers, which act like software reset for the FIFOs.
In DMA mode, these bits will also reset the DMA state machines.
The FIFO clearing feature can be used when the module is configured as a transmitter, the external
receiver responds with a NACK in the middle of the transfer, and there is still data in TX FIFO waiting to
be transferred.
On the Functional (I2C) domain, the thresholds can always be considered equal to 1. This means that the
I2C Core can start transferring data on the I2C bus whenever it has data in the FIFOs (FIFO is not empty).
3713
SPRUH73H – October 2011 – Revised April 2013
I2C
Copyright © 2011–2013, Texas Instruments Incorporated