<?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>52833 can not set P0.09 as general GPIO</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/79272/52833-can-not-set-p0-09-as-general-gpio</link><description>I have define CONFIG_NFCT_PINS_AS_GPIOS, but the pin is always low, even if the OUT register is high. 
 
 I have read 0x1000120C(NFCPINS), it is FFFFFFFF, what&amp;#39;s wrong with it?</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 07 Sep 2021 14:36:39 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/79272/52833-can-not-set-p0-09-as-general-gpio" /><item><title>RE: 52833 can not set P0.09 as general GPIO</title><link>https://devzone.nordicsemi.com/thread/328438?ContentTypeID=1</link><pubDate>Tue, 07 Sep 2021 14:36:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c0fd5e02-12df-4fe6-9980-571bf7400bc4</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I looked at your project and did not see any issues with regard to this. Also, when I test it works as expected.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;See here from first run after programming, where the pins are NFC as expected:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/first_5F00_run_5F00_after_5F00_program.PNG" /&gt;&lt;/p&gt;
&lt;p&gt;then I let execution continue and the UICR is updated and reset occurs, and the same breakpoint is hit again:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/after_5F00_software_5F00_reset.PNG" /&gt;&lt;/p&gt;
&lt;p&gt;So far it is as expected. Also, when I check with nrfjprog I get:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;C:\Users\eith&amp;gt;nrfjprog --memrd 0x1000120C
0x1000120C: FFFFFFFE                              |....|&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I am not able to explain why you saw 0xFFFFFFFF at 0x1000120C on the DK.&lt;/p&gt;
&lt;p&gt;There is one thing though. Assuming this is correctly configured, you still need to do HW modifications to use the pins on the DK, adding a zero ohm resistor as described under &lt;a href="https://infocenter.nordicsemi.com/topic/ug_nrf52833_dk/UG/dk/hw_nfc_if.html"&gt;NFC antenna interface&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Perhaps there is a similar issue with your custom HW as well, that the GPIO pin is not routed out to where you measure? Can you double check your layout?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 52833 can not set P0.09 as general GPIO</title><link>https://devzone.nordicsemi.com/thread/328277?ContentTypeID=1</link><pubDate>Tue, 07 Sep 2021 01:26:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b5f60606-9c02-4643-8d1c-23024f9f47fe</guid><dc:creator>great-master</dc:creator><description>&lt;p&gt;I have push it on &lt;a href="https://github.com/jinxiangwzh/nfc_pin_as_gpio_test"&gt;github&lt;/a&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;a href="https://github.com/jinxiangwzh/nfc_pin_as_gpio_test"&gt;jinxiangwzh/nfc_pin_as_gpio_test (github.com)&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The project file is in&amp;nbsp;&lt;span class="mx-1"&gt;/&lt;/span&gt;&lt;span class="js-path-segment d-inline-block wb-break-all"&gt;&lt;a href="https://github.com/jinxiangwzh/nfc_pin_as_gpio_test/tree/master/examples"&gt;&lt;span&gt;examples&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span class="mx-1"&gt;/&lt;/span&gt;&lt;span class="js-path-segment d-inline-block wb-break-all"&gt;&lt;a href="https://github.com/jinxiangwzh/nfc_pin_as_gpio_test/tree/master/examples/peripheral"&gt;&lt;span&gt;peripheral&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span class="mx-1"&gt;/&lt;/span&gt;&lt;span class="js-path-segment d-inline-block wb-break-all"&gt;&lt;a href="https://github.com/jinxiangwzh/nfc_pin_as_gpio_test/tree/master/examples/peripheral/blinky"&gt;&lt;span&gt;blinky&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span class="mx-1"&gt;/&lt;/span&gt;&lt;span class="js-path-segment d-inline-block wb-break-all"&gt;&lt;a href="https://github.com/jinxiangwzh/nfc_pin_as_gpio_test/tree/master/examples/peripheral/blinky/pca10100e"&gt;&lt;span&gt;pca10100e&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span class="mx-1"&gt;/&lt;/span&gt;&lt;span class="js-path-segment d-inline-block wb-break-all"&gt;&lt;a href="https://github.com/jinxiangwzh/nfc_pin_as_gpio_test/tree/master/examples/peripheral/blinky/pca10100e/blank"&gt;&lt;span&gt;blank&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span class="mx-1"&gt;/&lt;/span&gt;&lt;strong class="final-path"&gt;arm5_no_packs&lt;/strong&gt;&lt;span class="mx-1"&gt;/,the CHIP is 52833&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Thanks for you test&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 52833 can not set P0.09 as general GPIO</title><link>https://devzone.nordicsemi.com/thread/328138?ContentTypeID=1</link><pubDate>Mon, 06 Sep 2021 09:41:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8421bbbd-4bc4-4eae-9702-124724ac3628</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;I see. Perhaps there is another issue with your project for instance using the wrong MDK fiels (for instance not using&amp;nbsp;modules\nrfx\mdk\system_nrf52833.c). Perhaps you can upload your project here so that I can take a look? Also, which SDK version do you use?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 52833 can not set P0.09 as general GPIO</title><link>https://devzone.nordicsemi.com/thread/328126?ContentTypeID=1</link><pubDate>Mon, 06 Sep 2021 08:58:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:78d3e179-ef78-48ca-b94c-8892c8ffdd8c</guid><dc:creator>great-master</dc:creator><description>&lt;p&gt;the pin configure code is:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;  nrf_gpio_cfg_output(9);
  nrf_gpio_pin_set(9);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I have define&amp;nbsp;&lt;span&gt;CONFIG_NFCT_PINS_AS_GPIOS&amp;nbsp; in Keil MDK C/C++ Preprocessor Symbols&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 52833 can not set P0.09 as general GPIO</title><link>https://devzone.nordicsemi.com/thread/328124?ContentTypeID=1</link><pubDate>Mon, 06 Sep 2021 08:51:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a5675dca-4a60-4e13-a5a7-fb09df6824d0</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="great-master"]1. Firmware can reset by itself, isn&amp;#39;t it?[/quote]
