Skip to content

Commit 61d1d2e

Browse files
ioannisgMaureenHelm
authored andcommitted
soc: arm: nrf: conditionally employ nRF-specific timing framework
Employ the nRF-specific timing calculations framework (based on TIMER peripheral) only if the DWT is not present on the SoC. Signed-off-by: Ioannis Glaropoulos <[email protected]>
1 parent a681291 commit 61d1d2e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

soc/arm/nordic_nrf/CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,10 @@ zephyr_sources(
88
)
99

1010
if(CONFIG_SOC_HAS_TIMING_FUNCTIONS AND NOT CONFIG_BOARD_HAS_TIMING_FUNCTIONS)
11-
zephyr_library_sources_ifdef(CONFIG_TIMING_FUNCTIONS timing.c)
11+
if(CONFIG_TIMING_FUNCTIONS)
12+
# Use nRF-specific timing calculations only if DWT is not present
13+
if(NOT CONFIG_CORTEX_M_DWT)
14+
zephyr_library_sources(timing.c)
15+
endif()
16+
endif()
1217
endif()

0 commit comments

Comments
 (0)