<?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>For nRF52832 SDK 17.0.2 ,How to enter Sleep Mode (Power Off Mode) (Suspend Mode) then press the Button1 for wake up ??</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/70498/for-nrf52832-sdk-17-0-2-how-to-enter-sleep-mode-power-off-mode-suspend-mode-then-press-the-button1-for-wake-up</link><description>For nRF52832 SDK 17.0.2 ,How to enter Sleep Mode (Power Off Mode) (Suspend Mode) then press the Button1 for wake up ??</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 20 Jan 2021 09:40:39 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/70498/for-nrf52832-sdk-17-0-2-how-to-enter-sleep-mode-power-off-mode-suspend-mode-then-press-the-button1-for-wake-up" /><item><title>RE: For nRF52832 SDK 17.0.2 ,How to enter Sleep Mode (Power Off Mode) (Suspend Mode) then press the Button1 for wake up ??</title><link>https://devzone.nordicsemi.com/thread/290173?ContentTypeID=1</link><pubDate>Wed, 20 Jan 2021 09:40:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:471f6c5f-737a-4a6c-bd31-d05b5f1551dd</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;If the chip is waken from System OFF, it is most likely an issue with the GPIO configurations.&lt;/p&gt;
&lt;p&gt;Can you check the&amp;nbsp;&lt;a title="  RESETREAS  " href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/power.html?cp=4_2_0_17_8_2#register.RESETREAS"&gt;RESETREAS&lt;/a&gt;&amp;nbsp;register after reset, to make sure that the chip was reset by wake from System OFF/GPIO?&lt;/p&gt;
&lt;p&gt;The APP_ERROR_CHECK() could also cause a reset, in case you are in debug mode, as this will cause the chip to enter &amp;quot;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/power.html?cp=4_2_0_17_1_0#unique_1199040052"&gt;Emulated System OFF&lt;/a&gt;&amp;quot;:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;// 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;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: For nRF52832 SDK 17.0.2 ,How to enter Sleep Mode (Power Off Mode) (Suspend Mode) then press the Button1 for wake up ??</title><link>https://devzone.nordicsemi.com/thread/289944?ContentTypeID=1</link><pubDate>Tue, 19 Jan 2021 09:13:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0290ed8e-ffca-4874-9134-d619ef813950</guid><dc:creator>kelichen</dc:creator><description>&lt;p&gt;&lt;span&gt;#define BTN_ID_WAKEUP 0 /**&amp;lt; ID of button used to wake up the application. */&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;#define BTN_ID_WAKEUP_BOND_DELETE 1 /**&amp;lt; ID of button used to wake up the application and delete all bonding information. */&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I have checked the pins in the correct state(Button1),But it still be reset&amp;nbsp;&amp;nbsp;immediately. Why ?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: For nRF52832 SDK 17.0.2 ,How to enter Sleep Mode (Power Off Mode) (Suspend Mode) then press the Button1 for wake up ??</title><link>https://devzone.nordicsemi.com/thread/289906?ContentTypeID=1</link><pubDate>Tue, 19 Jan 2021 03:11:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:51a384cb-aa2a-437e-82f0-b5adcd9ff9a5</guid><dc:creator>kelichen</dc:creator><description>&lt;p&gt;uint32_t bsp_btn_ble_sleep_mode_prepare(void)&lt;br /&gt;{&lt;br /&gt; uint32_t err_code;&lt;/p&gt;
&lt;p&gt;err_code = bsp_wakeup_button_enable(BTN_ID_WAKEUP);&lt;br /&gt; RETURN_ON_ERROR_NOT_NOT_SUPPORTED(err_code);&lt;/p&gt;
&lt;p&gt;err_code = bsp_wakeup_button_enable(BTN_ID_WAKEUP_BOND_DELETE);&lt;br /&gt; RETURN_ON_ERROR_NOT_NOT_SUPPORTED(err_code);&lt;/p&gt;
&lt;p&gt;return NRF_SUCCESS;&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;----------------------------------------------------------------------------------------------------------------&lt;/p&gt;
&lt;p&gt;#define BTN_ID_WAKEUP 0 /**&amp;lt; ID of button used to wake up the application. */&lt;br /&gt;#define BTN_ID_SLEEP 0 /**&amp;lt; ID of button used to put the application into sleep mode. */&lt;br /&gt;#define BTN_ID_DISCONNECT 0 /**&amp;lt; ID of button used to gracefully terminate a connection on long press. */&lt;br /&gt;#define BTN_ID_WAKEUP_BOND_DELETE 1 /**&amp;lt; ID of button used to wake up the application and delete all bonding information. */&lt;br /&gt;#define BTN_ID_WHITELIST_OFF 1 /**&amp;lt; ID of button used to turn off usage of the whitelist. */&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: For nRF52832 SDK 17.0.2 ,How to enter Sleep Mode (Power Off Mode) (Suspend Mode) then press the Button1 for wake up ??</title><link>https://devzone.nordicsemi.com/thread/289489?ContentTypeID=1</link><pubDate>Fri, 15 Jan 2021 15:37:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:046d1054-6431-4849-9db1-ed35eb858861</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Both nrf_gpio_cfg_sense_input and&amp;nbsp;&lt;span&gt;bsp_btn_ble_sleep_mode_prepare should work if configured correctly.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;What have you defined&amp;nbsp;BTN_ID_WAKEUP and BTN_ID_WAKEUP_BOND_DELETE to? Are these pins connected to buttons, and are the pins in the correct state? If any of the pins configured as wakeup pins are pulled in the wrong state or left floating, an immediate reset would be expected.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;uint32_t bsp_btn_ble_sleep_mode_prepare(void)
{
    uint32_t err_code;

    err_code = bsp_wakeup_button_enable(BTN_ID_WAKEUP);
    RETURN_ON_ERROR_NOT_NOT_SUPPORTED(err_code);

    err_code = bsp_wakeup_button_enable(BTN_ID_WAKEUP_BOND_DELETE);
    RETURN_ON_ERROR_NOT_NOT_SUPPORTED(err_code);

    return NRF_SUCCESS;
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;By default, these are defined to 0 and 1, and will use the BUTTON_0/BUTTON_1 configs from your board header file (pca10040.h, etc.).&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: For nRF52832 SDK 17.0.2 ,How to enter Sleep Mode (Power Off Mode) (Suspend Mode) then press the Button1 for wake up ??</title><link>https://devzone.nordicsemi.com/thread/289329?ContentTypeID=1</link><pubDate>Fri, 15 Jan 2021 06:11:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:212a42bf-cb8e-4a8f-9e24-345ae93d9909</guid><dc:creator>kelichen</dc:creator><description>&lt;p&gt;Now I use following sleep_mode_enter() w&lt;span&gt;ill be&amp;nbsp;reset immediately ,can not enter sleep mode to wait&amp;nbsp;button1 for wake up.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;static void sleep_mode_enter(void)&lt;br /&gt;{&lt;/p&gt;
&lt;p&gt;&amp;nbsp;ret_code_t err_code;&lt;br /&gt; nrf_drv_twi_uninit(&amp;amp;m_twi); //keli&lt;br /&gt; &lt;br /&gt; nrf_gpio_cfg_sense_input(BUTTON1_GPIO_PIN,NRF_GPIO_PIN_PULLUP,NRF_GPIO_PIN_SENSE_LOW);&lt;br /&gt; //nrf_gpio_cfg_sense_input(BUTTON2_GPIO_PIN,NRF_GPIO_PIN_PULLUP,NRF_GPIO_PIN_SENSE_LOW);&lt;br /&gt; //nrf_gpio_cfg_sense_input(BUTTON3_GPIO_PIN,NRF_GPIO_PIN_PULLUP,NRF_GPIO_PIN_SENSE_LOW);&lt;br /&gt; //nrf_gpio_cfg_sense_input(BUTTON4_GPIO_PIN,NRF_GPIO_PIN_PULLUP,NRF_GPIO_PIN_SENSE_LOW);&lt;br /&gt; &lt;br /&gt; NVIC_DisableIRQ(GPIOTE_IRQn);&lt;br /&gt; NVIC_ClearPendingIRQ(GPIOTE_IRQn);&lt;/p&gt;
&lt;p&gt;err_code = bsp_indication_set(BSP_INDICATE_IDLE);&lt;br /&gt; APP_ERROR_CHECK(err_code);&lt;/p&gt;
&lt;p&gt;// Prepare wakeup buttons.&lt;br /&gt; err_code = bsp_btn_ble_sleep_mode_prepare();&lt;br /&gt; APP_ERROR_CHECK(err_code);&lt;/p&gt;
&lt;p&gt;// Go to system-off mode (this function will not return; wakeup will cause a reset).&lt;br /&gt; err_code = sd_power_system_off();&lt;br /&gt; APP_ERROR_CHECK(err_code);&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>