<?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>using Shutoff Mode at initial level</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/77579/using-shutoff-mode-at-initial-level</link><description>We are working on application which need below implementation. 
 1.) At starting the device should be in shutoff mode, and on button press it should be awaken and start advertising for 180 seconds 
 2.) If connection established the device never go again</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 22 Jul 2021 13:26:51 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/77579/using-shutoff-mode-at-initial-level" /><item><title>RE: using Shutoff Mode at initial level</title><link>https://devzone.nordicsemi.com/thread/321373?ContentTypeID=1</link><pubDate>Thu, 22 Jul 2021 13:26:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7a9d1a77-3e27-4430-b332-2d06b8fd6530</guid><dc:creator>JONATHAN LL</dc:creator><description>&lt;div&gt;If the SD is enabled then you have to use&amp;nbsp;&lt;a title="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v7.3.0/group___n_r_f___s_o_c___f_u_n_c_t_i_o_n_s.html?cp=4_7_3_1_2_7_2_16#ga62737e6515d380aa3eeba6582d061592" href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v7.3.0/group___n_r_f___s_o_c___f_u_n_c_t_i_o_n_s.html?cp=4_7_3_1_2_7_2_16#ga62737e6515d380aa3eeba6582d061592" rel="noopener noreferrer" target="_blank"&gt;sd_power_gpregret_set&lt;/a&gt;&amp;nbsp;to sett the register, ore else you will get a illegal memory access assert when you try tro write to NRF_POWER register.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;And if DFU/Bootloader is in use then it that might also use/clear parts of the&amp;nbsp;&lt;span&gt;GPREGRET register.&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;Jonathan&lt;/span&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: using Shutoff Mode at initial level</title><link>https://devzone.nordicsemi.com/thread/321096?ContentTypeID=1</link><pubDate>Wed, 21 Jul 2021 11:12:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:28a07a0b-8a49-40dd-9b65-129b9e4c9bf0</guid><dc:creator>vinaysingh</dc:creator><description>&lt;p&gt;Hi Jonathan,&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;What SDK and soft device are you using ?&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;:- nRF SDK 17.02, and soft device pca10040/s132&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Please understand&amp;nbsp;&lt;span style="text-decoration:underline;"&gt;My Use-Case&lt;/span&gt; :-&lt;/p&gt;
