JN5189 app memory not retained when using vAHI_Sleep(E_AHI_SLEEP_OSCON_RAMON)

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

JN5189 app memory not retained when using vAHI_Sleep(E_AHI_SLEEP_OSCON_RAMON)

Jump to solution
1,319 Views
kuanyc
Contributor II

Hi,

I'm using vAHI_Sleep(E_AHI_SLEEP_OSCON_RAMON) to get JN5189 to go into sleep for x Seconds. The sleep and wake seems to work well. However, upon wake the application variables seem to have gone back to the cold start initialized value and not retained, despite the 'RAMON' option.

Are there other configurations needed prior to sleep or after wakeup to retain the application variable values?

Thanks

Kuan

0 Kudos
Reply
1 Solution
1,291 Views
kuanyc
Contributor II

Having looked at the Zigbee 3.0 Sensors AN-1246, I've decided to still use the easier vAHI_Sleep() for simple sleep-wake cycle testing, instead of the PWRM method used in the application reference.

Found that my earlier problem with vAHI_Sleep() was not declaring a WarmStart() function as required in startup.c. The consequence, i guess, was that each wake from sleep was treated like a 'cold start' instead of a 'warm start'? 

In any case, this issue is now resolved. Thanks. 

View solution in original post

0 Kudos
Reply
3 Replies
1,292 Views
kuanyc
Contributor II

Having looked at the Zigbee 3.0 Sensors AN-1246, I've decided to still use the easier vAHI_Sleep() for simple sleep-wake cycle testing, instead of the PWRM method used in the application reference.

Found that my earlier problem with vAHI_Sleep() was not declaring a WarmStart() function as required in startup.c. The consequence, i guess, was that each wake from sleep was treated like a 'cold start' instead of a 'warm start'? 

In any case, this issue is now resolved. Thanks. 

0 Kudos
Reply
1,308 Views
Ricardo_Zamora
NXP TechSupport
NXP TechSupport

Hello,

 

Hope you are doing well. I would recommend checking this Application Note: Zigbee 3.0 Sensors.

Please refer to the Occupancy Sensor example. The Occupancy Sensor is a sleeping End Device and will, by default, attempt to sleep with RAM held and the 32kHz oscillator on.

 

Regards,

Ricardo

1,301 Views
kuanyc
Contributor II
Thanks. Will check it out and revert again.
0 Kudos
Reply