Capacity Class
SD capacity 8MB, 16MB, 32MB, 64MB, 128MB, 256MB, 512MB, 1GB, 2GB
SDHC capacity 2GB, 4GB, 8GB, 16GB, 32GB
SDXC capacity 32GB, 48GB, 64GB, 128GB, 256GB, 512GB, 1TB, 2TB
SD Card Register
command Format
All commands are in this format, with a total of 48 digits. One starting bit, One Direction bit, 6 command bits, 32 bit parameters (some commands required), CRC 7 bit check, 1 stop bit
Command Classes
Note: Command detailed explanation see SD Card 2.0 protocol
Partial Command
Answer
There are a variety of answer formats, with R1 examples
initialization Process
Example in SPI mode
Typical initialization process
1. Enable SPI clock
2. Enable Gpio port Clock
3. Initialize GPIO, configure pin mode
4. Initialize the SPI
5. Enable SPI
6.SPI Read and write data
7. Power-on delay (>74 CLK)
8. Reset Card (CMD0), enter idle state
9. Send CMD8 to check if 2.0 protocol is supported
10. Cancel the chip selection, send more than 8 CLK, end initialization
11. Read and Write Data