<?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>nPM1300 Long Press Reset disable</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/110002/npm1300-long-press-reset-disable</link><description>Hi. 
 I want to disable the restart function when the SHPHLD button is pressed for a long time (10 seconds). 
 If I understood correctly from the datasheet, the LPRESETCONFIG register (offset - 0x6) is responsible for this. To disable reset, write 0x01</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 12 Apr 2024 08:12:47 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/110002/npm1300-long-press-reset-disable" /><item><title>RE: nPM1300 Long Press Reset disable</title><link>https://devzone.nordicsemi.com/thread/478476?ContentTypeID=1</link><pubDate>Fri, 12 Apr 2024 08:12:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:86490105-31b5-439d-a242-9ab3e2a63d33</guid><dc:creator>backstreet.devisor</dc:creator><description>&lt;p&gt;I got it. Thanks again.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nPM1300 Long Press Reset disable</title><link>https://devzone.nordicsemi.com/thread/478466?ContentTypeID=1</link><pubDate>Fri, 12 Apr 2024 07:57:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f3feabb2-6ece-4af2-bdd4-7b6a7fa7cbbf</guid><dc:creator>Andy Sinclair</dc:creator><description>&lt;p&gt;Hi.&lt;br /&gt;&lt;br /&gt;It is fixed at 10 seconds.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nPM1300 Long Press Reset disable</title><link>https://devzone.nordicsemi.com/thread/478349?ContentTypeID=1</link><pubDate>Thu, 11 Apr 2024 13:45:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f0663c37-5c58-486e-9010-64d74d6c8126</guid><dc:creator>backstreet.devisor</dc:creator><description>&lt;p&gt;Hi Andy.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m using EK and a custom board as the host.&amp;nbsp;Following your advice, I changed the GPIO0 configuration and it worked. Thank you very much!&lt;/p&gt;
&lt;p&gt;Now the reset is carried out only after pressing SHPHLD and GPIO0, this can be seen in the screenshot --&amp;gt;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/two-button-reset.jpg" /&gt;&lt;/p&gt;
&lt;p&gt;Please tell me whether it is possible to change the tRESETBUT time or is it constant (10 seconds)?&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nPM1300 Long Press Reset disable</title><link>https://devzone.nordicsemi.com/thread/478204?ContentTypeID=1</link><pubDate>Thu, 11 Apr 2024 07:40:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1eda0423-b5fc-45d6-a701-3aee2cf1ae6f</guid><dc:creator>Andy Sinclair</dc:creator><description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;Is this using an EK or your own HW?&lt;br /&gt;Can you observe the GPIO0 pin state with a scope?&lt;/p&gt;
&lt;p&gt;GPIO0&amp;nbsp;has a weak pull down by default, you can try disabling this (GPIOPDEN), and enabling the weak pulup (GPIOPUEN).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nPM1300 Long Press Reset disable</title><link>https://devzone.nordicsemi.com/thread/478098?ContentTypeID=1</link><pubDate>Wed, 10 Apr 2024 14:10:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d9fbc7fc-6b53-4e4d-85fa-fb4769712cbd</guid><dc:creator>backstreet.devisor</dc:creator><description>&lt;p&gt;I&amp;#39;m trying to follow your advice, but I&amp;#39;m getting exactly the same result.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#include &amp;lt;zephyr/drivers/mfd/npm1300.h&amp;gt;

#define SHIP_BASE 			  0x0BU
#define SHIP_OFFSET_LPCONFIG  0x06U
#define SHIP_OFFSET_CFGSTROBE 0x01U

static const struct device *pmic = DEVICE_DT_GET(DT_NODELABEL(npm1300_ek_pmic));

