mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
Merge pull request #17395 from fjmolinas/pr_cpu_no_rtt
cpu: do not auto-select ztimer_periph_rtt for sam0, fe310
This commit is contained in:
commit
03a004e3c9
@ -21,6 +21,7 @@ config CPU_FAM_FE310
|
||||
select MODULE_PERIPH_PLIC if TEST_KCONFIG
|
||||
select MODULE_PERIPH_CORETIMER if MODULE_PERIPH_TIMER && HAS_PERIPH_CORETIMER
|
||||
select MODULE_PERIPH_RTT if MODULE_PERIPH_RTC && HAS_PERIPH_RTT
|
||||
select MODULE_ZTIMER_NO_PERIPH_RTT if TEST_KCONFIG && MODULE_ZTIMER
|
||||
|
||||
config CPU_MODEL_FE310_G000
|
||||
bool
|
||||
|
@ -26,6 +26,7 @@ config CPU_COMMON_SAM0
|
||||
select HAS_PERIPH_WDT_CB
|
||||
select HAS_PERIPH_WDT_WARNING_PERIOD
|
||||
select HAVE_SHARED_PERIPH_RTT_PERIPH_RTC
|
||||
select MODULE_ZTIMER_NO_PERIPH_RTT if TEST_KCONFIG && MODULE_ZTIMER
|
||||
|
||||
if CPU_COMMON_SAM0
|
||||
|
||||
|
@ -12,6 +12,7 @@ config CPU_FAM_SAM3
|
||||
select HAS_CPU_SAM3
|
||||
select HAS_PERIPH_CPUID
|
||||
select HAS_PERIPH_HWRNG
|
||||
select MODULE_ZTIMER_NO_PERIPH_RTT if TEST_KCONFIG && MODULE_ZTIMER
|
||||
|
||||
## CPU Models
|
||||
config CPU_MODEL_SAM3X8E
|
||||
|
@ -82,7 +82,7 @@ config MODULE_ZTIMER_SEC
|
||||
choice
|
||||
bool "Backend"
|
||||
depends on MODULE_ZTIMER_SEC
|
||||
default ZTIMER_SEC_BACKEND_RTT
|
||||
default ZTIMER_SEC_BACKEND_RTT if !MODULE_ZTIMER_NO_PERIPH_RTT
|
||||
|
||||
config ZTIMER_SEC_BACKEND_TIMER
|
||||
bool "Timer"
|
||||
@ -91,7 +91,7 @@ config ZTIMER_SEC_BACKEND_TIMER
|
||||
config ZTIMER_SEC_BACKEND_RTT
|
||||
bool "RTT"
|
||||
depends on HAS_PERIPH_RTT
|
||||
select MODULE_ZTIMER_PERIPH_RTT if !MODULE_ZTIMER_NO_PERIPH_RTT
|
||||
select MODULE_ZTIMER_PERIPH_RTT
|
||||
|
||||
config ZTIMER_SEC_BACKEND_RTC
|
||||
bool "RTC"
|
||||
|
@ -77,6 +77,17 @@ ifneq (,$(filter ztimer_usec,$(USEMODULE)))
|
||||
USEMODULE += ztimer_periph_timer
|
||||
endif
|
||||
|
||||
# NOTE: select the module here and not in the CPU so that order of inclusion
|
||||
# does not have periph_rtt selected earlier that it should be while at the same
|
||||
# time avoiding the module 'ztimer-no_periph_rtt' being included unecesarily.
|
||||
# The sam0 rtt busy loops for 180us every time an alarm is set or
|
||||
# the counter is read, this propagates and leads to timing errors
|
||||
# on ztimer_msec that are higher than > +-1msec.
|
||||
# The same goes for the fe310 rtt.
|
||||
ifneq (,$(filter sam% fe310,$(CPU)))
|
||||
USEMODULE += ztimer_no_periph_rtt
|
||||
endif
|
||||
|
||||
ifneq (,$(filter ztimer_msec ztimer_sec,$(USEMODULE)))
|
||||
USEMODULE += ztimer
|
||||
ifeq (,$(filter ztimer_no_periph_rtt,$(USEMODULE)))
|
||||
|
@ -2,12 +2,4 @@ include ../Makefile.tests_common
|
||||
|
||||
USEMODULE += posix_sleep
|
||||
|
||||
# These CPU families have a non configurable RTT of 1Hz, not enough for
|
||||
# ztimer_msec to run on periph_rtt
|
||||
ifeq (,$(filter efm32 kinetis,$(CPU)))
|
||||
# Pull-in periph-rtt on boards that provide this feature to switch to
|
||||
# the RTT backend of ztimer
|
||||
FEATURES_OPTIONAL += periph_rtt
|
||||
endif
|
||||
|
||||
include $(RIOTBASE)/Makefile.include
|
||||
|
Loading…
Reference in New Issue
Block a user