Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
2301_77017786
rt-thread
提交
d1d070d5
R
rt-thread
项目概览
2301_77017786
/
rt-thread
与 Fork 源项目一致
Fork自
RT-Thread / rt-thread
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rt-thread
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
d1d070d5
编写于
1月 30, 2019
作者:
baozitai
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[bsp][stm32] add rtc and iwdg bsp support
上级
14fd4e34
变更
11
展开全部
显示空白变更内容
内联
并排
Showing
11 changed file
with
419 addition
and
903 deletion
+419
-903
bsp/stm32/stm32l432-st-nucleo/.config
bsp/stm32/stm32l432-st-nucleo/.config
+19
-12
bsp/stm32/stm32l432-st-nucleo/README.md
bsp/stm32/stm32l432-st-nucleo/README.md
+3
-3
bsp/stm32/stm32l432-st-nucleo/board/CubeMX_Config/.mxproject
bsp/stm32/stm32l432-st-nucleo/board/CubeMX_Config/.mxproject
+2
-2
bsp/stm32/stm32l432-st-nucleo/board/CubeMX_Config/CubeMX_Config.ioc
...stm32l432-st-nucleo/board/CubeMX_Config/CubeMX_Config.ioc
+22
-10
bsp/stm32/stm32l432-st-nucleo/board/CubeMX_Config/Inc/stm32l4xx_hal_conf.h
...32-st-nucleo/board/CubeMX_Config/Inc/stm32l4xx_hal_conf.h
+2
-2
bsp/stm32/stm32l432-st-nucleo/board/CubeMX_Config/Src/main.c
bsp/stm32/stm32l432-st-nucleo/board/CubeMX_Config/Src/main.c
+82
-2
bsp/stm32/stm32l432-st-nucleo/board/CubeMX_Config/Src/stm32l4xx_hal_msp.c
...432-st-nucleo/board/CubeMX_Config/Src/stm32l4xx_hal_msp.c
+34
-0
bsp/stm32/stm32l432-st-nucleo/board/Kconfig
bsp/stm32/stm32l432-st-nucleo/board/Kconfig
+11
-0
bsp/stm32/stm32l432-st-nucleo/project.uvoptx
bsp/stm32/stm32l432-st-nucleo/project.uvoptx
+1
-817
bsp/stm32/stm32l432-st-nucleo/project.uvprojx
bsp/stm32/stm32l432-st-nucleo/project.uvprojx
+239
-49
bsp/stm32/stm32l432-st-nucleo/rtconfig.h
bsp/stm32/stm32l432-st-nucleo/rtconfig.h
+4
-6
未找到文件。
bsp/stm32/stm32l432-st-nucleo/.config
浏览文件 @
d1d070d5
...
...
@@ -62,7 +62,7 @@ CONFIG_RT_USING_DEVICE=y
CONFIG_RT_USING_CONSOLE
=
y
CONFIG_RT_CONSOLEBUF_SIZE
=
256
CONFIG_RT_CONSOLE_DEVICE_NAME
=
"uart2"
CONFIG_RT_VER_NUM
=
0
x4000
0
CONFIG_RT_VER_NUM
=
0
x4000
1
CONFIG_ARCH_ARM
=
y
CONFIG_ARCH_ARM_CORTEX_M
=
y
CONFIG_ARCH_ARM_CORTEX_M4
=
y
...
...
@@ -123,10 +123,11 @@ CONFIG_RT_USING_PIN=y
# CONFIG_RT_USING_MTD_NAND is not set
# CONFIG_RT_USING_MTD is not set
# CONFIG_RT_USING_PM is not set
# CONFIG_RT_USING_RTC is not set
CONFIG_RT_USING_RTC
=
y
# CONFIG_RT_USING_SOFT_RTC is not set
# CONFIG_RT_USING_SDIO is not set
# CONFIG_RT_USING_SPI is not set
# CONFIG_RT_USING_WDT is not set
CONFIG_RT_USING_WDT
=
y
# CONFIG_RT_USING_AUDIO is not set
#
...
...
@@ -143,7 +144,7 @@ CONFIG_RT_USING_PIN=y
#
# POSIX layer and C standard library
#
# CONFIG_RT_USING_LIBC is not set
CONFIG_RT_USING_LIBC
=
y
# CONFIG_RT_USING_PTHREADS is not set
#
...
...
@@ -199,6 +200,7 @@ CONFIG_RT_USING_PIN=y
#
# CONFIG_PKG_USING_PAHOMQTT is not set
# CONFIG_PKG_USING_WEBCLIENT is not set
# CONFIG_PKG_USING_WEBNET is not set
# CONFIG_PKG_USING_MONGOOSE is not set
# CONFIG_PKG_USING_WEBTERMINAL is not set
# CONFIG_PKG_USING_CJSON is not set
...
...
@@ -220,6 +222,7 @@ CONFIG_RT_USING_PIN=y
# Wiced WiFi
#
# CONFIG_PKG_USING_WLAN_WICED is not set
# CONFIG_PKG_USING_RW007 is not set
# CONFIG_PKG_USING_COAP is not set
# CONFIG_PKG_USING_NOPOLL is not set
# CONFIG_PKG_USING_NETUTILS is not set
...
...
@@ -233,6 +236,8 @@ CONFIG_RT_USING_PIN=y
# CONFIG_PKG_USING_GAGENT_CLOUD is not set
# CONFIG_PKG_USING_ALI_IOTKIT is not set
# CONFIG_PKG_USING_AZURE is not set
# CONFIG_PKG_USING_TENCENT_IOTKIT is not set
# CONFIG_PKG_USING_NIMBLE is not set
#
# security packages
...
...
@@ -264,6 +269,7 @@ CONFIG_RT_USING_PIN=y
# CONFIG_PKG_USING_RDB is not set
# CONFIG_PKG_USING_QRCODE is not set
# CONFIG_PKG_USING_ULOG_EASYFLASH is not set
# CONFIG_PKG_USING_ADBD is not set
#
# system packages
...
...
@@ -280,6 +286,7 @@ CONFIG_RT_USING_PIN=y
# CONFIG_PKG_USING_LITTLEVGL2RTT is not set
# CONFIG_PKG_USING_CMSIS is not set
# CONFIG_PKG_USING_DFS_YAFFS is not set
# CONFIG_PKG_USING_LITTLEFS is not set
#
# peripheral libraries and drivers
...
...
@@ -293,6 +300,8 @@ CONFIG_RT_USING_PIN=y
# CONFIG_PKG_USING_U8G2 is not set
# CONFIG_PKG_USING_BUTTON is not set
# CONFIG_PKG_USING_MPU6XXX is not set
# CONFIG_PKG_USING_PCF8574 is not set
# CONFIG_PKG_USING_KENDRYTE_SDK is not set
#
# miscellaneous packages
...
...
@@ -307,10 +316,7 @@ CONFIG_RT_USING_PIN=y
# CONFIG_PKG_USING_ZLIB is not set
# CONFIG_PKG_USING_DSTR is not set
# CONFIG_PKG_USING_TINYFRAME is not set
#
# sample package
#
# CONFIG_PKG_USING_KENDRYTE_DEMO is not set
#
# samples: kernel and components samples
...
...
@@ -319,11 +325,10 @@ CONFIG_RT_USING_PIN=y
# CONFIG_PKG_USING_FILESYSTEM_SAMPLES is not set
# CONFIG_PKG_USING_NETWORK_SAMPLES is not set
# CONFIG_PKG_USING_PERIPHERAL_SAMPLES is not set
#
# example package: hello
#
# CONFIG_PKG_USING_PERIPHERAL_SAMPLES_V020 is not set
# CONFIG_PKG_USING_PERIPHERAL_SAMPLES_LATEST_VERSION is not set
# CONFIG_PKG_USING_HELLO is not set
# CONFIG_PKG_USING_VI is not set
CONFIG_SOC_FAMILY_STM32
=
y
CONFIG_SOC_SERIES_STM32L4
=
y
...
...
@@ -344,6 +349,8 @@ CONFIG_BSP_USING_GPIO=y
CONFIG_BSP_USING_UART
=
y
CONFIG_BSP_USING_UART2
=
y
# CONFIG_BSP_UART2_RX_USING_DMA is not set
# CONFIG_BSP_USING_ONCHIP_RTC is not set
# CONFIG_BSP_USING_WDT is not set
#
# Board extended module Drivers
...
...
bsp/stm32/stm32l432-st-nucleo/README.md
浏览文件 @
d1d070d5
# NUCLEO32-L432 开发板
的
BSP 说明
# NUCLEO32-L432 开发板 BSP 说明
## 简介
...
...
@@ -43,10 +43,10 @@
| UART | 支持 | UART2 |
| SPI | 暂不支持 | SPI1 即将支持 |
| I2C | 暂不支持 | 软件 I2C 即将支持 |
| RTC |
暂不支持 | 即将支持
|
| RTC |
支持 |
|
| PWM | 暂不支持 | 即将支持 |
| USB Device | 暂不支持 | 即将支持 |
| IWG |
暂不支持 | 即将支持
|
| IWG |
支持 | 独立看门狗,未开启窗口模式
|
|
**扩展模块**
|
**支持情况**
|
**备注**
|
...
...
bsp/stm32/stm32l432-st-nucleo/board/CubeMX_Config/.mxproject
浏览文件 @
d1d070d5
...
...
@@ -5,9 +5,9 @@ SourcePath=D:/rtt/rt-thread/bsp/stm32/stm32l432-st-nucleo/board/CubeMX_Config/Sr
SourceFiles=stm32l4xx_it.c;stm32l4xx_hal_msp.c;main.c;
[PreviousLibFiles]
LibFiles=Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_
tim.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_tim_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_uart.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_uart_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_def.h;Drivers/STM32L4xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_i2c.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_i2c_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_rcc.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_rcc_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_flash.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_flash_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_flash_ramfunc.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_gpio.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_gpio_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_dma.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_dma_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_pwr.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_pwr_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_cortex.h
;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_tim.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_tim_ex.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart_ex.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_i2c.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_i2c_ex.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rcc.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rcc_ex.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_flash.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_flash_ex.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_flash_ramfunc.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_gpio.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_dma.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_dma_ex.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_pwr.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_pwr_ex.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.c;Drivers/CMSIS/Device/ST/STM32L4xx/Include/stm32l432xx.h;Drivers/CMSIS/Device/ST/STM32L4xx/Include/stm32l4xx.h;Drivers/CMSIS/Device/ST/STM32L4xx/Include/system_stm32l4xx.h;Drivers/CMSIS/Device/ST/STM32L4xx/Source/Templates/system_stm32l4xx.c;Drivers/CMSIS/Include/arm_common_tables.h;Drivers/CMSIS/Include/arm_const_structs.h;Drivers/CMSIS/Include/arm_math.h;Drivers/CMSIS/Include/cmsis_armcc.h;Drivers/CMSIS/Include/cmsis_armcc_V6.h;Drivers/CMSIS/Include/cmsis_gcc.h;Drivers/CMSIS/Include/core_cm0.h;Drivers/CMSIS/Include/core_cm0plus.h;Drivers/CMSIS/Include/core_cm3.h;Drivers/CMSIS/Include/core_cm4.h;Drivers/CMSIS/Include/core_cm7.h;Drivers/CMSIS/Include/core_cmFunc.h;Drivers/CMSIS/Include/core_cmInstr.h;Drivers/CMSIS/Include/core_cmSimd.h;Drivers/CMSIS/Include/core_sc000.h;Drivers/CMSIS/Include/core_sc300.h;
LibFiles=Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_
iwdg.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_rtc.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_rtc_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_tim.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_tim_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_uart.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_uart_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_def.h;Drivers/STM32L4xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_i2c.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_i2c_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_rcc.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_rcc_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_flash.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_flash_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_flash_ramfunc.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_gpio.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_gpio_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_dma.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_dma_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_pwr.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_pwr_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_cortex.h;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_iwdg.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rtc.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rtc_ex.c
;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_tim.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_tim_ex.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart_ex.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_i2c.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_i2c_ex.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rcc.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rcc_ex.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_flash.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_flash_ex.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_flash_ramfunc.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_gpio.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_dma.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_dma_ex.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_pwr.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_pwr_ex.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.c;Drivers/CMSIS/Device/ST/STM32L4xx/Include/stm32l432xx.h;Drivers/CMSIS/Device/ST/STM32L4xx/Include/stm32l4xx.h;Drivers/CMSIS/Device/ST/STM32L4xx/Include/system_stm32l4xx.h;Drivers/CMSIS/Device/ST/STM32L4xx/Source/Templates/system_stm32l4xx.c;Drivers/CMSIS/Include/arm_common_tables.h;Drivers/CMSIS/Include/arm_const_structs.h;Drivers/CMSIS/Include/arm_math.h;Drivers/CMSIS/Include/cmsis_armcc.h;Drivers/CMSIS/Include/cmsis_armcc_V6.h;Drivers/CMSIS/Include/cmsis_gcc.h;Drivers/CMSIS/Include/core_cm0.h;Drivers/CMSIS/Include/core_cm0plus.h;Drivers/CMSIS/Include/core_cm3.h;Drivers/CMSIS/Include/core_cm4.h;Drivers/CMSIS/Include/core_cm7.h;Drivers/CMSIS/Include/core_cmFunc.h;Drivers/CMSIS/Include/core_cmInstr.h;Drivers/CMSIS/Include/core_cmSimd.h;Drivers/CMSIS/Include/core_sc000.h;Drivers/CMSIS/Include/core_sc300.h;
[PreviousUsedKeilFiles]
SourceFiles=..\Src\main.c;..\Src\stm32l4xx_it.c;..\Src\stm32l4xx_hal_msp.c;../Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_
tim.c;../Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_tim_ex.c;../Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c;../Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart_ex.c;../Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.c;../Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_i2c.c;../Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_i2c_ex.c;../Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rcc.c;../Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rcc_ex.c;../Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_flash.c;../Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_flash_ex.c;../Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_flash_ramfunc.c;../Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_gpio.c;../Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_dma.c;../Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_dma_ex.c;../Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_pwr.c;../Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_pwr_ex.c;../Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.c;../\Src/system_stm32l4xx.c;../Drivers/CMSIS/Device/ST/STM32L4xx/Source/Templates/system_stm32l4xx.c;null
;
SourceFiles=..\Src\main.c;..\Src\stm32l4xx_it.c;..\Src\stm32l4xx_hal_msp.c;../Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_
iwdg.c;../Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rtc.c;../Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rtc_ex.c;../Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_tim.c;../Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_tim_ex.c;../Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c;../Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart_ex.c;../Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.c;../Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_i2c.c;../Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_i2c_ex.c;../Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rcc.c;../Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rcc_ex.c;../Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_flash.c;../Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_flash_ex.c;../Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_flash_ramfunc.c;../Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_gpio.c;../Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_dma.c;../Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_dma_ex.c;../Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_pwr.c;../Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_pwr_ex.c;../Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.c;../\Src/system_stm32l4xx.c;../Drivers/CMSIS/Device/ST/STM32L4xx/Source/Templates/system_stm32l4xx.c;D:/rtt/rt-thread/bsp/stm32/stm32l432-st-nucleo/board/CubeMX_Config//MDK-ARM/startup_stm32l432xx.s
;
HeaderPath=..\Drivers\STM32L4xx_HAL_Driver\Inc;..\Drivers\STM32L4xx_HAL_Driver\Inc\Legacy;..\Drivers\CMSIS\Device\ST\STM32L4xx\Include;..\Drivers\CMSIS\Include;..\Inc;
bsp/stm32/stm32l432-st-nucleo/board/CubeMX_Config/CubeMX_Config.ioc
浏览文件 @
d1d070d5
...
...
@@ -2,23 +2,28 @@
File.Version=6
KeepUserPlacement=true
Mcu.Family=STM32L4
Mcu.IP0=NVIC
Mcu.IP1=RCC
Mcu.IP2=SYS
Mcu.IP3=USART2
Mcu.IPNb=4
Mcu.IP0=IWDG
Mcu.IP1=NVIC
Mcu.IP2=RCC
Mcu.IP3=RTC
Mcu.IP4=SYS
Mcu.IP5=USART2
Mcu.IPNb=6
Mcu.Name=STM32L432K(B-C)Ux
Mcu.Package=UFQFPN32
Mcu.Pin0=PC14-OSC32_IN (PC14)
Mcu.Pin1=PC15-OSC32_OUT (PC15)
Mcu.Pin10=VP_RTC_VS_RTC_Calendar
Mcu.Pin11=VP_SYS_VS_Systick
Mcu.Pin2=PA0
Mcu.Pin3=PA2
Mcu.Pin4=PA13 (JTMS-SWDIO)
Mcu.Pin5=PA14 (JTCK-SWCLK)
Mcu.Pin6=PA15 (JTDI)
Mcu.Pin7=PB3 (JTDO-TRACESWO)
Mcu.Pin8=VP_SYS_VS_Systick
Mcu.PinsNb=9
Mcu.Pin8=VP_IWDG_VS_IWDG
Mcu.Pin9=VP_RTC_VS_RTC_Activate
Mcu.PinsNb=12
Mcu.ThirdPartyNb=0
Mcu.UserConstants=
Mcu.UserName=STM32L432KCUx
...
...
@@ -106,7 +111,7 @@ ProjectManager.StackSize=0x400
ProjectManager.TargetToolchain=MDK-ARM V5
ProjectManager.ToolChainLocation=
ProjectManager.UnderRoot=false
ProjectManager.functionlistsort=1-MX_GPIO_Init-GPIO-false-HAL-true,2-SystemClock_Config-RCC-false-HAL-false,3-MX_USART2_UART_Init-USART2-false-HAL-true
ProjectManager.functionlistsort=1-MX_GPIO_Init-GPIO-false-HAL-true,2-SystemClock_Config-RCC-false-HAL-false,3-MX_USART2_UART_Init-USART2-false-HAL-true
,4-MX_IWDG_Init-IWDG-false-HAL-true,5-MX_RTC_Init-RTC-false-HAL-true
RCC.48CLKFreq_Value=24000000
RCC.AHBFreq_Value=32000000
RCC.APB1Freq_Value=32000000
...
...
@@ -124,7 +129,7 @@ RCC.HSI_VALUE=16000000
RCC.I2C1Freq_Value=32000000
RCC.I2C2Freq_Value=16000000
RCC.I2C3Freq_Value=32000000
RCC.IPParameters=48CLKFreq_Value,AHBFreq_Value,APB1Freq_Value,APB1TimFreq_Value,APB2Freq_Value,APB2TimFreq_Value,CortexFreq_Value,FCLKCortexFreq_Value,FamilyName,HCLKFreq_Value,HSE_VALUE,HSI16_VALUE,HSI48_VALUE,HSI_VALUE,I2C1Freq_Value,I2C2Freq_Value,I2C3Freq_Value,LCDFreq_Value,LPTIM1Freq_Value,LPTIM2Freq_Value,LPTIMFreq_Value,LPUART1Freq_Value,LPUARTFreq_Value,LSCOPinFreq_Value,LSI_VALUE,MCO1PinFreq_Value,MCOPinFreq_Value,MSI_VALUE,PLLCLKFreq_Value,PLLMUL,PLLN,PLLPoutputFreq_Value,PLLQoutputFreq_Value,PLLRCLKFreq_Value,PLLSAI1PoutputFreq_Value,PLLSAI1QoutputFreq_Value,PLLSAI1RoutputFreq_Value,PWRFreq_Value,RTCFreq_Value,RTCHSEDivFreq_Value,SAI1Freq_Value,SWPMI1Freq_Value,SYSCLKFreq_VALUE,SYSCLKSource,TIMFreq_Value,TimerFreq_Value,USART1Freq_Value,USART2Freq_Value,USART3Freq_Value,VCOInputFreq_Value,VCOOutputFreq_Value,VCOSAI1OutputFreq_Value,WatchDogFreq_Value
RCC.IPParameters=48CLKFreq_Value,AHBFreq_Value,APB1Freq_Value,APB1TimFreq_Value,APB2Freq_Value,APB2TimFreq_Value,CortexFreq_Value,FCLKCortexFreq_Value,FamilyName,HCLKFreq_Value,HSE_VALUE,HSI16_VALUE,HSI48_VALUE,HSI_VALUE,I2C1Freq_Value,I2C2Freq_Value,I2C3Freq_Value,LCDFreq_Value,LPTIM1Freq_Value,LPTIM2Freq_Value,LPTIMFreq_Value,LPUART1Freq_Value,LPUARTFreq_Value,LSCOPinFreq_Value,LSI_VALUE,MCO1PinFreq_Value,MCOPinFreq_Value,MSI_VALUE,PLLCLKFreq_Value,PLLMUL,PLLN,PLLPoutputFreq_Value,PLLQoutputFreq_Value,PLLRCLKFreq_Value,PLLSAI1PoutputFreq_Value,PLLSAI1QoutputFreq_Value,PLLSAI1RoutputFreq_Value,PWRFreq_Value,RTC
ClockSelection,RTC
Freq_Value,RTCHSEDivFreq_Value,SAI1Freq_Value,SWPMI1Freq_Value,SYSCLKFreq_VALUE,SYSCLKSource,TIMFreq_Value,TimerFreq_Value,USART1Freq_Value,USART2Freq_Value,USART3Freq_Value,VCOInputFreq_Value,VCOOutputFreq_Value,VCOSAI1OutputFreq_Value,WatchDogFreq_Value
RCC.LCDFreq_Value=37000
RCC.LPTIM1Freq_Value=32000000
RCC.LPTIM2Freq_Value=32000000
...
...
@@ -146,7 +151,8 @@ RCC.PLLSAI1PoutputFreq_Value=4571428.571428572
RCC.PLLSAI1QoutputFreq_Value=16000000
RCC.PLLSAI1RoutputFreq_Value=16000000
RCC.PWRFreq_Value=32000000
RCC.RTCFreq_Value=32000
RCC.RTCClockSelection=RCC_RTCCLKSOURCE_LSE
RCC.RTCFreq_Value=32768
RCC.RTCHSEDivFreq_Value=4000000
RCC.SAI1Freq_Value=4571428.571428572
RCC.SWPMI1Freq_Value=32000000
...
...
@@ -163,6 +169,12 @@ RCC.VCOSAI1OutputFreq_Value=32000000
RCC.WatchDogFreq_Value=32000
USART2.IPParameters=VirtualMode-Asynchronous
USART2.VirtualMode-Asynchronous=VM_ASYNC
VP_IWDG_VS_IWDG.Mode=IWDG_Activate
VP_IWDG_VS_IWDG.Signal=IWDG_VS_IWDG
VP_RTC_VS_RTC_Activate.Mode=RTC_Enabled
VP_RTC_VS_RTC_Activate.Signal=RTC_VS_RTC_Activate
VP_RTC_VS_RTC_Calendar.Mode=RTC_Calendar
VP_RTC_VS_RTC_Calendar.Signal=RTC_VS_RTC_Calendar
VP_SYS_VS_Systick.Mode=SysTick
VP_SYS_VS_Systick.Signal=SYS_VS_Systick
board=NUCLEO-L432KC
...
...
bsp/stm32/stm32l432-st-nucleo/board/CubeMX_Config/Inc/stm32l4xx_hal_conf.h
浏览文件 @
d1d070d5
...
...
@@ -67,7 +67,7 @@
/*#define HAL_HASH_MODULE_ENABLED */
/*#define HAL_I2S_MODULE_ENABLED */
/*#define HAL_IRDA_MODULE_ENABLED */
/*#define HAL_IWDG_MODULE_ENABLED */
#define HAL_IWDG_MODULE_ENABLED
/*#define HAL_LTDC_MODULE_ENABLED */
/*#define HAL_LCD_MODULE_ENABLED */
/*#define HAL_LPTIM_MODULE_ENABLED */
...
...
@@ -80,7 +80,7 @@
/*#define HAL_QSPI_MODULE_ENABLED */
/*#define HAL_QSPI_MODULE_ENABLED */
/*#define HAL_RNG_MODULE_ENABLED */
/*#define HAL_RTC_MODULE_ENABLED */
#define HAL_RTC_MODULE_ENABLED
/*#define HAL_SAI_MODULE_ENABLED */
/*#define HAL_SD_MODULE_ENABLED */
/*#define HAL_SMBUS_MODULE_ENABLED */
...
...
bsp/stm32/stm32l432-st-nucleo/board/CubeMX_Config/Src/main.c
浏览文件 @
d1d070d5
...
...
@@ -45,6 +45,10 @@
/* USER CODE END Includes */
/* Private variables ---------------------------------------------------------*/
IWDG_HandleTypeDef
hiwdg
;
RTC_HandleTypeDef
hrtc
;
UART_HandleTypeDef
huart2
;
/* USER CODE BEGIN PV */
...
...
@@ -56,6 +60,8 @@ UART_HandleTypeDef huart2;
void
SystemClock_Config
(
void
);
static
void
MX_GPIO_Init
(
void
);
static
void
MX_USART2_UART_Init
(
void
);
static
void
MX_IWDG_Init
(
void
);
static
void
MX_RTC_Init
(
void
);
/* USER CODE BEGIN PFP */
/* Private function prototypes -----------------------------------------------*/
...
...
@@ -96,6 +102,8 @@ int main(void)
/* Initialize all configured peripherals */
MX_GPIO_Init
();
MX_USART2_UART_Init
();
MX_IWDG_Init
();
MX_RTC_Init
();
/* USER CODE BEGIN 2 */
/* USER CODE END 2 */
...
...
@@ -133,8 +141,10 @@ void SystemClock_Config(void)
/**Initializes the CPU, AHB and APB busses clocks
*/
RCC_OscInitStruct
.
OscillatorType
=
RCC_OSCILLATORTYPE_LSE
|
RCC_OSCILLATORTYPE_MSI
;
RCC_OscInitStruct
.
OscillatorType
=
RCC_OSCILLATORTYPE_LSI
|
RCC_OSCILLATORTYPE_LSE
|
RCC_OSCILLATORTYPE_MSI
;
RCC_OscInitStruct
.
LSEState
=
RCC_LSE_ON
;
RCC_OscInitStruct
.
LSIState
=
RCC_LSI_ON
;
RCC_OscInitStruct
.
MSIState
=
RCC_MSI_ON
;
RCC_OscInitStruct
.
MSICalibrationValue
=
0
;
RCC_OscInitStruct
.
MSIClockRange
=
RCC_MSIRANGE_6
;
...
...
@@ -164,8 +174,9 @@ void SystemClock_Config(void)
_Error_Handler
(
__FILE__
,
__LINE__
);
}
PeriphClkInit
.
PeriphClockSelection
=
RCC_PERIPHCLK_USART2
;
PeriphClkInit
.
PeriphClockSelection
=
RCC_PERIPHCLK_
RTC
|
RCC_PERIPHCLK_
USART2
;
PeriphClkInit
.
Usart2ClockSelection
=
RCC_USART2CLKSOURCE_PCLK1
;
PeriphClkInit
.
RTCClockSelection
=
RCC_RTCCLKSOURCE_LSE
;
if
(
HAL_RCCEx_PeriphCLKConfig
(
&
PeriphClkInit
)
!=
HAL_OK
)
{
_Error_Handler
(
__FILE__
,
__LINE__
);
...
...
@@ -194,6 +205,75 @@ void SystemClock_Config(void)
HAL_NVIC_SetPriority
(
SysTick_IRQn
,
0
,
0
);
}
/* IWDG init function */
static
void
MX_IWDG_Init
(
void
)
{
hiwdg
.
Instance
=
IWDG
;
hiwdg
.
Init
.
Prescaler
=
IWDG_PRESCALER_4
;
hiwdg
.
Init
.
Window
=
4095
;
hiwdg
.
Init
.
Reload
=
4095
;
if
(
HAL_IWDG_Init
(
&
hiwdg
)
!=
HAL_OK
)
{
_Error_Handler
(
__FILE__
,
__LINE__
);
}
}
/* RTC init function */
static
void
MX_RTC_Init
(
void
)
{
/* USER CODE BEGIN RTC_Init 0 */
/* USER CODE END RTC_Init 0 */
RTC_TimeTypeDef
sTime
;
RTC_DateTypeDef
sDate
;
/* USER CODE BEGIN RTC_Init 1 */
/* USER CODE END RTC_Init 1 */
/**Initialize RTC Only
*/
hrtc
.
Instance
=
RTC
;
hrtc
.
Init
.
HourFormat
=
RTC_HOURFORMAT_24
;
hrtc
.
Init
.
AsynchPrediv
=
127
;
hrtc
.
Init
.
SynchPrediv
=
255
;
hrtc
.
Init
.
OutPut
=
RTC_OUTPUT_DISABLE
;
hrtc
.
Init
.
OutPutRemap
=
RTC_OUTPUT_REMAP_NONE
;
hrtc
.
Init
.
OutPutPolarity
=
RTC_OUTPUT_POLARITY_HIGH
;
hrtc
.
Init
.
OutPutType
=
RTC_OUTPUT_TYPE_OPENDRAIN
;
if
(
HAL_RTC_Init
(
&
hrtc
)
!=
HAL_OK
)
{
_Error_Handler
(
__FILE__
,
__LINE__
);
}
/**Initialize RTC and set the Time and Date
*/
sTime
.
Hours
=
0x0
;
sTime
.
Minutes
=
0x0
;
sTime
.
Seconds
=
0x0
;
sTime
.
DayLightSaving
=
RTC_DAYLIGHTSAVING_NONE
;
sTime
.
StoreOperation
=
RTC_STOREOPERATION_RESET
;
if
(
HAL_RTC_SetTime
(
&
hrtc
,
&
sTime
,
RTC_FORMAT_BCD
)
!=
HAL_OK
)
{
_Error_Handler
(
__FILE__
,
__LINE__
);
}
sDate
.
WeekDay
=
RTC_WEEKDAY_MONDAY
;
sDate
.
Month
=
RTC_MONTH_JANUARY
;
sDate
.
Date
=
0x1
;
sDate
.
Year
=
0x0
;
if
(
HAL_RTC_SetDate
(
&
hrtc
,
&
sDate
,
RTC_FORMAT_BCD
)
!=
HAL_OK
)
{
_Error_Handler
(
__FILE__
,
__LINE__
);
}
}
/* USART2 init function */
static
void
MX_USART2_UART_Init
(
void
)
{
...
...
bsp/stm32/stm32l432-st-nucleo/board/CubeMX_Config/Src/stm32l4xx_hal_msp.c
浏览文件 @
d1d070d5
...
...
@@ -77,6 +77,40 @@ void HAL_MspInit(void)
/* USER CODE END MspInit 1 */
}
void
HAL_RTC_MspInit
(
RTC_HandleTypeDef
*
hrtc
)
{
if
(
hrtc
->
Instance
==
RTC
)
{
/* USER CODE BEGIN RTC_MspInit 0 */
/* USER CODE END RTC_MspInit 0 */
/* Peripheral clock enable */
__HAL_RCC_RTC_ENABLE
();
/* USER CODE BEGIN RTC_MspInit 1 */
/* USER CODE END RTC_MspInit 1 */
}
}
void
HAL_RTC_MspDeInit
(
RTC_HandleTypeDef
*
hrtc
)
{
if
(
hrtc
->
Instance
==
RTC
)
{
/* USER CODE BEGIN RTC_MspDeInit 0 */
/* USER CODE END RTC_MspDeInit 0 */
/* Peripheral clock disable */
__HAL_RCC_RTC_DISABLE
();
/* USER CODE BEGIN RTC_MspDeInit 1 */
/* USER CODE END RTC_MspDeInit 1 */
}
}
void
HAL_UART_MspInit
(
UART_HandleTypeDef
*
huart
)
{
...
...
bsp/stm32/stm32l432-st-nucleo/board/Kconfig
浏览文件 @
d1d070d5
...
...
@@ -36,6 +36,17 @@ menu "On-chip Peripheral Drivers"
endif
config BSP_USING_ONCHIP_RTC
bool "Enable RTC"
select RT_USING_RTC
select RT_USING_LIBC
default n
config BSP_USING_WDT
bool "Enable Watchdog Timer"
select RT_USING_WDT
default n
endmenu
menu "Board extended module Drivers"
...
...
bsp/stm32/stm32l432-st-nucleo/project.uvoptx
浏览文件 @
d1d070d5
此差异已折叠。
点击以展开。
bsp/stm32/stm32l432-st-nucleo/project.uvprojx
浏览文件 @
d1d070d5
此差异已折叠。
点击以展开。
bsp/stm32/stm32l432-st-nucleo/rtconfig.h
浏览文件 @
d1d070d5
...
...
@@ -38,7 +38,7 @@
#define RT_USING_CONSOLE
#define RT_CONSOLEBUF_SIZE 256
#define RT_CONSOLE_DEVICE_NAME "uart2"
#define RT_VER_NUM 0x4000
0
#define RT_VER_NUM 0x4000
1
#define ARCH_ARM
#define ARCH_ARM_CORTEX_M
#define ARCH_ARM_CORTEX_M4
...
...
@@ -79,6 +79,8 @@
#define RT_USING_SERIAL
#define RT_SERIAL_USING_DMA
#define RT_USING_PIN
#define RT_USING_RTC
#define RT_USING_WDT
/* Using WiFi */
...
...
@@ -88,6 +90,7 @@
/* POSIX layer and C standard library */
#define RT_USING_LIBC
/* Network */
...
...
@@ -149,13 +152,8 @@
/* miscellaneous packages */
/* sample package */
/* samples: kernel and components samples */
/* example package: hello */
#define SOC_FAMILY_STM32
#define SOC_SERIES_STM32L4
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录