完善资料让更多小伙伴认识你,还能领取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重新擦除一下
|
|
|
|
你正在撰写答案
如果你是对答案或其他答案精选点评或询问,请使用“评论”功能。
786 浏览 0 评论
4210 浏览 0 评论
如何使用python调起UDE STK5.2进行下载自动化下载呢?
2520 浏览 0 评论
开启全新AI时代 智能嵌入式系统快速发展——“第六届国产嵌入式操作系统技术与产业发展论坛”圆满结束
2926 浏览 0 评论
获奖公布!2024 RT-Thread全球巡回线下培训火热来袭!报名提问有奖!
31442 浏览 11 评论
72894 浏览 21 评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-22 01:51 , Processed in 0.749783 second(s), Total 63, Slave 57 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号