From c7b74a1e8ffe1ae07d72ef83afff636f0193b106 Mon Sep 17 00:00:00 2001 From: NU-LL <1125934312@qq.com> Date: Tue, 28 Apr 2020 13:33:15 +0800 Subject: [PATCH 1/4] support SPI/ADC/TIME on-chip peripheral driver --- bsp/stm32/stm32l476-st-nucleo/README.md | 5 ++ bsp/stm32/stm32l476-st-nucleo/board/Kconfig | 79 +++++++++++++++++++++ 2 files changed, 84 insertions(+) diff --git a/bsp/stm32/stm32l476-st-nucleo/README.md b/bsp/stm32/stm32l476-st-nucleo/README.md index cd8ad13f9c..bb174c6b0d 100644 --- a/bsp/stm32/stm32l476-st-nucleo/README.md +++ b/bsp/stm32/stm32l476-st-nucleo/README.md @@ -43,8 +43,13 @@ | UART | 支持 | UART2 | | IIC | 支持 | 软件模拟 | | RTC | 支持 | 支持外部晶振和内部低速时钟 | +| SPI | 支持 | SPI1/2/3 | +| ADC | 支持 | | +| TIME | 支持 | TIME15/16/17 | | **扩展模块** | **支持情况** | **备注** | +注意:部分片上外设默认没有使能,如需使用请在CubeMX中使能相应外设 + ## 使用说明 使用说明分为如下两个章节: diff --git a/bsp/stm32/stm32l476-st-nucleo/board/Kconfig b/bsp/stm32/stm32l476-st-nucleo/board/Kconfig index 5089c9f623..4ecb1a6e42 100644 --- a/bsp/stm32/stm32l476-st-nucleo/board/Kconfig +++ b/bsp/stm32/stm32l476-st-nucleo/board/Kconfig @@ -89,6 +89,85 @@ menu "On-chip Peripheral Drivers" endif endif + menuconfig BSP_USING_SPI + bool "Enable SPI BUS" + default n + select RT_USING_SPI + if BSP_USING_SPI + config BSP_USING_SPI1 + bool "Enable SPI1 BUS" + default n + + config BSP_SPI1_TX_USING_DMA + bool "Enable SPI1 TX DMA" + depends on BSP_USING_SPI1 + default n + + config BSP_SPI1_RX_USING_DMA + bool "Enable SPI1 RX DMA" + depends on BSP_USING_SPI1 + select BSP_SPI1_TX_USING_DMA + default n + + config BSP_USING_SPI2 + bool "Enable SPI2 BUS" + default n + + config BSP_SPI2_TX_USING_DMA + bool "Enable SPI2 TX DMA" + depends on BSP_USING_SPI2 + default n + + config BSP_SPI2_RX_USING_DMA + bool "Enable SPI2 RX DMA" + depends on BSP_USING_SPI2 + select BSP_SPI2_TX_USING_DMA + default n + + config BSP_USING_SPI3 + bool "Enable SPI3 BUS" + default n + + config BSP_SPI3_TX_USING_DMA + bool "Enable SPI3 TX DMA" + depends on BSP_USING_SPI3 + default n + + config BSP_SPI3_RX_USING_DMA + bool "Enable SPI3 RX DMA" + depends on BSP_USING_SPI3 + select BSP_SPI3_TX_USING_DMA + default n + endif + + menuconfig BSP_USING_TIM + bool "Enable timer" + default n + select RT_USING_HWTIMER + if BSP_USING_TIM + config BSP_USING_TIM15 + bool "Enable TIM15" + default n + + config BSP_USING_TIM16 + bool "Enable TIM16" + default n + + config BSP_USING_TIM17 + bool "Enable TIM17" + default n + endif + + menuconfig BSP_USING_ADC + bool "Enable ADC" + default n + select RT_USING_ADC + if BSP_USING_ADC + config BSP_USING_ADC1 + bool "Enable ADC1" + default n + endif + menuconfig BSP_USING_ONCHIP_RTC bool "Enable RTC" select RT_USING_RTC From e444ec908c48a4d22598b1dd0ac092c0592c6a27 Mon Sep 17 00:00:00 2001 From: NU-LL <1125934312@qq.com> Date: Thu, 7 May 2020 10:42:55 +0800 Subject: [PATCH 2/4] Add STM32CubeMX initial configuration --- bsp/stm32/stm32l476-st-nucleo/README.md | 2 - .../board/CubeMX_Config/.mxproject | 11 +- .../board/CubeMX_Config/CubeMX_Config.ioc | 322 ++++++++++-------- .../CubeMX_Config/Inc/stm32l4xx_hal_conf.h | 26 +- .../board/CubeMX_Config/Src/main.c | 263 +++++++++++++- .../CubeMX_Config/Src/stm32l4xx_hal_msp.c | 259 +++++++++++++- .../board/CubeMX_Config/Src/stm32l4xx_it.c | 1 + 7 files changed, 724 insertions(+), 160 deletions(-) diff --git a/bsp/stm32/stm32l476-st-nucleo/README.md b/bsp/stm32/stm32l476-st-nucleo/README.md index bb174c6b0d..8b0db28b84 100644 --- a/bsp/stm32/stm32l476-st-nucleo/README.md +++ b/bsp/stm32/stm32l476-st-nucleo/README.md @@ -48,8 +48,6 @@ | TIME | 支持 | TIME15/16/17 | | **扩展模块** | **支持情况** | **备注** | -注意:部分片上外设默认没有使能,如需使用请在CubeMX中使能相应外设 - ## 使用说明 使用说明分为如下两个章节: diff --git a/bsp/stm32/stm32l476-st-nucleo/board/CubeMX_Config/.mxproject b/bsp/stm32/stm32l476-st-nucleo/board/CubeMX_Config/.mxproject index ef81df8fbd..75c88f2ed1 100644 --- a/bsp/stm32/stm32l476-st-nucleo/board/CubeMX_Config/.mxproject +++ b/bsp/stm32/stm32l476-st-nucleo/board/CubeMX_Config/.mxproject @@ -1,13 +1,14 @@ [PreviousGenFiles] -HeaderPath=D:/VariousProject/rt-thread/bsp/stm32/stm32l476-st-nucleo/board/CubeMX_Config/Inc +HeaderPath=G:/1 Code/rt-thread/bsp/stm32/stm32l476-st-nucleo/board/CubeMX_Config/Inc HeaderFiles=stm32l4xx_it.h;stm32l4xx_hal_conf.h;main.h; -SourcePath=D:/VariousProject/rt-thread/bsp/stm32/stm32l476-st-nucleo/board/CubeMX_Config/Src +SourcePath=G:/1 Code/rt-thread/bsp/stm32/stm32l476-st-nucleo/board/CubeMX_Config/Src SourceFiles=stm32l4xx_it.c;stm32l4xx_hal_msp.c;main.c; [PreviousLibFiles] -LibFiles=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_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/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/CMSIS/Device/ST/STM32L4xx/Include/stm32l476xx.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_rtc.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_rtc_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal.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/Inc/stm32l4xx_hal_exti.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_spi.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_spi_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_tim.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/Src/stm32l4xx_hal_rtc.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rtc_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/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_exti.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_spi.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_spi_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/Inc/stm32l4xx_hal_rtc.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_rtc_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal.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/Inc/stm32l4xx_hal_exti.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_spi.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_spi_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_tim.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/CMSIS/Device/ST/STM32L4xx/Include/stm32l476xx.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/cmsis_armcc.h;Drivers/CMSIS/Include/cmsis_armclang.h;Drivers/CMSIS/Include/cmsis_compiler.h;Drivers/CMSIS/Include/cmsis_gcc.h;Drivers/CMSIS/Include/cmsis_iccarm.h;Drivers/CMSIS/Include/cmsis_version.h;Drivers/CMSIS/Include/core_armv8mbl.h;Drivers/CMSIS/Include/core_armv8mml.h;Drivers/CMSIS/Include/core_cm0.h;Drivers/CMSIS/Include/core_cm0plus.h;Drivers/CMSIS/Include/core_cm1.h;Drivers/CMSIS/Include/core_cm23.h;Drivers/CMSIS/Include/core_cm3.h;Drivers/CMSIS/Include/core_cm33.h;Drivers/CMSIS/Include/core_cm4.h;Drivers/CMSIS/Include/core_cm7.h;Drivers/CMSIS/Include/core_sc000.h;Drivers/CMSIS/Include/core_sc300.h;Drivers/CMSIS/Include/mpu_armv7.h;Drivers/CMSIS/Include/mpu_armv8.h;Drivers/CMSIS/Include/tz_context.h; [PreviousUsedKeilFiles] -SourceFiles=..\Src\main.c;..\Src\stm32l4xx_it.c;..\Src\stm32l4xx_hal_msp.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/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:/VariousProject/rt-thread/bsp/stm32/stm32l476-st-nucleo/board/CubeMX_Config//MDK-ARM/startup_stm32l476xx.s; -HeaderPath=..\Drivers\STM32L4xx_HAL_Driver\Inc;..\Drivers\STM32L4xx_HAL_Driver\Inc\Legacy;..\Drivers\CMSIS\Device\ST\STM32L4xx\Include;..\Drivers\CMSIS\Include;..\Inc; +SourceFiles=..\Src\main.c;..\Src\stm32l4xx_it.c;..\Src\stm32l4xx_hal_msp.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rtc.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rtc_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_i2c.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_i2c_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rcc.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rcc_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_flash.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_flash_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_flash_ramfunc.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_gpio.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_dma.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_dma_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_pwr.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_pwr_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_exti.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_spi.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_spi_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_tim.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_tim_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart_ex.c;..\\Src/system_stm32l4xx.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rtc.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rtc_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_i2c.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_i2c_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rcc.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rcc_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_flash.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_flash_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_flash_ramfunc.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_gpio.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_dma.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_dma_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_pwr.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_pwr_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_exti.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_spi.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_spi_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_tim.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_tim_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart_ex.c;..\\Src/system_stm32l4xx.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/CMSIS/Device/ST/STM32L4xx/Source/Templates/system_stm32l4xx.c;; +HeaderPath=F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers\STM32L4xx_HAL_Driver\Inc;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers\STM32L4xx_HAL_Driver\Inc\Legacy;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers\CMSIS\Device\ST\STM32L4xx\Include;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers\CMSIS\Include;..\Inc; +CDefines=USE_HAL_DRIVER;STM32L476xx;USE_HAL_DRIVER;USE_HAL_DRIVER; diff --git a/bsp/stm32/stm32l476-st-nucleo/board/CubeMX_Config/CubeMX_Config.ioc b/bsp/stm32/stm32l476-st-nucleo/board/CubeMX_Config/CubeMX_Config.ioc index 243a1fafd1..064e0d37f1 100644 --- a/bsp/stm32/stm32l476-st-nucleo/board/CubeMX_Config/CubeMX_Config.ioc +++ b/bsp/stm32/stm32l476-st-nucleo/board/CubeMX_Config/CubeMX_Config.ioc @@ -1,146 +1,196 @@ #MicroXplorer Configuration settings - do not modify -File.Version=6 -KeepUserPlacement=false Mcu.Family=STM32L4 +PC3.Mode=Full_Duplex_Master +ProjectManager.MainLocation=Src +PA6.Mode=Full_Duplex_Master +RCC.USART1Freq_Value=80000000 +RCC.SAI1Freq_Value=18285714.285714287 +USART2.IPParameters=VirtualMode-Asynchronous +RCC.CortexFreq_Value=80000000 +SPI3.Direction=SPI_DIRECTION_2LINES +VP_TIM17_VS_ClockSourceINT.Mode=Enable_Timer +SPI3.VirtualType=VM_MASTER +ProjectManager.KeepUserCode=true +Mcu.UserName=STM32L476RGTx +SPI1.VirtualType=VM_MASTER +SPI2.VirtualType=VM_MASTER +PB10.Mode=Full_Duplex_Master +PC10.Signal=SPI3_SCK +PC12.Signal=SPI3_MOSI +RCC.PLLSAI1RoutputFreq_Value=64000000 +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_RTC_Init-RTC-false-HAL-true,5-MX_SPI1_Init-SPI1-false-HAL-true,6-MX_SPI2_Init-SPI2-false-HAL-true,7-MX_SPI3_Init-SPI3-false-HAL-true,8-MX_TIM15_Init-TIM15-false-HAL-true,9-MX_TIM16_Init-TIM16-false-HAL-true,10-MX_TIM17_Init-TIM17-false-HAL-true +VP_RTC_VS_RTC_Activate.Mode=RTC_Enabled +RCC.RTCFreq_Value=32768 +RCC.USART2Freq_Value=80000000 +PC15-OSC32_OUT\ (PC15).Mode=LSE-External-Oscillator +PinOutPanel.RotationAngle=0 +RCC.MCO1PinFreq_Value=80000000 +RCC.SYSCLKSource=RCC_SYSCLKSOURCE_PLLCLK +ProjectManager.StackSize=0x400 +PC14-OSC32_IN\ (PC14).Mode=LSE-External-Oscillator +PA14\ (JTCK-SWCLK).Signal=SYS_JTCK-SWCLK +RCC.I2C3Freq_Value=80000000 +RCC.LPTIM1Freq_Value=80000000 +Mcu.IP4=SPI2 +RCC.FCLKCortexFreq_Value=80000000 +Mcu.IP5=SPI3 +NVIC.SVCall_IRQn=true\:0\:0\:false\:false\:true\:false\:false +Mcu.IP2=RTC +Mcu.IP3=SPI1 Mcu.IP0=NVIC Mcu.IP1=RCC -Mcu.IP2=RTC -Mcu.IP3=SYS -Mcu.IP4=USART2 -Mcu.IPNb=5 -Mcu.Name=STM32L476R(C-E-G)Tx -Mcu.Package=LQFP64 +Mcu.UserConstants= +RCC.VCOSAI1OutputFreq_Value=128000000 +RCC.SDMMCFreq_Value=64000000 +Mcu.ThirdPartyNb=0 +SPI1.Direction=SPI_DIRECTION_2LINES +RCC.HCLKFreq_Value=80000000 +Mcu.IPNb=11 +ProjectManager.PreviousToolchain= +RCC.APB2TimFreq_Value=80000000 +SPI1.CalculateBaudRate=40.0 MBits/s +PC3.Signal=SPI2_MOSI +Mcu.Pin6=PA5 +RCC.SAI2Freq_Value=18285714.285714287 +Mcu.Pin7=PA6 +Mcu.Pin8=PA7 +Mcu.Pin9=PB10 +RCC.AHBFreq_Value=80000000 Mcu.Pin0=PC14-OSC32_IN (PC14) Mcu.Pin1=PC15-OSC32_OUT (PC15) -Mcu.Pin2=PA2 -Mcu.Pin3=PA3 -Mcu.Pin4=PA13 (JTMS-SWDIO) -Mcu.Pin5=PA14 (JTCK-SWCLK) -Mcu.Pin6=VP_RTC_VS_RTC_Activate -Mcu.Pin7=VP_SYS_VS_Systick -Mcu.PinsNb=8 -Mcu.ThirdPartyNb=0 -Mcu.UserConstants= -Mcu.UserName=STM32L476RGTx -MxCube.Version=5.0.1 -MxDb.Version=DB.5.0.1 -NVIC.BusFault_IRQn=true\:0\:0\:false\:false\:true\:false -NVIC.DebugMonitor_IRQn=true\:0\:0\:false\:false\:true\:false -NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true\:false -NVIC.MemoryManagement_IRQn=true\:0\:0\:false\:false\:true\:false -NVIC.NonMaskableInt_IRQn=true\:0\:0\:false\:false\:true\:false -NVIC.PendSV_IRQn=true\:0\:0\:false\:false\:true\:false -NVIC.PriorityGroup=NVIC_PRIORITYGROUP_4 -NVIC.SVCall_IRQn=true\:0\:0\:false\:false\:true\:false -NVIC.SysTick_IRQn=true\:0\:0\:false\:false\:true\:false -NVIC.UsageFault_IRQn=true\:0\:0\:false\:false\:true\:false -PA13\ (JTMS-SWDIO).Mode=Serial_Wire -PA13\ (JTMS-SWDIO).Signal=SYS_JTMS-SWDIO -PA14\ (JTCK-SWCLK).Mode=Serial_Wire -PA14\ (JTCK-SWCLK).Signal=SYS_JTCK-SWCLK -PA2.Mode=Asynchronous -PA2.Signal=USART2_TX -PA3.Mode=Asynchronous -PA3.Signal=USART2_RX -PC14-OSC32_IN\ (PC14).Mode=LSE-External-Oscillator -PC14-OSC32_IN\ (PC14).Signal=RCC_OSC32_IN -PC15-OSC32_OUT\ (PC15).Mode=LSE-External-Oscillator -PC15-OSC32_OUT\ (PC15).Signal=RCC_OSC32_OUT -PCC.Checker=true -PCC.Line=STM32L4x6 -PCC.MCU=STM32L476R(C-E-G)Tx -PCC.PartNumber=STM32L476RGTx -PCC.Seq0=0 -PCC.Series=STM32L4 -PCC.Temperature=25 -PCC.Vdd=null -PinOutPanel.RotationAngle=0 -ProjectManager.AskForMigrate=true -ProjectManager.BackupPrevious=false -ProjectManager.CompilerOptimize=6 -ProjectManager.ComputerToolchain=false -ProjectManager.CoupleFile=false -ProjectManager.CustomerFirmwarePackage= -ProjectManager.DefaultFWLocation=true -ProjectManager.DeletePrevious=true -ProjectManager.DeviceId=STM32L476RGTx -ProjectManager.FirmwarePackage=STM32Cube FW_L4 V1.13.0 -ProjectManager.FreePins=false -ProjectManager.HalAssertFull=false -ProjectManager.HeapSize=0x200 -ProjectManager.KeepUserCode=true -ProjectManager.LastFirmware=true -ProjectManager.LibraryCopy=0 -ProjectManager.MainLocation=Src -ProjectManager.NoMain=false -ProjectManager.PreviousToolchain= -ProjectManager.ProjectBuild=false -ProjectManager.ProjectFileName=CubeMX_Config.ioc -ProjectManager.ProjectName=CubeMX_Config -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,4-MX_RTC_Init-RTC-false-HAL-true -RCC.ADCFreq_Value=64000000 -RCC.AHBFreq_Value=80000000 -RCC.APB1Freq_Value=80000000 -RCC.APB1TimFreq_Value=80000000 -RCC.APB2Freq_Value=80000000 -RCC.APB2TimFreq_Value=80000000 -RCC.CortexFreq_Value=80000000 -RCC.DFSDMFreq_Value=80000000 -RCC.FCLKCortexFreq_Value=80000000 -RCC.FamilyName=M -RCC.HCLKFreq_Value=80000000 -RCC.HSE_VALUE=8000000 -RCC.HSI_VALUE=16000000 -RCC.I2C1Freq_Value=80000000 -RCC.I2C2Freq_Value=80000000 -RCC.I2C3Freq_Value=80000000 -RCC.IPParameters=ADCFreq_Value,AHBFreq_Value,APB1Freq_Value,APB1TimFreq_Value,APB2Freq_Value,APB2TimFreq_Value,CortexFreq_Value,DFSDMFreq_Value,FCLKCortexFreq_Value,FamilyName,HCLKFreq_Value,HSE_VALUE,HSI_VALUE,I2C1Freq_Value,I2C2Freq_Value,I2C3Freq_Value,LCDFreq_Value,LPTIM1Freq_Value,LPTIM2Freq_Value,LPUART1Freq_Value,LSCOPinFreq_Value,LSI_VALUE,MCO1PinFreq_Value,MSI_VALUE,PLLN,PLLPoutputFreq_Value,PLLQoutputFreq_Value,PLLRCLKFreq_Value,PLLSAI1PoutputFreq_Value,PLLSAI1QoutputFreq_Value,PLLSAI1RoutputFreq_Value,PLLSAI2PoutputFreq_Value,PLLSAI2RoutputFreq_Value,PLLSourceVirtual,PWRFreq_Value,RNGFreq_Value,RTCClockSelection,RTCFreq_Value,SAI1Freq_Value,SAI2Freq_Value,SDMMCFreq_Value,SWPMI1Freq_Value,SYSCLKFreq_VALUE,SYSCLKSource,UART4Freq_Value,UART5Freq_Value,USART1Freq_Value,USART2Freq_Value,USART3Freq_Value,USBFreq_Value,VCOInputFreq_Value,VCOOutputFreq_Value,VCOSAI1OutputFreq_Value,VCOSAI2OutputFreq_Value -RCC.LCDFreq_Value=32768 -RCC.LPTIM1Freq_Value=80000000 -RCC.LPTIM2Freq_Value=80000000 -RCC.LPUART1Freq_Value=80000000 -RCC.LSCOPinFreq_Value=32000 -RCC.LSI_VALUE=32000 -RCC.MCO1PinFreq_Value=80000000 -RCC.MSI_VALUE=4000000 -RCC.PLLN=10 -RCC.PLLPoutputFreq_Value=22857142.85714286 -RCC.PLLQoutputFreq_Value=80000000 -RCC.PLLRCLKFreq_Value=80000000 -RCC.PLLSAI1PoutputFreq_Value=18285714.285714287 -RCC.PLLSAI1QoutputFreq_Value=64000000 -RCC.PLLSAI1RoutputFreq_Value=64000000 -RCC.PLLSAI2PoutputFreq_Value=18285714.285714287 -RCC.PLLSAI2RoutputFreq_Value=64000000 -RCC.PLLSourceVirtual=RCC_PLLSOURCE_HSI -RCC.PWRFreq_Value=80000000 -RCC.RNGFreq_Value=64000000 -RCC.RTCClockSelection=RCC_RTCCLKSOURCE_LSE -RCC.RTCFreq_Value=32768 -RCC.SAI1Freq_Value=18285714.285714287 -RCC.SAI2Freq_Value=18285714.285714287 -RCC.SDMMCFreq_Value=64000000 -RCC.SWPMI1Freq_Value=80000000 -RCC.SYSCLKFreq_VALUE=80000000 -RCC.SYSCLKSource=RCC_SYSCLKSOURCE_PLLCLK -RCC.UART4Freq_Value=80000000 -RCC.UART5Freq_Value=80000000 -RCC.USART1Freq_Value=80000000 -RCC.USART2Freq_Value=80000000 +Mcu.Pin2=PC2 +Mcu.Pin3=PC3 RCC.USART3Freq_Value=80000000 -RCC.USBFreq_Value=64000000 -RCC.VCOInputFreq_Value=16000000 -RCC.VCOOutputFreq_Value=160000000 -RCC.VCOSAI1OutputFreq_Value=128000000 -RCC.VCOSAI2OutputFreq_Value=128000000 -USART2.IPParameters=VirtualMode-Asynchronous +Mcu.Pin4=PA2 +Mcu.Pin5=PA3 +ProjectManager.ProjectBuild=false +RCC.HSE_VALUE=8000000 +NVIC.UsageFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false +NVIC.DebugMonitor_IRQn=true\:0\:0\:false\:false\:true\:false\:false +Mcu.IP10=USART2 USART2.VirtualMode-Asynchronous=VM_ASYNC -VP_RTC_VS_RTC_Activate.Mode=RTC_Enabled -VP_RTC_VS_RTC_Activate.Signal=RTC_VS_RTC_Activate -VP_SYS_VS_Systick.Mode=SysTick +RCC.RTCClockSelection=RCC_RTCCLKSOURCE_LSE +NVIC.SysTick_IRQn=true\:0\:0\:false\:false\:true\:false\:true +ProjectManager.FirmwarePackage=STM32Cube FW_L4 V1.15.1 +MxDb.Version=DB.5.0.60 +ProjectManager.BackupPrevious=false +RCC.VCOInputFreq_Value=16000000 +File.Version=6 +SPI2.CalculateBaudRate=40.0 MBits/s +RCC.PLLRCLKFreq_Value=80000000 +NVIC.PendSV_IRQn=true\:0\:0\:false\:false\:true\:false\:false +VP_TIM15_VS_ClockSourceINT.Signal=TIM15_VS_ClockSourceINT +ProjectManager.HalAssertFull=false +ProjectManager.ProjectName=CubeMX_Config +Mcu.Package=LQFP64 +PA6.Signal=SPI1_MISO +SPI2.Mode=SPI_MODE_MASTER +SPI3.Mode=SPI_MODE_MASTER +ProjectManager.ToolChainLocation= +RCC.LSI_VALUE=32000 VP_SYS_VS_Systick.Signal=SYS_VS_Systick +RCC.LSCOPinFreq_Value=32000 +RCC.DFSDMFreq_Value=80000000 +PC11.Mode=Full_Duplex_Master +RCC.PLLPoutputFreq_Value=22857142.85714286 +RCC.APB1TimFreq_Value=80000000 +NVIC.BusFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false +RCC.LPUART1Freq_Value=80000000 +SPI3.IPParameters=VirtualType,Mode,Direction,CalculateBaudRate +SPI2.Direction=SPI_DIRECTION_2LINES +PA13\ (JTMS-SWDIO).Signal=SYS_JTMS-SWDIO +ProjectManager.CustomerFirmwarePackage= +PA3.Signal=USART2_RX +PA5.Mode=Full_Duplex_Master +VP_RTC_VS_RTC_Activate.Signal=RTC_VS_RTC_Activate +RCC.MSI_VALUE=4000000 +RCC.PLLSourceVirtual=RCC_PLLSOURCE_HSI +PA14\ (JTCK-SWCLK).Mode=Serial_Wire +RCC.PLLQoutputFreq_Value=80000000 +ProjectManager.ProjectFileName=CubeMX_Config.ioc +PA7.Mode=Full_Duplex_Master +Mcu.PinsNb=20 +ProjectManager.NoMain=false +SPI1.IPParameters=VirtualType,Mode,Direction,CalculateBaudRate +PC11.Signal=SPI3_MISO +RCC.SWPMI1Freq_Value=80000000 +PC2.Signal=SPI2_MISO +PC10.Mode=Full_Duplex_Master +ProjectManager.DefaultFWLocation=true +PC2.Mode=Full_Duplex_Master +PC15-OSC32_OUT\ (PC15).Signal=RCC_OSC32_OUT +VP_TIM16_VS_ClockSourceINT.Mode=Enable_Timer +ProjectManager.DeletePrevious=true +RCC.VCOSAI2OutputFreq_Value=128000000 +VP_TIM17_VS_ClockSourceINT.Signal=TIM17_VS_ClockSourceINT +RCC.FamilyName=M +PA3.Mode=Asynchronous +ProjectManager.TargetToolchain=MDK-ARM V5 +SPI2.IPParameters=VirtualType,Mode,Direction,CalculateBaudRate +RCC.USBFreq_Value=64000000 +RCC.PLLSAI1PoutputFreq_Value=18285714.285714287 +PB10.Signal=SPI2_SCK +RCC.PLLSAI2RoutputFreq_Value=64000000 +PA5.Signal=SPI1_SCK +PC12.Mode=Full_Duplex_Master board=custom +RCC.VCOOutputFreq_Value=160000000 +ProjectManager.LastFirmware=true +RCC.APB2Freq_Value=80000000 +RCC.UART4Freq_Value=80000000 +SPI3.CalculateBaudRate=40.0 MBits/s +MxCube.Version=5.6.1 +RCC.I2C1Freq_Value=80000000 +SPI1.Mode=SPI_MODE_MASTER +RCC.LCDFreq_Value=32768 +RCC.RNGFreq_Value=64000000 +RCC.PLLSAI1QoutputFreq_Value=64000000 +RCC.ADCFreq_Value=64000000 +VP_SYS_VS_Systick.Mode=SysTick +VP_TIM16_VS_ClockSourceINT.Signal=TIM16_VS_ClockSourceINT +NVIC.NonMaskableInt_IRQn=true\:0\:0\:false\:false\:true\:false\:false +RCC.UART5Freq_Value=80000000 +ProjectManager.FreePins=false +RCC.IPParameters=ADCFreq_Value,AHBFreq_Value,APB1Freq_Value,APB1TimFreq_Value,APB2Freq_Value,APB2TimFreq_Value,CortexFreq_Value,DFSDMFreq_Value,FCLKCortexFreq_Value,FamilyName,HCLKFreq_Value,HSE_VALUE,HSI_VALUE,I2C1Freq_Value,I2C2Freq_Value,I2C3Freq_Value,LCDFreq_Value,LPTIM1Freq_Value,LPTIM2Freq_Value,LPUART1Freq_Value,LSCOPinFreq_Value,LSI_VALUE,MCO1PinFreq_Value,MSI_VALUE,PLLN,PLLPoutputFreq_Value,PLLQoutputFreq_Value,PLLRCLKFreq_Value,PLLSAI1PoutputFreq_Value,PLLSAI1QoutputFreq_Value,PLLSAI1RoutputFreq_Value,PLLSAI2PoutputFreq_Value,PLLSAI2RoutputFreq_Value,PLLSourceVirtual,PWRFreq_Value,RNGFreq_Value,RTCClockSelection,RTCFreq_Value,SAI1Freq_Value,SAI2Freq_Value,SDMMCFreq_Value,SWPMI1Freq_Value,SYSCLKFreq_VALUE,SYSCLKSource,UART4Freq_Value,UART5Freq_Value,USART1Freq_Value,USART2Freq_Value,USART3Freq_Value,USBFreq_Value,VCOInputFreq_Value,VCOOutputFreq_Value,VCOSAI1OutputFreq_Value,VCOSAI2OutputFreq_Value +ProjectManager.AskForMigrate=true +Mcu.Name=STM32L476R(C-E-G)Tx +RCC.LPTIM2Freq_Value=80000000 +PA2.Signal=USART2_TX +ProjectManager.UnderRoot=false +Mcu.IP8=TIM16 +Mcu.IP9=TIM17 +Mcu.IP6=SYS +Mcu.IP7=TIM15 +ProjectManager.CoupleFile=false +PA13\ (JTMS-SWDIO).Mode=Serial_Wire +RCC.SYSCLKFreq_VALUE=80000000 +RCC.PLLSAI2PoutputFreq_Value=18285714.285714287 +NVIC.ForceEnableDMAVector=true +KeepUserPlacement=false +PC14-OSC32_IN\ (PC14).Signal=RCC_OSC32_IN +NVIC.MemoryManagement_IRQn=true\:0\:0\:false\:false\:true\:false\:false +ProjectManager.CompilerOptimize=6 +VP_TIM15_VS_ClockSourceINT.Mode=Internal +ProjectManager.HeapSize=0x200 +Mcu.Pin15=VP_RTC_VS_RTC_Activate +NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false +Mcu.Pin16=VP_SYS_VS_Systick +Mcu.Pin13=PC11 +Mcu.Pin14=PC12 +Mcu.Pin19=VP_TIM17_VS_ClockSourceINT +ProjectManager.ComputerToolchain=false +Mcu.Pin17=VP_TIM15_VS_ClockSourceINT +RCC.HSI_VALUE=16000000 +Mcu.Pin18=VP_TIM16_VS_ClockSourceINT +NVIC.PriorityGroup=NVIC_PRIORITYGROUP_4 +Mcu.Pin11=PA14 (JTCK-SWCLK) +Mcu.Pin12=PC10 +RCC.PLLN=10 +Mcu.Pin10=PA13 (JTMS-SWDIO) +PA2.Mode=Asynchronous +RCC.PWRFreq_Value=80000000 +RCC.I2C2Freq_Value=80000000 +RCC.APB1Freq_Value=80000000 +ProjectManager.DeviceId=STM32L476RGTx +ProjectManager.LibraryCopy=2 +PA7.Signal=SPI1_MOSI diff --git a/bsp/stm32/stm32l476-st-nucleo/board/CubeMX_Config/Inc/stm32l4xx_hal_conf.h b/bsp/stm32/stm32l476-st-nucleo/board/CubeMX_Config/Inc/stm32l4xx_hal_conf.h index 9cf0bbaca2..7bc76c2ef0 100644 --- a/bsp/stm32/stm32l476-st-nucleo/board/CubeMX_Config/Inc/stm32l4xx_hal_conf.h +++ b/bsp/stm32/stm32l476-st-nucleo/board/CubeMX_Config/Inc/stm32l4xx_hal_conf.h @@ -5,7 +5,7 @@ ****************************************************************************** * @attention * - *

