<?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>can&amp;#39;t go into ship mode outside of an event handler</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/125960/can-t-go-into-ship-mode-outside-of-an-event-handler</link><description>Using code from the npm13xx_one_button sample, going into ship mode from event_callback ( const struct device * dev , struct gpio_callback * cb , uint32_t pins ) works fine on a button release with the following function call: 
 
 regulator_parent_ship_mode</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 05 Dec 2025 04:50:05 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/125960/can-t-go-into-ship-mode-outside-of-an-event-handler" /><item><title>RE: can't go into ship mode outside of an event handler</title><link>https://devzone.nordicsemi.com/thread/556295?ContentTypeID=1</link><pubDate>Fri, 05 Dec 2025 04:50:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:56ef2d5c-2d2d-440e-aa4d-9ac3d7183296</guid><dc:creator>Priyanka</dc:creator><description>&lt;p&gt;That&amp;#39;s great.&lt;/p&gt;
[quote user=""]I suspect that it&amp;#39;s because the parent is only &amp;#39;known&amp;#39; inside the handler.&amp;nbsp;[/quote]
&lt;p&gt;This is not the case.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Since the SHPHLD button is also used to wake up the device, we guess what you are experiencing is that the regulator_parent_ship_mode call succeeds, but the device immediately wakes up since the button remains pressed (wakeup is level-triggered).&lt;br /&gt;If you want a power off button-like behaviour, you could utilize one of the GPIOs to do that if available. One could get fall/rise events on any GPIO too.&lt;/p&gt;
&lt;p&gt;-Priyanka&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: can't go into ship mode outside of an event handler</title><link>https://devzone.nordicsemi.com/thread/556261?ContentTypeID=1</link><pubDate>Thu, 04 Dec 2025 15:08:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:80349224-05fe-4004-ba4a-c7a513e0fdaa</guid><dc:creator>kruenheck</dc:creator><description>&lt;p&gt;Thank you, but I discovered a different way to do this.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: can't go into ship mode outside of an event handler</title><link>https://devzone.nordicsemi.com/thread/556198?ContentTypeID=1</link><pubDate>Thu, 04 Dec 2025 03:22:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9e12ad90-1dca-45cc-b4df-d149006bbee8</guid><dc:creator>Priyanka</dc:creator><description>&lt;p&gt;Hi Keith,&lt;/p&gt;
&lt;p&gt;Checking this internally with experts and will get back to you.&lt;/p&gt;
&lt;p&gt;-Priyanka&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>