<?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 to enable  P0.09 and P0.10 as GPIO pins on the nRF52 instead of NFC pins?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/29041/how-to-enable-p0-09-and-p0-10-as-gpio-pins-on-the-nrf52-instead-of-nfc-pins</link><description>Hi, 
 I&amp;#39;m using nrf52 custom board designed for our project,For this we have P0.09 and P0.10 as rx and tx used for uart, when i configured this two pins as rx and tx it is not showing any data on the uart.I have read the datasheet and i have seen this</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 26 Mar 2019 09:10:24 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/29041/how-to-enable-p0-09-and-p0-10-as-gpio-pins-on-the-nrf52-instead-of-nfc-pins" /><item><title>RE: How to enable  P0.09 and P0.10 as GPIO pins on the nRF52 instead of NFC pins?</title><link>https://devzone.nordicsemi.com/thread/178265?ContentTypeID=1</link><pubDate>Tue, 26 Mar 2019 09:10:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6d1d94f9-ee21-4ef0-a58b-0e70df290e57</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;You can check that the correct value has been written to the UICR register using nrfjprog, i.e.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;nrfjprog --memrd 0x1000120C&lt;br /&gt;&lt;br /&gt;which will return&lt;br /&gt;&lt;br /&gt;0x1000120C: FFFFFFFE |....|&lt;/p&gt;
