<?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>Potential bug on PWM driver when set with 100% pulse</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/128143/potential-bug-on-pwm-driver-when-set-with-100-pulse</link><description>Hi, 
 
 while developing a custom driver for the nRF54L15, using the PWM I have found a potential bug. 
 I have removed the custom driver and just enabled PWM shell and I can reproduce the bug typing this commands: 
 
 Here the debug watch data of the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 20 May 2026 15:02:54 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/128143/potential-bug-on-pwm-driver-when-set-with-100-pulse" /><item><title>RE: Potential bug on PWM driver when set with 100% pulse</title><link>https://devzone.nordicsemi.com/thread/566617?ContentTypeID=1</link><pubDate>Wed, 20 May 2026 15:02:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0ea44347-b3b0-4651-82e0-a9104f6721f1</guid><dc:creator>Maria Gilje</dc:creator><description>&lt;p&gt;Hi again andrea,&lt;br /&gt;&lt;br /&gt;I successfully reproduced this with both v3.2.4 and v3.3.0 and I dove deeper into the code to find the reason for this error happening. What I found was that with the default Kconfig symbols, this is the intended behaviour to not get glitches when using 100% duty cycle for one PWM channel at the same time as driving other channels. Setting 100% duty cycle for several PWM channels is an exception for this rule.&lt;/p&gt;
&lt;p&gt;So, what the driver does is to &lt;a href="https://docs.nordicsemi.com/bundle/ncs-3.2.4/page/kconfig/index.html#CONFIG_PWM_NRFX_NO_GLITCH_DUTY_100"&gt;set the needs_pwm flag&lt;/a&gt; when requesting 100% duty cycle. On subsequent requests to set non-100% duty cycles for another channel, the flag is still set, which translates to pwm_needed reflecting the channel which currently is at 100% duty cycle.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You can disable this behaviour by setting &lt;a href="https://docs.nordicsemi.com/bundle/ncs-3.2.4/page/kconfig/index.html#CONFIG_PWM_NRFX_NO_GLITCH_DUTY_100"&gt;CONFIG_PWM_NRFX_NO_GLITCH_DUTY_100&lt;/a&gt;=n in your prj.conf. Note that you should only do so if you can handle potential glitches.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Maria&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Potential bug on PWM driver when set with 100% pulse</title><link>https://devzone.nordicsemi.com/thread/566469?ContentTypeID=1</link><pubDate>Mon, 18 May 2026 14:16:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9c054c32-64f1-471d-a565-8d2f9a73d37c</guid><dc:creator>Maria Gilje</dc:creator><description>&lt;p&gt;Hi andrea,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thank you for reporting. We will try to reproduce this and let you know what we find.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Maria&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Potential bug on PWM driver when set with 0 pulse</title><link>https://devzone.nordicsemi.com/thread/566418?ContentTypeID=1</link><pubDate>Fri, 15 May 2026 15:33:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dc3b277d-256e-4729-a37d-15287bd8e7f1</guid><dc:creator>andrea@al2tech</dc:creator><description>&lt;p&gt;It Fails also with this simplest sequence:&lt;/p&gt;
&lt;p&gt;rd:~$ pwm nsec pwm@d2000 1 50000 50000&lt;br /&gt;[00:00:14.514,077] &amp;lt;dbg&amp;gt; pwm_nrfx: pwm_nrfx_set_cycles: channel 1, pulse 800, period 800, prescaler: 0.&lt;br /&gt;rd:~$ pwm nsec pwm@d2000 0 50000 100&lt;br /&gt;failed to setup PWM (err -22)&lt;br /&gt;[00:00:22.586,967] &amp;lt;err&amp;gt; pwm_nrfx: Incompatible period.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>