公告

大中华汽车电子生态圈社区并入开发者社区- 更多资讯点击此

Tip / 登入 to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
CaLi_4592466
Level 4
Level 4
25 replies posted 10 replies posted 5 replies posted

1.当从 HIDOFF 模式下,唤醒后,APP 的程序会重启,重新运行,之前定义全局变量,在中断函数中进行累加,但在唤醒后会重新初始化为0?

那么如果需要保存 全局变量的值,只能存入flash?有什么其他的方法使变量不被 程序重新初始化?
2.wiced_power_save_store_state 该函数 参数是一个 uint16_t   的变量,是用来存储什么变量的?

0 点赞
1 解答
Owen_Zhang123
Moderator
Moderator
Moderator
5 questions asked 500 solutions authored 250 sign-ins

1. HIDOFF唤醒之后,系统会重启,并重新进行初始化。如果要保存变量值,可以将其存入到flash中。也可以使用wiced_power_save_store_state存储。

2. wiced_power_save_store_state可以存储任何需要的变量,并通过wiced_power_save_retrieve_state在wakeup的时候重新获取。

3. 是的,系统会根据当前情况自动选择是否进入low power模式。

在原帖中查看解决方案

0 点赞
7 回复数