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] 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