From 7a80fdf894cede2f3a4eed12588dcd97020a118c Mon Sep 17 00:00:00 2001 From: zylx Date: Wed, 20 Mar 2019 11:28:18 +0800 Subject: [PATCH] =?UTF-8?q?[bsp][stm32]=E4=B8=BA=E6=89=80=E6=9C=89?= =?UTF-8?q?=E6=94=AF=E6=8C=81=20rtc=20=E7=9A=84=20bsp=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=97=B6=E9=92=9F=E6=BA=90=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bsp/stm32/stm32f103-atk-warshipv3/README.md | 2 +- .../stm32f103-atk-warshipv3/board/Kconfig | 14 +++++++++++++- bsp/stm32/stm32f103-hw100k-ibox/README.md | 2 +- bsp/stm32/stm32f103-hw100k-ibox/board/Kconfig | 18 ++++++++++++++++-- bsp/stm32/stm32f746-st-disco/board/Kconfig | 3 +++ bsp/stm32/stm32l432-st-nucleo/README.md | 2 +- bsp/stm32/stm32l432-st-nucleo/board/Kconfig | 14 +++++++++++++- bsp/stm32/stm32l476-st-nucleo/README.md | 2 +- bsp/stm32/stm32l476-st-nucleo/board/Kconfig | 15 ++++++++++++++- bsp/stm32/stm32l496-ali-developer/README.md | 2 +- .../stm32l496-ali-developer/board/Kconfig | 15 ++++++++++++++- 11 files changed, 78 insertions(+), 11 deletions(-) diff --git a/bsp/stm32/stm32f103-atk-warshipv3/README.md b/bsp/stm32/stm32f103-atk-warshipv3/README.md index 9eb3a0d011..5d2e0dce60 100644 --- a/bsp/stm32/stm32f103-atk-warshipv3/README.md +++ b/bsp/stm32/stm32f103-atk-warshipv3/README.md @@ -50,7 +50,7 @@ STM32F103战舰V3,资源丰富,接口多,功能强大,性价比高,资 | SPI | 支持 | SPI1/2 | | I2C | 支持 | 软件 I2C | | ADC | 支持 | | -| RTC | 支持 | | +| RTC | 支持 | 支持外部晶振和内部低速时钟 | | PWM | 支持 | TIM3 CH1 TIM3 CH2 | | CAN | 支持 | | | IWG | 支持 | | diff --git a/bsp/stm32/stm32f103-atk-warshipv3/board/Kconfig b/bsp/stm32/stm32f103-atk-warshipv3/board/Kconfig index c5b7ccfd37..c23799f24f 100644 --- a/bsp/stm32/stm32f103-atk-warshipv3/board/Kconfig +++ b/bsp/stm32/stm32f103-atk-warshipv3/board/Kconfig @@ -178,11 +178,23 @@ menu "On-chip Peripheral Drivers" bool "Enable on-chip FLASH" default n - config BSP_USING_ONCHIP_RTC + menuconfig BSP_USING_ONCHIP_RTC bool "Enable RTC" select RT_USING_RTC select RT_USING_LIBC default n + if BSP_USING_ONCHIP_RTC + choice + prompt "Select clock source" + default BSP_RTC_USING_LSE + + config BSP_RTC_USING_LSE + bool "RTC USING LSE" + + config BSP_RTC_USING_LSI + bool "RTC USING LSI" + endchoice + endif config BSP_USING_WDT bool "Enable Watchdog Timer" diff --git a/bsp/stm32/stm32f103-hw100k-ibox/README.md b/bsp/stm32/stm32f103-hw100k-ibox/README.md index 0484e36107..dc7637caf6 100644 --- a/bsp/stm32/stm32f103-hw100k-ibox/README.md +++ b/bsp/stm32/stm32f103-hw100k-ibox/README.md @@ -48,7 +48,7 @@ | UART | 支持 | UART1 | | SPI | 暂不支持 | | | I2C | 支持 | 软件 I2C (J14) | -| RTC | 支持 | | +| RTC | 支持 | 支持外部晶振和内部低速时钟 | | ADC | 支持 | ADC1_CHANEL_10, ADC1_CHANNEL_11 | | PWM | 暂不支持 | | | IWG | 支持 | 命令:iwdg_sample wdt | diff --git a/bsp/stm32/stm32f103-hw100k-ibox/board/Kconfig b/bsp/stm32/stm32f103-hw100k-ibox/board/Kconfig index 4753a25654..875b025bb6 100644 --- a/bsp/stm32/stm32f103-hw100k-ibox/board/Kconfig +++ b/bsp/stm32/stm32f103-hw100k-ibox/board/Kconfig @@ -146,11 +146,25 @@ menu "On-chip Peripheral Drivers" bool "Enable ADC1" default n endif - config BSP_USING_ONCHIP_RTC + + menuconfig BSP_USING_ONCHIP_RTC bool "Enable RTC" select RT_USING_RTC select RT_USING_LIBC - default n + default n + if BSP_USING_ONCHIP_RTC + choice + prompt "Select clock source" + default BSP_RTC_USING_LSE + + config BSP_RTC_USING_LSE + bool "RTC USING LSE" + + config BSP_RTC_USING_LSI + bool "RTC USING LSI" + endchoice + endif + config BSP_USING_WDT bool "Enable Watchdog Timer" select RT_USING_WDT diff --git a/bsp/stm32/stm32f746-st-disco/board/Kconfig b/bsp/stm32/stm32f746-st-disco/board/Kconfig index 2f8bbead52..572cdfe02b 100644 --- a/bsp/stm32/stm32f746-st-disco/board/Kconfig +++ b/bsp/stm32/stm32f746-st-disco/board/Kconfig @@ -53,6 +53,7 @@ menu "On-chip Peripheral Drivers" bool "Enable GPIO" select RT_USING_PIN default y + menuconfig BSP_USING_UART bool "Enable UART" default y @@ -67,9 +68,11 @@ menu "On-chip Peripheral Drivers" depends on BSP_USING_UART1 && RT_SERIAL_USING_DMA default n endif + config BSP_USING_ON_CHIP_FLASH bool "Enable on-chip FLASH" default n + config BSP_USING_QSPI bool "Enable QSPI BUS" select RT_USING_QSPI diff --git a/bsp/stm32/stm32l432-st-nucleo/README.md b/bsp/stm32/stm32l432-st-nucleo/README.md index 77a0093232..a19724f30c 100644 --- a/bsp/stm32/stm32l432-st-nucleo/README.md +++ b/bsp/stm32/stm32l432-st-nucleo/README.md @@ -43,7 +43,7 @@ | UART | 支持 | UART2 | | SPI | 暂不支持 | SPI1 即将支持 | | I2C | 暂不支持 | 软件 I2C 即将支持 | -| RTC | 支持 | | +| RTC | 支持 | 支持外部晶振和内部低速时钟 | | PWM | 暂不支持 | 即将支持 | | USB Device | 暂不支持 | 即将支持 | | IWG | 支持 | 独立看门狗,未开启窗口模式 | diff --git a/bsp/stm32/stm32l432-st-nucleo/board/Kconfig b/bsp/stm32/stm32l432-st-nucleo/board/Kconfig index 47a2a2922b..e71484dcfa 100644 --- a/bsp/stm32/stm32l432-st-nucleo/board/Kconfig +++ b/bsp/stm32/stm32l432-st-nucleo/board/Kconfig @@ -39,11 +39,23 @@ menu "On-chip Peripheral Drivers" bool "Enable on-chip FLASH" default n - config BSP_USING_ONCHIP_RTC + menuconfig BSP_USING_ONCHIP_RTC bool "Enable RTC" select RT_USING_RTC select RT_USING_LIBC default n + if BSP_USING_ONCHIP_RTC + choice + prompt "Select clock source" + default BSP_RTC_USING_LSE + + config BSP_RTC_USING_LSE + bool "RTC USING LSE" + + config BSP_RTC_USING_LSI + bool "RTC USING LSI" + endchoice + endif config BSP_USING_WDT bool "Enable Watchdog Timer" diff --git a/bsp/stm32/stm32l476-st-nucleo/README.md b/bsp/stm32/stm32l476-st-nucleo/README.md index a5443704a3..cd8ad13f9c 100644 --- a/bsp/stm32/stm32l476-st-nucleo/README.md +++ b/bsp/stm32/stm32l476-st-nucleo/README.md @@ -42,7 +42,7 @@ | GPIO | 支持 | | | UART | 支持 | UART2 | | IIC | 支持 | 软件模拟 | -| RTC | 支持 | LSE 时钟源| +| RTC | 支持 | 支持外部晶振和内部低速时钟 | | **扩展模块** | **支持情况** | **备注** | ## 使用说明 diff --git a/bsp/stm32/stm32l476-st-nucleo/board/Kconfig b/bsp/stm32/stm32l476-st-nucleo/board/Kconfig index 3e5b0ed121..22ee3bb2a4 100644 --- a/bsp/stm32/stm32l476-st-nucleo/board/Kconfig +++ b/bsp/stm32/stm32l476-st-nucleo/board/Kconfig @@ -87,10 +87,23 @@ menu "On-chip Peripheral Drivers" endif endif - config BSP_USING_ONCHIP_RTC + menuconfig BSP_USING_ONCHIP_RTC bool "Enable RTC" select RT_USING_RTC + select RT_USING_LIBC default n + if BSP_USING_ONCHIP_RTC + choice + prompt "Select clock source" + default BSP_RTC_USING_LSE + + config BSP_RTC_USING_LSE + bool "RTC USING LSE" + + config BSP_RTC_USING_LSI + bool "RTC USING LSI" + endchoice + endif endmenu diff --git a/bsp/stm32/stm32l496-ali-developer/README.md b/bsp/stm32/stm32l496-ali-developer/README.md index ee3bc7479b..d4a5d3bccc 100644 --- a/bsp/stm32/stm32l496-ali-developer/README.md +++ b/bsp/stm32/stm32l496-ali-developer/README.md @@ -62,7 +62,7 @@ Developer Kit STM32L496 是阿里联合[诺行](http://www.notioni.com/)推出 | I2C | 支持 | 软件 I2C 2/3/4 | | TIM | 支持 | TIM15/16/17 | | ADC | 支持 | ADC1 | -| RTC | 支持 | | +| RTC | 支持 | 支持外部晶振和内部低速时钟 | | WDT | 支持 | | | PWM | 支持 | PWM3 | | USB Device | 暂不支持 | 即将支持 | diff --git a/bsp/stm32/stm32l496-ali-developer/board/Kconfig b/bsp/stm32/stm32l496-ali-developer/board/Kconfig index 7e565f4534..7b405f7a47 100644 --- a/bsp/stm32/stm32l496-ali-developer/board/Kconfig +++ b/bsp/stm32/stm32l496-ali-developer/board/Kconfig @@ -196,10 +196,23 @@ menu "On-chip Peripheral Drivers" default n select RT_USING_ADC - config BSP_USING_ONCHIP_RTC + menuconfig BSP_USING_ONCHIP_RTC bool "Enable RTC" select RT_USING_RTC + select RT_USING_LIBC default n + if BSP_USING_ONCHIP_RTC + choice + prompt "Select clock source" + default BSP_RTC_USING_LSE + + config BSP_RTC_USING_LSE + bool "RTC USING LSE" + + config BSP_RTC_USING_LSI + bool "RTC USING LSI" + endchoice + endif config BSP_USING_WDT bool "Enable Watchdog Timer"