&lt;p&gt;Regarding the DK you are right that the firmware should reset the device after writing to&amp;nbsp;NFCPINS. Perhaps the code snippet is never run? Did you define&amp;nbsp;CONFIG_NFCT_PINS_AS_GPIOS for the project (so that it applies to all files), or did you by a mistake define it in just a single file?&lt;/p&gt;
[quote user="great-master"]2.If P0.10 have a external pull up, does it have influence?[/quote]
&lt;p&gt;The pull-up should not be relevant. If the pin is configured as a GPIO input, it would pull the pin high. But the pull is so low that it would not matter much for the state when the pin is output.&lt;/p&gt;
[quote user="great-master"]3.Does DK board can validate this?[/quote]
&lt;p&gt;What do you mean? The way you an check from firmware if NFCPINS are enabled is to read the&amp;nbsp;NFCPINS register. And this can be done on the DK or any other board.&lt;/p&gt;
&lt;p&gt;Overall, regarding the DK, it is expected that the pins does not work if you read&amp;nbsp;FFFFFFFF from&amp;nbsp;0x1000120C (NFCPINS). However, on the custom board where you read&amp;nbsp;FFFFFFFE this should work. So there seems to be two issues here, which may or may not have a common cause. Can you share the code you use to configure the pin as output and set it high?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 52833 can not set P0.09 as general GPIO</title><link>https://devzone.nordicsemi.com/thread/328070?ContentTypeID=1</link><pubDate>Mon, 06 Sep 2021 01:17:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:779ebf97-2cdb-4c1a-a605-cf831c0f989c</guid><dc:creator>great-master</dc:creator><description>&lt;p&gt;1. Firmware can reset by itself, isn&amp;#39;t it?&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1630890701112v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;2.If P0.10 have a external pull up, does it have influence?&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1630890794298v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;3.Does DK board can validate this?&lt;/p&gt;
&lt;p&gt;When I use DK board(PCA10056),&lt;span&gt;&amp;nbsp;read&amp;nbsp;&lt;/span&gt;&lt;span&gt;0x1000120C(NFCPINS), it is FFFFFFFF;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt; I use my custom board, read&amp;nbsp;0x1000120C(NFCPINS), it is FFFFFFFE, Through the reg is right, but the pin is always in low level.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 52833 can not set P0.09 as general GPIO</title><link>https://devzone.nordicsemi.com/thread/327958?ContentTypeID=1</link><pubDate>Fri, 03 Sep 2021 11:24:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5b74139d-281f-4e2f-9e6a-1fd85a4f461e</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You should get the UICR configured correctly if you build your firmware with&amp;nbsp;CONFIG_NFCT_PINS_AS_GPIOS. Did you remember to do a reset after programming the firmware? That is required as the UICR is only read during reset.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>