Information Technology Reference
In-Depth Information
The card is now ready for use in SPI mode. Firmware can perform these
additional actions as desired:
Increase the SPI port's clock frequency. The CSD register specifies the
card's maximum data-transfer rate.
Issue the CRC_ON_OFF command to enable CRC checking in the
card.
If necessary, issue the SET_BLOCK_LEN command to change the
block length for media reads and writes. The default is 512 bytes.
Read and store the state of the write-protect tab.
Issue block-read and block-write commands to access the media's con-
tents.
Cards in MultiMediaCard-bus mode always use the CRC values. In SPI
mode, the card ignores the CRC values unless the host has issued a
CRC_ON_OFF command to enable CRC. All cards are in MultiMedi-
aCard-bus mode until the host issues a GO_IDLE_STATE command to
switch the card to SPI mode. So the GO_IDLE_STATE command must
have a valid CRC value, but for all following commands in SPI mode, the
host can use any stuff bits for the CRC if desired.
Card Information
The SDCSTATE union below is a byte that identifies the device as an SD
Card/MultiMediaCard and indicates if the card is write-protected:
typedef union _SDCstate
{
struct
{
byte isSDMMC : 1; // set for an SD Card or MultiMediaCard
byte isWP : 1; // set if write protected
};
byte _byte;
} SDCSTATE;
Search WWH ::




Custom Search