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

Not able to flash custom board with nordic nrf52840 DK unless the reset pin tied to NRF_VDD

Hallo,

IDE: Segger Embedded Studio

nrf52840 DK

Custom Board with ProteusIII

I have designed a custom board with ProteusIII (nrf52840 SoC) and was working with the board for the past 1 month. Recently in the middle of nowhere, the custom board cannot be flashed using the nrf52840DK anymore unless the reset pin from the custom board is held high using a jumper. 

Please find the error log below:

Connecting ‘J-Link’ using ‘USB’
Connecting to target using SWD
Loaded C:/Program Files/SEGGER/SEGGER Embedded Studio for ARM 5.10a/bin/JLink_x64.dll
Firmware Version: J-Link OB-SAM3U128-V2-NordicSemi compiled Mar 17 2020 14:43:00
DLL Version: 6.80a
Hardware Version: V1.00
Target Voltage: 3.300
Device "NRF52840_XXAA" selected.
InitTarget() start
InitTarget() end
InitTarget() start
InitTarget() end
connect failed
Failed to connect to target.
No idcode detected.
Please check connection and Target Interface Type

I am able to flash other boards using nrf52840 DK (Evaluation board from ProteusIII). I had programmed many times without the use of reset pin. Now each time, I need to provide high voltage to reset pin in order to flash the chip properly.

How do I resolve this issue? Is there anyway to reset the chip to its previous configurations? 

Thank you

  • Hi,

     

    I am able to flash other boards using nrf52840 DK (Evaluation board from ProteusIII). I had programmed many times without the use of reset pin. Now each time, I need to provide high voltage to reset pin in order to flash the chip properly.

    It sounds like you are using P0.18 as a GPIO, and either pulling it low (input + pull-down) or setting it as output low; while having P0.18 configured as nRESET.

    Are you using P0.18 in your firmware?

     

    To use P0.18 as a generic GPIO, you have to ensure that preprocessor define "CONFIG_GPIO_AS_PINRESET" is not set. In case it is already set explicitly in the UICR area, issue a "nrfjprog -e" to erase the UICR area before programming your firmware that tries to use P0.18 as a GPIO.

     

    Kind regards,

    Håkon

  • Hallo Hakon, 

    Thanks for the quick reply. 

    Are you using P0.18 in your firmware?

    I am not using P0.18 in my firmware. I also flashed a blinky example from SDK with reset pin held high. Then tried to flash it again, disconnecting the header wire from reset to nrf_vdd. This time it does not flash and gave the same error log. 

    I do not wish to use reset pin as GPIO. In the preprocessor directive, "CONFIG_GPIO_AS_PINRESET" is set. 

    Are there any methods to reconfigure the nrf52840 SoC to its initial configuration? 

    issue a "nrfjprog -e" to erase the UICR

    Would this method work? I am not vey comfortable with command lines. Can you please explain this a bit more clearly?

    Thank you

  • Hi,

     

    Kalrz said:

    I am not using P0.18 in my firmware. I also flashed a blinky example from SDK with reset pin held high. Then tried to flash it again, disconnecting the header wire from reset to nrf_vdd. This time it does not flash and gave the same error log. 

    I do not wish to use reset pin as GPIO. In the preprocessor directive, "CONFIG_GPIO_AS_PINRESET" is set. 

    Are there any methods to reconfigure the nrf52840 SoC to its initial configuration? 

    Then it sounds like the issue is else-where.

    Are you powering your external board with a 3.0V source?

    I usually provide VDD_NRF and GND from the nRF52-DK, to ensure that the voltages are equal on custom board and the DK.

    Kalrz said:
    ssue a "nrfjprog -e" to erase the UICR

    Would this method work? I am not vey comfortable with command lines. Can you please explain this a bit more clearly?

    This method will erase the flash on your device, and all the flash content will be empty.

    Open up a command line prompt, enter "nrfjprog", and a help screen will be printed.

     

    Note that this requires that you have already installed the nrf command line tools:

    https://www.nordicsemi.com/Software-and-tools/Development-Tools/nRF-Command-Line-Tools/Download

     

    Kind regards,

    Håkon 

  • Hallo Hakon,

    Are you powering your external board with a 3.0V source?

    I am powering the board from the DK to match the NRF_VDD voltage (just like you!)

    Open up a command line prompt, enter "nrfjprog", and a help screen will be printed.

    I followed the instructions and erased the flash. 

    Even now the command "nrfjprog -e" is producing an error when the reset pin is floating. When tied to VDD, i am able to erase the flash but this does not solve the problem. 

    I have to mentioned this behavior started all of a sudden. I was flashing the custom board from morning and now it is no more possible without the reset pin been held high externally. 

    best regards,

  • Just an add on:

    1. Yes the board is detected in the device manager.

    2. The board is powered by a lipo 3.7 V battery. An LDO output of 2.8V is provided to the SoC. 

    3. The board was never run above the limits mentioned in electrical specifications.

    4. DK is functioning properly since I just flashed programs to a second custom board successfully. 

    5. No significant changes were made in the previous firmware and also tried flashing sdk examples. 

    Any suggestions are invited. 

    Thank you

Related