Skip to content

Commit 1ebc2d8

Browse files
committed
bsp: [stm32] add stm32f407-micu RTC support
1 parent f52fb60 commit 1ebc2d8

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

bsp/stm32/stm32f407-micu/board/CubeMX_Config/Inc/stm32f4xx_hal_conf.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
/* #define HAL_IWDG_MODULE_ENABLED */
5959
/* #define HAL_LTDC_MODULE_ENABLED */
6060
/* #define HAL_RNG_MODULE_ENABLED */
61-
/* #define HAL_RTC_MODULE_ENABLED */
61+
#define HAL_RTC_MODULE_ENABLED
6262
/* #define HAL_SAI_MODULE_ENABLED */
6363
#define HAL_SD_MODULE_ENABLED
6464
/* #define HAL_MMC_MODULE_ENABLED */

bsp/stm32/stm32f407-micu/board/Kconfig

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,23 @@ menu "On-chip Peripheral Drivers"
100100
depends on BSP_USING_SDIO
101101
default 1000000
102102
endif
103+
104+
menuconfig BSP_USING_ONCHIP_RTC
105+
bool "Enable RTC"
106+
select RT_USING_RTC
107+
default n
108+
if BSP_USING_ONCHIP_RTC
109+
choice
110+
prompt "Select clock source"
111+
default BSP_RTC_USING_LSE
112+
113+
config BSP_RTC_USING_LSE
114+
bool "RTC USING LSE"
115+
116+
config BSP_RTC_USING_LSI
117+
bool "RTC USING LSI"
118+
endchoice
119+
endif
103120
source "$(BSP_DIR)/../libraries/HAL_Drivers/drivers/Kconfig"
104121

105122
endmenu

0 commit comments

Comments
 (0)