1
完善资料让更多小伙伴认识你,还能领取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重新擦除一下
|
|
|
|
你正在撰写答案
如果你是对答案或其他答案精选点评或询问,请使用“评论”功能。
1111 浏览 0 评论
AI模型部署边缘设备的奇妙之旅:如何在边缘端部署OpenCV
3930 浏览 0 评论
tms320280021 adc采样波形,为什么adc采样频率上来波形就不好了?
1534 浏览 0 评论
2287 浏览 0 评论
1730 浏览 0 评论
75553 浏览 21 评论
小黑屋| 手机版| Archiver| 德赢Vwin官网 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-31 01:24 , Processed in 0.639439 second(s), Total 43, Slave 35 queries .
Powered by 德赢Vwin官网 网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
德赢Vwin官网 观察
版权所有 © 湖南华秋数字科技有限公司
德赢Vwin官网 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号