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?

  • 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:

    $ nrfjprog --recover                                                                master ✗
    Recovering device. This operation might take 30s.
    Erasing user code and UICR flash areas.
    Writing image to disable ap protect.
    $ nrfjprog --memrd 0x10001200                                                       master ✗
    0x10001200: FFFFFFFF                              |....|
    

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

    Flashing build_dk to 1050227950
    west flash -d .../firmware/build_dk --dev-id 1050227950 --erase
    
    -- 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 .../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 .../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: mass erase requested
    -- runners.nrfjprog: reset after flashing requested
    -- runners.nrfjprog: Flashing file: .../firmware/build_dk/merged.hex
    [error] [ Client] - Encountered error -102: Command read_device_info executed for 126 milliseconds with result -102
    [error] [ Worker] - An unknown error.
    [error] [ Client] - Encountered error -102: Command read_memory_descriptors executed for 25 milliseconds with result -102
    Failed to read device memories.
    [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.
    FATAL ERROR: command exited with status 33: nrfjprog --program .../firmware/build_dk/merged.hex --chiperase --verify -f NRF52 --snr 1050227950
    
     *  The terminal process terminated with exit code: 33. 
     *  Terminal will be reused by tasks, press any key to close it. 
    

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

  • After flashing my firmware with segger:

    -- west flash: using runner nrfjprog
    -- runners.nrfjprog: mass erase requested
    -- runners.nrfjprog: reset after flashing requested
    -- runners.nrfjprog: Flashing file: /Users/redacted/code/alpha21/keyvo/firmware/build_dk/merged.hex
    [ #################### ]   0.216s | Erase file - Done erasing                                                          
    [ #################### ]   1.919s | Program file - Done programming                                                    
    [ #################### ]   1.996s | Verify file - Done verifying                                                       
    Enabling pin reset.
    Applying pin reset.
    -- runners.nrfjprog: Board with serial number 802000342 flashed successfully.

    It seems, the nRESET register is correct:

    $ nrfjprog --memrd 0x10001200; nrfjprog --memrd 0x10001204                          master ✗
    0x10001200: 00000012                              |....|
    0x10001204: 00000012                              |....|
    

    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

  • I was able to update the debugger chip firmware but I'm still having issues with flashing.

    error] [ Client] - Encountered error -102: Command read_device_info executed for 132 milliseconds with result -102
    [error] [ Worker] - An unknown error.
    [error] [ Client] - Encountered error -102: Command read_memory_descriptors executed for 25 milliseconds with result -102
    Failed to read device memories.
    [error] [ Worker] - An unknown error.
    ERROR: JLinkARM DLL reported an error. Try again. If error condition

Related