<?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>System off mode returning instantly.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/18923/system-off-mode-returning-instantly</link><description>Hi, 
 I know this question must get asked enough, but i am at my wits end and have not managed to find a solution for this yet. 
 calling sd_power_system_off returns NRF_INVALID_STATE and causes a reset. I have read that this can be due to the configured</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 16 Jan 2017 11:15:37 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/18923/system-off-mode-returning-instantly" /><item><title>RE: System off mode returning instantly.</title><link>https://devzone.nordicsemi.com/thread/73128?ContentTypeID=1</link><pubDate>Mon, 16 Jan 2017 11:15:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:70168988-2c15-4201-a652-78479c8a40f6</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;You have to find the condition where it falls into the reset loop trap. Use breakpoints and see the call stack. You will probably find this as an APP_ERROR_CHECK failure which causes default eror handling to be resetting your device.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: System off mode returning instantly.</title><link>https://devzone.nordicsemi.com/thread/73127?ContentTypeID=1</link><pubDate>Thu, 12 Jan 2017 18:53:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c0864edd-3b25-4331-aef1-5f40309a67d5</guid><dc:creator>billt79</dc:creator><description>&lt;p&gt;the error number was 8, but thinking about it, that could have come from another function, as it was the last log printed before it started resetting.&lt;/p&gt;
&lt;p&gt;I do power cycle the devices after programming so the issue lies elsewhere. I was able to get the nRF to go to deep sleep, by performing a soft reset and then going making it go to sleep instantly. I was not able to get a flag stored across the restart via the ram to work though, following an example. Might have to do with my startup files.&lt;/p&gt;
&lt;p&gt;Instead of the flag, i decided to make it initialise its bit bash I2C/TWI driver and read the power status, and then set up of a wakeup pin. it just reads this status then goes to sleep if the condition is right. however it still continues to go into a reset loop.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: System off mode returning instantly.</title><link>https://devzone.nordicsemi.com/thread/73126?ContentTypeID=1</link><pubDate>Thu, 12 Jan 2017 08:13:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a976c4fa-df45-4fd8-85ca-a680a35f4504</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;What error number did you get? NRF_ERROR_INVALID_STATE? I do not think that error is possible with the call sd_power_system_off();&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: System off mode returning instantly.</title><link>https://devzone.nordicsemi.com/thread/73125?ContentTypeID=1</link><pubDate>Wed, 11 Jan 2017 18:43:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:01b9074d-945e-40d0-9941-5ae6ee74bccc</guid><dc:creator>Daniel Wang</dc:creator><description>&lt;p&gt;Are you in debug mode? See this : &lt;a href="https://devzone.nordicsemi.com/question/105168/nrf52-does-not-enter-system-off/"&gt;devzone.nordicsemi.com/.../&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You should also power-cycle the device after you flash the device.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>