<?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>sometimes PWM signal is reversed .</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/7371/sometimes-pwm-signal-is-reversed</link><description>Hi Nordics! 
 I am using app_pwm.c file in SDK 8.1, and when I use it with softdevice(advertising or data transfer event), sometimes pwm signal is reversed. 
 I guess, reversed signal&amp;#39;s reason is the BLE interrupt.
Because this problem is not occurred</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 19 Oct 2015 15:24:49 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/7371/sometimes-pwm-signal-is-reversed" /><item><title>RE: sometimes PWM signal is reversed .</title><link>https://devzone.nordicsemi.com/thread/26192?ContentTypeID=1</link><pubDate>Mon, 19 Oct 2015 15:24:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:636d4547-c8cd-45dc-9b2c-a982dc42f14f</guid><dc:creator>Stefan Birnir Sverrisson</dc:creator><description>&lt;p&gt;@plskeggs   Ok, this sounds a bit demanding task for the CPU of the nRF51. nRF51 third revision + SDK 7 + S110 7 is no better than nRF51 second revision unless you unblock the CPU. It is blocked by default in SDK 7. The guide to unblock it is &lt;a href="https://devzone.nordicsemi.com/question/18751/how-to-unblock-the-cpu-during-connection-intervals-with-s110-v710/"&gt;here&lt;/a&gt;. With the CPU unblocked, the CPU stands a better chance of performing your task.&lt;/p&gt;
&lt;p&gt;My advise for future products is to migrate to nRF52, with Cortex M4 CPU (~5x CPU power) and dedicated PWM hardware.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sometimes PWM signal is reversed .</title><link>https://devzone.nordicsemi.com/thread/26191?ContentTypeID=1</link><pubDate>Sun, 18 Oct 2015 17:39:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:89f26793-41a6-4442-8d5e-d69046f9afbf</guid><dc:creator>plskeggs</dc:creator><description>&lt;p&gt;@stefanbirnir, yes, I kept up with changes to nrf_pwm.  I&amp;#39;ve tested with both the second and third revisions, though I should probably retest 16KHz on the third just in case I missed that.  We use the PWM for motor control with a PID feedback loop; we measure the back-EMF voltage of the motor at 100 Hz by switching off PWM for 2 ms then reading the motor voltage using the ADC.  We then switch PWM back on and potentially change the duty cycle based on the PID calculations.  I understand this is a rather demanding use case for the PWM library, but running this same code on an Atmel ATMEGA328p never had this issue.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sometimes PWM signal is reversed .</title><link>https://devzone.nordicsemi.com/thread/26190?ContentTypeID=1</link><pubDate>Mon, 05 Oct 2015 09:35:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f99fcde9-0e74-428f-a2ea-2b03ccffc012</guid><dc:creator>Stefan Birnir Sverrisson</dc:creator><description>&lt;p&gt;@plseggs   Thank you for your feedback on the pwm_libarary. I assume that you evaluated the pwm_library after the november 2014 update? Are you using the second revision nRF51 hardware or the third revision? When you tried the 16kHz pwm frequency, what was the frequency of the pwm duty cycle updates?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sometimes PWM signal is reversed .</title><link>https://devzone.nordicsemi.com/thread/26189?ContentTypeID=1</link><pubDate>Sat, 03 Oct 2015 04:53:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3ecdaffd-00ca-4bef-bd1b-550927926772</guid><dc:creator>plskeggs</dc:creator><description>&lt;p&gt;@stefanbirnir, I did not have good success with the nrf_pwm library, that&amp;#39;s why I went this direction.  The nrf_pwm library was stable for low frequencies (e.g., 480Hz), but had terrible inversion problems at 16KHz.  I have been partially successful at merging the drv_timer + drv_ppi + drv_gpiote with SDK 6.1 and have gotten 2 channels working using the app_pwm library.  However, it is quite PPI-hungry, and so I have been unable to get it to work with the SD110 v7 active (which uses 8 of the 16 PPIs) while using more than 2 channels.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sometimes PWM signal is reversed .</title><link>https://devzone.nordicsemi.com/thread/26188?ContentTypeID=1</link><pubDate>Thu, 24 Sep 2015 13:21:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:58abe0b7-6b4c-445c-8a9f-22b322dd083b</guid><dc:creator>Stefan Birnir Sverrisson</dc:creator><description>&lt;p&gt;@plskeggs  For SDK 7 + S110 7, there is also the PWM library on Nordic&amp;#39;s Github, the nrf_pwm.c. I believe it has proven itself to be fairly reliable since the update in November 2014.&lt;/p&gt;
&lt;p&gt;Limitations: Maximum 4 PWM with softdevice. Maximum 62.5 KHz PWM frequency. Maximum duty cycle update frequency is somewhat lower, perhaps a few kHz, so it is really not suitable for motor control, but should be fine for LEDs. Some more info on &lt;a href="https://devzone.nordicsemi.com/question/42518/random-pwm-dutycycle-inversion-in-softdevice-80/?answer=43270#post-id-43270"&gt;this thread&lt;/a&gt; and &lt;a href="https://devzone.nordicsemi.com/question/34856/pwm-motor-control/"&gt;this thread&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sometimes PWM signal is reversed .</title><link>https://devzone.nordicsemi.com/thread/26187?ContentTypeID=1</link><pubDate>Thu, 24 Sep 2015 12:40:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:23822067-2aaf-46e1-90f1-fff4311c5818</guid><dc:creator>Stefan Birnir Sverrisson</dc:creator><description>&lt;p&gt;@GT  The PWM code that Pawel has attached on August 6th on this thread should be good for SDK 8.1.x and SDK 9.0.0, since the drv_timer + drv_ppi + drv_gpiote dependencies are present from SDK 8.1.0. Both SDK 8.x.x and 9.x.x are compatible with softdevice S110 8.0.0, see the &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.pdf.sds/nRF51_Series_Compatibility_Matrix_v2.4.pdf"&gt;nRF51 compatibility matrix&lt;/a&gt;, table 4&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sometimes PWM signal is reversed .</title><link>https://devzone.nordicsemi.com/thread/26186?ContentTypeID=1</link><pubDate>Mon, 21 Sep 2015 13:46:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f85e9a9a-affc-4a55-ac5f-82840d0c41c1</guid><dc:creator>GT</dc:creator><description>&lt;p&gt;Is there somebody willing to share a version of the latest driver for s110 8.0?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sometimes PWM signal is reversed .</title><link>https://devzone.nordicsemi.com/thread/26185?ContentTypeID=1</link><pubDate>Fri, 18 Sep 2015 11:49:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b30556d2-9aeb-48a6-9d0a-5e168f2f86a5</guid><dc:creator>Pawel Zadrozniak</dc:creator><description>&lt;p&gt;App_pwm depends on drv_timer, drv_ppi and drv_gpiote. You can modify the library and remove the driver usage (or adapt it to the older drivers) or copy those driver from new SDK, but this would also require some porting.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sometimes PWM signal is reversed .</title><link>https://devzone.nordicsemi.com/thread/26184?ContentTypeID=1</link><pubDate>Mon, 07 Sep 2015 20:01:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ff27d840-dfe6-4245-9d31-60269cca50c6</guid><dc:creator>plskeggs</dc:creator><description>&lt;p&gt;This is really great that you&amp;#39;ve fixed the PWM library problems.  Unfortunately, my company has &lt;em&gt;thousands&lt;/em&gt; of boards already programmed with Soft Device S110 7.1.0, so we are stuck (officially) with SDK 6.x or 7.x.&lt;/p&gt;
&lt;p&gt;Are there any plans to back port these fixes to the SDK 6.x nrf_pwm library (&lt;a href="https://github.com/NordicSemiconductor/nrf51-pwm-library/).?"&gt;github.com/.../).&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sometimes PWM signal is reversed .</title><link>https://devzone.nordicsemi.com/thread/26183?ContentTypeID=1</link><pubDate>Mon, 10 Aug 2015 06:31:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d93fbc97-4e73-487a-bf1e-652d2b55a5ce</guid><dc:creator>Pawel Zadrozniak</dc:creator><description>&lt;p&gt;The library uses timer, gpiote and ppi drivers, so i will bloat a little if those drivers were not included.
You can always use compiler optimization if the code size is critical. In my case - example compiled with Keil 5 has 5,5K, ARM GCC - ~7k.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sometimes PWM signal is reversed .</title><link>https://devzone.nordicsemi.com/thread/26182?ContentTypeID=1</link><pubDate>Fri, 07 Aug 2015 15:55:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:97565f08-da9b-45ac-b4b9-7481631b34d3</guid><dc:creator>Lucas</dc:creator><description>&lt;p&gt;Why does including this stuff in the project add like 10KB of code? Seems like a lot for a little PWM. Before I didn&amp;#39;t have the nrf_drv&amp;#39;s included which this relies on heavily... but still 10KB for a PWM?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sometimes PWM signal is reversed .</title><link>https://devzone.nordicsemi.com/thread/26180?ContentTypeID=1</link><pubDate>Thu, 06 Aug 2015 12:41:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6553fae0-0af4-4307-bb0e-587e5259b123</guid><dc:creator>Pawel Zadrozniak</dc:creator><description>&lt;p&gt;A little update. Now it should also work fine with 1 tick step and lower frequencies (&amp;lt;25Hz). I have made a change related to hardware timings.
Attachment: &lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/pwm_5F00_20150806.7z"&gt;pwm_20150806.7z&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sometimes PWM signal is reversed .</title><link>https://devzone.nordicsemi.com/thread/26181?ContentTypeID=1</link><pubDate>Thu, 06 Aug 2015 11:34:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:20742d9d-174f-46db-be9f-586e4ed54a2a</guid><dc:creator>Radoslaw Koppel</dc:creator><description>&lt;p&gt;&lt;strong&gt;Studionneat&lt;/strong&gt; and &lt;strong&gt;Kyu&lt;/strong&gt; -&amp;gt; There is no time to explain, try to make diff by yourself: &lt;a href="http://winmerge.org"&gt;http://winmerge.org&lt;/a&gt; :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sometimes PWM signal is reversed .</title><link>https://devzone.nordicsemi.com/thread/26179?ContentTypeID=1</link><pubDate>Thu, 06 Aug 2015 04:29:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4d9f1197-3265-4ccf-b42b-f9023a008511</guid><dc:creator>Kyu</dc:creator><description>&lt;p&gt;@Paweł Zadrożniak&lt;br /&gt;
when I test my code with using your pwm.c, I didn&amp;#39;t see any problems.
Thanks.
And I wonder what did you change.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sometimes PWM signal is reversed .</title><link>https://devzone.nordicsemi.com/thread/26178?ContentTypeID=1</link><pubDate>Wed, 05 Aug 2015 15:49:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8636b41c-43a1-4c93-8e6a-3eabc1844c7e</guid><dc:creator>StudioNeat</dc:creator><description>&lt;p&gt;Where is the change made in that file?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sometimes PWM signal is reversed .</title><link>https://devzone.nordicsemi.com/thread/26177?ContentTypeID=1</link><pubDate>Wed, 05 Aug 2015 08:27:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b3422149-dfc8-4593-be45-28e0248b1a74</guid><dc:creator>Pawel Zadrozniak</dc:creator><description>&lt;p&gt;Hi. I have fixed the small polarity issue when decreasing the duty cycle by 1 tick.
Please see attached file.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/pwm_5F00_20150805.7z"&gt;pwm_20150805.7z&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sometimes PWM signal is reversed .</title><link>https://devzone.nordicsemi.com/thread/26176?ContentTypeID=1</link><pubDate>Tue, 04 Aug 2015 08:53:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4a903484-2faa-48a3-bc48-0a7bb02f1e02</guid><dc:creator>martin-ve</dc:creator><description>&lt;p&gt;Any news here? I&amp;#39;v been running the code from pwm_20150708 since one day now without any problems. I&amp;#39;d like to know if I can keep using it or have to look for another solution.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sometimes PWM signal is reversed .</title><link>https://devzone.nordicsemi.com/thread/26194?ContentTypeID=1</link><pubDate>Mon, 03 Aug 2015 08:53:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:db638c6b-81f4-4805-8035-b7a0c4871ef2</guid><dc:creator>martin-ve</dc:creator><description>&lt;p&gt;I was having polarity issues as well on my nRF51822 using SDv8 and SDK 8.1.0. I applied the patch Radosław made just now, so now await testing.&lt;/p&gt;
&lt;p&gt;I was wondering if there is a way to detect the polarity invertion and then call nrf_drv_gpiote_out_task_trigger to correct it. This because my application relies on the pwm.&lt;/p&gt;
&lt;p&gt;Also, instead of using gpiote toggle isn&amp;#39;t it possible to use NRF_GPIOTE_POLARITY_LOTOHI/NRF_GPIOTE_POLARITY_HITOLO. This way, if you miss a gpiote event, at least the polarity isn&amp;#39;t inverted. Not sure if it is even possbile, but just a brainfart.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sometimes PWM signal is reversed .</title><link>https://devzone.nordicsemi.com/thread/26175?ContentTypeID=1</link><pubDate>Thu, 30 Jul 2015 07:09:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:afe0d443-6401-4a76-a143-2db751fdc921</guid><dc:creator>Radoslaw Koppel</dc:creator><description>&lt;p&gt;Are you writing to FLASH in your system? Can you post any simple code where this situation can be detected? I am not able to reproduce it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sometimes PWM signal is reversed .</title><link>https://devzone.nordicsemi.com/thread/26174?ContentTypeID=1</link><pubDate>Wed, 29 Jul 2015 01:00:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:85d7726e-30de-4051-b427-cf83321fa2b9</guid><dc:creator>Lucas</dc:creator><description>&lt;p&gt;I have more findings. This error only starts occurring for me after the system I am working with runs out of batteries. Once I recharge the system the issue is persistent. Even after a system software reset the inversion continues to happen. If i reprogram the system there are no inversions until the system runs out of batteries again and is recharged.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sometimes PWM signal is reversed .</title><link>https://devzone.nordicsemi.com/thread/26173?ContentTypeID=1</link><pubDate>Tue, 28 Jul 2015 05:57:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:80993f3e-3555-446e-a305-2a03cf5873e2</guid><dc:creator>Lucas</dc:creator><description>&lt;p&gt;Yes, but I had to back port it to SDK 8.0. SDK 8.1 broke bluetooth connectivity for select android phones our Google Nexus 5 doesn&amp;#39;t work with SDK 8.1 GG. Iphone and Google Nexus 4 dont seem to have a problem.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sometimes PWM signal is reversed .</title><link>https://devzone.nordicsemi.com/thread/26172?ContentTypeID=1</link><pubDate>Mon, 27 Jul 2015 05:52:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9a0ba65c-36bf-4d94-a0f9-e1bc8f3adca5</guid><dc:creator>Radoslaw Koppel</dc:creator><description>&lt;p&gt;Hey Lucas - are you using updated driver (pwm_20150708) from this topic?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sometimes PWM signal is reversed .</title><link>https://devzone.nordicsemi.com/thread/26193?ContentTypeID=1</link><pubDate>Sun, 26 Jul 2015 22:20:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0aac25fa-6688-4eab-9228-f34fdaad4db8</guid><dc:creator>Sir Oslay</dc:creator><description>&lt;p&gt;I was having the same issue with SDK 9.0.0: on power-up the PWM polarity would sometimes flip.  Based on my previous experience finding &lt;a href="https://devzone.nordicsemi.com/question/45318/bug-in-app_pwm_instance-in-sdk-900/"&gt;a bug in the PWM library&lt;/a&gt;, I decided to set values to all of the fields in the &lt;code&gt;app_pwm_cb_t&lt;/code&gt; struct created by &lt;code&gt;APP_PWM_INSTANCE()&lt;/code&gt; (they aren&amp;#39;t initialized right away in the code).  As far as I can tell, the problem went away entirely.&lt;/p&gt;
&lt;p&gt;My workaround looks like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;APP_PWM_INSTANCE(PWM1, 1);
PWM1.p_cb-&amp;gt;channels_cb[0].gpio_pin = 0;
PWM1.p_cb-&amp;gt;channels_cb[0].pulsewidth = 0x00000000;
PWM1.p_cb-&amp;gt;channels_cb[0].ppi_channels[0] = NRF_PPI_CHANNEL26;
PWM1.p_cb-&amp;gt;channels_cb[0].ppi_channels[1] = NRF_PPI_CHANNEL27;
PWM1.p_cb-&amp;gt;channels_cb[0].polarity = APP_PWM_POLARITY_ACTIVE_LOW ;
PWM1.p_cb-&amp;gt;channels_cb[0].initialized = 0;

