<?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>Some event prevent the uC to enter low power mode</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/42165/some-event-prevent-the-uc-to-enter-low-power-mode</link><description>Hi, 
 After configure IO and RTC I tried to enter into low power mode however the current consumption doesn&amp;#39;t decrease until I call again __SEV (); / __WFE (); / __WFE (); on CIO::buttonInterruptHandler per example. 
 In the code block below you can see</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 09 Jan 2019 08:38:37 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/42165/some-event-prevent-the-uc-to-enter-low-power-mode" /><item><title>RE: Some event prevent the uC to enter low power mode</title><link>https://devzone.nordicsemi.com/thread/164632?ContentTypeID=1</link><pubDate>Wed, 09 Jan 2019 08:38:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1829978e-4807-4eec-ab3a-aa46b963e235</guid><dc:creator>Jose Xavier</dc:creator><description>&lt;p&gt;&amp;quot;H&lt;span style="font-family:inherit;"&gt;owever, if it is required (for testing or for other purposes) to demonstrate a guaranteed period of sleep caused by WFE - and assuming that the processor does implement WFE sleep behavior - the following approach can be used.&lt;/span&gt;&lt;/p&gt;
&lt;p style="font-weight:400;"&gt;If you are not executing any instructions which can cause exceptions (eg. LDR/STR, SVC) and you do not have any asynchronous sources of exceptions active (NMI, INTISR, SysTick) and you do not have a debugger attached which could issue a debug HALT, then there is nothing to cause the event register to become set unexpectedly.&lt;/p&gt;
&lt;p style="font-weight:400;"&gt;In this scenario, you can use the sequence:&lt;/p&gt;
&lt;p&gt;SEV WFE WFE&lt;/p&gt;
&lt;p style="font-weight:400;"&gt;The SEV will set the event register, causing the first WFE to complete execution immediately. The second WFE will then be executed with the event register cleared, and in the absence of any of the other possible mechanisms for setting the event register, this will put the processor to sleep until the RXEV input goes HIGH.&amp;quot;&lt;/p&gt;
&lt;p style="font-weight:400;"&gt;In the bottom of the page it says that is possible to make it sleep with the above sequence.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Some event prevent the uC to enter low power mode</title><link>https://devzone.nordicsemi.com/thread/164630?ContentTypeID=1</link><pubDate>Wed, 09 Jan 2019 08:29:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e554cf6c-c473-4871-b667-9028099ae065</guid><dc:creator>Jose Xavier</dc:creator><description>&lt;p&gt;I want it to sleep on some specific states.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Some event prevent the uC to enter low power mode</title><link>https://devzone.nordicsemi.com/thread/164619?ContentTypeID=1</link><pubDate>Wed, 09 Jan 2019 07:50:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:27533737-1b94-4a3a-ad5d-360372543733</guid><dc:creator>Stian R&amp;#248;ed Hafskjold</dc:creator><description>&lt;p&gt;&lt;a href="http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.faqs/ka15506.html"&gt;http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.faqs/ka15506.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&amp;quot;Typically, sleep will take place when the processor loops around and re-executes the WFE instruction. The processor may wake up for spurious reasons from this spinlock sleep before the spinlock condition is eventually satisfied, but placing the WFE in the loop allows the processor to return to the sleeping condition repeatedly until the condition is met.&amp;quot;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Some event prevent the uC to enter low power mode</title><link>https://devzone.nordicsemi.com/thread/164617?ContentTypeID=1</link><pubDate>Wed, 09 Jan 2019 07:46:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:32a80da0-c1af-4248-add5-320408e6aa29</guid><dc:creator>Stian R&amp;#248;ed Hafskjold</dc:creator><description>&lt;p&gt;Sorry I don&amp;#39;t know what you are trying to accomplish, but normal programming practice is to put WFE in your main loop. Then the CPU will wake up to whatever event causing an interrupt, act upon it if there&amp;#39;s a handler for the interrupt, and then go back to idle state. And repeat infinitely.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Some event prevent the uC to enter low power mode</title><link>https://devzone.nordicsemi.com/thread/164369?ContentTypeID=1</link><pubDate>Mon, 07 Jan 2019 17:48:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:53162418-d149-43e6-b7a3-0395297dda24</guid><dc:creator>Jose Xavier</dc:creator><description>&lt;p&gt;why?&lt;/p&gt;
&lt;p&gt;If I put 4 WFE on the code above it works.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Some event prevent the uC to enter low power mode</title><link>https://devzone.nordicsemi.com/thread/164234?ContentTypeID=1</link><pubDate>Mon, 07 Jan 2019 12:15:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6ba20079-0d8a-491c-870d-cf0716d4801f</guid><dc:creator>Stian R&amp;#248;ed Hafskjold</dc:creator><description>&lt;p&gt;You must put the WFE call in the main loop&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>