Reset button on nrf52840dk stopped working

It seems the "reset" button on my nrf52840dk doesn't do anything anymore. I believe this started happening after I enabled mcuboot in sysbuild. Is this expected?

Parents
  • Hi,

    The reset pin is enabled by default for the nRF52840 DK in the uicr node in the devicetree. Have you modified or deleted this node in your board overlay files?

    You can check the build devicetree file in the your build folder: build\<image_name>\zephyr\zephyr.dts. You might want to check both the application and the mcuboot image.

    Once programmed, the UICR will be written by the application to enable the nRESET pin. You can check that this has been enabled correctly by reading out this registers using the debugger:

    Fullscreen
    1
    2
    nrfjprog --memrd 0x10001200
    nrfjprog --memrd 0x10001204
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    If nRESET is enabled correctly, the registers should read 0x00000012. 

    Best regards,
    Jørgen

  • Actually, I just noticed that I can't flash anymore the DK whose reset button has stopped working.

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    * Executing task: nRF Connect: Flash: firmware/build_dk (active)
    Flashing build_dk to 1050227950
    west flash -d /Users/redacted/code/alpha21/keyvo/firmware/build_dk --dev-id 1050227950
    -- west flash: rebuilding
    [0/10] Performing build step for 'mcuboot'
    ninja: no work to do.
    [1/10] Performing build step for 'firmware'
    ninja: no work to do.
    [4/10] cd /Users/redacted/code/alpha21/keyvo/firmware/build_dk/_sysbuild && /opt/nordic/ncs/toolchains/b8efef2ad5/Cellar/cmake/3.21.0/bin/cmake -E true
    [6/10] No install step for 'firmware'
    [7/10] Completed 'firmware'
    [8/10] cd /Users/redacted/code/alpha21/keyvo/firmware/build_dk/_sysbuild && /opt/nordic/ncs/toolchains/b8efef2ad5/Cellar/cmake/3.21.0/bin/cmake -E true
    -- west flash: using runner nrfjprog
    -- runners.nrfjprog: reset after flashing requested
    -- runners.nrfjprog: Flashing file: /Users/redacted/code/alpha21/keyvo/firmware/build_dk/merged.hex
    [error] [ Client] - Encountered error -102: Command read_device_info executed for 131 milliseconds with result -102
    [error] [ Worker] - An unknown error.
    [error] [ Client] - Encountered error -102: Command read_memory_descriptors executed for 29 milliseconds with result -102
    Failed to read device memories.
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    I tried the nrfjprog commands you suggested and it works on one of my DKs but doesn't work on the DK whose reset button stopped working:


    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    $ nrfjprog --ids
    1050227950
    # dk with reset button issue:
    $ nrfjprog --memrd 0x10001200
    [error] [ Client] - Encountered error -102: Command connect_to_emu_with_snr executed for 599 milliseconds with result -102
    ERROR: Unable to connect to a debugger.
    [error] [ Worker] - An unknown error.
    ERROR: JLinkARM DLL reported an error. Try again. If error condition
    ERROR: persists, run the same command again with argument --log, contact Nordic
    ERROR: Semiconductor and provide the generated log.log file to them.
    NOTE: For additional output, try running again with logging enabled (--log).
    NOTE: Any generated log error messages will be displayed.
    $ nrfjprog --ids master ✗
    1050210565
    # dk with no reset button issue:
    $ nrfjprog --memrd 0x10001200 master ✗
    0x10001200: 00000012 |....|
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • I have not modified uicr in overlay files and have another DK that I flashed with same image which doesn't have the issue.

    Any idea what might have caused this and how to fix it? Did I somehow brick the board? The MCU is still working fine and the board looks fine too. Interface MCU led is green. My application is running. I can even connect to SMB server using nordic  Device Manager app. I tried clicking the "factory reset" button but it didn't seem to do anything.

  • Did you modify the DK in any way? E.g., change switch positions, cut/solder solder-bridges, etc? Please provide a picture of the DK if possible.

    Are you able to recover the DK? (nrfjprog --recover)

    If you have a 10-pin SWD cable available, could you try to connect that from the "Debug out" port on the working DK to the "Debug in" port of the DK where the reset pin does not work and run the above recover command? (select the serial number of the working DK when prompted).

Reply
  • Did you modify the DK in any way? E.g., change switch positions, cut/solder solder-bridges, etc? Please provide a picture of the DK if possible.

    Are you able to recover the DK? (nrfjprog --recover)

    If you have a 10-pin SWD cable available, could you try to connect that from the "Debug out" port on the working DK to the "Debug in" port of the DK where the reset pin does not work and run the above recover command? (select the serial number of the working DK when prompted).

Children
  • I don't have a SWD cable but I have a SEGGER J-Link and tried to use it for flashing by connecting it to the debug in but got a similar error:

    Fullscreen
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    I didn't not modify the DK in any way and I believe all the switches are in the correct position.

    Fullscreen
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • After trying again with the j-link debugger (I found out I also had to keep the DK's usb plugged in for power), I was able to run `nrfjprog --recover` and flash it.

    After running `nrfjprog --recover` using segger:

    Fullscreen
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Unfortunately, even after recovering, if I try to build with the onboard debugger afterwards, it still fails:

    Fullscreen
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    But flashing using segger works. So it seems there is an issue with the onboard debugger?

  • After flashing my firmware with segger:

    Fullscreen
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    It seems, the nRESET register is correct:

    Fullscreen
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    When I connect to the onboard debugger, I still see VCOM0 and VCOM1 and application logs when I connect to VCOM0. Clicking the "Reset" button is not rebooting the MCU though.

  • Is the "Reset" button not working issue related to the issue with flashing using the onboard debugger? I am guessing there is a link between both issue but not sure what it is.

  • Sounds like there could be a problem with the firmware running on the debugger chip. By default, the reset button is not connected directly to the nRF54L15 chip (SB1 is open):

    The button connects to the DBGR_RESET input on the debugger chip, which will trigger a reset of the nRF54L15 chip on the DK.

    Can you try to install a newer version of J-Link, start J-Link Configuration, select the debugger and click "Update firmware of selected probes and programmers"?

    Best regards,
    Jørgen