<?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>sleep mode</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/77813/sleep-mode</link><description>hi 
 i am working on nrf52dk. i am facing a issue to put &amp;quot;system on sleep&amp;quot; mode in &amp;quot;ble_app_uart&amp;quot; example. &amp;quot;ble app_uart&amp;quot; is going to &amp;quot;system off sleep&amp;quot;</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 26 Jul 2021 13:55:51 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/77813/sleep-mode" /><item><title>RE: sleep mode</title><link>https://devzone.nordicsemi.com/thread/321859?ContentTypeID=1</link><pubDate>Mon, 26 Jul 2021 13:55:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d8e72b9a-e23a-4492-a3c3-40de93b828b1</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
&lt;p&gt;To wake on RTC you need to use system ON mode. Then you need to call &lt;em&gt;sd_app_evt_wait()&lt;/em&gt; instead of &lt;em&gt;sd_power_system_off()&lt;/em&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sleep mode</title><link>https://devzone.nordicsemi.com/thread/321681?ContentTypeID=1</link><pubDate>Mon, 26 Jul 2021 04:35:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0614e3ae-9cf6-4e4f-b08a-a6eb72c29d24</guid><dc:creator>harrys</dc:creator><description>&lt;p&gt;hi,&lt;/p&gt;
&lt;p&gt;there is a function &amp;quot;sleep_mode_enter&amp;quot; in main.c&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:#ffff00;"&gt;static void sleep_mode_enter(void)&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color:#ffff00;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color:#ffff00;"&gt; uint32_t err_code = bsp_indication_set(BSP_INDICATE_IDLE);&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color:#ffff00;"&gt; APP_ERROR_CHECK(err_code);&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:#ffff00;"&gt;// Prepare wakeup buttons.&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color:#ffff00;"&gt; err_code = bsp_btn_ble_sleep_mode_prepare();&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color:#ffff00;"&gt; APP_ERROR_CHECK(err_code);&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:#ffff00;"&gt;// Go to system-off mode (this function will not return; wakeup will cause a reset).&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color:#ffff00;"&gt; err_code = sd_power_system_off();&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color:#ffff00;"&gt; APP_ERROR_CHECK(err_code);&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color:#ffff00;"&gt;}&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:#ffff00;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:#ffff00;"&gt;&lt;span style="background-color:#ffffff;"&gt;i think &amp;quot;&lt;span&gt;err_code = sd_power_system_off()&amp;quot; is enabling system off sleep mode.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:#ffff00;"&gt;&lt;span style="background-color:#ffffff;"&gt;&lt;span&gt;if system is going on &amp;quot;system on sleep&amp;quot;&amp;nbsp; . wakeup is prepared with button. i don&amp;#39;t want to wake up with button. i want wake it with rtc. how i can do it&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sleep mode</title><link>https://devzone.nordicsemi.com/thread/321596?ContentTypeID=1</link><pubDate>Fri, 23 Jul 2021 14:21:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:282e703b-b6cd-4fd0-a57d-c69b20530501</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Most of the examples in the SDK, including ble_app_uart, are designed to go into system ON sleep every time there&amp;nbsp;are no interrupts or events to process in the application.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Unfortunately none of the sleep functions are named &amp;quot;system_on&amp;quot;, so this is a bit difficult to know ;)&lt;/p&gt;
&lt;p&gt;In the ble_app_uart example you can see that the &lt;em&gt;for(;;)&lt;/em&gt; loop in main repeatedly calls &lt;em&gt;idle_state_handle()&lt;/em&gt;, which in turn calls &lt;em&gt;nrf_pwm_mgmt_run()&lt;/em&gt;, which ends up calling a function named &lt;em&gt;sd_app_evt_wait()&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;This function will put the device in system ON sleep mode as soon as the SoftDevice is finished with any internal processing it needs to do.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Then the CPU will remain in system ON sleep until some event in the system wakes it up again (such as a timer or radio event).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>