<?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>Minimizing System Off current when using PWM</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/121192/minimizing-system-off-current-when-using-pwm</link><description>I&amp;#39;m developing with an nRF52832, NCS v2.6.1 and Zephyr 3.5.99 
 I&amp;#39;ve been forcing my MCU into System Off when I don&amp;#39;t need it to do anything, then triggering it out of that state with a GPIO signal. That&amp;#39;s working OK and I&amp;#39;m getting sub-uA current drain</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 06 May 2025 01:15:48 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/121192/minimizing-system-off-current-when-using-pwm" /><item><title>RE: Minimizing System Off current when using PWM</title><link>https://devzone.nordicsemi.com/thread/534000?ContentTypeID=1</link><pubDate>Tue, 06 May 2025 01:15:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0a05187b-f175-4e7f-8e57-fa4a81f8fd7d</guid><dc:creator>Mike Austin (LPI)</dc:creator><description>&lt;p&gt;Thanks Vidar.&lt;/p&gt;
&lt;p&gt;Turns out the issue wasn&amp;#39;t to do with my pwm device, but the fact that I wasn&amp;#39;t putting my stepper motor driver into its low current &amp;quot;sleep&amp;quot; mode prior to going into System OFF {face palm}&lt;/p&gt;
&lt;p&gt;Anyway, I added the above step in my shutdown procedure anyway, as its probably good practise.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Mike&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Minimizing System Off current when using PWM</title><link>https://devzone.nordicsemi.com/thread/533903?ContentTypeID=1</link><pubDate>Mon, 05 May 2025 12:17:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:07fbb967-9b8f-4348-939a-dd66c37da826</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello Mike,&lt;/p&gt;
&lt;p&gt;GPIO configurations are retained in System OFF mode, so an PWM output can continue to drive the output high or low in this state. Depending on what it is connected to, this may lead to excessive current draw. To stop the PWM and&amp;nbsp;bring the GPIOs back to their default reset state, you can use the power management suspend task just before calling sys_poweroff().&lt;/p&gt;
&lt;p&gt;In your prj.conf&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;...
CONFIG_PM_DEVICE=y&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Add suspend task before sys_poweroff():&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;	...
	/* Disable PWM and reset GPIO configuration */
	err = pm_device_action_run(&amp;lt;pwm dev&amp;gt;, PM_DEVICE_ACTION_SUSPEND);
	if (err) {
		LOG_ERR(&amp;quot;Could not suspend PWM (%d)\n&amp;quot;, err);
	}
	
	sys_poweroff();
	
	&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>