454
/
838
Nations Technologies Inc.
Tel
:
+86-755-86309900
:
Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North.
Nanshan District, Shenzhen, 518057, P.R.China
Data FIFO
The data FIFO unit has a data buffer for sending and receiving data buffers. The FIFO contains a data buffer and
transmit and receive circuits, where the buffer size is 32 bits wide per word, 32 words in total (32 words deep). The
data FIFO operates in the AHB clock region (HCLK/2), and all signals connected to the SDIO clock region
(SDIOCLK) are resynchronized.
Depending on the SDIO_STS.TXRUN and SDIO_STS.RXRUN flags, the FIFO can be turned off, transmit enabled,
or receive enabled. SDIO_STS.TXRUN and SDIO_STS.RXRUN are set by the data channel subunit and are mutually
exclusive:
When SDIO_STS.TXRUN is valid, the transmit FIFO represents the transmit circuit and data buffer
When SDIO_STS.RXRUN is valid, the receive FIFO represents the receive circuit and data buffer
Transmit FIFO:
When the SDIO transmit function is enabled, data can be written to the transmit FIFO through the
AHB interface. The transmit FIFO has 32 consecutive addresses. There is a data output register in the transmit FIFO
that contains the data word pointed to by the read pointer. When the data channel subunit fills the shift register, it
moves the read pointer to the next data and transfers the data out. If the transmit FIFO is not enabled, all status flags
are inactive. When sending data, the data channel subunit sets SDIO_STS.TXRUN to be valid.
Table 18-4 Transmit FIFO Status Flags
Flag
Description
SDIO_STS.TFIFOF
This flag is set high when all 32 transmit FIFO words have valid data.
SDIO_STS.TFIFOE
This flag is set high when all 32 transmit FIFO words have no valid data.
SDIO_STS.TFIFOHE
This flag is set high when 8 or more transmit FIFO words are empty. This flag can be used as a DMA
request.
SDIO_STS.TDATVALID
This flag is set high when the transmit FIFO contains valid data. The meaning of this flag is just the
opposite of TFIFOE.
SDIO_STS.TXURERR
This flag is set high when an underflow error occurs. This flag is cleared when writing to the SDIO
clear register.
Receive FIFO:
When the data channel subunit receives a data word, it will write the data into the FIFO. After the
write operation is completed, the write pointer will automatically increase by one; at the other end, there is a read
pointer that always points to the current data in the FIFO. If the receive FIFO is closed, all status flags are cleared
and the read and write pointers are reset. The data channel subunit sets SDIO_STS.RXRUN when data is received.
The following table lists the status flags of the receive FIFO. The receive FIFO can be accessed through 32
consecutive addresses.
Table 18-5 Receive FIFO Status Flags
Flag
Description
SDIO_STS.RFIFOF
This flag is set high when all 32 transmit FIFO words have valid data.
SDIO_STS.RFIFOE
This flag is set high when all 32 transmit FIFO words have no valid data.
SDIO_STS.RFIFOHF
This flag is set high when 8 or more transmit FIFO words are empty. This flag can be used as a DMA
request.
SDIO_STS.RDATVALID
This flag is set high when the transmit FIFO contains valid data. The meaning of this flag is just the
opposite of TFIFOE.