野火电子论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5253|回复: 2

Fatfs文件系统错误

[复制链接]
发表于 2022-8-15 02:01:04 | 显示全部楼层 |阅读模式
Fatfs文件系统,不知道为啥,一直出现SPI_FLASH_PageWrite too largei!
换例程的flash文件不会出现这种情况,两个程序前前后后对比了几遍没发现什么问题
请问有人知道吗?

------------------------------------------------------------------------------------------------------
我就不信不行
》文件系统挂载成功,可以进行读写测试

****** 即将进行文件写入测试... ******

f_open res_flash=0
》打开/创建FatFs读写测试文件.txt文件成功,向文件写入数据。
》文件写入成功,写入字节数据:31
》向文件写入的数据为:
狗血了,老是出现的是什么错误

<<-FLASH-ERROR->> SPI_FLASH_PageWrite too large!
<<-FLASH-ERROR->> SPI_FLASH_PageWrite too large!
<<-FLASH-ERROR->> SPI_FLASH_PageWrite too large!
<<-FLASH-ERROR->> SPI_FLASH_PageWrite too large!
<<-FLASH-ERROR->> SPI_FLASH_PageWrite too large!
<<-FLASH-ERROR->> SPI_FLASH_PageWrite too large!
<<-FLASH-ERROR->> SPI_FLASH_PageWrite too large!
<<-FLASH-ERROR->> SPI_FLASH_PageWrite too large!
<<-FLASH-ERROR->> SPI_FLASH_PageWrite too large!
<<-FLASH-ERROR->> SPI_FLASH_PageWrite too large!
<<-FLASH-ERROR->> SPI_FLASH_PageWrite too large!
<<-FLASH-ERROR->> SPI_FLASH_PageWrite too large!
<<-FLASH-ERROR->> SPI_FLASH_PageWrite too large!
<<-FLASH-ERROR->> SPI_FLASH_PageWrite too large!
<<-FLASH-ERROR->> SPI_FLASH_PageWrite too large!
<<-FLASH-ERROR->> SPI_FLASH_PageWrite too large!
<<-FLASH-ERROR->> SPI_FLASH_PageWrite too large!
<<-FLASH-ERROR->> SPI_FLASH_PageWrite too large!
<<-FLASH-ERROR->> SPI_FLASH_PageWrite too large!
<<-FLASH-ERROR->> SPI_FLASH_PageWrite too large!
<<-FLASH-ERROR->> SPI_FLASH_PageWrite too large!
<<-FLASH-ERROR->> SPI_FLASH_PageWrite too large!
<<-FLASH-ERROR->> SPI_FLASH_PageWrite too large!
<<-FLASH-ERROR->> SPI_FLASH_PageWrite too large!
<<-FLASH-ERROR->> SPI_FLASH_PageWrite too large!
<<-FLASH-ERROR->> SPI_FLASH_PageWrite too large!
<<-FLASH-ERROR->> SPI_FLASH_PageWrite too large!
<<-FLASH-ERROR->> SPI_FLASH_PageWrite too large!
<<-FLASH-ERROR->> SPI_FLASH_PageWrite too large!
<<-FLASH-ERROR->> SPI_FLASH_PageWrite too large!
<<-FLASH-ERROR->> SPI_FLASH_PageWrite too large!
<<-FLASH-ERROR->> SPI_FLASH_PageWrite too large!
****** 即将进行文件读取测试... ******
》打开文件成功。
》文件读取成功,读到字节数据:31
》读取得的文件数据为:
狗血了,老是出现的是什么错误


回复

使用道具 举报

 楼主| 发表于 2022-8-15 02:34:40 | 显示全部楼层
已找到问题

原来是SPI_FLASH_BufferWrite的写入数据长度传错了  错误传NumByteToWrite
捕获.PNG
回复 支持 反对

使用道具 举报

发表于 2022-9-4 11:13:16 | 显示全部楼层
哈哈,传错参数了!
回复 支持 反对

使用道具 举报

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

本版积分规则

联系站长|手机版|野火电子官网|野火淘宝店铺|野火电子论坛 ( 粤ICP备14069197号 ) 大学生ARM嵌入式2群

GMT+8, 2024-5-20 13:52 , Processed in 0.037814 second(s), 27 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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