<?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>what is difference between pwm driver and pwm library example</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/24314/what-is-difference-between-pwm-driver-and-pwm-library-example</link><description>Hi. 
 In SDK 14.0 examples, there are two examples for pwm.
I analyzed both example.
pwm driver example source looks like that it use pwm peripheral driver source.
And pwm library source looks like that it use timer and ppi and gpio drivers. 
 Is</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 14 Aug 2017 07:39:59 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/24314/what-is-difference-between-pwm-driver-and-pwm-library-example" /><item><title>RE: what is difference between pwm driver and pwm library example</title><link>https://devzone.nordicsemi.com/thread/95729?ContentTypeID=1</link><pubDate>Mon, 14 Aug 2017 07:39:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0682ad98-0812-4f30-a0f8-5bd6e91909b3</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Hi Choi,&lt;/p&gt;
&lt;p&gt;you are correct.  The PWM driver (&lt;code&gt;nrf_drv_pwm.c&lt;/code&gt;) uses the &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/pwm.html?cp=2_1_0_46#concept_pzc_1pw_nr"&gt;PWM peripheral&lt;/a&gt;, while the PWM library(&lt;code&gt;app_pwm.c&lt;/code&gt;) uses the TIMER, PPI and GPIOTE peripherals.&lt;/p&gt;
&lt;p&gt;Thus, the difference is that the PWM driver uses one dedicated hardware peripheral to create PWM signal, while the PWM library uses multiple peripherals to do the same.&lt;/p&gt;
&lt;p&gt;I recommend using the PWM peripheral, i.e. the &lt;code&gt;nrf_drv_pwm.c&lt;/code&gt; driver. If you need more than 12 PWM channels then you can use the app_pwm.c library to create additional signals.&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Bjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>