<?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>regarding waking up device from sleep mode</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/34118/regarding-waking-up-device-from-sleep-mode</link><description>Hi, 
 We are using nordic nRF52832 in our project as per our requirement we have to implement sleep and wake up mode with the help of button interrupt.our use case is that after long press of 3 seconds device starts advertising(exit sleep mode). and again</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 07 May 2018 12:52:38 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/34118/regarding-waking-up-device-from-sleep-mode" /><item><title>RE: regarding waking up device from sleep mode</title><link>https://devzone.nordicsemi.com/thread/131202?ContentTypeID=1</link><pubDate>Mon, 07 May 2018 12:52:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:20f5abf7-7d24-4cd2-985c-3a1d6d596fcc</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote userid="69288" url="~/f/nordic-q-a/34118/regarding-waking-up-device-from-sleep-mode"]But when we are using same implementation to shut down device &lt;strong&gt;{sd_power_system_off()}&amp;nbsp;&lt;/strong&gt;the device goes to sleep but the device does not wakes up. are there any configuration setting which we need to do so that device exits sleep mode.[/quote]
&lt;p&gt;When in System OFF mode, the device can be woken up through one of the following signals:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The DETECT signal, optionally generated by the GPIO peripheral&lt;/li&gt;
&lt;li&gt;The ANADETECT signal, optionally generated by the LPCOMP module&lt;/li&gt;
&lt;li&gt;The SENSE signal, optionally generated by the NFC module to &amp;ldquo;wake-on-field&amp;rdquo;&lt;/li&gt;
&lt;li&gt;A reset&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Try to configure the pin you want to use to wake the chip up with like this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;nrf_gpio_cfg_sense_input(PIN NUMBER, NRF_GPIO_PIN_PULLUP, NRF_GPIO_PIN_SENSE_LOW);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;This will generate the&amp;nbsp;&lt;span&gt;DETECT signal when the pin goes from high to low.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Note that in some examples in the SDK, we use the function&amp;nbsp;bsp_btn_ble_sleep_mode_prepare() to do this. It will by defualt configure button 1 to wake the chip up when pressed.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;static void sleep_mode_enter(void)
{
    uint32_t err_code = bsp_indication_set(BSP_INDICATE_IDLE);
    APP_ERROR_CHECK(err_code);

    // Prepare wakeup buttons.
    err_code = bsp_btn_ble_sleep_mode_prepare();
    APP_ERROR_CHECK(err_code);

    // Go to system-off mode (this function will not return; wakeup will cause a reset).
    err_code = sd_power_system_off();
    APP_ERROR_CHECK(err_code);
}&lt;/pre&gt;&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>