8.3.8.6.8 FIFO Overflow/Underflow Error

If the Transmit FIFO is full and a write access is performed on FLEX_SPI_TDR, it generates a Transmit FIFO overflow error and sets FLEX_SPI_SR.TXFPTEF.

If the number of data written in FLEX_SPI_TDR (according to the register access size) is greater than the free space in the Transmit FIFO, a Transmit FIFO overflow error is generated and FLEX_SPI_SR.TXFPTEF is set.

If the number of data read in FLEX_SPI_RDR (according to the register access size) is greater than the number of unread data in the Receive FIFO, a Receive FIFO underflow error is generated and FLEX_SPI_SR.RXFPTEF is set.

No error occurs if the FIFO state/level is checked before writing/reading the required amount of data in FLEX_SPI_TDR/SPI_RDR. The FIFO state/level can be checked either with TXRDY, RXRDY, TXFL or RXFL. When such error occurs, other FIFO flags may not behave as expected; their states must be ignored. A software reset must be performed using FLEX_SPI_CR.SWRST (configuration will be lost).