QN9080 Enable Power Down unused memory

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

QN9080 Enable Power Down unused memory

Jump to solution
1,348 Views
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?

Labels (3)
Tags (3)
1 Solution
836 Views
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 };

View solution in original post

2 Replies
837 Views
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 };

836 Views
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 Kudos