<?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>How I can control Pin0.8 Pin0.9 as PWM Channel to output PWM wave I want?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/38939/how-i-can-control-pin0-8-pin0-9-as-pwm-channel-to-output-pwm-wave-i-want</link><description>I reference demo1 of PWM driver example in SDK15.2.0, I make myself PWM driver. the official demo1 use pin17-20 as PWM channal1-channel4, but I use Pin9-P12, I modify the config file, like follow //official configure #define LED_START 17 #define LED_1</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 27 Sep 2018 06:56:31 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/38939/how-i-can-control-pin0-8-pin0-9-as-pwm-channel-to-output-pwm-wave-i-want" /><item><title>RE: How I can control Pin0.8 Pin0.9 as PWM Channel to output PWM wave I want?</title><link>https://devzone.nordicsemi.com/thread/150593?ContentTypeID=1</link><pubDate>Thu, 27 Sep 2018 06:56:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:14b81695-34bc-412c-a954-0012310fd24b</guid><dc:creator>willyoda</dc:creator><description>&lt;p&gt;thank guys, the reason just is that. I already control the PINS.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How I can control Pin0.8 Pin0.9 as PWM Channel to output PWM wave I want?</title><link>https://devzone.nordicsemi.com/thread/150544?ContentTypeID=1</link><pubDate>Wed, 26 Sep 2018 16:54:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8ef2ad43-f701-44d4-80f4-18baf4a8e3e0</guid><dc:creator>hmolesworth</dc:creator><description>&lt;p&gt;Pins 9 and 10 actually default to NFC pins, so must be reverted to i/o pins before they will be useful on your design. Typically you can do this by defining&amp;nbsp;CONFIG_NFCT_PINS_AS_GPIOS in your project options; this code in system_nrf52.c then puts the pins into the i/o mode.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;void SystemInit(void)
{

    /* Configure NFCT pins as GPIOs if NFCT is not to be used in your code. If CONFIG_NFCT_PINS_AS_GPIOS is not defined,
       two GPIOs (see Product Specification to see which ones) will be reserved for NFC and will not be available as
       normal GPIOs. */
    #if defined (CONFIG_NFCT_PINS_AS_GPIOS)
        if ((NRF_UICR-&amp;gt;NFCPINS &amp;amp; UICR_NFCPINS_PROTECT_Msk) == (UICR_NFCPINS_PROTECT_NFC &amp;lt;&amp;lt; UICR_NFCPINS_PROTECT_Pos)){
            NRF_NVMC-&amp;gt;CONFIG = NVMC_CONFIG_WEN_Wen &amp;lt;&amp;lt; NVMC_CONFIG_WEN_Pos; // Write Enable
            while (NRF_NVMC-&amp;gt;READY == NVMC_READY_READY_Busy){}
            NRF_UICR-&amp;gt;NFCPINS &amp;amp;= ~UICR_NFCPINS_PROTECT_Msk;
            while (NRF_NVMC-&amp;gt;READY == NVMC_READY_READY_Busy){}
            NRF_NVMC-&amp;gt;CONFIG = NVMC_CONFIG_WEN_Ren &amp;lt;&amp;lt; NVMC_CONFIG_WEN_Pos; // Read-only Enable
            while (NRF_NVMC-&amp;gt;READY == NVMC_READY_READY_Busy){}
            // UICR changes require a reset to be effective
            NVIC_SystemReset();
        }
    #endif&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How I can control Pin0.8 Pin0.9 as PWM Channel to output PWM wave I want?</title><link>https://devzone.nordicsemi.com/thread/150543?ContentTypeID=1</link><pubDate>Wed, 26 Sep 2018 16:53:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:292215e6-1dff-4ecc-847e-e6069e77f847</guid><dc:creator>WestCoastDaz</dc:creator><description>&lt;p&gt;Can you please post some of your code?&amp;nbsp; By default pin 9 and 10 and used by the NFC peripheral you need to define CONFIG_NFCT_PINS_AS_GPIOS in your project settings or makefile to get them to be GPIOs.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>