From dcef3bcb6c48519e5eba207e2d3171d9e982f554 Mon Sep 17 00:00:00 2001 From: Francisco Molina Date: Tue, 19 Jan 2021 12:11:31 +0100 Subject: [PATCH 1/3] boards/common/iotlab: change default RTT_FREQUENCY to RTT_MAX_FREQUENCY (cherry picked from commit 69659efc99d507daaa6b52e3e58f078857cca9b9) --- boards/common/iotlab/include/periph_conf_common.h | 2 +- boards/fox/include/periph_conf.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/boards/common/iotlab/include/periph_conf_common.h b/boards/common/iotlab/include/periph_conf_common.h index 51af7f58d2c5..7cce184d3688 100644 --- a/boards/common/iotlab/include/periph_conf_common.h +++ b/boards/common/iotlab/include/periph_conf_common.h @@ -135,7 +135,7 @@ static const uart_conf_t uart_config[] = { * @{ */ #ifndef RTT_FREQUENCY -#define RTT_FREQUENCY (1) /* in Hz */ +#define RTT_FREQUENCY (RTT_MAX_FREQUENCY) /* in Hz */ #endif /** @} */ diff --git a/boards/fox/include/periph_conf.h b/boards/fox/include/periph_conf.h index 1dcb09590c5a..52cc9a8e792a 100644 --- a/boards/fox/include/periph_conf.h +++ b/boards/fox/include/periph_conf.h @@ -117,7 +117,7 @@ static const spi_conf_t spi_config[] = { * @{ */ #ifndef RTT_FREQUENCY -#define RTT_FREQUENCY (1) /* in Hz */ +#define RTT_FREQUENCY (RTT_MAX_FREQUENCY) /* in Hz */ #endif /** @} */ From 6a4590b3c77cea3b1c6eed2ff04ad3ec7613e8db Mon Sep 17 00:00:00 2001 From: Francisco Molina Date: Tue, 19 Jan 2021 12:25:20 +0100 Subject: [PATCH 2/3] boards/common/arduino-zero: configure RTT_MIN_OFFSET (cherry picked from commit 4c9a2d7b95f7a7193b0367192e5306db0d91c775) --- boards/common/arduino-zero/include/periph_conf.h | 1 + 1 file changed, 1 insertion(+) diff --git a/boards/common/arduino-zero/include/periph_conf.h b/boards/common/arduino-zero/include/periph_conf.h index 939219c21a30..073b25e9e053 100644 --- a/boards/common/arduino-zero/include/periph_conf.h +++ b/boards/common/arduino-zero/include/periph_conf.h @@ -274,6 +274,7 @@ static const i2c_conf_t i2c_config[] = { #ifndef RTT_FREQUENCY #define RTT_FREQUENCY (32768U) /* in Hz. For changes see `rtt.c` */ #endif +#define RTT_MIN_OFFSET (10U) /** @} */ /** From d9cf7d45378f6cca616590dae09160876903d1ec Mon Sep 17 00:00:00 2001 From: Francisco Molina Date: Tue, 19 Jan 2021 12:36:12 +0100 Subject: [PATCH 3/3] tests/posix_sleep: dont use periph_rtt for efm32 and kinetis These CPU families have a non configurable RTT of 1Hz, not enough for ztimer_msec to run on periph_rtt. (cherry picked from commit bafcaecca81fcea41e10f122f807da009e6d9433) --- tests/posix_sleep/Makefile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/posix_sleep/Makefile b/tests/posix_sleep/Makefile index ff3a969bad85..4c534b137295 100644 --- a/tests/posix_sleep/Makefile +++ b/tests/posix_sleep/Makefile @@ -2,8 +2,12 @@ include ../Makefile.tests_common USEMODULE += posix_sleep -# Pull-in periph-rtt on board that provides this feature to switch to the RTT -# backend of ztimer -FEATURES_OPTIONAL += periph_rtt +# 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