![NXP Semiconductors LPC43Sxx User Manual Download Page 586](http://html1.mh-extra.com/html/nxp-semiconductors/lpc43sxx/lpc43sxx_user-manual_1721827586.webp)
UM10503
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2015. All rights reserved.
User manual
Rev. 2.1 — 10 December 2015
586 of 1441
NXP Semiconductors
UM10503
Chapter 22: LPC43xx/LPC43Sxx SD/MMC interface
•
Generic DMA mode - Simultaneously sets controller_reset, fifo_reset, and dma_reset;
clears the RAWINTS register @0x44 by using another write in order to clear any
resultant interrupt. If a "graceful" completion of the DMA is required, then it is
recommended to poll the status register to see whether the dma request is 0 before
resetting the DMA interface control and issuing an additional FIFO reset.
•
In DMA transfer mode, even when the FIFO pointers are reset, if there is a DMA
transfer in progress, it could push or pop data to or from the FIFO; the DMA itself
completes correctly. In order to clear the FIFO, the software should issue an
additional FIFO reset and clear any FIFO underrun or overrun errors in the RAWINTS
register caused by the DMA transfers after the FIFO was reset.
22.7.5.4 Error Handling
The Module implements error checking; errors are reflected in the RAWINTS register
@0x44 and can be communicated to the software through an interrupt, or the software
can poll for these bits. Upon power-on, interrupts are disabled (int_enable in the CTRL
register is 0), and all the interrupts are masked (bits 0-31 of the INTMASK register; default
is 0). Error handling:
•
Response and data time-out errors - For response time-out, software can retry the
command. For data time-out, the Module has not received the data start bit - either for
the first block or the intermediate block - within the time-out period, so software can
either retry the whole data transfer again or retry from a specified block onwards. By
reading the contents of the TCBCNT later, the software can decide how many bytes
remain to be copied.
•
Response errors - Set when an error is received during response reception. In this
case, the response that copied in the response registers is invalid. Software can retry
the command.
•
Data errors - Set when error in data reception are observed; for example, data CRC,
start bit not found, end bit not found, and so on. These errors could be set for any
block-first block, intermediate block, or last block. On receipt of an error, the software
can issue a STOP or ABORT command and retry the command for either whole data
or partial data.
•
Hardware locked error - Set when the Module cannot load a command issued by
software. When software sets the start_cmd bit in the CMD register, the Module tries
to load the command. If the command buffer is already filled with a command, this
error is raised. The software then has to reload the command.
•
FIFO underrun/overrun error - If the FIFO is full and software tries to write data in the
FIFO, then an overrun error is set. Conversely, if the FIFO is empty and the software
tries to read data from the FIFO, an underrun error is set. Before reading or writing
data in the FIFO, the software should read
•
the fifo_empty or fifo_full bits in the Status register.
•
Data starvation by cpu time-out - Raised when the Module is waiting for software
intervention to transfer the data to or from the FIFO, but the software does not transfer
within the stipulated time-out period. Under this condition and when a read transfer is
in process, the software
•
Should read data from the FIFO and create space for further data reception. When a
transmit operation is in process, the software should fill data in the FIFO in order to
start transferring data to the card.