Toggle navigation
首页
问答
文章
积分商城
专家
专区
更多专区...
文档中心
返回主站
搜索
提问
会员
中心
登录
注册
bench
FAL
SFUD
10
QSPI+SFUD+FAL。分区超过512K,全部读取失败?
发布于 2023-05-22 01:04:37 浏览:837
订阅该版
用QSPI驱动W25Q128.驱动应该没问题。但是读取的时候,数据超过512K就会失败。 512K以内就正常,1M就失败。 我把FLSH分区,一个512K分区,一个1M分区,同时跑fal bench。结果如下: ``` msh />fal bench 4096 yes Erasing 524288 bytes data, waiting... Erase benchmark success, total time: 1.896S. Writing 524288 bytes data, waiting... Write benchmark success, total time: 2.048S. Reading 524288 bytes data, waiting... Read benchmark success, total time: 0.144S. msh />fal probe update2 Probed a flash partition | update2 | flash_dev: norflash0 | offset: 1048576 | len: 1048576 |. msh />fal bench 4096 yes Erasing 1048576 bytes data, waiting... Erase benchmark success, total time: 3.844S. Writing 1048576 bytes data, waiting... Write benchmark success, total time: 4.096S. Reading 1048576 bytes data, waiting... 585728 3057 f1 ff. 585728 3058 f2 ff. 585728 3059 f3 ff. ... ... 585728 4090 fa ff. 585728 4091 fb ff. 585728 4092 fc ff. 585728 4093 fd ff. 585728 4094 fe ff. Data check ERROR! Please check you flash by other command. Read benchmark has an error. Error code: -1. This operate has an error. Error code: -1. msh /> ``` 不知道什么原因。 而且分区擦除和写入都成功了,读取失败了! 我单独做sf bench测试正片flash,也失败了,但是提示已经读取了7M左右。 ``` msh />sf probe qspi20 [I/SFUD] Find a Winbond flash chip. Size is 16777216 bytes. [I/SFUD] sf_cmd flash device is initialize success. [I/SFUD] Probe SPI flash sf_cmd by SPI device qspi20 success. 16 MB sf_cmd is current selected device. msh />sf bench yes Erasing the sf_cmd 16777216 bytes data, waiting... Erase benchmark success, total time: 41.318S. Writing the sf_cmd 16777216 bytes data, waiting... Write benchmark success, total time: 65.537S. Reading the sf_cmd 16777216 bytes data, waiting... Data check ERROR! Please check you flash by other command. Read sf_cmd failed, already rd for 788480 bytes, read 256 each time Read benchmark has an error. Error code: 3. This flash operate has an error. Error code: 3. ``` 我修改了一下sf的代码,对读取检测错误的数据做一次重新读取检测,再次读取的数据竟然又是正确的,而且每隔一段时间就会出现一次读取错误的情况!间隔不等 ``` result = sfud_read(sfud_dev, addr + i, cur_op_size, read_data); /* data check */ if (memcmp(write_data, read_data, cur_op_size)) { rt_kprintf("sf read error(%i),try read again.\r\n",addr + i); result = sfud_read(sfud_dev, addr + i, cur_op_size, read_data); if (memcmp(write_data, read_data, cur_op_size)) { rt_kprintf("Data check ERROR! Please check you flash by other command.\n"); rt_kprintf("write_data:\r\n"); for(int m = 0; m < cur_op_size; m += 16) { for(int n = 0; n < 15; n++) { rt_kprintf("%X ", write_data[m + n]); } rt_kprintf("\r\n"); } rt_kprintf("read_data:\r\n"); for(int m = 0; m < cur_op_size; m += 16) { for(int n = 0; n < 15; n++) { rt_kprintf("%X ", read_data[m + n]); } rt_kprintf("\r\n"); } result = SFUD_ERR_READ; } } ``` 然后发现每隔一段时间读数据就会出错一次,而且我重新读取,数据竟然又正确了!! ``` msh />sf bench yes Erasing the sf_cmd 16777216 bytes data, waiting... Erase benchmark success, total time: 40.494S. Writing the sf_cmd 16777216 bytes data, waiting... Write benchmark success, total time: 65.537S. Reading the sf_cmd 16777216 bytes data, waiting... sf read error(71168),try read again. sf read error(791296),try read again. sf read error(798720),try read again. sf read error(899584),try read again. sf read error(1871616),try read again. sf read error(2818048),try read again. sf read error(3482880),try read again. sf read error(3781376),try read again. sf read error(4128768),try read again. sf read error(4473856),try read again. sf read error(4682496),try read again. sf read error(8348416),try read again. sf read error(8379136),try read again. sf read error(8563968),try read again. sf read error(9972480),try read again. sf read error(10003200),try read again. sf read error(10796800),try read again. sf read error(11395584),try read again. sf read error(13328640),try read again. sf read error(13967360),try read again. sf read error(14754816),try read again. sf read error(15545600),try read again. Read benchmark success, total time: 5.630S. ```
查看更多
1
个回答
默认排序
按发布时间排序
li460135301
2023-05-22
这家伙很懒,什么也没写!
我测试用spi接W25Q128就没有问题,都正常!!!
撰写答案
登录
注册新账号
关注者
0
被浏览
837
关于作者
li460135301
这家伙很懒,什么也没写!
提问
4
回答
5
被采纳
0
关注TA
发私信
相关问题
1
【分享】如何使用 SFUD 库来操作 SPI Flash 设备
2
SFUD怎么使用
3
请教大家一下关于 SFUD 的的问题
4
移植sfud
5
使用SFUD操作FLASH
6
env使用easyflash不是3.2.4版本,而且没有type插件?
7
新增了W25X32设备成功,无法格式化
8
easyflash随着数据存储量增加,耗费时间加长
9
关于SFDP的问题
10
spi nand flash 能使用SFUD驱动吗
推荐文章
1
RT-Thread应用项目汇总
2
玩转RT-Thread系列教程
3
国产MCU移植系列教程汇总,欢迎查看!
4
机器人操作系统 (ROS2) 和 RT-Thread 通信
5
五分钟玩转RT-Thread新社区
6
【技术三千问】之《玩转ART-Pi》,看这篇就够了!干货汇总
7
关于STM32H7开发板上使用SDIO接口驱动SD卡挂载文件系统的问题总结
8
STM32的“GPU”——DMA2D实例详解
9
RT-Thread隐藏的宝藏之completion
10
【ART-PI】RT-Thread 开启RTC 与 Alarm组件
最新文章
1
【RT-Thread】【ci】【scons】将ci.attachconfig.yml和scons结合使用
2
Rt-thread中OTA下载后,bootloader不搬程序
3
ulog 日志 LOG_HEX 输出时间改为本地日期时间
4
在RT-Thread Studio中构建前执行python命令
5
研究一了一段时间RTT,直接标准版上手太难,想用nano,但又舍不得组件
热门标签
RT-Thread Studio
串口
Env
LWIP
SPI
AT
Bootloader
Hardfault
CAN总线
FinSH
ART-Pi
USB
DMA
文件系统
RT-Thread
SCons
RT-Thread Nano
线程
MQTT
STM32
RTC
FAL
rt-smart
I2C_IIC
ESP8266
UART
WIZnet_W5500
ota在线升级
cubemx
PWM
flash
freemodbus
BSP
packages_软件包
潘多拉开发板_Pandora
定时器
ADC
flashDB
GD32
socket
编译报错
中断
Debug
rt_mq_消息队列_msg_queue
SFUD
msh
keil_MDK
ulog
C++_cpp
MicroPython
本月问答贡献
xusiwei1236
8
个答案
2
次被采纳
踩姑娘的小蘑菇
1
个答案
2
次被采纳
用户名由3_15位
9
个答案
1
次被采纳
bernard
4
个答案
1
次被采纳
RTT_逍遥
3
个答案
1
次被采纳
本月文章贡献
聚散无由
2
篇文章
15
次点赞
catcatbing
2
篇文章
5
次点赞
Wade
2
篇文章
4
次点赞
Ghost_Girls
1
篇文章
7
次点赞
xiaorui
1
篇文章
2
次点赞
回到
顶部
发布
问题
分享
好友
手机
浏览
扫码手机浏览
投诉
建议
回到
底部