Toggle navigation
首页
问答
文章
积分商城
专家
专区
更多专区...
文档中心
返回主站
搜索
提问
会员
中心
登录
注册
SFUD
SFUD测试出现的问题
发布于 2020-02-21 16:02:56 浏览:1892
订阅该版
**1.背景:** 主控芯片:LPC54606 Flash芯片:W25Q256 SPI总线:SPIFI **2.初始化打印信息如下:** [SFUD] (..\..\components\drivers\spi\sfud\src\sfud.c:861) The flash device manufacturer ID is 0xEF, memory type ID is 0x40, capacity ID is 0x19. [SFUD] (..\..\components\drivers\spi\sfud\src\sfud_sfdp.c:131) Check SFDP header is OK. The reversion is V1.5, NPN is 0. [SFUD] (..\..\components\drivers\spi\sfud\src\sfud_sfdp.c:173) Check JEDEC basic flash parameter header is OK. The table id is 0, reversion is V1.5, length is 16, parameter table pointer is 0x000080. [SFUD] (..\..\components\drivers\spi\sfud\src\sfud_sfdp.c:203) JEDEC basic flash parameter table info: [SFUD] (..\..\components\drivers\spi\sfud\src\sfud_sfdp.c:204) MSB-LSB 3 2 1 0 [SFUD] (..\..\components\drivers\spi\sfud\src\sfud_sfdp.c:206) [0001] 0xFF 0xFB 0x20 0xE5 [SFUD] (..\..\components\drivers\spi\sfud\src\sfud_sfdp.c:206) [0002] 0x0F 0xFF 0xFF 0xFF [SFUD] (..\..\components\drivers\spi\sfud\src\sfud_sfdp.c:206) [0003] 0x6B 0x08 0xEB 0x44 [SFUD] (..\..\components\drivers\spi\sfud\src\sfud_sfdp.c:206) [0004] 0xBB 0x42 0x3B 0x08 [SFUD] (..\..\components\drivers\spi\sfud\src\sfud_sfdp.c:206) [0005] 0xFF 0xFF 0xFF 0xFE [SFUD] (..\..\components\drivers\spi\sfud\src\sfud_sfdp.c:206) [0006] 0x00 0x00 0xFF 0xFF [SFUD] (..\..\components\drivers\spi\sfud\src\sfud_sfdp.c:206) [0007] 0xEB 0x40 0xFF 0xFF [SFUD] (..\..\components\drivers\spi\sfud\src\sfud_sfdp.c:206) [0008] 0x52 0x0F 0x20 0x0C [SFUD] (..\..\components\drivers\spi\sfud\src\sfud_sfdp.c:206) [0009] 0x00 0x00 0xD8 0x10 [SFUD] (..\..\components\drivers\spi\sfud\src\sfud_sfdp.c:215) 4 KB Erase is supported throughout the device. Command is 0x20. [SFUD] (..\..\components\drivers\spi\sfud\src\sfud_sfdp.c:234) Write granularity is 64 bytes or larger. [SFUD] (..\..\components\drivers\spi\sfud\src\sfud_sfdp.c:245) Target flash status register is non-volatile. [SFUD] (..\..\components\drivers\spi\sfud\src\sfud_sfdp.c:276) 3- or 4-Byte addressing. [SFUD] (..\..\components\drivers\spi\sfud\src\sfud_sfdp.c:305) Capacity is 33554432 Bytes. [SFUD] (..\..\components\drivers\spi\sfud\src\sfud_sfdp.c:311) Flash device supports 4KB block erase. Command is 0x20. [SFUD] (..\..\components\drivers\spi\sfud\src\sfud_sfdp.c:311) Flash device supports 32KB block erase. Command is 0x52. [SFUD] (..\..\components\drivers\spi\sfud\src\sfud_sfdp.c:311) Flash device supports 64KB block erase. Command is 0xD8. [SFUD] Find a Winbond flash chip. Size is 33554432 bytes. [SFUD] (..\..\components\drivers\spi\sfud\src\sfud.c:840) Flash device reset success. [SFUD] (..\..\components\drivers\spi\sfud\src\sfud.c:941) Enter 4-Byte addressing mode success. [SFUD] W25Q256 flash device is initialize success. [SFUD] Probe SPI flash W25Q256 by SPI device spifi0 success. **3.sf 命令测试结果如下:** msh />sf bench yes Erasing the sf_cmd 33554432 bytes data, waiting... Erase benchmark success, total time: 45.389S. Writing the sf_cmd 33554432 bytes data, waiting... Write benchmark success, total time: 131.072S. Reading the sf_cmd 33554432 bytes data, waiting... Data check ERROR! Please check you flash by other command. Read sf_cmd failed, already rd for 0 bytes, read 256 each time Read benchmark has an error. Error code: 3. This flash operate has an error. Error code: 3. msh />sf write 0 1 2 3 4 5 Write the sf_cmd flash data success. Start from 0x00000000, size is 5. Write data: 1 2 3 4 5 . msh />sf read 0 16 Read the sf_cmd flash data success. Start from 0x00000000, size is 16. The data is: Offset (h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F [00000000] 00 00 00 01 00 01 04 05 55 55 55 55 55 55 55 55 ........UUUUUUUU 4.问题 从sf测试的情况来看,对flash的操作还是有问题的。 1)写入读入数据不一致; 2)sf bench 最后的read出错了; 还想请问一下,各位有没有遇到类似的问题,如何解决的?
查看更多
3
个回答
默认排序
按发布时间排序
Alex.Pan
2020-02-21
这家伙很懒,什么也没写!
因为初始化是成功的,所以我觉得读写寄存器是成功的,SPIFI总线已经驱动起来了。
Alex.Pan
2020-02-22
这家伙很懒,什么也没写!
问题已经解决。 在将dummy cycles转换为SPIFI的intermediateBytes时直接使用了如下代码: spifi_command.intermediateBytes = message->dummy_cycles / 8; 但是,该代码在地址数据以标准SPI传输时没有问题。 因为此时dummy_cycles/8就是字节数 但是对于dual和quad模式,会导致字节数减少; 应该修改为如下: if(message->address.qspi_lines!=0) spifi_command.intermediateBytes = message->dummy_cycles*message->address.qspi_lines / 8; else spifi_command.intermediateBytes = message->dummy_cycles / 8;
Alex.Pan
2020-02-22
这家伙很懒,什么也没写!
后来的测试结果: msh />sf bench yes Erasing the sf_cmd 33554432 bytes data, waiting... [66595] E/at.clnt: execute command (AT+CIPDOMAIN="cn.ntp.org.cn") failed! [73595] E/at.clnt: execute command (AT+CIPDOMAIN="hk.ntp.org.cn") failed! [80594] E/at.clnt: execute command (AT+CGREG?) failed! [80702] E/at.clnt: execute command (AT+CIPCLOSE=0) failed! Erase benchmark success, total time: 44.882S. Writing the sf_cmd 33554432 bytes data, waiting... Write benchmark success, total time: 131.072S. Reading the sf_cmd 33554432 bytes data, waiting... Read benchmark success, total time: 5.933S. msh /> 之前由于dummy cycles错误,导致在读出时漏掉了3个intermediateBytes ,所以读出来时前三个字节是0,导致bench read错误。
撰写答案
登录
注册新账号
关注者
0
被浏览
1.9k
关于作者
Alex.Pan
这家伙很懒,什么也没写!
提问
21
回答
28
被采纳
1
关注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
STM32F407ZGT适配串口V2驱动
2
【CFP】2025 RT-Thread全球技术大会演讲征集开始啦!
3
在 RT-Thread Studio 环境中为 ART-Pi 2 移植 CherryUSB(以 usb_device 为例)
4
嵌入式ARM RISCV toolchain工具 梳理arm-none-eabi-gcc
5
使用官方BOOT升级,看这一篇就够了?(以STM32F407VGT6为例)
热门标签
RT-Thread Studio
串口
Env
LWIP
SPI
AT
Bootloader
Hardfault
CAN总线
FinSH
ART-Pi
DMA
USB
文件系统
RT-Thread
SCons
RT-Thread Nano
线程
MQTT
STM32
RTC
rt-smart
FAL
I2C_IIC
cubemx
ESP8266
WIZnet_W5500
UART
ota在线升级
BSP
PWM
flash
packages_软件包
freemodbus
潘多拉开发板_Pandora
ADC
GD32
定时器
flashDB
编译报错
keil_MDK
socket
中断
rt_mq_消息队列_msg_queue
Debug
ulog
SFUD
msh
C++_cpp
at_device
本月问答贡献
聚散无由
9
个答案
6
次被采纳
RTT_逍遥
8
个答案
2
次被采纳
a1012112796
5
个答案
2
次被采纳
三世执戟
4
个答案
2
次被采纳
加缪
2
个答案
2
次被采纳
本月文章贡献
wake_mirco
2
篇文章
7
次点赞
mushroom
1
篇文章
9
次点赞
张世争
1
篇文章
7
次点赞
RTT_逍遥
1
篇文章
5
次点赞
Jack_____
1
篇文章
5
次点赞
回到
顶部
发布
问题
分享
好友
手机
浏览
扫码手机浏览
投诉
建议
回到
底部