52832 weird Reset pin behaviour

I have a project which started life as ble_app_uart as a template which I've developed on the nRF52DK and is working fine. Now I am transferring it to my custom PCB.

When I first built upthe PCB nothing wold run, which looks like was because of the RESET pin unconnected so for troubleshooting I have a pullup resistor and pushbutton like this article NRF52 pin RESET

1. With the project as-is nothing would run unless I press the reset button. This doesn't sound right as I would expect the brownout / power-on reset to reset the CPU.

2. I've now removed CONFIG_GPIO_AS_PINRESET from the project preprocessor directives, now the project starts. BUT - I notice that the button still resets??? Is this correct, if so how do I disable reset on the pin?

Using Segger Embedded Studio BTW

  • 2. I've now removed CONFIG_GPIO_AS_PINRESET from the project preprocessor directives, now the project starts. BUT - I notice that the button still resets??? Is this correct, if so how do I disable reset on the pin?

    Which pin number are you using as reset on your custom board? We have this in our system_nrf52.c is as below

    #if    defined (DEVELOP_IN_NRF52805) \
        || defined (DEVELOP_IN_NRF52810) \
        || defined (DEVELOP_IN_NRF52811) \
        || defined (DEVELOP_IN_NRF52832)
        #define RESET_PIN 21
    #elif  defined (DEVELOP_IN_NRF52820) \
        || defined (DEVELOP_IN_NRF52833) \
        || defined (DEVELOP_IN_NRF52840)
        #define RESET_PIN 18
    #elif  defined (NRF52805_XXAA) \
        || defined (NRF52810_XXAA) \
        || defined (NRF52811_XXAA) \
        || defined (NRF52832_XXAA) \
        || defined (NRF52832_XXAB)
        #define RESET_PIN 21
    #elif  defined (NRF52820_XXAA) \
        || defined (NRF52833_XXAA) \
        || defined (NRF52840_XXAA)
        #define RESET_PIN 18
    #else
        #error "A supported device macro must be defined."
    #endif

    Have you configured the right pin number to be connected to reset in your system_nrf52.c file to match your custom layout?

  • Hi Thanks for the reply. I don't actually want to use any external reset pin. From the article I linked to above:

    "If you dont want to use reset, just leave this pin floating - as long as you don't explicitly enable reset pin, it won't work. If you want to use it, don't leave it floating - use external pull-up."

    Below are the preprocessor deinitions, so NRF52832_XXAA (pin 21) is currently defined. I would like to leave the pin floating, but I'm concerned that it is still an active reset. I don't want the pin active, or piulled up, as this is a power-sensitive application.

    APP_TIMER_V2
    APP_TIMER_V2_RTC1_ENABLED
    FLOAT_ABI_HARD
    INITIALIZE_USER_SECTIONS
    NO_VTOR_CONFIG
    NRF52
    NRF52832_XXAA
    NRF52_PAN_74
    NRF_SD_BLE_API_VERSION=7
    S112
    SOFTDEVICE_PRESENT
    MBEDTLS_CONFIG_FILE="nrf_crypto_mbedtls_config.h"

  • 2. I've now removed CONFIG_GPIO_AS_PINRESET from the project preprocessor directives, now the project starts. BUT - I notice that the button still resets??? Is this correct, if so how do I disable reset on the pin?

    Are you sure that you removed CONFIG_GPIO_AS_PINRESET and erased the whole chip before reprogramming it? it is important that you erase the whole flash including the UICR registers (nrfjprog -e   or   nrfjprog --recover).

    For me it seems like you are reprogramming using --sectorerase which keeps the UICR value as is.

  • Thanks that was the problem... erasing the entire flash sorted it.

Related