九、SD卡参数测试
使用野火开发板配套例程做测试,笔者测试用的SD卡是金士顿的2G内存块,打印SD卡的参数信息如下:
Card Type is :1
ManufacturerID is :2
Card device size is :3795
Card Block Size is :1024
Card device size multiplier is :7
Card Capacity is :1990197248
the maximum read date block length is :1024
partial blocks for write allowed is :0
the maximum write date block length is :1024
erase single block enable is :1
erase sector size is :127
write protect group size is :0
RCA is :4660
Card Type:1 SDSC卡版本2.0
Card device size: C_SIZE(CSD),为3795
Card Block Size: max read data block length(READ_BL_LEN(CSD)) ,为1024 Bytes
Card device size multiplier is: C_SIZE_MULT(CSD),为7
Card Capacity: 1990197248 Bytes
计算方法(摘自《Simplified_Physical_Layer_Spec.pdf》):
memory capacity = BLOCKNR * BLOCK_LEN
BLOCKNR = (C_SIZE+1) * MULT (C_SIZE <= 4096)
MULT = 2^(C_SIZE_MULT+2) (C_SIZE_MULT < 8)
BLOCK_LEN = 2^READ_BL_LEN, (READ_BL_LEN < 12)
注意:SDSC最大为2GB。
the maximum read date block length:READ_BL_LEN(CSD) ,为1024 Bytes
partial blocks for write allowed:WRITE_BL_PARTIAL(CSD),为不支持
the maximum write date block length:WRITE_BL_LEN(CSD) ,为1024 Bytes
erase single block enable:ERASE_BLK_EN(CSD),为1,支持单块擦除
erase sector size:SECTOR_SIZE(CSD),实际扇区擦除的block数为(SECTOR_SIZE+1),为128 Blocks
write protect group size:WP_GRP_SIZE(CSD),实际保护的扇区数为(WP_GRP_SIZE+1),为1 Sector
RCA: SD卡相对地址为4660 |