<?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>NRF9160 while (L)DETECT is high will *not* cause an immediate wakeup when entering System OFF</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/104388/nrf9160-while-l-detect-is-high-will-not-cause-an-immediate-wakeup-when-entering-system-off</link><description>Dear Sir/Madam, 
 During debugging we noticed that the following sentence from the NRF9160 documentation does not hold: 
 &amp;gt; Setting the system to System OFF while DETECT is high will cause a wakeup from System OFF reset. 
 Instead the system will remain</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 05 Oct 2023 12:50:00 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/104388/nrf9160-while-l-detect-is-high-will-not-cause-an-immediate-wakeup-when-entering-system-off" /><item><title>RE: NRF9160 while (L)DETECT is high will *not* cause an immediate wakeup when entering System OFF</title><link>https://devzone.nordicsemi.com/thread/449009?ContentTypeID=1</link><pubDate>Thu, 05 Oct 2023 12:50:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dd39007a-57ae-4a7b-8c9a-4d7f964cdf61</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user=""]&lt;p&gt;During debugging we noticed that the following sentence from the NRF9160 documentation does not hold:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&amp;gt; Setting the system to System OFF while DETECT is high will cause a wakeup from System OFF reset.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;[/quote]
&lt;p&gt;Running the zephyr/samples/boards/nrf/system_off sample, I saw the same behavior as you, which contradicts the above statement in the PS.&lt;/p&gt;
&lt;p&gt;However, I dug a bit deeper into what was happening behind the scenes, and CONFIG_GPIO=y enables this IRQ handler:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/v3.3.99-ncs1-1/drivers/gpio/gpio_nrfx.c#L379"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/v3.3.99-ncs1-1/drivers/gpio/gpio_nrfx.c#L379&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Which effectively clears the EVENTS_PORT each time the DETECT signal is active.&lt;/p&gt;
&lt;p&gt;Disabling GPIO will make the behavior equal to what is described in the PS:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_GPIO=n&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you try this and see if you see the same behavior?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;For your convenience:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/system_5F00_off_5F00_detect_5F00_active.zip"&gt;devzone.nordicsemi.com/.../system_5F00_off_5F00_detect_5F00_active.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>