<?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>nRF52 PWM frequency question</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/11649/nrf52-pwm-frequency-question</link><description>Hi, 
 By using the PWM exampl in SDK 0.9.2, I can generate a 1MHz PWM signal without problem.
However, it seems that the function provided by SDK can just set upto 1MHz PWM? 
 I am using fillowing MACRO provided by SDK: 
 #define APP_PWM_DEFAULT_CONFIG_1CH</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 01 Feb 2016 09:47:32 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/11649/nrf52-pwm-frequency-question" /><item><title>RE: nRF52 PWM frequency question</title><link>https://devzone.nordicsemi.com/thread/44021?ContentTypeID=1</link><pubDate>Mon, 01 Feb 2016 09:47:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5ef88d3c-8576-48cb-9aa8-a9ea90a0d072</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Hi Nevill,&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;By the way, nRF52 do have PWM
peripheral, why the example still
using timer and PPI for PWM function?
Is there any example to show how to
use the real PWM peripheral?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This is because the SDK did not still implement the PWM hardware driver, it probably will come in the next release, I hope.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Also, can this pwm library been use
with SD? I can&amp;#39;t get PWM out put if I
try to config it in beacon example
(set before the SD is init)&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Yes This library should work along side with SD, that was one of the main purpose of this driver.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Is there any way to get more higher
frequency than 1MHz?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Its possible, You need to modify app_pwm macros and functions for this , so that they interpret the period_us values like you want.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;pwm_calculate_timer_frequency
nrf_drv_timer_us_to_ticks
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I do not recommend this last step as I do not know the side effect of it. After changing those you are on your own.&lt;/p&gt;
&lt;p&gt;Good luck&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>