<?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 led pin configuration</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/104420/pwm-led-pin-configuration</link><description>I have a custom nRF52840 based board with 2 LED&amp;#39;s 
 In the .dtsi they are defined as follows 
 
 pwm0_default: pwm0_default { 
 group1 { 
 psels = &amp;lt; NRF_PSEL ( PWM_OUT0 , 0 , 29 )&amp;gt;, 
 &amp;lt;NRF_PSEL(PWM_OUT1, 0, 31)&amp;gt;; 
 nordic,invert; 
 }; 
 }; 
 
 pwm0_sleep</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 10 Oct 2023 13:47:50 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/104420/pwm-led-pin-configuration" /><item><title>RE: PWM led pin configuration</title><link>https://devzone.nordicsemi.com/thread/449587?ContentTypeID=1</link><pubDate>Tue, 10 Oct 2023 13:47:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:189b7d88-eda3-403e-85d9-01dd23d587bb</guid><dc:creator>AndyM</dc:creator><description>&lt;p&gt;Update&lt;/p&gt;
&lt;p&gt;There problem was that one of the LED pins had an overlapping assignment with another component&amp;nbsp;&lt;br /&gt;After that got resolved the PWM works just fine with the LEDs&lt;/p&gt;
&lt;p&gt;Thank you for help&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PWM led pin configuration</title><link>https://devzone.nordicsemi.com/thread/449399?ContentTypeID=1</link><pubDate>Mon, 09 Oct 2023 15:53:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:18aca3fc-31a8-498b-9da7-21ab4b87bd0a</guid><dc:creator>&amp;#216;ivind</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;For that api, you want the device to be the node containing:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span&gt;compatible = &lt;/span&gt;&lt;span&gt;&amp;quot;pwm-leds&amp;quot;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;which is the parent node.&lt;/p&gt;
&lt;p&gt;You need CONFIG_LED=y and CONFIG_PWM=y&lt;/p&gt;
&lt;p&gt;You can also try using DEVICE_DT_GET() instead of device_get_binding(). DEVICE_DT_GET() needs the node identifier for the pwmleds node.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PWM led pin configuration</title><link>https://devzone.nordicsemi.com/thread/449203?ContentTypeID=1</link><pubDate>Fri, 06 Oct 2023 14:21:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1c7afd62-3692-4d42-9599-4069c8996dfa</guid><dc:creator>AndyM</dc:creator><description>&lt;p&gt;My bad, the API call made is&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;led_on(_led_pwm, led_num);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Anything in the schematics and the dts or dtsi that jumps out?&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;What are my options to troubleshoot?&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Thank you&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PWM led pin configuration</title><link>https://devzone.nordicsemi.com/thread/449187?ContentTypeID=1</link><pubDate>Fri, 06 Oct 2023 13:36:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f9716078-8be4-4460-a7b8-4f098c4cf715</guid><dc:creator>&amp;#216;ivind</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;led_set_brightness() is probably not from the api you want to use. &lt;br /&gt;Take a look at the sample at zephyr/samples/basic/blinky_pwm&lt;br /&gt;And the api in zephyr/include/zephyr/drivers/pwm.h&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>