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

SWD protection on nRF51822

Hi all, is there any method to disable SWD in a way that every operation through SWD is blocked? Do the MPU also blocks for reprogram the binary through SWD (maybe disabling debug mode forever)?

Thanks, Davide

Parents
  • Please refer to the nRF51 product specification Chapter 9.1 to see how the MPU works:
    Protect all (PALL) is configured by writing '0' to UICR.RBPCONF.PALL. When protect all is enabled, the debugger (SWD) will no longer have access to code region 0, code region 1, RAM or any peripherals except for the following:

    • The NVMC peripheral.
    • The RESET register in the POWER peripheral.
    • The DISABLEINDEBUG register in the MPU peripheral.

    Note that the behavior is changed in the nRF52 where the access port is either disabled (0xFF) or enabled (0x00): Access port protection can only be disabled by issuing an ERASEALL command via CTRL-AP. This command will erase the Flash, UICR, and RAM.

Reply
  • Please refer to the nRF51 product specification Chapter 9.1 to see how the MPU works:
    Protect all (PALL) is configured by writing '0' to UICR.RBPCONF.PALL. When protect all is enabled, the debugger (SWD) will no longer have access to code region 0, code region 1, RAM or any peripherals except for the following:

    • The NVMC peripheral.
    • The RESET register in the POWER peripheral.
    • The DISABLEINDEBUG register in the MPU peripheral.

    Note that the behavior is changed in the nRF52 where the access port is either disabled (0xFF) or enabled (0x00): Access port protection can only be disabled by issuing an ERASEALL command via CTRL-AP. This command will erase the Flash, UICR, and RAM.

Children
Related