From c95d02dfd5efa7fd796902294fea4d4ff38e0016 Mon Sep 17 00:00:00 2001 From: Francisco Molina Date: Mon, 20 Apr 2020 16:19:03 +0200 Subject: [PATCH] tests/periph_rtt: lower RTT_FREQUENCY for stm32 boards All stm32% but stm32f1 RTT are based on a 16 bit LPTIM, if using the default 32768KHz configuration TICKS_TO_WAIT will overflow --- tests/periph_rtt/Makefile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/periph_rtt/Makefile b/tests/periph_rtt/Makefile index e685d5a054..80c2d54209 100644 --- a/tests/periph_rtt/Makefile +++ b/tests/periph_rtt/Makefile @@ -6,3 +6,11 @@ FEATURES_REQUIRED = periph_rtt DISABLE_MODULE += periph_init_rtt include $(RIOTBASE)/Makefile.include + +# Put board specific dependencies here +ifneq (,$(filter-out stm32f1,$(filter stm32%,$(CPU)))) + # all stm32% but stm32f1 RTT are based on a 16 bit LPTIM, if using the default + # 32768KHz configuration TICKS_TO_WAIT will overflow + RTT_FREQUENCY ?= 1024 + CFLAGS += -DRTT_FREQUENCY=$(RTT_FREQUENCY) +endif