nRF52805 — nRESET (P0.21) cannot be reconfigured as GPIO using UICR->PSELRESET[] (?)

Hi all,

I'm working with the nRF52805 (QFN16) and was curious if the nRESET pin (P0.21) can be disabled via the UICR->PSELRESET[n] mechanism, as is possible on other nRF52 chips like the 52832.

After reviewing the nRF52805 PS v1.4 and Nordic’s online documentation (including this UICR page), I saw PSELRESET[0] and PSELRESET[1] described, including the CONNECT bit (bit 31) to disable the reset function.


  1. Used a debugger (J-Link + SES) to write the following:

    NRF_UICR->PSELRESET[0] = (21 << 0) | (1UL << 31);  // P0.21, disconnect
    NRF_UICR->PSELRESET[1] = (21 << 0) | (1UL << 31);
    
  2. Reset the MCU (NVIC_SystemReset()).

  3. After reboot, printed the UICR values:

    UICR->PSELRESET[0] = 0x00000015
    UICR->PSELRESET[1] = 0x00000015
    

    (Expected 0x80000015 if the disconnect bit was honored.)

  4. Tried configuring P0.21 as a GPIO and driving it low to light an LED.


  • The values were written without the CONNECT bit sticking (bit 31 stayed cleared).

  • The pin still behaves as a hardware reset input.

  • Any attempt to drive it low is still reading high — P0.21 is not usable as GPIO.

  • Meanwhile, other GPIOs (e.g. P0.04) behave normally.


TL;DR:

Although PSELRESET[n] is listed in nRF52805 documentation and accessible via firmware, the disconnect bit is not honored, and P0.21 always functions as nRESET.


  • Is this expected behavior, and should we consider the PSELRESET feature non-functional on the nRF52805 even in Rev 1.4?

  • If so, could the docs be clarified to explicitly note that reset remapping is not supported on this part, despite the register existing?

Thanks, Bill!

  • Just following up to say: I got it working


    1. Erase the chip using SES or nrfjprog --eraseall

    2. In your SES project:

      • Uncomment the call to try_disable_reset_pin_once() (see code below)

    3. Run the program from debugger (once)

    4. Stop execution, comment the function call again

    5. Run again from debugger


    Code Example
    #include "nrf_gpio.h"
    #include <stdio.h>
    
    #define TEST_PIN 21  // P0.21 = nRESET on nRF52805 with an LED attached
    
    // Run this once to try writing UICR
    static void try_disable_reset_pin_once(void)
    {
        NRF_NVMC->CONFIG = NVMC_CONFIG_WEN_Wen;
        while (NRF_NVMC->READY == NVMC_READY_READY_Busy);
    
        NRF_UICR->PSELRESET[0] = (TEST_PIN << 0) | (1UL << 31);
        NRF_UICR->PSELRESET[1] = (TEST_PIN << 0) | (1UL << 31);
    
        NRF_NVMC->CONFIG = NVMC_CONFIG_WEN_Ren;
        while (NRF_NVMC->READY == NVMC_READY_READY_Busy);
    
        NVIC_SystemReset();
    }
    
    int main(void)
    {
        // === Uncomment this line ONCE to write to UICR ===
        // try_disable_reset_pin_once();
    
        // === Read back the UICR values ===
        printf("UICR->PSELRESET[0] = 0x%08lX\n", NRF_UICR->PSELRESET[0]);
        printf("UICR->PSELRESET[1] = 0x%08lX\n", NRF_UICR->PSELRESET[1]);
    
        // Try to configure P0.21 as output and light LED
        nrf_gpio_cfg_output(TEST_PIN);
        nrf_gpio_pin_clear(TEST_PIN);  // Active-low LED ON
    
        // Optional second LED (red)
        nrf_gpio_cfg_output(4);
        nrf_gpio_pin_clear(4);  // Active-low LED ON
    
        while (1)
        {
            __WFE();
        }
    }



    • 0x80000015 = disconnect bit + GPIO 21

    • After reset, UICR->PSELRESET[x] retained values: 0x80000015

    • P0.21 now functions as normal output — confirmed with LED pull-down

  • Hello,

    The UICR registers are in FLASH which means you must erase the UICR section before you can update existing register values. It's also important that you don't have the CONFIG_GPIO_AS_PINRESET symbol set in your bootloader or application as this will cause the UICR.PSELRESET registers to be set again by the startup code here:

    Best regards,

    Vidar

  • Thanks for posting the update. I didn't refresh the page before posting so I didn't know that you had found the problem.

Related