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

Does nRFgo Studio 1.20.0 "release" the nRF51822 SWDIO pin to be used as a chip reset?

I have a Rev3 nRF51822 chip (CFACA00) on a custom board (no external pull resistors on SWDIO or SWCLK), and I am using nRFgo Studio 1.20.0.2 to program SD 8.0.0 and my Nordic application.

The hardware/firmware relies on the nReset pin to reset the Nordic chip. The main MCU and the Nordic are both powered off of the battery, and there is currently no way to perform a true POR of the Nordic (short or disconnecting the battery).

It appears that after programming the Nordic with 1.20.0, that the Nordic reset is not happening upon my main MCU application reset/start-up. After programming, if I disconnect the battery, or if I manually enable the pin reset while in debug mode with a JLinkExe batch/script (writing the NRF_POWER->RESET register (at 0x40000544, and toggling the reset pin), then Nordic nReset pin is active as a reset pin, and my application successfully resets the Nordic on start-up.

  • Hi David,

    Which nRFTools version are you using ?

    The nRFGo Studio relies on nrfjprog.exe tool to program/erase/reset the chip.

    You can try trigger a reset via nrfjprog.exe tool with the -p or -r option.

    I'm using nrfjprog v 7.5.2 (same version with nRFTools) and it resets the chip properly.

  • Hi Hung,

    Yes, "nrfjprog -p" essentially works to trigger a reset, after which the application resets of the Nordic work correctly. So, I can run my JLinkExe batch/script, or run "nrfjprog -p", to recover my Nordic reset line. Based on what you claim, however, I shouldn't have to do this.

    I was using nRFTools (and nrfjprog.exe) version 7.5.0. I updated to version 7.5.2, but got the same results. This doesn't surprise me because the 7.5.0 version of nrfjprog worked when I manually ran it. That is why I was wondering if Studio 1.20.0 had a bug in which it wasn't performing a "nrfjprog -p", or its equivalent, before exiting. For me, previous versions of nRFgo Studio do not have this issue.

    Just some further info: nRFgo Studio correctly identifies my Nordic as "nRF51822 CFACA00 (0x0087)". Also, I don't have to actually program the chip to have this issue. Running nRFgo Studio, selecting "nRF5x Programming" (and letting it connect & read chip info), and exiting, is enough.

  • @David Fritsch: It was the fact that nRFGo Studio will leave the chip in debug mode after programming (or after reading chip info). To be able to do a pin reset when in debug mode you must set the RESET register to 1 as you did with JlinkExe.

    If you don't want to use nrfjprog or JlinkExe to do that manually, you can enable it in the code. Just add NRF_POWER->RESET =1; in your code, you should be able to do pin reset after programming.

  • Thanks Hung! This made a difference for me. After adding NRF_POWER>RESET=1 to my application code (first line in main()), my Nordic chip reset works both after debugging in Keil, and after programming with nRGgo Studio 1.20.0.

Related