<?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 on port 1</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/44558/pwm-on-port-1</link><description>How do I use PWM on a GPIO on port 1 on SDK 15.2? The PWM library examples only sends in the pin number and seems to assume port 0. This answer seemed a bit complex and I&amp;#39;m not sure if it is outdated https://devzone.nordicsemi.com/f/nordic-q-a/22983/how</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 08 Mar 2019 08:02:40 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/44558/pwm-on-port-1" /><item><title>RE: PWM on port 1</title><link>https://devzone.nordicsemi.com/thread/174949?ContentTypeID=1</link><pubDate>Fri, 08 Mar 2019 08:02:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:80a31350-0623-4314-a33f-72fa34915086</guid><dc:creator>vist</dc:creator><description>&lt;p&gt;Great, thank you. I think adding that to the example would make it more clear.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PWM on port 1</title><link>https://devzone.nordicsemi.com/thread/174943?ContentTypeID=1</link><pubDate>Fri, 08 Mar 2019 07:44:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:71d31c73-d310-4648-87e2-829f5d0b3e10</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;You can replace&amp;nbsp;BSP_LED_0 with the&amp;nbsp;NRF_GPIO_PIN_MAP(port, pin) macro to specify the port number.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PWM on port 1</title><link>https://devzone.nordicsemi.com/thread/174939?ContentTypeID=1</link><pubDate>Fri, 08 Mar 2019 07:36:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fffd84cc-510d-41ca-a2dc-4b2f7c1c8253</guid><dc:creator>vist</dc:creator><description>&lt;p&gt;I can use the PWM driver if that is the recommended library. But as far as I can see it has the same issue. The port doesn&amp;#39;t seem to be specified in the PWM driver example. Below from demo3 code.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt; nrf_drv_pwm_config_t const config0 =
    {
        .output_pins =
        {
            BSP_LED_0 | NRF_DRV_PWM_PIN_INVERTED, // channel 0
            NRF_DRV_PWM_PIN_NOT_USED,             // channel 1
            NRF_DRV_PWM_PIN_NOT_USED,             // channel 2
            NRF_DRV_PWM_PIN_NOT_USED,             // channel 3
        },
        .irq_priority = APP_IRQ_PRIORITY_LOWEST,
        .base_clock   = NRF_PWM_CLK_125kHz,
        .count_mode   = NRF_PWM_MODE_UP,
        .top_value    = 25000,
        .load_mode    = NRF_PWM_LOAD_COMMON,
        .step_mode    = NRF_PWM_STEP_AUTO
    };&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PWM on port 1</title><link>https://devzone.nordicsemi.com/thread/174938?ContentTypeID=1</link><pubDate>Fri, 08 Mar 2019 07:29:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2649e3c5-57b7-4ec8-a6d2-eb3f830aa68c</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I would recommend using the PWM &lt;a href="https://www.nordicsemi.com/DocLib/Content/SDK_Doc/nRF5_SDK/v15-3-0/pwm_hw_example"&gt;driver &lt;/a&gt;instead because it uses the PWM peripheral. Not TIMERS+PPI+GPIOTE&amp;nbsp;like the PWM library does (initially made for the 51 that didn&amp;#39;t&amp;nbsp;have dedicated&amp;nbsp;PWM HW).&amp;nbsp;However, if you prefer using the library, let me know, and I will find out how you can use port 1.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>