<?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>from system on to system off</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/15354/from-system-on-to-system-off</link><description>I am using the nRF5_SDK_11.0.0. 
 I want to state of the system off sleep after entering system on sleep. 
 For example, from the state of system on sleep, it becomes system off sleep after 5 seconds. 
 However, it did not escape from the state of</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 19 Oct 2016 23:12:24 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/15354/from-system-on-to-system-off" /><item><title>RE: from system on to system off</title><link>https://devzone.nordicsemi.com/thread/58672?ContentTypeID=1</link><pubDate>Wed, 19 Oct 2016 23:12:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:49b24835-02d0-4803-ae53-101f269780b8</guid><dc:creator>UBAN</dc:creator><description>&lt;p&gt;Thank you for giving me good advice !&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: from system on to system off</title><link>https://devzone.nordicsemi.com/thread/58669?ContentTypeID=1</link><pubDate>Tue, 18 Oct 2016 08:04:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8264df97-7f97-4e3c-a9c3-819e1d4f5d63</guid><dc:creator>Ole Bauck</dc:creator><description>&lt;p&gt;With the RTC you also need to enable the event:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;NRF_RTC1-&amp;gt;EVTENSET = RTC_EVTENSET_COMPARE1_Enabled &amp;lt;&amp;lt; RTC_EVTENSET_COMPARE1_Pos;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;See &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/rtc.html?cp=2_2_0_24_5#concept_eml_dkj_sr"&gt;this&lt;/a&gt; section in the Product Specification.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: from system on to system off</title><link>https://devzone.nordicsemi.com/thread/58668?ContentTypeID=1</link><pubDate>Tue, 18 Oct 2016 02:46:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e82af14c-9c8c-449b-b05d-ae03b890702f</guid><dc:creator>UBAN</dc:creator><description>&lt;p&gt;I tried to use the RTC. The following is the code.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;void rtc_config1(void)

{

  NRF_RTC1-&amp;gt;TASKS_STOP = 1;	// Stop timer

  NRF_RTC1-&amp;gt;PRESCALER = 4;	// 1us resolution

  NRF_RTC1-&amp;gt;TASKS_CLEAR = 1; // Clear timer

  NRF_RTC1-&amp;gt;CC[1] = TRIGGER_INTERVAL1 * 5000; 

  NRF_RTC1-&amp;gt;INTENSET = RTC_INTENSET_COMPARE1_Enabled &amp;lt;&amp;lt; RTC_INTENSET_COMPARE1_Pos; 

  //attachInterrupt(RTC1_IRQn, RTC1_Interrupt);    // also used in variant.cpp to configure the RTC1 

  NVIC_EnableIRQ(RTC1_IRQn);

NRF_RTC1-&amp;gt;TASKS_START = 1;	// Start TIMER

}

void RTC1_IRQHandler(void)

{

  if (NRF_RTC1-&amp;gt;EVENTS_COMPARE[1] != 0)

  {

NRF_POWER-&amp;gt;SYSTEMOFF = 1;

NRF_RTC1-&amp;gt;EVENTS_COMPARE[1] = 0;
		
  }

}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;However, interruption is not performed. Could you give me some advice?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: from system on to system off</title><link>https://devzone.nordicsemi.com/thread/58671?ContentTypeID=1</link><pubDate>Mon, 17 Oct 2016 09:07:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5e095d65-b607-40e9-9e9f-a05a13b1e6de</guid><dc:creator>Ole Bauck</dc:creator><description>&lt;p&gt;The 300uA you are seeing is because the HFCLK is running while the chip is sleeping. You should use the LFCLK instead (uses about 1uA). This is done by using the RTC peripheral instead of the TIMER peripheral.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: from system on to system off</title><link>https://devzone.nordicsemi.com/thread/58670?ContentTypeID=1</link><pubDate>Mon, 17 Oct 2016 00:51:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8c59ccf0-4121-44af-aee9-468a4d6c98e7</guid><dc:creator>UBAN</dc:creator><description>&lt;p&gt;Thank you for your advice.
I wrote the code to become a state of system off sleep after entering system on sleep.Attach the main.c.
However, the current value of system on sleep is large (0.3mA).
Is main.c wrong ? Please tell me some reason.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: from system on to system off</title><link>https://devzone.nordicsemi.com/thread/58667?ContentTypeID=1</link><pubDate>Wed, 27 Jul 2016 09:46:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2a9625ec-d1a4-48c5-9a92-d76612002008</guid><dc:creator>Ole Bauck</dc:creator><description>&lt;p&gt;&lt;a href="http://infocenter.arm.com/help/topic/com.arm.doc.dui0489f/CIHEGBBF.html#id4692451"&gt;__WFE()&lt;/a&gt; will put the system to sleep (system on sleep) until an interrupt happens. Also see &lt;a href="https://devzone.nordicsemi.com/question/1555/how-do-you-put-the-nrf51822-chip-to-sleep/?answer=1589#post-id-1589"&gt;this&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;You should start a timer which will interrupt your code after 5 seconds and the go to sleep with  &lt;code&gt;__SEV();__WFE(); __WFE();&lt;/code&gt;. When the interrupt happens you can go to system off sleep.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>