
1 NandFlash 中空闲区域的组织
typedef struct _SectorInfo
{
DWORD dwReserved1; // Reserved - used by FAL
BYTE bOEMReserved; // For use by OEM
BYTE bBadBlock; // Indicates if block is BAD
WORD wReserved2; // Reserved - used by FAL
}SectorInfo, *PSectorInfo;
bOEMReserved 的取值:
#define OEM_BLOCK_RESERVED 0x01
#define OEM_BLOCK_READONLY 0x02
page size=512 字节的 SLC NandFlash,每一页的空闲区域有 16 字节
字节编号 参数
0,1,2,3
dwReserved1
4 bOEMReserved
5 bBadBlock
6,7
wReserved2
8,9,10,11
Mecc, main ECC, 0xffffffff
page size=2048 字节的 SLC NandFlash,每一页的空闲区域有 64 字节
字节编号 参数
0 bBadBlock
1,2,3,4
dwReserved1
5 bOEMReserved
6,7 wReserved2,低位在低字节
8,9,10,11
Mecc[0], main ECC, 0xffffffff
12,13,14,15
Mecc[1], 0xffffffff
16,17,18,19
Mecc[2], 0xffffffff
20,21,22,23
Mecc[3], 0xffffffff
24,25,26,27
Secc,spare ECC
S3C6400 不支持页大小为 4K 字节的 NandFlash。