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?
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?
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:
nrfjprog --memrd 0x10001200 nrfjprog --memrd 0x10001204
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.
* 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. [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 /Users/redacted/code/alpha21/keyvo/firmware/build_dk/merged.hex --sectoranduicrerase --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.
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:
$ 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 |....|
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.
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.