Hi,
In my project, I need to disable SWD permanently. Can I do it using UICR.APPROTECT?
The following 2 pieces of information confused me:
1.
infocenter.nordicsemi.com/index.jsp
After UICR has been written, the new UICR configuration will only take effect after a reset.
UICR can only be written nWRITE number of times before an erase must be performed using ERASEUICR or ERASEALL.
2.
infocenter.nordicsemi.com/index.jsp
Register APPROTECT.DISABLE is reset after pin reset, power or brownout reset, watchdog reset, or wake from System OFF as mentioned above.
Question 1: What exactly is UICR.APPROTECT value after reset?
According to 1 above, if I write 0x0 (Enabled) to UICR.APPROTECT, it will take effect after a reset. -> After reset, SWD is disabled. According to 2, APPROTECT.DISABLE is reset after pin reset, power or brownout reset, looks like APPROTECT.DISABLE is reset to default value, which is 0xFF (disabled).
I got very confused.
Question 2. Is there a way to disable SWD permanently, by UICR.APPROTECT register or by HW change?