Hello,
is it enough to call NVIC_SystemReset() after I flashed a board so that it returns to lower power consumption? Or do I have to pull out the battery?
Marius
Hello,
is it enough to call NVIC_SystemReset() after I flashed a board so that it returns to lower power consumption? Or do I have to pull out the battery?
Marius
EDIT 22.02.2017: Added pin reset as a option for getting nRF52 out of debug mode.
You will not get out of debug mode with NVIC_SystemReset()
. See below for how to get out of debug mode for nRF51 and nRF52.
nRF51: See part 11.1.3 "Resuming normal mode" in the Reference Manual. You can do a pin reset with nrfjprog: nrfjprog --pinreset
.
nRF52: Pin reset (if enabled), power on reset (POR) and brown-out reset (BOR) will get the chip out of debug mode.
Note: If you use jlink version between 6.10b (might also be earlier versions, have not checked) and 6.12e, the debugger will not get the device out of debug mode after programming. Latest version at the moment is 6.12j, which seems to work well.
Hi Ole,
Thanks for the update, but I've been unable to get nRF52 to exit debug mode with a pin reset (using PCA10040).
However, I am seeing from current measurmenets that nRF52 is put back into normal mode (without resetting the target) when nrfjprog or JLinkExe closes the jlink connection unless nRF52 is explicitly left in debug mode with "nrfjprog -d" for example.
My original concern was that reflashing nRF52 over SWD would leave the target in debug mode as was the case with nRF51, and that additionally, unlike nRF51, there was no similar way to resume normal mode by calling a reset and holding SWDCLK/IO low (without POR/BOR). It appears that jlink handles normal mode reentry appropriately, so we will not need any additional circuitry to power cycle nRF52 or hold SWDCLK/IO low to exit debug mode after reflashing in our design.
Thanks
Hi Ole,
Thanks for the update, but I've been unable to get nRF52 to exit debug mode with a pin reset (using PCA10040).
However, I am seeing from current measurmenets that nRF52 is put back into normal mode (without resetting the target) when nrfjprog or JLinkExe closes the jlink connection unless nRF52 is explicitly left in debug mode with "nrfjprog -d" for example.
My original concern was that reflashing nRF52 over SWD would leave the target in debug mode as was the case with nRF51, and that additionally, unlike nRF51, there was no similar way to resume normal mode by calling a reset and holding SWDCLK/IO low (without POR/BOR). It appears that jlink handles normal mode reentry appropriately, so we will not need any additional circuitry to power cycle nRF52 or hold SWDCLK/IO low to exit debug mode after reflashing in our design.
Thanks