<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>802.15.4 sys_sleep_request_ms does not work</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/71174/802-15-4-sys_sleep_request_ms-does-not-work</link><description>Hi all, 
 I&amp;#39;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</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 15 Feb 2021 08:48:47 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/71174/802-15-4-sys_sleep_request_ms-does-not-work" /><item><title>RE: 802.15.4 sys_sleep_request_ms does not work</title><link>https://devzone.nordicsemi.com/thread/294319?ContentTypeID=1</link><pubDate>Mon, 15 Feb 2021 08:48:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a50c6476-db9d-4e60-a317-4d050814cdea</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;It is not documented publically, unfortunately, but it is the same register offset as the POWER register on the radio peripheral, which is documented &lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/radio.html?cp=4_0_0_5_19_13_74#register.POWER"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 802.15.4 sys_sleep_request_ms does not work</title><link>https://devzone.nordicsemi.com/thread/294225?ContentTypeID=1</link><pubDate>Fri, 12 Feb 2021 15:58:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:02d4a985-6361-4c3b-b772-88f3d5613f08</guid><dc:creator>rozpruwacz</dc:creator><description>&lt;p&gt;Great !!!&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/71174/802-15-4-sys_sleep_request_ms-does-not-work/294195#294195"]Since the power register of TIMER0 is not available like the NRF_RADIO-&amp;gt;POWER register, we need to use it&amp;#39;s address to turn it off:[/quote]
&lt;p&gt;that was that. Thank You very much !&lt;/p&gt;
&lt;p&gt;Last question. Where is documented this POWER register of TIMER peripherial ? I did not found it in&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/pdf/nRF52840_PS_v1.2.pdf"&gt;this&lt;/a&gt;&amp;nbsp;document and I believe it is the latest release.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 802.15.4 sys_sleep_request_ms does not work</title><link>https://devzone.nordicsemi.com/thread/294195?ContentTypeID=1</link><pubDate>Fri, 12 Feb 2021 14:45:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:359dc248-baab-4a3a-bc01-d9bf7303e5e5</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Sorry. I was apparently a bit quick in the previous reply. HFCLKSTAT = 0x00010000 means that it is running on the RC oscillator, as you said. It is a bit difficult to debug this actually, since the internal HF oscillator is always running when the CPU is running. So whenever you hit a breakpoint, the CPU is running, and the HFCLK will be running as well. The only way to turn it off is inside the __WFE(), which you can&amp;#39;t set a breakpoint to trigger. (setting it&amp;nbsp;&lt;strong&gt;on&lt;/strong&gt; __WFE() will of course trigger, but this would be before this is actually executed).&lt;/p&gt;
&lt;p&gt;There are a lot of peripherals and drivers (And obviously also libraries) that don&amp;#39;t let go of the peripherals as they are supposed to when being disabled. So I started digging into this, and doing some measurements using the &lt;a href="https://infocenter.nordicsemi.com/topic/ug_ppk/UG/ppk/PPK_user_guide_Intro.html"&gt;PPK&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I saw that the current consumption went up to about 450µA when the sys_init() was called, as you said. So since the 802.15.4 is only using Timers and the radio, that was where I started looking.&lt;/p&gt;
&lt;p&gt;First, since it is easiest, I tried to turn off the power register in the radio peripheral using:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;    NRF_RADIO-&amp;gt;POWER = 0x00000000;
    while (NRF_RADIO-&amp;gt;POWER != 0x00000000)
    {
        // Wait
    }&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;right before the while loop:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;    while (1)
    {
        __WFE();
        // Clear the internal event register.
        __SEV();
        __WFE();
    }&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;This didn&amp;#39;t seem to change anything regarding the current consumption, but I left it in for the rest of the test, so perhaps you need this one as well. You can experiment with removing this if you like.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The next thing to test was the timers. Luckily it was the first one I tested, TIMER0 that seemed to be the issue.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Since the power register of TIMER0 is not available like the NRF_RADIO-&amp;gt;POWER register, we need to use it&amp;#39;s address to turn it off:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;    *(volatile uint32_t *)0x40008FFCUL = 0ul;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;After doing this, it looks like the current consumption dropped down to ~5µA:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1613141095760v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;(there are current spikes, but the average is at 4.39µA)&lt;/p&gt;
&lt;p&gt;Give that a go, and let me know what you see.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 802.15.4 sys_sleep_request_ms does not work</title><link>https://devzone.nordicsemi.com/thread/294142?ContentTypeID=1</link><pubDate>Fri, 12 Feb 2021 11:57:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:04c7fbc9-1d9f-4c42-acc0-509b1db683ef</guid><dc:creator>rozpruwacz</dc:creator><description>[quote userid="26071" url="~/f/nordic-q-a/71174/802-15-4-sys_sleep_request_ms-does-not-work/294125#294125"]How do you wake up from the sleep? I see that you use&amp;nbsp;sys_sleep_request_ms(10000); Do you wake up after 10 seconds, or do you wake on a button press or something?[/quote]
&lt;p&gt;No. I am working now with a minimal example that only goes sleep after calling sys_init. No wake up.&lt;/p&gt;
&lt;p&gt;This is the exact and only code I&amp;#39;m running:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#include &amp;quot;sys_init.h&amp;quot;
#include &amp;quot;sys_utils.h&amp;quot;
#include &amp;quot;nrf_drv_clock.h&amp;quot;
#include &amp;quot;802_15_4_config.h&amp;quot;
#include &amp;quot;ral_irq_handlers.h&amp;quot;


