Get sleep time

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

Get sleep time

707 Views
LChll
Contributor III

JN-AN-1219-Zigbee-3-0-Controller-and-Switch

SDK:JN-SW-4170-v1840

1、For sleeping devices, if the device terminal wakes up interrupted, how do I get the actual sleeping time of the terminal device instead?

2、I tried using u64AHI_WakeTimerReadLarge (), but it returned 0.And u32AHI_WakeTimerReadLarge () can return data.

3、What can I do to calculate the actual sleep time of the device?

ad
Labels (2)
0 Kudos
1 Reply

644 Views
Sebastian_Del_Rio
NXP Employee
NXP Employee

Hi Linklai, I hope you're doing well!

 

  1. There's no defined way to calculate the amount of time a device was asleep for, as the existent functions work with the wake timer, which will periodically wake the device up as specified.
  2. The u64AHI_WakeTimerReadLarge function returns the value for the wake timer. The value returned from this function specifies the time remaining until the next time the device is scheduled to wake up.
  3. For calculating the sleep time of the device, a custom implementation of some timers would need to be made, as there's no established way to measure the time the device was asleep for.

 

Could you please take a look at this document here?

 

Best regards,

Sebastian

0 Kudos