<?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>How to use GPIOTE and PPI to output extra 3 pwm on nRF52840 @ ncs2.9.1</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/120794/how-to-use-gpiote-and-ppi-to-output-extra-3-pwm-on-nrf52840-ncs2-9-1</link><description>Hi, 
 
 Our project need 7 seperate PWM outputs, as the nRF52840 have 4 hardware pwm, I decide to use GPIOTE with PPI to create extra 3 pwm outputs to drive Red/Green/Blue leds. 
 Is there any recommend samples on how to do it on NCS? 
 I found a few</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 24 Apr 2025 11:02:20 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/120794/how-to-use-gpiote-and-ppi-to-output-extra-3-pwm-on-nrf52840-ncs2-9-1" /><item><title>RE: How to use GPIOTE and PPI to output extra 3 pwm on nRF52840 @ ncs2.9.1</title><link>https://devzone.nordicsemi.com/thread/532793?ContentTypeID=1</link><pubDate>Thu, 24 Apr 2025 11:02:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eedec5fc-1c59-4c2b-b6b5-9806fb20994e</guid><dc:creator>Anthony Yuan</dc:creator><description>&lt;p&gt;Thanks for your reply Einar.&lt;/p&gt;
&lt;p&gt;I tried follow this &lt;a href="https://github.com/NordicPlayground/nrf52-timer-gpiote-ppi-hands-on"&gt;github repo&lt;/a&gt; to use ppi/gpiote and timer3 to generate 3 pwm channels with the same frequency r/g/b and it works.&lt;/p&gt;
&lt;p&gt;You are right, I can move 2 pwm channels which using the same frequency into one instance, and r/g/b channels into another instance. Working on that.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use GPIOTE and PPI to output extra 3 pwm on nRF52840 @ ncs2.9.1</title><link>https://devzone.nordicsemi.com/thread/532771?ContentTypeID=1</link><pubDate>Thu, 24 Apr 2025 09:39:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7b25299e-5ad0-4cc5-8847-b405e850bf6e</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;span&gt;Anthony&lt;/span&gt;,&lt;/p&gt;
&lt;p&gt;If all PWM outputs need to be fully independable, you can use the 4 PWM and use software based PWM for the others, using timer and PPI. That is supported by the PWM driver in zephyr , and you can refer to &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/99780/nrf52820-pwm-device-tree-api"&gt;this thread&lt;/a&gt; for details on how to use it. However, each of the 4 PWM instances supprot 4 channels, so you may be able to use only hardware PWM. There are some limitations here though, and all channels of the same instance need to use the same frequency (but can have different duty cycle and polarity).&lt;/p&gt;
&lt;p&gt;Br,&lt;/p&gt;
&lt;p&gt;Einar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>