主题 : 请问NandFlash上块页与地址是怎么对应起来的? 复制链接 | 浏览器收藏 | 打印
级别: 新手上路
UID: 62351
精华: 0
发帖: 16
金钱: 80 两
威望: 16 点
贡献值: 0 点
综合积分: 32 分
注册时间: 2012-01-26
最后登录: 2013-06-20
楼主  发表于: 2012-10-18 11:02

 请问NandFlash上块页与地址是怎么对应起来的?

我想往NandFlash中写入数据,需要提供块号与页号,但是我以前super vivi下载镜像文件时看到NandFlash似乎已经被分好区了,那么我写入数据时是不是得避开这些区,另外,supervivi上显示这些区都与地址相对应,我想知道在操作nandflash时怎样知道它的块与页所对应的地址?我google了一下,有人说查datasheet,但我查了一遍还是不懂,求高人指点!!
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
1楼  发表于: 2012-10-18 12:28

 回 楼主(wuqi1003) 的帖子

"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
2楼  发表于: 2012-10-18 17:31
呵呵,基本上我自己是从来没有去算过这个地址,抱歉。如果你对NAND Flash controller驱动如何计算地址感兴趣的话,可以参考u-boot里相应的代码。
http://git.denx.de/?p=u-boot.git;a=blob;f=drivers/mtd/nand/nand_base.c;h=6416d1529e9d1440d4f89042cc2502ff1006b36f;hb=cd82919e6c8a73b363a26f34b734923844e52d1c
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."