完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
在移植flashDB时遇到如下错误,详细log如下: dbinit |
|
相关推荐
2个回答
|
|
详细初始化代码如下:
#define FAL_DEBUG 1 #define FAL_PART_HAS_TABLE_CFG #define FDB_PART1_ADDR (64*W25Q64_SECTOR_SIZE) #define FDB_PART1_SIZE (64*W25Q64_SECTOR_SIZE) #define FDB_PART2_ADDR (FDB_PART1_ADDR + FDB_PART1_SIZE) #define FDB_PART2_SIZE (32*W25Q64_SECTOR_SIZE) #define FDB_PART3_ADDR (FDB_PART2_ADDR + FDB_PART2_SIZE) #define FDB_PART3_SIZE (32*W25Q64_SECTOR_SIZE) #define FDB_PART4_ADDR (FDB_PART3_ADDR + FDB_PART3_SIZE) #define FDB_PART4_SIZE (400*W25Q64_SECTOR_SIZE) #define FDB_DATA_ADDR (FDB_PART4_ADDR + FDB_PART4_SIZE) #define FDB_DATA_SIZE (40*W25Q64_SECTOR_SIZE) #define FDB_DAYSTAIC_ADDR (FDB_DATA_ADDR + FDB_DATA_SIZE) #define FDB_DAYSTAIC_SIZE (4*W25Q64_SECTOR_SIZE) /* ===================== Flash device Configuration ========================= */ extern const struct fal_flash_dev gW25Q64Flash; /* flash device table */ #define FAL_FLASH_DEV_TABLE \ { \ &gW25Q64Flash, \ } /* ====================== Partition Configuration ========================== */ #ifdef FAL_PART_HAS_TABLE_CFG /* partition table */ #define FAL_PART_TABLE \ { \ {FAL_PART_MAGIC_WORD, "fdb_kvdb1", "W25Q64", FDB_PART1_ADDR, FDB_PART1_SIZE, 0}, \ {FAL_PART_MAGIC_WORD, "fdb_kvdb2", "W25Q64", FDB_PART2_ADDR, FDB_PART2_SIZE, 0}, \ {FAL_PART_MAGIC_WORD, "fdb_kvdb3", "W25Q64", FDB_PART3_ADDR, FDB_PART3_SIZE, 0}, \ {FAL_PART_MAGIC_WORD, "fdb_kvdb4", "W25Q64", FDB_PART4_ADDR, FDB_PART4_SIZE, 0}, \ } #endif /* FAL_PART_HAS_TABLE_CFG */ /** * @defgroup W25Q64_Size W25Q64 Size * @{ */ #define W25Q64_PAGE_SIZE (256UL) #define W25Q64_SECTOR_SIZE (1024UL * 4UL) //(1024UL * 8UL) #define W25Q64_BLK_SIZE (1024UL * 64UL) #define W25Q64_PAGE_PER_SECTOR (W25Q64_SECTOR_SIZE / W25Q64_PAGE_SIZE) #define W25Q64_MAX_ADDR (0x800000UL) /** const struct fal_flash_dev gW25Q64Flash = { .name = "W25Q64", .addr = 0, .len = W25Q64_MAX_ADDR, .blk_size = W25Q64_SECTOR_SIZE, .ops = {FlashInit, FlashRead, FlashWrite, FlashErase}, .write_gran = 32 }; |
|
|
|
解决了,需要把flash重新擦除一下
|
|
|
|
你正在撰写答案
如果你是对答案或其他答案精选点评或询问,请使用“评论”功能。
开启全新AI时代 智能嵌入式系统快速发展——“第六届国产嵌入式操作系统技术与产业发展论坛”圆满结束
994 浏览 0 评论
2024 RT-Thread全球巡回线下培训火热来袭!报名提问有奖!
3341 浏览 10 评论
1632 浏览 0 评论
IaaS+on+DPU(IoD)+下一代高性能算力底座技术白皮书
2906 浏览 0 评论
飞凌嵌入式-ELFBOARD 常用的USB接口及其不同版本介绍第1期
1168 浏览 0 评论
67120 浏览 21 评论
嵌入式热门DIY项目:智能机器人开源资料合集(原理图、代码、论文)
68339 浏览 22 评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-9-4 16:24 , Processed in 0.782564 second(s), Total 71, Slave 54 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191