<?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>Unable to use gpio reset pin  as a gpio in nrf connect sdk</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/74693/unable-to-use-gpio-reset-pin-as-a-gpio-in-nrf-connect-sdk</link><description>Hi, 
 
 
 I am not able to use the gpio pin p0.18 as a gpio with nrf connect sdk. 
 I have tried to toggle the pin using &amp;quot;gpio_pin_toggle&amp;quot; and gpio_pin_set&amp;quot; functions but it is not working. (These functions returns 0) 
 
 I want to use it as a chip select</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 08 Feb 2022 13:03:16 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/74693/unable-to-use-gpio-reset-pin-as-a-gpio-in-nrf-connect-sdk" /><item><title>RE: Unable to use gpio reset pin  as a gpio in nrf connect sdk</title><link>https://devzone.nordicsemi.com/thread/351808?ContentTypeID=1</link><pubDate>Tue, 08 Feb 2022 13:03:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6b66b10a-e7e1-44c4-a7de-d35e057d1d90</guid><dc:creator>Elfving</dc:creator><description>&lt;p&gt;Hi Rico!&lt;/p&gt;
&lt;p&gt;You can use the terminal commands described above (eg. west flash --softreset). Unfortunately this isn&amp;#39;t possible using the UI in Visual Studio Code, but you could do it using a terminal in the IDE. A launch.json task can be created as well, if it needs to be frequently called.&lt;/p&gt;
&lt;p&gt;Btw, keep in mind that this is an older case. You might want to create a new support ticket if you don&amp;#39;t get much help on an older one.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Elfving&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to use gpio reset pin  as a gpio in nrf connect sdk</title><link>https://devzone.nordicsemi.com/thread/349577?ContentTypeID=1</link><pubDate>Tue, 25 Jan 2022 14:24:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:81b16c22-f4d8-4ebe-851e-103f429a840c</guid><dc:creator>rico</dc:creator><description>&lt;p&gt;Hello&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/members/heidi"&gt;Heidi&lt;/a&gt;,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I recognized the same as madblue. If using VSCode and the NRF Connect SDK Extension the flash function writes to the UICR, even if&amp;nbsp;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_GPIO_AS_PINRESET&lt;/span&gt;&lt;span&gt;=n&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;is set. I have erased the flash before and validated the UICR being all 0xFF, then just used flash functionality from the extension.&lt;/p&gt;
&lt;p&gt;Is there any solution available?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to use gpio reset pin  as a gpio in nrf connect sdk</title><link>https://devzone.nordicsemi.com/thread/308363?ContentTypeID=1</link><pubDate>Wed, 05 May 2021 13:04:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0a451dab-edf7-4759-a5b6-f4f1f15cb1c6</guid><dc:creator>madblue</dc:creator><description>&lt;p&gt;Thank you&amp;nbsp; Heidi,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I have found that &amp;#39; west&amp;nbsp;flash &amp;#39; is writing to UICR register to enable pin reset, which was causing the problem.&lt;/p&gt;
&lt;p&gt;I have&amp;nbsp; got it fixed by using,&lt;/p&gt;
&lt;p&gt;&lt;code&gt;nrfjprog -e&amp;nbsp;&amp;amp;&amp;amp; west flash --softreset,&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;Or by using nrfjprog --family nRF52 --program&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;I This looks like a serious issue and i wonder why&amp;nbsp;does the west tool is updating the UICR registers.&lt;/p&gt;
&lt;p&gt;Thanks for the support.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to use gpio reset pin  as a gpio in nrf connect sdk</title><link>https://devzone.nordicsemi.com/thread/308350?ContentTypeID=1</link><pubDate>Wed, 05 May 2021 12:32:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:41f57b51-ad08-4c9f-a71d-72295b038fa2</guid><dc:creator>Heidi</dc:creator><description>&lt;p&gt;Hi!&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;From your devicetree, it looks like botoh SPI3 and the Arduino connector are defined correctly. Could you show me&amp;nbsp;all the application configurations and how you&amp;#39;re initializing the SPI in your application?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to use gpio reset pin  as a gpio in nrf connect sdk</title><link>https://devzone.nordicsemi.com/thread/308264?ContentTypeID=1</link><pubDate>Wed, 05 May 2021 04:22:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fdf58b82-3543-4370-8b01-c8a9ef978e71</guid><dc:creator>madblue</dc:creator><description>&lt;p&gt;hi Hmolesworth,&lt;/p&gt;
&lt;p&gt;Thanks for the reply.&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t really want to add direct register access to the application code and wish to do it with zephyr apis/configurations itself. (without using any lower layer codes mainly because it can cause porting issues.)&lt;/p&gt;
&lt;p&gt;There should be some other ways to get it done without directly accessing the registers(hope so). In worst case, i will try this out.&lt;/p&gt;
&lt;p&gt;fyi: It is already working with my nrf5 sdk based code.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to use gpio reset pin  as a gpio in nrf connect sdk</title><link>https://devzone.nordicsemi.com/thread/308004?ContentTypeID=1</link><pubDate>Mon, 03 May 2021 17:50:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6262acda-01f1-46c4-beb9-e2c3514d0380</guid><dc:creator>hmolesworth</dc:creator><description>&lt;p&gt;Not sure if this helps, but the reset pin configuration is one-way; once set as a reset pin the only way to unset and use as a port pin is to do a flash erase all,&amp;nbsp;and reprogram.&amp;nbsp;This example is SDK not nRFConnect for nRF52832 but nRF52840 is similar with port P0.18 instead:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;    /* Configure GPIO pads as pPin Reset pin if Pin Reset capabilities desired. If CONFIG_GPIO_AS_PINRESET is not
      defined, pin reset will not be available. One GPIO (see Product Specification to see which one) will then be
      reserved for PinReset and not available as normal GPIO. */
    #if defined (CONFIG_GPIO_AS_PINRESET)
        if (((NRF_UICR-&amp;gt;PSELRESET[0] &amp;amp; UICR_PSELRESET_CONNECT_Msk) != (UICR_PSELRESET_CONNECT_Connected &amp;lt;&amp;lt; UICR_PSELRESET_CONNECT_Pos)) ||
            ((NRF_UICR-&amp;gt;PSELRESET[1] &amp;amp; UICR_PSELRESET_CONNECT_Msk) != (UICR_PSELRESET_CONNECT_Connected &amp;lt;&amp;lt; UICR_PSELRESET_CONNECT_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;PSELRESET[0] = 21;
            while (NRF_NVMC-&amp;gt;READY == NVMC_READY_READY_Busy){}
            NRF_UICR-&amp;gt;PSELRESET[1] = 21;
            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></channel></rss>