Skip to content

Commit ba3c45f

Browse files
committed
soc: nordic: Add approtect workaround for 91x1
Add CONFIG_NRF_CONSTANT_LATENCY_WORKAROUND for enabling a constant latency mode workaround for the nRF9161 anomaly: [36] Debug and Trace: Access port gets locked in WFI and WFE. Constant latency mode prevents WFI and WFE instructions from entering SYSTEM ON IDLE mode, which would reset the approtect. Signed-off-by: Markus Lassila <[email protected]>
1 parent 0fb63c0 commit ba3c45f

File tree

3 files changed

+22
-1
lines changed

3 files changed

+22
-1
lines changed

modules/hal_nordic/nrfx/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ zephyr_compile_definitions_ifdef(CONFIG_NRF_SECURE_APPROTECT_LOCK
8080
ENABLE_SECURE_APPROTECT)
8181
zephyr_compile_definitions_ifdef(CONFIG_NRF_SECURE_APPROTECT_USER_HANDLING
8282
ENABLE_SECURE_APPROTECT_USER_HANDLING)
83+
zephyr_compile_definitions_ifdef(CONFIG_NRF_CONSTANT_LATENCY_WORKAROUND
84+
ENABLE_CONSTANT_LATENCY_WORKAROUND)
8385
zephyr_library_compile_definitions_ifdef(CONFIG_NRF_TRACE_PORT
8486
ENABLE_TRACE)
8587

soc/nordic/Kconfig

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,25 @@ config NRF_SECURE_APPROTECT_USER_HANDLING
163163

164164
endchoice
165165

166+
config NRF_CONSTANT_LATENCY_WORKAROUND
167+
bool "Constant latency mode for debugging purposes"
168+
depends on SOC_NRF9120 && \
169+
!NRF_APPROTECT_LOCK && !NRF_SECURE_APPROTECT_LOCK
170+
default n
171+
help
172+
This option enables a workaround for the nRF9161 anomaly
173+
[36] Debug and Trace: Access port gets locked in WFI and WFE.
174+
It is only for debugging purposes. Do not enable it in production
175+
code.
176+
177+
When this option is selected, the SystemInit() function enables
178+
the constant latency mode by triggering the CONSTLAT task. This
179+
prevents WFI and WFE instructions from entering SYSTEM ON IDLE mode.
180+
As a result, anomaly is avoided with the cost of increased power
181+
consumption.
182+
183+
Note: With multiple images, add this for the first image.
184+
166185
config NRF_TRACE_PORT
167186
bool "nRF TPIU"
168187
depends on !SOC_SERIES_NRF51X

west.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ manifest:
188188
groups:
189189
- hal
190190
- name: hal_nordic
191-
revision: d5c70305b2389641b0a166d0714775a1b13319a2
191+
revision: pull/231/head
192192
path: modules/hal/nordic
193193
groups:
194194
- hal

0 commit comments

Comments
 (0)