Skip to content

Commit f48c1d8

Browse files
authored
Merge pull request #3984 from mysterywolf/pr4
[bsp][stm32][bluepill] support RTC
2 parents 0633951 + 951ed9e commit f48c1d8

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

bsp/stm32/stm32f103-blue-pill/board/CubeMX_Config/Inc/stm32f1xx_hal_conf.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
/*#define HAL_HCD_MODULE_ENABLED */
7272
/*#define HAL_PWR_MODULE_ENABLED */
7373
/*#define HAL_RCC_MODULE_ENABLED */
74-
/*#define HAL_RTC_MODULE_ENABLED */
74+
#define HAL_RTC_MODULE_ENABLED
7575
/*#define HAL_SD_MODULE_ENABLED */
7676
/*#define HAL_MMC_MODULE_ENABLED */
7777
/*#define HAL_SDRAM_MODULE_ENABLED */

bsp/stm32/stm32f103-blue-pill/board/Kconfig

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,25 @@ menu "On-chip Peripheral Drivers"
3838
depends on BSP_USING_UART1 && RT_SERIAL_USING_DMA
3939
default n
4040
endif
41+
42+
menuconfig BSP_USING_ONCHIP_RTC
43+
bool "Enable RTC"
44+
select RT_USING_RTC
45+
select RT_USING_LIBC
46+
default n
47+
if BSP_USING_ONCHIP_RTC
48+
choice
49+
prompt "Select clock source"
50+
default BSP_RTC_USING_LSE
51+
52+
config BSP_RTC_USING_LSE
53+
bool "RTC USING LSE"
4154

55+
config BSP_RTC_USING_LSI
56+
bool "RTC USING LSI"
57+
endchoice
58+
endif
59+
4260
menuconfig BSP_USING_SPI
4361
bool "Enable SPI BUS"
4462
default n

0 commit comments

Comments
 (0)