打印
[STM32F1]

nand flash data数据发送

[复制链接]
1037|0
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主

我最近在看K9F1208芯片,
对K9F1208芯片而言,每页是(512K+16K)大小,也就是说寻找业内地址需要 9 位,参考资料上说bit8用来判断读写1st half或者2nd half,我们不用管它,那么在第二次发送地址的时候就是右移九位,每次只取低八位,但是源代码却是下面的,
#define ADDR_1st_CYCLE(ADDR)       (u8)((ADDR)& 0xFF)               /* 1st addressing cycle */
#define ADDR_2nd_CYCLE(ADDR)       (u8)(((ADDR)& 0xFF00) >> 8)      /* 2nd addressing cycle */
#define ADDR_3rd_CYCLE(ADDR)       (u8)(((ADDR)& 0xFF0000) >> 16)   /* 3rd addressing cycle */
#define ADDR_4th_CYCLE(ADDR)       (u8)(((ADDR)& 0xFF000000) >> 24) /* 4th addressing cycle */

第二次发送不应该是
#define ADDR_2nd_CYCLE(ADDR)       (u8)(((ADDR)& 0x1FE00) >> 9)
(后面以此类推),
然后我又查阅了k9f1g08的datasheet,照图片上的信息,
[img][/img]
它的地址发送不应该是:
/* FSMC NAND memory address computation */
#define ADDR_1st_CYCLE(ADDR)       (u8)((ADDR)& 0xFF)               /* 1st addressing cycle */
#define ADDR_2nd_CYCLE(ADDR)       (u8)(((ADDR)& 0x0F00) >> 8)      /* 2nd addressing cycle */
#define ADDR_3rd_CYCLE(ADDR)       (u8)(((ADDR)& 0xFF000) >> 12)   /* 3rd addressing cycle */
#define ADDR_4th_CYCLE(ADDR)       (u8)(((ADDR)& 0xFF00000) >> 20) /* 4th addressing cycle */
吗?
我是不是哪里理解错了

138.jpg (47.34 KB )

138.jpg
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

2

主题

21

帖子

1

粉丝