<?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>nRF5340 PWM limitations undocummented</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/119432/nrf5340-pwm-limitations-undocummented</link><description>Hi all ! 
 
 I recently faced an weird issue with a nRF5340 (on a DK board, and then a custom PCB). When writting to the PWM peripheral, configured to some GPIO pins, some remained inactives. 
 
 First, let quote the documentation : nRF5340 PWM Peripheral</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 10 Mar 2025 09:10:15 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/119432/nrf5340-pwm-limitations-undocummented" /><item><title>RE: nRF5340 PWM limitations undocummented</title><link>https://devzone.nordicsemi.com/thread/526499?ContentTypeID=1</link><pubDate>Mon, 10 Mar 2025 09:10:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:95ab5074-216b-4d36-a5a9-d49814a2edc2</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Thank you for the report. I am still unsure this is a hardware issue. I am also a little confused whether it&amp;#39;s P1.01 or P0.31 that is working for you, but by default, both of them have&amp;nbsp;purpose assigned on the nrf5340dk board:&lt;/p&gt;
&lt;p&gt;P0.31 is &lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/v3.7.99-ncs2/boards/nordic/nrf5340dk/nrf5340dk_common.dtsi#L23"&gt;LED3&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;P1.01 is &lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/v3.7.99-ncs2/boards/nordic/nrf5340dk/nrf5340_cpuapp_common.dtsi#L45"&gt;forwarded&lt;/a&gt; to network core to be &lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/v3.7.99-ncs2/boards/nordic/nrf5340dk/nrf5340_cpuapp_common.dtsi#L45"&gt;used as&amp;nbsp;an UART pin&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t see your DTS files reconfigure these nodes to any other pins, so most likely both of them&amp;nbsp;still have their assignment. Among&amp;nbsp;those, the&amp;nbsp;pin forwarding and network core UART are automatically setup without any application code, so it makes sense that P1.01 is more likely to not work.&lt;/p&gt;
&lt;p&gt;Furthermore, I see that both P0.31 and P1.01 are used in your project:&lt;br /&gt;&lt;a href="https://github.com/lheywang/Opale/blob/dev2/boards/topaze/DTSI/topaze-serial-gps.dtsi#L32"&gt;https://github.com/lheywang/Opale/blob/dev2/boards/topaze/DTSI/topaze-serial-gps.dtsi#L32&lt;br /&gt;https://github.com/lheywang/Opale/blob/dev2/boards/topaze/DTSI/topaze-outputs.dtsi#L21&lt;br /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Not related, but I am not sure if using 0xffffffff to mark a pin unused works like you are having in the topaze-serial-gps.dtsi file. I&amp;nbsp;haven&amp;#39;t seen anywhere that suggest this is an approach.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 PWM limitations undocummented</title><link>https://devzone.nordicsemi.com/thread/526437?ContentTypeID=1</link><pubDate>Sat, 08 Mar 2025 08:45:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8ded5c12-49f6-44d6-bded-b747036e48e4</guid><dc:creator>l.heywang</dc:creator><description>&lt;p&gt;Hi !&lt;br /&gt;&lt;br /&gt;I won&amp;#39;t be able to share that file, because I&amp;#39;ve &amp;quot;solved&amp;quot; the &amp;quot;issue&amp;quot; by myself a few days ago, and I don&amp;#39;t have anymore this file.&lt;br /&gt;&lt;br /&gt;If it may help, here is the source repo : &lt;a id="" href="https://github.com/lheywang/Opale/tree/dev2/boards/topaze/DTSI"&gt;https://github.com/lheywang/Opale/tree/dev2/boards/topaze/DTSI&lt;/a&gt;&lt;br /&gt;The link point to the folder where I store each overlay, per peripherals (I found this method cleaner than all in one file). The base files are simply generated by the VScode Extension.&lt;/p&gt;
&lt;p&gt;When I solved the &amp;quot;issue&amp;quot;, ther where conflict effectively (that triggered a warning on the VScode extension), and solving them made channel 1 and 2 working. The channel 3 was remaining inactive until I placed it on the port 1, where I immediately started working.&lt;br /&gt;&lt;br /&gt;And, since I&amp;#39;ve seen such limitations on the nRF54 series datasheet, I was thinking about signaling it, in case it was an error.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 PWM limitations undocummented</title><link>https://devzone.nordicsemi.com/thread/526196?ContentTypeID=1</link><pubDate>Thu, 06 Mar 2025 14:02:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:43c41784-cb76-40eb-8500-578cf03f7e7d</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Could you please share your compiled application zephyr.dts?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 PWM limitations undocummented</title><link>https://devzone.nordicsemi.com/thread/526002?ContentTypeID=1</link><pubDate>Wed, 05 Mar 2025 13:53:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fc5a7b62-ae7e-49c4-a386-06462adb3906</guid><dc:creator>l.heywang</dc:creator><description>&lt;p&gt;Hi !&lt;br /&gt;&lt;br /&gt;It&amp;#39;s not the case, since I&amp;#39;m using a custom board for the project (defined with the tool). So UART is actually on custom pins also.&lt;/p&gt;
&lt;p&gt;And I checked ALL pins, since I got this situation before, a conflict, and the pins weren&amp;#39;t working fine (logic, and this case is documented as unpredictable behavior on the documentation). So, I&amp;#39;ve listed all pins and their functions before writing here.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;And the fact that I&amp;#39;ve seen this kind of limitations on other chips give me the hint that is more something documentation related rather than something linked to my software config.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 PWM limitations undocummented</title><link>https://devzone.nordicsemi.com/thread/525980?ContentTypeID=1</link><pubDate>Wed, 05 Mar 2025 13:00:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0115ee5a-70fe-4d26-982b-bf5a1a1122f0</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;I think you might have a pin assignment conflict. By default, the nRF5340 DK has P1.01 used for UART TXD. Could you please check the DeviceTree&amp;nbsp;to see if it is still being used for that purpose?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 PWM limitations undocummented</title><link>https://devzone.nordicsemi.com/thread/525787?ContentTypeID=1</link><pubDate>Tue, 04 Mar 2025 16:09:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e49d7a71-41f4-491a-a79a-4fc86247202f</guid><dc:creator>l.heywang</dc:creator><description>&lt;p&gt;Hi !&lt;br /&gt;&lt;br /&gt;I&amp;#39;m sorry for the comment that confused you. I&amp;#39;m working on a project with multiples persons (a friend and teachers). Furthermore, I own an nRF5340DK, and we have developed our custom PCB.&lt;/p&gt;
&lt;p&gt;Since I&amp;#39;m the only one who own a DK, the unused comment is more for the others (In the meaning : Don&amp;#39;t use it, it won&amp;#39;t work since the pins aren&amp;#39;t matched). I personally use the DK and a custom pinctrl overlay that align pins in a row, making it easier to plug scope and develop.&lt;/p&gt;
&lt;p&gt;So yes, the &amp;quot;unused&amp;quot; overlay is, in fact, used. &lt;/p&gt;
&lt;p&gt;And while I was developing on it, when the last channel was configured on port 1, it remains at a high state, ignoring any Zephyr API call to set the pulse length. And immediately after setting it to port 0 (same as the others), it started working.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 PWM limitations undocummented</title><link>https://devzone.nordicsemi.com/thread/525607?ContentTypeID=1</link><pubDate>Mon, 03 Mar 2025 21:55:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:885f8ede-2f28-4908-8c47-af14612f99ab</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hello Heywang,&lt;/p&gt;
&lt;p&gt;I am a little confused with the description here. I understand that you posted two code snippets of a pinctrl node, with the first&amp;nbsp;snippet shows something that works, while the second shows something that does not work.&lt;/p&gt;
&lt;p&gt;However, the two snippets only differ in the pwm0_dk sub node, which has the comment that&amp;nbsp;it is unused. The other sub node, pwm0_topaze, is the same in the two snippets.&lt;/p&gt;
&lt;p&gt;Could you please clarify some more here?&lt;/p&gt;
&lt;p&gt;Hieu&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>