<?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>nRF52840 DK unable to route the PWM0 default line P0.13 on P0.22</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/122594/nrf52840-dk-unable-to-route-the-pwm0-default-line-p0-13-on-p0-22</link><description>Dear all, 
 after cutting the SB bridge to the QSPI chip and close the ones to get the pin free and disabled also qspi inside the nRF52840dk_nrf52840.overlay file I&amp;#39;m unable to get the PWM output on P0.22, this seems locked to pin P0.13 related LED1 on</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 03 Jul 2025 12:35:50 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/122594/nrf52840-dk-unable-to-route-the-pwm0-default-line-p0-13-on-p0-22" /><item><title>RE: nRF52840 DK unable to route the PWM0 default line P0.13 on P0.22</title><link>https://devzone.nordicsemi.com/thread/541326?ContentTypeID=1</link><pubDate>Thu, 03 Jul 2025 12:35:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1a7a7397-6e19-4e4d-8af5-df40d06dc5d7</guid><dc:creator>STE</dc:creator><description>&lt;p&gt;Dear Swathy,&lt;/p&gt;
&lt;p&gt;very good point, thanks a lot!&lt;/p&gt;
&lt;p&gt;F.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 DK unable to route the PWM0 default line P0.13 on P0.22</title><link>https://devzone.nordicsemi.com/thread/541152?ContentTypeID=1</link><pubDate>Wed, 02 Jul 2025 11:13:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:035f5201-d290-4620-a417-1e89e251949d</guid><dc:creator>SwRa</dc:creator><description>&lt;p&gt;Hi Fabio,&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Overlays are used to override or extend the board&amp;#39;s default devicetree configuration, not to duplicate it.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;If your application code uses an&amp;nbsp;&lt;strong&gt;alias&lt;/strong&gt;&amp;nbsp;(like&amp;nbsp;&lt;code dir="ltr"&gt;pwm_led0&lt;/code&gt;) and expects it to point to a specific PWM output, you must ensure that the alias in the devicetree matches your intended configuration. If the default alias in the board&amp;#39;s&amp;nbsp;&lt;code dir="ltr"&gt;.dts&lt;/code&gt;&amp;nbsp;file points to a different PWM output (for example, the one connected to LED1 on P0.13 in this case), and you want to use a different pin (like P0.22), you need to&amp;nbsp;&lt;strong&gt;override the alias&lt;/strong&gt;&amp;nbsp;in your overlay to point to your new PWM node. See here:&amp;nbsp;&lt;a href="https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/lessons/lesson-4-pulse-width-modulation-pwm/topic/exercise-2-17/#Exercise-steps"&gt;https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/lessons/lesson-4-pulse-width-modulation-pwm/topic/exercise-2-17/#Exercise-steps&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best Regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Swathy&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 DK unable to route the PWM0 default line P0.13 on P0.22</title><link>https://devzone.nordicsemi.com/thread/540921?ContentTypeID=1</link><pubDate>Mon, 30 Jun 2025 16:16:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8a0480f6-b898-4dbe-8a98-b8aef3932cf8</guid><dc:creator>STE</dc:creator><description>&lt;p&gt;Dear SwRa,&lt;/p&gt;
&lt;p&gt;thanks for your reply!!&lt;/p&gt;
&lt;p&gt;About the overlay file I&amp;#39;ve not added again the definition for the&amp;nbsp;pwmleds because (in my thinking, correct me if this is not right) was already set inside the nRF52840dk_nrf52840.dts file and I&amp;#39;ve no change to do inside this part...&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1751299420960v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;also aliases is already set:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1751299464247v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;could you please let me know why I&amp;#39;ve also to specify this part again inside the overlay file even it is equal to the ones into the nRF52840 eval board dts file? What I&amp;#39;m missing?&lt;/p&gt;
&lt;p&gt;I&amp;#39;m not using a custom board, I would simply rerouted the previous signal to new one on a nRF52840 DK v3.0.0 evaluation board, so I updated the pinctrl definitions and linked them to the overlay for pwm0. I also physically disconnected the onboard QSPI memory by cutting the relevant traces and bridging the necessary lines, so that P0.17, P0.21, P0.22, P0.23, P0.19, and P0.20 are now available as GPIOs.&lt;/p&gt;
&lt;p&gt;Could you please let me know more on this?&lt;/p&gt;
&lt;p&gt;I&amp;#39;m also working in a real custom board (different PCB based on nRF52840 SoC) and I was able to route the pwm signal on the nRF52840 P0.22 pin of course in my dts board file I&amp;#39;ve included also the pwmleds and aliases definition.&lt;/p&gt;
&lt;p&gt;Thanks for you help!!&lt;/p&gt;
&lt;p&gt;Best regards.&lt;/p&gt;
&lt;p&gt;Fabio&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 DK unable to route the PWM0 default line P0.13 on P0.22</title><link>https://devzone.nordicsemi.com/thread/540864?ContentTypeID=1</link><pubDate>Mon, 30 Jun 2025 12:24:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:93cf01ba-c9c4-42b9-a71f-0ff8b4a375cb</guid><dc:creator>SwRa</dc:creator><description>&lt;p&gt;Hi Fabio,&lt;/p&gt;
&lt;p&gt;I think what is missing is that you have not set the aliases in the overlay file.&amp;nbsp;&lt;span&gt;You need to define a&amp;nbsp;&lt;/span&gt;&lt;code dir="ltr"&gt;pwmleds&lt;/code&gt;&lt;span&gt;&amp;nbsp;node and the&amp;nbsp;&lt;/span&gt;&lt;code dir="ltr"&gt;pwm_led0&lt;/code&gt;&lt;span&gt;&amp;nbsp;label, and add the alias for&amp;nbsp;&lt;/span&gt;&lt;code dir="ltr"&gt;pwm-led0&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The samples in nRF Connect SDK and Zephyr OS uses fixed aliases for devicetree nodes. Therefore, to ensure that samples find these aliases, it’s crucial to add aliases in the board devicetree file&amp;nbsp;and&amp;nbsp;&lt;/span&gt;&lt;span&gt;ensure that&amp;nbsp;&lt;/span&gt;&lt;code dir="ltr"&gt;DT_ALIAS(pwm_led0)&lt;/code&gt;&lt;span&gt;&amp;nbsp;in your code points to the correct node. This is explained here:&amp;nbsp;&lt;a href="https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/lessons/lesson-3-adding-custom-board-support/topic/exercise-1/#Exercise-steps:~:text=%7D%3B-,8.4.3%20Adding%20PWM.,-Let%E2%80%99s%20enable%20a"&gt;https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/lessons/lesson-3-adding-custom-board-support/topic/exercise-1/#Exercise-steps:~:text=%7D%3B-,8.4.3%20Adding%20PWM.,-Let%E2%80%99s%20enable%20a&lt;/a&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Here is also an old thread that you could refer:&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/102799/using-pwm-with-nrf52840dk-on-pin-0-20?ReplyFilter=Answers&amp;amp;ReplySortBy=Answers&amp;amp;ReplySortOrder=Descending"&gt;(+) Using PWM with nrf52840DK on pin 0.20 - Nordic Q&amp;amp;A - Nordic DevZone - Nordic DevZone&lt;/a&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;You might need to add the following in your overlay:&lt;/span&gt;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;br /&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;{
    aliases {
        pwm-led0 = &amp;amp;pwm_led0;
    };

    pwmleds {
        compatible = &amp;quot;pwm-leds&amp;quot;;
        pwm_led0: pwm_led_0 {
            pwms = &amp;lt;&amp;amp;pwm0 0 PWM_MSEC(20) PWM_POLARITY_NORMAL&amp;gt;;
        };
    };
};&lt;/pre&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Regards,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Swathy&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>