int main(void)
{
	int ret;
	uint8_t reg;
	
	ret = mfd_npm1300_reg_write(pmic, SHIP_BASE, SHIP_OFFSET_LPCONFIG, 0x02);
	if (ret &amp;lt; 0) {
		return ret;
	}
	
	ret = mfd_npm1300_reg_write(pmic, SHIP_BASE, SHIP_OFFSET_CFGSTROBE, 0x01);
	if (ret &amp;lt; 0) {
		return ret;
	}
	
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Unfortunately, the TASKSHPHLDCFGSTROBE register is write-only and I cannot verify that the value 0x01 has been successfully written to it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nPM1300 Long Press Reset disable</title><link>https://devzone.nordicsemi.com/thread/478013?ContentTypeID=1</link><pubDate>Wed, 10 Apr 2024 10:33:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b18e27a7-83a3-44a7-8238-45a559d7a4da</guid><dc:creator>Andy Sinclair</dc:creator><description>&lt;p&gt;Hi.&lt;br /&gt;&lt;br /&gt;You need to write to a task register to apply this configuration change like this:&lt;br /&gt;&lt;br /&gt;We&amp;#39;ll update the docs to make it clearer that this is required.&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#define SHIP_OFFSET_CFGSTROBE 0x01

...

ret = mfd_npm1300_reg_write(pmic, SHIP_BASE, SHIP_OFFSET_CFGSTROBE, 0x01);
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nPM1300 Long Press Reset disable</title><link>https://devzone.nordicsemi.com/thread/477892?ContentTypeID=1</link><pubDate>Tue, 09 Apr 2024 18:57:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c264dd37-d9a3-46af-b045-5ed4c6f86880</guid><dc:creator>backstreet.devisor</dc:creator><description>&lt;p&gt;Hi Andy. Thanks.&lt;/p&gt;
&lt;p&gt;Yes, this example worked for me, I was able to disable RESET. But now I can&amp;#39;t enable the two-button reset. Could you please tell me, to enable &amp;quot;Two-button reset&amp;quot;, do I need to write 0x02 or 0x03 to the LPRESETCONFIG register? I tried writing both values, but it doesn&amp;#39;t work. Writing value 0x02 still performs a reset with SHPHLD single key, and writing 0x03 does not perform a reset when SHPHLD and GPIO0 are pressed.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#include &amp;lt;zephyr/drivers/mfd/npm1300.h&amp;gt;

#define SHIP_BASE 			  0x0BU
#define SHIP_OFFSET_LPCONFIG  0x06U

static const struct device *pmic = DEVICE_DT_GET(DT_NODELABEL(npm1300_ek_pmic));

int main(void)
{
    ret = mfd_npm1300_reg_write(pmic, SHIP_BASE, SHIP_OFFSET_LPCONFIG, 0x02);
	if (ret &amp;lt; 0) {
		return ret;
	}

	ret = mfd_npm1300_reg_read(pmic, SHIP_BASE, SHIP_OFFSET_LPCONFIG, &amp;amp;reg);
	if (ret &amp;lt; 0) {
		return ret;
	}
	LOG_INF(&amp;quot;LPCONFIG = %d&amp;quot;, reg);

	if(reg == 2){
		LOG_INF(&amp;quot;Two-button reset activated&amp;quot;);
	}
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nPM1300 Long Press Reset disable</title><link>https://devzone.nordicsemi.com/thread/477469?ContentTypeID=1</link><pubDate>Mon, 08 Apr 2024 07:42:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8d4686b1-27b2-4b80-bc8f-793cd73cc22a</guid><dc:creator>Andy Sinclair</dc:creator><description>&lt;p&gt;On line 17, you are truncating the address (0xB06 -&amp;gt; 0x06), you need to send the bank address as a separate byte.&lt;br /&gt;&lt;br /&gt;Configuration of this has been added upstream, and will be included in the next release:&lt;br /&gt;&lt;a href="https://github.com/zephyrproject-rtos/zephyr/blob/d1591cd363d5cc23929fbd85ddbf79c4b106a377/drivers/mfd/mfd_npm1300.c#L178"&gt;https://github.com/aasinclair/zephyr/blob/e4d53dc565ed440430cfc4b4fa3990264cb2d69e/drivers/mfd/mfd_npm1300.c#L178&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>