OpenEdv-开源电子网

 找回密码
 立即注册
正点原子全套STM32/Linux/FPGA开发资料,上千讲STM32视频教程免费下载...
查看: 795|回复: 0

nand flash移植fatfs,写过程块拷贝问题

[复制链接]

3

主题

7

帖子

0

精华

初级会员

Rank: 2

积分
104
金钱
104
注册时间
2018-8-20
在线时间
31 小时
发表于 2024-3-5 18:00:12 | 显示全部楼层 |阅读模式
10金钱
本帖最后由 安宁如水 于 2024-3-8 09:14 编辑

打印lut表内容如下
nand_dev.lut[0] = 0
nand_dev.lut[1] = 1
nand_dev.lut[2] = 2
nand_dev.lut[3] = 3
nand_dev.lut[4] = 4
nand_dev.lut[5] = 5
nand_dev.lut[6] = 6
nand_dev.lut[7] = 7
nand_dev.lut[8] = 8
nand_dev.lut[9] = 9
nand_dev.lut[10] = 10
nand_dev.lut[11] = 11
nand_dev.lut[12] = 12
nand_dev.lut[13] = 13
nand_dev.lut[14] = 14
nand_dev.lut[15] = 15
nand_dev.lut[16] = 16
nand_dev.lut[17] = 17
nand_dev.lut[18] = 18
nand_dev.lut[19] = 19
nand_dev.lut[20] = 20
nand_dev.lut[21] = 21
nand_dev.lut[22] = 22
nand_dev.lut[23] = 23
nand_dev.lut[24] = 24
nand_dev.lut[25] = 25
nand_dev.lut[26] = 26
nand_dev.lut[27] = 27
nand_dev.lut[28] = 28
nand_dev.lut[29] = 29
nand_dev.lut[30] = 30
nand_dev.lut[31] = 31
nand_dev.lut[32] = 32
nand_dev.lut[33] = 33
nand_dev.lut[34] = 34
物理块与逻辑块一一对应,但是在写操作过程中却打印块拷贝信息,
copy block 0 to block 1023
copy block 1023 to block 1022
copy block 1022 to block 1021
copy block 1021 to block 1020
copy block 1020 to block 1019
copy block 1019 to block 1018
copy block 1018 to block 1017
copy block 1017 to block 1016
copy block 1016 to block 1015
copy block 1015 to block 1014
copy block 1014 to block 1013
copy block 1013 to block 1012
copy block 1012 to block 1011
copy block 1011 to block 1010
copy block 1010 to block 1009
copy block 1009 to block 1008
看程序应该是在写扇区时,会先读扇区是否全为0xff,不全为0xff才会执行块拷贝,但是我一上电就做了全片擦除才挂载的文件系统,程序为什么没有用前面lut表中的块,而是不停做块拷贝,(拷贝过程程序是从最后一个块往前找未使用的块的)




正点原子逻辑分析仪DL16劲爆上市
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则



关闭

原子哥极力推荐上一条 /2 下一条

正点原子公众号

QQ|手机版|OpenEdv-开源电子网 ( 粤ICP备12000418号-1 )

GMT+8, 2024-11-22 21:10

Powered by OpenEdv-开源电子网

© 2001-2030 OpenEdv-开源电子网

快速回复 返回顶部 返回列表