45.6.6.10 FIFO Pointer Error

A FIFO overflow is reported in TWIHS_FSR.

If the Transmit FIFO is full and a write access is performed on TWIHS_THR, it generates a Transmit FIFO pointer error and sets TWIHS_FSR.TXFPTEF.

In Multiple Data mode, if the number of data written in TWIHS_THR (according to the register access size) is greater than the free space in the Transmit FIFO, a Transmit FIFO pointer error is generated and TWIHS_FSR.TXFPTEF is set.

A FIFO underflow is reported in TWIHS_FSR.

In Multiple Data mode, if the number of data read in TWIHS_RHR (according to the register access size) is greater than the number of unread data in the Receive FIFO, a Receive FIFO pointer error is generated and TWIHS_FSR.RXFPTEF is set.

No pointer error occurs if the FIFO state/level is checked before writing/reading in TWIHS_THR/TWIHS_RHR. The FIFO state/level can be checked either with TXRDY, RXRDY, TXFL or RXFL. When a pointer error occurs, other FIFO flags may not behave as expected; their states should be ignored.

If a Transmit or Receive pointer error occurs, a software reset must be performed using TWIHS_CR.SWRST. Note that issuing a software while transmitting might leave a client in an unknown state holding the TWD line. In such case, a Bus Clear Command will allow to make the client release the TWD line (the first frame sent after might not be received properly by the client).