<?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>Changing connection interval cause issue with PWM</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/14732/changing-connection-interval-cause-issue-with-pwm</link><description>Edit 2: Files need to reproduce the issue described in this questions: 
 pwm_conn_itvl_bug_files.zip 
 To reproduce the issue please just replace the main.c and nrf_drv_config.h into a ble_app_uart example in SDK v10.0.0, and put the project files into</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 08 Jul 2016 09:42:15 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/14732/changing-connection-interval-cause-issue-with-pwm" /><item><title>RE: Changing connection interval cause issue with PWM</title><link>https://devzone.nordicsemi.com/thread/56233?ContentTypeID=1</link><pubDate>Fri, 08 Jul 2016 09:42:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5b7899ea-6539-4da0-b7a0-825ee51d86d4</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Sorry for the late follow up. I was caught up with some emergent work.&lt;/p&gt;
&lt;p&gt;Thanks Stefan. This seems to be exactly the problem and its solution. And sorry about the inconvenience about the file. I will have it fixed so people would not meet the same issue.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing connection interval cause issue with PWM</title><link>https://devzone.nordicsemi.com/thread/56232?ContentTypeID=1</link><pubDate>Fri, 01 Jul 2016 16:30:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:51cae908-cd26-4ada-9bbc-57a38c97e602</guid><dc:creator>Stefan Birnir Sverrisson</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I tried your main.c file with SDK ble_app_uart example. I had to include several libraries and drivers. Could not find ir_raw.h so I just did not include that in the project. I set the duty cycle to 65% to see the pwm waveform on pin 29&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;while (app_pwm_channel_duty_set(&amp;amp;PWM, 0, 65) == NRF_ERROR_BUSY);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I also set the BLE connection timeout to 16000 ms. This is probably the cause for the invalid_parameters error. It seems that the timeout needs to be more than two times the connection interval in order to allow for at least one packet retransmit before disconnecting&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#define MIN_CONN_INTERVAL               MSEC_TO_UNITS(2000, UNIT_1_25_MS)
#define MAX_CONN_INTERVAL               MSEC_TO_UNITS(3000, UNIT_1_25_MS)
#define CONN_SUP_TIMEOUT                MSEC_TO_UNITS(16000, UNIT_10_MS)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;On my logical analyser, the PWM period seems consistently 27us with these settings.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing connection interval cause issue with PWM</title><link>https://devzone.nordicsemi.com/thread/56231?ContentTypeID=1</link><pubDate>Tue, 28 Jun 2016 07:50:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6b116fca-a9d8-45be-971d-fb8428dd3d22</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;@stefanbirnir: I have attached the main.c that could reproduce this issue. I believe all you need to do is replace it into SDK v10&amp;#39;s ble_app_uart and adjust &lt;code&gt;MIN_CONN_INTERVAL&lt;/code&gt;, &lt;code&gt;MAX_CONN_INTERVAL&lt;/code&gt; and the duty value in my &lt;code&gt;pwm_init()&lt;/code&gt; to see different wrong waveform generated when the interval values is anywhere above 2000.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing connection interval cause issue with PWM</title><link>https://devzone.nordicsemi.com/thread/56230?ContentTypeID=1</link><pubDate>Mon, 27 Jun 2016 14:33:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6b01fa44-aa59-45cd-9739-f5b73b571ab0</guid><dc:creator>Stefan Birnir Sverrisson</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I can not reproduce this issue using pwm library. Perhaps you can commit your whole project.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>