Skip to content

Commit 17a8128

Browse files
nika-nordicnashif
authored andcommitted
soc: nordic: nrf54l15: fix APPROTECT handling
To configure APPROTECT on nRF54L15 different set of MDK symbols must be used. Additionally, nRF54L15 does not support loading APPROTECT configuration from the UICR in runtime. Signed-off-by: Nikodem Kastelik <[email protected]>
1 parent cfd5469 commit 17a8128

File tree

2 files changed

+27
-6
lines changed

2 files changed

+27
-6
lines changed

modules/hal_nordic/nrfx/CMakeLists.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,14 @@ zephyr_compile_definitions_ifdef(CONFIG_SOC_NRF9230_ENGB_CPUPPR NRF9230_ENGB_XXA
6464
zephyr_compile_definitions_ifdef(CONFIG_NRF_APPROTECT_LOCK
6565
ENABLE_APPROTECT)
6666
zephyr_compile_definitions_ifdef(CONFIG_NRF_APPROTECT_USER_HANDLING
67-
ENABLE_APPROTECT_USER_HANDLING)
67+
ENABLE_APPROTECT_USER_HANDLING
68+
ENABLE_AUTHENTICATED_APPROTECT)
6869
zephyr_compile_definitions_ifdef(CONFIG_NRF_SECURE_APPROTECT_LOCK
69-
ENABLE_SECURE_APPROTECT)
70+
ENABLE_SECURE_APPROTECT
71+
ENABLE_SECUREAPPROTECT)
7072
zephyr_compile_definitions_ifdef(CONFIG_NRF_SECURE_APPROTECT_USER_HANDLING
71-
ENABLE_SECURE_APPROTECT_USER_HANDLING)
73+
ENABLE_SECURE_APPROTECT_USER_HANDLING
74+
ENABLE_AUTHENTICATED_SECUREAPPROTECT)
7275
zephyr_library_compile_definitions_ifdef(CONFIG_NRF_TRACE_PORT
7376
ENABLE_TRACE)
7477

soc/nordic/Kconfig

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,15 +99,24 @@ config NFCT_PINS_AS_GPIOS
9999

100100
choice NRF_APPROTECT_HANDLING
101101
bool "APPROTECT handling"
102-
depends on SOC_SERIES_NRF52X || SOC_NRF5340_CPUNET || \
103-
SOC_NRF5340_CPUAPP || SOC_SERIES_NRF91X
102+
depends on SOC_SERIES_NRF52X || SOC_SERIES_NRF53X || SOC_NRF54L15_CPUAPP || \
103+
SOC_SERIES_NRF91X
104+
default NRF_APPROTECT_DISABLE if SOC_NRF54L15_CPUAPP
104105
default NRF_APPROTECT_USE_UICR
105106
help
106107
Specifies how the SystemInit() function should handle the APPROTECT
107108
mechanism.
108109

110+
config NRF_APPROTECT_DISABLE
111+
bool "Disable"
112+
depends on SOC_NRF54L15_CPUAPP
113+
help
114+
When this option is selected, the SystemInit() disables
115+
the APPROTECT mechanism.
116+
109117
config NRF_APPROTECT_USE_UICR
110118
bool "Use UICR"
119+
depends on SOC_SERIES_NRF52X || SOC_SERIES_NRF53X || SOC_SERIES_NRF91X
111120
help
112121
When this option is selected, the SystemInit() function loads the
113122
firmware branch state of the APPROTECT mechanism from UICR, so if
@@ -132,14 +141,23 @@ endchoice
132141

133142
choice NRF_SECURE_APPROTECT_HANDLING
134143
bool "Secure APPROTECT handling"
135-
depends on SOC_NRF5340_CPUAPP || SOC_SERIES_NRF91X
144+
depends on SOC_NRF5340_CPUAPP || SOC_NRF54L15_CPUAPP || SOC_SERIES_NRF91X
145+
default NRF_SECURE_APPROTECT_DISABLE if SOC_NRF54L15_CPUAPP
136146
default NRF_SECURE_APPROTECT_USE_UICR
137147
help
138148
Specifies how the SystemInit() function should handle the secure
139149
APPROTECT mechanism.
140150

151+
config NRF_SECURE_APPROTECT_DISABLE
152+
bool "Disable"
153+
depends on SOC_NRF54L15_CPUAPP
154+
help
155+
When this option is selected, the SystemInit() disables
156+
the secure APPROTECT mechanism.
157+
141158
config NRF_SECURE_APPROTECT_USE_UICR
142159
bool "Use UICR"
160+
depends on SOC_NRF5340_CPUAPP || SOC_SERIES_NRF91X
143161
help
144162
When this option is selected, the SystemInit() function loads the
145163
firmware branch state of the secure APPROTECT mechanism from UICR,

0 commit comments

Comments
 (0)