<?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>How to make the nrf52840 in sleep-mode &amp;amp; wake-up after every &amp;#39;n&amp;#39; seconds using software interrupt(from internal RTC/timer library)?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/43665/how-to-make-the-nrf52840-in-sleep-mode-wake-up-after-every-n-seconds-using-software-interrupt-from-internal-rtc-timer-library</link><description>Consider, I have checked these threads: https://devzone.nordicsemi.com/f/nordic-q-a/38832/system-on-sleep-mode &amp;amp; https://devzone.nordicsemi.com/f/nordic-q-a/30351/how-to-control-specific-time-nrf52832-sleep-mode-system-off-mode 
 Trying to do auto-wake</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 25 Feb 2019 14:06:47 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/43665/how-to-make-the-nrf52840-in-sleep-mode-wake-up-after-every-n-seconds-using-software-interrupt-from-internal-rtc-timer-library" /><item><title>RE: How to make the nrf52840 in sleep-mode &amp; wake-up after every 'n' seconds using software interrupt(from internal RTC/timer library)?</title><link>https://devzone.nordicsemi.com/thread/172807?ContentTypeID=1</link><pubDate>Mon, 25 Feb 2019 14:06:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c9e4271f-b35f-41d0-8f1b-74ed39364a49</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Please note that RTC1 is used by the app_timer, so if you are not using the app_timer to generate the 15 min&amp;nbsp;interrupt, but instead interfacing directly with the RTC1, then you should use RTC2 for the 15min interrupt instead.&lt;/p&gt;
&lt;p&gt;You don&amp;rsquo;t need to disable the SoftDevice, just make sure that you disable all active BLE links, and that you turn off any advertising or scanning that is enabled. To minimize the power consumption, you should also turn off the logging(i.e. set NRF_LOG_ENABLED to 0).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to make the nrf52840 in sleep-mode &amp; wake-up after every 'n' seconds using software interrupt(from internal RTC/timer library)?</title><link>https://devzone.nordicsemi.com/thread/171547?ContentTypeID=1</link><pubDate>Mon, 18 Feb 2019 07:42:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c0acfb64-9b1b-4fac-a634-92efada8ef28</guid><dc:creator>Vishal Aditya</dc:creator><description>&lt;p&gt;Hi &lt;a href="https://devzone.nordicsemi.com/members/sigurdon"&gt;Sigurd&lt;/a&gt; &amp;nbsp;Thanks for your response!&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;div class="pre"&gt;&lt;span&gt;Further, I also tried the below sequence:&lt;/span&gt;&lt;/div&gt;
&lt;ol&gt;
&lt;li class="pre"&gt;&lt;span&gt;Create a TIMER &amp;amp; tick every 15mins which gives INTERRUPT.&lt;/span&gt;&lt;/li&gt;
&lt;li class="pre"&gt;&lt;span&gt;Turn OFF all the peripherals.&lt;/span&gt;&lt;/li&gt;
&lt;li class="pre"&gt;&lt;span&gt;sd_app_evt_wait(); this holds the nrf &amp;amp; power&amp;nbsp;&lt;/span&gt;consumption but BLE/softdevice handlers breaks this.&lt;/li&gt;
&lt;li class="pre"&gt;if&amp;nbsp;ble_stack_init();&amp;nbsp;gap_params_init();gatt_init();services_init();advertising_init();conn_params_init();advertising_start(); is not called then this sequence works properly.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Please guide/suggest us how to turn-off/disable all the interrupt handlers of BLE+softdevice so that nrf can go to sleep/wait, any API?&lt;/strong&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to make the nrf52840 in sleep-mode &amp; wake-up after every 'n' seconds using software interrupt(from internal RTC/timer library)?</title><link>https://devzone.nordicsemi.com/thread/171499?ContentTypeID=1</link><pubDate>Sat, 16 Feb 2019 05:20:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6b9f99bf-fda9-43cd-be32-c2056f7d3c98</guid><dc:creator>gauthamranganathan</dc:creator><description>&lt;p&gt;Hello Sigurd,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I am working with Vishal on implementing the System ON Sleep mode. We are currently using the ble_app_uart example as base and we have added the necessary drivers to it.&lt;/p&gt;
&lt;p&gt;I want my&amp;nbsp; application processes to run once every 15 minutes.&lt;/p&gt;
&lt;p&gt;I proposed that we use the app_timer and have a timer event every 15 minutes, carry out my computations in the timer handler.&lt;/p&gt;
&lt;p&gt;But later I&amp;nbsp; found out the systems wakes up for all events (in this case softdevice events and BLE events).&amp;nbsp;We then decided that we will switch off all peripherals for the entire 15 minute interval as I want to reduce power consumption to the maximum extent.&lt;/p&gt;
&lt;p&gt;So finally, I want to switch off BLE, RTC0 and keep just RTC1 powered on and enter &lt;strong&gt;system on sleep mode&lt;/strong&gt; by using the sev wfi and wfe calls. When RTC 1 throws a timeout event, I will power on ble and schedule all my processes in the event handler.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I am fine with the loss of ble for the 15 minute interval.&lt;/p&gt;
&lt;p&gt;Can you suggest some solution for this? Can I simply disable the softdevice towards the end of my rtc 1 event handler?&lt;/p&gt;
&lt;p&gt;&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: How to make the nrf52840 in sleep-mode &amp; wake-up after every 'n' seconds using software interrupt(from internal RTC/timer library)?</title><link>https://devzone.nordicsemi.com/thread/171214?ContentTypeID=1</link><pubDate>Thu, 14 Feb 2019 16:30:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c0769ff6-83d0-4534-8b0e-6e8a0522f532</guid><dc:creator>Sigurd</dc:creator><description>[quote userid="69691" url="~/f/nordic-q-a/43665/how-to-make-the-nrf52840-in-sleep-mode-wake-up-after-every-n-seconds-using-software-interrupt-from-internal-rtc-timer-library"]&amp;nbsp;__WFI(); &lt;br /&gt;__SEV();&lt;br /&gt;__WFE();[/quote]
&lt;p&gt;The&amp;nbsp;correct sequence to put the CPU in System ON sleep(idle-mode) is:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;        // Wait for an event.
        __WFE();
        // Clear the internal event register.
        __SEV();
        __WFE();&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;If you are using the SoftDevice, you should use&amp;nbsp;sd_app_evt_wait() instead.&lt;/p&gt;
