<?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>Inverted PWM channels in DeviceTree</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/64934/inverted-pwm-channels-in-devicetree</link><description>Hi, 
 I have a custom PCB that uses the nRF9160 and an RGB LED. I want to drive this LED with PWM but it uses an active LOW style of GPIO drive. I have been able to use normal GPIO active LOW configurations to drive the LED on and off but I don&amp;#39;t know</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 20 Aug 2020 14:37:07 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/64934/inverted-pwm-channels-in-devicetree" /><item><title>RE: Inverted PWM channels in DeviceTree</title><link>https://devzone.nordicsemi.com/thread/265596?ContentTypeID=1</link><pubDate>Thu, 20 Aug 2020 14:37:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d88b6ec5-011f-49b5-9e33-ca53e4fdeccf</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Looking at the &lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/master/boards/arm/thingy91_nrf9160/thingy91_nrf9160_common.dts"&gt;thingy91_nrf9160_common.dts&lt;/a&gt;&amp;nbsp;for Thingy:91, I don&amp;#39;t see &amp;#39;pwms&amp;#39; used.&amp;nbsp; But, If you are using PWM0 for RGB control, similar to how it&amp;#39;s done in the Thingy:91 dts file,snippet:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;/* PWM0 is intended for RGB LED control */
&amp;amp;pwm0 {
	status = &amp;quot;okay&amp;quot;;
	ch0-pin = &amp;lt;29&amp;gt;;
	ch1-pin = &amp;lt;30&amp;gt;;
	ch2-pin = &amp;lt;31&amp;gt;;
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Then, you can try to set&amp;nbsp;&lt;span&gt;chx-inverted; for the x pins you need to be inverted:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Snippet:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;/* PWM0 is intended for RGB LED control */
&amp;amp;pwm0 {
	status = &amp;quot;okay&amp;quot;;
	ch0-pin = &amp;lt;29&amp;gt;;
	ch0-inverted;
	ch1-pin = &amp;lt;30&amp;gt;;
	ch1-inverted;
	ch2-pin = &amp;lt;31&amp;gt;;
	ch2-inverted;
};&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>