<?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>Options To Reduce PWM Power Consumption On nRF52811?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/121729/options-to-reduce-pwm-power-consumption-on-nrf52811</link><description>We&amp;#39;re using PWM on the nRF52811 to generate a 3.2 MHz clock needed by one of our peripherals, using the nrf_drv_pwm library in nRF5 SDK 17.1.0. We&amp;#39;re seeing power consumption jump up by about 1.7 mA when PWM is enabled. Questions: 
 * Does that sound</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 26 May 2025 15:35:34 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/121729/options-to-reduce-pwm-power-consumption-on-nrf52811" /><item><title>RE: Options To Reduce PWM Power Consumption On nRF52811?</title><link>https://devzone.nordicsemi.com/thread/536994?ContentTypeID=1</link><pubDate>Mon, 26 May 2025 15:35:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:760d2817-435a-4b17-b1d6-ca284e6dd278</guid><dc:creator>ntennies</dc:creator><description>&lt;p&gt;&lt;span&gt;Asbj&amp;oslash;rn,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thank you very much for checking into this further, and confirming my conclusions.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;For anyone else in this situation, I think one possible lower-power solution would be to switch to using a TIMER -&amp;gt; PPI -&amp;gt; GPIO solution -- see the GPIOTE example -- which I think eliminates the need for EasyDMA. Of course, maybe generating a clock using those three peripherals would consume enough power to offset the use of EasyDMA, but I&amp;#39;m going to give this a try and can report results back here.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The only downside (for us, in this case) is that because you have to toggle the GPIO twice for each clock cycle, it effectively halves the base TIMER clock in half. On the nRF52811, the TIMER uses a 16 MHz base clock, so that means we&amp;#39;re effectively using the TIMER to divide down an 8 MHz clock, and we can&amp;#39;t divide an 8 MHz clock evenly to produce a 3.2 MHz clock. However, I&amp;#39;ve used this method to generate a 1.6 MHz clock on the nRF52811, and since we&amp;#39;re considering switching to the nRF54L15 for this project, there is a TIMER instance on that MCU that uses a 32 MHz base clock.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Options To Reduce PWM Power Consumption On nRF52811?</title><link>https://devzone.nordicsemi.com/thread/536968?ContentTypeID=1</link><pubDate>Mon, 26 May 2025 13:55:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:28d927bb-c4a1-4cbc-8c36-0c9013103b44</guid><dc:creator>Asbj&amp;#248;rn</dc:creator><description>&lt;div style="border:0;color:rgba(0, 0, 0, 1);font-size:11pt;font-style:normal;font-weight:400;letter-spacing:normal;line-height:inherit;margin:0;padding:0;text-indent:0;text-transform:none;vertical-align:baseline;white-space:normal;"&gt;Hello Nathan,&lt;/div&gt;
&lt;div style="border:0;color:rgba(0, 0, 0, 1);font-size:11pt;font-style:normal;font-weight:400;letter-spacing:normal;line-height:inherit;margin:0;padding:0;text-indent:0;text-transform:none;vertical-align:baseline;white-space:normal;"&gt;&lt;/div&gt;
&lt;div style="border:0;color:rgba(0, 0, 0, 1);font-size:11pt;font-style:normal;font-weight:400;letter-spacing:normal;line-height:inherit;margin:0;padding:0;text-indent:0;text-transform:none;vertical-align:baseline;white-space:normal;"&gt;I&amp;#39;ve had a talk to others here and we come to the conclusion that the number you&amp;#39;re seeing and measuring might actually be right as expected. It&amp;#39;s just a high frequency and that doesn&amp;#39;t allow for much time for the device to be in sleep to keep the accuracy. 64Mhz and DMA usage with DCDC and then switched into power down mode rarely, then you&amp;#39;d end up with the numbers you&amp;#39;re seeing.&lt;/div&gt;
&lt;div style="border:0;color:rgba(0, 0, 0, 1);font-size:11pt;font-style:normal;font-weight:400;letter-spacing:normal;line-height:inherit;margin:0;padding:0;text-indent:0;text-transform:none;vertical-align:baseline;white-space:normal;"&gt;&lt;/div&gt;
&lt;div style="border:0;color:rgba(0, 0, 0, 1);font-size:11pt;font-style:normal;font-weight:400;letter-spacing:normal;line-height:inherit;margin:0;padding:0;text-indent:0;text-transform:none;vertical-align:baseline;white-space:normal;"&gt;There&amp;#39;s a suggestion to try the sw_pwm with rtc, but this will probably sacrifice the accuracy you need for current consumption:&lt;/div&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;    sw_pwm: sw-pwm {
        compatible = &amp;quot;nordic,nrf-sw-pwm&amp;quot;;
        status = &amp;quot;okay&amp;quot;;
        generator = &amp;lt;&amp;amp;rtc1&amp;gt;;
        clock-prescaler = &amp;lt;0&amp;gt;;
        #pwm-cells = &amp;lt;3&amp;gt;;
    };
