Toggle navigation
首页
问答
文章
积分商城
专家
专区
更多专区...
文档中心
返回主站
搜索
提问
会员
中心
登录
注册
easyflash
easyflash demo擦写完数据后再上电就挂了?
发布于 2020-07-26 20:23:09 浏览:1236
订阅该版
平台使用:STM32F103ZET6+W25Q64+RT Thread Studio 移植easyflash,使用ef_sfud_port.c,对外部flash进行操作。 移植后,在shell平台能够控制环境变量读写。 但使用demo对boot_times进行写入,保护时出现问题。 用fla erase 0 4096命令擦写完数据后,reboot重启系统,出现以下问题: 提示由BKPT instruction导致的。 请问这是什么意思? \ | / - RT - Thread Operating System / | \ 4.0.2 build Jul 26 2020 2006 - 2019 Copyright by rt-thread team [SFUD] (../rt-thread/components/drivers/spi/sfud/src/sfud.c:862) The flash device manufacturer ID is 0xEF, memory type ID is 0x40, capacity ID is 0 x17. [SFUD] (../rt-thread/components/drivers/spi/sfud/src/sfud_sfdp.c:132) Check SFDP header is OK. The reversion is V1.0, NPN is 0. [SFUD] (../rt-thread/components/drivers/spi/sfud/src/sfud_sfdp.c:175) Check JEDEC basic flash parameter header is OK. The table id is 0, reversion is V1.0, length is 9, parameter table pointer is 0x000080. [SFUD] (../rt-thread/components/drivers/spi/sfud/src/sfud_sfdp.c:203) JEDEC basic flash parameter table info: [SFUD] (../rt-thread/components/drivers/spi/sfud/src/sfud_sfdp.c:204) MSB-LSB 3 2 1 0 [SFUD] (../rt-thread/components/drivers/spi/sfud/src/sfud_sfdp.c:207) [0001] 0xFF 0xF1 0x20 0xE5 [SFUD] (../rt-thread/components/drivers/spi/sfud/src/sfud_sfdp.c:207) [0002] 0x03 0xFF 0xFF 0xFF [SFUD] (../rt-thread/components/drivers/spi/sfud/src/sfud_sfdp.c:207) [0003] 0x6B 0x08 0xEB 0x44 [SFUD] (../rt-thread/components/drivers/spi/sfud/src/sfud_sfdp.c:207) [0004] 0xBB 0x42 0x3B 0x08 [SFUD] (../rt-thread/components/drivers/spi/sfud/src/sfud_sfdp.c:207) [0005] 0xFF 0xFF 0xFF 0xFE [SFUD] (../rt-thread/components/drivers/spi/sfud/src/sfud_sfdp.c:207) [0006] 0x00 0x00 0xFF 0xFF [SFUD] (../rt-thread/components/drivers/spi/sfud/src/sfud_sfdp.c:207) [0007] 0xEB 0x21 0xFF 0xFF [SFUD] (../rt-thread/components/drivers/spi/sfud/src/sfud_sfdp.c:207) [0008] 0x52 0x0F 0x20 0x0C [SFUD] (../rt-thread/components/drivers/spi/sfud/src/sfud_sfdp.c:207) [0009] 0x00 0x00 0xD8 0x10 [SFUD] (../rt-thread/components/drivers/spi/sfud/src/sfud_sfdp.c:215) 4 KB Erase is supported throughout the device. Command is 0x20. [SFUD] (../rt-thread/components/drivers/spi/sfud/src/sfud_sfdp.c:234) Write granularity is 64 bytes or larger. [SFUD] (../rt-thread/components/drivers/spi/sfud/src/sfud_sfdp.c:245) Target flash status register is non-volatile. [SFUD] (../rt-thread/components/drivers/spi/sfud/src/sfud_sfdp.c:271) 3-Byte only addressing. [SFUD] (../rt-thread/components/drivers/spi/sfud/src/sfud_sfdp.c:305) Capacity is 8388608 Bytes. [SFUD] (../rt-thread/components/drivers/spi/sfud/src/sfud_sfdp.c:312) Flash device supports 4KB block erase. Command is 0x20. [SFUD] (../rt-thread/components/drivers/spi/sfud/src/sfud_sfdp.c:312) Flash device supports 32KB block erase. Command is 0x52. [SFUD] (../rt-thread/components/drivers/spi/sfud/src/sfud_sfdp.c:312) Flash device supports 64KB block erase. Command is 0xD8. [SFUD] Find a Winbond flash chip. Size is 8388608 bytes. [SFUD] (../rt-thread/components/drivers/spi/sfud/src/sfud.c:840) Flash device reset success. [SFUD] W25Q64 flash device is initialize success. [SFUD] Probe SPI flash W25Q64 by SPI device spi10 success. [D/FAL] (fal_flash_init:49) Flash device | onchip_flash | addr: 0x08000000 | len: 0x00080000 | blk_size: 0x00000800 |initialized finish . [D/FAL] (fal_flash_init:49) Flash device | W25Q64 | addr: 0x00000000 | len: 0x00800000 | blk_size: 0x00001000 |initialized finish . [I/FAL] ==================== FAL partition table ==================== [I/FAL] | name | flash_dev | offset | length | [I/FAL] ------------------------------------------------------------- [I/FAL] | bl | onchip_flash | 0x00000000 | 0x00010000 | [I/FAL] | app | onchip_flash | 0x00010000 | 0x00064000 | [I/FAL] | param | onchip_flash | 0x00074000 | 0x0000c000 | [I/FAL] | easyflash | W25Q64 | 0x00000000 | 0x00100000 | [I/FAL] | download | W25Q64 | 0x00100000 | 0x00700000 | [I/FAL] ============================================================= [I/FAL] RT-Thread Flash Abstraction Layer (V0.5.99) initialize success. [Flash] (../packages/EasyFlash-latest/src/ef_env.c:1820) ENV start address is 0x00000000, size is 8192 bytes. [Flash] Warning: Sector header check failed. Format this sector (0x00000000). thread pri status sp stack size max used left tick error -------- --- ------- ---------- ---------- ------ ---------- --- flex_btn 28 ready 0x00000044 0x00000400 06% 0x00000064 000 tshell 20 ready 0x00000044 0x00001000 01% 0x0000000a 000 tidle0 31 ready 0x00000040 0x00000100 25% 0x00000020 000 timer 4 suspend 0x00000078 0x00000200 23% 0x00000009 000 main 10 running 0x00000040 0x00000800 41% 0x00000004 000 Firmware name: rtthread, hardware version: 1.0, software version: 1.0 Fault on thread main ===== Thread stack information ===== addr: 200021f8 data: 0801db24 addr: 200021fc data: 200014b8 addr: 20002200 data: 00001000 addr: 20002204 data: 00000000 addr: 20002208 data: 20002210 addr: 2000220c data: 0000221c addr: 20002210 data: 20002220 addr: 20002214 data: 0800e667 addr: 20002218 data: 0801db24 addr: 2000221c data: 200014b8 addr: 20002220 data: ffffffff addr: 20002224 data: 00000000 addr: 20002228 data: ffffffff addr: 2000222c data: 2000223c addr: 20002230 data: 20002248 addr: 20002234 data: 0800f6b3 addr: 20002238 data: 0801d8a4 addr: 2000223c data: 00000000 addr: 20002240 data: 20002248 addr: 20002244 data: 0800f6cb addr: 20002248 data: ffffffff addr: 2000224c data: 00000000 addr: 20002250 data: 20002290 addr: 20002254 data: 20002294 addr: 20002258 data: 200022c8 addr: 2000225c data: 20002290 addr: 20002260 data: 20002268 addr: 20002264 data: 0800e7db addr: 20002268 data: 00000000 addr: 2000226c data: 20002290 addr: 20002270 data: 00000000 addr: 20002274 data: 20002294 addr: 20002278 data: 00000035 addr: 2000227c data: 00000000 addr: 20002280 data: 20002290 addr: 20002284 data: 0800f7cb addr: 20002288 data: 0800f689 addr: 2000228c data: 00000000 addr: 20002290 data: 00000001 addr: 20002294 data: 00000000 addr: 20002298 data: 00000000 addr: 2000229c data: ffffffff addr: 200022a0 data: ffffffff addr: 200022a4 data: 200014b8 addr: 200022a8 data: 200014ed addr: 200022ac data: 00000035 addr: 200022b0 data: 200022b8 addr: 200022b4 data: 200022c4 addr: 200022b8 data: 200022d0 addr: 200022bc data: 0800fad3 addr: 200022c0 data: 0801db24 addr: 200022c4 data: 200014b8 addr: 200022c8 data: 200014ed addr: 200022cc data: 00000035 addr: 200022d0 data: 0000071c addr: 200022d4 data: 0801d4ec addr: 200022d8 data: 200022e0 addr: 200022dc data: 200022ec addr: 200022e0 data: 200022f8 addr: 200022e4 data: 0000f8d5 addr: 200022e8 data: 200022f8 addr: 200022ec data: 0800f8d9 addr: 200022f0 data: 00002000 addr: 200022f4 data: 0800f97b addr: 200022f8 data: 00000006 addr: 200022fc data: 0801ff4c addr: 20002300 data: 00002318 addr: 20002304 data: 00000010 addr: 20002308 data: 20002310 addr: 2000230c data: 0800d677 addr: 20002310 data: 0000004b addr: 20002314 data: 0801ff4c addr: 20002318 data: 00000006 addr: 2000231c data: 00000005 addr: 20002320 data: 20002328 addr: 20002324 data: 08015e57 addr: 20002328 data: 0000001c addr: 2000232c data: 00000064 addr: 20002330 data: 20002730 addr: 20002334 data: 200037c8 addr: 20002338 data: 20002340 addr: 2000233c data: 0800138f addr: 20002340 data: 00000000 addr: 20002344 data: 00000001 addr: 20002348 data: 20002350 addr: 2000234c data: 080013cd addr: 20002350 data: 00000000 addr: 20002354 data: 00000000 addr: 20002358 data: deadbeef addr: 2000235c data: 08004335 ==================================== =================== Registers information ==================== R0 : 00000000 R1 : 00001000 R2 : 00000001 R3 : 00000000 R12: 01010101 LR : 0800e667 PC : 0800f9fe PSR: 61000000 ============================================================== Debug fault is caused by BKPT instruction executed Show more call stack info by run: addr2line -e rtthread.elf -a -f 0800f9fe 0800e666 0800f6b2 0800f6ca 0800e7da 0800f7ca 0800fad2 0800f8d8 0800f97a 0800d676 08015e56 0800138e 080013cc 08004334 Current system tick: 397
查看更多
2
个回答
默认排序
按发布时间排序
dandelion4277
2020-07-26
这家伙很懒,什么也没写!
但使用demo对boot_times进行写入,保护时出现问题。 用fla erase 0 4096命令擦写完数据后,reboot重启系统,会在下图箭头的地方失败,就是找不到这个环境变量,实际上我默认环境变量是有这个配置的。 ![image.png](/uploads/20200726/05a6aada1e31dc14e542ae470be44fde.png) ![image.png](/uploads/20200726/538b7aedf9f2fdd05e904626c64a33ca.png)
zhangjun
2020-07-27
这家伙很懒,什么也没写!
应该是```fal erase 0 4096```通过fal把easyflash存在对应fal分区上的数据破坏了,所以重启后执行test_env就有问题了
撰写答案
登录
注册新账号
关注者
0
被浏览
1.2k
关于作者
dandelion4277
这家伙很懒,什么也没写!
提问
5
回答
1
被采纳
0
关注TA
发私信
相关问题
1
easyflash 用来存储 传感器定时采样的数据适不适合?
2
easyflash存放于fat文件系统中,但是会擦除文件系统
3
EasyFlash移植失败,硬件发生错误?
4
easyflash初始化env无法自动写入默认环境变量?
5
有在STM32L4上用easyflash的么?请教个问题
6
[已解决] easyflash 使用内部 flash 无法保存参数
7
FAL 上的FlashDB、EasyFlash、EasyLogger调试经历
8
easyflash存储问题
9
easyflash可以用来存储300个小文件且能够按照日期分类检索吗?
10
easyflash不会删除旧的已有的变量名
推荐文章
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
嵌入式大赛Top10排名公布!作品共赏,看大奖花落谁家!
2
基于开源操作系统的融合创新:睿赛德科技荣获汽车操作系统TOP10
3
k230运行rt-smart
4
RT-Thread SCons上手指北
5
CAN调试过程曲折不断,记录调试过程的问题和解决方法。
热门标签
RT-Thread Studio
串口
Env
LWIP
SPI
AT
Bootloader
Hardfault
CAN总线
ART-Pi
FinSH
USB
DMA
文件系统
RT-Thread
SCons
RT-Thread Nano
线程
MQTT
STM32
RTC
rt-smart
FAL
ESP8266
I2C_IIC
WIZnet_W5500
ota在线升级
UART
flash
packages_软件包
cubemx
PWM
freemodbus
BSP
潘多拉开发板_Pandora
定时器
ADC
GD32
flashDB
socket
中断
Debug
编译报错
msh
rt_mq_消息队列_msg_queue
keil_MDK
C++_cpp
SFUD
ulog
at_device
本月问答贡献
出出啊
1515
个答案
342
次被采纳
小小李sunny
1438
个答案
289
次被采纳
张世争
786
个答案
169
次被采纳
crystal266
546
个答案
161
次被采纳
whj467467222
1222
个答案
148
次被采纳
本月文章贡献
出出啊
1
篇文章
6
次点赞
小小李sunny
1
篇文章
1
次点赞
张世争
1
篇文章
2
次点赞
crystal266
2
篇文章
2
次点赞
whj467467222
2
篇文章
1
次点赞
回到
顶部
发布
问题
分享
好友
手机
浏览
扫码手机浏览
投诉
建议
回到
底部