SD Card Registers
Name Width Description
CID 128 Card identification number: individual card number for identification.
RCA 16 Relative card address
CSD 128 Card specific data: information about the card operation conditions.
SCR 64 SD Configuration Register: information about the SD Card’s special features capabilities.
OCR 32 Operation Condition Register
SD 卡寄存器
名称 宽度 描述
CID 128 卡的识别码:用于识别单个卡的编号。
RCA 16 卡的相对地址(这个寄存器在 SPI 模式下不可用)
CSD 128 卡的特性数据:是关于这个卡工作条件的相关信息。
SCR 64 SD配置寄存器:关于这个SD卡的特殊功能的特性信息。
OCR 32 工作条件寄存器(电压)
Card Identification Register(CID)
这个 CID 寄存器有 16 字节长,如表 3-9 所示,它包含了本卡的特别识别码(ID 号)。 这些信息是在卡的生产期间被
编程(烧录),主控制器不 能修改它们的内容。 注意:SD卡的 CID 寄存器和 MMC 卡的 CID 寄存器在记录结构上是不同的。
Name |
Type |
Width |
CID Slice |
Comments |
CID Value |
Manufacturer ID (MID) | Binary | 8 | [127:120] | 由“SD卡协会“控制并且分配的制造商ID号 | 0x03 |
OEM/Application ID (OID) | ASCII | 16 | [119:104] | 用于辨认卡的OEM 和/或 卡的内容ID号 | ‘SD’ |
Product Name(PNM) | ASCII | 40 | [103:64] | SD128, SD064, SD032, SD016, SD008 | |
Product Revision (PRV) | BCD | 8 | [63:56] | 两个二进制编码的十进制数字(BCD) | 产品修订号 |
Serial Number (PSN) | Binary | 32 | [55:24] | 32 位无符号整数 | 产品序列号 |
Reserved | 4 | [23:20] | 保留 | ||
Manufacture Date Code(MDT) | BCD | 12 | [19:8] | 生产日期格式:2001年4月 = 0x014 | |
CRC7 checksum(CRC) | Binary | 7 | [7:1] | CRC 校验值 | CRC7 |
Reserved,always ‘1’ | 1 | [0:0] | 这部分没有使用,值始终为“1” |
CRC Calculation: G(x) = x7+3+1
M(x) = (MID-MSB)*x119 + ... + (CIN-LSB)*x0
CRC[6...0] = Remainder[(M(x)*x7)/G(x)]
Card Specific Data Register(CSD)
此卡的描述数据寄存器(CSD)包含了访问该卡数据时的必要配置信息。
“cell type”栏内定义了CSD的区域是只读(R)、一次编程(R/W)或可擦除的(R/W/E)[“R/W”是指可以多次擦写,
“R/W(1)”是指只能一次写入,不可擦除]。该张表中所显示的值都对应真实的CSD结构中的各自区域和编码。CSD区域
的样式是依照栏标记(和一个复选标记√)的样式。注意SD卡内的 CSD寄存器和MultiMedia卡的CSD寄存器有着不同的结构。
http://www.cnblogs.com/Efronc
Name |
Field |
Width |
Cell Type |
CSD-Slice |
CSD Value |
CSD Code |
CSD structure | CSD_STRUCTURE | 2 | R | [127:126] | 1.0 | 00b |
Reserved | - | 6 | R | [125:120] | - | 000000b |
data read access time | TAAC | 8 | R | [119:112] | 1.5msec | 00100110b |
同上in CLK cycles | NSAC | 8 | R | [111:104] | 0 | 00000000b |
max.data transfer rate | TRAN_SPEEN | 8 | R | [103:96] | 25MHz | 00110010b |
card command classes | CCC | 12 | R | [95:84] | ALL | 1F5h |
max.read data block length | READ_BL_LEN | 4 | R | [83:80] | 512Byte | 1001b |
partial blocks for read allowed | READ_BL_PARTIAL | 1 | R | [79:79] | YES | 1b |
write block misalignment | WRITE_BLK_MISALIGN | 1 | R | [78:78] | NO | 0b |
read block misalignment | READ_BLK_MISALIGN | 1 | R | [77:77] | NO | 0b |
DSR implemented | DSR_IMP | 1 | R | [76:76] | NO | 0b |
Reserved | - | 2 | R | [75:74] | - | 00b |
device size | C_SIZE | 12 | R | [73:62] | 如下 | - |
max.read current @VDD min | VDD_R_CURR_MIN | 3 | R | [61:59] | 100mA | 111b |
max.read current @VDD max | VDD_R_CURR_MAX | 3 | R | [58:56] | 80mA | 110b |
max.wirte current @VDD min | VDD_W_CURR_min | 3 | R | [55:53] | 100mA | 111b |
max.write current @VDD max | VDD_W_CURR_MAX | 3 | R | [52:50] | 80mA | 110b |
device size multiplier | C_SIZE_MULT | 3 | R | [49:47] | 如下 | - |
erase single block enable | ERASE_BLK_EN | 1 | R | [46:46] | YES | 1b |
erase sector size | SECTOR_SIZE | 7 | R | [45:39] | 32blocks | 00111111b |
write protect group size | WP_GRP_SIZE | 7 | R | [38:32] | 128sectors | 11111111b |
write protect group enable | WP_GRP_EN | 1 | R | [31:31] | YES | 1b |
Rserved for MultiMediaCard | 2 | R | [30:29] | - | 00b | |
write speed factor | R2W_FACTOR | 3 | R | [28:26] | X16 | 100b |
max.write data block length | WRITE_BL_LEN | 4 | R | [25:22] | 512Byte | 1001b |
Reserved | - | 5 | R | [20:16] | - | 0000b |
file format group | FILE_FORMAT_GRP | 1 | R/W(1) | [15:15] | 0 | 0b |
copy flag(OTP) | COPY | 1 | R/W(1) | [14:14] | Not Original | 1b |
permanent write protection | PERM_WRITE_PROTECT | 1 | R/W(1) | [13:13] | Not Protected | 0b |
temporary write protection | TMP_WRITE_PROTECT | 1 | R/W | [12:12] | Not Protected | 0b |
File format | FILE_FORMAT | 2 | R/W(1) | [11:10] | HD w/partition | 00b |
Reserved | - | 2 | R/W | [9:8] | - | 00b |
CRChttp://www.cnblogs.com/Efronc | CRC | 7 | R/W | [7:1] | - | CRC7 |
not used, always’1’ | - | 1 | - | [0:0] | - | 1b |
CSD_STRUCTURE :描述 CSD 结构的版本。00:CSD version No. 1.0 其他保留
TAAC 定义这个异步部分的读操作时间(相对于SD 卡的时钟(CLK))。
TAAC Bit Position Code 备注
2:0 time unit 0=1ns, 1=10ns, 2=100ns, 3=1μs, 4=10μs, 5=100μs, 6=1ms, 7=10ms 时间单位
6:3 time value 0=reserved, 1=1.0, 2=1.2, 3=1.3, 4=1.5, 5=2.0, 6=2.5, 7=3.0, 8=3.5, 时间数值
9=4.0, A=4.5, B=5.0, C=5.5, D=6.0, E=7.0, F=8.0
7 Reserved