&lt;/pre&gt;&lt;/p&gt;
&lt;div style="border:0;color:rgba(0, 0, 0, 1);font-size:11pt;font-style:normal;font-weight:400;letter-spacing:normal;line-height:inherit;margin:0;padding:0;text-indent:0;text-transform:none;vertical-align:baseline;white-space:normal;"&gt;&lt;/div&gt;
&lt;div style="border:0;color:rgba(0, 0, 0, 1);font-size:11pt;font-style:normal;font-weight:400;letter-spacing:normal;line-height:inherit;margin:0;padding:0;text-indent:0;text-transform:none;vertical-align:baseline;white-space:normal;"&gt;&lt;/div&gt;
&lt;div style="border:0;color:rgba(0, 0, 0, 1);font-size:11pt;font-style:normal;font-weight:400;letter-spacing:normal;line-height:inherit;margin:0;padding:0;text-indent:0;text-transform:none;vertical-align:baseline;white-space:normal;"&gt;Best regards&lt;/div&gt;
&lt;div style="border:0;color:rgba(0, 0, 0, 1);font-size:11pt;font-style:normal;font-weight:400;letter-spacing:normal;line-height:inherit;margin:0;padding:0;text-indent:0;text-transform:none;vertical-align:baseline;white-space:normal;"&gt;Asbjørn&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Options To Reduce PWM Power Consumption On nRF52811?</title><link>https://devzone.nordicsemi.com/thread/536810?ContentTypeID=1</link><pubDate>Fri, 23 May 2025 14:33:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4437868e-b5ff-4331-9e68-20bf65622960</guid><dc:creator>ntennies</dc:creator><description>&lt;p&gt;Asbj&amp;oslash;rn,&lt;/p&gt;
&lt;div&gt;&amp;gt; It sounds like you&amp;#39;ve configured HFXO as source, but you should probably use HFINT instead?&lt;/div&gt;
&lt;p&gt;Thank you for your response, but I&amp;#39;m not sure what you are suggesting here, for the following reasons:&lt;/p&gt;
&lt;p&gt;* The nRF52811 PWM controller does not allow the selection of a clock source, to the best of my knowledge&lt;/p&gt;
&lt;p&gt;* In the nRF5 SDK architecture, nrf_drv_clock&amp;nbsp;/ nrfx_clock / SoftDevice handles enabling HFXO on-demand for peripherals that require it. We&amp;#39;re not using any of those peripherals except BLE, and while the SoftDevice is enabled at this point in our code,&amp;nbsp;BLE isn&amp;#39;t initialized yet. So the HFXO should not be running.&lt;/p&gt;
&lt;p&gt;*&amp;nbsp;nrf_drv_clock_hfclk_is_running() returns 0 if we call it immediately prior to measuring PWM power consumption.&lt;/p&gt;
&lt;p&gt;So I think HFXO is definitely not being used as a clock source for PWM in our case.&lt;/p&gt;
&lt;p&gt;&amp;gt;&amp;nbsp;&lt;span&gt;EasyDMA is the only option, but not causing the current consumption you&amp;#39;re seeing.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Why do you say that? There are many reports here that simply enabling a peripheral that uses EasyDMA increases power consumption by at least 1 mA, and that&amp;#39;s been our experience with the nRF52840 as well. For instance, see&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/33957/easydma-current-consumption"&gt;EasyDMA current consumption&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Options To Reduce PWM Power Consumption On nRF52811?</title><link>https://devzone.nordicsemi.com/thread/536790?ContentTypeID=1</link><pubDate>Fri, 23 May 2025 13:09:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1dc293a3-69be-43e3-8a99-190a5dc270c7</guid><dc:creator>Asbj&amp;#248;rn</dc:creator><description>&lt;div style="border:0;color:rgba(0, 0, 0, 1);font-size:11pt;font-style:normal;font-weight:400;letter-spacing:normal;line-height:inherit;margin:0;padding:0;text-indent:0;text-transform:none;vertical-align:baseline;white-space:normal;"&gt;Hello Nathan,&lt;/div&gt;
&lt;div style="border:0;color:rgba(0, 0, 0, 1);font-size:11pt;font-style:normal;font-weight:400;letter-spacing:normal;line-height:inherit;margin:0;padding:0;text-indent:0;text-transform:none;vertical-align:baseline;white-space:normal;"&gt;&lt;/div&gt;
&lt;div style="border:0;color:rgba(0, 0, 0, 1);font-size:11pt;font-style:normal;font-weight:400;letter-spacing:normal;line-height:inherit;margin:0;padding:0;text-indent:0;text-transform:none;vertical-align:baseline;white-space:normal;"&gt;Based on the current consumption you report the first question is what clock source are you using for as input for the PWM/peripheral clock. It sounds like you&amp;#39;ve configured HFXO as source, but you should probably use HFINT instead?&lt;/div&gt;
&lt;div style="border:0;color:rgba(0, 0, 0, 1);font-size:11pt;font-style:normal;font-weight:400;letter-spacing:normal;line-height:inherit;margin:0;padding:0;text-indent:0;text-transform:none;vertical-align:baseline;white-space:normal;"&gt;&lt;/div&gt;
&lt;div style="border:0;color:rgba(0, 0, 0, 1);font-size:11pt;font-style:normal;font-weight:400;letter-spacing:normal;line-height:inherit;margin:0;padding:0;text-indent:0;text-transform:none;vertical-align:baseline;white-space:normal;"&gt;EasyDMA is the only option, but not causing the current consumption you&amp;#39;re seeing.&lt;/div&gt;
&lt;div style="border:0;color:rgba(0, 0, 0, 1);font-size:11pt;font-style:normal;font-weight:400;letter-spacing:normal;line-height:inherit;margin:0;padding:0;text-indent:0;text-transform:none;vertical-align:baseline;white-space:normal;"&gt;&lt;/div&gt;
&lt;div style="border:0;color:rgba(0, 0, 0, 1);font-size:11pt;font-style:normal;font-weight:400;letter-spacing:normal;line-height:inherit;margin:0;padding:0;text-indent:0;text-transform:none;vertical-align:baseline;white-space:normal;"&gt;&lt;/div&gt;
&lt;div style="border:0;color:rgba(0, 0, 0, 1);font-size:11pt;font-style:normal;font-weight:400;letter-spacing:normal;line-height:inherit;margin:0;padding:0;text-indent:0;text-transform:none;vertical-align:baseline;white-space:normal;"&gt;Best regards&lt;/div&gt;
&lt;div style="border:0;color:rgba(0, 0, 0, 1);font-size:11pt;font-style:normal;font-weight:400;letter-spacing:normal;line-height:inherit;margin:0;padding:0;text-indent:0;text-transform:none;vertical-align:baseline;white-space:normal;"&gt;Asbjørn&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>