How do I decide which MEM_BLOCKs need to be enabled?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

How do I decide which MEM_BLOCKs need to be enabled?

1,074 次查看
tedwu1
Contributor III

Hi friend,

I am using Q9021 with BLE SDK 1.0.0. Some definitions of my project are as follows.

#define OTA_ENABLE 0

/// Memory retention
#if (OTA_ENABLE)
#define CFG_MEM_RETENTION   (MEM_BLOCK1 | MEM_BLOCK2 | MEM_BLOCK3 | MEM_BLOCK4 | MEM_BLOCK6 | MEM_BLOCK7)// (MEM_ALL)//
#else
#define CFG_MEM_RETENTION   (MEM_BLOCK1 | MEM_BLOCK2 | MEM_BLOCK3 | MEM_BLOCK6 | MEM_BLOCK7)// (MEM_ALL)//
#endif

/// Memory retention
#if (defined(CFG_MEM_RETENTION))
    #define QN_MEM_RETENTION        CFG_MEM_RETENTION
    #define QN_MEM_UNRETENTION      (~(CFG_MEM_RETENTION) & 0xfe)
#else
    #define QN_MEM_RETENTION        (MEM_BLOCK1 | MEM_BLOCK2 | MEM_BLOCK3 | MEM_BLOCK4 | MEM_BLOCK5 | MEM_BLOCK6 | MEM_BLOCK7)
    #define QN_MEM_UNRETENTION      0
#endif

How do I decide which MEM_BLOCKs need to be enabled?

Best wishes

Ted Wu

0 项奖励
回复
3 回复数

1,050 次查看
EduardoZamora
NXP TechSupport
NXP TechSupport

Hello @tedwu1,

Memory retention define which memory banks need to be retained in sleep mode.

There are 8 banks of SRAM, and each bank is 8k bytes. Bank 0 is always power on. The power of bank 1-7 can be configured by developer. If the memory bank is not used by application, it can be off to save power.

The BLE stack stores its data in bank 6 and 7. If the BLE is used, bank 6 and 7 should be power on. Developer can configure this macro based on memory usage to optimize power consumption.

Regards,
Eduardo.

0 项奖励
回复

1,044 次查看
tedwu1
Contributor III

Hi @EduardoZamora 

How do I know that bank 1 to bank 5 need to be enabled? Where can I find information?

Best wishes

Ted Wu

0 项奖励
回复

1,025 次查看
EduardoZamora
NXP TechSupport
NXP TechSupport

Hi,

It should depend entirely on memory usage of your application and the power consumption optimization you are considering.

Regards,
Eduardo.

0 项奖励
回复