<?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>PWM Duty Cycle update best practices</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/2245/pwm-duty-cycle-update-best-practices</link><description>Because of the limitation in the GPIOTE hardware that only one channel can be connected per GPIO , care must be taken when changing a PWM duty cycle. If for instance the compare events that each trigger a GPIOTE toggle happen in the same clock cycle,</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 24 Nov 2014 08:29:45 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/2245/pwm-duty-cycle-update-best-practices" /><item><title>RE: PWM Duty Cycle update best practices</title><link>https://devzone.nordicsemi.com/thread/9456?ContentTypeID=1</link><pubDate>Mon, 24 Nov 2014 08:29:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b9cbe2a0-8553-4772-bb1a-1f8cde7b7aaa</guid><dc:creator>aaronxu</dc:creator><description>&lt;p&gt;Anyone have example code with softdevice or without softdevice?
please post one, thanks :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PWM Duty Cycle update best practices</title><link>https://devzone.nordicsemi.com/thread/9452?ContentTypeID=1</link><pubDate>Wed, 24 Sep 2014 06:46:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f6924e05-4942-4fcd-be27-abf40456c77f</guid><dc:creator>mst</dc:creator><description>&lt;p&gt;Thanks for taking the effort to solve this! I cannot oversee all issues/race conditions, but a first sight using the timeslot API seems to be a bit overkill... For my application it would not be an issue if the changing of the PWM is delayed for a very short time by some high prio interrupts, the main issue now is that the PWM timer is stopped and restarted. In between, there is no PWM output on the desired pin (for an amount of time influenced by high prio interrupts) causing the flickering. The noglitch version currently in the repository seems to make a nice step towards keeping the PWM timer running and updating compare registers. Wouldn&amp;#39;t it be possible to further build on this approach and solve the currently existing errors??&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PWM Duty Cycle update best practices</title><link>https://devzone.nordicsemi.com/thread/9451?ContentTypeID=1</link><pubDate>Tue, 23 Sep 2014 15:34:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9d469a92-4651-4531-b7ab-ccd43b112594</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;I wrote the original driver, but not the noglitch one. It seems there are some issues in the noglitch version that remain to be solved.&lt;/p&gt;
&lt;p&gt;I am considering rewriting the entire thing so that we only need a single driver that solves both problems.
Unless anyone else have any good ideas I believe I need to ensure that the PWM interrupt can run without danger of higher priority interrupts superseding it, otherwise I can&amp;#39;t think of a way to take care of all possible race conditions.&lt;/p&gt;
&lt;p&gt;I believe this solution will require the PWM driver to use interrupt priority 0 when the SoftDevice is not present, and it will have to use the timeslot API in S110 v7 or later when the SoftDevice is running, to make sure that the PWM&amp;#39;s can be updates safely without incurring glitches in the output.&lt;/p&gt;
&lt;p&gt;I can&amp;#39;t make any promises on the timing yet, a new driver will be released when you least expect it :P&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PWM Duty Cycle update best practices</title><link>https://devzone.nordicsemi.com/thread/9450?ContentTypeID=1</link><pubDate>Wed, 17 Sep 2014 11:09:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:813d7655-92d1-4c18-ac4b-b7719b33d63e</guid><dc:creator>mst</dc:creator><description>&lt;p&gt;Anyone any progress on this?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PWM Duty Cycle update best practices</title><link>https://devzone.nordicsemi.com/thread/9455?ContentTypeID=1</link><pubDate>Mon, 08 Sep 2014 12:18:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4176bcf3-a63e-4a20-8dbc-886edaaf563a</guid><dc:creator>Magnier</dc:creator><description>&lt;p&gt;No HardFault for me, I could get a PWM waveform under certain conditions (never set value to 0 or max, and it worked only when increasing duty cycle).&lt;/p&gt;
&lt;p&gt;Too bad there&amp;#39;s no working example in the repo nor author contact...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PWM Duty Cycle update best practices</title><link>https://devzone.nordicsemi.com/thread/9449?ContentTypeID=1</link><pubDate>Mon, 08 Sep 2014 09:36:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bd75db17-c7c5-4452-9fc6-6c009bacb705</guid><dc:creator>Jakub Luzny</dc:creator><description>&lt;p&gt;I&amp;#39;m getting HardFault&amp;#39;s in my code when setting PWM value using noglitch version of library. Has anyone got in working?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PWM Duty Cycle update best practices</title><link>https://devzone.nordicsemi.com/thread/9454?ContentTypeID=1</link><pubDate>Mon, 08 Sep 2014 09:03:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:be894f25-e880-405a-93ff-40181b34671a</guid><dc:creator>mst</dc:creator><description>&lt;p&gt;Still several bugs in the code (e.g. setting the pwm to the same value not properly handled). Hope it is solved soon. Will take a closer look as well.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PWM Duty Cycle update best practices</title><link>https://devzone.nordicsemi.com/thread/9453?ContentTypeID=1</link><pubDate>Mon, 08 Sep 2014 08:21:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fca043c2-2ce9-48b8-98f9-9f5ef5120cd9</guid><dc:creator>mst</dc:creator><description>&lt;p&gt;So far, I&amp;#39;m also not able to get it working...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PWM Duty Cycle update best practices</title><link>https://devzone.nordicsemi.com/thread/9448?ContentTypeID=1</link><pubDate>Thu, 04 Sep 2014 20:00:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6108b1c1-172b-4208-95da-6a127dfec66a</guid><dc:creator>Magnier</dc:creator><description>&lt;p&gt;The PWM library on &lt;a href="https://github.com/NordicSemiconductor/nrf51-pwm-library"&gt;Nordic GitHub page&lt;/a&gt; has been updated a few days ago with a no glitch version using PPI, Timer compare and capture tasks.&lt;/p&gt;
&lt;p&gt;Unfortunately I couldn&amp;#39;t get it to work (using the sin. example), has someone succeeded to use it ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PWM Duty Cycle update best practices</title><link>https://devzone.nordicsemi.com/thread/9447?ContentTypeID=1</link><pubDate>Thu, 28 Aug 2014 16:40:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cee4e04c-174a-4115-bdf9-64ee828dd62c</guid><dc:creator>mst</dc:creator><description>&lt;p&gt;Any news on this? I have some issues with changing the PWM value as well, similar to the question asked here: &lt;a href="https://devzone.nordicsemi.com/question/15638/nrf_pwm-signal-glitches-flickering-on-nrf_pwm_set_value/"&gt;nrf_pwm signal glitches (&amp;quot;flickering&amp;quot;) on nrf_pwm_set_value()&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Especially during a BLE connection, frequently changing the PWM value, in order to &amp;quot;fade-in&amp;quot; an attached LED, results in an unstable PWM and flickering LED.&lt;/p&gt;
&lt;p&gt;Hope anyone has some info on this...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>