<?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>Compile error when using PWM on nRF54L15 (_P_pwms_IDX_0_VAL_channel undeclared)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/117263/compile-error-when-using-pwm-on-nrf54l15-_p_pwms_idx_0_val_channel-undeclared</link><description>Hi, 
 
 I&amp;#39;m trying to get the PWM to work to operate a vibrator connected to the nRF54L15 PDK. I&amp;#39;m basing my activity on lesson4 - pwm as I&amp;#39;m also new to Zephyr (but experienced with nrf52). 
 
 The configuration part succeeds, but then the compilation</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 13 Dec 2024 15:59:38 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/117263/compile-error-when-using-pwm-on-nrf54l15-_p_pwms_idx_0_val_channel-undeclared" /><item><title>RE: Compile error when using PWM on nRF54L15 (_P_pwms_IDX_0_VAL_channel undeclared)</title><link>https://devzone.nordicsemi.com/thread/514944?ContentTypeID=1</link><pubDate>Fri, 13 Dec 2024 15:59:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dcd4331a-4dab-43ef-b36c-31b86f737e33</guid><dc:creator>Elfving</dc:creator><description>&lt;p&gt;Great! Glad you got it solved, and shared your solution in case anyone else runs into the same thing.&lt;/p&gt;
&lt;p&gt;Let us know if there is anything else.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Elfving&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Compile error when using PWM on nRF54L15 (_P_pwms_IDX_0_VAL_channel undeclared)</title><link>https://devzone.nordicsemi.com/thread/514934?ContentTypeID=1</link><pubDate>Fri, 13 Dec 2024 15:37:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e65c41fe-ea4c-45ab-8724-af2badb0e8ab</guid><dc:creator>tf_tdm</dc:creator><description>&lt;p&gt;Thanks for your reply!&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;With help from a colleague, we identified a few issues on my end, hope this can help whoever ends up here in the future, me included:&lt;/p&gt;
&lt;p&gt;- The board chosen does not exist for this exercise, i.e. doesn&amp;#39;t have an overlay. It&amp;#39;s because I was using the **p**dk instead of the **dk**. After changing to `&lt;span style="color:rgba(86, 156, 214, 1);"&gt;-b&lt;/span&gt;&lt;span style="color:rgba(212, 212, 212, 1);"&gt; &lt;/span&gt;&lt;span style="color:rgba(206, 145, 120, 1);"&gt;nrf54l15dk&lt;/span&gt;`, I finally have all the proper definitions for the PWM module.&lt;/p&gt;
&lt;p&gt;- As the example has parts about pwm-leds and others about pwm-servo, I thought they were interchangeable. They&amp;#39;re not, the dts definition of a pwm-led compatible node or a pwm-servo compatible node are different.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Using this, at least this time the build works:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;    pwmleds {
        compatible = &amp;quot;pwm-leds&amp;quot;;
		vibrator: vibrator {
			pwms = &amp;lt;&amp;amp;pwm20 0 PWM_USEC(5) PWM_POLARITY_NORMAL&amp;gt;;
			status = &amp;quot;okay&amp;quot;;
		};
	};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I managed to get a successful build with these changes, so it&amp;#39;s already something. I don&amp;#39;t see any signal on the pin, but I think I&amp;#39;ll figure this out.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I wish Zepyhr devicetree config errors or overlays not found would be a bit more obvious than some obscure missing definitions in generated code, that makes it hard to progress.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Compile error when using PWM on nRF54L15 (_P_pwms_IDX_0_VAL_channel undeclared)</title><link>https://devzone.nordicsemi.com/thread/514902?ContentTypeID=1</link><pubDate>Fri, 13 Dec 2024 13:39:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ac3b3182-666c-4db4-bab9-9bdf978ddb7b</guid><dc:creator>Elfving</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;My immediate thought on this question is that there is something dts and sysbuild related that is not explained or is not supported by this particular DevAcademy course. &lt;a href="https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/"&gt;As you see on the right side here&lt;/a&gt;, we only have partial support for the nRF54L15 and NCS 2.8. Although this particular issue just seems to be dts related, just keep in mind that maybe not everything mentioned there will be supported in 2.8.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I am glad that you are checking out the DevAcademy and NCS though. &lt;a href="https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/nrf-connect-sdk-and-nrf5-sdk-statement"&gt;Switching from nRF5 SDK is the right choice&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;So the reason why they can just use the&amp;nbsp;&lt;a href="https://docs.zephyrproject.org/latest/doxygen/html/group__devicetree-generic-id.html#gaa49e19bbc39dc0d6f16b78a5d02482c9"&gt;DT_ALIAS in the sample is because the board allready has that alias&lt;/a&gt; defined in its dts (&lt;em&gt;aliases&lt;/em&gt;&lt;span&gt;&lt;em&gt; { ..}&lt;/em&gt;). Have you added that for the vibrator as well? If not, you&amp;nbsp;could add that, though there are ofcourse other ways you could address this as well.&amp;nbsp;&lt;a href="https://academy.nordicsemi.com/courses/nrf-connect-sdk-fundamentals/lessons/lesson-2-reading-buttons-and-controlling-leds/topic/gpio-generic-api/"&gt;The DevAcademy fundementals course&lt;/a&gt; explains these differences better than I can.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;pre class="ui-code" data-mode="text"&gt;/ {
    aliases {
        vibrator = &amp;amp;vibrator;
    };&lt;/pre&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;Regards,&lt;/div&gt;
&lt;div&gt;Elfving&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>