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

nRF52832 debug

Hi, I have a similar requirement as stated in this question.

I am using nrf52832_xxaa with SDK v11.0. I have the following queries

a. Can external debugger modify CTRL-AP - Control Access Port?

b. What happens when I reset my hardware over JLink by firing "nrfjprog -f nrf52 -r" command?

c. What happens when I reset my hardware via softdevice API "NVIC_SystemReset()"?

  • The question you link is answered and valid for both nRF51 and nRF52 (see registers' description in their respective specifications). Now to your three additional questions (which are not so much related to the first one in fact;):

    a) Yes external debugger can access CTRL-AP.

    b) From functional point of view it's equal to any other reset mean (e.g. the method you list in point c). If you are interested into very technical details what is sent over SWD (it shouldn't be PIN reset which is different nrfjprog -p command) then this article might give you way how to find it.

    c) If you use NVIC_SystemReset() function in your code then (as you can see CMSIS file corresponding to use ARM Cortex architecture) specific value is written to SCB->AIRCR register and then busyloop waits until core resets itself. See e.g. components\toolchain\cmsis\include\core_cm4.h nRF5 SDk file.

    Back to your original line: if you want to disable debugging interface (and actually protect the chip against read-back of ROM and RAM and other memory regions during run-time) then you follow the answer there. If you just play with the debugger and you are interested in particular actions there are hopefully some answers here.

Related