Toggle navigation
首页
问答
文章
积分商城
专家
专区
更多专区...
文档中心
返回主站
搜索
提问
会员
中心
登录
注册
flashDB
20
FAL + FlashDB案例- 控制台输出卡住
发布于 2024-05-09 22:21:51 浏览:415
订阅该版
根据文章[RT-Thread Studi 学习笔记之部署FlashDB](https://club.rt-thread.org/ask/article/349aa10c2052cd40.html "RT-Thread Studi 学习笔记之部署FlashDB")设置FlashDB在手边的野火指南者的板子上。发现和文章下面有个人碰到同样的问题, 当KVBD和TSDB的例程同时运行会卡死的情况。单独运行单个历程没有问题。修改SPI通讯速率也没有解决该问题。下面是单独运行TSDB的console 打印 ```c \ | / - RT - Thread Operating System / | \ 4.1.1 build May 9 2024 21:42:16 2006 - 2022 Copyright by RT-Thread team [D/FAL] (fal_flash_init:49) Flash device | stm32_onchip | addr: 0x08040000 | len: 0x00040000 | blk_size: 0x00000800 |initialized finish. [D/FAL] (fal_flash_init:49) Flash device | norflash0 | addr: 0x00000000 | len: 0x00800000 | blk_size: 0x00001000 |initialized finish. [32;22m[I/FAL] ==================== FAL partition table ====================[0m [32;22m[I/FAL] | name | flash_dev | offset | length |[0m [32;22m[I/FAL] -------------------------------------------------------------[0m [32;22m[I/FAL] | app | stm32_onchip | 0x00000000 | 0x00040000 |[0m [32;22m[I/FAL] | download | norflash0 | 0x00000000 | 0x00080000 |[0m [32;22m[I/FAL] | factory | norflash0 | 0x00080000 | 0x00080000 |[0m [32;22m[I/FAL] | logbook | norflash0 | 0x00100000 | 0x00300000 |[0m [32;22m[I/FAL] | measurement | norflash0 | 0x00400000 | 0x00300000 |[0m [32;22m[I/FAL] | filesystem | norflash0 | 0x00700000 | 0x00100000 |[0m [32;22m[I/FAL] =============================================================[0m [32;22m[I/FAL] RT-Thread Flash Abstraction Layer initialize success.[0m [32;22m[I/FAL] The FAL block device (filesystem) created successfully[0m [32m04-27 21:44:09 I/SFUD: Find a Winbond flash chip. Size is 8388608 bytes. [0m[32m04-27 21:44:09 I/SFUD: norflash0 flash device is initialize success. [0m[32m04-27 21:44:09 I/SFUD: Probe SPI flash norflash0 by SPI device spi10 success. [0m[32m04-27 21:44:10 I/SFUD: ROM mount successful! [0m [21:44:01.233]收←◆[FlashDB][tsl][measure] (../pack [21:44:01.252]收←◆ages/FlashDB-latest/src/fdb_tsdb.c:796) TSDB (measure) oldest sectors is 0x00000000, current using sector is 0x00000000. [FlashDB] FlashDB V1.1.2 is initialize success. [FlashDB] You can get the latest version on https://github.com/armink/FlashDB . [FlashDB][sample][tsdb] ==================== tsdb_sample ==================== [FlashDB][sample][tsdb] append the new status.temp (36) and status.humi (85) [FlashDB][sample][tsdb] append the new status.temp (38) and status.humi (90) [FlashDB][sample][tsdb] [query_cb] queried a TSL: time: 2, temp: -1, humi: -1 [FlashDB][sample][tsdb] [query_cb] queried a TSL: time: 1, temp: -1, humi: -1 [FlashDB][sample][tsdb] [query_cb] queried a TSL: time: 1, temp: -1, humi: -1 [FlashDB][sample][tsdb] [query_cb] queried a TSL: time: 1, temp: -1, humi: -1 [FlashDB][sample][tsdb] [query_cb] queried a TSL: time: 1, temp: -1, humi: -1 [FlashDB][sample][tsdb] [query_cb] queried a TSL: time: 1, temp: -1, humi: -1 [FlashDB][sample][tsdb] [query_cb] queried a TSL: time: 1, temp: 36, humi: 85 [FlashDB][sample][tsdb] [query_cb] queried a TSL: time: 2, temp: 38, humi: 90 [FlashDB][sample][tsdb] [query_cb] queried a TSL: time: 3, temp: 36, humi: 85 [FlashDB][sample][tsdb] [query_cb] queried a TSL: time: 4, temp: 38, humi: 90 [FlashDB][sample][tsdb] [query_cb] queried a TSL: time: 5, temp: 36, humi: 85 [FlashDB][sample][tsdb] [query_cb] queried a TSL: time: 6, temp: 38, humi: 90 [21:44:01.561]收←◆[FlashDB][sample][tsdb] [query_by_time_cb] queried a TSL: time: 2, temp: -1, humi: -1 [FlashDB][sample][tsdb] [query_by_time_cb] queried a TSL: time: 1, temp: -1, humi: -1 [FlashDB][sample][tsdb] [query_by_time_cb] queried a TSL: time: 1, temp: -1, humi: -1 [FlashDB][sample][tsdb] [query_by_time_cb] queried a TSL: time: 1, temp: -1, humi: -1 [FlashDB][sample][tsdb] [query_by_time_cb] queried a TSL: time: 1, temp: -1, humi: -1 [FlashDB][sample][tsdb] [query_by_time_cb] queried a TSL: time: 1, temp: -1, humi: -1 [FlashDB][sample][tsdb] [query_by_time_cb] queried a TSL: time: 1, temp: 36, humi: 85 [FlashDB][sample][tsdb] [query_by_time_cb] queried a TSL: time: 2, temp: 38, humi: 90 [FlashDB][sample][tsdb] [query_by_time_cb] queried a TSL: time: 3, temp: 36, humi: 85 [FlashDB][sample][tsdb] [query_by_time_cb] queried a TSL: time: 4, temp: 38, humi: 90 [FlashDB][sample][tsdb] [query_by_time_cb] queried a TSL: time: 5, temp: 36, humi: 85 [FlashDB][sample][tsdb] [query_by_time_cb] queried a TSL: time: 6, temp: 38, humi: 90 [FlashDB][sample][tsdb] query count is: %zu [FlashDB][sample][tsdb] set the TSL (time 2) status from 3 to 3 [FlashDB][sample][tsdb] set the TSL (time 1) status from 3 to 3 [FlashDB][sample][tsdb] set the TSL (time 1) status from 3 to 3 [FlashDB][sample][tsdb] set the TSL (time 1) status from 3 to 3 [FlashDB][sample][tsdb] set the TSL (time 1) status from 3 to 3 [FlashDB][sample][tsdb] set the TSL (time 1) status from 3 to 3 [FlashDB][sample][tsdb] set the TSL (time 1) status from 3 to 3 [FlashDB][sample][tsdb] set the TSL (time 2) status from 3 to 3 [FlashDB][sample][tsdb] set the TSL (time 3) status from 3 to 3 [FlashDB][sample][tsdb] set the TSL (time 4) status from 3 to 3 [FlashDB][sample][tsdb] set the TSL (time 5) status from 2 to 3 [FlashDB][sample][tsdb] set the TSL (time 6) status from 2 to 3 [21:44:01.923]收←◆[FlashDB][sample][tsdb] =========================================================== Software Version: Trial Version SD_Version ``` 单独运行KVDB其中一个案例的情况如下, 也没有问题: ```c \ | / - RT - Thread Operating System / | \ 4.1.1 build May 9 2024 21:57:05 2006 - 2022 Copyright by RT-Thread team [D/FAL] (fal_flash_init:49) Flash device | stm32_onchip | addr: 0x08040000 | len: 0x00040000 | blk_size: 0x00000800 |initialized finish. [D/FAL] (fal_flash_init:49) Flash device | norflash0 | addr: 0x00000000 | len: 0x00800000 | blk_size: 0x00001000 |initialized finish. [32;22m[I/FAL] ==================== FAL partition table ====================[0m [32;22m[I/FAL] | name | flash_dev | offset | length |[0m [32;22m[I/FAL] -------------------------------------------------------------[0m [32;22m[I/FAL] | app | stm32_onchip | 0x00000000 | 0x00040000 |[0m [32;22m[I/FAL] | download | norflash0 | 0x00000000 | 0x00080000 |[0m [32;22m[I/FAL] | factory | norflash0 | 0x00080000 | 0x00080000 |[0m [32;22m[I/FAL] | logbook | norflash0 | 0x00100000 | 0x00300000 |[0m [32;22m[I/FAL] | measurement | norflash0 | 0x00400000 | 0x00300000 |[0m [32;22m[I/FAL] | filesystem | norflash0 | 0x00700000 | 0x00100000 |[0m [32;22m[I/FAL] =============================================================[0m [32;22m[I/FAL] RT-Thread Flash Abstraction Layer initialize success.[0m [32;22m[I/FAL] The FAL block device (filesystem) created successfully[0m [32m04-27 21:57:45 I/SFUD: Find a Winbond flash chip. Size is 8388608 bytes. [0m[32m04-27 21:57:45 I/SFUD: norflash0 flash device is initialize success. [0m[32m04-27 21:57:45 I/SFUD: Probe SPI flash norflash0 by SPI device spi10 success. [0m[32m04-27 21:57:45 I/SFUD: ROM mount successful! [0m [21:57:36.295]收←◆[FlashDB][kv][log] (../packages/FlashDB-latest/src/fdb_kvdb.c:1638) KVDB size is 3145728 bytes. [21:57:36.703]收←◆[FlashDB] FlashDB V1.1.2 is initialize success. [FlashDB] You can get the latest version on https://github.com/armink/FlashDB . [FlashDB][sample][kvdb][basic] ==================== kvdb_basic_sample ==================== [FlashDB][sample][kvdb][basic] get the 'boot_count' value is 9 [21:57:36.907]收←◆[FlashDB][sample][kvdb][basic] set the 'boot_count' value to 10 [FlashDB][sample][kvdb][basic] =========================================================== [21:57:37.266]收←◆[FlashDB][tsl][measure] (../packages/FlashDB-latest/src/fdb_tsdb.c:796) TSDB (measure) oldest sectors is 0x00000000, current using sector is 0x00000000. [FlashDB][sample][tsdb] ==================== tsdb_sample ==================== [21:58:21.713]收←◆[SFUD]Find a Winbond flash chip. Size is 8388608 bytes. [SFUD]spi flash device is initialize success. ``` 但是同时运行的时候,就会卡死在第二个例程。 其实是第一个例程也没有打印完全; 打印如下: ```c \ | / - RT - Thread Operating System / | \ 4.1.1 build May 9 2024 22:19:22 2006 - 2022 Copyright by RT-Thread team [D/FAL] (fal_flash_init:49) Flash device | stm32_onchip | addr: 0x08040000 | len: 0x00040000 | blk_size: 0x00000800 |initialized finish. [D/FAL] (fal_flash_init:49) Flash device | norflash0 | addr: 0x00000000 | len: 0x00800000 | blk_size: 0x00001000 |initialized finish. [32;22m[I/FAL] ==================== FAL partition table ====================[0m [32;22m[I/FAL] | name | flash_dev | offset | length |[0m [32;22m[I/FAL] -------------------------------------------------------------[0m [32;22m[I/FAL] | app | stm32_onchip | 0x00000000 | 0x00040000 |[0m [32;22m[I/FAL] | download | norflash0 | 0x00000000 | 0x00080000 |[0m [32;22m[I/FAL] | factory | norflash0 | 0x00080000 | 0x00080000 |[0m [32;22m[I/FAL] | logbook | norflash0 | 0x00100000 | 0x00300000 |[0m [32;22m[I/FAL] | measurement | norflash0 | 0x00400000 | 0x00300000 |[0m [32;22m[I/FAL] | filesystem | norflash0 | 0x00700000 | 0x00100000 |[0m [32;22m[I/FAL] =============================================================[0m [32;22m[I/FAL] RT-Thread Flash Abstraction Layer initialize success.[0m [32;22m[I/FAL] The FAL block device (filesystem) created successfully[0m [32m04-27 22:19:54 I/SFUD: Find a Winbond flash chip. Size is 8388608 bytes. [0m[32m04-27 22:19:54 I/SFUD: norflash0 flash device is initialize success. [0m[32m04-27 22:19:54 I/SFUD: Probe SPI flash norflash0 by SPI device spi10 success. [0m[32m04-27 22:19:54 I/SFUD: ROM mount successful! [0m [22:19:45.670]收←◆[FlashDB][kv][log] (../packages/FlashDB-latest/src/fdb_kvdb.c:1638) KVDB size is 3145728 bytes. [22:19:46.140]收←◆[FlashDB] FlashDB V1.1.2 is init [22:19:46.171]收←◆ialize success. [FlashDB] You can get the latest version on https://github.com/armink/FlashDB . [FlashDB][sample][kvdb][string] ==================== kvdb_type_string_sample ==================== [22:19:46.546]收←◆[FlashDB][sample][kvdb][string] create the 'temp' string KV, value is: 36C [FlashDB][sample][kvdb][string] get the 'temp' value is: 36C ``` 有哪位也遇到同样的问题吗?
查看更多
用户名由3_15位
2024-05-10
这家伙很懒,什么也没写!
- 死锁了?调试仿真一下应该就能清楚了吧
1
个回答
默认排序
按发布时间排序
撰写答案
登录
注册新账号
关注者
0
被浏览
415
关于作者
张文彬
这家伙很懒,什么也没写!
提问
8
回答
5
被采纳
0
关注TA
发私信
相关问题
1
flashDB有两个变量未定义?
2
FlashDB 初始化时出现 check failed
3
FlashDB初始化isn't initialize OK
4
FlashDB在哪里修改版本号实现自动更新?
5
flashDB重复更新同一个参数的问题
6
flashDB kv ts 最大存储字节在哪里设置
7
操作flashDB时thread 提示error -2 超时
8
flashdb 断言错误问题求解
9
FlashDB没法选择版本
10
flashdb出现moved kv日志后,再去查询发现数据有丢失
推荐文章
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 Studio中构建前执行python命令
2
研究一了一段时间RTT,直接标准版上手太难,想用nano,但又舍不得组件
3
CherryUSB开发笔记(一):FSDEV USB IP核的 HID Remote WakeUp (USB HID 远程唤醒) 2025-01-18 V1.1
4
RT-thread 缩写字典
5
RT Thread 源码分析笔记 :线程和调度器
热门标签
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在线升级
PWM
cubemx
flash
freemodbus
BSP
packages_软件包
潘多拉开发板_Pandora
定时器
ADC
flashDB
GD32
socket
编译报错
中断
Debug
rt_mq_消息队列_msg_queue
SFUD
msh
keil_MDK
ulog
MicroPython
C++_cpp
本月问答贡献
出出啊
1517
个答案
342
次被采纳
小小李sunny
1444
个答案
290
次被采纳
张世争
813
个答案
177
次被采纳
crystal266
547
个答案
161
次被采纳
whj467467222
1222
个答案
149
次被采纳
本月文章贡献
聚散无由
2
篇文章
14
次点赞
catcatbing
2
篇文章
4
次点赞
Wade
2
篇文章
2
次点赞
Ghost_Girls
1
篇文章
4
次点赞
xiaorui
1
篇文章
1
次点赞
回到
顶部
发布
问题
分享
好友
手机
浏览
扫码手机浏览
投诉
建议
回到
底部