<?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>Can I generate 20.3KHZ  on PWM with 50% duty cycle on nrf52832?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/61879/can-i-generate-20-3khz-on-pwm-with-50-duty-cycle-on-nrf52832</link><description>Hi Team, 
 
 I planning to use vibration motor with nrf52832. 
 vibration motor will give maximum buzz on 20.3KHz(50 duty cycle). 
 So my question is 
 - Can I achieve 20.3KHZ signal with PWM on nrf52832? 
 - Is there any example code for that?</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 27 May 2020 14:32:49 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/61879/can-i-generate-20-3khz-on-pwm-with-50-duty-cycle-on-nrf52832" /><item><title>RE: Can I generate 20.3KHZ  on PWM with 50% duty cycle on nrf52832?</title><link>https://devzone.nordicsemi.com/thread/252013?ContentTypeID=1</link><pubDate>Wed, 27 May 2020 14:32:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a45b42e1-ef67-4918-b2bb-56540a3b05fd</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;1/20300Hz = 49,26µs periods. At 16MHz a TIMER can count to 788 in 788*62,5ns = 49,25µs, giving a frequency of 20,305kHz If you need more precision you&amp;#39;ll need to use the PWM peripheral.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Search devzone for PWM related questions and see the&amp;nbsp;&lt;a title="Timer Example" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/nrf_dev_timer_example.html?cp=7_1_4_6_48"&gt;Timer Example&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a title="PWM Library Example" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/pwm_example.html?cp=7_1_4_6_25"&gt;PWM Library Example&lt;/a&gt;, or&amp;nbsp;&lt;a title="PWM Driver Example" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/pwm_hw_example.html?cp=7_1_4_6_24"&gt;PWM Driver Example&lt;/a&gt;.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;The PWM Library Example uses a TIMER and GPIOTE to create an HW PWM.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>