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

NRF52840 RESET Pin stuck at LOW

Hi,

I have a custom nRF52840 board. I mistakenly tried flashing the custom nRF52840 board with STM32 firmware. From that moment on, I can't flash board. When connected to J-Link, LED on J-Link is solid RED. I noticed that the RESET pin is in LOW level.

Here's what I tried after going through questions in forum:

  1. Pulled up the RESET pin to 3.3V.
  2. Erased the chip from SES
  3. Recovered the board using nRFGoStudio and it was successful.
  4. Followed one post which suggested to use J-Link commander to reset and write values after resetting. Everything went successful.
  5. In system_nRF52840.c, I commented this section, as recommended by one of the other posts.
    #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

However, the RESET pin still needs to be pulled-up to HIGH for the board to responsd to J-Link.

Can you please help me un-brick this board?

Parents
  • Which pins have you connected between your board and J-link? It should be sufficient to connect gnd, vdd, swdclk and swdio.

    Also, if you open a command line window you can call 'nrfjprog --readuicr dump_uicr.hex' when failling, I just want to check if UICR still have pin reset enabled after all your changes.

    To completely erase a board you can call 'nrfjprog --recover' or 'nrfjprog --eraseall'.

    Best regards,
    Kenneth

Reply
  • Which pins have you connected between your board and J-link? It should be sufficient to connect gnd, vdd, swdclk and swdio.

    Also, if you open a command line window you can call 'nrfjprog --readuicr dump_uicr.hex' when failling, I just want to check if UICR still have pin reset enabled after all your changes.

    To completely erase a board you can call 'nrfjprog --recover' or 'nrfjprog --eraseall'.

    Best regards,
    Kenneth

Children
Related