@@ -52,4 +52,71 @@ config NFCT_PINS_AS_GPIOS
5252 NFC pins in nRF52 series: P0.09 and P0.10
5353 NFC pins in nRF5340: P0.02 and P0.03
5454
55+ choice NRF_APPROTECT_HANDLING
56+ bool "APPROTECT handling"
57+ depends on SOC_SERIES_NRF52X || SOC_NRF5340_CPUNET || \
58+ (SOC_NRF5340_CPUAPP && !TRUSTED_EXECUTION_NONSECURE)
59+ default NRF_APPROTECT_USE_UICR
60+ help
61+ Specifies how the SystemInit() function should handle the APPROTECT
62+ mechanism.
63+
64+ config NRF_APPROTECT_USE_UICR
65+ bool "Use UICR"
66+ help
67+ When this option is selected, the SystemInit() function loads the
68+ firmware branch state of the APPROTECT mechanism from UICR, so if
69+ UICR->APPROTECT is disabled, CTRLAP->APPROTECT will be disabled.
70+
71+ config NRF_APPROTECT_LOCK
72+ bool "Lock"
73+ help
74+ When this option is selected, the SystemInit() function locks
75+ the firmware branch of the APPROTECT mechanism, preventing it
76+ from being opened.
77+
78+ config NRF_APPROTECT_USER_HANDLING
79+ bool "Allow user handling"
80+ depends on !SOC_SERIES_NRF52X
81+ help
82+ When this option is selected, the SystemInit() function does not
83+ touch the APPROTECT mechanism, allowing the user code to handle it
84+ at later stages, for example, to implement authenticated debug.
85+
86+ endchoice
87+
88+ choice NRF_SECURE_APPROTECT_HANDLING
89+ bool "Secure APPROTECT handling"
90+ depends on (SOC_NRF5340_CPUAPP && !TRUSTED_EXECUTION_NONSECURE)
91+ default NRF_SECURE_APPROTECT_USE_UICR
92+ help
93+ Specifies how the SystemInit() function should handle the secure
94+ APPROTECT mechanism.
95+
96+ config NRF_SECURE_APPROTECT_USE_UICR
97+ bool "Use UICR"
98+ help
99+ When this option is selected, the SystemInit() function loads the
100+ firmware branch state of the secure APPROTECT mechanism from UICR,
101+ so if UICR->SECUREAPPROTECT is disabled, CTRLAP->SECUREAPPROTECT
102+ will be disabled.
103+
104+ config NRF_SECURE_APPROTECT_LOCK
105+ bool "Lock"
106+ help
107+ When this option is selected, the SystemInit() function locks the
108+ firmware branch of the secure APPROTECT mechanism, preventing it
109+ from being opened.
110+
111+ config NRF_SECURE_APPROTECT_USER_HANDLING
112+ bool "Allow user handling"
113+ depends on !SOC_SERIES_NRF52X
114+ help
115+ When this option is selected, the SystemInit() function does not
116+ touch the secure APPROTECT mechanism, allowing the user code to
117+ handle it at later stages, for example, to implement authenticated
118+ debug.
119+
120+ endchoice
121+
55122endif # SOC_FAMILY_NRF
0 commit comments