Skip to content

Commit 0c17251

Browse files
ydamigosgalak
authored andcommitted
drivers/rtc: Enable RTC driver for STM32F3 series
Enable RTC driver for STM32F3 series. Signed-off-by: Yannis Damigos <[email protected]>
1 parent e688d5c commit 0c17251

File tree

4 files changed

+13
-2
lines changed

4 files changed

+13
-2
lines changed

drivers/rtc/Kconfig.stm32_rtc

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ config RTC_STM32
1515
select USE_STM32_LL_EXTI
1616
select NEWLIB_LIBC
1717
help
18-
Build RTC driver for STM32 SoCs. Tested on STM32 F4, L4 series.
18+
Build RTC driver for STM32 SoCs. Tested on STM32 F3, F4, L4 series.
1919

2020
choice RTC_STM32_CLOCK_SRC
2121
bool "RTC clock source"

drivers/rtc/rtc_ll_stm32.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
#if defined(CONFIG_SOC_SERIES_STM32L4X)
2121
#define EXTI_LINE LL_EXTI_LINE_18
22-
#elif defined(CONFIG_SOC_SERIES_STM32F4X)
22+
#elif defined(CONFIG_SOC_SERIES_STM32F4X) || defined(CONFIG_SOC_SERIES_STM32F3X)
2323
#define EXTI_LINE LL_EXTI_LINE_17
2424
#endif
2525

soc/arm/st_stm32/stm32f3/dts.fixup

+5
Original file line numberDiff line numberDiff line change
@@ -110,4 +110,9 @@
110110
#define CONFIG_PWM_STM32_20_DEV_NAME ST_STM32_PWM_40015000_PWM_LABEL
111111
#define CONFIG_PWM_STM32_20_PRESCALER ST_STM32_PWM_40015000_PWM_ST_PRESCALER
112112

113+
#define CONFIG_RTC_0_BASE_ADDRESS ST_STM32_RTC_40002800_BASE_ADDRESS
114+
#define CONFIG_RTC_0_IRQ_PRI ST_STM32_RTC_40002800_IRQ_0_PRIORITY
115+
#define CONFIG_RTC_0_IRQ ST_STM32_RTC_40002800_IRQ_0
116+
#define CONFIG_RTC_0_NAME ST_STM32_RTC_40002800_LABEL
117+
#define CONFIG_RTC_PRESCALER ST_STM32_RTC_40002800_PRESCALER
113118
/* End of SoC Level DTS fixup file */

soc/arm/st_stm32/stm32f3/soc.h

+6
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,12 @@
5656
#include <stm32f3xx_ll_iwdg.h>
5757
#endif
5858

59+
#ifdef CONFIG_RTC_STM32
60+
#include <stm32f3xx_ll_rtc.h>
61+
#include <stm32f3xx_ll_exti.h>
62+
#include <stm32f3xx_ll_pwr.h>
63+
#endif
64+
5965
#endif /* !_ASMLANGUAGE */
6066

6167
#endif /* _STM32F3_SOC_H_ */

0 commit comments

Comments
 (0)