<?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>What happens When nRF52832 awakes from sleep mode ?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/34485/what-happens-when-nrf52832-awakes-from-sleep-mode</link><description>Hello, 
 
 I&amp;#39;m usign nRF52832 with nRF5_SDK v15. I&amp;#39;m using &amp;quot;ble_app_uart&amp;quot; example. I just wanted to know that What is the wake up procedure of the MCU when we call the sleep function below ? 
 sleep_mode_enter(); 
 Is the MCU awakes where it was sleep</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 22 May 2018 08:23:53 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/34485/what-happens-when-nrf52832-awakes-from-sleep-mode" /><item><title>RE: What happens When nRF52832 awakes from sleep mode ?</title><link>https://devzone.nordicsemi.com/thread/132671?ContentTypeID=1</link><pubDate>Tue, 22 May 2018 08:23:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:de77f36e-3677-4b13-a695-55d26a3c305e</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;If you take a look at the function definition, attached below, you&amp;#39;ll see that &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s140.api.v6.0.0/group___n_r_f___s_o_c___f_u_n_c_t_i_o_n_s.html#ga774947ee0e200456ea3aec3fc7f8bd6b"&gt;sd_power_system_off&lt;/a&gt;() is called, i.e. the chip sent to System OFF and waking up the chip will result in a reset( as mentioned in the comments)&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&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;/p&gt;
&lt;p&gt;If you the chip to go to System ON: Low Power mode, then you can call&amp;nbsp;nrf_pwr_mgmt_run() , which in turn calls &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s140.api.v6.0.0/group___n_r_f___s_o_c___f_u_n_c_t_i_o_n_s.html#ga11d88d38ac99fb72cde74c9385d36433"&gt;sd_app_evt_wait&lt;/a&gt;().&amp;nbsp; This&amp;nbsp;will put the chip in a low power state where it waits for interrupts from the SoftDevice and/or peripherals, i.e. code execution continues from where&amp;nbsp;&lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s140.api.v6.0.0/group___n_r_f___s_o_c___f_u_n_c_t_i_o_n_s.html#ga11d88d38ac99fb72cde74c9385d36433"&gt;sd_app_evt_wait&lt;/a&gt;&amp;nbsp;was called.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>