This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Exiting SWD mode

I have code that uses two GPIOs to program an NRF51822 via SWD mode. This code all works fine and suceeds in programming the device.

What I would like to do is get the NRF51822 to exit SWD mode, returning the pins to their previous function (eg. RESET).

Is there any way to do that?

Parents
  • I found the answer in the ref manual

    Normal mode can always be resumed by performing a "hard-reset" through the SWD interface:

    1. Enter debug interface mode.
    2. Enable reset through the RESET register in the POWER peripheral.
    3. Hold the SWDCLK and SWDIO/nRESET line low for a minimum of 100 μs.

    I had misread this to mean that doing any of the above would do it.

    You need to do all of these steps in the sequence shown above.

Reply
  • I found the answer in the ref manual

    Normal mode can always be resumed by performing a "hard-reset" through the SWD interface:

    1. Enter debug interface mode.
    2. Enable reset through the RESET register in the POWER peripheral.
    3. Hold the SWDCLK and SWDIO/nRESET line low for a minimum of 100 μs.

    I had misread this to mean that doing any of the above would do it.

    You need to do all of these steps in the sequence shown above.

Children
No Data
Related