User's Manual

Table Of Contents
39.2.3 CRC Data Output Register (CRCDOR) .................................................................................1423
39.3 Operation .........................................................................................................................................1424
39.4 Usage Notes .....................................................................................................................................1427
39.4.1 Module Stop Function Setting ................................................................................................1427
39.4.2 Note on Transmission .............................................................................................................1427
40. SD Host Interface (SDHIa) ......................................................................................................... 1428
40.1 Overview .........................................................................................................................................1428
40.2 Register Details ................................................................................................................................1429
40.2.1 Command Register (SDCMD) ...............................................................................................1429
40.2.2 Argument Register (SDARG) ................................................................................................1431
40.2.3 Data Stop Register (SDSTOP) ...............................................................................................1431
40.2.4 Block Count Register (SDBLKCNT) .....................................................................................1432
40.2.5 Response Register 10 (SDRSP10), Response Register 32 (SDRSP32),
Response Register 54 (SDRSP54), Response Register 76 (SDRSP76) .................................1433
40.2.6 SD Status Register 1 (SDSTS1) ............................................................................................. 1434
40.2.7 SD Status Register 2 (SDSTS2) .............................................................................................1437
40.2.8 SD Interrupt Mask Register 1 (SDIMSK1) ............................................................................1441
40.2.9 SD Interrupt Mask Register 2 (SDIMSK2) ............................................................................1442
40.2.10 SDHI Clock Control Register (SDCLKCR) ...........................................................................1443
40.2.11 Transfer Data Size Register (SDSIZE) ...................................................................................1444
40.2.12 Card Access Option Register (SDOPT) .................................................................................1445
40.2.13 SD Error Status Register 1 (SDERSTS1) ...............................................................................1446
40.2.14 SD Error Status Register 2 (SDERSTS2) ...............................................................................1447
40.2.15 SD Buffer Register (SDBUFR) ..............................................................................................1448
40.2.16 SDIO Mode Control Register (SDIOMD) ..............................................................................1448
40.2.17 SDIO Status Register (SDIOSTS) ..........................................................................................1450
40.2.18 SDIO Interrupt Mask Register (SDIOIMSK) .........................................................................1451
40.2.19 DMA Transfer Enable Register (SDDMAEN) ......................................................................1452
40.2.20 SDHI Software Reset Register (SDRST) ...............................................................................
1453
40.2.21 Swap Control Register (SDSWAP) ........................................................................................1454
40.3 SDHI Operation ...............................................................................................................................1455
40.3.1 Data Block Format of the SD Card ........................................................................................1455
40.3.2 SD Buffer and the SDBUFR Register ....................................................................................1456
40.3.3 SD Card Detection ..................................................................................................................1457
40.3.3.1 Using the SDHI_CD Pin to Detect an SD Card ............................................................1457
40.3.3.2 Using the SDHI_D3 Pin to Detect an SD Card .............................................................1457
40.3.4 SD Card Write Protection .......................................................................................................1458
40.3.4.1 Using the SDHI_WP Pin to Enable Write Protection ...................................................1458
40.3.4.2 Using a Command to Enable Write Protection .............................................................1458
40.3.5 Communication Errors and Timeouts .....................................................................................1459
40.3.6 Examples of Issuing a Command ...........................................................................................1460