PWM1.p_cb-&amp;gt;channels_cb[1].gpio_pin = 1;
PWM1.p_cb-&amp;gt;channels_cb[1].pulsewidth = 0x00000000;
PWM1.p_cb-&amp;gt;channels_cb[1].ppi_channels[0] = NRF_PPI_CHANNEL28;
PWM1.p_cb-&amp;gt;channels_cb[1].ppi_channels[1] = NRF_PPI_CHANNEL29;
PWM1.p_cb-&amp;gt;channels_cb[1].polarity = APP_PWM_POLARITY_ACTIVE_LOW;
PWM1.p_cb-&amp;gt;channels_cb[1].initialized = 0;

PWM1.p_cb-&amp;gt;period = 0xFFFFFFFF;
PWM1.p_cb-&amp;gt;p_ready_callback = pwm_ready_callback;
PWM1.p_cb-&amp;gt;ppi_channels[0] = NRF_PPI_CHANNEL30;
PWM1.p_cb-&amp;gt;ppi_channels[1] = NRF_PPI_CHANNEL31;
PWM1.p_cb-&amp;gt;ppi_group = NRF_PPI_CHANNEL_GROUP3;
PWM1.p_cb-&amp;gt;state = NRF_DRV_STATE_UNINITIALIZED;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I guessed at many of the values (mainly the PPI values), so YMMV.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sometimes PWM signal is reversed .</title><link>https://devzone.nordicsemi.com/thread/26171?ContentTypeID=1</link><pubDate>Fri, 24 Jul 2015 18:16:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:16e40b66-5c89-4672-a05a-0e19404052e5</guid><dc:creator>Lucas</dc:creator><description>&lt;p&gt;I set it to a constant duty cycle of 25%. Don&amp;#39;t change it constant 25% and inversions still happen. Very infrequently, but they do.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sometimes PWM signal is reversed .</title><link>https://devzone.nordicsemi.com/thread/26170?ContentTypeID=1</link><pubDate>Fri, 24 Jul 2015 18:02:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b9ff2185-ca30-405d-8837-4599922d6983</guid><dc:creator>StudioNeat</dc:creator><description>&lt;p&gt;Yes, the 110 Softdevice. The connection interval is between 20 and 75 ms.
My use case is a bit different possibly... I connect to a iOS device and stay connected for awhile. Then it might not connect for days, all the while the PWM is constantly changing. I am updating the duty now every 4ms, nearly constantly. My period is 64us, or 15.625kHz. I was having almost constant inversions if I would change the duty value by only one clock tick. I changed the code so that it would only update if it the new duty value was 2 ticks away and that is working fine, no issues that I have seen. I am using the updated PWM library included above, with one additional function that lets me set the duty from 0-512 because I need the resolution. I want to set it from 0-1024, but at my frequency I would need to set it at 1 clock tick intervals, and that isn&amp;#39;t working. Hope that helps.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>