&lt;p&gt;If the&amp;nbsp;NFCPINS register is configured to use the NFC pins as GPIOs.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to enable  P0.09 and P0.10 as GPIO pins on the nRF52 instead of NFC pins?</title><link>https://devzone.nordicsemi.com/thread/177975?ContentTypeID=1</link><pubDate>Sun, 24 Mar 2019 22:43:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:08aec63f-a4c1-4ef1-b7e2-90f567856322</guid><dc:creator>noob_with_ucontrollers</dc:creator><description>&lt;p&gt;Hi &lt;a href="https://devzone.nordicsemi.com/members/eliotstock"&gt;Eliot Stock&lt;/a&gt; I am going through the same issue. I defined&amp;nbsp;&lt;span&gt;CONFIG_NFCT_PINS_AS_GPIOS in the project preprocessor definitions and I added&amp;nbsp;CFLAGS += -DCONFIG_NFCT_PINS_AS_GPIOS to my project makefile. I still think my pin 9 is causing troubles (it&amp;#39;s pegged to 3.3V).&amp;nbsp;&lt;br /&gt;&lt;br /&gt;How do I make sure the registers are being set by the code ? Do I have to add the line #include uicr_config.h anywhere in my main.c code?&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to enable  P0.09 and P0.10 as GPIO pins on the nRF52 instead of NFC pins?</title><link>https://devzone.nordicsemi.com/thread/123785?ContentTypeID=1</link><pubDate>Sun, 11 Mar 2018 00:46:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2ae816ea-042d-4068-9a6c-0976caf9d025</guid><dc:creator>hmolesworth</dc:creator><description>&lt;p&gt;As a guide, it&amp;#39;s best to use the Nordic project-level defines as listed for NFC and Reset pins, as the UICR register is part of the Flash memory, and it must not be repeatedly written (max 181 times) as it would be by an indiscriminate register write in user code on every reset. The Nordic&amp;nbsp;&lt;em&gt;SystemInit()&lt;/em&gt; checks the value before writing when using the defines to avoid repeated writes. This also means the NFC pins can not be easily repeatedly switched between NFC mode and I/O port mode.&lt;/p&gt;
&lt;p&gt;I quote:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&amp;quot;11.3 Writing to user information configuration registers (UICR)&lt;/em&gt;&lt;br /&gt;&lt;em&gt;User information configuration registers (UICR) are written in the same way as Flash. After UICR has been&lt;/em&gt;&lt;br /&gt;&lt;em&gt;written, the new UICR configuration will only take effect after a reset.&lt;/em&gt;&lt;br /&gt;&lt;em&gt;UICR can only be written nWRITE number of times before an erase must be performed using ERASEUICR or&lt;/em&gt;&lt;br /&gt;&lt;em&gt;ERASEALL.&amp;quot;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;nWRITE,BLOCK Amount of writes allowed in a block between erase 181&lt;/em&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to enable  P0.09 and P0.10 as GPIO pins on the nRF52 instead of NFC pins?</title><link>https://devzone.nordicsemi.com/thread/123771?ContentTypeID=1</link><pubDate>Sat, 10 Mar 2018 07:53:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5893683b-b87c-431f-85e3-1591c29a0a3b</guid><dc:creator>Thomas Y</dc:creator><description>&lt;p&gt;Can you clarify where&amp;nbsp;&lt;span&gt;0xFFFFFFFE should be set ? I set it&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;const uint32_t UICR_ADDR_0x20C __attribute__ ((section(&amp;quot;.uicrNfcPinsAddress&amp;quot;))) __attribute__((used)) = 0xFFFFFFFE;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;but after flashing if I read the value it is 0x00000000&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I can&amp;#39;t get to set the register value to&amp;nbsp;0xFFFFFFFE&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;nrfjprog --memrd 0x1000120c --n 4 -f NRF52&lt;br /&gt;0x1000120C: 00000000 |....|&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to enable  P0.09 and P0.10 as GPIO pins on the nRF52 instead of NFC pins?</title><link>https://devzone.nordicsemi.com/thread/123769?ContentTypeID=1</link><pubDate>Sat, 10 Mar 2018 07:15:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1a80adaa-26cb-428e-9675-f07cd1a7404b</guid><dc:creator>Thomas Y</dc:creator><description>&lt;p&gt;&amp;nbsp;I also needed to add the -D&lt;span&gt;CONFIG_NFCT_PINS_AS_GPIOS CFLAG&amp;nbsp;&lt;/span&gt;inside the bootloader Makefile as well&lt;/p&gt;
&lt;p&gt;In my case I was using P009 as a CS for SPI and I could not get it to work from the APP but the interesting part is that when using JLINK on my board including a 3.3 V and GND pin it would reset the board powered through USB on my laptop it was working. Connection to Jlink RTT viewer reported correct reading on MISO after driving CS PIN 0.09 porperly. But then after a power off the pin didn&amp;#39;t work anymore again for CS PIN 0.09. Is there a sequence diagram explaining what JLINK does in the NRF52 when driving the reset PIN. I am still scratching my head around this and why&amp;nbsp;I can&amp;#39;t see the register being persisted&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to enable  P0.09 and P0.10 as GPIO pins on the nRF52 instead of NFC pins?</title><link>https://devzone.nordicsemi.com/thread/115032?ContentTypeID=1</link><pubDate>Wed, 17 Jan 2018 18:12:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:33f63c99-187c-475e-b11b-dad12493ab91</guid><dc:creator>Eliot Stock</dc:creator><description>&lt;p&gt;(Your post should have been a comment, not an answer, btw). Yes, I got it working. Confirm you&amp;#39;re using &lt;code&gt;CFLAGS += -DCONFIG_NFCT_PINS_AS_GPIOS&lt;/code&gt; in the Makefile, not just a &lt;code&gt;#define CONFIG_NFCT_PINS_AS_GPIOS (1)&lt;/code&gt; in the code. If you can, get the UART working on some other pins first to validate your code, then move it onto these pins. Or run the UART example app, but with the pins changed and the CFLAG added. Or find the point where &lt;code&gt;CONFIG_NFCT_PINS_AS_GPIOS&lt;/code&gt; is used in the SDK and put in an &lt;code&gt;#error Foo&lt;/code&gt; to confirm the preprocessor is including that code.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to enable  P0.09 and P0.10 as GPIO pins on the nRF52 instead of NFC pins?</title><link>https://devzone.nordicsemi.com/thread/115031?ContentTypeID=1</link><pubDate>Wed, 17 Jan 2018 02:47:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fe86f3cf-4717-41e2-9e15-2e643088e409</guid><dc:creator>Rene</dc:creator><description>&lt;p&gt;Hi Eliot, I just wanna know whether you fix this problem or not. I encounter the same issue.
P0.09 is used as UART RX pin. It always reports &amp;quot;APP_UART_COMMUNICATION_ERROR&amp;quot; after initialization. CONFIG_NFCT_PINS_AS_GPIOS CFLAG is defined. I checked the NRF_UICR-&amp;gt;NFCPINS register, it is 0xFFFFFFFE.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to enable  P0.09 and P0.10 as GPIO pins on the nRF52 instead of NFC pins?</title><link>https://devzone.nordicsemi.com/thread/115030?ContentTypeID=1</link><pubDate>Tue, 02 Jan 2018 09:20:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0ed68c40-8ee4-4a12-8c64-0f62a55e0ed7</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;HI Eliot, you are correct. I will update my answer to reflect this.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to enable  P0.09 and P0.10 as GPIO pins on the nRF52 instead of NFC pins?</title><link>https://devzone.nordicsemi.com/thread/115029?ContentTypeID=1</link><pubDate>Sun, 24 Dec 2017 10:25:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:43e4f007-0c35-4728-8ee9-1ec1f51cc3aa</guid><dc:creator>Eliot Stock</dc:creator><description>&lt;p&gt;@Bjorn Also, all this stuff about the linker script SECTION and the const is really confusing if all we really need is the CONFIG_NFCT_PINS_AS_GPIOS CFLAG and that works on gcc?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to enable  P0.09 and P0.10 as GPIO pins on the nRF52 instead of NFC pins?</title><link>https://devzone.nordicsemi.com/thread/115028?ContentTypeID=1</link><pubDate>Sat, 23 Dec 2017 13:03:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a3923229-5d51-44d2-b480-43a6fc6889d8</guid><dc:creator>Eliot Stock</dc:creator><description>&lt;p&gt;@Bjorn You haven&amp;#39;t assigned a value here. Did you mean to use &lt;code&gt;0xFFFFFFFE&lt;/code&gt;?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to enable  P0.09 and P0.10 as GPIO pins on the nRF52 instead of NFC pins?</title><link>https://devzone.nordicsemi.com/thread/115027?ContentTypeID=1</link><pubDate>Wed, 08 Mar 2017 08:05:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eb07db8b-e000-4030-ab7b-d068dd0b9da4</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;I think you will have to define a section in the linker script, e.g. &lt;code&gt;.uicrNfcPinsAddress&lt;/code&gt;, i.e.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; /** Location in UICR of NFC Pins register is stored. */ UICR_NFCPINS(r) : ORIGIN = 0x1000120C, LENGTH = 0x04 

