From ad2601aca0012a8e435ba8ce3ebb625ba5c88394 Mon Sep 17 00:00:00 2001 From: Rick Conrey Date: Wed, 3 Jul 2019 10:20:18 -0700 Subject: [PATCH] soc: stm32wb: enable counter on STM32WB Enable RTC on STM32WB Signed-off-by: Rick Conrey --- soc/arm/st_stm32/stm32wb/dts_fixup.h | 7 +++++++ soc/arm/st_stm32/stm32wb/soc.h | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/soc/arm/st_stm32/stm32wb/dts_fixup.h b/soc/arm/st_stm32/stm32wb/dts_fixup.h index f8256e0f0ca..3035f633b56 100644 --- a/soc/arm/st_stm32/stm32wb/dts_fixup.h +++ b/soc/arm/st_stm32/stm32wb/dts_fixup.h @@ -80,6 +80,13 @@ #define DT_UART_STM32_LPUART_1_CLOCK_BUS DT_ST_STM32_LPUART_40008000_CLOCK_BUS #define DT_UART_STM32_LPUART_1_HW_FLOW_CONTROL DT_ST_STM32_LPUART_40008000_HW_FLOW_CONTROL +#define DT_RTC_0_BASE_ADDRESS DT_ST_STM32_RTC_40002800_BASE_ADDRESS +#define DT_RTC_0_IRQ_PRI DT_ST_STM32_RTC_40002800_IRQ_0_PRIORITY +#define DT_RTC_0_IRQ DT_ST_STM32_RTC_40002800_IRQ_0 +#define DT_RTC_0_NAME DT_ST_STM32_RTC_40002800_LABEL +#define DT_RTC_0_CLOCK_BITS DT_ST_STM32_RTC_40002800_CLOCK_BITS +#define DT_RTC_0_CLOCK_BUS DT_ST_STM32_RTC_40002800_CLOCK_BUS + #define DT_FLASH_DEV_BASE_ADDRESS DT_ST_STM32WB_FLASH_CONTROLLER_58004000_BASE_ADDRESS #define DT_FLASH_DEV_NAME DT_ST_STM32WB_FLASH_CONTROLLER_58004000_LABEL diff --git a/soc/arm/st_stm32/stm32wb/soc.h b/soc/arm/st_stm32/stm32wb/soc.h index cc732efd2fc..aa692a7add6 100644 --- a/soc/arm/st_stm32/stm32wb/soc.h +++ b/soc/arm/st_stm32/stm32wb/soc.h @@ -36,6 +36,13 @@ #include #endif +#if defined(CONFIG_COUNTER_RTC_STM32) +#include +#include +#include +#include +#endif + #ifdef CONFIG_CLOCK_CONTROL_STM32_CUBE #include #include