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:
- Pulled up the RESET pin to 3.3V.
- Erased the chip from SES
- Recovered the board using nRFGoStudio and it was successful.
- Followed one post which suggested to use J-Link commander to reset and write values after resetting. Everything went successful.
- 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?