This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Reset button doesn't work on nRF52840 DK - pca10056 1.1.0 2019.9

Hi,

My NRF52840DK (pca10056 1.1.0 2019.9) would not reset when I press its Reset button. The issue is very similar to https://devzone.nordicsemi.com/f/nordic-q-a/38555/reset-button-doesn-t-work-on-some-nrf52840-dk-pca10056-1-0-0-boards, but it's not exactly the same:

- holding down the button while switching the board off/on makes LED 5 blink slowly

- when I press the button, I do get a 30 ms active low pulse on P0.18

- CONFIG_GPIO_AS_PINRESET is among the project's Preprocessor Definitions / Options / Common

- nrfjprog --memrd 0x10001200 --w 32 --n 8 displays 0x015 (decimal 21) instead of the required  0x012 (decimal 18), as per mentioned post:

- my  system_nrf52840.c file (SDK 15.3) reads:

    #if defined (CONFIG_GPIO_AS_PINRESET)
        if (((NRF_UICR->PSELRESET[0] & UICR_PSELRESET_CONNECT_Msk) != (UICR_PSELRESET_CONNECT_Connected << UICR_PSELRESET_CONNECT_Pos)) ||
            ((NRF_UICR->PSELRESET[1] & UICR_PSELRESET_CONNECT_Msk) != (UICR_PSELRESET_CONNECT_Connected << UICR_PSELRESET_CONNECT_Pos))){
            NRF_NVMC->CONFIG = NVMC_CONFIG_WEN_Wen << NVMC_CONFIG_WEN_Pos;
            while (NRF_NVMC->READY == NVMC_READY_READY_Busy){}
            NRF_UICR->PSELRESET[0] = 18;
            while (NRF_NVMC->READY == NVMC_READY_READY_Busy){}
            NRF_UICR->PSELRESET[1] = 18;
            while (NRF_NVMC->READY == NVMC_READY_READY_Busy){}
            NRF_NVMC->CONFIG = NVMC_CONFIG_WEN_Ren << NVMC_CONFIG_WEN_Pos;
            while (NRF_NVMC->READY == NVMC_READY_READY_Busy){}
            NVIC_SystemReset();
        }
    #endif

So everything mentioned in that post seems to be fine, but the board still would not reset. A second board (same 1.1.0 2019.9 but different lot) behaves the same way.

Please advise,

Andrei

Parents Reply
  • Thank you, Andreas. You gave me the right solution: I fully erased the chip using Programmer in nRFConnect - there I could also see it was fully erased; then I programmed it from within the SEGGER Embedded Studio. Now it works as expected.

    By the way, is there a way to have SEGGER Embedded Studio issue to nrfjprog also the command to fully erase the chip, prior to writing the newly-built code?

    Best regards,

    Andrei

Children
Related