<?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>PWM can&amp;#39;t output low level when it is idle.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/128205/pwm-can-t-output-low-level-when-it-is-idle</link><description>Hi， 
 ncs v3.2.0，nRF54LM20-DK， I drive a buzzer. When the buzzer doesn&amp;#39;t ring, I need a low level. I tried it according to the following method. I can&amp;#39;t output a low level when pwm is idle. 
 ①Change PWM_POLARITY_NORMAL to PWM_POLARITY_INVERTED，Pwm can</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 21 May 2026 09:12:40 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/128205/pwm-can-t-output-low-level-when-it-is-idle" /><item><title>RE: PWM can't output low level when it is idle.</title><link>https://devzone.nordicsemi.com/thread/566658?ContentTypeID=1</link><pubDate>Thu, 21 May 2026 09:12:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:808b5dd1-a718-44df-a75d-4fa6049e6a53</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You are setting the PWM instance as inverted:&lt;/p&gt;
[quote user=""]&lt;span&gt; &lt;/span&gt;&lt;span&gt;pwms&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &amp;lt;&lt;/span&gt;&lt;span&gt;&amp;amp;&lt;/span&gt;&lt;span&gt;pwm21&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;PWM_MSEC&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;20&lt;/span&gt;&lt;span&gt;) &lt;/span&gt;&lt;span&gt;PWM_POLARITY_INVERTED&lt;/span&gt;&lt;span&gt;&amp;gt;;&lt;/span&gt;[/quote]
&lt;p&gt;as a result, the pin will then be idle high when you call this function:&lt;/p&gt;
[quote user=""]int ret = pwm_set_pulse_dt(&amp;amp;buzzer_pwm, 0);[/quote]
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>