[quote userid="69691" url="~/f/nordic-q-a/43665/how-to-make-the-nrf52840-in-sleep-mode-wake-up-after-every-n-seconds-using-software-interrupt-from-internal-rtc-timer-library"]Will&amp;nbsp;sd_power_system_off() makes internal RTC OFF?[/quote]
&lt;p&gt;Yes.&amp;nbsp;&lt;span&gt;System OFF is the deepest power saving mode the system can enter. In this mode, the system&amp;rsquo;s core functionality is powered down and all ongoing tasks are terminated.&lt;/span&gt;&lt;/p&gt;
[quote userid="69691" url="~/f/nordic-q-a/43665/how-to-make-the-nrf52840-in-sleep-mode-wake-up-after-every-n-seconds-using-software-interrupt-from-internal-rtc-timer-library"]Any code snippet for&amp;nbsp;System On sleep mode &amp;amp; wake-up?[/quote]
&lt;p&gt;Any&amp;nbsp;interrupts that happens when the CPU is in System ON sleep will wake the CPU up, and the CPU will&amp;nbsp;process the&amp;nbsp;interrupt.&lt;/p&gt;
[quote userid="69691" url="~/f/nordic-q-a/43665/how-to-make-the-nrf52840-in-sleep-mode-wake-up-after-every-n-seconds-using-software-interrupt-from-internal-rtc-timer-library"]Is it possible to wake-up the NRF52840 using Software Interrupt?[/quote]
&lt;p&gt;From System ON sleep, yes. But not in System OFF sleep. When in System OFF mode, the device can be woken up through one of the following signals:&lt;/p&gt;
&lt;ol class="ol" id="unique_1707892264__ol_wxm_lrs_2q"&gt;
&lt;li class="li"&gt;The DETECT signal, optionally generated by the GPIO peripheral&lt;/li&gt;
&lt;li class="li"&gt;The ANADETECT signal, optionally generated by the LPCOMP module&lt;/li&gt;
&lt;li class="li"&gt;The SENSE signal, optionally generated by the NFC module to &amp;ldquo;wake-on-field&amp;rdquo;&lt;/li&gt;
&lt;li class="li"&gt;A reset&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>