<?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 options when using FreeRTOS and SoftDevice</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/55841/pwm-options-when-using-freertos-and-softdevice</link><description>Hi, 
 I&amp;#39;m developing a BLE application that is also using FreeRTOS. 
 I also need to use PWM to control an LED (mainly because the requirements define LED patterns, which is best accomplished using PWM; otherwise I would just use the FreeRTOS timer).</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 21 Apr 2020 13:24:36 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/55841/pwm-options-when-using-freertos-and-softdevice" /><item><title>RE: PWM options when using FreeRTOS and SoftDevice</title><link>https://devzone.nordicsemi.com/thread/245853?ContentTypeID=1</link><pubDate>Tue, 21 Apr 2020 13:24:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:91286d4c-09cc-44f2-9973-854f3a3d0318</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="https://devzone.nordicsemi.com/members/aurel"&gt;Aurélien&lt;/a&gt;,&lt;/p&gt;
[quote user="Aurel"]Isn&amp;#39;t it more appropriate to use a custom hardware timer for low power pwm ?[/quote]
&lt;p&gt;To achieve proper low power and accurate PWM it would be appropriate to use a custom hardware timer. For some this choice is not an option due to cost/complexity reasons.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PWM options when using FreeRTOS and SoftDevice</title><link>https://devzone.nordicsemi.com/thread/245804?ContentTypeID=1</link><pubDate>Tue, 21 Apr 2020 10:24:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7ff03a1e-c048-4f5a-a085-0376896f3635</guid><dc:creator>Aurele</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Is it advised to use low power PWM with FreeRTOS ? I&amp;#39;m asking because i know this is a software pwm and it&amp;nbsp;is using app_timer that is using xTimerTask. All FreeRTOS timer handler are called from a task context. Isn&amp;#39;t it more appropriate to use a custom hardware timer for low power pwm ?&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;Aur&amp;eacute;lien&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PWM options when using FreeRTOS and SoftDevice</title><link>https://devzone.nordicsemi.com/thread/227597?ContentTypeID=1</link><pubDate>Mon, 06 Jan 2020 08:53:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:315b5220-4e99-43fc-aa70-9acbc2eac202</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Sorry for the late reply, just came back from the holidays.&lt;/p&gt;
&lt;p&gt;The low power PWM does have automated change of duty cycle like softblink. App needs to wakeup in timer callbacks and do the change using&amp;nbsp;low_power_pwm_duty_set&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PWM options when using FreeRTOS and SoftDevice</title><link>https://devzone.nordicsemi.com/thread/226592?ContentTypeID=1</link><pubDate>Fri, 20 Dec 2019 14:03:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cc38afd1-c72f-4c38-bb33-706057dcb84a</guid><dc:creator>Tim Adu</dc:creator><description>&lt;p&gt;Thank you Susheel,&lt;/p&gt;
&lt;p&gt;I got it to work. One last question: how would you go about implementing a LED fade in/out pattern?&lt;br /&gt;The LED softblink library made it easy by having a &lt;strong&gt;duty_cycle_step&lt;/strong&gt; parameter. Is there a way to do it with the Low power PWM?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PWM options when using FreeRTOS and SoftDevice</title><link>https://devzone.nordicsemi.com/thread/226540?ContentTypeID=1</link><pubDate>Fri, 20 Dec 2019 11:48:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5d529c4d-7620-49f1-911d-ed0f03be1756</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Hi Adu,&lt;/p&gt;
&lt;p&gt;Softblink is a simple library mainly used for LED softblink application and it internally uses low power PWM.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;APP PWM uses PPI/GPIOTE and few other resources to abstract more functionality to the app.&lt;/p&gt;
&lt;p&gt;For your use case using low power pwm seems to fit fine even though you are using FreeRTOS. Just remember that you need to include app_timer_freertos.c instead of app_timer.c in your&amp;nbsp; project as low power pwm library uses app_timer.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>