QN9080 Enable Power Down unused memory

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

QN9080 Enable Power Down unused memory

跳至解决方案
1,431 次查看
kyleyang
Contributor IV

Hi pals

IAR IDE is my current compiler tool.

I try to add "POWER_EnablePD(kPDRUNCFG_PD_MEM9);" into my heart rate sample code to enable lower power consumption.

But when function execute to this "POWER_EnablePD" subroutine, system will crash.

I also try the demo example code "power_mode_switch" and it works.

What's the different between these two projects when implement "POWER_EnablePD" function?

标签 (3)
标记 (3)
1 解答
919 次查看
neoxiong
NXP Employee
NXP Employee

Hi, Kyle

In BLE connectivity project, the CSTACK is assigned to the end of SRAM region, while power_mode_switch demo assign CSTACK to somewhere middle of SRAM.

POWER_EnablePD(kPDRUNCFG_PD_MEM9) will power off the last memory block which is used for stack purpose in ble project. That's why you get system crash after calling that API. 

You can always change the link file in IAR for placement, then everything is fine after power down last block of SRAM.

 

In QN908XC_connectivity.icf, change below line

place in CSTACK_region           { block CSTACK };

to

place in DATA_region           { block CSTACK };

在原帖中查看解决方案

2 回复数
920 次查看
neoxiong
NXP Employee
NXP Employee

Hi, Kyle

In BLE connectivity project, the CSTACK is assigned to the end of SRAM region, while power_mode_switch demo assign CSTACK to somewhere middle of SRAM.

POWER_EnablePD(kPDRUNCFG_PD_MEM9) will power off the last memory block which is used for stack purpose in ble project. That's why you get system crash after calling that API. 

You can always change the link file in IAR for placement, then everything is fine after power down last block of SRAM.

 

In QN908XC_connectivity.icf, change below line

place in CSTACK_region           { block CSTACK };

to

place in DATA_region           { block CSTACK };

919 次查看
kyleyang
Contributor IV

Hi Neo,

Really appreciate your help, its works.

I found a weird issue after compile project code.

I own two version of QN9080 SDK on hand, one is "QN908XB-0.6.1" and the other is the SDK beta.

The "readwrite" memory of SDK beta is much bigger than "QN908XB-0.6.1" and use the same type of project code.

Do you have any idea to resolve this issue to reduce ram size for lower power consumption?

I am Kyle, we can have a discuss in mail if possible.

Thanks.

kyleyang@wtmec.com

0 项奖励