<?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 DK restarts application after 3 minutes when not connected to any device via BLE</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/70171/nrf52840-dk-restarts-application-after-3-minutes-when-not-connected-to-any-device-via-ble</link><description>Hi. I have edited the Heart Rate Service Example project in SDK 17.02 and I am currently using nRF52840 DK. 
 I am not sure of the reason why the application restarts after 3 minutes when it is idle. 
 It does not restart when it is connected to nRF toolbox</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 08 Jan 2021 16:11:40 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/70171/nrf52840-dk-restarts-application-after-3-minutes-when-not-connected-to-any-device-via-ble" /><item><title>RE: nRF52840 DK restarts application after 3 minutes when not connected to any device via BLE</title><link>https://devzone.nordicsemi.com/thread/288224?ContentTypeID=1</link><pubDate>Fri, 08 Jan 2021 16:11:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b2f95c70-b08b-44ea-8a21-2822834040d2</guid><dc:creator>abdelali</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;No it won&amp;#39;t affect the device. It just&amp;nbsp;won&amp;#39;t enter the sleep mode when the advertising times out !&lt;/p&gt;
&lt;p&gt;Another fix for not having the advertising times out is by commenting this line :&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt; init.config.ble_adv_fast_timeout  = APP_ADV_DURATION;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;You may consider the sleep mode at the stage we&amp;#39;re you&amp;#39;re looking to optimize the power consumption of your device.&lt;/p&gt;
&lt;p&gt;The Wakeup button is not the Reset button, but they have the same effect as they both reset the application.&lt;/p&gt;
&lt;p&gt;The Sleep and Wakeup buttons are by default set to the &lt;strong&gt;Button 0&lt;/strong&gt;. You can check the &lt;strong&gt;bsp_btn_ble.c&lt;/strong&gt; file available in the &lt;strong&gt;Board support&lt;/strong&gt; folder in to the &lt;strong&gt;Project Explorer&lt;/strong&gt; to the left in &lt;strong&gt;Segger&amp;nbsp;&lt;/strong&gt;for that.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Hope that helps,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 DK restarts application after 3 minutes when not connected to any device via BLE</title><link>https://devzone.nordicsemi.com/thread/287823?ContentTypeID=1</link><pubDate>Thu, 07 Jan 2021 02:21:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:68700b2e-76f1-4e84-9535-54e9516f7bca</guid><dc:creator>Mathangopal</dc:creator><description>&lt;p&gt;Hi. I comment out the sleep mode as I am not required for the device to sleep when idle state.&lt;/p&gt;
&lt;p&gt;Therefore, the device now does not restart its application. Does this affect the device?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 DK restarts application after 3 minutes when not connected to any device via BLE</title><link>https://devzone.nordicsemi.com/thread/287822?ContentTypeID=1</link><pubDate>Thu, 07 Jan 2021 02:02:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ee9f7fda-09d9-4c8b-abea-4eacd8d22174</guid><dc:creator>Mathangopal</dc:creator><description>&lt;p&gt;Hi. Is the wake button the Reset button?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 DK restarts application after 3 minutes when not connected to any device via BLE</title><link>https://devzone.nordicsemi.com/thread/287820?ContentTypeID=1</link><pubDate>Thu, 07 Jan 2021 01:49:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:78f32901-c37f-4982-b43c-db17176e3746</guid><dc:creator>Mathangopal</dc:creator><description>&lt;p&gt;Hi. Thanks for the reply. I will check on the wakeup button.&lt;/p&gt;
&lt;p&gt;You said one reason is that I pressed the wakeup button.&lt;/p&gt;
&lt;p&gt;Is there any other reasons why the application restarts?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 DK restarts application after 3 minutes when not connected to any device via BLE</title><link>https://devzone.nordicsemi.com/thread/287693?ContentTypeID=1</link><pubDate>Wed, 06 Jan 2021 11:14:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b2991e86-93f4-4359-9bbc-f3fa11141b00</guid><dc:creator>abdelali</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;the application advertising interval is 180 seconds (3 minutes).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#define APP_ADV_DURATION                    18000                                   /**&amp;lt; The advertising duration (180 seconds) in units of 10 milliseconds. */&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;If the device wasn&amp;#39;t connected within that period, the application enters the idle state ( adv event : &lt;strong&gt;BLE_ADV_EVT_IDLE&lt;/strong&gt; ) in which it enters the deep sleep mode.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static void on_adv_evt(ble_adv_evt_t ble_adv_evt)
{
    ret_code_t err_code;

    switch (ble_adv_evt)
    {
        case BLE_ADV_EVT_FAST:
            NRF_LOG_INFO(&amp;quot;Fast advertising.&amp;quot;);
            err_code = bsp_indication_set(BSP_INDICATE_ADVERTISING);
            APP_ERROR_CHECK(err_code);
            break;

        case BLE_ADV_EVT_IDLE:
            sleep_mode_enter();
            break;

        default:
            break;
    }
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;One reason of the restart could be that you pressed the wakeup button.&lt;/p&gt;
&lt;p&gt;Note that the wakeup resets the application, means that it&amp;#39;ll restart..&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Hope that helps,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>