2 receive data fifo, mmc_rxfifo – Intel PXA26X User Manual

Page 521

Advertising
background image

Intel® PXA26x Processor Family Developer’s Manual

15-9

MultiMediaCard Controller

15.2.8.2

Receive Data FIFO, MMC_RXFIFO

The two receive data FIFOs are read only by the software and are readable on a single byte basis.
They are dual FIFOs, where each FIFO is 32 entries of 1-byte data. Access to the FIFOs is
controlled by the controller and depends on the status of the FIFOs.

Both FIFOs and their controls are cleared to a starting state after a system reset and at the
beginning of all command sequences.

The FIFOs swap between the software and MMC bus. At any time, while the software has read
access to one of the FIFOs, the MMC bus has write access to the other FIFO.

For purposes of an example, the FIFOs are called RXFIFO1 and RXFIFO2. After a reset or at the
beginning of a command sequence, both FIFOs are empty and the software has read access to
RXFIFO1 and the MMC has write access to RXFIFO2. When RXFIFO2 becomes full and
RXFIFO1 is empty, the FIFOs swap and the software has read access to RXFIFO2 and the MMC
has write access to RXFIFO1. When RXFIFO1 becomes full and RXFIFO2 is empty, the FIFOs
swap and the software has read access to RXFIFO1 and the MMC has write access to RXFIFO2.

This swapping process continues through out the data transfer and is transparent to both the
software and the MMC controller.

If at any time both FIFOs become full and the data transmission is not complete, the controller
turns the MMCLK off to prevent any overflows. When the clock is off, data transmission from the
card stops until the clock is turned back on. After the software has emptied the FIFO that it is
connected to, the controller turns the clock on to continue data transmission.

The full status of the FIFO that the software is connected to is registered in the
MMC_STAT[RECV_FIFO_FULL] bit.

The receive FIFO is readable on byte boundaries and the FIFO read request is only asserted once
per FIFO access (once per 32 bytes available). Therefore, 32 bytes must be read for each request,
except for the last read which may be less than 32 bytes.

If the DMA is used, it must be programmed to do 1-byte reads of 32-byte bursts. The last read can
be less than a 32-byte burst. Some examples are:

Receive 96 bytes of data:

Read 32 bytes three times.

For the DMA, use three descriptors of 32 bytes and 32-byte bursts.

Receive 98 bytes of data:

Read 32 bytes three times, then read two more bytes.

For the DMA, use three descriptors of 32 bytes and 32-byte bursts and one descriptor of two
more bytes and 8-, 16-, or 32- byte bursts.

Receive 105 bytes:

Read 32 bytes three times, then read nine more bytes.

For the DMA, use three descriptors of 32 bytes and 32-byte bursts and one descriptor of nine
or more bytes and 16- or 32-byte bursts.

Advertising