<?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 reset pin as gpio</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/33840/unable-to-use-reset-pin-as-gpio</link><description>Hi, 
 I am trying to use the p21 reset pin as gpio but it is not working as expected. it is showing a 3.3v even when i am trying to toggle the pin. I have removed the CONFIGURE GPIO PI AS RESET definition from the makefile and the reset function is disabled</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 27 Apr 2018 17:35:38 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/33840/unable-to-use-reset-pin-as-gpio" /><item><title>RE: unable to use reset pin as gpio</title><link>https://devzone.nordicsemi.com/thread/130162?ContentTypeID=1</link><pubDate>Fri, 27 Apr 2018 17:35:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:09328b0e-5cf7-4b4f-94a9-f2653b8550c2</guid><dc:creator>hmolesworth</dc:creator><description>&lt;p&gt;I haven&amp;#39;t used that pin for SPI. Two things you might try: set the drive strength to high on both high and low after the spi has been set in case it is just too weak&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;    nrf_gpio_cfg(21,
                 NRF_GPIO_PIN_DIR_OUTPUT,
                 NRF_GPIO_PIN_INPUT_DISCONNECT,
                 NRF_GPIO_PIN_NOPULL,
                 NRF_GPIO_PIN_H0H1,       // Require High Drive both levels
                 NRF_GPIO_PIN_NOSENSE);
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;and do a run-time check on the pin (not with the command line nrfprog), something similar to this code which I wrote when pins were misbehaving on one of my projects.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;const char * FindPinMap(uint16_t PinId)
{
    // 32kHz Osc pins can be used as GPIOs or 32kHz Oscillator, special case
    if ( (PinId == RCC_OSC_OUT_PIN) &amp;amp;&amp;amp; (NRF_CLOCK-&amp;gt;LFCLKSRC &amp;amp; 0x000001) ) return &amp;quot;RTC-OSC-OUT&amp;quot;;
    if ( (PinId == RCC_OSC_IN_PIN)  &amp;amp;&amp;amp; (NRF_CLOCK-&amp;gt;LFCLKSRC &amp;amp; 0x000001) ) return &amp;quot;RTC-OSC-IN&amp;quot;;

    // NFC pins can be used as GPIOs or NFC, special case
    if ( (PinId == NFC1_PIN) &amp;amp;&amp;amp; ((NRF_UICR-&amp;gt;NFCPINS &amp;amp; UICR_NFCPINS_PROTECT_Msk) == (UICR_NFCPINS_PROTECT_NFC &amp;lt;&amp;lt; UICR_NFCPINS_PROTECT_Pos)) ) return &amp;quot;NFC 1&amp;quot;;
    if ( (PinId == NFC2_PIN) &amp;amp;&amp;amp; ((NRF_UICR-&amp;gt;NFCPINS &amp;amp; UICR_NFCPINS_PROTECT_Msk) == (UICR_NFCPINS_PROTECT_NFC &amp;lt;&amp;lt; UICR_NFCPINS_PROTECT_Pos)) ) return &amp;quot;NFC 2&amp;quot;;

    // Reset pin can be used as GPIOs or nReset, special case
    if ( (PinId == NRESET_PIN)                          // 21
     &amp;amp;&amp;amp; (((NRF_UICR-&amp;gt;PSELRESET[0] &amp;amp; UICR_PSELRESET_CONNECT_Msk) == (UICR_PSELRESET_CONNECT_Connected &amp;lt;&amp;lt; UICR_PSELRESET_CONNECT_Pos))
     &amp;amp;&amp;amp;  ((NRF_UICR-&amp;gt;PSELRESET[1] &amp;amp; UICR_PSELRESET_CONNECT_Msk) == (UICR_PSELRESET_CONNECT_Connected &amp;lt;&amp;lt; UICR_PSELRESET_CONNECT_Pos))) ) return &amp;quot;nRESET&amp;quot;;

    // TRACE pins can be used as GPIOs or Trace, special case
    if ( (CoreDebug-&amp;gt;DEMCR &amp;amp; CoreDebug_DEMCR_TRCENA_Msk) == CoreDebug_DEMCR_TRCENA_Msk )
    {
        if (PinId == TRACE_D0_PIN)  return &amp;quot;TRACE D0&amp;quot;;  // 18
        if (PinId == TRACE_D1_PIN)  return &amp;quot;TRACE D1&amp;quot;;  // 16
        if (PinId == TRACE_D2_PIN)  return &amp;quot;TRACE D2&amp;quot;;  // 15
        if (PinId == TRACE_D3_PIN)  return &amp;quot;TRACE D3&amp;quot;;  // 14
        if (PinId == TRACE_CLK_PIN) return &amp;quot;TRACE CLK&amp;quot;; // 20
    }

  //if (NRF_SPI0-&amp;gt;PSEL.CSN  == PinId) return &amp;quot;SPI0 nCS&amp;quot;;
    if (NRF_SPI0-&amp;gt;PSEL.SCK  == PinId) return &amp;quot;SPI0 SCK&amp;quot;;
    if (NRF_SPI0-&amp;gt;PSEL.MOSI == PinId) return &amp;quot;SPI0 MOSI&amp;quot;;
    if (NRF_SPI0-&amp;gt;PSEL.MISO == PinId) return &amp;quot;SPI0 MISO&amp;quot;;

    if (NRF_SPI1-&amp;gt;PSEL.SCK  == PinId) return &amp;quot;SPI1 SCK&amp;quot;;
    if (NRF_SPI1-&amp;gt;PSEL.MOSI == PinId) return &amp;quot;SPI1 MOSI&amp;quot;;
    if (NRF_SPI1-&amp;gt;PSEL.MISO == PinId) return &amp;quot;SPI1 MISO&amp;quot;;

    if (NRF_SPI2-&amp;gt;PSEL.SCK  == PinId) return &amp;quot;SPI2 SCK&amp;quot;;
    if (NRF_SPI2-&amp;gt;PSEL.MOSI == PinId) return &amp;quot;SPI2 MOSI&amp;quot;;
    if (NRF_SPI2-&amp;gt;PSEL.MISO == PinId) return &amp;quot;SPI2 MISO&amp;quot;;

    if (NRF_UARTE0-&amp;gt;PSEL.RTS == PinId) return &amp;quot;UartE0 RTS&amp;quot;;
    if (NRF_UARTE0-&amp;gt;PSEL.CTS == PinId) return &amp;quot;UartE0 CTS&amp;quot;;
    if (NRF_UARTE0-&amp;gt;PSEL.TXD == PinId) return &amp;quot;UartE0 Tx&amp;quot;;
    if (NRF_UARTE0-&amp;gt;PSEL.RXD == PinId) return &amp;quot;UartE0 Rx&amp;quot;;

    if (NRF_SAADC-&amp;gt;CH[0].PSELP == PinId) return &amp;quot;ADC 0+&amp;quot;;
    if (NRF_SAADC-&amp;gt;CH[0].PSELN == PinId) return &amp;quot;ADC 0-&amp;quot;;
    if (NRF_SAADC-&amp;gt;CH[1].PSELP == PinId) return &amp;quot;ADC 1+&amp;quot;;
    if (NRF_SAADC-&amp;gt;CH[1].PSELN == PinId) return &amp;quot;ADC 1-&amp;quot;;
    if (NRF_SAADC-&amp;gt;CH[2].PSELP == PinId) return &amp;quot;ADC 2+&amp;quot;;
    if (NRF_SAADC-&amp;gt;CH[2].PSELN == PinId) return &amp;quot;ADC 2-&amp;quot;;
    if (NRF_SAADC-&amp;gt;CH[3].PSELP == PinId) return &amp;quot;ADC 3+&amp;quot;;
    if (NRF_SAADC-&amp;gt;CH[3].PSELN == PinId) return &amp;quot;ADC 3-&amp;quot;;
    if (NRF_SAADC-&amp;gt;CH[4].PSELP == PinId) return &amp;quot;ADC 4+&amp;quot;;
    if (NRF_SAADC-&amp;gt;CH[4].PSELN == PinId) return &amp;quot;ADC 4-&amp;quot;;
    if (NRF_SAADC-&amp;gt;CH[5].PSELP == PinId) return &amp;quot;ADC 5+&amp;quot;;
    if (NRF_SAADC-&amp;gt;CH[5].PSELN == PinId) return &amp;quot;ADC 5-&amp;quot;;
    if (NRF_SAADC-&amp;gt;CH[6].PSELP == PinId) return &amp;quot;ADC 6+&amp;quot;;
    if (NRF_SAADC-&amp;gt;CH[6].PSELN == PinId) return &amp;quot;ADC 6-&amp;quot;;
    if (NRF_SAADC-&amp;gt;CH[7].PSELP == PinId) return &amp;quot;ADC 7+&amp;quot;;
    if (NRF_SAADC-&amp;gt;CH[7].PSELN == PinId) return &amp;quot;ADC 7-&amp;quot;;

    if (NRF_PWM0-&amp;gt;PSEL.OUT[0] == PinId) return &amp;quot;PWM0 0&amp;quot;;
    if (NRF_PWM0-&amp;gt;PSEL.OUT[1] == PinId) return &amp;quot;PWM0 1&amp;quot;;
    if (NRF_PWM0-&amp;gt;PSEL.OUT[2] == PinId) return &amp;quot;PWM0 2&amp;quot;;
    if (NRF_PWM0-&amp;gt;PSEL.OUT[3] == PinId) return &amp;quot;PWM0 3&amp;quot;;

    if (NRF_PWM1-&amp;gt;PSEL.OUT[0] == PinId) return &amp;quot;PWM1 0&amp;quot;;
    if (NRF_PWM1-&amp;gt;PSEL.OUT[1] == PinId) return &amp;quot;PWM1 1&amp;quot;;
    if (NRF_PWM1-&amp;gt;PSEL.OUT[2] == PinId) return &amp;quot;PWM1 2&amp;quot;;
    if (NRF_PWM1-&amp;gt;PSEL.OUT[3] == PinId) return &amp;quot;PWM1 3&amp;quot;;

    if (NRF_PWM2-&amp;gt;PSEL.OUT[0] == PinId) return &amp;quot;PWM2 0&amp;quot;;
    if (NRF_PWM2-&amp;gt;PSEL.OUT[1] == PinId) return &amp;quot;PWM2 1&amp;quot;;
    if (NRF_PWM2-&amp;gt;PSEL.OUT[2] == PinId) return &amp;quot;PWM2 2&amp;quot;;
    if (NRF_PWM2-&amp;gt;PSEL.OUT[3] == PinId) return &amp;quot;PWM2 3&amp;quot;;

    if (NRF_I2S-&amp;gt;PSEL.SDOUT == PinId) return &amp;quot;I2S SDOUT&amp;quot;;
    if (NRF_I2S-&amp;gt;PSEL.SDIN  == PinId) return &amp;quot;I2S SDIN&amp;quot;;
    if (NRF_I2S-&amp;gt;PSEL.SCK   == PinId) return &amp;quot;I2S SCK&amp;quot;;
    if (NRF_I2S-&amp;gt;PSEL.MCK   == PinId) return &amp;quot;I2S MCK&amp;quot;;
    if (NRF_I2S-&amp;gt;PSEL.LRCK  == PinId) return &amp;quot;I2S LRCK&amp;quot;;

    // No hardware pins available with these peripherals:
    // NRF_TIMER0                      ((NRF_TIMER_Type          *) NRF_TIMER0_BASE)
    // NRF_TIMER1                      ((NRF_TIMER_Type          *) NRF_TIMER1_BASE)
    // NRF_TIMER2                      ((NRF_TIMER_Type          *) NRF_TIMER2_BASE)
    // NRF_RTC0                        ((NRF_RTC_Type            *) NRF_RTC0_BASE)
    // NRF_RTC1                        ((NRF_RTC_Type            *) NRF_RTC1_BASE)
    // NRF_RTC2                        ((NRF_RTC_Type            *) NRF_RTC2_BASE)

    // Default, no map found
    return &amp;quot;no map&amp;quot;;
}
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: unable to use reset pin as gpio</title><link>https://devzone.nordicsemi.com/thread/130155?ContentTypeID=1</link><pubDate>Fri, 27 Apr 2018 15:21:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e9f13218-3228-44b0-a6a5-d1113fe63d08</guid><dc:creator>madblue</dc:creator><description>&lt;p&gt;Thank you &lt;span class="user-name"&gt;&lt;a class="internal-link view-user-profile" href="https://devzone.nordicsemi.com/members/hmolesworth"&gt;hmolesworth for the support. &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;we are using a custom board based on bc832. there is nothing connected to the line otherthan&amp;nbsp; a pull up, which can be removed. the pin is directly conncted to the slave data line.&lt;/p&gt;
&lt;p&gt;Have you ever tried to use this pin as any communication line like twi or spi. do you think its a bug in the design end or bc832 side.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: unable to use reset pin as gpio</title><link>https://devzone.nordicsemi.com/thread/130152?ContentTypeID=1</link><pubDate>Fri, 27 Apr 2018 14:47:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2d992bde-e5fc-4c7b-9818-68d9c8903cb6</guid><dc:creator>hmolesworth</dc:creator><description>&lt;p&gt;If you have the BC832 dev kit my comment doesn&amp;#39;t apply; I see that P0.21 only connected to a push-button on that board&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: unable to use reset pin as gpio</title><link>https://devzone.nordicsemi.com/thread/130149?ContentTypeID=1</link><pubDate>Fri, 27 Apr 2018 14:42:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c2526342-9fc5-435d-91f6-b89293a12eba</guid><dc:creator>hmolesworth</dc:creator><description>&lt;p&gt;In case you are using a development kit similar to the nRF52 dev kit the nRESET pin P0.21 is hardwired to an output on the SAM3 Segger interface via a solder bridge which may be cut. It&amp;#39;s SB27 which may be causing the issue you see.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: unable to use reset pin as gpio</title><link>https://devzone.nordicsemi.com/thread/130053?ContentTypeID=1</link><pubDate>Fri, 27 Apr 2018 05:57:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2b0b1136-cacd-4d32-8f8a-61c7d7f11514</guid><dc:creator>madblue</dc:creator><description>&lt;p&gt;Hi kristin,&lt;/p&gt;
&lt;p&gt;when i removed the softdevice the gpio started toggling. seems the s132 was causing some issues. Does it work with softdevice?&lt;/p&gt;
&lt;p&gt;but now there is a new issue, when i am trying to use this pin for twi its not working properly.ie.. i have connected it to sda line, as it was not working i have used a logic analyzer to view the communication and found that regardless of the what value i am trying to send, it only gives zero.&lt;/p&gt;
&lt;p&gt;suppose if i try to write 0x57 to the slave, the values going out is only 0x00. clock and start conditions are going well. There is a 10k pull up connected to the sda line which i have removed as part of debug. it seems some kind of logic level issue is there with the pin.&lt;/p&gt;
&lt;p&gt;fyi, the twi slave is working fine with a different gpio pin(02).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: unable to use reset pin as gpio</title><link>https://devzone.nordicsemi.com/thread/129980?ContentTypeID=1</link><pubDate>Thu, 26 Apr 2018 13:29:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3c0f0a23-b5db-414d-a632-2c270d33cc3f</guid><dc:creator>FormerMember</dc:creator><description>&lt;p&gt;The readout from UICR shows that no pin is set as reset pin.&lt;/p&gt;
&lt;p&gt;How do you configure the gpio? Do you use the &lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.0.0%2Fgroup__nrf__gpio__hal.html&amp;amp;cp=4_0_0_6_9_0_4_0_6&amp;amp;anchor=ga0705ce3a78d0397bbdaec05a7bce693e"&gt;GPIO HAL&lt;/a&gt;?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>