硬汉嵌入式论坛

 找回密码
 立即注册
查看: 1663|回复: 8
收起左侧

[STM32H7] 请教一下大佬们 有Nand Flash 的坏块管理和磨损均衡参考代码么

[复制链接]

9

主题

81

回帖

108

积分

初级会员

积分
108
发表于 2024-9-14 17:01:13 | 显示全部楼层 |阅读模式
在使用华邦W25N01GV的nand flash时 ,最底层的spi驱动都写好了,但是想用起来还得加上坏块管理和磨损均衡的管理 ,但是找了好久资料,也没啥头绪,大佬们有没有可以参考的呀
回复

使用道具 举报

10

主题

36

回帖

66

积分

初级会员

积分
66
发表于 2024-9-14 19:09:00 | 显示全部楼层
littlefs看看行不行,我记得这个有磨损均衡和坏块管理
回复

使用道具 举报

1万

主题

7万

回帖

11万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
117546
QQ
发表于 2024-9-15 09:15:38 | 显示全部楼层
Devil_920 发表于 2024-9-14 19:09
littlefs看看行不行,我记得这个有磨损均衡和坏块管理

littleFS对NAND的支持不完善。
回复

使用道具 举报

1万

主题

7万

回帖

11万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
117546
QQ
发表于 2024-9-15 09:17:03 | 显示全部楼层
可以使用FlashFS,FileX LevelX

擦写均衡,坏块管理,ECC校验,掉电保护都是支持的。

1、RTX5全家桶源码综合模板发布V2.0,含FreeRTOS内核版本,将其打造成直接面向实际项目应用的综合框架(2024-08-30)
https://forum.anfulai.cn/forum.php?mod=viewthread&tid=124516

2、ThreadX全家桶所有组件综合模板发布,史上最强安全认证综合模板,稳如泰山,含AC5,AC6,IAR和GCC(2023-12-23)
https://forum.anfulai.cn/forum.php?mod=viewthread&tid=103554
回复

使用道具 举报

9

主题

81

回帖

108

积分

初级会员

积分
108
 楼主| 发表于 2024-9-18 11:03:10 | 显示全部楼层
eric2013 发表于 2024-9-15 09:17
可以使用FlashFS,FileX LevelX

擦写均衡,坏块管理,ECC校验,掉电保护都是支持的。

太谢谢硬汉哥了 感谢
回复

使用道具 举报

9

主题

81

回帖

108

积分

初级会员

积分
108
 楼主| 发表于 2024-9-24 16:16:02 | 显示全部楼层
eric2013 发表于 2024-9-15 09:17
可以使用FlashFS,FileX LevelX

擦写均衡,坏块管理,ECC校验,掉电保护都是支持的。

硬汉哥, 我看FlashFS了 , 新版的RL-Flash不支持 SPI Nand ,得是FSMC的才行 , 我看看FileX LevelX这个吧
下边是File System Component  Version 6.16.6
MDK Middleware for Devices with Flash File System
关于Nand Flash的注意事项
Note
NOR Flash is typically connected over Memory Bus or SPI. For using a NOR Flash drive, a Flash driver is required which encapsulates either the Memory Bus interface or SPI (in which case an SPI driver required in addition).
The Middleware Component contains example drivers for Flash devices that can be used to implement other device drivers if required. The examples are: AM29x800BB/M29W640FB (Flash with 16-bit memory bus interface), S29GL064Nx2 (Flash with 32-bit memory bus interface), and AT45DB642D (Flash with SPI interface using an SPI driver).
Other drives (memory card, USB memory device, NAND Flash) require appropriate CMSIS-Driver for the microcontroller device. If no suitable CMSIS-Driver is available for your selected device, you may create the required Flash interface driver. Refer to the CMSIS-Driver Reference for details.
Currently, using NAND Flash devices with SPI interface (Serial NAND) is not supported.
回复

使用道具 举报

1万

主题

7万

回帖

11万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
117546
QQ
发表于 2024-9-25 09:13:03 | 显示全部楼层
让我看看各位 发表于 2024-9-24 16:16
硬汉哥, 我看FlashFS了 , 新版的RL-Flash不支持 SPI Nand ,得是FSMC的才行 , 我看看FileX LevelX这个吧
...

实际是可以的,是他这个RTE默认配置环境没有做SPI配置方式,实际是可以做的,不影响,将默认的并口方式修改为SPI接口即可,论坛好几个坛友有做。
回复

使用道具 举报

0

主题

2

回帖

2

积分

新手上路

积分
2
发表于 2024-12-5 19:59:35 | 显示全部楼层
大佬,spinand的驱动能共享一份吗
回复

使用道具 举报

1万

主题

7万

回帖

11万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
117546
QQ
发表于 2024-12-6 08:25:07 | 显示全部楼层
richarddestiny 发表于 2024-12-5 19:59
大佬,spinand的驱动能共享一份吗

这个可以到到Github上搜下。
回复

使用道具 举报

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

本版积分规则

QQ|小黑屋|Archiver|手机版|硬汉嵌入式论坛

GMT+8, 2025-8-14 06:07 , Processed in 0.042253 second(s), 25 queries .

Powered by Discuz! X3.4 Licensed

Copyright © 2001-2023, Tencent Cloud.

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