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
575 of 1441
NXP Semiconductors
UM10503
Chapter 22: LPC43xx/LPC43Sxx SD/MMC interface
3. Program CMDARG register @0x28 with the data address to which data should be
written.
4. Write data in the FIFO; it is usually best to start filling data the full depth of the FIFO.
5. Program the Command register with the parameters listed in
. For SD and
MMC cards, use CMD24 for a single-block write and CMD25 for a multiple-block
write. For SDIO cards, use CMD53 for both single-block and multiple-block transfers.
After writing to the CMD register, Module starts executing a command; when the
command is sent to the bus, a command_done interrupt is generated.
6. Software should look for data error interrupts; that is, for bits 7, 9, and 15 of the
RINTSTS register. If required, software can terminate the data transfer by sending the
STOP command.
7. Software should look for Transmit_FIFO_Data_request and/or time-out conditions
from data starvation by the cpu. In both cases, the software should write data into the
FIFO.
8. When a Data_Transfer_Over interrupt is received, the data command is over. For an
open-ended block transfer, if the byte count is 0, the software must send the STOP
command. If the byte count is not 0, then upon completion of a transfer of a given
number of bytes, the Module should send the STOP command, if necessary.
Completion of the AUTO-STOP command is reflected by the Auto_command_done
interrupt - bit 14 of the RINTSTS register. A response to AUTO_STOP is stored in
RESP1 @0x34.
Table 394. CMD register settings for Single-block or Multiple-block write
Name
Value
Comments
start_cmd 1
update_clock_ registers_only
0
No clock parameters update command
card_number
0
Card number in use. Only zero is
possible because one card is support.
Data_expected 1
Send_initialization
0
Can be 1, but only for card reset
commands, such as CMD0
stop_abort_cmd
0
Can be 1 for commands to stop data
transfer, such as CMD12
Send_auto_stop
0/1
-
Transfer_mode
0
Block transfer
Read_write
1
Write to card
Cmd_index
Command
index
Response_length
0
Can be 1 for R2 (long) response
Response_expect
1
Can be 0 for commands with no
response; for example, CMD0, CMD4,
CMD15, and so on