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
