<?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 implement Sleep Mode on &amp;quot;NRF52832&amp;quot; using RTC</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/72100/how-to-implement-sleep-mode-on-nrf52832-using-rtc</link><description>Hi 
 I need your help to implement the RTC sleep mode on my nrf52 device. In my project, I have already using nrf_calendar.h 
 Thank you</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 01 Mar 2021 11:04:42 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/72100/how-to-implement-sleep-mode-on-nrf52832-using-rtc" /><item><title>RE: How to implement Sleep Mode on "NRF52832" using RTC</title><link>https://devzone.nordicsemi.com/thread/296811?ContentTypeID=1</link><pubDate>Mon, 01 Mar 2021 11:04:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:480e2041-26e4-4203-acfd-3465f5fb0857</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello &lt;a href="https://devzone.nordicsemi.com/members/mr.nck"&gt;Mr.NCK&lt;/a&gt;,&lt;/p&gt;
&lt;p&gt;You can&amp;#39;t enter system off sleep while any of the clocks are running. So the best you can do is to use system on mode. By having the&amp;nbsp;idle_state_handle() (or equivalent, depengin on whether or not you are using the softdevice) in your main loop, your nRF will go to sleep whenever it is done with the interrupts.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I am not sure whether you wanted me to answer anything in your latest posts. If so, please specify what your questions were.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to implement Sleep Mode on "NRF52832" using RTC</title><link>https://devzone.nordicsemi.com/thread/296735?ContentTypeID=1</link><pubDate>Mon, 01 Mar 2021 06:29:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d9ea803e-138a-43a1-a383-8fe9ce1ed888</guid><dc:creator>Mr.NCK</dc:creator><description>&lt;p&gt;And, I have combined the below example with my code&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_nrf5_v17.0.0%2Frtc_example.html&amp;amp;cp=7_1_4_6_34"&gt;infocenter.nordicsemi.com/index.jsp&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to implement Sleep Mode on "NRF52832" using RTC</title><link>https://devzone.nordicsemi.com/thread/296730?ContentTypeID=1</link><pubDate>Mon, 01 Mar 2021 06:07:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e663e7d1-0a25-4188-b2bf-22aff6db9035</guid><dc:creator>Mr.NCK</dc:creator><description>&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/requirement.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Hi Edvin,&lt;/p&gt;
&lt;p&gt;I have used the calendar module for time sync with milliseconds. So, According to our requirements, I can&amp;#39;t able to disable that module. For sleep time I try to implement as flow in the image.&lt;/p&gt;
&lt;p&gt;Thank you,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to implement Sleep Mode on "NRF52832" using RTC</title><link>https://devzone.nordicsemi.com/thread/296600?ContentTypeID=1</link><pubDate>Fri, 26 Feb 2021 14:57:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2cd3ab34-ddad-4685-88db-98f4d359fa25</guid><dc:creator>Edvin</dc:creator><description>[quote user="Mr.NCK"]That&amp;#39;s, why I have chosen system off sleep mode, using RTC[/quote]
&lt;p&gt;&amp;nbsp;That is not possible. You can&amp;#39;t have any timers running in system off sleep. Only pin interrupts can wake the nRF from system off (or NFC). So system on is your only choice. If you don&amp;#39;t want the periodic wakeups from the calendar module you need to disable it, or alternatively change it to less frequent interrupts (since this is what is used to keep track of time, you might not want to disable it).&lt;/p&gt;
&lt;p&gt;For system off, please check the &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/power.html?cp=4_2_0_17_1#unique_1707892264"&gt;documentation&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&amp;quot;&lt;span&gt;System OFF is the deepest power saving mode the system can enter. In this mode, the system’s core functionality is powered down and all ongoing tasks are terminated.&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;meaning no clocks will run.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to implement Sleep Mode on "NRF52832" using RTC</title><link>https://devzone.nordicsemi.com/thread/296520?ContentTypeID=1</link><pubDate>Fri, 26 Feb 2021 12:01:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:21db4578-32f5-49fa-b2ff-ec4bcd18a2a1</guid><dc:creator>Mr.NCK</dc:creator><description>&lt;p&gt;Thank you for your reply Edvin,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I have already tried the above things. But, I need to implement the sleep mode for a specific time(That sleep time can be configured at any time by the user). That also be in power management mode. That&amp;#39;s, why I have chosen system off sleep mode, using RTC&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to implement Sleep Mode on "NRF52832" using RTC</title><link>https://devzone.nordicsemi.com/thread/296505?ContentTypeID=1</link><pubDate>Fri, 26 Feb 2021 11:35:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:89e1c21c-8e77-4f3a-8135-dd5aff39b726</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Look at how most of our examples found in SDK\examples\ble_peripheral uses:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;int main(void)
{
    ...
    for (;;)
    {
        idle_state_handle()
    }
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The idle_state_handle() puts the device in sleep until an event wakes it up. In order to wake on RTC, you just need to set up an RTC timer with an interrupt. If I am not mistaken, the nrf_calendar example that you found on github (not an official and maintained example, but written by someone from Nordic, and put it out because it may be useful for someone, like yourself) already has set up this timer, and triggers the interrupts.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Is that what you were looking for? If not, please specify what you are missing.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>