armink / EasyFlash

Lightweight IoT device information storage solution: KV/IAP/LOG. | 轻量级物联网设备信息存储方案:参数存储、在线升级及日志存储 ,全新一代版本请移步至 https://github.com/armink/FlashDB
MIT License
2.01k stars 765 forks source link

此处异常可能会是什么引起的{Warning: Sector header check failed. Format this sector (0x00000000).} #114

Open upupsky opened 3 years ago

upupsky commented 3 years ago

执行函数sector_iterator(&sector, SECTOR_STORE_UNUSED, &check_failed_count, NULL, check_sec_hdr_cb, false);掉进check_sec_hdr_cb里面输出Warning: Sector header check failed. Format this sector (0x00000000). 是驱动的问题导致无法访问sector吗?驱动单独用SFUD读写擦除是OK的. 请大神帮忙分析下.

upupsky commented 3 years ago

结果是 中断使能引起得. 协议栈不允许使用全局中断__enable_irq();这类东西.

upupsky commented 3 years ago

<00> info> app: Warning: Sector header check failed. Format this sector (0x00000000).
00> 
<00> info> app: Warning: Sector header check failed. Format this sector (0x00001000).
00> 
<00> info> app: Warning: Sector header check failed. Format this sector (0x00002000).
00> 
<00> info> app: Warning: Sector header check failed. Format this sector (0x00003000).
00> 
<00> info> app: Warning: Sector header check failed. Format this sector (0x00004000).
00> 
<00> info> app: Warning: Sector header check failed. Format this sector (0x00005000).
00> 
<00> info> app: Warning: Sector header check failed. Format this sector (0x00006000).
00> 
<00> info> app: Warning: Sector header check failed. Format this sector (0x00007000).
00> 
<00> info> app: Warning: All sector header check failed. Set it to default.
00> 
<00> info> app: Error: Alloc an ENV (size 42) failed after GC. ENV full.
00> 
<00> info> app: Error: Alloc an ENV (size 43) failed after GC. ENV full.
00> 
<00> info> app: EasyFlash V4.1.99 is initialize success.
00> 
<00> info> app: You can get the latest version on https://github.com/armink/EasyFlash .
00> 
<00> info> app: EasyFlash init success, EfErrCode = 0.r

1、此处有ERROR,但仍然初始化成功了. 应该是假成功吧。 2、每次下载程序都是执行一样得内容。感觉没有写成功。 可能会是什么问题呢?