© COPYRIGHT(c) 2019 STMicroelectronics

+ *

© COPYRIGHT(c) 2020 STMicroelectronics

* * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: @@ -69,13 +69,15 @@ /*#define HAL_IWDG_MODULE_ENABLED */ /*#define HAL_LTDC_MODULE_ENABLED */ /*#define HAL_LCD_MODULE_ENABLED */ -#define HAL_LPTIM_MODULE_ENABLED +/*#define HAL_LPTIM_MODULE_ENABLED */ +/*#define HAL_MMC_MODULE_ENABLED */ /*#define HAL_NAND_MODULE_ENABLED */ /*#define HAL_NOR_MODULE_ENABLED */ /*#define HAL_OPAMP_MODULE_ENABLED */ /*#define HAL_OSPI_MODULE_ENABLED */ /*#define HAL_OSPI_MODULE_ENABLED */ /*#define HAL_PCD_MODULE_ENABLED */ +/*#define HAL_PKA_MODULE_ENABLED */ /*#define HAL_QSPI_MODULE_ENABLED */ /*#define HAL_QSPI_MODULE_ENABLED */ /*#define HAL_RNG_MODULE_ENABLED */ @@ -84,16 +86,18 @@ /*#define HAL_SD_MODULE_ENABLED */ /*#define HAL_SMBUS_MODULE_ENABLED */ /*#define HAL_SMARTCARD_MODULE_ENABLED */ -/*#define HAL_SPI_MODULE_ENABLED */ +#define HAL_SPI_MODULE_ENABLED /*#define HAL_SRAM_MODULE_ENABLED */ /*#define HAL_SWPMI_MODULE_ENABLED */ -/*#define HAL_TIM_MODULE_ENABLED */ +#define HAL_TIM_MODULE_ENABLED /*#define HAL_TSC_MODULE_ENABLED */ #define HAL_UART_MODULE_ENABLED /*#define HAL_USART_MODULE_ENABLED */ /*#define HAL_WWDG_MODULE_ENABLED */ /*#define HAL_EXTI_MODULE_ENABLED */ +/*#define HAL_PSSI_MODULE_ENABLED */ #define HAL_GPIO_MODULE_ENABLED +#define HAL_EXTI_MODULE_ENABLED #define HAL_I2C_MODULE_ENABLED #define HAL_DMA_MODULE_ENABLED #define HAL_RCC_MODULE_ENABLED @@ -296,6 +300,10 @@ #include "stm32l4xx_hal_sram.h" #endif /* HAL_SRAM_MODULE_ENABLED */ +#ifdef HAL_MMC_MODULE_ENABLED + #include "stm32l4xx_hal_mmc.h" +#endif /* HAL_MMC_MODULE_ENABLED */ + #ifdef HAL_NOR_MODULE_ENABLED #include "stm32l4xx_hal_nor.h" #endif /* HAL_NOR_MODULE_ENABLED */ @@ -332,6 +340,10 @@ #include "stm32l4xx_hal_ospi.h" #endif /* HAL_OSPI_MODULE_ENABLED */ +#ifdef HAL_PKA_MODULE_ENABLED + #include "stm32l4xx_hal_pka.h" +#endif /* HAL_PWR_MODULE_ENABLED */ + #ifdef HAL_PWR_MODULE_ENABLED #include "stm32l4xx_hal_pwr.h" #endif /* HAL_PWR_MODULE_ENABLED */ @@ -408,6 +420,10 @@ #include "stm32l4xx_hal_gfxmmu.h" #endif /* HAL_GFXMMU_MODULE_ENABLED */ +#ifdef HAL_PSSI_MODULE_ENABLED + #include "stm32l4xx_hal_pssi.h" +#endif /* HAL_PSSI_MODULE_ENABLED */ + /* Exported macro ------------------------------------------------------------*/ #ifdef USE_FULL_ASSERT /** @@ -418,7 +434,7 @@ * If expr is true, it returns no value. * @retval None */ - #define assert_param(expr) ((expr) ? (void)0U : assert_failed((char *)__FILE__, __LINE__)) + #define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__)) /* Exported functions ------------------------------------------------------- */ void assert_failed(char *file, uint32_t line); #else diff --git a/bsp/stm32/stm32l476-st-nucleo/board/CubeMX_Config/Src/main.c b/bsp/stm32/stm32l476-st-nucleo/board/CubeMX_Config/Src/main.c index e6b32d1921..4db5dd9f5a 100644 --- a/bsp/stm32/stm32l476-st-nucleo/board/CubeMX_Config/Src/main.c +++ b/bsp/stm32/stm32l476-st-nucleo/board/CubeMX_Config/Src/main.c @@ -64,6 +64,14 @@ /* Private variables ---------------------------------------------------------*/ RTC_HandleTypeDef hrtc; +SPI_HandleTypeDef hspi1; +SPI_HandleTypeDef hspi2; +SPI_HandleTypeDef hspi3; + +TIM_HandleTypeDef htim15; +TIM_HandleTypeDef htim16; +TIM_HandleTypeDef htim17; + UART_HandleTypeDef huart2; /* USER CODE BEGIN PV */ @@ -76,6 +84,12 @@ void SystemClock_Config(void); static void MX_GPIO_Init(void); static void MX_USART2_UART_Init(void); static void MX_RTC_Init(void); +static void MX_SPI1_Init(void); +static void MX_SPI2_Init(void); +static void MX_SPI3_Init(void); +static void MX_TIM15_Init(void); +static void MX_TIM16_Init(void); +static void MX_TIM17_Init(void); /* USER CODE BEGIN PFP */ /* Private function prototypes -----------------------------------------------*/ @@ -116,6 +130,12 @@ int main(void) MX_GPIO_Init(); MX_USART2_UART_Init(); MX_RTC_Init(); + MX_SPI1_Init(); + MX_SPI2_Init(); + MX_SPI3_Init(); + MX_TIM15_Init(); + MX_TIM16_Init(); + MX_TIM17_Init(); /* USER CODE BEGIN 2 */ /* USER CODE END 2 */ @@ -143,11 +163,11 @@ void SystemClock_Config(void) RCC_ClkInitTypeDef RCC_ClkInitStruct = {0}; RCC_PeriphCLKInitTypeDef PeriphClkInit = {0}; - /**Configure LSE Drive Capability + /** Configure LSE Drive Capability */ HAL_PWR_EnableBkUpAccess(); __HAL_RCC_LSEDRIVE_CONFIG(RCC_LSEDRIVE_LOW); - /**Initializes the CPU, AHB and APB busses clocks + /** Initializes the CPU, AHB and APB busses clocks */ RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI|RCC_OSCILLATORTYPE_LSE; RCC_OscInitStruct.LSEState = RCC_LSE_ON; @@ -164,7 +184,7 @@ void SystemClock_Config(void) { Error_Handler(); } - /**Initializes the CPU, AHB and APB busses clocks + /** Initializes the CPU, AHB and APB busses clocks */ RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK |RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2; @@ -184,7 +204,7 @@ void SystemClock_Config(void) { Error_Handler(); } - /**Configure the main internal regulator output voltage + /** Configure the main internal regulator output voltage */ if (HAL_PWREx_ControlVoltageScaling(PWR_REGULATOR_VOLTAGE_SCALE1) != HAL_OK) { @@ -207,7 +227,7 @@ static void MX_RTC_Init(void) /* USER CODE BEGIN RTC_Init 1 */ /* USER CODE END RTC_Init 1 */ - /**Initialize RTC Only + /** Initialize RTC Only */ hrtc.Instance = RTC; hrtc.Init.HourFormat = RTC_HOURFORMAT_24; @@ -227,6 +247,236 @@ static void MX_RTC_Init(void) } +/** + * @brief SPI1 Initialization Function + * @param None + * @retval None + */ +static void MX_SPI1_Init(void) +{ + + /* USER CODE BEGIN SPI1_Init 0 */ + + /* USER CODE END SPI1_Init 0 */ + + /* USER CODE BEGIN SPI1_Init 1 */ + + /* USER CODE END SPI1_Init 1 */ + /* SPI1 parameter configuration*/ + hspi1.Instance = SPI1; + hspi1.Init.Mode = SPI_MODE_MASTER; + hspi1.Init.Direction = SPI_DIRECTION_2LINES; + hspi1.Init.DataSize = SPI_DATASIZE_4BIT; + hspi1.Init.CLKPolarity = SPI_POLARITY_LOW; + hspi1.Init.CLKPhase = SPI_PHASE_1EDGE; + hspi1.Init.NSS = SPI_NSS_SOFT; + hspi1.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_2; + hspi1.Init.FirstBit = SPI_FIRSTBIT_MSB; + hspi1.Init.TIMode = SPI_TIMODE_DISABLE; + hspi1.Init.CRCCalculation = SPI_CRCCALCULATION_DISABLE; + hspi1.Init.CRCPolynomial = 7; + hspi1.Init.CRCLength = SPI_CRC_LENGTH_DATASIZE; + hspi1.Init.NSSPMode = SPI_NSS_PULSE_ENABLE; + if (HAL_SPI_Init(&hspi1) != HAL_OK) + { + Error_Handler(); + } + /* USER CODE BEGIN SPI1_Init 2 */ + + /* USER CODE END SPI1_Init 2 */ + +} + +/** + * @brief SPI2 Initialization Function + * @param None + * @retval None + */ +static void MX_SPI2_Init(void) +{ + + /* USER CODE BEGIN SPI2_Init 0 */ + + /* USER CODE END SPI2_Init 0 */ + + /* USER CODE BEGIN SPI2_Init 1 */ + + /* USER CODE END SPI2_Init 1 */ + /* SPI2 parameter configuration*/ + hspi2.Instance = SPI2; + hspi2.Init.Mode = SPI_MODE_MASTER; + hspi2.Init.Direction = SPI_DIRECTION_2LINES; + hspi2.Init.DataSize = SPI_DATASIZE_4BIT; + hspi2.Init.CLKPolarity = SPI_POLARITY_LOW; + hspi2.Init.CLKPhase = SPI_PHASE_1EDGE; + hspi2.Init.NSS = SPI_NSS_SOFT; + hspi2.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_2; + hspi2.Init.FirstBit = SPI_FIRSTBIT_MSB; + hspi2.Init.TIMode = SPI_TIMODE_DISABLE; + hspi2.Init.CRCCalculation = SPI_CRCCALCULATION_DISABLE; + hspi2.Init.CRCPolynomial = 7; + hspi2.Init.CRCLength = SPI_CRC_LENGTH_DATASIZE; + hspi2.Init.NSSPMode = SPI_NSS_PULSE_ENABLE; + if (HAL_SPI_Init(&hspi2) != HAL_OK) + { + Error_Handler(); + } + /* USER CODE BEGIN SPI2_Init 2 */ + + /* USER CODE END SPI2_Init 2 */ + +} + +/** + * @brief SPI3 Initialization Function + * @param None + * @retval None + */ +static void MX_SPI3_Init(void) +{ + + /* USER CODE BEGIN SPI3_Init 0 */ + + /* USER CODE END SPI3_Init 0 */ + + /* USER CODE BEGIN SPI3_Init 1 */ + + /* USER CODE END SPI3_Init 1 */ + /* SPI3 parameter configuration*/ + hspi3.Instance = SPI3; + hspi3.Init.Mode = SPI_MODE_MASTER; + hspi3.Init.Direction = SPI_DIRECTION_2LINES; + hspi3.Init.DataSize = SPI_DATASIZE_4BIT; + hspi3.Init.CLKPolarity = SPI_POLARITY_LOW; + hspi3.Init.CLKPhase = SPI_PHASE_1EDGE; + hspi3.Init.NSS = SPI_NSS_SOFT; + hspi3.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_2; + hspi3.Init.FirstBit = SPI_FIRSTBIT_MSB; + hspi3.Init.TIMode = SPI_TIMODE_DISABLE; + hspi3.Init.CRCCalculation = SPI_CRCCALCULATION_DISABLE; + hspi3.Init.CRCPolynomial = 7; + hspi3.Init.CRCLength = SPI_CRC_LENGTH_DATASIZE; + hspi3.Init.NSSPMode = SPI_NSS_PULSE_ENABLE; + if (HAL_SPI_Init(&hspi3) != HAL_OK) + { + Error_Handler(); + } + /* USER CODE BEGIN SPI3_Init 2 */ + + /* USER CODE END SPI3_Init 2 */ + +} + +/** + * @brief TIM15 Initialization Function + * @param None + * @retval None + */ +static void MX_TIM15_Init(void) +{ + + /* USER CODE BEGIN TIM15_Init 0 */ + + /* USER CODE END TIM15_Init 0 */ + + TIM_ClockConfigTypeDef sClockSourceConfig = {0}; + TIM_MasterConfigTypeDef sMasterConfig = {0}; + + /* USER CODE BEGIN TIM15_Init 1 */ + + /* USER CODE END TIM15_Init 1 */ + htim15.Instance = TIM15; + htim15.Init.Prescaler = 0; + htim15.Init.CounterMode = TIM_COUNTERMODE_UP; + htim15.Init.Period = 0; + htim15.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1; + htim15.Init.RepetitionCounter = 0; + htim15.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE; + if (HAL_TIM_Base_Init(&htim15) != HAL_OK) + { + Error_Handler(); + } + sClockSourceConfig.ClockSource = TIM_CLOCKSOURCE_INTERNAL; + if (HAL_TIM_ConfigClockSource(&htim15, &sClockSourceConfig) != HAL_OK) + { + Error_Handler(); + } + sMasterConfig.MasterOutputTrigger = TIM_TRGO_RESET; + sMasterConfig.MasterSlaveMode = TIM_MASTERSLAVEMODE_DISABLE; + if (HAL_TIMEx_MasterConfigSynchronization(&htim15, &sMasterConfig) != HAL_OK) + { + Error_Handler(); + } + /* USER CODE BEGIN TIM15_Init 2 */ + + /* USER CODE END TIM15_Init 2 */ + +} + +/** + * @brief TIM16 Initialization Function + * @param None + * @retval None + */ +static void MX_TIM16_Init(void) +{ + + /* USER CODE BEGIN TIM16_Init 0 */ + + /* USER CODE END TIM16_Init 0 */ + + /* USER CODE BEGIN TIM16_Init 1 */ + + /* USER CODE END TIM16_Init 1 */ + htim16.Instance = TIM16; + htim16.Init.Prescaler = 0; + htim16.Init.CounterMode = TIM_COUNTERMODE_UP; + htim16.Init.Period = 0; + htim16.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1; + htim16.Init.RepetitionCounter = 0; + htim16.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE; + if (HAL_TIM_Base_Init(&htim16) != HAL_OK) + { + Error_Handler(); + } + /* USER CODE BEGIN TIM16_Init 2 */ + + /* USER CODE END TIM16_Init 2 */ + +} + +/** + * @brief TIM17 Initialization Function + * @param None + * @retval None + */ +static void MX_TIM17_Init(void) +{ + + /* USER CODE BEGIN TIM17_Init 0 */ + + /* USER CODE END TIM17_Init 0 */ + + /* USER CODE BEGIN TIM17_Init 1 */ + + /* USER CODE END TIM17_Init 1 */ + htim17.Instance = TIM17; + htim17.Init.Prescaler = 0; + htim17.Init.CounterMode = TIM_COUNTERMODE_UP; + htim17.Init.Period = 0; + htim17.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1; + htim17.Init.RepetitionCounter = 0; + htim17.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE; + if (HAL_TIM_Base_Init(&htim17) != HAL_OK) + { + Error_Handler(); + } + /* USER CODE BEGIN TIM17_Init 2 */ + + /* USER CODE END TIM17_Init 2 */ + +} + /** * @brief USART2 Initialization Function * @param None @@ -273,6 +523,7 @@ static void MX_GPIO_Init(void) /* GPIO Ports Clock Enable */ __HAL_RCC_GPIOC_CLK_ENABLE(); __HAL_RCC_GPIOA_CLK_ENABLE(); + __HAL_RCC_GPIOB_CLK_ENABLE(); } @@ -302,7 +553,7 @@ void Error_Handler(void) * @param line: assert_param error line source number * @retval None */ -void assert_failed(char *file, uint32_t line) +void assert_failed(uint8_t *file, uint32_t line) { /* USER CODE BEGIN 6 */ /* User can add his own implementation to report the file name and line number, diff --git a/bsp/stm32/stm32l476-st-nucleo/board/CubeMX_Config/Src/stm32l4xx_hal_msp.c b/bsp/stm32/stm32l476-st-nucleo/board/CubeMX_Config/Src/stm32l4xx_hal_msp.c index b693d8d190..4a2fc078b1 100644 --- a/bsp/stm32/stm32l476-st-nucleo/board/CubeMX_Config/Src/stm32l4xx_hal_msp.c +++ b/bsp/stm32/stm32l476-st-nucleo/board/CubeMX_Config/Src/stm32l4xx_hal_msp.c @@ -105,7 +105,6 @@ void HAL_MspInit(void) */ void HAL_RTC_MspInit(RTC_HandleTypeDef* hrtc) { - if(hrtc->Instance==RTC) { /* USER CODE BEGIN RTC_MspInit 0 */ @@ -126,10 +125,8 @@ void HAL_RTC_MspInit(RTC_HandleTypeDef* hrtc) * @param hrtc: RTC handle pointer * @retval None */ - void HAL_RTC_MspDeInit(RTC_HandleTypeDef* hrtc) { - if(hrtc->Instance==RTC) { /* USER CODE BEGIN RTC_MspDeInit 0 */ @@ -144,6 +141,259 @@ void HAL_RTC_MspDeInit(RTC_HandleTypeDef* hrtc) } +/** +* @brief SPI MSP Initialization +* This function configures the hardware resources used in this example +* @param hspi: SPI handle pointer +* @retval None +*/ +void HAL_SPI_MspInit(SPI_HandleTypeDef* hspi) +{ + GPIO_InitTypeDef GPIO_InitStruct = {0}; + if(hspi->Instance==SPI1) + { + /* USER CODE BEGIN SPI1_MspInit 0 */ + + /* USER CODE END SPI1_MspInit 0 */ + /* Peripheral clock enable */ + __HAL_RCC_SPI1_CLK_ENABLE(); + + __HAL_RCC_GPIOA_CLK_ENABLE(); + /**SPI1 GPIO Configuration + PA5 ------> SPI1_SCK + PA6 ------> SPI1_MISO + PA7 ------> SPI1_MOSI + */ + GPIO_InitStruct.Pin = GPIO_PIN_5|GPIO_PIN_6|GPIO_PIN_7; + GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; + GPIO_InitStruct.Pull = GPIO_NOPULL; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; + GPIO_InitStruct.Alternate = GPIO_AF5_SPI1; + HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); + + /* USER CODE BEGIN SPI1_MspInit 1 */ + + /* USER CODE END SPI1_MspInit 1 */ + } + else if(hspi->Instance==SPI2) + { + /* USER CODE BEGIN SPI2_MspInit 0 */ + + /* USER CODE END SPI2_MspInit 0 */ + /* Peripheral clock enable */ + __HAL_RCC_SPI2_CLK_ENABLE(); + + __HAL_RCC_GPIOC_CLK_ENABLE(); + __HAL_RCC_GPIOB_CLK_ENABLE(); + /**SPI2 GPIO Configuration + PC2 ------> SPI2_MISO + PC3 ------> SPI2_MOSI + PB10 ------> SPI2_SCK + */ + GPIO_InitStruct.Pin = GPIO_PIN_2|GPIO_PIN_3; + GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; + GPIO_InitStruct.Pull = GPIO_NOPULL; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; + GPIO_InitStruct.Alternate = GPIO_AF5_SPI2; + HAL_GPIO_Init(GPIOC, &GPIO_InitStruct); + + GPIO_InitStruct.Pin = GPIO_PIN_10; + GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; + GPIO_InitStruct.Pull = GPIO_NOPULL; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; + GPIO_InitStruct.Alternate = GPIO_AF5_SPI2; + HAL_GPIO_Init(GPIOB, &GPIO_InitStruct); + + /* USER CODE BEGIN SPI2_MspInit 1 */ + + /* USER CODE END SPI2_MspInit 1 */ + } + else if(hspi->Instance==SPI3) + { + /* USER CODE BEGIN SPI3_MspInit 0 */ + + /* USER CODE END SPI3_MspInit 0 */ + /* Peripheral clock enable */ + __HAL_RCC_SPI3_CLK_ENABLE(); + + __HAL_RCC_GPIOC_CLK_ENABLE(); + /**SPI3 GPIO Configuration + PC10 ------> SPI3_SCK + PC11 ------> SPI3_MISO + PC12 ------> SPI3_MOSI + */ + GPIO_InitStruct.Pin = GPIO_PIN_10|GPIO_PIN_11|GPIO_PIN_12; + GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; + GPIO_InitStruct.Pull = GPIO_NOPULL; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; + GPIO_InitStruct.Alternate = GPIO_AF6_SPI3; + HAL_GPIO_Init(GPIOC, &GPIO_InitStruct); + + /* USER CODE BEGIN SPI3_MspInit 1 */ + + /* USER CODE END SPI3_MspInit 1 */ + } + +} + +/** +* @brief SPI MSP De-Initialization +* This function freeze the hardware resources used in this example +* @param hspi: SPI handle pointer +* @retval None +*/ +void HAL_SPI_MspDeInit(SPI_HandleTypeDef* hspi) +{ + if(hspi->Instance==SPI1) + { + /* USER CODE BEGIN SPI1_MspDeInit 0 */ + + /* USER CODE END SPI1_MspDeInit 0 */ + /* Peripheral clock disable */ + __HAL_RCC_SPI1_CLK_DISABLE(); + + /**SPI1 GPIO Configuration + PA5 ------> SPI1_SCK + PA6 ------> SPI1_MISO + PA7 ------> SPI1_MOSI + */ + HAL_GPIO_DeInit(GPIOA, GPIO_PIN_5|GPIO_PIN_6|GPIO_PIN_7); + + /* USER CODE BEGIN SPI1_MspDeInit 1 */ + + /* USER CODE END SPI1_MspDeInit 1 */ + } + else if(hspi->Instance==SPI2) + { + /* USER CODE BEGIN SPI2_MspDeInit 0 */ + + /* USER CODE END SPI2_MspDeInit 0 */ + /* Peripheral clock disable */ + __HAL_RCC_SPI2_CLK_DISABLE(); + + /**SPI2 GPIO Configuration + PC2 ------> SPI2_MISO + PC3 ------> SPI2_MOSI + PB10 ------> SPI2_SCK + */ + HAL_GPIO_DeInit(GPIOC, GPIO_PIN_2|GPIO_PIN_3); + + HAL_GPIO_DeInit(GPIOB, GPIO_PIN_10); + + /* USER CODE BEGIN SPI2_MspDeInit 1 */ + + /* USER CODE END SPI2_MspDeInit 1 */ + } + else if(hspi->Instance==SPI3) + { + /* USER CODE BEGIN SPI3_MspDeInit 0 */ + + /* USER CODE END SPI3_MspDeInit 0 */ + /* Peripheral clock disable */ + __HAL_RCC_SPI3_CLK_DISABLE(); + + /**SPI3 GPIO Configuration + PC10 ------> SPI3_SCK + PC11 ------> SPI3_MISO + PC12 ------> SPI3_MOSI + */ + HAL_GPIO_DeInit(GPIOC, GPIO_PIN_10|GPIO_PIN_11|GPIO_PIN_12); + + /* USER CODE BEGIN SPI3_MspDeInit 1 */ + + /* USER CODE END SPI3_MspDeInit 1 */ + } + +} + +/** +* @brief TIM_Base MSP Initialization +* This function configures the hardware resources used in this example +* @param htim_base: TIM_Base handle pointer +* @retval None +*/ +void HAL_TIM_Base_MspInit(TIM_HandleTypeDef* htim_base) +{ + if(htim_base->Instance==TIM15) + { + /* USER CODE BEGIN TIM15_MspInit 0 */ + + /* USER CODE END TIM15_MspInit 0 */ + /* Peripheral clock enable */ + __HAL_RCC_TIM15_CLK_ENABLE(); + /* USER CODE BEGIN TIM15_MspInit 1 */ + + /* USER CODE END TIM15_MspInit 1 */ + } + else if(htim_base->Instance==TIM16) + { + /* USER CODE BEGIN TIM16_MspInit 0 */ + + /* USER CODE END TIM16_MspInit 0 */ + /* Peripheral clock enable */ + __HAL_RCC_TIM16_CLK_ENABLE(); + /* USER CODE BEGIN TIM16_MspInit 1 */ + + /* USER CODE END TIM16_MspInit 1 */ + } + else if(htim_base->Instance==TIM17) + { + /* USER CODE BEGIN TIM17_MspInit 0 */ + + /* USER CODE END TIM17_MspInit 0 */ + /* Peripheral clock enable */ + __HAL_RCC_TIM17_CLK_ENABLE(); + /* USER CODE BEGIN TIM17_MspInit 1 */ + + /* USER CODE END TIM17_MspInit 1 */ + } + +} + +/** +* @brief TIM_Base MSP De-Initialization +* This function freeze the hardware resources used in this example +* @param htim_base: TIM_Base handle pointer +* @retval None +*/ +void HAL_TIM_Base_MspDeInit(TIM_HandleTypeDef* htim_base) +{ + if(htim_base->Instance==TIM15) + { + /* USER CODE BEGIN TIM15_MspDeInit 0 */ + + /* USER CODE END TIM15_MspDeInit 0 */ + /* Peripheral clock disable */ + __HAL_RCC_TIM15_CLK_DISABLE(); + /* USER CODE BEGIN TIM15_MspDeInit 1 */ + + /* USER CODE END TIM15_MspDeInit 1 */ + } + else if(htim_base->Instance==TIM16) + { + /* USER CODE BEGIN TIM16_MspDeInit 0 */ + + /* USER CODE END TIM16_MspDeInit 0 */ + /* Peripheral clock disable */ + __HAL_RCC_TIM16_CLK_DISABLE(); + /* USER CODE BEGIN TIM16_MspDeInit 1 */ + + /* USER CODE END TIM16_MspDeInit 1 */ + } + else if(htim_base->Instance==TIM17) + { + /* USER CODE BEGIN TIM17_MspDeInit 0 */ + + /* USER CODE END TIM17_MspDeInit 0 */ + /* Peripheral clock disable */ + __HAL_RCC_TIM17_CLK_DISABLE(); + /* USER CODE BEGIN TIM17_MspDeInit 1 */ + + /* USER CODE END TIM17_MspDeInit 1 */ + } + +} + /** * @brief UART MSP Initialization * This function configures the hardware resources used in this example @@ -152,7 +402,6 @@ void HAL_RTC_MspDeInit(RTC_HandleTypeDef* hrtc) */ void HAL_UART_MspInit(UART_HandleTypeDef* huart) { - GPIO_InitTypeDef GPIO_InitStruct = {0}; if(huart->Instance==USART2) { @@ -187,10 +436,8 @@ void HAL_UART_MspInit(UART_HandleTypeDef* huart) * @param huart: UART handle pointer * @retval None */ - void HAL_UART_MspDeInit(UART_HandleTypeDef* huart) { - if(huart->Instance==USART2) { /* USER CODE BEGIN USART2_MspDeInit 0 */ diff --git a/bsp/stm32/stm32l476-st-nucleo/board/CubeMX_Config/Src/stm32l4xx_it.c b/bsp/stm32/stm32l476-st-nucleo/board/CubeMX_Config/Src/stm32l4xx_it.c index ab5c0b7d8e..e13a77a0e6 100644 --- a/bsp/stm32/stm32l476-st-nucleo/board/CubeMX_Config/Src/stm32l4xx_it.c +++ b/bsp/stm32/stm32l476-st-nucleo/board/CubeMX_Config/Src/stm32l4xx_it.c @@ -71,6 +71,7 @@ /* USER CODE END 0 */ /* External variables --------------------------------------------------------*/ + /* USER CODE BEGIN EV */ /* USER CODE END EV */ From 6e861d493842d04804efae5ec4fb33e305540cfe Mon Sep 17 00:00:00 2001 From: NU-LL <1125934312@qq.com> Date: Thu, 7 May 2020 11:14:17 +0800 Subject: [PATCH 3/4] Fix adc initialization --- bsp/stm32/stm32l476-st-nucleo/README.md | 2 +- .../board/CubeMX_Config/.mxproject | 4 +- .../board/CubeMX_Config/CubeMX_Config.ioc | 104 ++++++--- .../CubeMX_Config/Inc/stm32l4xx_hal_conf.h | 2 +- .../board/CubeMX_Config/Src/main.c | 200 +++++++++++++++++- .../CubeMX_Config/Src/stm32l4xx_hal_msp.c | 173 ++++++++++++++- bsp/stm32/stm32l476-st-nucleo/board/Kconfig | 8 + 7 files changed, 445 insertions(+), 48 deletions(-) diff --git a/bsp/stm32/stm32l476-st-nucleo/README.md b/bsp/stm32/stm32l476-st-nucleo/README.md index 8b0db28b84..e1784c3855 100644 --- a/bsp/stm32/stm32l476-st-nucleo/README.md +++ b/bsp/stm32/stm32l476-st-nucleo/README.md @@ -44,7 +44,7 @@ | IIC | 支持 | 软件模拟 | | RTC | 支持 | 支持外部晶振和内部低速时钟 | | SPI | 支持 | SPI1/2/3 | -| ADC | 支持 | | +| ADC | 支持 | ADC1_IN1/ADC2_IN2/ADC3_IN3 | | TIME | 支持 | TIME15/16/17 | | **扩展模块** | **支持情况** | **备注** | diff --git a/bsp/stm32/stm32l476-st-nucleo/board/CubeMX_Config/.mxproject b/bsp/stm32/stm32l476-st-nucleo/board/CubeMX_Config/.mxproject index 75c88f2ed1..0160a9c929 100644 --- a/bsp/stm32/stm32l476-st-nucleo/board/CubeMX_Config/.mxproject +++ b/bsp/stm32/stm32l476-st-nucleo/board/CubeMX_Config/.mxproject @@ -5,10 +5,10 @@ SourcePath=G:/1 Code/rt-thread/bsp/stm32/stm32l476-st-nucleo/board/CubeMX_Config SourceFiles=stm32l4xx_it.c;stm32l4xx_hal_msp.c;main.c; [PreviousLibFiles] -LibFiles=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.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/Inc/stm32l4xx_hal_exti.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_spi.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_spi_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_tim.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/Src/stm32l4xx_hal_rtc.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rtc_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/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_exti.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_spi.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_spi_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/Inc/stm32l4xx_hal_rtc.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_rtc_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal.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/Inc/stm32l4xx_hal_exti.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_spi.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_spi_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_tim.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/CMSIS/Device/ST/STM32L4xx/Include/stm32l476xx.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/cmsis_armcc.h;Drivers/CMSIS/Include/cmsis_armclang.h;Drivers/CMSIS/Include/cmsis_compiler.h;Drivers/CMSIS/Include/cmsis_gcc.h;Drivers/CMSIS/Include/cmsis_iccarm.h;Drivers/CMSIS/Include/cmsis_version.h;Drivers/CMSIS/Include/core_armv8mbl.h;Drivers/CMSIS/Include/core_armv8mml.h;Drivers/CMSIS/Include/core_cm0.h;Drivers/CMSIS/Include/core_cm0plus.h;Drivers/CMSIS/Include/core_cm1.h;Drivers/CMSIS/Include/core_cm23.h;Drivers/CMSIS/Include/core_cm3.h;Drivers/CMSIS/Include/core_cm33.h;Drivers/CMSIS/Include/core_cm4.h;Drivers/CMSIS/Include/core_cm7.h;Drivers/CMSIS/Include/core_sc000.h;Drivers/CMSIS/Include/core_sc300.h;Drivers/CMSIS/Include/mpu_armv7.h;Drivers/CMSIS/Include/mpu_armv8.h;Drivers/CMSIS/Include/tz_context.h; +LibFiles=Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_adc.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_adc.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_adc_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal.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/Inc/stm32l4xx_hal_exti.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_spi.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_spi_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_tim.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/Src/stm32l4xx_hal_adc.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_adc_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/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_exti.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_spi.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_spi_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/Inc/stm32l4xx_hal_adc.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_adc.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_adc_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal.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/Inc/stm32l4xx_hal_exti.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_spi.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_spi_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_tim.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/CMSIS/Device/ST/STM32L4xx/Include/stm32l476xx.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/cmsis_armcc.h;Drivers/CMSIS/Include/cmsis_armclang.h;Drivers/CMSIS/Include/cmsis_compiler.h;Drivers/CMSIS/Include/cmsis_gcc.h;Drivers/CMSIS/Include/cmsis_iccarm.h;Drivers/CMSIS/Include/cmsis_version.h;Drivers/CMSIS/Include/core_armv8mbl.h;Drivers/CMSIS/Include/core_armv8mml.h;Drivers/CMSIS/Include/core_cm0.h;Drivers/CMSIS/Include/core_cm0plus.h;Drivers/CMSIS/Include/core_cm1.h;Drivers/CMSIS/Include/core_cm23.h;Drivers/CMSIS/Include/core_cm3.h;Drivers/CMSIS/Include/core_cm33.h;Drivers/CMSIS/Include/core_cm4.h;Drivers/CMSIS/Include/core_cm7.h;Drivers/CMSIS/Include/core_sc000.h;Drivers/CMSIS/Include/core_sc300.h;Drivers/CMSIS/Include/mpu_armv7.h;Drivers/CMSIS/Include/mpu_armv8.h;Drivers/CMSIS/Include/tz_context.h; [PreviousUsedKeilFiles] -SourceFiles=..\Src\main.c;..\Src\stm32l4xx_it.c;..\Src\stm32l4xx_hal_msp.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rtc.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rtc_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_i2c.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_i2c_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rcc.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rcc_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_flash.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_flash_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_flash_ramfunc.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_gpio.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_dma.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_dma_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_pwr.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_pwr_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_exti.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_spi.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_spi_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_tim.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_tim_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart_ex.c;..\\Src/system_stm32l4xx.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rtc.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rtc_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_i2c.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_i2c_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rcc.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rcc_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_flash.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_flash_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_flash_ramfunc.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_gpio.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_dma.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_dma_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_pwr.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_pwr_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_exti.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_spi.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_spi_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_tim.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_tim_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart_ex.c;..\\Src/system_stm32l4xx.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/CMSIS/Device/ST/STM32L4xx/Source/Templates/system_stm32l4xx.c;; +SourceFiles=..\Src\main.c;..\Src\stm32l4xx_it.c;..\Src\stm32l4xx_hal_msp.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_adc.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_adc_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_i2c.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_i2c_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rcc.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rcc_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_flash.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_flash_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_flash_ramfunc.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_gpio.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_dma.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_dma_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_pwr.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_pwr_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_exti.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rtc.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rtc_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_spi.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_spi_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_tim.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_tim_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart_ex.c;..\\Src/system_stm32l4xx.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_adc.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_adc_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_i2c.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_i2c_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rcc.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rcc_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_flash.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_flash_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_flash_ramfunc.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_gpio.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_dma.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_dma_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_pwr.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_pwr_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_exti.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rtc.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rtc_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_spi.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_spi_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_tim.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_tim_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart_ex.c;..\\Src/system_stm32l4xx.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/CMSIS/Device/ST/STM32L4xx/Source/Templates/system_stm32l4xx.c;; HeaderPath=F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers\STM32L4xx_HAL_Driver\Inc;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers\STM32L4xx_HAL_Driver\Inc\Legacy;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers\CMSIS\Device\ST\STM32L4xx\Include;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers\CMSIS\Include;..\Inc; CDefines=USE_HAL_DRIVER;STM32L476xx;USE_HAL_DRIVER;USE_HAL_DRIVER; diff --git a/bsp/stm32/stm32l476-st-nucleo/board/CubeMX_Config/CubeMX_Config.ioc b/bsp/stm32/stm32l476-st-nucleo/board/CubeMX_Config/CubeMX_Config.ioc index 064e0d37f1..50c89435ba 100644 --- a/bsp/stm32/stm32l476-st-nucleo/board/CubeMX_Config/CubeMX_Config.ioc +++ b/bsp/stm32/stm32l476-st-nucleo/board/CubeMX_Config/CubeMX_Config.ioc @@ -15,14 +15,17 @@ Mcu.UserName=STM32L476RGTx SPI1.VirtualType=VM_MASTER SPI2.VirtualType=VM_MASTER PB10.Mode=Full_Duplex_Master +ADC2.Channel-0\#ChannelRegularConversion=ADC_CHANNEL_2 +SH.ADCx_IN2.0=ADC2_IN2,IN2-Single-Ended PC10.Signal=SPI3_SCK PC12.Signal=SPI3_MOSI RCC.PLLSAI1RoutputFreq_Value=64000000 -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_RTC_Init-RTC-false-HAL-true,5-MX_SPI1_Init-SPI1-false-HAL-true,6-MX_SPI2_Init-SPI2-false-HAL-true,7-MX_SPI3_Init-SPI3-false-HAL-true,8-MX_TIM15_Init-TIM15-false-HAL-true,9-MX_TIM16_Init-TIM16-false-HAL-true,10-MX_TIM17_Init-TIM17-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_RTC_Init-RTC-false-HAL-true,5-MX_SPI1_Init-SPI1-false-HAL-true,6-MX_SPI2_Init-SPI2-false-HAL-true,7-MX_SPI3_Init-SPI3-false-HAL-true,8-MX_TIM15_Init-TIM15-false-HAL-true,9-MX_TIM16_Init-TIM16-false-HAL-true,10-MX_TIM17_Init-TIM17-false-HAL-true,11-MX_ADC1_Init-ADC1-false-HAL-true,12-MX_ADC2_Init-ADC2-false-HAL-true,13-MX_ADC3_Init-ADC3-false-HAL-true VP_RTC_VS_RTC_Activate.Mode=RTC_Enabled RCC.RTCFreq_Value=32768 RCC.USART2Freq_Value=80000000 PC15-OSC32_OUT\ (PC15).Mode=LSE-External-Oscillator +ADC3.Channel-0\#ChannelRegularConversion=ADC_CHANNEL_3 PinOutPanel.RotationAngle=0 RCC.MCO1PinFreq_Value=80000000 RCC.SYSCLKSource=RCC_SYSCLKSOURCE_PLLCLK @@ -31,56 +34,66 @@ PC14-OSC32_IN\ (PC14).Mode=LSE-External-Oscillator PA14\ (JTCK-SWCLK).Signal=SYS_JTCK-SWCLK RCC.I2C3Freq_Value=80000000 RCC.LPTIM1Freq_Value=80000000 -Mcu.IP4=SPI2 +Mcu.IP4=RCC RCC.FCLKCortexFreq_Value=80000000 -Mcu.IP5=SPI3 +Mcu.IP5=RTC +Mcu.IP2=ADC3 NVIC.SVCall_IRQn=true\:0\:0\:false\:false\:true\:false\:false -Mcu.IP2=RTC -Mcu.IP3=SPI1 -Mcu.IP0=NVIC -Mcu.IP1=RCC +Mcu.IP3=NVIC +Mcu.IP0=ADC1 +Mcu.IP1=ADC2 Mcu.UserConstants= RCC.VCOSAI1OutputFreq_Value=128000000 RCC.SDMMCFreq_Value=64000000 Mcu.ThirdPartyNb=0 SPI1.Direction=SPI_DIRECTION_2LINES RCC.HCLKFreq_Value=80000000 -Mcu.IPNb=11 +SH.ADCx_IN3.0=ADC3_IN3,IN3-Single-Ended +Mcu.IPNb=14 ProjectManager.PreviousToolchain= RCC.APB2TimFreq_Value=80000000 SPI1.CalculateBaudRate=40.0 MBits/s +SH.ADCx_IN3.ConfNb=1 PC3.Signal=SPI2_MOSI -Mcu.Pin6=PA5 +Mcu.Pin6=PA2 RCC.SAI2Freq_Value=18285714.285714287 -Mcu.Pin7=PA6 -Mcu.Pin8=PA7 -Mcu.Pin9=PB10 +Mcu.Pin7=PA3 +Mcu.Pin8=PA5 +Mcu.Pin9=PA6 RCC.AHBFreq_Value=80000000 Mcu.Pin0=PC14-OSC32_IN (PC14) Mcu.Pin1=PC15-OSC32_OUT (PC15) -Mcu.Pin2=PC2 -Mcu.Pin3=PC3 +Mcu.Pin2=PC0 +Mcu.Pin3=PC1 RCC.USART3Freq_Value=80000000 -Mcu.Pin4=PA2 -Mcu.Pin5=PA3 +Mcu.Pin4=PC2 +Mcu.Pin5=PC3 +ADC1.Channel-0\#ChannelRegularConversion=ADC_CHANNEL_1 ProjectManager.ProjectBuild=false RCC.HSE_VALUE=8000000 NVIC.UsageFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false NVIC.DebugMonitor_IRQn=true\:0\:0\:false\:false\:true\:false\:false -Mcu.IP10=USART2 +Mcu.IP10=TIM15 USART2.VirtualMode-Asynchronous=VM_ASYNC -RCC.RTCClockSelection=RCC_RTCCLKSOURCE_LSE NVIC.SysTick_IRQn=true\:0\:0\:false\:false\:true\:false\:true +RCC.RTCClockSelection=RCC_RTCCLKSOURCE_LSE +Mcu.IP12=TIM17 +Mcu.IP11=TIM16 ProjectManager.FirmwarePackage=STM32Cube FW_L4 V1.15.1 MxDb.Version=DB.5.0.60 +Mcu.IP13=USART2 ProjectManager.BackupPrevious=false RCC.VCOInputFreq_Value=16000000 +SH.ADCx_IN1.ConfNb=1 +PB14.Mode=Full_Duplex_Master File.Version=6 SPI2.CalculateBaudRate=40.0 MBits/s +ADC3.IPParameters=Rank-0\#ChannelRegularConversion,Channel-0\#ChannelRegularConversion,SamplingTime-0\#ChannelRegularConversion,OffsetNumber-0\#ChannelRegularConversion,NbrOfConversionFlag RCC.PLLRCLKFreq_Value=80000000 NVIC.PendSV_IRQn=true\:0\:0\:false\:false\:true\:false\:false VP_TIM15_VS_ClockSourceINT.Signal=TIM15_VS_ClockSourceINT ProjectManager.HalAssertFull=false +ADC1.SamplingTime-0\#ChannelRegularConversion=ADC_SAMPLETIME_2CYCLES_5 ProjectManager.ProjectName=CubeMX_Config Mcu.Package=LQFP64 PA6.Signal=SPI1_MISO @@ -89,15 +102,20 @@ SPI3.Mode=SPI_MODE_MASTER ProjectManager.ToolChainLocation= RCC.LSI_VALUE=32000 VP_SYS_VS_Systick.Signal=SYS_VS_Systick +ADC3.Rank-0\#ChannelRegularConversion=1 RCC.LSCOPinFreq_Value=32000 +ADC2.SamplingTime-0\#ChannelRegularConversion=ADC_SAMPLETIME_2CYCLES_5 RCC.DFSDMFreq_Value=80000000 PC11.Mode=Full_Duplex_Master +ADC3.OffsetNumber-0\#ChannelRegularConversion=ADC_OFFSET_NONE +SH.ADCx_IN1.0=ADC1_IN1,IN1-Single-Ended RCC.PLLPoutputFreq_Value=22857142.85714286 RCC.APB1TimFreq_Value=80000000 NVIC.BusFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false RCC.LPUART1Freq_Value=80000000 SPI3.IPParameters=VirtualType,Mode,Direction,CalculateBaudRate SPI2.Direction=SPI_DIRECTION_2LINES +ADC2.Rank-0\#ChannelRegularConversion=1 PA13\ (JTMS-SWDIO).Signal=SYS_JTMS-SWDIO ProjectManager.CustomerFirmwarePackage= PA3.Signal=USART2_RX @@ -108,30 +126,37 @@ RCC.PLLSourceVirtual=RCC_PLLSOURCE_HSI PA14\ (JTCK-SWCLK).Mode=Serial_Wire RCC.PLLQoutputFreq_Value=80000000 ProjectManager.ProjectFileName=CubeMX_Config.ioc +ADC1.Rank-0\#ChannelRegularConversion=1 PA7.Mode=Full_Duplex_Master -Mcu.PinsNb=20 +Mcu.PinsNb=23 ProjectManager.NoMain=false SPI1.IPParameters=VirtualType,Mode,Direction,CalculateBaudRate +ADC1.IPParameters=Rank-0\#ChannelRegularConversion,Channel-0\#ChannelRegularConversion,SamplingTime-0\#ChannelRegularConversion,OffsetNumber-0\#ChannelRegularConversion,NbrOfConversionFlag,master +ADC1.OffsetNumber-0\#ChannelRegularConversion=ADC_OFFSET_NONE PC11.Signal=SPI3_MISO RCC.SWPMI1Freq_Value=80000000 -PC2.Signal=SPI2_MISO +PC2.Signal=ADCx_IN3 PC10.Mode=Full_Duplex_Master ProjectManager.DefaultFWLocation=true -PC2.Mode=Full_Duplex_Master PC15-OSC32_OUT\ (PC15).Signal=RCC_OSC32_OUT VP_TIM16_VS_ClockSourceINT.Mode=Enable_Timer ProjectManager.DeletePrevious=true +PC0.Signal=ADCx_IN1 RCC.VCOSAI2OutputFreq_Value=128000000 VP_TIM17_VS_ClockSourceINT.Signal=TIM17_VS_ClockSourceINT RCC.FamilyName=M PA3.Mode=Asynchronous +ADC3.SamplingTime-0\#ChannelRegularConversion=ADC_SAMPLETIME_2CYCLES_5 ProjectManager.TargetToolchain=MDK-ARM V5 +ADC2.IPParameters=Rank-0\#ChannelRegularConversion,Channel-0\#ChannelRegularConversion,SamplingTime-0\#ChannelRegularConversion,OffsetNumber-0\#ChannelRegularConversion,NbrOfConversionFlag SPI2.IPParameters=VirtualType,Mode,Direction,CalculateBaudRate RCC.USBFreq_Value=64000000 RCC.PLLSAI1PoutputFreq_Value=18285714.285714287 PB10.Signal=SPI2_SCK +PB14.Signal=SPI2_MISO RCC.PLLSAI2RoutputFreq_Value=64000000 PA5.Signal=SPI1_SCK +ADC2.OffsetNumber-0\#ChannelRegularConversion=ADC_OFFSET_NONE PC12.Mode=Full_Duplex_Master board=custom RCC.VCOOutputFreq_Value=160000000 @@ -144,6 +169,7 @@ RCC.I2C1Freq_Value=80000000 SPI1.Mode=SPI_MODE_MASTER RCC.LCDFreq_Value=32768 RCC.RNGFreq_Value=64000000 +SH.ADCx_IN2.ConfNb=1 RCC.PLLSAI1QoutputFreq_Value=64000000 RCC.ADCFreq_Value=64000000 VP_SYS_VS_Systick.Mode=SysTick @@ -157,13 +183,18 @@ Mcu.Name=STM32L476R(C-E-G)Tx RCC.LPTIM2Freq_Value=80000000 PA2.Signal=USART2_TX ProjectManager.UnderRoot=false -Mcu.IP8=TIM16 -Mcu.IP9=TIM17 -Mcu.IP6=SYS -Mcu.IP7=TIM15 +Mcu.IP8=SPI3 +Mcu.IP9=SYS +Mcu.IP6=SPI1 +Mcu.IP7=SPI2 ProjectManager.CoupleFile=false PA13\ (JTMS-SWDIO).Mode=Serial_Wire RCC.SYSCLKFreq_VALUE=80000000 +Mcu.Pin22=VP_TIM17_VS_ClockSourceINT +Mcu.Pin20=VP_TIM15_VS_ClockSourceINT +ADC1.master=1 +Mcu.Pin21=VP_TIM16_VS_ClockSourceINT +ADC2.NbrOfConversionFlag=1 RCC.PLLSAI2PoutputFreq_Value=18285714.285714287 NVIC.ForceEnableDMAVector=true KeepUserPlacement=false @@ -172,25 +203,28 @@ NVIC.MemoryManagement_IRQn=true\:0\:0\:false\:false\:true\:false\:false ProjectManager.CompilerOptimize=6 VP_TIM15_VS_ClockSourceINT.Mode=Internal ProjectManager.HeapSize=0x200 -Mcu.Pin15=VP_RTC_VS_RTC_Activate +Mcu.Pin15=PC10 NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false -Mcu.Pin16=VP_SYS_VS_Systick -Mcu.Pin13=PC11 -Mcu.Pin14=PC12 -Mcu.Pin19=VP_TIM17_VS_ClockSourceINT +Mcu.Pin16=PC11 +Mcu.Pin13=PA13 (JTMS-SWDIO) +Mcu.Pin14=PA14 (JTCK-SWCLK) +Mcu.Pin19=VP_SYS_VS_Systick ProjectManager.ComputerToolchain=false -Mcu.Pin17=VP_TIM15_VS_ClockSourceINT +Mcu.Pin17=PC12 RCC.HSI_VALUE=16000000 -Mcu.Pin18=VP_TIM16_VS_ClockSourceINT +Mcu.Pin18=VP_RTC_VS_RTC_Activate NVIC.PriorityGroup=NVIC_PRIORITYGROUP_4 -Mcu.Pin11=PA14 (JTCK-SWCLK) -Mcu.Pin12=PC10 +ADC1.NbrOfConversionFlag=1 +Mcu.Pin11=PB10 +Mcu.Pin12=PB14 RCC.PLLN=10 -Mcu.Pin10=PA13 (JTMS-SWDIO) +Mcu.Pin10=PA7 PA2.Mode=Asynchronous RCC.PWRFreq_Value=80000000 RCC.I2C2Freq_Value=80000000 RCC.APB1Freq_Value=80000000 +ADC3.NbrOfConversionFlag=1 ProjectManager.DeviceId=STM32L476RGTx +PC1.Signal=ADCx_IN2 ProjectManager.LibraryCopy=2 PA7.Signal=SPI1_MOSI diff --git a/bsp/stm32/stm32l476-st-nucleo/board/CubeMX_Config/Inc/stm32l4xx_hal_conf.h b/bsp/stm32/stm32l476-st-nucleo/board/CubeMX_Config/Inc/stm32l4xx_hal_conf.h index 7bc76c2ef0..3ac612f021 100644 --- a/bsp/stm32/stm32l476-st-nucleo/board/CubeMX_Config/Inc/stm32l4xx_hal_conf.h +++ b/bsp/stm32/stm32l476-st-nucleo/board/CubeMX_Config/Inc/stm32l4xx_hal_conf.h @@ -49,7 +49,7 @@ */ #define HAL_MODULE_ENABLED -/*#define HAL_ADC_MODULE_ENABLED */ +#define HAL_ADC_MODULE_ENABLED /*#define HAL_CRYP_MODULE_ENABLED */ /*#define HAL_CAN_MODULE_ENABLED */ /*#define HAL_COMP_MODULE_ENABLED */ diff --git a/bsp/stm32/stm32l476-st-nucleo/board/CubeMX_Config/Src/main.c b/bsp/stm32/stm32l476-st-nucleo/board/CubeMX_Config/Src/main.c index 4db5dd9f5a..c1ad2fd6ec 100644 --- a/bsp/stm32/stm32l476-st-nucleo/board/CubeMX_Config/Src/main.c +++ b/bsp/stm32/stm32l476-st-nucleo/board/CubeMX_Config/Src/main.c @@ -62,6 +62,10 @@ /* USER CODE END PM */ /* Private variables ---------------------------------------------------------*/ +ADC_HandleTypeDef hadc1; +ADC_HandleTypeDef hadc2; +ADC_HandleTypeDef hadc3; + RTC_HandleTypeDef hrtc; SPI_HandleTypeDef hspi1; @@ -90,6 +94,9 @@ static void MX_SPI3_Init(void); static void MX_TIM15_Init(void); static void MX_TIM16_Init(void); static void MX_TIM17_Init(void); +static void MX_ADC1_Init(void); +static void MX_ADC2_Init(void); +static void MX_ADC3_Init(void); /* USER CODE BEGIN PFP */ /* Private function prototypes -----------------------------------------------*/ @@ -136,6 +143,9 @@ int main(void) MX_TIM15_Init(); MX_TIM16_Init(); MX_TIM17_Init(); + MX_ADC1_Init(); + MX_ADC2_Init(); + MX_ADC3_Init(); /* USER CODE BEGIN 2 */ /* USER CODE END 2 */ @@ -197,9 +207,18 @@ void SystemClock_Config(void) { Error_Handler(); } - PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_RTC|RCC_PERIPHCLK_USART2; + PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_RTC|RCC_PERIPHCLK_USART2 + |RCC_PERIPHCLK_ADC; PeriphClkInit.Usart2ClockSelection = RCC_USART2CLKSOURCE_PCLK1; + PeriphClkInit.AdcClockSelection = RCC_ADCCLKSOURCE_PLLSAI1; PeriphClkInit.RTCClockSelection = RCC_RTCCLKSOURCE_LSE; + PeriphClkInit.PLLSAI1.PLLSAI1Source = RCC_PLLSOURCE_HSI; + PeriphClkInit.PLLSAI1.PLLSAI1M = 1; + PeriphClkInit.PLLSAI1.PLLSAI1N = 8; + PeriphClkInit.PLLSAI1.PLLSAI1P = RCC_PLLP_DIV7; + PeriphClkInit.PLLSAI1.PLLSAI1Q = RCC_PLLQ_DIV2; + PeriphClkInit.PLLSAI1.PLLSAI1R = RCC_PLLR_DIV2; + PeriphClkInit.PLLSAI1.PLLSAI1ClockOut = RCC_PLLSAI1_ADC1CLK; if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInit) != HAL_OK) { Error_Handler(); @@ -212,6 +231,185 @@ void SystemClock_Config(void) } } +/** + * @brief ADC1 Initialization Function + * @param None + * @retval None + */ +static void MX_ADC1_Init(void) +{ + + /* USER CODE BEGIN ADC1_Init 0 */ + + /* USER CODE END ADC1_Init 0 */ + + ADC_MultiModeTypeDef multimode = {0}; + ADC_ChannelConfTypeDef sConfig = {0}; + + /* USER CODE BEGIN ADC1_Init 1 */ + + /* USER CODE END ADC1_Init 1 */ + /** Common config + */ + hadc1.Instance = ADC1; + hadc1.Init.ClockPrescaler = ADC_CLOCK_ASYNC_DIV1; + hadc1.Init.Resolution = ADC_RESOLUTION_12B; + hadc1.Init.DataAlign = ADC_DATAALIGN_RIGHT; + hadc1.Init.ScanConvMode = ADC_SCAN_DISABLE; + hadc1.Init.EOCSelection = ADC_EOC_SINGLE_CONV; + hadc1.Init.LowPowerAutoWait = DISABLE; + hadc1.Init.ContinuousConvMode = DISABLE; + hadc1.Init.NbrOfConversion = 1; + hadc1.Init.DiscontinuousConvMode = DISABLE; + hadc1.Init.NbrOfDiscConversion = 1; + hadc1.Init.ExternalTrigConv = ADC_SOFTWARE_START; + hadc1.Init.ExternalTrigConvEdge = ADC_EXTERNALTRIGCONVEDGE_NONE; + hadc1.Init.DMAContinuousRequests = DISABLE; + hadc1.Init.Overrun = ADC_OVR_DATA_PRESERVED; + hadc1.Init.OversamplingMode = DISABLE; + if (HAL_ADC_Init(&hadc1) != HAL_OK) + { + Error_Handler(); + } + /** Configure the ADC multi-mode + */ + multimode.Mode = ADC_MODE_INDEPENDENT; + if (HAL_ADCEx_MultiModeConfigChannel(&hadc1, &multimode) != HAL_OK) + { + Error_Handler(); + } + /** Configure Regular Channel + */ + sConfig.Channel = ADC_CHANNEL_1; + sConfig.Rank = ADC_REGULAR_RANK_1; + sConfig.SamplingTime = ADC_SAMPLETIME_2CYCLES_5; + sConfig.SingleDiff = ADC_SINGLE_ENDED; + sConfig.OffsetNumber = ADC_OFFSET_NONE; + sConfig.Offset = 0; + if (HAL_ADC_ConfigChannel(&hadc1, &sConfig) != HAL_OK) + { + Error_Handler(); + } + /* USER CODE BEGIN ADC1_Init 2 */ + + /* USER CODE END ADC1_Init 2 */ + +} + +/** + * @brief ADC2 Initialization Function + * @param None + * @retval None + */ +static void MX_ADC2_Init(void) +{ + + /* USER CODE BEGIN ADC2_Init 0 */ + + /* USER CODE END ADC2_Init 0 */ + + ADC_ChannelConfTypeDef sConfig = {0}; + + /* USER CODE BEGIN ADC2_Init 1 */ + + /* USER CODE END ADC2_Init 1 */ + /** Common config + */ + hadc2.Instance = ADC2; + hadc2.Init.ClockPrescaler = ADC_CLOCK_ASYNC_DIV1; + hadc2.Init.Resolution = ADC_RESOLUTION_12B; + hadc2.Init.DataAlign = ADC_DATAALIGN_RIGHT; + hadc2.Init.ScanConvMode = ADC_SCAN_DISABLE; + hadc2.Init.EOCSelection = ADC_EOC_SINGLE_CONV; + hadc2.Init.LowPowerAutoWait = DISABLE; + hadc2.Init.ContinuousConvMode = DISABLE; + hadc2.Init.NbrOfConversion = 1; + hadc2.Init.DiscontinuousConvMode = DISABLE; + hadc2.Init.NbrOfDiscConversion = 1; + hadc2.Init.ExternalTrigConv = ADC_SOFTWARE_START; + hadc2.Init.ExternalTrigConvEdge = ADC_EXTERNALTRIGCONVEDGE_NONE; + hadc2.Init.DMAContinuousRequests = DISABLE; + hadc2.Init.Overrun = ADC_OVR_DATA_PRESERVED; + hadc2.Init.OversamplingMode = DISABLE; + if (HAL_ADC_Init(&hadc2) != HAL_OK) + { + Error_Handler(); + } + /** Configure Regular Channel + */ + sConfig.Channel = ADC_CHANNEL_2; + sConfig.Rank = ADC_REGULAR_RANK_1; + sConfig.SamplingTime = ADC_SAMPLETIME_2CYCLES_5; + sConfig.SingleDiff = ADC_SINGLE_ENDED; + sConfig.OffsetNumber = ADC_OFFSET_NONE; + sConfig.Offset = 0; + if (HAL_ADC_ConfigChannel(&hadc2, &sConfig) != HAL_OK) + { + Error_Handler(); + } + /* USER CODE BEGIN ADC2_Init 2 */ + + /* USER CODE END ADC2_Init 2 */ + +} + +/** + * @brief ADC3 Initialization Function + * @param None + * @retval None + */ +static void MX_ADC3_Init(void) +{ + + /* USER CODE BEGIN ADC3_Init 0 */ + + /* USER CODE END ADC3_Init 0 */ + + ADC_ChannelConfTypeDef sConfig = {0}; + + /* USER CODE BEGIN ADC3_Init 1 */ + + /* USER CODE END ADC3_Init 1 */ + /** Common config + */ + hadc3.Instance = ADC3; + hadc3.Init.ClockPrescaler = ADC_CLOCK_ASYNC_DIV1; + hadc3.Init.Resolution = ADC_RESOLUTION_12B; + hadc3.Init.DataAlign = ADC_DATAALIGN_RIGHT; + hadc3.Init.ScanConvMode = ADC_SCAN_DISABLE; + hadc3.Init.EOCSelection = ADC_EOC_SINGLE_CONV; + hadc3.Init.LowPowerAutoWait = DISABLE; + hadc3.Init.ContinuousConvMode = DISABLE; + hadc3.Init.NbrOfConversion = 1; + hadc3.Init.DiscontinuousConvMode = DISABLE; + hadc3.Init.NbrOfDiscConversion = 1; + hadc3.Init.ExternalTrigConv = ADC_SOFTWARE_START; + hadc3.Init.ExternalTrigConvEdge = ADC_EXTERNALTRIGCONVEDGE_NONE; + hadc3.Init.DMAContinuousRequests = DISABLE; + hadc3.Init.Overrun = ADC_OVR_DATA_PRESERVED; + hadc3.Init.OversamplingMode = DISABLE; + if (HAL_ADC_Init(&hadc3) != HAL_OK) + { + Error_Handler(); + } + /** Configure Regular Channel + */ + sConfig.Channel = ADC_CHANNEL_3; + sConfig.Rank = ADC_REGULAR_RANK_1; + sConfig.SamplingTime = ADC_SAMPLETIME_2CYCLES_5; + sConfig.SingleDiff = ADC_SINGLE_ENDED; + sConfig.OffsetNumber = ADC_OFFSET_NONE; + sConfig.Offset = 0; + if (HAL_ADC_ConfigChannel(&hadc3, &sConfig) != HAL_OK) + { + Error_Handler(); + } + /* USER CODE BEGIN ADC3_Init 2 */ + + /* USER CODE END ADC3_Init 2 */ + +} + /** * @brief RTC Initialization Function * @param None diff --git a/bsp/stm32/stm32l476-st-nucleo/board/CubeMX_Config/Src/stm32l4xx_hal_msp.c b/bsp/stm32/stm32l476-st-nucleo/board/CubeMX_Config/Src/stm32l4xx_hal_msp.c index 4a2fc078b1..5f50279125 100644 --- a/bsp/stm32/stm32l476-st-nucleo/board/CubeMX_Config/Src/stm32l4xx_hal_msp.c +++ b/bsp/stm32/stm32l476-st-nucleo/board/CubeMX_Config/Src/stm32l4xx_hal_msp.c @@ -97,6 +97,163 @@ void HAL_MspInit(void) /* USER CODE END MspInit 1 */ } +static uint32_t HAL_RCC_ADC_CLK_ENABLED=0; + +/** +* @brief ADC MSP Initialization +* This function configures the hardware resources used in this example +* @param hadc: ADC handle pointer +* @retval None +*/ +void HAL_ADC_MspInit(ADC_HandleTypeDef* hadc) +{ + GPIO_InitTypeDef GPIO_InitStruct = {0}; + if(hadc->Instance==ADC1) + { + /* USER CODE BEGIN ADC1_MspInit 0 */ + + /* USER CODE END ADC1_MspInit 0 */ + /* Peripheral clock enable */ + HAL_RCC_ADC_CLK_ENABLED++; + if(HAL_RCC_ADC_CLK_ENABLED==1){ + __HAL_RCC_ADC_CLK_ENABLE(); + } + + __HAL_RCC_GPIOC_CLK_ENABLE(); + /**ADC1 GPIO Configuration + PC0 ------> ADC1_IN1 + */ + GPIO_InitStruct.Pin = GPIO_PIN_0; + GPIO_InitStruct.Mode = GPIO_MODE_ANALOG_ADC_CONTROL; + GPIO_InitStruct.Pull = GPIO_NOPULL; + HAL_GPIO_Init(GPIOC, &GPIO_InitStruct); + + /* USER CODE BEGIN ADC1_MspInit 1 */ + + /* USER CODE END ADC1_MspInit 1 */ + } + else if(hadc->Instance==ADC2) + { + /* USER CODE BEGIN ADC2_MspInit 0 */ + + /* USER CODE END ADC2_MspInit 0 */ + /* Peripheral clock enable */ + HAL_RCC_ADC_CLK_ENABLED++; + if(HAL_RCC_ADC_CLK_ENABLED==1){ + __HAL_RCC_ADC_CLK_ENABLE(); + } + + __HAL_RCC_GPIOC_CLK_ENABLE(); + /**ADC2 GPIO Configuration + PC1 ------> ADC2_IN2 + */ + GPIO_InitStruct.Pin = GPIO_PIN_1; + GPIO_InitStruct.Mode = GPIO_MODE_ANALOG_ADC_CONTROL; + GPIO_InitStruct.Pull = GPIO_NOPULL; + HAL_GPIO_Init(GPIOC, &GPIO_InitStruct); + + /* USER CODE BEGIN ADC2_MspInit 1 */ + + /* USER CODE END ADC2_MspInit 1 */ + } + else if(hadc->Instance==ADC3) + { + /* USER CODE BEGIN ADC3_MspInit 0 */ + + /* USER CODE END ADC3_MspInit 0 */ + /* Peripheral clock enable */ + HAL_RCC_ADC_CLK_ENABLED++; + if(HAL_RCC_ADC_CLK_ENABLED==1){ + __HAL_RCC_ADC_CLK_ENABLE(); + } + + __HAL_RCC_GPIOC_CLK_ENABLE(); + /**ADC3 GPIO Configuration + PC2 ------> ADC3_IN3 + */ + GPIO_InitStruct.Pin = GPIO_PIN_2; + GPIO_InitStruct.Mode = GPIO_MODE_ANALOG_ADC_CONTROL; + GPIO_InitStruct.Pull = GPIO_NOPULL; + HAL_GPIO_Init(GPIOC, &GPIO_InitStruct); + + /* USER CODE BEGIN ADC3_MspInit 1 */ + + /* USER CODE END ADC3_MspInit 1 */ + } + +} + +/** +* @brief ADC MSP De-Initialization +* This function freeze the hardware resources used in this example +* @param hadc: ADC handle pointer +* @retval None +*/ +void HAL_ADC_MspDeInit(ADC_HandleTypeDef* hadc) +{ + if(hadc->Instance==ADC1) + { + /* USER CODE BEGIN ADC1_MspDeInit 0 */ + + /* USER CODE END ADC1_MspDeInit 0 */ + /* Peripheral clock disable */ + HAL_RCC_ADC_CLK_ENABLED--; + if(HAL_RCC_ADC_CLK_ENABLED==0){ + __HAL_RCC_ADC_CLK_DISABLE(); + } + + /**ADC1 GPIO Configuration + PC0 ------> ADC1_IN1 + */ + HAL_GPIO_DeInit(GPIOC, GPIO_PIN_0); + + /* USER CODE BEGIN ADC1_MspDeInit 1 */ + + /* USER CODE END ADC1_MspDeInit 1 */ + } + else if(hadc->Instance==ADC2) + { + /* USER CODE BEGIN ADC2_MspDeInit 0 */ + + /* USER CODE END ADC2_MspDeInit 0 */ + /* Peripheral clock disable */ + HAL_RCC_ADC_CLK_ENABLED--; + if(HAL_RCC_ADC_CLK_ENABLED==0){ + __HAL_RCC_ADC_CLK_DISABLE(); + } + + /**ADC2 GPIO Configuration + PC1 ------> ADC2_IN2 + */ + HAL_GPIO_DeInit(GPIOC, GPIO_PIN_1); + + /* USER CODE BEGIN ADC2_MspDeInit 1 */ + + /* USER CODE END ADC2_MspDeInit 1 */ + } + else if(hadc->Instance==ADC3) + { + /* USER CODE BEGIN ADC3_MspDeInit 0 */ + + /* USER CODE END ADC3_MspDeInit 0 */ + /* Peripheral clock disable */ + HAL_RCC_ADC_CLK_ENABLED--; + if(HAL_RCC_ADC_CLK_ENABLED==0){ + __HAL_RCC_ADC_CLK_DISABLE(); + } + + /**ADC3 GPIO Configuration + PC2 ------> ADC3_IN3 + */ + HAL_GPIO_DeInit(GPIOC, GPIO_PIN_2); + + /* USER CODE BEGIN ADC3_MspDeInit 1 */ + + /* USER CODE END ADC3_MspDeInit 1 */ + } + +} + /** * @brief RTC MSP Initialization * This function configures the hardware resources used in this example @@ -186,18 +343,18 @@ void HAL_SPI_MspInit(SPI_HandleTypeDef* hspi) __HAL_RCC_GPIOC_CLK_ENABLE(); __HAL_RCC_GPIOB_CLK_ENABLE(); /**SPI2 GPIO Configuration - PC2 ------> SPI2_MISO PC3 ------> SPI2_MOSI - PB10 ------> SPI2_SCK + PB10 ------> SPI2_SCK + PB14 ------> SPI2_MISO */ - GPIO_InitStruct.Pin = GPIO_PIN_2|GPIO_PIN_3; + GPIO_InitStruct.Pin = GPIO_PIN_3; GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; GPIO_InitStruct.Pull = GPIO_NOPULL; GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; GPIO_InitStruct.Alternate = GPIO_AF5_SPI2; HAL_GPIO_Init(GPIOC, &GPIO_InitStruct); - GPIO_InitStruct.Pin = GPIO_PIN_10; + GPIO_InitStruct.Pin = GPIO_PIN_10|GPIO_PIN_14; GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; GPIO_InitStruct.Pull = GPIO_NOPULL; GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; @@ -272,13 +429,13 @@ void HAL_SPI_MspDeInit(SPI_HandleTypeDef* hspi) __HAL_RCC_SPI2_CLK_DISABLE(); /**SPI2 GPIO Configuration - PC2 ------> SPI2_MISO PC3 ------> SPI2_MOSI - PB10 ------> SPI2_SCK + PB10 ------> SPI2_SCK + PB14 ------> SPI2_MISO */ - HAL_GPIO_DeInit(GPIOC, GPIO_PIN_2|GPIO_PIN_3); + HAL_GPIO_DeInit(GPIOC, GPIO_PIN_3); - HAL_GPIO_DeInit(GPIOB, GPIO_PIN_10); + HAL_GPIO_DeInit(GPIOB, GPIO_PIN_10|GPIO_PIN_14); /* USER CODE BEGIN SPI2_MspDeInit 1 */ diff --git a/bsp/stm32/stm32l476-st-nucleo/board/Kconfig b/bsp/stm32/stm32l476-st-nucleo/board/Kconfig index 4ecb1a6e42..687ad3a85e 100644 --- a/bsp/stm32/stm32l476-st-nucleo/board/Kconfig +++ b/bsp/stm32/stm32l476-st-nucleo/board/Kconfig @@ -166,6 +166,14 @@ menu "On-chip Peripheral Drivers" config BSP_USING_ADC1 bool "Enable ADC1" default n + + config BSP_USING_ADC2 + bool "Enable ADC2" + default n + + config BSP_USING_ADC3 + bool "Enable ADC3" + default n endif menuconfig BSP_USING_ONCHIP_RTC From c8e7093ee66bbd5008a94c8da9916a27fb20f297 Mon Sep 17 00:00:00 2001 From: NU-LL <1125934312@qq.com> Date: Thu, 7 May 2020 12:39:24 +0800 Subject: [PATCH 4/4] Fix LPTIM error --- .../board/CubeMX_Config/.mxproject | 4 +- .../board/CubeMX_Config/CubeMX_Config.ioc | 42 ++++++++++-------- .../CubeMX_Config/Inc/stm32l4xx_hal_conf.h | 2 +- .../board/CubeMX_Config/Src/main.c | 41 ++++++++++++++++- .../CubeMX_Config/Src/stm32l4xx_hal_msp.c | 44 +++++++++++++++++++ 5 files changed, 110 insertions(+), 23 deletions(-) diff --git a/bsp/stm32/stm32l476-st-nucleo/board/CubeMX_Config/.mxproject b/bsp/stm32/stm32l476-st-nucleo/board/CubeMX_Config/.mxproject index 0160a9c929..838bcf2aa4 100644 --- a/bsp/stm32/stm32l476-st-nucleo/board/CubeMX_Config/.mxproject +++ b/bsp/stm32/stm32l476-st-nucleo/board/CubeMX_Config/.mxproject @@ -5,10 +5,10 @@ SourcePath=G:/1 Code/rt-thread/bsp/stm32/stm32l476-st-nucleo/board/CubeMX_Config SourceFiles=stm32l4xx_it.c;stm32l4xx_hal_msp.c;main.c; [PreviousLibFiles] -LibFiles=Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_adc.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_adc.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_adc_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal.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/Inc/stm32l4xx_hal_exti.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_spi.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_spi_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_tim.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/Src/stm32l4xx_hal_adc.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_adc_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/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_exti.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_spi.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_spi_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/Inc/stm32l4xx_hal_adc.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_adc.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_adc_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal.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/Inc/stm32l4xx_hal_exti.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_spi.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_spi_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_tim.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/CMSIS/Device/ST/STM32L4xx/Include/stm32l476xx.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/cmsis_armcc.h;Drivers/CMSIS/Include/cmsis_armclang.h;Drivers/CMSIS/Include/cmsis_compiler.h;Drivers/CMSIS/Include/cmsis_gcc.h;Drivers/CMSIS/Include/cmsis_iccarm.h;Drivers/CMSIS/Include/cmsis_version.h;Drivers/CMSIS/Include/core_armv8mbl.h;Drivers/CMSIS/Include/core_armv8mml.h;Drivers/CMSIS/Include/core_cm0.h;Drivers/CMSIS/Include/core_cm0plus.h;Drivers/CMSIS/Include/core_cm1.h;Drivers/CMSIS/Include/core_cm23.h;Drivers/CMSIS/Include/core_cm3.h;Drivers/CMSIS/Include/core_cm33.h;Drivers/CMSIS/Include/core_cm4.h;Drivers/CMSIS/Include/core_cm7.h;Drivers/CMSIS/Include/core_sc000.h;Drivers/CMSIS/Include/core_sc300.h;Drivers/CMSIS/Include/mpu_armv7.h;Drivers/CMSIS/Include/mpu_armv8.h;Drivers/CMSIS/Include/tz_context.h; +LibFiles=Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_adc.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_adc.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_adc_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal.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/Inc/stm32l4xx_hal_exti.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_lptim.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_spi.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_spi_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_tim.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/Src/stm32l4xx_hal_adc.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_adc_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/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_exti.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_lptim.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_spi.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_spi_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/Inc/stm32l4xx_hal_adc.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_adc.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_adc_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal.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/Inc/stm32l4xx_hal_exti.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_lptim.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_spi.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_spi_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_tim.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/CMSIS/Device/ST/STM32L4xx/Include/stm32l476xx.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/cmsis_armcc.h;Drivers/CMSIS/Include/cmsis_armclang.h;Drivers/CMSIS/Include/cmsis_compiler.h;Drivers/CMSIS/Include/cmsis_gcc.h;Drivers/CMSIS/Include/cmsis_iccarm.h;Drivers/CMSIS/Include/cmsis_version.h;Drivers/CMSIS/Include/core_armv8mbl.h;Drivers/CMSIS/Include/core_armv8mml.h;Drivers/CMSIS/Include/core_cm0.h;Drivers/CMSIS/Include/core_cm0plus.h;Drivers/CMSIS/Include/core_cm1.h;Drivers/CMSIS/Include/core_cm23.h;Drivers/CMSIS/Include/core_cm3.h;Drivers/CMSIS/Include/core_cm33.h;Drivers/CMSIS/Include/core_cm4.h;Drivers/CMSIS/Include/core_cm7.h;Drivers/CMSIS/Include/core_sc000.h;Drivers/CMSIS/Include/core_sc300.h;Drivers/CMSIS/Include/mpu_armv7.h;Drivers/CMSIS/Include/mpu_armv8.h;Drivers/CMSIS/Include/tz_context.h; [PreviousUsedKeilFiles] -SourceFiles=..\Src\main.c;..\Src\stm32l4xx_it.c;..\Src\stm32l4xx_hal_msp.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_adc.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_adc_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_i2c.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_i2c_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rcc.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rcc_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_flash.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_flash_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_flash_ramfunc.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_gpio.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_dma.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_dma_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_pwr.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_pwr_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_exti.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rtc.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rtc_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_spi.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_spi_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_tim.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_tim_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart_ex.c;..\\Src/system_stm32l4xx.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_adc.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_adc_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_i2c.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_i2c_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rcc.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rcc_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_flash.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_flash_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_flash_ramfunc.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_gpio.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_dma.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_dma_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_pwr.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_pwr_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_exti.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rtc.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rtc_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_spi.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_spi_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_tim.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_tim_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart_ex.c;..\\Src/system_stm32l4xx.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/CMSIS/Device/ST/STM32L4xx/Source/Templates/system_stm32l4xx.c;; +SourceFiles=..\Src\main.c;..\Src\stm32l4xx_it.c;..\Src\stm32l4xx_hal_msp.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_adc.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_adc_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_i2c.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_i2c_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rcc.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rcc_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_flash.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_flash_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_flash_ramfunc.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_gpio.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_dma.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_dma_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_pwr.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_pwr_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_exti.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_lptim.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rtc.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rtc_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_spi.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_spi_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_tim.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_tim_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart_ex.c;..\\Src/system_stm32l4xx.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_adc.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_adc_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_i2c.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_i2c_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rcc.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rcc_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_flash.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_flash_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_flash_ramfunc.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_gpio.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_dma.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_dma_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_pwr.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_pwr_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_exti.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_lptim.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rtc.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rtc_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_spi.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_spi_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_tim.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_tim_ex.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart_ex.c;..\\Src/system_stm32l4xx.c;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers/CMSIS/Device/ST/STM32L4xx/Source/Templates/system_stm32l4xx.c;; HeaderPath=F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers\STM32L4xx_HAL_Driver\Inc;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers\STM32L4xx_HAL_Driver\Inc\Legacy;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers\CMSIS\Device\ST\STM32L4xx\Include;F:\STM32Cube\Repository\STM32Cube_FW_L4_V1.15.1\Drivers\CMSIS\Include;..\Inc; CDefines=USE_HAL_DRIVER;STM32L476xx;USE_HAL_DRIVER;USE_HAL_DRIVER; diff --git a/bsp/stm32/stm32l476-st-nucleo/board/CubeMX_Config/CubeMX_Config.ioc b/bsp/stm32/stm32l476-st-nucleo/board/CubeMX_Config/CubeMX_Config.ioc index 50c89435ba..7d78ad4047 100644 --- a/bsp/stm32/stm32l476-st-nucleo/board/CubeMX_Config/CubeMX_Config.ioc +++ b/bsp/stm32/stm32l476-st-nucleo/board/CubeMX_Config/CubeMX_Config.ioc @@ -20,7 +20,7 @@ SH.ADCx_IN2.0=ADC2_IN2,IN2-Single-Ended PC10.Signal=SPI3_SCK PC12.Signal=SPI3_MOSI RCC.PLLSAI1RoutputFreq_Value=64000000 -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_RTC_Init-RTC-false-HAL-true,5-MX_SPI1_Init-SPI1-false-HAL-true,6-MX_SPI2_Init-SPI2-false-HAL-true,7-MX_SPI3_Init-SPI3-false-HAL-true,8-MX_TIM15_Init-TIM15-false-HAL-true,9-MX_TIM16_Init-TIM16-false-HAL-true,10-MX_TIM17_Init-TIM17-false-HAL-true,11-MX_ADC1_Init-ADC1-false-HAL-true,12-MX_ADC2_Init-ADC2-false-HAL-true,13-MX_ADC3_Init-ADC3-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_RTC_Init-RTC-false-HAL-true,5-MX_SPI1_Init-SPI1-false-HAL-true,6-MX_SPI2_Init-SPI2-false-HAL-true,7-MX_SPI3_Init-SPI3-false-HAL-true,8-MX_TIM15_Init-TIM15-false-HAL-true,9-MX_TIM16_Init-TIM16-false-HAL-true,10-MX_TIM17_Init-TIM17-false-HAL-true,11-MX_ADC1_Init-ADC1-false-HAL-true,12-MX_ADC2_Init-ADC2-false-HAL-true,13-MX_ADC3_Init-ADC3-false-HAL-true,14-MX_LPTIM1_Init-LPTIM1-false-HAL-true VP_RTC_VS_RTC_Activate.Mode=RTC_Enabled RCC.RTCFreq_Value=32768 RCC.USART2Freq_Value=80000000 @@ -34,12 +34,12 @@ PC14-OSC32_IN\ (PC14).Mode=LSE-External-Oscillator PA14\ (JTCK-SWCLK).Signal=SYS_JTCK-SWCLK RCC.I2C3Freq_Value=80000000 RCC.LPTIM1Freq_Value=80000000 -Mcu.IP4=RCC +Mcu.IP4=NVIC +Mcu.IP5=RCC RCC.FCLKCortexFreq_Value=80000000 -Mcu.IP5=RTC Mcu.IP2=ADC3 NVIC.SVCall_IRQn=true\:0\:0\:false\:false\:true\:false\:false -Mcu.IP3=NVIC +Mcu.IP3=LPTIM1 Mcu.IP0=ADC1 Mcu.IP1=ADC2 Mcu.UserConstants= @@ -49,7 +49,7 @@ Mcu.ThirdPartyNb=0 SPI1.Direction=SPI_DIRECTION_2LINES RCC.HCLKFreq_Value=80000000 SH.ADCx_IN3.0=ADC3_IN3,IN3-Single-Ended -Mcu.IPNb=14 +Mcu.IPNb=15 ProjectManager.PreviousToolchain= RCC.APB2TimFreq_Value=80000000 SPI1.CalculateBaudRate=40.0 MBits/s @@ -73,15 +73,16 @@ ProjectManager.ProjectBuild=false RCC.HSE_VALUE=8000000 NVIC.UsageFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false NVIC.DebugMonitor_IRQn=true\:0\:0\:false\:false\:true\:false\:false -Mcu.IP10=TIM15 +Mcu.IP10=SYS USART2.VirtualMode-Asynchronous=VM_ASYNC NVIC.SysTick_IRQn=true\:0\:0\:false\:false\:true\:false\:true RCC.RTCClockSelection=RCC_RTCCLKSOURCE_LSE -Mcu.IP12=TIM17 -Mcu.IP11=TIM16 +Mcu.IP12=TIM16 +Mcu.IP11=TIM15 ProjectManager.FirmwarePackage=STM32Cube FW_L4 V1.15.1 MxDb.Version=DB.5.0.60 -Mcu.IP13=USART2 +Mcu.IP14=USART2 +Mcu.IP13=TIM17 ProjectManager.BackupPrevious=false RCC.VCOInputFreq_Value=16000000 SH.ADCx_IN1.ConfNb=1 @@ -102,6 +103,7 @@ SPI3.Mode=SPI_MODE_MASTER ProjectManager.ToolChainLocation= RCC.LSI_VALUE=32000 VP_SYS_VS_Systick.Signal=SYS_VS_Systick +VP_LPTIM1_VS_LPTIM_counterModeInternalClock.Mode=Counts__internal_clock_event_00 ADC3.Rank-0\#ChannelRegularConversion=1 RCC.LSCOPinFreq_Value=32000 ADC2.SamplingTime-0\#ChannelRegularConversion=ADC_SAMPLETIME_2CYCLES_5 @@ -128,7 +130,7 @@ RCC.PLLQoutputFreq_Value=80000000 ProjectManager.ProjectFileName=CubeMX_Config.ioc ADC1.Rank-0\#ChannelRegularConversion=1 PA7.Mode=Full_Duplex_Master -Mcu.PinsNb=23 +Mcu.PinsNb=24 ProjectManager.NoMain=false SPI1.IPParameters=VirtualType,Mode,Direction,CalculateBaudRate ADC1.IPParameters=Rank-0\#ChannelRegularConversion,Channel-0\#ChannelRegularConversion,SamplingTime-0\#ChannelRegularConversion,OffsetNumber-0\#ChannelRegularConversion,NbrOfConversionFlag,master @@ -183,17 +185,18 @@ Mcu.Name=STM32L476R(C-E-G)Tx RCC.LPTIM2Freq_Value=80000000 PA2.Signal=USART2_TX ProjectManager.UnderRoot=false -Mcu.IP8=SPI3 -Mcu.IP9=SYS -Mcu.IP6=SPI1 -Mcu.IP7=SPI2 +Mcu.IP8=SPI2 +Mcu.IP9=SPI3 +Mcu.IP6=RTC +Mcu.IP7=SPI1 ProjectManager.CoupleFile=false PA13\ (JTMS-SWDIO).Mode=Serial_Wire RCC.SYSCLKFreq_VALUE=80000000 -Mcu.Pin22=VP_TIM17_VS_ClockSourceINT -Mcu.Pin20=VP_TIM15_VS_ClockSourceINT +Mcu.Pin22=VP_TIM16_VS_ClockSourceINT +Mcu.Pin23=VP_TIM17_VS_ClockSourceINT +Mcu.Pin20=VP_SYS_VS_Systick ADC1.master=1 -Mcu.Pin21=VP_TIM16_VS_ClockSourceINT +Mcu.Pin21=VP_TIM15_VS_ClockSourceINT ADC2.NbrOfConversionFlag=1 RCC.PLLSAI2PoutputFreq_Value=18285714.285714287 NVIC.ForceEnableDMAVector=true @@ -208,11 +211,11 @@ NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false Mcu.Pin16=PC11 Mcu.Pin13=PA13 (JTMS-SWDIO) Mcu.Pin14=PA14 (JTCK-SWCLK) -Mcu.Pin19=VP_SYS_VS_Systick +Mcu.Pin19=VP_RTC_VS_RTC_Activate ProjectManager.ComputerToolchain=false Mcu.Pin17=PC12 RCC.HSI_VALUE=16000000 -Mcu.Pin18=VP_RTC_VS_RTC_Activate +Mcu.Pin18=VP_LPTIM1_VS_LPTIM_counterModeInternalClock NVIC.PriorityGroup=NVIC_PRIORITYGROUP_4 ADC1.NbrOfConversionFlag=1 Mcu.Pin11=PB10 @@ -220,6 +223,7 @@ Mcu.Pin12=PB14 RCC.PLLN=10 Mcu.Pin10=PA7 PA2.Mode=Asynchronous +VP_LPTIM1_VS_LPTIM_counterModeInternalClock.Signal=LPTIM1_VS_LPTIM_counterModeInternalClock RCC.PWRFreq_Value=80000000 RCC.I2C2Freq_Value=80000000 RCC.APB1Freq_Value=80000000 diff --git a/bsp/stm32/stm32l476-st-nucleo/board/CubeMX_Config/Inc/stm32l4xx_hal_conf.h b/bsp/stm32/stm32l476-st-nucleo/board/CubeMX_Config/Inc/stm32l4xx_hal_conf.h index 3ac612f021..04047367e9 100644 --- a/bsp/stm32/stm32l476-st-nucleo/board/CubeMX_Config/Inc/stm32l4xx_hal_conf.h +++ b/bsp/stm32/stm32l476-st-nucleo/board/CubeMX_Config/Inc/stm32l4xx_hal_conf.h @@ -69,7 +69,7 @@ /*#define HAL_IWDG_MODULE_ENABLED */ /*#define HAL_LTDC_MODULE_ENABLED */ /*#define HAL_LCD_MODULE_ENABLED */ -/*#define HAL_LPTIM_MODULE_ENABLED */ +#define HAL_LPTIM_MODULE_ENABLED /*#define HAL_MMC_MODULE_ENABLED */ /*#define HAL_NAND_MODULE_ENABLED */ /*#define HAL_NOR_MODULE_ENABLED */ diff --git a/bsp/stm32/stm32l476-st-nucleo/board/CubeMX_Config/Src/main.c b/bsp/stm32/stm32l476-st-nucleo/board/CubeMX_Config/Src/main.c index c1ad2fd6ec..73f4b3f008 100644 --- a/bsp/stm32/stm32l476-st-nucleo/board/CubeMX_Config/Src/main.c +++ b/bsp/stm32/stm32l476-st-nucleo/board/CubeMX_Config/Src/main.c @@ -66,6 +66,8 @@ ADC_HandleTypeDef hadc1; ADC_HandleTypeDef hadc2; ADC_HandleTypeDef hadc3; +LPTIM_HandleTypeDef hlptim1; + RTC_HandleTypeDef hrtc; SPI_HandleTypeDef hspi1; @@ -97,6 +99,7 @@ static void MX_TIM17_Init(void); static void MX_ADC1_Init(void); static void MX_ADC2_Init(void); static void MX_ADC3_Init(void); +static void MX_LPTIM1_Init(void); /* USER CODE BEGIN PFP */ /* Private function prototypes -----------------------------------------------*/ @@ -146,6 +149,7 @@ int main(void) MX_ADC1_Init(); MX_ADC2_Init(); MX_ADC3_Init(); + MX_LPTIM1_Init(); /* USER CODE BEGIN 2 */ /* USER CODE END 2 */ @@ -208,8 +212,9 @@ void SystemClock_Config(void) Error_Handler(); } PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_RTC|RCC_PERIPHCLK_USART2 - |RCC_PERIPHCLK_ADC; + |RCC_PERIPHCLK_LPTIM1|RCC_PERIPHCLK_ADC; PeriphClkInit.Usart2ClockSelection = RCC_USART2CLKSOURCE_PCLK1; + PeriphClkInit.Lptim1ClockSelection = RCC_LPTIM1CLKSOURCE_PCLK; PeriphClkInit.AdcClockSelection = RCC_ADCCLKSOURCE_PLLSAI1; PeriphClkInit.RTCClockSelection = RCC_RTCCLKSOURCE_LSE; PeriphClkInit.PLLSAI1.PLLSAI1Source = RCC_PLLSOURCE_HSI; @@ -410,6 +415,40 @@ static void MX_ADC3_Init(void) } +/** + * @brief LPTIM1 Initialization Function + * @param None + * @retval None + */ +static void MX_LPTIM1_Init(void) +{ + + /* USER CODE BEGIN LPTIM1_Init 0 */ + + /* USER CODE END LPTIM1_Init 0 */ + + /* USER CODE BEGIN LPTIM1_Init 1 */ + + /* USER CODE END LPTIM1_Init 1 */ + hlptim1.Instance = LPTIM1; + hlptim1.Init.Clock.Source = LPTIM_CLOCKSOURCE_APBCLOCK_LPOSC; + hlptim1.Init.Clock.Prescaler = LPTIM_PRESCALER_DIV1; + hlptim1.Init.Trigger.Source = LPTIM_TRIGSOURCE_SOFTWARE; + hlptim1.Init.OutputPolarity = LPTIM_OUTPUTPOLARITY_HIGH; + hlptim1.Init.UpdateMode = LPTIM_UPDATE_IMMEDIATE; + hlptim1.Init.CounterSource = LPTIM_COUNTERSOURCE_INTERNAL; + hlptim1.Init.Input1Source = LPTIM_INPUT1SOURCE_GPIO; + hlptim1.Init.Input2Source = LPTIM_INPUT2SOURCE_GPIO; + if (HAL_LPTIM_Init(&hlptim1) != HAL_OK) + { + Error_Handler(); + } + /* USER CODE BEGIN LPTIM1_Init 2 */ + + /* USER CODE END LPTIM1_Init 2 */ + +} + /** * @brief RTC Initialization Function * @param None diff --git a/bsp/stm32/stm32l476-st-nucleo/board/CubeMX_Config/Src/stm32l4xx_hal_msp.c b/bsp/stm32/stm32l476-st-nucleo/board/CubeMX_Config/Src/stm32l4xx_hal_msp.c index 5f50279125..dda464c29e 100644 --- a/bsp/stm32/stm32l476-st-nucleo/board/CubeMX_Config/Src/stm32l4xx_hal_msp.c +++ b/bsp/stm32/stm32l476-st-nucleo/board/CubeMX_Config/Src/stm32l4xx_hal_msp.c @@ -254,6 +254,50 @@ void HAL_ADC_MspDeInit(ADC_HandleTypeDef* hadc) } +/** +* @brief LPTIM MSP Initialization +* This function configures the hardware resources used in this example +* @param hlptim: LPTIM handle pointer +* @retval None +*/ +void HAL_LPTIM_MspInit(LPTIM_HandleTypeDef* hlptim) +{ + if(hlptim->Instance==LPTIM1) + { + /* USER CODE BEGIN LPTIM1_MspInit 0 */ + + /* USER CODE END LPTIM1_MspInit 0 */ + /* Peripheral clock enable */ + __HAL_RCC_LPTIM1_CLK_ENABLE(); + /* USER CODE BEGIN LPTIM1_MspInit 1 */ + + /* USER CODE END LPTIM1_MspInit 1 */ + } + +} + +/** +* @brief LPTIM MSP De-Initialization +* This function freeze the hardware resources used in this example +* @param hlptim: LPTIM handle pointer +* @retval None +*/ +void HAL_LPTIM_MspDeInit(LPTIM_HandleTypeDef* hlptim) +{ + if(hlptim->Instance==LPTIM1) + { + /* USER CODE BEGIN LPTIM1_MspDeInit 0 */ + + /* USER CODE END LPTIM1_MspDeInit 0 */ + /* Peripheral clock disable */ + __HAL_RCC_LPTIM1_CLK_DISABLE(); + /* USER CODE BEGIN LPTIM1_MspDeInit 1 */ + + /* USER CODE END LPTIM1_MspDeInit 1 */ + } + +} + /** * @brief RTC MSP Initialization * This function configures the hardware resources used in this example