下面是一段loader的 代码
#define DEVICE_ID 0xCA
#define MAKER_ID 0x2C
#define NAND_TIMING_1 0x0D
#define NAND_TIMING_2 0x0D
#define BLOCK_SIZE 0x20000 // Expressed in Bytes
#define DATA_BYTES_PER_SECTOR 0x200 // Expressed in Bytes
#define SECTORS_PER_BLOCK 0x100 // Expressed in Bytes
#define SPARE_BYTES_PER_SECTOR 0x08 // Expressed in Bytes
#define BLOCK_TO_SECTOR_SHIFTER 0x8
1. DEVICE_ID 和 MAKER_ID 都会在 datasheet上写明
2. block 和page的关系,会在datasheet第一页有介绍:
• Organization
– Page size x8: 2112 bytes (2048 + 64 bytes)
– Page size x16: 1056 words (1024 + 32 words)
– Block size: 64 pages (128K + 4K bytes)
– Plane size: 2 planes x 1024 blocks per plane
– Device size: 2Gb: 2048 blocks
本文详细介绍了NAND Flash存储设备的关键参数及其相互关系,包括块大小、页面大小、块和页面的关系,以及如何利用这些参数进行有效数据管理和优化。通过深入分析,读者可以更好地理解NAND Flash的工作原理,并应用于实际项目中。

被折叠的 条评论
为什么被折叠?



