<?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 library question</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/68847/pwm-library-question</link><description>Hi Team 
 I see a post https://devzone.nordicsemi.com/f/nordic-q-a/60261/nrf52-pwm-library-or-driver?ReplySortBy=CreatedDate&amp;amp;ReplySortOrder=Ascending 
 It said &amp;quot; It is vulnerable to polarity inversions &amp;#39;. Could you help to give more explain about this</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 30 Nov 2020 12:38:18 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/68847/pwm-library-question" /><item><title>RE: PWM library question</title><link>https://devzone.nordicsemi.com/thread/282433?ContentTypeID=1</link><pubDate>Mon, 30 Nov 2020 12:38:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b65a9b57-8414-48e3-9189-1344e83ebad4</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;Hey Victor,&amp;nbsp;&lt;br /&gt;&lt;br /&gt;I believe I spoke out of turn when I said&amp;nbsp;&lt;span&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;It is vulnerable to polarity inversions&amp;quot;. An earlier version of the PWM library used the GPIOTE TOGGLE task who is vulnerable to polarity inversion if the TIMER is disabled/enabled without controlling the initial state of the GPIOTE. The newer library (nRF5 SDK 15 and newer sdks) uses the SET and CLEAR tasks which are not nearly as vulnerable to polarity inversion as the TOGGLE task.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;The only vulnerability left is if the user explicitly writes invalid top and duty-cycle values to the TIMER directly, without using the app_pwm API.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;BR,&lt;br /&gt;Håkon Holdhus&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>