Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

802.15.4 sys_sleep_request_ms does not work

Hi all,

I'm using NRF SDK v17.0.2 and IEEE 802.15.4 stack library. I want to implement sleeping device. I think I should use sys_sleep_request_ms function to make the device go to sleep but calling it does nothing. If I use  sys_sleep_approver_register to register callbacks for SYS_EVENT_FALLING_ASLEEP and SYS_EVENT_WAKE_UP events (and call sys_sleep_approve in SYS_EVENT_FALLING_ASLEEP event) I see that the callback are called but the SYS_EVENT_WAKE_UP event is emitted immediately after SYS_EVENT_FALLING_ASLEEP event.

So I digged deeper and dissassembled the components/802_15_4/raw/802_15_4_lib_gcc.a library (and all other variants of this library ) to see if there are any calls to wfi or wfe instructions and to my supprise there are none.

This is the dissassembly of the hal_sleep function:

00000000 <hal_sleep>:
   0:	2000      	movs	r0, #0
   2:	4770      	bx	lr

It looks like this function is just returning value 0, what would translate to UNKNOWN_INTERRUPT enum. Do I need to override this function (it is not declared extern so I don't think so) ?

So my question is this library supports sleeping devices ? I would imagine that this library would allow me to implement a device that would wakeup from sleep before the beacon arrival, then go to sleep after the beacon if no data tranfers are pending. Is that possible with this library ?

Nest regards,

Marek Czerski

Parents
  • I can't find any references to sys_sleep_request_ms in the SDK. Where did you find this?

    If you are still planning on learning about 802.15.4 before you start developing using zigbee, please be aware that the Zigbee stack from the SDK uses a different 802.15.4 stack, and that you don't use the 802.15.4 stack directly when using the zboss stack (the name of the Zigbee stack).

Reply
  • I can't find any references to sys_sleep_request_ms in the SDK. Where did you find this?

    If you are still planning on learning about 802.15.4 before you start developing using zigbee, please be aware that the Zigbee stack from the SDK uses a different 802.15.4 stack, and that you don't use the 802.15.4 stack directly when using the zboss stack (the name of the Zigbee stack).

Children
Related