From 34ee41ee14e80b18269fbac3ca2735c355f20903 Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Mon, 25 Mar 2019 17:24:26 +0100 Subject: [PATCH] boards/b-l072z-lrwan1: provide and configure rtt peripheral --- boards/b-l072z-lrwan1/Makefile.features | 1 + boards/b-l072z-lrwan1/include/periph_conf.h | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/boards/b-l072z-lrwan1/Makefile.features b/boards/b-l072z-lrwan1/Makefile.features index 5c03c66baa..1738d4c265 100644 --- a/boards/b-l072z-lrwan1/Makefile.features +++ b/boards/b-l072z-lrwan1/Makefile.features @@ -2,6 +2,7 @@ FEATURES_PROVIDED += periph_dma FEATURES_PROVIDED += periph_i2c FEATURES_PROVIDED += periph_rtc +FEATURES_PROVIDED += periph_rtt FEATURES_PROVIDED += periph_spi FEATURES_PROVIDED += periph_timer FEATURES_PROVIDED += periph_uart diff --git a/boards/b-l072z-lrwan1/include/periph_conf.h b/boards/b-l072z-lrwan1/include/periph_conf.h index 4db35af48f..95ec36a4b3 100644 --- a/boards/b-l072z-lrwan1/include/periph_conf.h +++ b/boards/b-l072z-lrwan1/include/periph_conf.h @@ -220,6 +220,17 @@ static const i2c_conf_t i2c_config[] = { #define I2C_NUMOF (sizeof(i2c_config) / sizeof(i2c_config[0])) /** @} */ +/** + * @name RTT configuration + * + * On the STM32Lx platforms, we always utilize the LPTIM1. + * @{ + */ +#define RTT_NUMOF (1) +#define RTT_FREQUENCY (1024U) /* 32768 / 2^n */ +#define RTT_MAX_VALUE (0x0000ffff) /* 16-bit timer */ +/** @} */ + /** * @name RTC configuration * @{