<?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>nRF5340 Wake from sys_poweroff()</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/122546/nrf5340-wake-from-sys_poweroff</link><description>nrf5340DK 
 NCS 3.0.0 
 
 if I use sample zephyr/samples/boards/nordic/system_off it works fine and i can wake from sw0 press. but if i move the sys_poweroff() call int a button_change() routine like this code. 
 
 
 The Code will go into system OFF and</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 27 Jun 2025 18:59:47 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/122546/nrf5340-wake-from-sys_poweroff" /><item><title>RE: nRF5340 Wake from sys_poweroff()</title><link>https://devzone.nordicsemi.com/thread/540774?ContentTypeID=1</link><pubDate>Fri, 27 Jun 2025 18:59:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e50ac4b5-fedc-4b15-b771-34c154e588bc</guid><dc:creator>WesC</dc:creator><description>&lt;p&gt;well Johnny did solve it.&lt;br /&gt;adding&amp;nbsp;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&amp;amp;&lt;/span&gt;&lt;span&gt;gpio0&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;sense-edge-mask&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &amp;lt;&lt;/span&gt;&lt;span&gt;0x01800000&lt;/span&gt;&lt;span&gt;&amp;gt;; &lt;/span&gt;&lt;span&gt;/* 1&amp;lt;&amp;lt;24 | 1 &amp;lt;&amp;lt;23 */&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;};&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;to the overlay solved the issue&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 Wake from sys_poweroff()</title><link>https://devzone.nordicsemi.com/thread/540711?ContentTypeID=1</link><pubDate>Fri, 27 Jun 2025 12:20:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7919feaf-3471-46ae-9d3a-33de82d15848</guid><dc:creator>WesC</dc:creator><description>&lt;p&gt;I have been working with Johnny.&amp;nbsp; I think his works because of these 2 lines&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;gpio_pin_configure_dt&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;&amp;amp;&lt;/span&gt;&lt;span&gt;sleep&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;GPIO_DISCONNECTED&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;gpio_pin_interrupt_configure_dt&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;&amp;amp;&lt;/span&gt;&lt;span&gt;sleep&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;GPIO_INT_DISABLE&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;that is inside his power_off_handler.&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;But that routine is only called if the button is pressed to go into sys_poweroff.&lt;/div&gt;
&lt;div&gt;but in my code if i go into IDLE prior to a button press, I get 50uA versus 5uA i get when using the DK_buttons_and_led.c Library.&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;I guess i need to understand what is happening in the dk_buttons_and_leds library that is holding the power low versus configuring the GPIO myself.&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 Wake from sys_poweroff()</title><link>https://devzone.nordicsemi.com/thread/540676?ContentTypeID=1</link><pubDate>Fri, 27 Jun 2025 08:52:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f9cf03b3-c6e1-465f-a02f-1631fba76457</guid><dc:creator>JONATHAN LL</dc:creator><description>&lt;p&gt;Pleas have a look at the sample here,&amp;nbsp;&amp;nbsp;&lt;a href="https://github.com/droidecahedron/blinkbuttonsleep/tree/btnsleep_5340"&gt;https://github.com/droidecahedron/blinkbuttonsleep/tree/btnsleep_5340&lt;/a&gt;&amp;nbsp;, Johnny recently updated it.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 Wake from sys_poweroff()</title><link>https://devzone.nordicsemi.com/thread/540634?ContentTypeID=1</link><pubDate>Thu, 26 Jun 2025 19:15:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e5d7bcb4-5472-4283-9f34-9f1b3fabb6cc</guid><dc:creator>WesC</dc:creator><description>&lt;p&gt;To add some more discussion.&amp;nbsp; so if the sys_poweroff() is called in the button_changed routine from the dk_buttons_and _led.c Library it will get called when interrupts are disabled.&lt;/p&gt;
&lt;p&gt;is this why it will not wake from a button press?&lt;br /&gt;&lt;br /&gt;also is this why when we do not use the dk_buttons_and_leds.c library we see a higher IDLE current.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>