<?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 Always Busy</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/7928/pwm-always-busy</link><description>Hello, 
 I am currently working on a project where I need to be able to control an RGB by writing the PWM duty cycle to a custom BLE Service and Characteristic. I am using SDK 8.1 and s110 SoftDevice 8.0. I am also using the app_pwm library from the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 27 Jan 2016 03:20:02 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/7928/pwm-always-busy" /><item><title>RE: PWM Always Busy</title><link>https://devzone.nordicsemi.com/thread/28336?ContentTypeID=1</link><pubDate>Wed, 27 Jan 2016 03:20:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:80a05f0e-d23f-450b-b0ea-84d5af717f88</guid><dc:creator>Andrew Ong</dc:creator><description>&lt;p&gt;Another solution is to increase the interrupt priority in app_pwm.c from APP_IRQ_PRIORITY_LOW to APP_IRQ_PRIORITY_HIGH.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PWM Always Busy</title><link>https://devzone.nordicsemi.com/thread/28335?ContentTypeID=1</link><pubDate>Wed, 01 Jul 2015 19:01:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:56f57b5e-b069-42e1-b84c-cecc05efd069</guid><dc:creator>Cory Mast</dc:creator><description>&lt;p&gt;Thank you RK for your help. I was running them in an interrupt context. I was able to solve my problem by using the scheduler and have my LED functions execute in main context.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PWM Always Busy</title><link>https://devzone.nordicsemi.com/thread/28334?ContentTypeID=1</link><pubDate>Wed, 01 Jul 2015 00:38:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:55116f0c-c474-4250-9538-0ae698b873b0</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;What context are you in when you&amp;#39;re doing this? Are you in an interrupt context which has higher interrupt priority than whatever the PWM module uses? If so then your spin loop never lets the module actually get the interrupt it needs to count the two ticks required to know it&amp;#39;s set the new duty cycle and mark itself not busy so it just sits there melting the CPU spinning forever.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>