From 5fd321e54d8b310617e4608bdac0127cc5e6db43 Mon Sep 17 00:00:00 2001 From: raiden00pl Date: Sun, 5 Mar 2023 13:20:03 +0100 Subject: [PATCH] arch/nrf53: add systimer configuration --- arch/arm/src/nrf53/Kconfig | 33 ++++++++++++++++++++++++++++++++- arch/arm/src/nrf53/Make.defs | 2 ++ 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/arch/arm/src/nrf53/Kconfig b/arch/arm/src/nrf53/Kconfig index 4e472c1aae..17906fea68 100644 --- a/arch/arm/src/nrf53/Kconfig +++ b/arch/arm/src/nrf53/Kconfig @@ -131,4 +131,35 @@ config NRF53_OSCILLATOR_LFXO ---help--- Configure LFXO oscillator -endmenu # Clock Configuration \ No newline at end of file +endmenu # Clock Configuration + +menu "System Timer" + +config NRF53_SYSTIMER + bool + default y + +choice + prompt "System Timer Source" + default NRF53_SYSTIMER_SYSTICK + ---help--- + Choose which hardware resource will drive NuttX + system time + +config NRF53_SYSTIMER_SYSTICK + bool "SysTick" + select TIMER_ARCH + select TIMER + select ARMV8M_SYSTICK + ---help--- + Use ARM SysTick. It can be used for tickless and + non-tickless mode. + + NOTE: nrf53 implementation of WFE/WFI involves is + incompatible with SysTick. This means that if + you choose this option, WFE/WFI will not be used + in idle loop. + +endchoice + +endmenu # System Timer diff --git a/arch/arm/src/nrf53/Make.defs b/arch/arm/src/nrf53/Make.defs index 9502da0c45..ba76b2d7f9 100644 --- a/arch/arm/src/nrf53/Make.defs +++ b/arch/arm/src/nrf53/Make.defs @@ -20,7 +20,9 @@ include armv8-m/Make.defs +ifeq ($(CONFIG_NRF53_SYSTIMER_SYSTICK),y) CHIP_CSRCS += nrf53_systick.c +endif CHIP_CSRCS += nrf53_start.c nrf53_clockconfig.c nrf53_irq.c nrf53_utils.c CHIP_CSRCS += nrf53_allocateheap.c nrf53_lowputc.c nrf53_gpio.c