<?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>nRF52840 802.15.4 De-init hangs in &amp;quot;while (nrf_clock_lf_is_running())&amp;quot; loop at LFCLK stop task.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/80433/nrf52840-802-15-4-de-init-hangs-in-while-nrf_clock_lf_is_running-loop-at-lfclk-stop-task</link><description>I have a problem, like this fellow engineer here , but the solution is not applying for me. 
 More specifically here our function calls from application is like this: 
 
 
 Sure, the problem is Watchdog, Not stopping the LFCLK fix&amp;#39;s the situation as below</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 11 Oct 2021 11:25:34 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/80433/nrf52840-802-15-4-de-init-hangs-in-while-nrf_clock_lf_is_running-loop-at-lfclk-stop-task" /><item><title>RE: nRF52840 802.15.4 De-init hangs in "while (nrf_clock_lf_is_running())" loop at LFCLK stop task.</title><link>https://devzone.nordicsemi.com/thread/333472?ContentTypeID=1</link><pubDate>Mon, 11 Oct 2021 11:25:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bb677aae-dcb2-4e33-8802-20d3cb7a4a73</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Pratap&lt;/p&gt;
&lt;p&gt;Less than 4uA should be possible both in system ON idle (with RTC running) or in system off, but if you&amp;nbsp;are able to use GPIO wakeup and don&amp;#39;t need very fast wakeup response then using system OFF is a good option.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you are planning to enter system OFF you don&amp;#39;t really have to worry about stopping the 32kHz clock in the first place. It will be automatically disabled when you enter sleep.&amp;nbsp;&lt;/p&gt;
[quote user="Pratap"]It will be helpful if you share any sleep mode example project for the 802.15.4 Thread stack, I did not found any in the &amp;quot;&lt;strong&gt;nRF5_SDK_Thread_Zigbee_4.1&lt;/strong&gt;&amp;quot;.[/quote]
&lt;p&gt;There are no examples in the Thread/Zigbee SDK for showing how to use system OFF unfortunately. All of these examples use the regular sleep mode instead, to allow for more wakeup sources (such as a timer or the radio).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 802.15.4 De-init hangs in "while (nrf_clock_lf_is_running())" loop at LFCLK stop task.</title><link>https://devzone.nordicsemi.com/thread/333310?ContentTypeID=1</link><pubDate>Fri, 08 Oct 2021 16:21:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ff12ad2b-97e9-45bd-874c-bd482474a7b1</guid><dc:creator>Pratap</dc:creator><description>&lt;p&gt;Hello Torbjorn,&lt;/p&gt;
&lt;p&gt;Thank you for your quick reply.&lt;/p&gt;
&lt;p&gt;No particular reason, when we are calling this&amp;nbsp;&lt;strong&gt;&lt;em&gt;nrf_802154_deinit() -&amp;gt;&amp;nbsp;&lt;/em&gt;&lt;/strong&gt;&lt;span&gt;&lt;strong&gt;&lt;em&gt;nrfx_clock_uninit()&lt;/em&gt;&lt;/strong&gt;, this function is calling this LF clock disable.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Our requirement here is we need to take the nRF52840 to the sleep state until we toggle GPIO, we must achieve&amp;nbsp;4uA sleep current for our product. In that process we are calling this&amp;nbsp;&lt;strong&gt;&lt;em&gt;nrf_802154_deinit()&lt;/em&gt;&lt;/strong&gt; to disable or stop all of radio activities and HF clocks associated to the radio.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Here is the function from where we are calling this &lt;strong&gt;&lt;em&gt;nrf_802154_deinit()&lt;/em&gt;&lt;/strong&gt; upon sleep entry&amp;nbsp;request:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;void system_tidy_handler(void * p_event_data, uint16_t event_size) {
    UNUSED_VARIABLE(p_event_data);
    UNUSED_VARIABLE(event_size);
    // Close uart
    app_uart_close();

    // Turn off radio
    nrf_radio_task_trigger(NRF_RADIO_TASK_DISABLE);
    nrf_802154_deinit();

    Gpio_Sleep();

    nrf_pwr_mgmt_shutdown(NRF_PWR_MGMT_SHUTDOWN_GOTO_SYSOFF);
}&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;It will be helpful if you share any sleep mode example project for the 802.15.4 Thread stack, I did not found any in the &amp;quot;&lt;strong&gt;nRF5_SDK_Thread_Zigbee_4.1&lt;/strong&gt;&amp;quot;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;Regards, Pratap&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 802.15.4 De-init hangs in "while (nrf_clock_lf_is_running())" loop at LFCLK stop task.</title><link>https://devzone.nordicsemi.com/thread/333291?ContentTypeID=1</link><pubDate>Fri, 08 Oct 2021 14:09:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:398e9a15-6445-47b0-9748-029247b49b3d</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Is there any particular reason why you want to disable the LF clock?&amp;nbsp;&lt;br /&gt;Normally this clock will never be stopped, as it is used as a wakeup source from sleep and to keep track of time.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I talked to one of the developers regarding adding this to the nrfx_clock driver, but we have a strict policy not to mix peripherals in a single nrfx driver (nrfx_clock should only access the CLOCK peripheral, nrfx_uarte should only access UARTE and so forth), so this is not something they want to add at an nrfx level.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It would probably be better to add a check on the watchdog wherever you call the&amp;nbsp;nrfx_clock_uninit() function.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>