SECTIONS { 
    /* Write the bootloader address in UICR. */ 
    .uicrNfcPinsAddress : 
    { 
         KEEP(*(.uicrNfcPinsAddress)) 
     } &amp;gt; UICR_NFCPINS
 } 
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Then in the application code&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;const uint32_t UICR_ADDR_0x20C __attribute__ ((section(&amp;quot;.uicrNfcPinsAddress&amp;quot;))) __attribute__((used));
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to enable  P0.09 and P0.10 as GPIO pins on the nRF52 instead of NFC pins?</title><link>https://devzone.nordicsemi.com/thread/115026?ContentTypeID=1</link><pubDate>Tue, 07 Mar 2017 14:13:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d7ec37fb-70ff-4e8d-8b4a-68eee05cbe26</guid><dc:creator>manymany</dc:creator><description>&lt;p&gt;What will be the command for GCC because this one is not working?&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;    const uint32_t UICR_ADDR_0x20C    __attribute__((at(0x1000120C))) __attribute__((used)) = 0xFFFFFFFE
--&amp;gt; ../../../main.c:676:2: error: &amp;#39;at&amp;#39; attribute directive ignored [-Werror=attributes]
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to enable  P0.09 and P0.10 as GPIO pins on the nRF52 instead of NFC pins?</title><link>https://devzone.nordicsemi.com/thread/115024?ContentTypeID=1</link><pubDate>Fri, 23 Sep 2016 09:32:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a9855bec-44ea-4b2d-963a-227864b6ab13</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;I do not know which SDK you are using, but in SDK v11.0.0 you can define &lt;code&gt;CONFIG_NFCT_PINS_AS_GPIOS&lt;/code&gt; in the preprocessor symbols in the ble_app examples that does not use the NFC antenna to use the pins as GPIOs.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to enable  P0.09 and P0.10 as GPIO pins on the nRF52 instead of NFC pins?</title><link>https://devzone.nordicsemi.com/thread/115025?ContentTypeID=1</link><pubDate>Fri, 23 Sep 2016 05:39:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:40338954-db5e-4560-96ed-637153219a66</guid><dc:creator>singh</dc:creator><description>&lt;p&gt;Thanks for reply ,&lt;/p&gt;
&lt;p&gt;I have added in my code still the pins are not acting as gpio ,
is there any example code which i can take reference please help me
regards,
prudhvi&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to enable  P0.09 and P0.10 as GPIO pins on the nRF52 instead of NFC pins?</title><link>https://devzone.nordicsemi.com/thread/115023?ContentTypeID=1</link><pubDate>Thu, 22 Sep 2016 14:15:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:faddfcab-d907-484c-a5e0-a73650552a73</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;You simply need to define CONFIG_NFCT_PINS_AS_GPIOS in the preprocessor symbols in the ble_app examples that does not use the NFC antenna to use the pins as GPIOs.&lt;/p&gt;
&lt;p&gt;It is also possible to write directly to the &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/uicr.html?cp=2_2_0_13_0_62#register.NFCPINS"&gt;NFCPINS&lt;/a&gt; UICR register in order to use the pins as GPIO pins, i.e. add the following line to your code.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;const uint32_t UICR_ADDR_0x20C    __attribute__((at(0x1000120C))) __attribute__((used)) = 0xFFFFFFFE
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You will also need to follow some steps described in the comments below.&lt;/p&gt;
&lt;p&gt;-Bjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>