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

nRF52840 pin reset behaviour

The datasheet appears to say that a pin_reset does not completely reset the chip:

in particular it does not reset the SWJ-DP interface which, I believe, in some circumstances leaves the debugger running and causes excessive current. This is referred to in this case:

https://devzone.nordicsemi.com/f/nordic-q-a/73447/the-nrf52832-did-not-halt-after-hardware-reset-pin-reset/303788

and this case:

https://devzone.nordicsemi.com/f/nordic-q-a/77812/nrf52840-current-consumption-increases-by-more-than-1ma-after-pin-reset-with-nrfjprog--p

I have two questions:

1) Is the table above correct because when we issue a soft reset from nrfjprog we do not get the extra 1ma which implies that SWJ-DP is being reset

2) Is it possible for the firmware to determine the state of SWJ-DP and, if necessary, disable it

Thank you,

Martin

Parents
  • Hi Martin

    1. Yes, this table should be correct. As you can see there is also a "Debug" column here, referring to the Debug and trace chapter for more information. In section 4.8.4 Debug Interface mode there is more information on when SWJ-DP is used. When a debug session is over, the external debugger makes sure to put the device back into normal mode, usually done by a soft reset, resetting the "debug" mode. In some cases if the SWJ-DP is active, this will require a hard reset. The state of the SWJ-DP can not be read I'm afraid, and will only be disabled on a hard reset, Power-on reset or Brownout. As long as the debug current is gone it should be safe to say that the SWJ-DP and debug mode is disabled as expected. If you want to be 100% sure without checking, a hard reset is required.

    What specific nrfjprog command are you using to reset the device? There are --pinreset, --reset, or --debugreset. Which one are you using? If you're in doubt of what reset was called you can also read the RESETREAS register after a reset which will tell you what kind of reset was trigged.

    Best regards,

    Simon

  • Simon

    We were using --pinreset but this didn't seem to clear the problem although --reset did

  • Is 'hard reset' the same as 'pin reset' - or is 'hard reset' only really power up?

Reply Children
No Data
Related