&lt;p&gt;1.) when board is powered on, it should be in shutoff mode.&lt;/p&gt;
&lt;p&gt;2.) When we press wakeup button it should come out of shutoff mode and then advertise .&lt;/p&gt;
&lt;p&gt;But in most of the examples it is like, it will advertise and when become idle then it enters shutoff mode.&lt;/p&gt;
&lt;p&gt;Observation :-&lt;/p&gt;
&lt;p&gt;As we know after coming out of shutoff mode, the system resets, so even if i put sleep_mode_enter() api, in main function it will always go into shutoff mode.&lt;/p&gt;
&lt;p&gt;I tried retained register &amp;quot;GPREGRET&amp;quot; , but no luck.&lt;/p&gt;
&lt;p&gt;i am getting a fatal error when i am trying to write the GPREGRET register value.&lt;/p&gt;
&lt;p&gt;suggest any method to achieve above use-case !&lt;/p&gt;
&lt;p&gt;Thank You !&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: using Shutoff Mode at initial level</title><link>https://devzone.nordicsemi.com/thread/321057?ContentTypeID=1</link><pubDate>Wed, 21 Jul 2021 09:01:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1d8bd9a8-f273-49e8-849b-2b393f48f270</guid><dc:creator>JONATHAN LL</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;I see the link is a bit out dated, here is the &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/examples_bsp.html?cp=8_1_3_6_0_1#examples_ble_button_functionality"&gt;BSP BLE Button Assignment in SDK 17&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I belive that you could follow the example and see how it is done there. What SDK and soft device are you using ?&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;Jonathan&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: using Shutoff Mode at initial level</title><link>https://devzone.nordicsemi.com/thread/320656?ContentTypeID=1</link><pubDate>Mon, 19 Jul 2021 10:32:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f6c901ee-984e-4ccc-bc56-253f7ba6f696</guid><dc:creator>vinaysingh</dc:creator><description>&lt;p&gt;Hi jonathan, thanks for your reply !&lt;/p&gt;
&lt;p&gt;i have the same use case as mentioned in below link :-&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/52432/beaconing-application---begin-code-with-system-off-press-button-to-wake-up/211131#211131"&gt;(+) Beaconing application - begin code with system off, press button to wake up - Nordic Q&amp;amp;A - Nordic DevZone - Nordic DevZone (nordicsemi.com)&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;But I didn&amp;#39;t find anything useful or any reference to understand and achieve the use-case !&lt;/p&gt;
&lt;p&gt;in the below main function where should i add the sleep mode enter function ?&lt;/p&gt;
&lt;p&gt;&lt;code&gt;static void sleep_mode_enter(void)&lt;/code&gt;&lt;br /&gt;&lt;code&gt;{&lt;/code&gt;&lt;br /&gt;&lt;code&gt; ret_code_t err_code;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;err_code = bsp_indication_set(BSP_INDICATE_IDLE);&lt;/code&gt;&lt;br /&gt;&lt;code&gt; APP_ERROR_CHECK(err_code);&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;// Prepare wakeup buttons.&lt;/code&gt;&lt;br /&gt;&lt;code&gt; err_code = bsp_btn_ble_sleep_mode_prepare();&lt;/code&gt;&lt;br /&gt;&lt;code&gt; APP_ERROR_CHECK(err_code);&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;// Go to system-off mode (this function will not return; wakeup will cause a reset).&lt;/code&gt;&lt;br /&gt;&lt;code&gt; err_code = sd_power_system_off();&lt;/code&gt;&lt;br /&gt;&lt;code&gt; APP_ERROR_CHECK(err_code);&lt;/code&gt;&lt;br /&gt;&lt;code&gt;}&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;int main(void)&lt;/code&gt;&lt;br /&gt;&lt;code&gt;{&lt;/code&gt;&lt;br /&gt;&lt;code&gt; bool erase_bonds;&lt;/code&gt;&lt;br /&gt;&lt;code&gt; ret_code_t err_code;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;// Initialize.&lt;/code&gt;&lt;br /&gt;&lt;code&gt; log_init();&lt;/code&gt;&lt;br /&gt;&lt;code&gt; timers_init();&lt;/code&gt;&lt;br /&gt;&lt;code&gt; buttons_leds_init(&amp;amp;erase_bonds);&lt;/code&gt;&lt;br /&gt;&lt;code&gt; power_management_init();&lt;/code&gt;&lt;br /&gt;&lt;code&gt; ble_stack_init();&lt;/code&gt;&lt;br /&gt;&lt;code&gt; adc_configure();&lt;/code&gt;&lt;br /&gt;&lt;code&gt; gap_params_init();&lt;/code&gt;&lt;br /&gt;&lt;code&gt; gatt_init();&lt;/code&gt;&lt;br /&gt;&lt;code&gt; advertising_init();&lt;/code&gt;&lt;br /&gt;&lt;code&gt; services_init();&lt;/code&gt;&lt;br /&gt;&lt;code&gt; conn_params_init();&lt;/code&gt;&lt;br /&gt;&lt;code&gt; peer_manager_init();&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;// Start execution.&lt;/code&gt;&lt;br /&gt;&lt;code&gt; NRF_LOG_INFO(&amp;quot;Template example started.&amp;quot;);&lt;/code&gt;&lt;br /&gt;&lt;code&gt; application_timers_start();&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;advertising_start(erase_bonds);&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;// Enter main loop.&lt;/code&gt;&lt;br /&gt;&lt;code&gt; for (;;)&lt;/code&gt;&lt;br /&gt;&lt;code&gt; {&lt;/code&gt;&lt;br /&gt;&lt;code&gt; idle_state_handle();&lt;/code&gt;&lt;br /&gt;&lt;code&gt; }&lt;/code&gt;&lt;br /&gt;&lt;code&gt;}&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;1.) Suggest any method to achieve the use case !&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you !&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: using Shutoff Mode at initial level</title><link>https://devzone.nordicsemi.com/thread/320616?ContentTypeID=1</link><pubDate>Mon, 19 Jul 2021 07:54:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4361afbd-2bbc-48ee-939f-eb0d91e903a2</guid><dc:creator>JONATHAN LL</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;Pardon he slow reply, but due to summer holiday there staffing is low and the response time will be slower.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Have you searched on Devzone for similar questions ? Here is a couple of links:&lt;br /&gt;&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/19882/configuration-of-gpio-to-wake-up-from-system-off"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/19882/configuration-of-gpio-to-wake-up-from-system-off&lt;/a&gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/36475/nrf52832-go-system-off-low-power-mode-and-wakeup-by-gpio"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/36475/nrf52832-go-system-off-low-power-mode-and-wakeup-by-gpio&lt;/a&gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/56518/how-to-set-nrf52-dk-into-sleep-mode-system-on-no-ram-retention-wake-on-rtc-running-from-the-lfxo-clock"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/56518/how-to-set-nrf52-dk-into-sleep-mode-system-on-no-ram-retention-wake-on-rtc-running-from-the-lfxo-clock&lt;/a&gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/73507/configuring-gpio-to-enter-gpio-interrupt-handler-on-wake-up-from-system-off-mode"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/73507/configuring-gpio-to-enter-gpio-interrupt-handler-on-wake-up-from-system-off-mode&lt;/a&gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/52432/beaconing-application---begin-code-with-system-off-press-button-to-wake-up/211131#211131"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/52432/beaconing-application---begin-code-with-system-off-press-button-to-wake-up/211131#211131&lt;/a&gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/72377/wake-up-button-behavior-after-long-press-system-off"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/72377/wake-up-button-behavior-after-long-press-system-off&lt;/a&gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Advertising time&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/73352/advertisement-not-started-when-ble_adv_fast_timeout-180s/302650#302650"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/73352/advertisement-not-started-when-ble_adv_fast_timeout-180s/302650#302650&lt;/a&gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;Jonathan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: using Shutoff Mode at initial level</title><link>https://devzone.nordicsemi.com/thread/320601?ContentTypeID=1</link><pubDate>Mon, 19 Jul 2021 05:37:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ada36357-bd70-4db3-b08e-bcbd77d20297</guid><dc:creator>vinaysingh</dc:creator><description>&lt;p&gt;Please answer my query !&lt;/p&gt;
&lt;p&gt;Thanks in advance !&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>