<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://test-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>Is there a way to re-initialize low power PWM</title><link>https://test-devzone.nordicsemi.com/f/nordic-q-a/88922/is-there-a-way-to-re-initialize-low-power-pwm</link><description>I&amp;#39;m using three low power PWM instances driving three separate IO pins open an nRF 52810 and need to be able to re-configure each of the channels on the fly to select opposite polarity. Unlike PWM duty cycle, I see no function that allows this. The polarity</description><dc:language>en-US</dc:language><generator>Telligent Community 13 Non-Production</generator><lastBuildDate>Wed, 15 Jun 2022 11:52:36 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://test-devzone.nordicsemi.com/f/nordic-q-a/88922/is-there-a-way-to-re-initialize-low-power-pwm" /><item><title>RE: Is there a way to re-initialize low power PWM</title><link>https://test-devzone.nordicsemi.com/thread/372552?ContentTypeID=1</link><pubDate>Wed, 15 Jun 2022 11:52:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1aee12bf-61a5-4171-9fe2-2cfd13b9ef00</guid><dc:creator>user15146</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;There does not seem to be an API for that. &lt;br /&gt;&lt;br /&gt;Some alternatives:&lt;/p&gt;
&lt;p&gt;1) Try creating a function for that library that just changes the polarity on the fly:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;ret_code_t low_power_pwm_set_polarity(low_power_pwm_t * p_pwm_instance, bool polarity)
{

    p_pwm_instance-&amp;gt;active_high = polarity;

    return NRF_SUCCESS;
}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;2) Maybe you can have 2 instances, only difference is the polarity. And use&amp;nbsp;low_power_pwm_stop() on the first instance, and then&amp;nbsp;low_power_pwm_start() on the other when you want to change polarity.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>