static void clock_init(void)
{
    ret_code_t err_code = nrf_drv_clock_init();
    ASSERT((err_code == NRF_SUCCESS) || (err_code == NRF_ERROR_MODULE_ALREADY_INITIALIZED));

    nrf_drv_clock_hfclk_request(NULL);
    while (!nrf_drv_clock_hfclk_is_running())
    {}

    nrf_drv_clock_lfclk_request(NULL);
    while (!nrf_drv_clock_lfclk_is_running())
    {}
}

int main(void)
{
    static uint8_t __ALIGN(ALIGN_VALUE) m_heap[CONFIG_POOL_SIZE];
    static const size_t m_heap_size = CONFIG_POOL_SIZE;
    ral_irq_handler_import();
    clock_init();
    sys_init(m_heap, m_heap_size);
    nrf_drv_clock_hfclk_release();
    nrf_drv_clock_lfclk_release();
    while(1) {
        __WFE();
    }
}
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;IF I COMMENT OUT THE&amp;nbsp;sys_init CALL THE CURRENT CONSUMPTION IS 3uA.&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/71174/802-15-4-sys_sleep_request_ms-does-not-work/294125#294125"]How do you measure it? Is the dongle connected to a computer via the USB?[/quote]
&lt;p&gt;I power the board with 3.3V through OUT ping (which is the VDD CPU pin).&lt;/p&gt;
&lt;p&gt;I measure the current with multimeter beetween power source and OUT pin.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 802.15.4 sys_sleep_request_ms does not work</title><link>https://devzone.nordicsemi.com/thread/294125?ContentTypeID=1</link><pubDate>Fri, 12 Feb 2021 10:41:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:656c528a-5bc3-4e72-80c5-515e3291d544</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;&amp;gt;HFCLKSTAT = 65536&lt;/p&gt;
&lt;p&gt;Yes, that means HFCLKSTAT = 0x00010000, meaning that&amp;nbsp;&lt;span&gt;STATE = not running, SRC = XTAL.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I haven&amp;#39;t tried to measure the current consumtion on the dongle before. How do you measure it? Is the dongle connected to a computer via the USB?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;How do you wake up from the sleep? I see that you use&amp;nbsp;sys_sleep_request_ms(10000); Do you wake up after 10 seconds, or do you wake on a button press or something?&lt;/p&gt;
&lt;p&gt;The reason I ask is because if none of the clocks are running, and you wake up after 10 seconds, it means it is using nrf_delay_ms(), which doesn&amp;#39;t really allow the device to go to sleep.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BR,&lt;br /&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 802.15.4 sys_sleep_request_ms does not work</title><link>https://devzone.nordicsemi.com/thread/294072?ContentTypeID=1</link><pubDate>Thu, 11 Feb 2021 21:48:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f03d2e0d-84c8-4d5a-9948-b07002aaba5a</guid><dc:creator>rozpruwacz</dc:creator><description>[quote userid="26071" url="~/f/nordic-q-a/71174/802-15-4-sys_sleep_request_ms-does-not-work/293979#293979"]I see that you release the hfclk as well, but is it requested from&amp;nbsp;elsewhere in your project? You can try to debug nrf_drv_clock_hfclk_release() to see whether or not this line is true or false:[/quote]
&lt;p&gt;No other part of the code is requesting the hf clock. I checked also that&amp;nbsp;&lt;span&gt;nrf_drv_clock_hfclk_release actually stops the hf clock and it does.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/71174/802-15-4-sys_sleep_request_ms-does-not-work/293979#293979"]Is your lfclk running when you enter sleep?[/quote]
&lt;p&gt;Yes it runs in sleep. I added code to disable it after Your suggestion but it not changed the current consumption&amp;nbsp;during sleep.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/71174/802-15-4-sys_sleep_request_ms-does-not-work/293979#293979"] For both of the clocks you can check the registers directly using&amp;nbsp;[/quote]
&lt;p&gt;I checked both registers values just before __WFE call and those are the values:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;HFCLKSTAT = 65536
LFCLKSTAT = 0&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I&amp;#39;m not sure if the HFCLKSTAT is correct.&amp;nbsp;As I understand, the value 65536 (0x10000) means that the hfclk runs from internal high&amp;nbsp;frequency oscillator. Before call to&amp;nbsp;nrf_drv_clock_hfclk_release the value is 0x10001 which means that the hfclk runs from external oscillator. Should the value of&amp;nbsp;HFCLKSTAT be 0 ? If yes, then maybe in debug mode it can&amp;#39;t be 0 to allow debug interface to work ?&lt;/span&gt;&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/71174/802-15-4-sys_sleep_request_ms-does-not-work/293979#293979"]What HW are you running this on? DKs or custom boards? Does it have an LFXTAL?[/quote]
&lt;p&gt;I&amp;#39;m using nrf52840 dongle board (pca10059).&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/71174/802-15-4-sys_sleep_request_ms-does-not-work/293979#293979"]Another possibility is other peripherals. Are you using anything else? UART for logging or the application?[/quote]
&lt;p&gt;No other peripherials. No logs, no uart.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m pretty sure that the high current consumption is caused by the sys_init call because if I call sleep just before sys_init I get 3uA, if I call sleep just after sys_init I get 400uA.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 802.15.4 sys_sleep_request_ms does not work</title><link>https://devzone.nordicsemi.com/thread/293979?ContentTypeID=1</link><pubDate>Thu, 11 Feb 2021 12:42:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fb30ed79-bf4d-47b8-b2c4-d19ea764bc7e</guid><dc:creator>Edvin</dc:creator><description>[quote user="rozpruwacz"]I cannot reply directly to Your last message because there is no reply button so I just reply to myself.[/quote]
&lt;p&gt;&amp;nbsp;It happens from time to time. Try to reload the page until it shows up if it happens again.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;So it could be a couple of different things causing the higher current consumption.&lt;/p&gt;
&lt;p&gt;802.15.4 is used in Thread and Zigbee, and the downside with this is that the proper nodes have to always be listening, keeping the radio in RX mode. However, this would draw a lot more than 400µA (roughly 5-10 mA), so I don&amp;#39;t think that is what you are seeing.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Please note that calling TIMER0-&amp;gt;TASK_STOP doesn&amp;#39;t stop the actual clock that you requested using&amp;nbsp;nrf_drv_clock_hfclk_request().&lt;/p&gt;
&lt;p&gt;I see that you release the hfclk as well, but is it requested from&amp;nbsp;elsewhere in your project? You can try to debug nrf_drv_clock_hfclk_release() to see whether or not this line is true or false:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;m_clock_cb.hfclk_requests&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;and whether hfclk_stop() is called.&lt;/p&gt;
&lt;p&gt;Is your lfclk running when you enter sleep? For both of the clocks you can check the registers directly using&amp;nbsp;&lt;/p&gt;
&lt;p&gt;NRF_CLOCK-&amp;gt;&lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/clock.html?cp=4_0_0_4_3_2_16#register.HFCLKSTAT"&gt;HFCLKSTAT&lt;/a&gt;;&lt;/p&gt;
&lt;p&gt;NRF_CLOCK-&amp;gt;&lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/clock.html?cp=4_0_0_4_3_2_18#register.LFCLKSTAT"&gt;LFCLKSTAT&lt;/a&gt;;&lt;/p&gt;
&lt;p&gt;(see links for register description)&lt;/p&gt;
&lt;p&gt;What HW are you running this on? DKs or custom boards? Does it have an LFXTAL? If it is a custom board, you need to check the XTALs&amp;#39; electrical specification to see how much current it draws.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Another possibility is other peripherals. Are you using anything else? UART for logging or the application? If so, you can try to disable this as well, and set the pins in the disconnected input state. Basically, an output may draw current if it needs to hold a pin high or low while it is in sleep.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 802.15.4 sys_sleep_request_ms does not work</title><link>https://devzone.nordicsemi.com/thread/293954?ContentTypeID=1</link><pubDate>Thu, 11 Feb 2021 11:30:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:66607e43-ba32-4cf6-ad6a-a6768f197a0b</guid><dc:creator>rozpruwacz</dc:creator><description>&lt;p&gt;Hi Edvin,&lt;/p&gt;
&lt;p&gt;Thanks for the response. I cannot reply directly to Your last message because there is no reply button so I just reply to myself.&lt;/p&gt;
&lt;p&gt;I did what You suggested (calling __WFE()) and it does work. But I have an issue with the current consumption. It is much larger than expected and is aroung 400uA. I expect it to be less that 10uA. The isolated test case is below:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static void clock_init(void)
{
    ret_code_t err_code = nrf_drv_clock_init();
    ASSERT((err_code == NRF_SUCCESS) || (err_code == NRF_ERROR_MODULE_ALREADY_INITIALIZED));

    nrf_drv_clock_hfclk_request(NULL);
    while (!nrf_drv_clock_hfclk_is_running())
    {
        // spin lock
    }

    nrf_drv_clock_lfclk_request(NULL);
    while (!nrf_drv_clock_lfclk_is_running())
    {
        // spin lock
    }
}

