Information Technology Reference
In-Depth Information
A table in ROM holds additional information about the commands. For
each command, the table below stores a command name, CRC value,
response type, and whether or not the command is followed by more data.
Firmware can identify an entry in the table by specifying a command from
the enumeration above. For example, SEND_CSD is the third enumeration
constant in the enumeration, and cmdSEND_CSD is the third entry in the
table.
#define MOREDATA !0
#define NODATA 0
const rom typSDC_CMD sdmmc_cmdtable[] =
{
// command name
CRC
response type
more data?
{cmdGO_IDLE_STATE,
0x95,
R1,
NODATA},
{cmdSEND_OP_COND,
0xF9,
R1,
NODATA},
{cmdSEND_CSD,
0xAF,
R1,
MOREDATA},
{cmdSEND_CID,
0x1B,
R1,
MOREDATA},
{cmdSTOP_TRANSMISSION,
0xC3,
R1,
NODATA},
{cmdSEND_STATUS,
0xAF,
R2,
NODATA},
{cmdSET_BLOCKLEN,
0xFF,
R1,
NODATA},
{cmdREAD_SINGLE_BLOCK,
0xFF,
R1,
MOREDATA},
{cmdREAD_MULTI_BLOCK,
0xFF,
R1,
MOREDATA},
{cmdWRITE_SINGLE_BLOCK,
0xFF,
R1,
MOREDATA},
{cmdWRITE_MULTI_BLOCK,
0xFF,
R1,
MOREDATA},
{cmdTAG_SECTOR_START,
0xFF,
R1,
NODATA},
{cmdTAG_SECTOR_END,
0xFF,
R1,
NODATA},
{cmdUNTAG_SECTOR,
0xFF,
R1,
NODATA},
{cmdTAG_ERASE_GRP_START,
0xFF,
R1,
NODATA},
{cmdTAG_ERASE_GRP_END,
0xFF,
R1,
NODATA},
{cmdUNTAG_ERASE_GRP,
0xFF,
R1,
NODATA},
{cmdERASE,
0xDF,
R1b,
NODATA},
{cmdLOCK_UNLOCK,
0x89,
R1b,
NODATA},
{cmdSD_APP_OP_COND,
0xE5,
R1,
NODATA},
{cmdAPP_CMD,
0x73,
R1,
NODATA},
{cmdREAD_OCR,
0x25,
R3,
NODATA},
{cmdCRC_ON_OFF,
0x25,
R1,
NODATA}
};
Search WWH ::




Custom Search