<?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>Help with SHIPHOLD Pressed and Released Events on NPM1300 + STM32L4 + npmx</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/122672/help-with-shiphold-pressed-and-released-events-on-npm1300-stm32l4-npmx</link><description>Hi All, 
 I&amp;#39;m currently working with a custom board using the NPM1300 and STM32L4, alongside the npmx drivers. I&amp;#39;m trying to capture both pressed and released events from the SHIPHOLD button, but I&amp;#39;m running into an issue. 
 If only one of the events</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 04 Jul 2025 12:46:43 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/122672/help-with-shiphold-pressed-and-released-events-on-npm1300-stm32l4-npmx" /><item><title>RE: Help with SHIPHOLD Pressed and Released Events on NPM1300 + STM32L4 + npmx</title><link>https://devzone.nordicsemi.com/thread/541464?ContentTypeID=1</link><pubDate>Fri, 04 Jul 2025 12:46:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a0ec62d6-eb42-4aeb-90d4-83c0dd2e3e06</guid><dc:creator>GT</dc:creator><description>&lt;p&gt;Hi Kennet,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Spot on - everything is working as expected now. Looking back, it was an obvious mistake in hindsight.&lt;/p&gt;
&lt;p&gt;Thank you very much for your support. Have a great weekend!&lt;br /&gt;&lt;br /&gt;Regards,&amp;nbsp;&lt;br /&gt;Georgi&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Help with SHIPHOLD Pressed and Released Events on NPM1300 + STM32L4 + npmx</title><link>https://devzone.nordicsemi.com/thread/541346?ContentTypeID=1</link><pubDate>Thu, 03 Jul 2025 14:31:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2cc8479a-04c6-439b-a0bd-ff3c0ee876e9</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Hi again,&lt;/p&gt;
&lt;p&gt;I got some feedback.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;pmx_core_event_interrupt_enable(&amp;amp;m_pmic, NPMX_EVENT_GROUP_SHIPHOLD,&amp;#160;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; NPMX_EVENT_GROUP_SHIPHOLD_PRESSED_MASK |&amp;#160;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; NPMX_EVENT_GROUP_SHIPHOLD_RELEASED_MASK);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;This is the correct way of enabling the interrupt. Call this function once per event group. The masks should be OR&amp;#39;ed together to enable the interrupts you want within that group.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you call this function multiple times in a row with the same event group, the new event mask will overwrite the old one in the driver state logic, but the driver will not disable this event from being generated by the PMIC. So you can get into situations such as the one described.&amp;nbsp;&lt;/p&gt;
&lt;blockquote&gt;[quote user=""]As I understand it, &lt;em&gt;npmx_core_proc()&lt;/em&gt; should clear all the pending interrupt flags and report back the mask— is that correct?[/quote]&lt;/blockquote&gt;
&lt;p&gt;This is correct. As long as npmx is informed that the interrupt signal pin is asserted via &lt;code&gt;npmx_core_interrupt()&lt;/code&gt;, which seems to be the case in this code.&lt;/p&gt;
&lt;p&gt;Could you try calling &lt;code&gt;npmx_core_interrupt(&amp;amp;m_pmic)&lt;/code&gt; for every iteration of the main loop? This will force npmx to keep checking the event registers.&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Help with SHIPHOLD Pressed and Released Events on NPM1300 + STM32L4 + npmx</title><link>https://devzone.nordicsemi.com/thread/541284?ContentTypeID=1</link><pubDate>Thu, 03 Jul 2025 08:15:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:88e506e7-7a12-4523-9747-498d680fb3b5</guid><dc:creator>GT</dc:creator><description>&lt;p&gt;Hi Kenneth. Thanks for that.&amp;nbsp;Let me know if you need any additional details.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Help with SHIPHOLD Pressed and Released Events on NPM1300 + STM32L4 + npmx</title><link>https://devzone.nordicsemi.com/thread/541154?ContentTypeID=1</link><pubDate>Wed, 02 Jul 2025 11:17:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1be81f8a-f233-4594-a318-948b619fabf5</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Let me ask internally and get back to you.&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>