static void sleep()
{
    nrf_drv_clock_hfclk_release();
    __SEV();
    __WFE();
    __WFE();
    nrf_drv_clock_hfclk_request(NULL);
    while (!nrf_drv_clock_hfclk_is_running())
    {
        // spin lock
    }
}

int main(void)
{
    static uint8_t __ALIGN(ALIGN_VALUE) m_heap[CONFIG_POOL_SIZE];
    static const size_t m_heap_size = CONFIG_POOL_SIZE;
    ral_irq_handler_import();
    clock_init();
    sys_init(m_heap, m_heap_size);
    sleep();
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;To be sure that the issue is related to the 802.15.4 library i tested the case where sleep was called just before sys_init and the result was that the current consumption was at around 3uA which is what I would expect.&lt;/p&gt;
&lt;p&gt;So obviously the sys_init call&amp;nbsp;enables some hardware that consumes 400uA of current and I&amp;#39;m not able to figure out what it is. I know that I should disable all the peripherials for low current consumption in sleap mode, but I do not know which peripherials are enabled by the sys_init call.&lt;/p&gt;
&lt;p&gt;I suspect the RADIO and TIMER0 peripherials but disabling them explicitly before sleep does not change the current consumption.&lt;/p&gt;
&lt;p&gt;To disable radio and timer I did:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;NRF_RADIO-&amp;gt;TASKS_DISABLE = 1;
TIMER0-&amp;gt;TASK_STOP = 1;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;So the question is, what do I need to&amp;nbsp;disable to get low current consumption in SYSTEM ON sleep ?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Marek Czerski&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 802.15.4 sys_sleep_request_ms does not work</title><link>https://devzone.nordicsemi.com/thread/293901?ContentTypeID=1</link><pubDate>Thu, 11 Feb 2021 08:27:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:34156b30-bc58-4b88-a540-4b1973d3e26f</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Sorry for the late reply. I missed the internal reply. I am sorry.&lt;/p&gt;
&lt;p&gt;So I asked our 802.15.4 team about this, and their reply was:&lt;/p&gt;
&lt;div&gt;&lt;span&gt;--------------------------&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;The state of this IEEE 802.15.4 stack is that it was developed externally (therefore it is distributed in a binary form) as a standalone project. By &amp;quot;standalone&amp;quot; I mean the developers who worked on this, extracted from SDK or developed internally any components that required HW access (peripheral drivers, Radio configuration, MDK and cortex libs). And they added a configuration option to indicate whether to use those internal drivers, or the stack has to integrate with external components. The stack available in the nRF5 SDK uses the latter config to integrate with the SDK components (drivers and libraries) and not the internal components of the 802.15.4 stack project.&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;Unfortunately the config option is not properly reflected in the API documentation, but the understanding should be, that anything that accesses the nRF52 HW except for the RADIO and TIMERs used by the stack, should be handled externally. In this case the user should call the &lt;em&gt;WFE() CMSIS function to put the device to seelp. The sys_&lt;/em&gt;sleep() API can only handle the sleep approving logic (checking if other components approve entering the sleep state).&lt;/div&gt;
&lt;div&gt;--------------------------&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;So it looks like the API is not putting the device to sleep. Only providing the events that you can do so in.&lt;/div&gt;
&lt;div&gt;To see how to put the device to sleep, I suggest that you check out some of the other examples in the SDK that uses the&amp;nbsp;nrf_pwr_mgmt_run().&lt;br /&gt;&lt;br /&gt;See e.g. the ble_app_hrs example. In the main loop, you have:&lt;br /&gt;idle_state_handle() -&amp;gt;&amp;nbsp;nrf_pwr_mgmt_run() -&amp;gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;    {
        // Wait for an event.
        __WFE();
        // Clear the internal event register.
        __SEV();
        __WFE();
    }&lt;/pre&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;Best regards,&lt;/div&gt;
&lt;div&gt;Edvin&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 802.15.4 sys_sleep_request_ms does not work</title><link>https://devzone.nordicsemi.com/thread/292643?ContentTypeID=1</link><pubDate>Wed, 03 Feb 2021 10:57:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:22d07424-a05b-40ce-9710-abfba9a56ca7</guid><dc:creator>rozpruwacz</dc:creator><description>&lt;p&gt;Hi Edvin,&lt;/p&gt;
&lt;p&gt;Thanks for the response.&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/71174/802-15-4-sys_sleep_request_ms-does-not-work/292628#292628"]Assuming you are using raw 802.15.4 and don&amp;#39;t intend to use Zigbee then, right?[/quote]
&lt;p&gt;yes.&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/71174/802-15-4-sys_sleep_request_ms-does-not-work/292628#292628"]What do you see if you don&amp;#39;t use&amp;nbsp;&lt;span&gt;sys_sleep_approver_register()? Does the device go to sleep for the correct amount of time when you call&amp;nbsp;sys_sleep_request_ms()?&lt;/span&gt;[/quote]
&lt;p&gt;No effect, the device is not going to sleep.&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/71174/802-15-4-sys_sleep_request_ms-does-not-work/292628#292628"]&lt;p&gt;&lt;span&gt;Did you remember to call&amp;nbsp;sys_sleep_init() before calling sys_sleep_request_ms()?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;[/quote]
&lt;p&gt;Yes, at the application startup. But I guess that&amp;nbsp;&lt;span&gt;sys_sleep_init is already called by the&amp;nbsp;sys_init.&lt;/span&gt;&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/71174/802-15-4-sys_sleep_request_ms-does-not-work/292628#292628"]What is the&amp;nbsp;sys_sleep_wakeup_reason() after you wake up immediately after calling sys_sleep_request_ms()[/quote]
&lt;p&gt;It is 0.&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/71174/802-15-4-sys_sleep_request_ms-does-not-work/292628#292628"]As I mentinoned in one of your previous tickets, this library is not much used, and noone currently working in Nordic is particularly familiar with it.[/quote]
&lt;p&gt;Up until now this library is working good for me. The only problem is the documentation which does not describe&amp;nbsp;very important things like resource ownership,&amp;nbsp;api calls invariants, etc. This would be no problem if the source code&amp;nbsp;was&amp;nbsp;available.&lt;/p&gt;
&lt;p&gt;on this page (&lt;a href="https://www.nordicsemi.com/Software-and-tools/Software/802-15-4-software"&gt;https://www.nordicsemi.com/Software-and-tools/Software/802-15-4-software&lt;/a&gt;) I can read:&lt;/p&gt;
&lt;p&gt;&amp;quot;&lt;span&gt;For those who wish to utilize another protocol stack, or implement their own, we offer complete PHY and MAC support for the nRF52840 multiprotocol SoC.&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Is&amp;nbsp;it refering&amp;nbsp;to 802.15.4 library that I use or the other piece of software ?&lt;/span&gt;&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/71174/802-15-4-sys_sleep_request_ms-does-not-work/292628#292628"]When I ask our network group about this library they will point us to the 802.15.4 driver used in the thread and zigbee SDK, so I guess they will do the same if I ask them about this.[/quote]
&lt;p&gt;As I understand, the 802.15.4 driver You mention is this (&lt;a href="https://github.com/NordicSemiconductor/nRF-IEEE-802.15.4-radio-driver"&gt;https://github.com/NordicSemiconductor/nRF-IEEE-802.15.4-radio-driver&lt;/a&gt;) and it is&amp;nbsp;not a proper 802.15.4 mac layer implementation, so I would need to implement a lot more code. I can&amp;#39;t find any documentation on it also.&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/71174/802-15-4-sys_sleep_request_ms-does-not-work/292628#292628"]I have never tested the sleep implementation in the 802154 library. Do you have an example where you have set it up that I can test?[/quote]
&lt;p&gt;Below is my test code and log output. It assumes that there is PAN coordinator on the other side, and the&amp;nbsp;&lt;span&gt;sys_sleep_request_ms is called only after succesfull association.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;#include &amp;quot;config.h&amp;quot;
#include &amp;quot;ral_irq_handlers.h&amp;quot;
#include &amp;quot;nrf_log.h&amp;quot;
#include &amp;quot;nrf_log_ctrl.h&amp;quot;
#include &amp;quot;nrf_log_default_backends.h&amp;quot;
#include &amp;quot;nrf_delay.h&amp;quot;
#include &amp;quot;app_usbd.h&amp;quot;
#include &amp;quot;bsp.h&amp;quot;

#include &amp;quot;nrf_drv_clock.h&amp;quot;

#include &amp;quot;mac_mlme_pib.h&amp;quot;
#include &amp;quot;mac_mlme_reset.h&amp;quot;
#include &amp;quot;mac_mlme_scan.h&amp;quot;
#include &amp;quot;mac_mlme_associate.h&amp;quot;
#include &amp;quot;mac_mlme_sync.h&amp;quot;
#include &amp;quot;mac_mcps_data.h&amp;quot;
#include &amp;quot;sys_init.h&amp;quot;
#include &amp;quot;sys_memory_manager.h&amp;quot;
#include &amp;quot;sys_sleep.h&amp;quot;
#include &amp;quot;sys_task_scheduler.h&amp;quot;
#include &amp;quot;boards.h&amp;quot;

static mac_pan_descriptor_t pan_descriptor;
uint16_t my_addr = 0xFFFF;
static bool allow_sleep = false;
static sys_sleep_approver_id_t approver_id;

void mcps_data_ind(mcps_data_ind_t * p_ind)
{
    bool addresses_match = p_ind-&amp;gt;dst_pan_id == pan_descriptor.coord_pan_id &amp;amp;&amp;amp;
                           p_ind-&amp;gt;dst_addr_mode == pan_descriptor.coord_addr_mode &amp;amp;&amp;amp;
                           p_ind-&amp;gt;dst_addr.short_address == my_addr &amp;amp;&amp;amp;
                           p_ind-&amp;gt;src_pan_id == pan_descriptor.coord_pan_id;

    NRF_LOG_INFO(&amp;quot;%d received success from %x&amp;quot;, sys_time_get(), p_ind-&amp;gt;src_addr.short_address);
    if (addresses_match &amp;amp;&amp;amp; p_ind-&amp;gt;msdu_length &amp;gt; 0)
    {
        if (bsp_board_led_state_get(CONFIG_DOWNSTREAM_PIN))
            bsp_board_led_off(CONFIG_DOWNSTREAM_PIN);
        else
            bsp_board_led_on(CONFIG_DOWNSTREAM_PIN);
    }
    mac_mem_msdu_free(&amp;amp;p_ind-&amp;gt;msdu);
}

static void mcps_data_conf(mcps_data_conf_t * conf)
{
    if (conf-&amp;gt;status == MAC_SUCCESS)
    {
        NRF_LOG_INFO(&amp;quot;%d send success&amp;quot;, sys_time_get());
        bsp_board_led_off(CONFIG_UPSTREAM_PIN);
    }
    else
    {
        NRF_LOG_INFO(&amp;quot;%d send failed&amp;quot;, sys_time_get());
    }
}

static void send_data()
{
    static uint8_t m_radio_tx_buffer[PHY_MAX_PACKET_SIZE + MAC_MAX_MHR_SIZE];
    static mcps_data_req_t m_data_req;
    NRF_LOG_INFO(&amp;quot;%d send_data&amp;quot;, sys_time_get());

    m_radio_tx_buffer[MAC_MAX_MHR_SIZE] = &amp;#39;x&amp;#39;;

    m_data_req.dst_addr_mode = pan_descriptor.coord_addr_mode;
    m_data_req.dst_addr = pan_descriptor.coord_address;
    m_data_req.dst_pan_id = pan_descriptor.coord_pan_id;
    m_data_req.src_addr_mode = MAC_ADDR_SHORT;
    m_data_req.msdu = (uint8_t *)&amp;amp;m_radio_tx_buffer[MAC_MAX_MHR_SIZE];
    m_data_req.msdu_length = 1;
    m_data_req.msdu_handle++;
    m_data_req.tx_options.ack = true;
    m_data_req.tx_options.gts = false;
    m_data_req.tx_options.indirect = false;
    mcps_data_req(&amp;amp;m_data_req, mcps_data_conf);

    bsp_board_led_on(CONFIG_UPSTREAM_PIN);
}

static void ext_addr_set()
{
    const pib_id_t pib_id =
    {
        .mlme_id = MAC_EXTENDED_ADDRESS,
    };
    uint64_t address = CONFIG_IEEE_ADDRESS + CONFIG_DEVICE_SHORT_ADDRESS;
    mac_status_t result = mlme_set(pib_id, 0, &amp;amp;address);
    NRF_LOG_INFO(&amp;quot;ext_addr_set: %d&amp;quot;, result);
}

//static void auto_request_set()
//{
//    const pib_id_t pib_id =
//    {
//        .mlme_id = MAC_AUTO_REQUEST,
//    };
//    uint8_t auto_request = 0;
//    mac_status_t result = mlme_set(pib_id, 0, &amp;amp;auto_request);
//    NRF_LOG_INFO(&amp;quot;auto_request_set: %d&amp;quot;, result);
//}

static void beacon_order_set(uint8_t beacon_order)
{
    const pib_id_t pib_id =
    {
        .mlme_id = MAC_BEACON_ORDER,
    };
    mac_status_t result = mlme_set(pib_id, 0, &amp;amp;beacon_order);
    NRF_LOG_INFO(&amp;quot;beacon_order_set: %d&amp;quot;, result);
}

static void mlme_associate_conf_cb(mlme_associate_conf_t * conf)
{
    NRF_LOG_INFO(&amp;quot;%d mlme_associate_conf: %d&amp;quot;, sys_time_get(), conf-&amp;gt;status);
    if (conf-&amp;gt;status == MAC_SUCCESS)
        bsp_board_led_on(CONFIG_INIT_DONE_PIN);
    else
        bsp_board_led_off(CONFIG_INIT_DONE_PIN);

    my_addr = conf-&amp;gt;assoc_short_address;
    NRF_LOG_INFO(&amp;quot;short_address: %x&amp;quot;, my_addr);
    allow_sleep = true;
}

static void log_mac_pan_descriptor(const mac_pan_descriptor_t *mac_pan_descriptor)
{
    NRF_LOG_INFO(&amp;quot;coord_addr_mode: %d&amp;quot;, mac_pan_descriptor-&amp;gt;coord_addr_mode);
    NRF_LOG_INFO(&amp;quot;coord_pan_id: %x&amp;quot;, mac_pan_descriptor-&amp;gt;coord_pan_id);
    NRF_LOG_INFO(&amp;quot;coord_address.short_address: %x&amp;quot;, mac_pan_descriptor-&amp;gt;coord_address.short_address);
    NRF_LOG_INFO(&amp;quot;coord_address.long_address: %x&amp;quot;, mac_pan_descriptor-&amp;gt;coord_address.long_address);
    NRF_LOG_INFO(&amp;quot;logical_channel: %d&amp;quot;, mac_pan_descriptor-&amp;gt;logical_channel);
    NRF_LOG_INFO(&amp;quot;superframe_spec.beacon_order %d&amp;quot;, mac_pan_descriptor-&amp;gt;superframe_spec.beacon_order);
    NRF_LOG_INFO(&amp;quot;superframe_spec.superframe_order %d&amp;quot;, mac_pan_descriptor-&amp;gt;superframe_spec.superframe_order);
    NRF_LOG_INFO(&amp;quot;superframe_spec.final_cap_slot %d&amp;quot;, mac_pan_descriptor-&amp;gt;superframe_spec.final_cap_slot);
    NRF_LOG_INFO(&amp;quot;superframe_spec.battery_life_extension %d&amp;quot;, mac_pan_descriptor-&amp;gt;superframe_spec.battery_life_extension);
    NRF_LOG_INFO(&amp;quot;superframe_spec.pan_coordinator %d&amp;quot;, mac_pan_descriptor-&amp;gt;superframe_spec.pan_coordinator);
    NRF_LOG_INFO(&amp;quot;superframe_spec.association_permit %d&amp;quot;, mac_pan_descriptor-&amp;gt;superframe_spec.association_permit);
    NRF_LOG_INFO(&amp;quot;gts_permit %d&amp;quot;, mac_pan_descriptor-&amp;gt;gts_permit);
    NRF_LOG_INFO(&amp;quot;link_quality %d&amp;quot;, mac_pan_descriptor-&amp;gt;link_quality);
    NRF_LOG_INFO(&amp;quot;timestamp %d&amp;quot;, mac_pan_descriptor-&amp;gt;timestamp);
}

static void mlme_scan_conf_cb(mlme_scan_conf_t * conf)
{
    NRF_LOG_INFO(&amp;quot;%d mlme_scan_conf: %d&amp;quot;, sys_time_get(), conf-&amp;gt;status);
    if (conf-&amp;gt;status != MAC_SUCCESS)
        return;
    NRF_LOG_INFO(&amp;quot;unscanned channels: %x&amp;quot;, conf-&amp;gt;unscanned_channels);
    NRF_LOG_INFO(&amp;quot;results: %d&amp;quot;,conf-&amp;gt;result_list_size);
    if (conf-&amp;gt;result_list_size == 0)
        return;
    NRF_LOG_INFO(&amp;quot;first result&amp;quot;);
    pan_descriptor = conf-&amp;gt;pan_descriptor_list[0];
    log_mac_pan_descriptor(&amp;amp;pan_descriptor);

    {
        beacon_order_set(pan_descriptor.superframe_spec.beacon_order);
        static mlme_sync_req_t req;
        req = (mlme_sync_req_t){
            .logical_channel = pan_descriptor.logical_channel,
            .track_beacon = true
        };
        NRF_LOG_INFO(&amp;quot;syncing to channel %d&amp;quot;, req.logical_channel);
        mlme_sync_req(&amp;amp;req);
    }

    static mlme_associate_req_t req;
    req = (mlme_associate_req_t){
        .logical_channel = pan_descriptor.logical_channel,
        .coord_addr_mode = pan_descriptor.coord_addr_mode,
        .coord_pan_id = pan_descriptor.coord_pan_id,
        .coord_address = pan_descriptor.coord_address,
        .capability_information = {
            .alternate_pan_coordinator = 0,
            .device_type = 0,
            .power_source = 0,
            .rx_on_when_idle = 0,
            .reserved = 0,
            .security_capability = 0,
            .allocate_address = 1
        }
    };
    mlme_associate_req(&amp;amp;req, mlme_associate_conf_cb);
}

void mlme_reset_conf_cb(mlme_reset_conf_t *conf)
{
    NRF_LOG_INFO(&amp;quot;%d mlme_reset_conf: %d&amp;quot;, sys_time_get(), conf-&amp;gt;status);
    if (conf-&amp;gt;status != MAC_SUCCESS) {
        bsp_board_led_off(CONFIG_INIT_DONE_PIN);
        return;
    }

    ext_addr_set();

    static mac_pan_descriptor_t pan_descriptors_buf[2];
    static mlme_scan_req_t req = {
        .scan_type = ACTIVE_SCAN,
        .scan_channels = (1 &amp;lt;&amp;lt; 15), //PHY_CHANNEL_SUPPORTED,
        .scan_duration = 8,
        .pan_descriptors_buf_size = sizeof(pan_descriptors_buf) / sizeof(pan_descriptors_buf[0]),
        .pan_descriptors_buf = pan_descriptors_buf,
        .energy_detect_buf_size = 0,
        .energy_detect_buf = NULL,
    };
    mlme_scan_req(&amp;amp;req, mlme_scan_conf_cb);
}

static void out_of_memory_callback(const void * data)
{
    bsp_board_led_on(CONFIG_ERROR_PIN);
}

static void memory_freed_callback(const void * data)
{
    bsp_board_led_off(CONFIG_ERROR_PIN);
}

static void falling_asleep_callback(const void * data)
{
    NRF_LOG_INFO(&amp;quot;%d falling_asleep_callback&amp;quot;, sys_time_get());
    sys_sleep_approve(approver_id);
}

static void wake_up_callback(const void * data)
{
    NRF_LOG_INFO(&amp;quot;%d wake_up_callback&amp;quot;, sys_time_get());
}

/**@brief   Application task initialization for GPIO test.
 */
static void app_task_init(void)
{
    static sys_event_desc_t m_out_of_memory_desc = {
        .event_id = SYS_EVENT_OUT_OF_MEMORY,
        .callback = out_of_memory_callback,
    };
    static sys_event_desc_t m_memory_freed_desc = {
        .event_id = SYS_EVENT_MEMORY_FREED,
        .callback = memory_freed_callback,
    };
    static sys_event_desc_t m_falling_asleep_desc = {
        .event_id = SYS_EVENT_FALLING_ASLEEP,
        .callback = falling_asleep_callback,
    };
    static sys_event_desc_t m_wake_up_desc = {
        .event_id = SYS_EVENT_WAKE_UP,
        .callback = wake_up_callback,
    };
    static uint8_t __ALIGN(ALIGN_VALUE) m_heap[CONFIG_POOL_SIZE];
    static const size_t m_heap_size = CONFIG_POOL_SIZE;

    sys_init(m_heap, m_heap_size);
    sys_sleep_init();
    approver_id = sys_sleep_approver_register(&amp;amp;m_falling_asleep_desc, &amp;amp;m_wake_up_desc);
    NRF_LOG_INFO(&amp;quot;aprover id is %d&amp;quot;, approver_id);

    sys_event_subscribe(&amp;amp;m_out_of_memory_desc);
    sys_event_subscribe(&amp;amp;m_memory_freed_desc);
    //sys_event_subscribe(&amp;amp;m_falling_asleep_desc);
    //sys_event_subscribe(&amp;amp;m_wake_up_desc);

    static mlme_reset_req_t req = {
        .set_default_pib = true
    };
    mlme_reset_req(&amp;amp;req, mlme_reset_conf_cb);
}

void mlme_sync_loss_ind(mlme_sync_loss_ind_t * ind)
{
    NRF_LOG_INFO(&amp;quot;%d mlme_sync_loss for PAN ID: %x on channel %d&amp;quot;, sys_time_get(), ind-&amp;gt;pan_id, ind-&amp;gt;logical_channel);
    NRF_LOG_INFO(&amp;quot;reason: %d&amp;quot;, ind-&amp;gt;loss_reason);
}

void mlme_beacon_notify_ind(mlme_beacon_notify_ind_t *ind)
{
    NRF_LOG_INFO(&amp;quot;%d mlme_beacon_notify_ind bsn: %d&amp;quot;, sys_time_get(), ind-&amp;gt;bsn); 
    mac_mem_msdu_free(&amp;amp;ind-&amp;gt;sdu);
}

static void clock_init(void)
{
    ret_code_t err_code = nrf_drv_clock_init();
    ASSERT((err_code == NRF_SUCCESS) || (err_code == NRF_ERROR_MODULE_ALREADY_INITIALIZED));

    nrf_drv_clock_hfclk_request(NULL);
    while (!nrf_drv_clock_hfclk_is_running())
    {
        // spin lock
    }

    nrf_drv_clock_lfclk_request(NULL);
    while (!nrf_drv_clock_lfclk_is_running())
    {
        // spin lock
    }
}

/**
 * @brief Function for application main entry.
 */
int main(void)
{
    ral_irq_handler_import();
    clock_init();
    APP_ERROR_CHECK(bsp_init(BSP_INIT_LEDS | BSP_INIT_BUTTONS, NULL));
    bsp_board_leds_off();
    APP_ERROR_CHECK(app_usbd_init(NULL));
    app_usbd_enable();
    app_usbd_start();
    APP_ERROR_CHECK(NRF_LOG_INIT(NULL));
    NRF_LOG_DEFAULT_BACKENDS_INIT();
    for (int i=0; i&amp;lt;300; i++)
    {
        while (app_usbd_event_queue_process());
        if (i % 2)
            bsp_board_leds_off();
        else
            bsp_board_leds_on();
        nrf_delay_ms(10);
    }
    bsp_board_leds_on();
    NRF_LOG_INFO(&amp;quot;Blinky device example started.&amp;quot;);
    bsp_board_leds_off();

    app_task_init();

    bool prev_button = bsp_board_button_state_get(CONFIG_BTN_DATA_SEND);
    bool curr_button = 0;
    while (true)
    {
        while (app_usbd_event_queue_process());
        sys_task_run();
        curr_button = bsp_board_button_state_get(CONFIG_BTN_DATA_SEND);
        if (prev_button == 0 &amp;amp;&amp;amp; curr_button == 1) {
            send_data();
        }
        prev_button = curr_button;
        if (allow_sleep) {
            allow_sleep = false;
            NRF_LOG_INFO(&amp;quot;%d going sleep&amp;quot;, sys_time_get());
            sys_sleep_request_ms(10000);
            NRF_LOG_INFO(&amp;quot;%d woke up, reason: %d&amp;quot;, sys_time_get(), sys_sleep_wakeup_reason());
        }
    }
}&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;lt;info&amp;gt; app: Blinky device example started.
&amp;lt;info&amp;gt; app: aprover id is 0
&amp;lt;info&amp;gt; app: 1138 mlme_reset_conf: 0
&amp;lt;info&amp;gt; app: ext_addr_set: 0
&amp;lt;info&amp;gt; app: 3952220 mlme_scan_conf: 0
&amp;lt;info&amp;gt; app: unscanned channels: 0
&amp;lt;info&amp;gt; app: results: 1
&amp;lt;info&amp;gt; app: first result
&amp;lt;info&amp;gt; app: coord_addr_mode: 2
&amp;lt;info&amp;gt; app: coord_pan_id: 1234
&amp;lt;info&amp;gt; app: coord_address.short_address: A
&amp;lt;info&amp;gt; app: coord_address.long_address: A
&amp;lt;info&amp;gt; app: logical_channel: 15
&amp;lt;info&amp;gt; app: superframe_spec.beacon_order 7
&amp;lt;info&amp;gt; app: superframe_spec.superframe_order 5
&amp;lt;info&amp;gt; app: superframe_spec.final_cap_slot 15
&amp;lt;info&amp;gt; app: superframe_spec.battery_life_extension 0
&amp;lt;info&amp;gt; app: superframe_spec.pan_coordinator 1
&amp;lt;info&amp;gt; app: superframe_spec.association_permit 1
&amp;lt;info&amp;gt; app: gts_permit 1
&amp;lt;info&amp;gt; app: link_quality 255
&amp;lt;info&amp;gt; app: timestamp 1654218
&amp;lt;info&amp;gt; app: beacon_order_set: 0
&amp;lt;info&amp;gt; app: syncing to channel 15
&amp;lt;info&amp;gt; app: 7560187 mlme_associate_conf: 0
&amp;lt;info&amp;gt; app: short_address: CDFA
&amp;lt;info&amp;gt; app: 7560666 going sleep
&amp;lt;info&amp;gt; app: 7560834 falling_asleep_callback
&amp;lt;info&amp;gt; app: 7561030 wake_up_callback
&amp;lt;info&amp;gt; app: 7561217 woke up, reason: 0&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Marek Czerski&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 802.15.4 sys_sleep_request_ms does not work</title><link>https://devzone.nordicsemi.com/thread/292628?ContentTypeID=1</link><pubDate>Wed, 03 Feb 2021 09:46:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ddbf5b12-87aa-457b-b60a-6505cd54f763</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Ok,&lt;/p&gt;
&lt;p&gt;Assuming you are using raw 802.15.4 and don&amp;#39;t intend to use Zigbee then, right?&lt;/p&gt;
&lt;p&gt;What do you see if you don&amp;#39;t use&amp;nbsp;&lt;span&gt;sys_sleep_approver_register()? Does the device go to sleep for the correct amount of time when you call&amp;nbsp;sys_sleep_request_ms()?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Did you remember to call&amp;nbsp;sys_sleep_init() before calling sys_sleep_request_ms()?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;What is the&amp;nbsp;sys_sleep_wakeup_reason() after you wake up immediately after calling sys_sleep_request_ms()&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;As I mentinoned in one of your previous tickets, this library is not much used, and noone currently working in Nordic is particularly familiar with it. When I ask our network group about this library they will point us to the 802.15.4 driver used in the thread and zigbee SDK, so I guess they will do the same if I ask them about this.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I have never tested the sleep implementation in the 802154 library. Do you have an example where you have set it up that I can test?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;BR,&lt;br /&gt;Edvin&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 802.15.4 sys_sleep_request_ms does not work</title><link>https://devzone.nordicsemi.com/thread/292539?ContentTypeID=1</link><pubDate>Tue, 02 Feb 2021 15:34:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7615749f-d691-45e1-9b5b-a15e88f8980a</guid><dc:creator>rozpruwacz</dc:creator><description>&lt;p&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/group__sys__sleep.html#gaa921e0c91ff399f00674303d5f807d0c"&gt;infocenter.nordicsemi.com/.../group__sys__sleep.html&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 802.15.4 sys_sleep_request_ms does not work</title><link>https://devzone.nordicsemi.com/thread/292530?ContentTypeID=1</link><pubDate>Tue, 02 Feb 2021 15:16:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f10c22a0-d4d3-4667-9d05-8d69b0c93561</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;I can&amp;#39;t find any references to&amp;nbsp;&lt;span&gt;sys_sleep_request_ms in the SDK. Where did you find this?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;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&amp;#39;t use the 802.15.4 stack directly when using the zboss stack (the name of the Zigbee stack).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>