Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GC出现问题,未掉电,中等强度持续跑12小时 #64

Closed
Flymachine opened this issue Jun 13, 2019 · 4 comments
Closed

GC出现问题,未掉电,中等强度持续跑12小时 #64

Flymachine opened this issue Jun 13, 2019 · 4 comments

Comments

@Flymachine
Copy link

Flymachine commented Jun 13, 2019

env区:24K;log区:24K;ARM平台,FreeRTOS,移植,使用master最新版本的EasyFlash。

在测试时wifi_ssidwifi_pwd__ver_num__均保持初始值。只有l_unup_i保持定期写入新值。

距离错误最近一次GC搬移(以下日志均发生在写入l_unup_i新值时):

[Flash](ef_env.c:1000) Trigger a GC check after created ENV.
[Flash](ef_env.c:906) The remain empty sector is 1, GC threshold is 1.
[Flash](ef_env.c:821) Moved the ENV (wifi_ssid) from 0x080F0014 to 0x080F5014.
[Flash](ef_env.c:821) Moved the ENV (wifi_pwd) from 0x080F0039 to 0x080F5039.
[Flash](ef_env.c:821) Moved the ENV (__ver_num__) from 0x080F0061 to 0x080F5061.
[Flash](ef_env.c:886) Collect a sector @0x080F0000
[Flash](ef_env.c:886) Collect a sector @0x080F1000
[Flash](ef_env.c:886) Collect a sector @0x080F2000
[Flash](ef_env.c:886) Collect a sector @0x080F3000
[Flash](ef_env.c:821) Moved the ENV (l_unup_i) from 0x080F4FC0 to 0x080F5088.
[Flash](ef_env.c:886) Collect a sector @0x080F4000

出错时:

  1. 看上去是写入l_unup_i时长度出错,但是l_unup_i值的长度是sizeof计算出来的常量。
[Flash](ef_env.c:336) Error: The ENV @0x080F004E length has an error.
  1. GC搬移出错,不知为何会校验失败
[Flash](ef_env.c:726) Trigger a GC check after alloc ENV failed.
[Flash](ef_env.c:837) Warning: Alloc an ENV (size 34) failed when new ENV. Now will GC then retry.
[Flash](ef_env.c:906) The remain empty sector is 1, GC threshold is 1.
[Flash](ef_env.c:886) Collect a sector @0x080F0000
[Flash](ef_env.c:821) Moved the ENV (wifi_ssid) from 0x080F5014 to 0x080F0014.
[Flash]Error: The ENV (@0x080F0039) CRC32 check failed!
[Flash](ef_env.c:336) Error: The ENV @0x080F0088 length has an error.
[Flash](ef_env.c:821) Moved the ENV (wifi_pwd) from 0x080F5039 to 0x080F4014.
[Flash]Error: The ENV (@0x080F0039) CRC32 check failed!
[Flash](ef_env.c:336) Error: The ENV @0x080F406C length has an error.
[Flash](ef_env.c:336) Error: The ENV @0x080F4084 length has an error.
[Flash](ef_env.c:881) Error: Moved the ENV (__ver_num__) for GC failed.
[Flash](ef_env.c:886) Collect a sector @0x080F5000
[Flash]Error: The ENV (@0x080F0039) CRC32 check failed!
[Flash](ef_env.c:726) Trigger a GC check after alloc ENV failed.
[Flash]Error: The ENV (@0x080F0039) CRC32 check failed!
[Flash](ef_env.c:336) Error: The ENV @0x080F504E length has an error.

之后每次写入env都会报:

[Flash]Error: The ENV (@0x080F0039) CRC32 check failed!

程序从未重新设置wifi_pwd过,运行中也从未掉电,供电也是独立供电,sem信号锁已设置,系统内部还有专门的flash锁。这种问题会是什么问题?

@ZanoZ
Copy link

ZanoZ commented Jun 14, 2019

周边信息太少很难预估问题方向啊

@Flymachine
Copy link
Author

Flymachine commented Jun 14, 2019 via email

@armink
Copy link
Owner

armink commented Jun 15, 2019

W600 建议先用 V3.3 版本,底层 flash 驱动经测试发现,写入时中途掉电,还存在扇区数据全部丢失的问题,可能与 xip 的 cache 有关。所以 V4.0 可能暂时在 W600 片上 flash 上存在问题,后续我再跟原厂深入确认下吧。

@Flymachine
Copy link
Author

W600 建议先用 V3.3 版本,底层 flash 驱动经测试发现,写入时中途掉电,还存在扇区数据全部丢失的问题,可能与 xip 的 cache 有关。所以 V4.0 可能暂时在 W600 片上 flash 上存在问题,后续我再跟原厂深入确认下吧。

是的,昨天测试W600时EasyFlash V4.0又出现了EF_ASSERT(0)错误,经查是跳入了//TODO 扇区连续模式,或者写入长度没有写入完整块里了,应该就是数据没写完。
V3.3经过12小时测试倒是没有问题。此外,另一块M4架构的芯片用V4.0进行同样的测试也没有问题。
W600的flash驱动确实有点问题。
到此结贴了,W600官方SDKv3.2.0下就用EasyFlash V3.3就行了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants