<?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 do I create a random square wave by use pwm?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/62403/how-do-i-create-a-random-square-wave-by-use-pwm</link><description>Hi , Dear Nordic supports: 
 
 I am using NRF52832 for the iterative development of a product. In the previous generation of products, I used a PWM control LED flashing, whose flashing frequency is fixed and regular. However, in the current latest product</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 11 Jun 2020 12:16:35 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/62403/how-do-i-create-a-random-square-wave-by-use-pwm" /><item><title>RE: How do I create a random square wave by use pwm?</title><link>https://devzone.nordicsemi.com/thread/254482?ContentTypeID=1</link><pubDate>Thu, 11 Jun 2020 12:16:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fcc4db45-ac87-4273-aba3-b0524b73008a</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
[quote user=""]However, in the current latest product, I need it to flash at an unfixed frequency. How can I make the PWM cycle random?[/quote]
&lt;p&gt;Have you seen the &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v14.2.0/pwm_hw_example.html"&gt;PWM Driver example&lt;/a&gt;&amp;nbsp;or &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v14.2.0/pwm_example.html"&gt;the PWM Library example&lt;/a&gt;?&lt;br /&gt;From you ticket, it sounds like you will have to change the PWM channel&amp;#39;s configuration every so often.&lt;br /&gt;The former contains multiple demos for generating different PWM functionality, and it sounds like demo 1 might be exactly what you are looking for.&lt;br /&gt;&lt;br /&gt;Please do not hesitate to ask if anything still should be unclear, or in the case that you are experiencing any issues with this.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>