<?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 config p21 as a gpio</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/13795/how-to-config-p21-as-a-gpio</link><description>Hi, My question is how to config p21 as a gpio?</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 12 May 2016 04:08:00 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/13795/how-to-config-p21-as-a-gpio" /><item><title>RE: how to config p21 as a gpio</title><link>https://devzone.nordicsemi.com/thread/52733?ContentTypeID=1</link><pubDate>Thu, 12 May 2016 04:08:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:59bc3cf9-7e8a-454d-bccf-9110fb932faf</guid><dc:creator>FormerMember</dc:creator><description>&lt;p&gt;ok! it is solved after erase all with nrfgo, thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to config p21 as a gpio</title><link>https://devzone.nordicsemi.com/thread/52734?ContentTypeID=1</link><pubDate>Thu, 12 May 2016 04:03:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cced1864-3be0-4cb7-b14a-839a7fc27676</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;That&amp;#39;s what I said, you need to erase the UICR which will reset it back to 0xffffffff. Just perform a full erase on the chip with whatever tools you&amp;#39;re using, and then reload the softdevice and your code. As long as you no-longer have that #define, it won&amp;#39;t replace the value back to 0x15 when you run and the pin will work as normal. if it does put it back, you still have the define defined.&lt;/p&gt;
&lt;p&gt;Note also that P0.21 is connected to the debug in, so if (unlikely) you are using an external debugger, it may hold that pin high. Looking at the schematic, I believe that is not the case as long as you are using the on-board debugger, which you probably are.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to config p21 as a gpio</title><link>https://devzone.nordicsemi.com/thread/52732?ContentTypeID=1</link><pubDate>Thu, 12 May 2016 03:59:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3e563bee-798c-42ed-af3a-f8eb16d1e21f</guid><dc:creator>FormerMember</dc:creator><description>&lt;p&gt;ok, if value of NRF_UICR-&amp;gt;PSELRESET[0] and NRF_UICR-&amp;gt;PSELRESET[1] should be reset to 0xffffffff, now it is 0x15&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to config p21 as a gpio</title><link>https://devzone.nordicsemi.com/thread/52731?ContentTypeID=1</link><pubDate>Thu, 12 May 2016 03:52:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:051bbaba-c55c-4906-aea4-94c7de653cf2</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;... and .. is that a question? Have you ensured the UICR has been erased or not? Have you checked the reset pin configuration in the UICR to make sure it&amp;#39;s not configured as a reset pin? If it was ever configured as one, it will stay configured as one.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to config p21 as a gpio</title><link>https://devzone.nordicsemi.com/thread/52730?ContentTypeID=1</link><pubDate>Thu, 12 May 2016 03:49:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e3b97dcf-e5ae-4427-80a1-912b998bd3bf</guid><dc:creator>FormerMember</dc:creator><description>&lt;p&gt;I just test with sdk example: nRF5_SDK_11.0.0_89a8197\examples\peripheral\spi\pca10040, just modified the spi io config&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to config p21 as a gpio</title><link>https://devzone.nordicsemi.com/thread/52729?ContentTypeID=1</link><pubDate>Thu, 12 May 2016 03:27:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fd216f6f-b53a-4a4a-95b2-35d7b18ab9bd</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;Then P0.21 should work just like any other GPIO. Make sure you&amp;#39;ve cleared the UICR entirely as if you&amp;#39;ve ever run with that define set, the pin has been configured as reset and that configuration is sticky (it is&amp;#39;t in non-volatile memory)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to config p21 as a gpio</title><link>https://devzone.nordicsemi.com/thread/52728?ContentTypeID=1</link><pubDate>Thu, 12 May 2016 03:22:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8e4216bf-1a4d-40aa-b704-22dfb138b3e4</guid><dc:creator>FormerMember</dc:creator><description>&lt;p&gt;I have removed this define&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to config p21 as a gpio</title><link>https://devzone.nordicsemi.com/thread/52727?ContentTypeID=1</link><pubDate>Thu, 12 May 2016 03:20:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c5f1e590-73d0-48d0-8542-a7aeb9a69465</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;have you defined P0.21 as the reset pin with &lt;code&gt;CONFIG_GPIO_AS_PINRESET&lt;/code&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to config p21 as a gpio</title><link>https://devzone.nordicsemi.com/thread/52726?ContentTypeID=1</link><pubDate>Thu, 12 May 2016 03:16:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c11fec84-ff0e-428e-94cf-805c65fba3c9</guid><dc:creator>FormerMember</dc:creator><description>&lt;p&gt;it is 52, I configured p21 as spi clk but it is not work, it is ok when I change to another io.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to config p21 as a gpio</title><link>https://devzone.nordicsemi.com/thread/52725?ContentTypeID=1</link><pubDate>Thu, 12 May 2016 03:12:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1c67cd23-54e0-4348-9d1f-2c27ce77f110</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;That&amp;#39;s not a very clear question is it&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;nrf51 or nrf52?&lt;/li&gt;
&lt;li&gt;What have you tried? Post code.&lt;/li&gt;
&lt;li&gt;What problem are you actually having if you have tried something.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;you configure P0.21 as a gpio just like you configure any other pin as a gpio.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>