View: 3779|Reply: 3

without SRAM retention 32KB如何使用呢?

[Copy link]

26

Threads

43

Replies

350

Credits

Credits
350
Posted on 2025-3-24 14:00:33 | Show all posts |Reading mode From 广东深圳
information
Notes:   建议参照本版块置顶帖内容输入必要信息
Chip model: 8258
SDK & version: Zigbee 3.7.1.2
在Deep sleep mode with  RAM retention 时只有8KB+8KB+16KB数据不丢失,那我的问题是:

1. 如何确保定义的变量在RAM retention区呢?
2. 对于另外32KB没有RAM retention区,那这块RAM是浪费掉了吗?在什么情况下可以使用呢?

盼及时回复,多谢!

22

Threads

113

Replies

587

Credits

Credits
587
Posted on 2025-3-25 15:40:37 | Show all posts From 澳大利亚
本帖最后由 wes58 于 2025-3-25 15:41 编辑

Re 1.
[/code]
Use _attribute_data_retention_
for example:
  1. _attribute_data_retention_ u8 voltage;
Copy code

Re 2.
You can use 32kB RAM retention
  1. cpu_sleep_wakeup(DEEPSLEEP_MODE_RET_SRAM_LOW32K , PM_WAKEUP_DEBOUNCE, 0);        //Put the chip into low power mode
Copy code

Telink can give you more information, I guess.

30

Threads

374

Replies

1196

Credits

Credits
1196
Posted on 2025-3-28 16:23:03 | Show all posts From 上海
本帖最后由 TL_YB 于 2025-3-28 17:34 编辑

Zigbee SDK中所有全局变量都是按序自动排放的,变量地址在32K retention ram之外的,休眠时数据就会丢失。
如果需要使用到32k retention之外的ram,可以使用_attribute_custom_data_和_attribute_custom_bss_修饰允许休眠时数据丢失的变量。

检查方法:
可以使用BDT工具,在Tdebug窗口,将变量按地址排序,查看变量是否有超过32k retention。

26

Threads

43

Replies

350

Credits

Credits
350
 Author| Posted on 2025-3-28 17:20:39 | Show all posts From 广东深圳
好的,谢谢回复!

Credit rules for this forum

Follow our WeChat
Privacy Policy|Telink Developer Community

For copyright infringement reports, complaints or suggestions, please email forum@telink-semi.com

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.|沪ICP备17008231号-1 |沪公网安备31011502403548号

inThis forumPostBack to top