<?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>Cannot receive UART data</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/56659/cannot-receive-uart-data</link><description>I&amp;#39;m using the nRF52 DK with SDK 15.3.0. At this point I&amp;#39;m trying to get a UART loop back to work by tying the TX pin (P0.8) to the RX pin (P0.9). I have verified that the RX GPIO is set for an input and the input buffer is connected. My project is based</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 17 Jan 2020 21:12:39 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/56659/cannot-receive-uart-data" /><item><title>RE: Cannot receive UART data</title><link>https://devzone.nordicsemi.com/thread/229712?ContentTypeID=1</link><pubDate>Fri, 17 Jan 2020 21:12:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b1a96417-9ae5-4b6f-9f04-9788ffa0e44e</guid><dc:creator>mlease2020</dc:creator><description>&lt;p&gt;OK, that makes sense. In my haste I didn&amp;#39;t notice it was the &amp;quot;P0.09&amp;quot; signal connected to P6 instead of &amp;quot;P0.09/NFC1&amp;quot;. The way the schematic is done is less than clear.&lt;/p&gt;
&lt;p&gt;Thanks for the help.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Cannot receive UART data</title><link>https://devzone.nordicsemi.com/thread/229711?ContentTypeID=1</link><pubDate>Fri, 17 Jan 2020 21:05:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9d8e4130-6494-445d-8f0c-58152353e723</guid><dc:creator>hmolesworth</dc:creator><description>&lt;p&gt;I thought you were on custom hardware, but it using the development kit nRF52DK note that R25 and C42 are populated by default, thus loading the pin with 300pF, and that R28 is not connected by default which means that P0.09 doesn&amp;#39;t connect to P12, P6 or P17 despite the label. I imagine removing R25 and shorting R27 is what you would have intended .&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Cannot receive UART data</title><link>https://devzone.nordicsemi.com/thread/229704?ContentTypeID=1</link><pubDate>Fri, 17 Jan 2020 18:54:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:52a0f72c-7595-4ba3-aeb4-fb91a74c83d2</guid><dc:creator>mlease2020</dc:creator><description>&lt;p&gt;Sorry, I didn&amp;#39;t think about saying I&amp;#39;m already configuring the NFC pins as GPIO with that same code (with the reset after writing to the UICR). I see 0xfffffffe in the UICR NFCPINS register so that appears to be working.&lt;/p&gt;
&lt;p&gt;Digging a little deeper, before calling &amp;quot;app_uart_init&amp;quot; I have the pin set as input with the input buffer connected and the pull-up enabled. On the scope, I see 0V on the pin. Through the debugger, if I change the pin to an output it is always low even after setting it high so something still isn&amp;#39;t right.&lt;/p&gt;
&lt;p&gt;Also, I changed my RX input to P0.05 and now I do get the APP_UART_DATA_READY and the correct data is received. That&amp;#39;s isn&amp;#39;t an option for my custom board, I still need to get P0.09 to work.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Cannot receive UART data</title><link>https://devzone.nordicsemi.com/thread/229504?ContentTypeID=1</link><pubDate>Fri, 17 Jan 2020 01:35:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:88885d9a-9986-4bcf-a862-be77f33e4f57</guid><dc:creator>hmolesworth</dc:creator><description>&lt;p&gt;Pin P0.09 is an NFC pin and must be configured to work as an io pin before use as Rx or Tx. Add&amp;nbsp;&lt;span&gt;&lt;em&gt;CONFIG_NFCT_PINS_AS_GPIOS&lt;/em&gt; in the Project-&amp;gt;Options-&amp;gt;Common-&amp;gt;Preposseor-&amp;gt;Preprocessor Definitions&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;This will activate the following one-time code snippet which permanently maps P0.9 and P0.10 as GPIO - see this code in System_nrf52.c&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;/&lt;pre class="ui-code" data-mode="c_cpp"&gt;    /* 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;p&gt;There are many posts here covering this issue if you need more background&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>