<?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>Problem with emulated System OFF mode with NRF52</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/17016/problem-with-emulated-system-off-mode-with-nrf52</link><description>Hi all 
 I have two questions/problems regarding the emulated System OFF mode with the NRF52832 and the SoftDevice S132 V2.0.1: 
 
 According to this thread , an infinite loop should be placed after the function call sd_power_system_off() when debugging</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 17 Oct 2016 07:59:43 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/17016/problem-with-emulated-system-off-mode-with-nrf52" /><item><title>RE: Problem with emulated System OFF mode with NRF52</title><link>https://devzone.nordicsemi.com/thread/65295?ContentTypeID=1</link><pubDate>Mon, 17 Oct 2016 07:59:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:61dd7c3b-3fd0-440b-86f5-84d9c4296659</guid><dc:creator>Remo</dc:creator><description>&lt;p&gt;Thank you very much for this detailed explanation!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with emulated System OFF mode with NRF52</title><link>https://devzone.nordicsemi.com/thread/65294?ContentTypeID=1</link><pubDate>Fri, 14 Oct 2016 12:05:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7fe58581-0229-449c-83b8-122614ad1e03</guid><dc:creator>Ole Bauck</dc:creator><description>&lt;p&gt;According to nRF51 and nRF52 specification when entering emulated system off it is recommended to add an infinite loop directly after entering System OFF. Problem here is that &lt;code&gt;sd_power_system_off()&lt;/code&gt; will execute instructions after entering emulated system off (including returning to the application) before the application code is run. &lt;strong&gt;On nRF51 this leads to a hardfault.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;You can check this by stopping code execution in the debugger after calling &lt;code&gt;sd_power_system_off()&lt;/code&gt;. The ISR number (xPSR-&amp;gt;ISR in the registers panel) will be 3, which is the HardFault_IRQn (see nrf51.h, you have to subtract 16 from the ISR number as this starts at 1 and the enum starts at -15).&lt;/p&gt;
&lt;p&gt;On the nRF52 it does not hardfault and the function returns, which is why it seems that the two chips are acting different to emulated system off.&lt;/p&gt;
&lt;p&gt;I will report this internally and see if we can change the &lt;code&gt;sd_power_system_off()&lt;/code&gt; function.&lt;/p&gt;
&lt;p&gt;For your other question this is a bug with the nRF52 and is found in the &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.Rev1.errata/anomaly_832_81.html?cp=2_2_1_0_1_20"&gt;errata&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;GPIO: PIN_CNF is not retained when in
debug interface mode&lt;/p&gt;
&lt;p&gt;...&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Symptoms&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;GPIO pin configuration is reset on wakeup from System OFF.&lt;/p&gt;
&lt;/blockquote&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>