<?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 driver - invert pin</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/26371/pwm-driver---invert-pin</link><description>Hi, 
 I&amp;#39;m using nRF PWM Driver and I didn&amp;#39;t find the way, how to invert logic of PWM. I would like to reach this behaviour: 
 
 If I set seq_value=0, I want to have
PWM signal which is at logic zero for
a whole period. 
 If I set
seq_value=280</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 15 Mar 2021 08:30:31 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/26371/pwm-driver---invert-pin" /><item><title>RE: PWM driver - invert pin</title><link>https://devzone.nordicsemi.com/thread/299675?ContentTypeID=1</link><pubDate>Mon, 15 Mar 2021 08:30:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:97a42652-3402-40f8-b2ac-41e2e5ff5d86</guid><dc:creator>exet</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;    nrf_drv_pwm_config_t const config0 =
    {
        .output_pins =
        {
            CHANNEL0  // channel 0
        },
        .irq_priority = APP_IRQ_PRIORITY_LOWEST,
        .base_clock   = NRF_PWM_CLK_1MHz,
        .count_mode   = NRF_PWM_MODE_UP,
        .top_value    = m_pwm0_top,
        .load_mode    = NRF_PWM_LOAD_INDIVIDUAL,
        .step_mode    = NRF_PWM_STEP_AUTO
    };
    APP_ERROR_CHECK(nrf_drv_pwm_init(&amp;amp;m_pwm0, &amp;amp;config0, pwm0_handler));

    m_pwm0_seq_values.channel_0 = pwn_level | (1 &amp;lt;&amp;lt; 15);

    (void)nrf_drv_pwm_simple_playback(&amp;amp;m_pwm0, &amp;amp;m_pwm0_seq, 1,
                                      NRF_DRV_PWM_FLAG_LOOP);&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PWM driver - invert pin</title><link>https://devzone.nordicsemi.com/thread/286624?ContentTypeID=1</link><pubDate>Mon, 28 Dec 2020 03:48:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:de7ca393-3d1d-40ab-b9f6-7ee1fae00c35</guid><dc:creator>refer_pin</dc:creator><description>&lt;p&gt;Hello, where in your program did you add this?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PWM driver - invert pin</title><link>https://devzone.nordicsemi.com/thread/103775?ContentTypeID=1</link><pubDate>Fri, 27 Oct 2017 12:53:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:818a8ede-6f71-4686-be0c-cc31db0612b1</guid><dc:creator>Michal L.</dc:creator><description>&lt;p&gt;Solved myself. It was necessary to add 1 at specific bit position in the seq value:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;seq_values-&amp;gt;channel_0 = value | (1 &amp;lt;&amp;lt; 15);
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>