单片机spi模式读取SD卡
时间:10-02
整理:3721RD
点击:
u8 SD_SendCommand_NoDeassert(u8 cmd, u32 arg,u8 crc)
{
unsigned char r1;
unsigned int Retry = 0;
SD_CS_DISABLE();
SPI_ReadWriteByte(0xff);
SD_CS_ENABLE()¨
/* ·¢?í?üá?DòáD */
SPI_ReadWriteByte(cmd | 0x40);
SPI_ReadWriteByte((u8)(arg >> 24));
SPI_ReadWriteByte((u8)(arg >> 16));
SPI_ReadWriteByte((u8)(arg >> 8));
SPI_ReadWriteByte((u8)arg);
SPI_ReadWriteByte(crc);
//获取SD卡版本信息
r1 = SD_SendCommand_NoDeassert(CMD8, 0x1aa,0x87);
我想知道 CMD8,后面的两个参数0x1aa和0x87如何的得到的,在哪里可以查到
{
unsigned char r1;
unsigned int Retry = 0;
SD_CS_DISABLE();
SPI_ReadWriteByte(0xff);
SD_CS_ENABLE()¨
/* ·¢?í?üá?DòáD */
SPI_ReadWriteByte(cmd | 0x40);
SPI_ReadWriteByte((u8)(arg >> 24));
SPI_ReadWriteByte((u8)(arg >> 16));
SPI_ReadWriteByte((u8)(arg >> 8));
SPI_ReadWriteByte((u8)arg);
SPI_ReadWriteByte(crc);
//获取SD卡版本信息
r1 = SD_SendCommand_NoDeassert(CMD8, 0x1aa,0x87);
我想知道 CMD8,后面的两个参数0x1aa和0x87如何的得到的,在哪里可以查到