Merge pull request #4037 from KyleChenjh/master

add dac driver for stm32l4
This commit is contained in:
Bernard Xiong 2020-12-03 08:41:41 +08:00 committed by GitHub
commit df3d4b7bc9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 765 additions and 564 deletions

View File

@ -0,0 +1,42 @@
/*
* Copyright (c) 2006-2018, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2020-06-16 thread-liu first version
*/
#ifndef __DAC_CONFIG_H__
#define __DAC_CONFIG_H__
#include <rtthread.h>
#ifdef __cplusplus
extern "C" {
#endif
#ifdef BSP_USING_DAC1
#ifndef DAC1_CONFIG
#define DAC1_CONFIG \
{ \
.Instance = DAC1, \
}
#endif /* DAC2_CONFIG */
#endif /* BSP_USING_DAC2 */
#ifdef BSP_USING_DAC2
#ifndef DAC2_CONFIG
#define DAC2_CONFIG \
{ \
.Instance = DAC2, \
}
#endif /* DAC2_CONFIG */
#endif /* BSP_USING_DAC2 */
#ifdef __cplusplus
}
#endif
#endif /* __DAC_CONFIG_H__ */

View File

@ -73,6 +73,7 @@ extern "C" {
#include "l4/spi_config.h" #include "l4/spi_config.h"
#include "l4/qspi_config.h" #include "l4/qspi_config.h"
#include "l4/adc_config.h" #include "l4/adc_config.h"
#include "l4/dac_config.h"
#include "l4/tim_config.h" #include "l4/tim_config.h"
#include "l4/sdio_config.h" #include "l4/sdio_config.h"
#include "l4/pwm_config.h" #include "l4/pwm_config.h"

View File

@ -43,7 +43,7 @@ static rt_err_t stm32_dac_enabled(struct rt_dac_device *device, rt_uint32_t chan
RT_ASSERT(device != RT_NULL); RT_ASSERT(device != RT_NULL);
stm32_dac_handler = device->parent.user_data; stm32_dac_handler = device->parent.user_data;
#if defined(SOC_SERIES_STM32MP1) || defined(SOC_SERIES_STM32H7) #if defined(SOC_SERIES_STM32MP1) || defined(SOC_SERIES_STM32H7) || defined(SOC_SERIES_STM32L4)
HAL_DAC_Start(stm32_dac_handler, channel); HAL_DAC_Start(stm32_dac_handler, channel);
#endif #endif
@ -56,7 +56,7 @@ static rt_err_t stm32_dac_disabled(struct rt_dac_device *device, rt_uint32_t cha
RT_ASSERT(device != RT_NULL); RT_ASSERT(device != RT_NULL);
stm32_dac_handler = device->parent.user_data; stm32_dac_handler = device->parent.user_data;
#if defined(SOC_SERIES_STM32MP1) || defined(SOC_SERIES_STM32H7) #if defined(SOC_SERIES_STM32MP1) || defined(SOC_SERIES_STM32H7) || defined(SOC_SERIES_STM32L4)
HAL_DAC_Stop(stm32_dac_handler, channel); HAL_DAC_Stop(stm32_dac_handler, channel);
#endif #endif
@ -96,7 +96,7 @@ static rt_err_t stm32_set_dac_value(struct rt_dac_device *device, rt_uint32_t ch
rt_memset(&DAC_ChanConf, 0, sizeof(DAC_ChanConf)); rt_memset(&DAC_ChanConf, 0, sizeof(DAC_ChanConf));
#if defined(SOC_SERIES_STM32MP1) || defined(SOC_SERIES_STM32H7) #if defined(SOC_SERIES_STM32MP1) || defined(SOC_SERIES_STM32H7) || defined(SOC_SERIES_STM32L4)
if ((channel <= 2) && (channel > 0)) if ((channel <= 2) && (channel > 0))
{ {
/* set stm32 dac channel */ /* set stm32 dac channel */
@ -109,7 +109,7 @@ static rt_err_t stm32_set_dac_value(struct rt_dac_device *device, rt_uint32_t ch
} }
#endif #endif
#if defined(SOC_SERIES_STM32MP1) || defined(SOC_SERIES_STM32H7) #if defined(SOC_SERIES_STM32MP1) || defined(SOC_SERIES_STM32H7) || defined(SOC_SERIES_STM32L4)
DAC_ChanConf.DAC_Trigger = DAC_TRIGGER_NONE; DAC_ChanConf.DAC_Trigger = DAC_TRIGGER_NONE;
DAC_ChanConf.DAC_OutputBuffer = DAC_OUTPUTBUFFER_DISABLE; DAC_ChanConf.DAC_OutputBuffer = DAC_OUTPUTBUFFER_DISABLE;
#endif #endif

View File

@ -59,6 +59,10 @@ if GetDepend(['RT_USING_ADC']):
src += ['STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_adc.c'] src += ['STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_adc.c']
src += ['STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_adc_ex.c'] src += ['STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_adc_ex.c']
if GetDepend(['RT_USING_DAC']):
src += ['STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_dac.c']
src += ['STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_dac_ex.c']
if GetDepend(['RT_USING_RTC']): if GetDepend(['RT_USING_RTC']):
src += ['STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rtc.c'] src += ['STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rtc.c']
src += ['STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rtc_ex.c'] src += ['STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rtc_ex.c']

File diff suppressed because one or more lines are too long

View File

@ -1,40 +1,27 @@
/** /**
****************************************************************************** ******************************************************************************
* @file stm32l4xx_hal_conf.h * @file stm32l4xx_hal_conf.h
* @brief HAL configuration file. * @author MCD Application Team
* @brief HAL configuration template file.
* This file should be copied to the application folder and renamed
* to stm32l4xx_hal_conf.h.
****************************************************************************** ******************************************************************************
* @attention * @attention
* *
* <h2><center>&copy; COPYRIGHT(c) 2020 STMicroelectronics</center></h2> * <h2><center>&copy; Copyright (c) 2017 STMicroelectronics.
* All rights reserved.</center></h2>
* *
* Redistribution and use in source and binary forms, with or without modification, * This software component is licensed by ST under BSD 3-Clause license,
* are permitted provided that the following conditions are met: * the "License"; You may not use this file except in compliance with the
* 1. Redistributions of source code must retain the above copyright notice, * License. You may obtain a copy of the License at:
* this list of conditions and the following disclaimer. * opensource.org/licenses/BSD-3-Clause
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. Neither the name of STMicroelectronics nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
****************************************************************************** ******************************************************************************
*/ */
/* Define to prevent recursive inclusion -------------------------------------*/ /* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __STM32L4xx_HAL_CONF_H #ifndef STM32L4xx_HAL_CONF_H
#define __STM32L4xx_HAL_CONF_H #define STM32L4xx_HAL_CONF_H
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
@ -47,7 +34,6 @@
/** /**
* @brief This is the list of modules to be used in the HAL driver * @brief This is the list of modules to be used in the HAL driver
*/ */
#define HAL_MODULE_ENABLED #define HAL_MODULE_ENABLED
#define HAL_ADC_MODULE_ENABLED #define HAL_ADC_MODULE_ENABLED
/*#define HAL_CRYP_MODULE_ENABLED */ /*#define HAL_CRYP_MODULE_ENABLED */
@ -55,7 +41,7 @@
/*#define HAL_COMP_MODULE_ENABLED */ /*#define HAL_COMP_MODULE_ENABLED */
/*#define HAL_CRC_MODULE_ENABLED */ /*#define HAL_CRC_MODULE_ENABLED */
/*#define HAL_CRYP_MODULE_ENABLED */ /*#define HAL_CRYP_MODULE_ENABLED */
/*#define HAL_DAC_MODULE_ENABLED */ #define HAL_DAC_MODULE_ENABLED
/*#define HAL_DCMI_MODULE_ENABLED */ /*#define HAL_DCMI_MODULE_ENABLED */
/*#define HAL_DMA2D_MODULE_ENABLED */ /*#define HAL_DMA2D_MODULE_ENABLED */
/*#define HAL_DFSDM_MODULE_ENABLED */ /*#define HAL_DFSDM_MODULE_ENABLED */
@ -151,7 +137,7 @@
* @brief Internal Low Speed oscillator (LSI) value. * @brief Internal Low Speed oscillator (LSI) value.
*/ */
#if !defined (LSI_VALUE) #if !defined (LSI_VALUE)
#define LSI_VALUE ((uint32_t)32000U) /*!< LSI Typical Value in Hz*/ #define LSI_VALUE 32000U /*!< LSI Typical Value in Hz*/
#endif /* LSI_VALUE */ /*!< Value of the Internal Low Speed oscillator in Hz #endif /* LSI_VALUE */ /*!< Value of the Internal Low Speed oscillator in Hz
The real value may vary depending on the variations The real value may vary depending on the variations
in voltage and temperature.*/ in voltage and temperature.*/
@ -161,11 +147,11 @@
* This value is used by the UART, RTC HAL module to compute the system frequency * This value is used by the UART, RTC HAL module to compute the system frequency
*/ */
#if !defined (LSE_VALUE) #if !defined (LSE_VALUE)
#define LSE_VALUE ((uint32_t)32768U) /*!< Value of the External oscillator in Hz*/ #define LSE_VALUE 32768U /*!< Value of the External oscillator in Hz*/
#endif /* LSE_VALUE */ #endif /* LSE_VALUE */
#if !defined (LSE_STARTUP_TIMEOUT) #if !defined (LSE_STARTUP_TIMEOUT)
#define LSE_STARTUP_TIMEOUT ((uint32_t)5000U) /*!< Time out for LSE start up, in ms */ #define LSE_STARTUP_TIMEOUT 5000U /*!< Time out for LSE start up, in ms */
#endif /* HSE_STARTUP_TIMEOUT */ #endif /* HSE_STARTUP_TIMEOUT */
/** /**
@ -174,7 +160,7 @@
* frequency. * frequency.
*/ */
#if !defined (EXTERNAL_SAI1_CLOCK_VALUE) #if !defined (EXTERNAL_SAI1_CLOCK_VALUE)
#define EXTERNAL_SAI1_CLOCK_VALUE ((uint32_t)2097000U) /*!< Value of the SAI1 External clock source in Hz*/ #define EXTERNAL_SAI1_CLOCK_VALUE 2097000U /*!< Value of the SAI1 External clock source in Hz*/
#endif /* EXTERNAL_SAI1_CLOCK_VALUE */ #endif /* EXTERNAL_SAI1_CLOCK_VALUE */
/** /**
@ -183,7 +169,7 @@
* frequency. * frequency.
*/ */
#if !defined (EXTERNAL_SAI2_CLOCK_VALUE) #if !defined (EXTERNAL_SAI2_CLOCK_VALUE)
#define EXTERNAL_SAI2_CLOCK_VALUE ((uint32_t)2097000U) /*!< Value of the SAI2 External clock source in Hz*/ #define EXTERNAL_SAI2_CLOCK_VALUE 2097000U /*!< Value of the SAI2 External clock source in Hz*/
#endif /* EXTERNAL_SAI2_CLOCK_VALUE */ #endif /* EXTERNAL_SAI2_CLOCK_VALUE */
/* Tip: To avoid modifying this file each time you need to use different HSE, /* Tip: To avoid modifying this file each time you need to use different HSE,
@ -194,8 +180,8 @@
* @brief This is the HAL system configuration section * @brief This is the HAL system configuration section
*/ */
#define VDD_VALUE ((uint32_t)3300U) /*!< Value of VDD in mv */ #define VDD_VALUE 3300U /*!< Value of VDD in mv */
#define TICK_INT_PRIORITY ((uint32_t)0U) /*!< tick interrupt priority */ #define TICK_INT_PRIORITY 0U /*!< tick interrupt priority */
#define USE_RTOS 0U #define USE_RTOS 0U
#define PREFETCH_ENABLE 0U #define PREFETCH_ENABLE 0U
#define INSTRUCTION_CACHE_ENABLE 1U #define INSTRUCTION_CACHE_ENABLE 1U
@ -208,6 +194,51 @@
*/ */
/* #define USE_FULL_ASSERT 1U */ /* #define USE_FULL_ASSERT 1U */
/* ################## Register callback feature configuration ############### */
/**
* @brief Set below the peripheral configuration to "1U" to add the support
* of HAL callback registration/deregistration feature for the HAL
* driver(s). This allows user application to provide specific callback
* functions thanks to HAL_PPP_RegisterCallback() rather than overwriting
* the default weak callback functions (see each stm32l4xx_hal_ppp.h file
* for possible callback identifiers defined in HAL_PPP_CallbackIDTypeDef
* for each PPP peripheral).
*/
#define USE_HAL_ADC_REGISTER_CALLBACKS 0U
#define USE_HAL_CAN_REGISTER_CALLBACKS 0U
#define USE_HAL_COMP_REGISTER_CALLBACKS 0U
#define USE_HAL_CRYP_REGISTER_CALLBACKS 0U
#define USE_HAL_DAC_REGISTER_CALLBACKS 0U
#define USE_HAL_DCMI_REGISTER_CALLBACKS 0U
#define USE_HAL_DFSDM_REGISTER_CALLBACKS 0U
#define USE_HAL_DMA2D_REGISTER_CALLBACKS 0U
#define USE_HAL_DSI_REGISTER_CALLBACKS 0U
#define USE_HAL_GFXMMU_REGISTER_CALLBACKS 0U
#define USE_HAL_HASH_REGISTER_CALLBACKS 0U
#define USE_HAL_HCD_REGISTER_CALLBACKS 0U
#define USE_HAL_I2C_REGISTER_CALLBACKS 0U
#define USE_HAL_IRDA_REGISTER_CALLBACKS 0U
#define USE_HAL_LPTIM_REGISTER_CALLBACKS 0U
#define USE_HAL_LTDC_REGISTER_CALLBACKS 0U
#define USE_HAL_MMC_REGISTER_CALLBACKS 0U
#define USE_HAL_OPAMP_REGISTER_CALLBACKS 0U
#define USE_HAL_OSPI_REGISTER_CALLBACKS 0U
#define USE_HAL_PCD_REGISTER_CALLBACKS 0U
#define USE_HAL_QSPI_REGISTER_CALLBACKS 0U
#define USE_HAL_RNG_REGISTER_CALLBACKS 0U
#define USE_HAL_RTC_REGISTER_CALLBACKS 0U
#define USE_HAL_SAI_REGISTER_CALLBACKS 0U
#define USE_HAL_SD_REGISTER_CALLBACKS 0U
#define USE_HAL_SMARTCARD_REGISTER_CALLBACKS 0U
#define USE_HAL_SMBUS_REGISTER_CALLBACKS 0U
#define USE_HAL_SPI_REGISTER_CALLBACKS 0U
#define USE_HAL_SWPMI_REGISTER_CALLBACKS 0U
#define USE_HAL_TIM_REGISTER_CALLBACKS 0U
#define USE_HAL_TSC_REGISTER_CALLBACKS 0U
#define USE_HAL_UART_REGISTER_CALLBACKS 0U
#define USE_HAL_USART_REGISTER_CALLBACKS 0U
#define USE_HAL_WWDG_REGISTER_CALLBACKS 0U
/* ################## SPI peripheral configuration ########################## */ /* ################## SPI peripheral configuration ########################## */
/* CRC FEATURE: Use to activate CRC feature inside HAL SPI Driver /* CRC FEATURE: Use to activate CRC feature inside HAL SPI Driver
@ -224,20 +255,14 @@
#ifdef HAL_RCC_MODULE_ENABLED #ifdef HAL_RCC_MODULE_ENABLED
#include "stm32l4xx_hal_rcc.h" #include "stm32l4xx_hal_rcc.h"
#include "stm32l4xx_hal_rcc_ex.h"
#endif /* HAL_RCC_MODULE_ENABLED */ #endif /* HAL_RCC_MODULE_ENABLED */
#ifdef HAL_EXTI_MODULE_ENABLED
#include "stm32l4xx_hal_exti.h"
#endif /* HAL_EXTI_MODULE_ENABLED */
#ifdef HAL_GPIO_MODULE_ENABLED #ifdef HAL_GPIO_MODULE_ENABLED
#include "stm32l4xx_hal_gpio.h" #include "stm32l4xx_hal_gpio.h"
#endif /* HAL_GPIO_MODULE_ENABLED */ #endif /* HAL_GPIO_MODULE_ENABLED */
#ifdef HAL_DMA_MODULE_ENABLED #ifdef HAL_DMA_MODULE_ENABLED
#include "stm32l4xx_hal_dma.h" #include "stm32l4xx_hal_dma.h"
#include "stm32l4xx_hal_dma_ex.h"
#endif /* HAL_DMA_MODULE_ENABLED */ #endif /* HAL_DMA_MODULE_ENABLED */
#ifdef HAL_DFSDM_MODULE_ENABLED #ifdef HAL_DFSDM_MODULE_ENABLED
@ -256,6 +281,10 @@
#include "stm32l4xx_hal_can.h" #include "stm32l4xx_hal_can.h"
#endif /* HAL_CAN_MODULE_ENABLED */ #endif /* HAL_CAN_MODULE_ENABLED */
#ifdef HAL_CAN_LEGACY_MODULE_ENABLED
#include "Legacy/stm32l4xx_hal_can_legacy.h"
#endif /* HAL_CAN_LEGACY_MODULE_ENABLED */
#ifdef HAL_COMP_MODULE_ENABLED #ifdef HAL_COMP_MODULE_ENABLED
#include "stm32l4xx_hal_comp.h" #include "stm32l4xx_hal_comp.h"
#endif /* HAL_COMP_MODULE_ENABLED */ #endif /* HAL_COMP_MODULE_ENABLED */
@ -284,6 +313,14 @@
#include "stm32l4xx_hal_dsi.h" #include "stm32l4xx_hal_dsi.h"
#endif /* HAL_DSI_MODULE_ENABLED */ #endif /* HAL_DSI_MODULE_ENABLED */
#ifdef HAL_EXTI_MODULE_ENABLED
#include "stm32l4xx_hal_exti.h"
#endif /* HAL_EXTI_MODULE_ENABLED */
#ifdef HAL_GFXMMU_MODULE_ENABLED
#include "stm32l4xx_hal_gfxmmu.h"
#endif /* HAL_GFXMMU_MODULE_ENABLED */
#ifdef HAL_FIREWALL_MODULE_ENABLED #ifdef HAL_FIREWALL_MODULE_ENABLED
#include "stm32l4xx_hal_firewall.h" #include "stm32l4xx_hal_firewall.h"
#endif /* HAL_FIREWALL_MODULE_ENABLED */ #endif /* HAL_FIREWALL_MODULE_ENABLED */
@ -296,26 +333,18 @@
#include "stm32l4xx_hal_hash.h" #include "stm32l4xx_hal_hash.h"
#endif /* HAL_HASH_MODULE_ENABLED */ #endif /* HAL_HASH_MODULE_ENABLED */
#ifdef HAL_SRAM_MODULE_ENABLED #ifdef HAL_HCD_MODULE_ENABLED
#include "stm32l4xx_hal_sram.h" #include "stm32l4xx_hal_hcd.h"
#endif /* HAL_SRAM_MODULE_ENABLED */ #endif /* HAL_HCD_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 */
#ifdef HAL_NAND_MODULE_ENABLED
#include "stm32l4xx_hal_nand.h"
#endif /* HAL_NAND_MODULE_ENABLED */
#ifdef HAL_I2C_MODULE_ENABLED #ifdef HAL_I2C_MODULE_ENABLED
#include "stm32l4xx_hal_i2c.h" #include "stm32l4xx_hal_i2c.h"
#endif /* HAL_I2C_MODULE_ENABLED */ #endif /* HAL_I2C_MODULE_ENABLED */
#ifdef HAL_IRDA_MODULE_ENABLED
#include "stm32l4xx_hal_irda.h"
#endif /* HAL_IRDA_MODULE_ENABLED */
#ifdef HAL_IWDG_MODULE_ENABLED #ifdef HAL_IWDG_MODULE_ENABLED
#include "stm32l4xx_hal_iwdg.h" #include "stm32l4xx_hal_iwdg.h"
#endif /* HAL_IWDG_MODULE_ENABLED */ #endif /* HAL_IWDG_MODULE_ENABLED */
@ -332,6 +361,18 @@
#include "stm32l4xx_hal_ltdc.h" #include "stm32l4xx_hal_ltdc.h"
#endif /* HAL_LTDC_MODULE_ENABLED */ #endif /* HAL_LTDC_MODULE_ENABLED */
#ifdef HAL_MMC_MODULE_ENABLED
#include "stm32l4xx_hal_mmc.h"
#endif /* HAL_MMC_MODULE_ENABLED */
#ifdef HAL_NAND_MODULE_ENABLED
#include "stm32l4xx_hal_nand.h"
#endif /* HAL_NAND_MODULE_ENABLED */
#ifdef HAL_NOR_MODULE_ENABLED
#include "stm32l4xx_hal_nor.h"
#endif /* HAL_NOR_MODULE_ENABLED */
#ifdef HAL_OPAMP_MODULE_ENABLED #ifdef HAL_OPAMP_MODULE_ENABLED
#include "stm32l4xx_hal_opamp.h" #include "stm32l4xx_hal_opamp.h"
#endif /* HAL_OPAMP_MODULE_ENABLED */ #endif /* HAL_OPAMP_MODULE_ENABLED */
@ -340,9 +381,17 @@
#include "stm32l4xx_hal_ospi.h" #include "stm32l4xx_hal_ospi.h"
#endif /* HAL_OSPI_MODULE_ENABLED */ #endif /* HAL_OSPI_MODULE_ENABLED */
#ifdef HAL_PCD_MODULE_ENABLED
#include "stm32l4xx_hal_pcd.h"
#endif /* HAL_PCD_MODULE_ENABLED */
#ifdef HAL_PKA_MODULE_ENABLED #ifdef HAL_PKA_MODULE_ENABLED
#include "stm32l4xx_hal_pka.h" #include "stm32l4xx_hal_pka.h"
#endif /* HAL_PWR_MODULE_ENABLED */ #endif /* HAL_PKA_MODULE_ENABLED */
#ifdef HAL_PSSI_MODULE_ENABLED
#include "stm32l4xx_hal_pssi.h"
#endif /* HAL_PSSI_MODULE_ENABLED */
#ifdef HAL_PWR_MODULE_ENABLED #ifdef HAL_PWR_MODULE_ENABLED
#include "stm32l4xx_hal_pwr.h" #include "stm32l4xx_hal_pwr.h"
@ -368,6 +417,10 @@
#include "stm32l4xx_hal_sd.h" #include "stm32l4xx_hal_sd.h"
#endif /* HAL_SD_MODULE_ENABLED */ #endif /* HAL_SD_MODULE_ENABLED */
#ifdef HAL_SMARTCARD_MODULE_ENABLED
#include "stm32l4xx_hal_smartcard.h"
#endif /* HAL_SMARTCARD_MODULE_ENABLED */
#ifdef HAL_SMBUS_MODULE_ENABLED #ifdef HAL_SMBUS_MODULE_ENABLED
#include "stm32l4xx_hal_smbus.h" #include "stm32l4xx_hal_smbus.h"
#endif /* HAL_SMBUS_MODULE_ENABLED */ #endif /* HAL_SMBUS_MODULE_ENABLED */
@ -376,6 +429,10 @@
#include "stm32l4xx_hal_spi.h" #include "stm32l4xx_hal_spi.h"
#endif /* HAL_SPI_MODULE_ENABLED */ #endif /* HAL_SPI_MODULE_ENABLED */
#ifdef HAL_SRAM_MODULE_ENABLED
#include "stm32l4xx_hal_sram.h"
#endif /* HAL_SRAM_MODULE_ENABLED */
#ifdef HAL_SWPMI_MODULE_ENABLED #ifdef HAL_SWPMI_MODULE_ENABLED
#include "stm32l4xx_hal_swpmi.h" #include "stm32l4xx_hal_swpmi.h"
#endif /* HAL_SWPMI_MODULE_ENABLED */ #endif /* HAL_SWPMI_MODULE_ENABLED */
@ -396,39 +453,15 @@
#include "stm32l4xx_hal_usart.h" #include "stm32l4xx_hal_usart.h"
#endif /* HAL_USART_MODULE_ENABLED */ #endif /* HAL_USART_MODULE_ENABLED */
#ifdef HAL_IRDA_MODULE_ENABLED
#include "stm32l4xx_hal_irda.h"
#endif /* HAL_IRDA_MODULE_ENABLED */
#ifdef HAL_SMARTCARD_MODULE_ENABLED
#include "stm32l4xx_hal_smartcard.h"
#endif /* HAL_SMARTCARD_MODULE_ENABLED */
#ifdef HAL_WWDG_MODULE_ENABLED #ifdef HAL_WWDG_MODULE_ENABLED
#include "stm32l4xx_hal_wwdg.h" #include "stm32l4xx_hal_wwdg.h"
#endif /* HAL_WWDG_MODULE_ENABLED */ #endif /* HAL_WWDG_MODULE_ENABLED */
#ifdef HAL_PCD_MODULE_ENABLED
#include "stm32l4xx_hal_pcd.h"
#endif /* HAL_PCD_MODULE_ENABLED */
#ifdef HAL_HCD_MODULE_ENABLED
#include "stm32l4xx_hal_hcd.h"
#endif /* HAL_HCD_MODULE_ENABLED */
#ifdef HAL_GFXMMU_MODULE_ENABLED
#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 ------------------------------------------------------------*/ /* Exported macro ------------------------------------------------------------*/
#ifdef USE_FULL_ASSERT #ifdef USE_FULL_ASSERT
/** /**
* @brief The assert_param macro is used for function's parameters check. * @brief The assert_param macro is used for function's parameters check.
* @param expr: If expr is false, it calls assert_failed function * @param expr If expr is false, it calls assert_failed function
* which reports the name of the source file and the source * which reports the name of the source file and the source
* line number of the call that failed. * line number of the call that failed.
* If expr is true, it returns no value. * If expr is true, it returns no value.
@ -436,7 +469,7 @@
*/ */
#define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__)) #define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__))
/* Exported functions ------------------------------------------------------- */ /* Exported functions ------------------------------------------------------- */
void assert_failed(char *file, uint32_t line); void assert_failed(uint8_t *file, uint32_t line);
#else #else
#define assert_param(expr) ((void)0U) #define assert_param(expr) ((void)0U)
#endif /* USE_FULL_ASSERT */ #endif /* USE_FULL_ASSERT */
@ -445,6 +478,6 @@
} }
#endif #endif
#endif /* __STM32L4xx_HAL_CONF_H */ #endif /* STM32L4xx_HAL_CONF_H */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View File

@ -1,363 +1,369 @@
#MicroXplorer Configuration settings - do not modify #MicroXplorer Configuration settings - do not modify
Mcu.Family=STM32L4
ProjectManager.MainLocation=Src
PA6.Mode=Full_Duplex_Master
SH.S_TIM4_CH2.ConfNb=1
RCC.USART1Freq_Value=80000000
RCC.SAI1Freq_Value=13714285.714285715
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=STM32L475VETx
SPI1.VirtualType=VM_MASTER
SPI2.VirtualType=VM_MASTER
PH0-OSC_IN\ (PH0).Signal=RCC_OSC_IN
TIM1.IPParameters=Channel-PWM Generation1 CH1
PC10.Signal=SDMMC1_D2
PC12.Signal=SDMMC1_CK
VP_IWDG_VS_IWDG.Mode=IWDG_Activate
RCC.PLLSAI1RoutputFreq_Value=48000000
ProjectManager.functionlistsort=1-MX_GPIO_Init-GPIO-false-HAL-true,2-SystemClock_Config-RCC-false-HAL-false,3-MX_USART1_UART_Init-USART1-false-HAL-true,4-MX_USART2_UART_Init-USART2-false-HAL-true,5-MX_QUADSPI_Init-QUADSPI-false-HAL-true,6-MX_SPI1_Init-SPI1-false-HAL-true,7-MX_SPI2_Init-SPI2-false-HAL-true,8-MX_RTC_Init-RTC-false-HAL-true,9-MX_ADC1_Init-ADC1-false-HAL-true,10-MX_IWDG_Init-IWDG-false-HAL-true,11-MX_TIM17_Init-TIM17-false-HAL-true,12-MX_TIM16_Init-TIM16-false-HAL-true,13-MX_TIM15_Init-TIM15-false-HAL-true,14-MX_TIM4_Init-TIM4-false-HAL-true,15-MX_TIM1_Init-TIM1-false-HAL-true,16-MX_SAI1_Init-SAI1-false-HAL-true,17-MX_SPI3_Init-SPI3-false-HAL-true,18-MX_TIM2_Init-TIM2-false-HAL-true,19-MX_USB_OTG_FS_PCD_Init-USB_OTG_FS-false-HAL-true
SAI1.VirtualProtocol-SAI_A_BASIC=VM_BASIC_PROTOCOL
VP_RTC_VS_RTC_Activate.Mode=RTC_Enabled
SAI1.Instance-SAI_A_MasterWithClock=SAI$Index_Block_A
PA11.Mode=Device_Only
RCC.RTCFreq_Value=32768
RCC.USART2Freq_Value=80000000
PC15-OSC32_OUT\ (PC15).Mode=LSE-External-Oscillator
SH.S_TIM1_CH1.ConfNb=1
USART1.IPParameters=VirtualMode-Asynchronous
PB11.Signal=S_TIM2_CH4
PB13.Signal=SPI2_SCK
PB15.Signal=SPI2_MOSI
PinOutPanel.RotationAngle=0
RCC.MCO1PinFreq_Value=80000000
RCC.SYSCLKSource=RCC_SYSCLKSOURCE_PLLCLK
ProjectManager.StackSize=0x400
PB3\ (JTDO-TRACESWO).Signal=SPI3_SCK
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=QUADSPI
Mcu.IP5=RCC
RCC.FCLKCortexFreq_Value=80000000
Mcu.IP2=LPTIM1
NVIC.SVCall_IRQn=true\:0\:0\:false\:false\:true\:false\:false
Mcu.IP3=NVIC
Mcu.IP0=ADC1
Mcu.IP1=IWDG
PA12.Signal=USB_OTG_FS_DP
Mcu.UserConstants=
PE11.Mode=Single Bank
RCC.VCOSAI1OutputFreq_Value=96000000
SAI1.VirtualMode-SAI_B_SyncSlave=VM_SLAVE
RCC.SDMMCFreq_Value=48000000
Mcu.ThirdPartyNb=0
SPI1.Direction=SPI_DIRECTION_2LINES
RCC.HCLKFreq_Value=80000000
PE2.Mode=SAI_A_MasterWithClock
Mcu.IPNb=22
TIM2.IPParameters=Channel-PWM Generation3 CH3,Channel-PWM Generation4 CH4
ProjectManager.PreviousToolchain=
RCC.APB2TimFreq_Value=80000000
VP_SAI1_VP_$IpInstance_SAIB_SAI_BASIC.Signal=SAI1_VP_$IpInstance_SAIB_SAI_BASIC
SPI1.CalculateBaudRate=40.0 MBits/s
Mcu.Pin6=PC15-OSC32_OUT (PC15)
RCC.SAI2Freq_Value=13714285.714285715
Mcu.Pin7=PH0-OSC_IN (PH0)
VP_TIM2_VS_ClockSourceINT.Signal=TIM2_VS_ClockSourceINT
Mcu.Pin8=PH1-OSC_OUT (PH1)
PE5.Signal=SAI1_SCK_A
Mcu.Pin9=PA2
RCC.AHBFreq_Value=80000000
PB13.Locked=true
Mcu.Pin0=PE2
PE14.Locked=true
Mcu.Pin1=PE3
Mcu.Pin2=PE4
Mcu.Pin3=PE5
RCC.USART3Freq_Value=80000000
Mcu.Pin4=PE6
Mcu.Pin5=PC14-OSC32_IN (PC14)
ProjectManager.ProjectBuild=false
PH1-OSC_OUT\ (PH1).Mode=HSE-External-Oscillator
RCC.HSE_VALUE=8000000
TIM4.Channel-PWM\ Generation3\ CH3=TIM_CHANNEL_3
NVIC.UsageFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false
NVIC.DebugMonitor_IRQn=true\:0\:0\:false\:false\:true\:false\:false
SH.ADCx_IN14.ConfNb=1
Mcu.IP10=SPI2
USART2.VirtualMode-Asynchronous=VM_ASYNC
NVIC.SysTick_IRQn=true\:0\:0\:false\:false\:true\:false\:true
RCC.RTCClockSelection=RCC_RTCCLKSOURCE_LSE
Mcu.IP12=SYS
Mcu.IP11=SPI3
ADC1.OffsetNumber-15\#ChannelRegularConversion=ADC_OFFSET_NONE
Mcu.IP18=TIM17
ProjectManager.FirmwarePackage=STM32Cube FW_L4 V1.15.1
Mcu.IP17=TIM16
MxDb.Version=DB.5.0.60
PE15.Locked=true
Mcu.IP19=USART1
Mcu.IP14=TIM2
Mcu.IP13=TIM1
PE13.Signal=QUADSPI_BK1_IO1
Mcu.IP16=TIM15
ProjectManager.BackupPrevious=false
Mcu.IP15=TIM4
RCC.VCOInputFreq_Value=8000000
TIM1.Channel-PWM\ Generation1\ CH1=TIM_CHANNEL_1
PE9.Signal=S_TIM1_CH1
PB14.Mode=Full_Duplex_Master
PB5.Mode=TX_Only_Simplex_Unidirect_Master
File.Version=6
PC9.Mode=SD_4_bits_Wide_bus
SPI2.CalculateBaudRate=40.0 MBits/s
SAI1.InitProtocol-SAI_A_MasterWithClock=Enable
SH.S_TIM4_CH2.0=TIM4_CH2,PWM Generation2 CH2
PE2.Signal=SAI1_MCLK_A
PB7.Signal=S_TIM4_CH2
Mcu.IP21=USB_OTG_FS
PB8.Locked=true
Mcu.IP20=USART2
RCC.PLLRCLKFreq_Value=80000000
PE13.Mode=Single Bank
NVIC.PendSV_IRQn=true\:0\:0\:false\:false\:true\:false\:false
PE4.Mode=SAI_A_MasterWithClock
ADC1.Channel-15\#ChannelRegularConversion=ADC_CHANNEL_14 ADC1.Channel-15\#ChannelRegularConversion=ADC_CHANNEL_14
PE4.Signal=SAI1_FS_A
PE10.Signal=QUADSPI_CLK
VP_TIM15_VS_ClockSourceINT.Signal=TIM15_VS_ClockSourceINT
ProjectManager.HalAssertFull=false
VP_TIM1_VS_ClockSourceINT.Mode=Internal
ProjectManager.ProjectName=STM32L475VE
ADC1.Rank-15\#ChannelRegularConversion=1
SAI1.OutputDrive-SAI_A_MasterWithClock=SAI_OUTPUTDRIVE_ENABLE
Mcu.Package=LQFP100
SAI1.AudioFrequency-SAI_A_MasterWithClock=SAI_AUDIO_FREQUENCY_44K
PA6.Signal=SPI1_MISO
SPI2.Mode=SPI_MODE_MASTER
SPI3.Mode=SPI_MODE_MASTER
SH.ADCx_IN14.0=ADC1_IN14,IN14-Single-Ended
NVIC.OTG_FS_IRQn=true\:0\:0\:false\:false\:true\:true\:true
ProjectManager.ToolChainLocation=
RCC.LSI_VALUE=32000
VP_LPTIM1_VS_LPTIM_counterModeInternalClock.Mode=Counts__internal_clock_event_00
VP_SYS_VS_Systick.Signal=SYS_VS_Systick
RCC.LSCOPinFreq_Value=32000
PA10.Signal=USART1_RX
USB_OTG_FS.VirtualMode=Device_Only
RCC.DFSDMFreq_Value=80000000
PC11.Mode=SD_4_bits_Wide_bus
ADC1.SamplingTime-15\#ChannelRegularConversion=ADC_SAMPLETIME_2CYCLES_5
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
PC5.Signal=ADCx_IN14
USB_OTG_FS.IPParameters=VirtualMode
PB13.Mode=Full_Duplex_Master
SH.S_TIM2_CH4.ConfNb=1
PA13\ (JTMS-SWDIO).Signal=SYS_JTMS-SWDIO
PH0-OSC_IN\ (PH0).Mode=HSE-External-Oscillator
PE12.Locked=true
PE3.Mode=SAI_B_SyncSlave
ProjectManager.CustomerFirmwarePackage=
PB15.Locked=true
PB3\ (JTDO-TRACESWO).Locked=true
RCC.PLLSAI1N=12
PA3.Signal=USART2_RX
PA5.Mode=Full_Duplex_Master
PE12.Mode=Single Bank
VP_RTC_VS_RTC_Activate.Signal=RTC_VS_RTC_Activate
RCC.MSI_VALUE=4000000
RCC.PLLSourceVirtual=RCC_PLLSOURCE_HSE
PA14\ (JTCK-SWCLK).Mode=Serial_Wire
RCC.PLLQoutputFreq_Value=80000000
ProjectManager.ProjectFileName=STM32L475VE.ioc
TIM2.Channel-PWM\ Generation4\ CH4=TIM_CHANNEL_4
PA7.Mode=Full_Duplex_Master
PA10.Mode=Asynchronous
Mcu.PinsNb=55
VP_SAI1_VP_$IpInstance_SAIA_SAI_BASIC.Mode=SAI_A_BASIC
ProjectManager.NoMain=false
SPI1.IPParameters=VirtualType,Mode,Direction,CalculateBaudRate
ADC1.IPParameters=Rank-15\#ChannelRegularConversion,Channel-15\#ChannelRegularConversion,SamplingTime-15\#ChannelRegularConversion,OffsetNumber-15\#ChannelRegularConversion,NbrOfConversionFlag,master ADC1.IPParameters=Rank-15\#ChannelRegularConversion,Channel-15\#ChannelRegularConversion,SamplingTime-15\#ChannelRegularConversion,OffsetNumber-15\#ChannelRegularConversion,NbrOfConversionFlag,master
SAI1.MClockEnable-SAI_A_MasterWithClock=SAI_MASTERCLOCK_ENABLE
PC11.Signal=SDMMC1_D3
RCC.SWPMI1Freq_Value=80000000
PC8.Signal=SDMMC1_D0
PE10.Mode=Single Bank
PC10.Mode=SD_4_bits_Wide_bus
VP_SAI1_VP_$IpInstance_SAIA_SAI_BASIC.Signal=SAI1_VP_$IpInstance_SAIA_SAI_BASIC
ProjectManager.DefaultFWLocation=true
SAI1.ErrorAudioFreq-SAI_A_MasterWithClock=-72.09 %
PC15-OSC32_OUT\ (PC15).Signal=RCC_OSC32_OUT
VP_TIM16_VS_ClockSourceINT.Mode=Enable_Timer
ProjectManager.DeletePrevious=true
PB14.Locked=true
RCC.VCOSAI2OutputFreq_Value=64000000
VP_TIM17_VS_ClockSourceINT.Signal=TIM17_VS_ClockSourceINT
RCC.FamilyName=M
PH1-OSC_OUT\ (PH1).Signal=RCC_OSC_OUT
USART1.VirtualMode-Asynchronous=VM_ASYNC
PA3.Mode=Asynchronous
SAI1.RealAudioFreq-SAI_A_MasterWithClock=53.571 KHz
PA9.Mode=Asynchronous
SH.S_TIM1_CH1.0=TIM1_CH1,PWM Generation1 CH1
VP_TIM4_VS_ClockSourceINT.Signal=TIM4_VS_ClockSourceINT
ProjectManager.TargetToolchain=MDK-ARM V5
TIM4.IPParameters=Channel-PWM Generation3 CH3,Channel-PWM Generation2 CH2
Mcu.Pin51=VP_TIM4_VS_ClockSourceINT
Mcu.Pin52=VP_TIM15_VS_ClockSourceINT
Mcu.Pin50=VP_TIM2_VS_ClockSourceINT
SH.S_TIM4_CH3.0=TIM4_CH3,PWM Generation3 CH3
Mcu.Pin53=VP_TIM16_VS_ClockSourceINT
Mcu.Pin54=VP_TIM17_VS_ClockSourceINT
PA9.Signal=USART1_TX
VP_TIM1_VS_ClockSourceINT.Signal=TIM1_VS_ClockSourceINT
PB5.Locked=true
SPI2.IPParameters=VirtualType,Mode,Direction,CalculateBaudRate
RCC.USBFreq_Value=48000000
PE11.Signal=QUADSPI_NCS
Mcu.Pin48=VP_SYS_VS_Systick
Mcu.Pin49=VP_TIM1_VS_ClockSourceINT
RCC.PLLSAI1PoutputFreq_Value=13714285.714285715
Mcu.Pin46=VP_SAI1_VP_$IpInstance_SAIA_SAI_BASIC
Mcu.Pin47=VP_SAI1_VP_$IpInstance_SAIB_SAI_BASIC
PB10.Signal=S_TIM2_CH3
SAI1.VirtualMode-SAI_A_MasterWithClock=VM_MASTER
SH.S_TIM4_CH3.ConfNb=1
VP_SAI1_VP_$IpInstance_SAIB_SAI_BASIC.Mode=SAI_B_BASIC
PB14.Signal=SPI2_MISO
PD2.Mode=SD_4_bits_Wide_bus
RCC.PLLSAI2RoutputFreq_Value=32000000
PA5.Signal=SPI1_SCK
Mcu.Pin40=PB5
Mcu.Pin41=PB7
PC12.Mode=SD_4_bits_Wide_bus
Mcu.Pin44=VP_LPTIM1_VS_LPTIM_counterModeInternalClock
Mcu.Pin45=VP_RTC_VS_RTC_Activate
Mcu.Pin42=PB8
board=custom
Mcu.Pin43=VP_IWDG_VS_IWDG
SAI1.IPParameters=Instance-SAI_A_MasterWithClock,VirtualMode-SAI_A_MasterWithClock,MClockEnable-SAI_A_MasterWithClock,RealAudioFreq-SAI_A_MasterWithClock,ErrorAudioFreq-SAI_A_MasterWithClock,InitProtocol-SAI_A_MasterWithClock,VirtualProtocol-SAI_A_BASIC,AudioFrequency-SAI_A_MasterWithClock,OutputDrive-SAI_A_MasterWithClock,Instance-SAI_B_SyncSlave,VirtualMode-SAI_B_SyncSlave,InitProtocol-SAI_B_SyncSlave,VirtualProtocol-SAI_B_BASIC
RCC.VCOOutputFreq_Value=160000000
ProjectManager.LastFirmware=true
PB15.Mode=Full_Duplex_Master
TIM4.Channel-PWM\ Generation2\ CH2=TIM_CHANNEL_2
RCC.APB2Freq_Value=80000000
PE14.Signal=QUADSPI_BK1_IO2
RCC.UART4Freq_Value=80000000
SPI3.CalculateBaudRate=40.0 MBits/s
PE6.Mode=SAI_A_MasterWithClock
PE15.Signal=QUADSPI_BK1_IO3
MxCube.Version=5.6.0
Mcu.Pin37=PC12
Mcu.Pin38=PD2
Mcu.Pin35=PC10
VP_TIM2_VS_ClockSourceINT.Mode=Internal
RCC.I2C1Freq_Value=80000000
SH.S_TIM2_CH3.0=TIM2_CH3,PWM Generation3 CH3
Mcu.Pin36=PC11
SPI1.Mode=SPI_MODE_MASTER
Mcu.Pin39=PB3 (JTDO-TRACESWO)
PE14.Mode=Single Bank
PB3\ (JTDO-TRACESWO).Mode=TX_Only_Simplex_Unidirect_Master
RCC.RNGFreq_Value=48000000
PE5.Mode=SAI_A_MasterWithClock
RCC.PLLSAI1QoutputFreq_Value=48000000
Mcu.Pin30=PA10
RCC.ADCFreq_Value=48000000
VP_SYS_VS_Systick.Mode=SysTick
TIM2.Channel-PWM\ Generation3\ CH3=TIM_CHANNEL_3
Mcu.Pin33=PA13 (JTMS-SWDIO)
Mcu.Pin34=PA14 (JTCK-SWCLK)
Mcu.Pin31=PA11
Mcu.Pin32=PA12
VP_TIM16_VS_ClockSourceINT.Signal=TIM16_VS_ClockSourceINT
NVIC.NonMaskableInt_IRQn=true\:0\:0\:false\:false\:true\:false\:false
SH.S_TIM2_CH3.ConfNb=1
PE6.Signal=SAI1_SD_A
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,LPTIM1Freq_Value,LPTIM2Freq_Value,LPUART1Freq_Value,LSCOPinFreq_Value,LSI_VALUE,MCO1PinFreq_Value,MSI_VALUE,PLLN,PLLPoutputFreq_Value,PLLQoutputFreq_Value,PLLRCLKFreq_Value,PLLSAI1N,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=STM32L475V(C-E-G)Tx
RCC.LPTIM2Freq_Value=80000000
Mcu.Pin26=PB15
PE12.Signal=QUADSPI_BK1_IO0
Mcu.Pin27=PC8
PA2.Signal=USART2_TX
Mcu.Pin24=PB13
ProjectManager.UnderRoot=false
Mcu.Pin25=PB14
PE13.Locked=true
Mcu.IP8=SDMMC1
Mcu.IP9=SPI1
Mcu.Pin28=PC9
Mcu.IP6=RTC
PC8.Mode=SD_4_bits_Wide_bus
Mcu.Pin29=PA9
Mcu.IP7=SAI1
ProjectManager.CoupleFile=false
PA13\ (JTMS-SWDIO).Mode=Serial_Wire
RCC.SYSCLKFreq_VALUE=80000000
Mcu.Pin22=PB10
PB5.Signal=SPI3_MOSI
Mcu.Pin23=PB11
Mcu.Pin20=PE14
ADC1.master=1
Mcu.Pin21=PE15
PA12.Mode=Device_Only
NVIC.ForceEnableDMAVector=true
RCC.PLLSAI2PoutputFreq_Value=9142857.142857144
KeepUserPlacement=false
PC14-OSC32_IN\ (PC14).Signal=RCC_OSC32_IN
NVIC.MemoryManagement_IRQn=true\:0\:0\:false\:false\:true\:false\:false
ProjectManager.CompilerOptimize=6
SAI1.Instance-SAI_B_SyncSlave=SAI$Index_Block_B
PA11.Signal=USB_OTG_FS_DM
VP_IWDG_VS_IWDG.Signal=IWDG_VS_IWDG
VP_TIM15_VS_ClockSourceINT.Mode=Internal
ProjectManager.HeapSize=0x200
Mcu.Pin15=PE9
NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false
Mcu.Pin16=PE10
Mcu.Pin13=PA7
SH.S_TIM2_CH4.0=TIM2_CH4,PWM Generation4 CH4
Mcu.Pin14=PC5
Mcu.Pin19=PE13
ProjectManager.ComputerToolchain=false
Mcu.Pin17=PE11
RCC.HSI_VALUE=16000000
Mcu.Pin18=PE12
VP_TIM4_VS_ClockSourceINT.Mode=Internal
SAI1.VirtualProtocol-SAI_B_BASIC=VM_BASIC_PROTOCOL
NVIC.PriorityGroup=NVIC_PRIORITYGROUP_4
ADC1.NbrOfConversionFlag=1 ADC1.NbrOfConversionFlag=1
Mcu.Pin11=PA5 ADC1.OffsetNumber-15\#ChannelRegularConversion=ADC_OFFSET_NONE
Mcu.Pin12=PA6 ADC1.Rank-15\#ChannelRegularConversion=1
RCC.PLLN=20 ADC1.SamplingTime-15\#ChannelRegularConversion=ADC_SAMPLETIME_2CYCLES_5
ADC1.master=1
File.Version=6
KeepUserPlacement=false
Mcu.Family=STM32L4
Mcu.IP0=ADC1
Mcu.IP1=DAC1
Mcu.IP10=SPI1
Mcu.IP11=SPI2
Mcu.IP12=SPI3
Mcu.IP13=SYS
Mcu.IP14=TIM1
Mcu.IP15=TIM2
Mcu.IP16=TIM4
Mcu.IP17=TIM15
Mcu.IP18=TIM16
Mcu.IP19=TIM17
Mcu.IP2=IWDG
Mcu.IP20=USART1
Mcu.IP21=USART2
Mcu.IP22=USB_OTG_FS
Mcu.IP3=LPTIM1
Mcu.IP4=NVIC
Mcu.IP5=QUADSPI
Mcu.IP6=RCC
Mcu.IP7=RTC
Mcu.IP8=SAI1
Mcu.IP9=SDMMC1
Mcu.IPNb=23
Mcu.Name=STM32L475V(C-E-G)Tx
Mcu.Package=LQFP100
Mcu.Pin0=PE2
Mcu.Pin1=PE3
Mcu.Pin10=PA3 Mcu.Pin10=PA3
PB7.Locked=true Mcu.Pin11=PA4
PE3.Signal=SAI1_SD_B Mcu.Pin12=PA5
Mcu.Pin13=PA6
Mcu.Pin14=PA7
Mcu.Pin15=PC5
Mcu.Pin16=PE9
Mcu.Pin17=PE10
Mcu.Pin18=PE11
Mcu.Pin19=PE12
Mcu.Pin2=PE4
Mcu.Pin20=PE13
Mcu.Pin21=PE14
Mcu.Pin22=PE15
Mcu.Pin23=PB10
Mcu.Pin24=PB11
Mcu.Pin25=PB13
Mcu.Pin26=PB14
Mcu.Pin27=PB15
Mcu.Pin28=PC8
Mcu.Pin29=PC9
Mcu.Pin3=PE5
Mcu.Pin30=PA9
Mcu.Pin31=PA10
Mcu.Pin32=PA11
Mcu.Pin33=PA12
Mcu.Pin34=PA13 (JTMS-SWDIO)
Mcu.Pin35=PA14 (JTCK-SWCLK)
Mcu.Pin36=PC10
Mcu.Pin37=PC11
Mcu.Pin38=PC12
Mcu.Pin39=PD2
Mcu.Pin4=PE6
Mcu.Pin40=PB3 (JTDO-TRACESWO)
Mcu.Pin41=PB5
Mcu.Pin42=PB7
Mcu.Pin43=PB8
Mcu.Pin44=VP_IWDG_VS_IWDG
Mcu.Pin45=VP_LPTIM1_VS_LPTIM_counterModeInternalClock
Mcu.Pin46=VP_RTC_VS_RTC_Activate
Mcu.Pin47=VP_SAI1_VP_$IpInstance_SAIA_SAI_BASIC
Mcu.Pin48=VP_SAI1_VP_$IpInstance_SAIB_SAI_BASIC
Mcu.Pin49=VP_SYS_VS_Systick
Mcu.Pin5=PC14-OSC32_IN (PC14)
Mcu.Pin50=VP_TIM1_VS_ClockSourceINT
Mcu.Pin51=VP_TIM2_VS_ClockSourceINT
Mcu.Pin52=VP_TIM4_VS_ClockSourceINT
Mcu.Pin53=VP_TIM15_VS_ClockSourceINT
Mcu.Pin54=VP_TIM16_VS_ClockSourceINT
Mcu.Pin55=VP_TIM17_VS_ClockSourceINT
Mcu.Pin6=PC15-OSC32_OUT (PC15)
Mcu.Pin7=PH0-OSC_IN (PH0)
Mcu.Pin8=PH1-OSC_OUT (PH1)
Mcu.Pin9=PA2
Mcu.PinsNb=56
Mcu.ThirdPartyNb=0
Mcu.UserConstants=
Mcu.UserName=STM32L475VETx
MxCube.Version=6.0.1
MxDb.Version=DB.6.0.0
NVIC.BusFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false
NVIC.DebugMonitor_IRQn=true\:0\:0\:false\:false\:true\:false\:false
NVIC.ForceEnableDMAVector=true
NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false
NVIC.MemoryManagement_IRQn=true\:0\:0\:false\:false\:true\:false\:false
NVIC.NonMaskableInt_IRQn=true\:0\:0\:false\:false\:true\:false\:false
NVIC.OTG_FS_IRQn=true\:0\:0\:false\:false\:true\:true\:true
NVIC.PendSV_IRQn=true\:0\:0\:false\:false\:true\:false\:false
NVIC.PriorityGroup=NVIC_PRIORITYGROUP_4
NVIC.SVCall_IRQn=true\:0\:0\:false\:false\:true\:false\:false
NVIC.SysTick_IRQn=true\:0\:0\:false\:false\:true\:false\:true
NVIC.UsageFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false
PA10.Mode=Asynchronous
PA10.Signal=USART1_RX
PA11.Mode=Device_Only
PA11.Signal=USB_OTG_FS_DM
PA12.Mode=Device_Only
PA12.Signal=USB_OTG_FS_DP
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.Mode=Asynchronous
PB8.Signal=S_TIM4_CH3 PA2.Signal=USART2_TX
VP_LPTIM1_VS_LPTIM_counterModeInternalClock.Signal=LPTIM1_VS_LPTIM_counterModeInternalClock PA3.Mode=Asynchronous
RCC.PWRFreq_Value=80000000 PA3.Signal=USART2_RX
PC9.Signal=SDMMC1_D1 PA4.Signal=COMP_DAC11_group
PD2.Signal=SDMMC1_CMD PA5.Mode=Full_Duplex_Master
RCC.I2C2Freq_Value=80000000 PA5.Signal=SPI1_SCK
RCC.APB1Freq_Value=80000000 PA6.Mode=Full_Duplex_Master
SAI1.InitProtocol-SAI_B_SyncSlave=Enable PA6.Signal=SPI1_MISO
ProjectManager.DeviceId=STM32L475VETx PA7.Mode=Full_Duplex_Master
ProjectManager.LibraryCopy=0
PE15.Mode=Single Bank
PA7.Signal=SPI1_MOSI PA7.Signal=SPI1_MOSI
PA9.Mode=Asynchronous
PA9.Signal=USART1_TX
PB10.Signal=S_TIM2_CH3
PB11.Signal=S_TIM2_CH4
PB13.Locked=true
PB13.Mode=Full_Duplex_Master
PB13.Signal=SPI2_SCK
PB14.Locked=true
PB14.Mode=Full_Duplex_Master
PB14.Signal=SPI2_MISO
PB15.Locked=true
PB15.Mode=Full_Duplex_Master
PB15.Signal=SPI2_MOSI
PB3\ (JTDO-TRACESWO).Locked=true
PB3\ (JTDO-TRACESWO).Mode=TX_Only_Simplex_Unidirect_Master
PB3\ (JTDO-TRACESWO).Signal=SPI3_SCK
PB5.Locked=true
PB5.Mode=TX_Only_Simplex_Unidirect_Master
PB5.Signal=SPI3_MOSI
PB7.Locked=true
PB7.Signal=S_TIM4_CH2
PB8.Locked=true
PB8.Signal=S_TIM4_CH3
PC10.Mode=SD_4_bits_Wide_bus
PC10.Signal=SDMMC1_D2
PC11.Mode=SD_4_bits_Wide_bus
PC11.Signal=SDMMC1_D3
PC12.Mode=SD_4_bits_Wide_bus
PC12.Signal=SDMMC1_CK
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
PC5.Signal=ADCx_IN14
PC8.Mode=SD_4_bits_Wide_bus
PC8.Signal=SDMMC1_D0
PC9.Mode=SD_4_bits_Wide_bus
PC9.Signal=SDMMC1_D1
PD2.Mode=SD_4_bits_Wide_bus
PD2.Signal=SDMMC1_CMD
PE10.Mode=Single Bank
PE10.Signal=QUADSPI_CLK
PE11.Mode=Single Bank
PE11.Signal=QUADSPI_NCS
PE12.Locked=true
PE12.Mode=Single Bank
PE12.Signal=QUADSPI_BK1_IO0
PE13.Locked=true
PE13.Mode=Single Bank
PE13.Signal=QUADSPI_BK1_IO1
PE14.Locked=true
PE14.Mode=Single Bank
PE14.Signal=QUADSPI_BK1_IO2
PE15.Locked=true
PE15.Mode=Single Bank
PE15.Signal=QUADSPI_BK1_IO3
PE2.Mode=SAI_A_MasterWithClock
PE2.Signal=SAI1_MCLK_A
PE3.Mode=SAI_B_SyncSlave
PE3.Signal=SAI1_SD_B
PE4.Mode=SAI_A_MasterWithClock
PE4.Signal=SAI1_FS_A
PE5.Mode=SAI_A_MasterWithClock
PE5.Signal=SAI1_SCK_A
PE6.Mode=SAI_A_MasterWithClock
PE6.Signal=SAI1_SD_A
PE9.Signal=S_TIM1_CH1
PH0-OSC_IN\ (PH0).Mode=HSE-External-Oscillator
PH0-OSC_IN\ (PH0).Signal=RCC_OSC_IN
PH1-OSC_OUT\ (PH1).Mode=HSE-External-Oscillator
PH1-OSC_OUT\ (PH1).Signal=RCC_OSC_OUT
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=STM32L475VETx
ProjectManager.FirmwarePackage=STM32Cube FW_L4 V1.16.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=STM32L475VE.ioc
ProjectManager.ProjectName=STM32L475VE
ProjectManager.RegisterCallBack=
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_USART1_UART_Init-USART1-false-HAL-true,4-MX_USART2_UART_Init-USART2-false-HAL-true,5-MX_QUADSPI_Init-QUADSPI-false-HAL-true,6-MX_SPI1_Init-SPI1-false-HAL-true,7-MX_SPI2_Init-SPI2-false-HAL-true,8-MX_RTC_Init-RTC-false-HAL-true,9-MX_ADC1_Init-ADC1-false-HAL-true,10-MX_IWDG_Init-IWDG-false-HAL-true,11-MX_TIM17_Init-TIM17-false-HAL-true,12-MX_TIM16_Init-TIM16-false-HAL-true,13-MX_TIM15_Init-TIM15-false-HAL-true,14-MX_TIM4_Init-TIM4-false-HAL-true,15-MX_TIM1_Init-TIM1-false-HAL-true,16-MX_SAI1_Init-SAI1-false-HAL-true,17-MX_SPI3_Init-SPI3-false-HAL-true,18-MX_TIM2_Init-TIM2-false-HAL-true,19-MX_USB_OTG_FS_PCD_Init-USB_OTG_FS-false-HAL-true,20-MX_LPTIM1_Init-LPTIM1-false-HAL-true,21-MX_SDMMC1_SD_Init-SDMMC1-false-HAL-true,22-MX_DAC1_Init-DAC1-false-HAL-true
RCC.ADCFreq_Value=48000000
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,LPTIM1Freq_Value,LPTIM2Freq_Value,LPUART1Freq_Value,LSCOPinFreq_Value,LSI_VALUE,MCO1PinFreq_Value,MSI_VALUE,PLLN,PLLPoutputFreq_Value,PLLQoutputFreq_Value,PLLRCLKFreq_Value,PLLSAI1N,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.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=20
RCC.PLLPoutputFreq_Value=22857142.85714286
RCC.PLLQoutputFreq_Value=80000000
RCC.PLLRCLKFreq_Value=80000000
RCC.PLLSAI1N=12
RCC.PLLSAI1PoutputFreq_Value=13714285.714285715
RCC.PLLSAI1QoutputFreq_Value=48000000
RCC.PLLSAI1RoutputFreq_Value=48000000
RCC.PLLSAI2PoutputFreq_Value=9142857.142857144
RCC.PLLSAI2RoutputFreq_Value=32000000
RCC.PLLSourceVirtual=RCC_PLLSOURCE_HSE
RCC.PWRFreq_Value=80000000
RCC.RNGFreq_Value=48000000
RCC.RTCClockSelection=RCC_RTCCLKSOURCE_LSE
RCC.RTCFreq_Value=32768
RCC.SAI1Freq_Value=13714285.714285715
RCC.SAI2Freq_Value=13714285.714285715
RCC.SDMMCFreq_Value=48000000
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
RCC.USART3Freq_Value=80000000
RCC.USBFreq_Value=48000000
RCC.VCOInputFreq_Value=8000000
RCC.VCOOutputFreq_Value=160000000
RCC.VCOSAI1OutputFreq_Value=96000000
RCC.VCOSAI2OutputFreq_Value=64000000
SAI1.AudioFrequency-SAI_A_MasterWithClock=SAI_AUDIO_FREQUENCY_44K
SAI1.ErrorAudioFreq-SAI_A_MasterWithClock=-72.09 %
SAI1.IPParameters=Instance-SAI_A_MasterWithClock,VirtualMode-SAI_A_MasterWithClock,MClockEnable-SAI_A_MasterWithClock,RealAudioFreq-SAI_A_MasterWithClock,ErrorAudioFreq-SAI_A_MasterWithClock,InitProtocol-SAI_A_MasterWithClock,VirtualProtocol-SAI_A_BASIC,AudioFrequency-SAI_A_MasterWithClock,OutputDrive-SAI_A_MasterWithClock,Instance-SAI_B_SyncSlave,VirtualMode-SAI_B_SyncSlave,InitProtocol-SAI_B_SyncSlave,VirtualProtocol-SAI_B_BASIC
SAI1.InitProtocol-SAI_A_MasterWithClock=Enable
SAI1.InitProtocol-SAI_B_SyncSlave=Enable
SAI1.Instance-SAI_A_MasterWithClock=SAI$Index_Block_A
SAI1.Instance-SAI_B_SyncSlave=SAI$Index_Block_B
SAI1.MClockEnable-SAI_A_MasterWithClock=SAI_MASTERCLOCK_ENABLE
SAI1.OutputDrive-SAI_A_MasterWithClock=SAI_OUTPUTDRIVE_ENABLE
SAI1.RealAudioFreq-SAI_A_MasterWithClock=53.571 KHz
SAI1.VirtualMode-SAI_A_MasterWithClock=VM_MASTER
SAI1.VirtualMode-SAI_B_SyncSlave=VM_SLAVE
SAI1.VirtualProtocol-SAI_A_BASIC=VM_BASIC_PROTOCOL
SAI1.VirtualProtocol-SAI_B_BASIC=VM_BASIC_PROTOCOL
SH.ADCx_IN14.0=ADC1_IN14,IN14-Single-Ended
SH.ADCx_IN14.ConfNb=1
SH.COMP_DAC11_group.0=DAC1_OUT1,DAC_OUT1
SH.COMP_DAC11_group.ConfNb=1
SH.S_TIM1_CH1.0=TIM1_CH1,PWM Generation1 CH1
SH.S_TIM1_CH1.ConfNb=1
SH.S_TIM2_CH3.0=TIM2_CH3,PWM Generation3 CH3
SH.S_TIM2_CH3.ConfNb=1
SH.S_TIM2_CH4.0=TIM2_CH4,PWM Generation4 CH4
SH.S_TIM2_CH4.ConfNb=1
SH.S_TIM4_CH2.0=TIM4_CH2,PWM Generation2 CH2
SH.S_TIM4_CH2.ConfNb=1
SH.S_TIM4_CH3.0=TIM4_CH3,PWM Generation3 CH3
SH.S_TIM4_CH3.ConfNb=1
SPI1.CalculateBaudRate=40.0 MBits/s
SPI1.Direction=SPI_DIRECTION_2LINES
SPI1.IPParameters=VirtualType,Mode,Direction,CalculateBaudRate
SPI1.Mode=SPI_MODE_MASTER
SPI1.VirtualType=VM_MASTER
SPI2.CalculateBaudRate=40.0 MBits/s
SPI2.Direction=SPI_DIRECTION_2LINES
SPI2.IPParameters=VirtualType,Mode,Direction,CalculateBaudRate
SPI2.Mode=SPI_MODE_MASTER
SPI2.VirtualType=VM_MASTER
SPI3.CalculateBaudRate=40.0 MBits/s
SPI3.Direction=SPI_DIRECTION_2LINES
SPI3.IPParameters=VirtualType,Mode,Direction,CalculateBaudRate
SPI3.Mode=SPI_MODE_MASTER
SPI3.VirtualType=VM_MASTER
TIM1.Channel-PWM\ Generation1\ CH1=TIM_CHANNEL_1
TIM1.IPParameters=Channel-PWM Generation1 CH1
TIM2.Channel-PWM\ Generation3\ CH3=TIM_CHANNEL_3
TIM2.Channel-PWM\ Generation4\ CH4=TIM_CHANNEL_4
TIM2.IPParameters=Channel-PWM Generation3 CH3,Channel-PWM Generation4 CH4
TIM4.Channel-PWM\ Generation2\ CH2=TIM_CHANNEL_2
TIM4.Channel-PWM\ Generation3\ CH3=TIM_CHANNEL_3
TIM4.IPParameters=Channel-PWM Generation3 CH3,Channel-PWM Generation2 CH2
USART1.IPParameters=VirtualMode-Asynchronous
USART1.VirtualMode-Asynchronous=VM_ASYNC
USART2.IPParameters=VirtualMode-Asynchronous
USART2.VirtualMode-Asynchronous=VM_ASYNC
USB_OTG_FS.IPParameters=VirtualMode
USB_OTG_FS.VirtualMode=Device_Only
VP_IWDG_VS_IWDG.Mode=IWDG_Activate
VP_IWDG_VS_IWDG.Signal=IWDG_VS_IWDG
VP_LPTIM1_VS_LPTIM_counterModeInternalClock.Mode=Counts__internal_clock_event_00
VP_LPTIM1_VS_LPTIM_counterModeInternalClock.Signal=LPTIM1_VS_LPTIM_counterModeInternalClock
VP_RTC_VS_RTC_Activate.Mode=RTC_Enabled
VP_RTC_VS_RTC_Activate.Signal=RTC_VS_RTC_Activate
VP_SAI1_VP_$IpInstance_SAIA_SAI_BASIC.Mode=SAI_A_BASIC
VP_SAI1_VP_$IpInstance_SAIA_SAI_BASIC.Signal=SAI1_VP_$IpInstance_SAIA_SAI_BASIC
VP_SAI1_VP_$IpInstance_SAIB_SAI_BASIC.Mode=SAI_B_BASIC
VP_SAI1_VP_$IpInstance_SAIB_SAI_BASIC.Signal=SAI1_VP_$IpInstance_SAIB_SAI_BASIC
VP_SYS_VS_Systick.Mode=SysTick
VP_SYS_VS_Systick.Signal=SYS_VS_Systick
VP_TIM15_VS_ClockSourceINT.Mode=Internal
VP_TIM15_VS_ClockSourceINT.Signal=TIM15_VS_ClockSourceINT
VP_TIM16_VS_ClockSourceINT.Mode=Enable_Timer
VP_TIM16_VS_ClockSourceINT.Signal=TIM16_VS_ClockSourceINT
VP_TIM17_VS_ClockSourceINT.Mode=Enable_Timer
VP_TIM17_VS_ClockSourceINT.Signal=TIM17_VS_ClockSourceINT
VP_TIM1_VS_ClockSourceINT.Mode=Internal
VP_TIM1_VS_ClockSourceINT.Signal=TIM1_VS_ClockSourceINT
VP_TIM2_VS_ClockSourceINT.Mode=Internal
VP_TIM2_VS_ClockSourceINT.Signal=TIM2_VS_ClockSourceINT
VP_TIM4_VS_ClockSourceINT.Mode=Internal
VP_TIM4_VS_ClockSourceINT.Signal=TIM4_VS_ClockSourceINT
board=custom

View File

@ -37,7 +37,6 @@
****************************************************************************** ******************************************************************************
*/ */
/* USER CODE END Header */ /* USER CODE END Header */
/* Includes ------------------------------------------------------------------*/ /* Includes ------------------------------------------------------------------*/
#include "main.h" #include "main.h"
@ -64,6 +63,8 @@
/* Private variables ---------------------------------------------------------*/ /* Private variables ---------------------------------------------------------*/
ADC_HandleTypeDef hadc1; ADC_HandleTypeDef hadc1;
DAC_HandleTypeDef hdac1;
IWDG_HandleTypeDef hiwdg; IWDG_HandleTypeDef hiwdg;
LPTIM_HandleTypeDef hlptim1; LPTIM_HandleTypeDef hlptim1;
@ -120,6 +121,7 @@ static void MX_TIM2_Init(void);
static void MX_USB_OTG_FS_PCD_Init(void); static void MX_USB_OTG_FS_PCD_Init(void);
static void MX_LPTIM1_Init(void); static void MX_LPTIM1_Init(void);
static void MX_SDMMC1_SD_Init(void); static void MX_SDMMC1_SD_Init(void);
static void MX_DAC1_Init(void);
/* USER CODE BEGIN PFP */ /* USER CODE BEGIN PFP */
/* Private function prototypes -----------------------------------------------*/ /* Private function prototypes -----------------------------------------------*/
@ -177,6 +179,7 @@ int main(void)
MX_USB_OTG_FS_PCD_Init(); MX_USB_OTG_FS_PCD_Init();
MX_LPTIM1_Init(); MX_LPTIM1_Init();
MX_SDMMC1_SD_Init(); MX_SDMMC1_SD_Init();
MX_DAC1_Init();
/* USER CODE BEGIN 2 */ /* USER CODE BEGIN 2 */
/* USER CODE END 2 */ /* USER CODE END 2 */
@ -208,7 +211,8 @@ void SystemClock_Config(void)
*/ */
HAL_PWR_EnableBkUpAccess(); HAL_PWR_EnableBkUpAccess();
__HAL_RCC_LSEDRIVE_CONFIG(RCC_LSEDRIVE_LOW); __HAL_RCC_LSEDRIVE_CONFIG(RCC_LSEDRIVE_LOW);
/** Initializes the CPU, AHB and APB busses clocks /** Initializes the RCC Oscillators according to the specified parameters
* in the RCC_OscInitTypeDef structure.
*/ */
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_LSI|RCC_OSCILLATORTYPE_HSE RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_LSI|RCC_OSCILLATORTYPE_HSE
|RCC_OSCILLATORTYPE_LSE; |RCC_OSCILLATORTYPE_LSE;
@ -226,7 +230,7 @@ void SystemClock_Config(void)
{ {
Error_Handler(); Error_Handler();
} }
/** Initializes the CPU, AHB and APB busses clocks /** Initializes the CPU, AHB and APB buses clocks
*/ */
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK
|RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2; |RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2;
@ -301,7 +305,6 @@ static void MX_ADC1_Init(void)
hadc1.Init.ContinuousConvMode = DISABLE; hadc1.Init.ContinuousConvMode = DISABLE;
hadc1.Init.NbrOfConversion = 1; hadc1.Init.NbrOfConversion = 1;
hadc1.Init.DiscontinuousConvMode = DISABLE; hadc1.Init.DiscontinuousConvMode = DISABLE;
hadc1.Init.NbrOfDiscConversion = 1;
hadc1.Init.ExternalTrigConv = ADC_SOFTWARE_START; hadc1.Init.ExternalTrigConv = ADC_SOFTWARE_START;
hadc1.Init.ExternalTrigConvEdge = ADC_EXTERNALTRIGCONVEDGE_NONE; hadc1.Init.ExternalTrigConvEdge = ADC_EXTERNALTRIGCONVEDGE_NONE;
hadc1.Init.DMAContinuousRequests = DISABLE; hadc1.Init.DMAContinuousRequests = DISABLE;
@ -336,6 +339,47 @@ static void MX_ADC1_Init(void)
} }
/**
* @brief DAC1 Initialization Function
* @param None
* @retval None
*/
static void MX_DAC1_Init(void)
{
/* USER CODE BEGIN DAC1_Init 0 */
/* USER CODE END DAC1_Init 0 */
DAC_ChannelConfTypeDef sConfig = {0};
/* USER CODE BEGIN DAC1_Init 1 */
/* USER CODE END DAC1_Init 1 */
/** DAC Initialization
*/
hdac1.Instance = DAC1;
if (HAL_DAC_Init(&hdac1) != HAL_OK)
{
Error_Handler();
}
/** DAC channel OUT1 config
*/
sConfig.DAC_SampleAndHold = DAC_SAMPLEANDHOLD_DISABLE;
sConfig.DAC_Trigger = DAC_TRIGGER_NONE;
sConfig.DAC_OutputBuffer = DAC_OUTPUTBUFFER_ENABLE;
sConfig.DAC_ConnectOnChipPeripheral = DAC_CHIPCONNECT_DISABLE;
sConfig.DAC_UserTrimming = DAC_TRIMMING_FACTORY;
if (HAL_DAC_ConfigChannel(&hdac1, &sConfig, DAC_CHANNEL_1) != HAL_OK)
{
Error_Handler();
}
/* USER CODE BEGIN DAC1_Init 2 */
/* USER CODE END DAC1_Init 2 */
}
/** /**
* @brief IWDG Initialization Function * @brief IWDG Initialization Function
* @param None * @param None
@ -695,7 +739,7 @@ static void MX_TIM1_Init(void)
htim1.Instance = TIM1; htim1.Instance = TIM1;
htim1.Init.Prescaler = 0; htim1.Init.Prescaler = 0;
htim1.Init.CounterMode = TIM_COUNTERMODE_UP; htim1.Init.CounterMode = TIM_COUNTERMODE_UP;
htim1.Init.Period = 0; htim1.Init.Period = 65535;
htim1.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1; htim1.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
htim1.Init.RepetitionCounter = 0; htim1.Init.RepetitionCounter = 0;
htim1.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE; htim1.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
@ -774,7 +818,7 @@ static void MX_TIM2_Init(void)
htim2.Instance = TIM2; htim2.Instance = TIM2;
htim2.Init.Prescaler = 0; htim2.Init.Prescaler = 0;
htim2.Init.CounterMode = TIM_COUNTERMODE_UP; htim2.Init.CounterMode = TIM_COUNTERMODE_UP;
htim2.Init.Period = 0; htim2.Init.Period = 4294967295;
htim2.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1; htim2.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
htim2.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE; htim2.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
if (HAL_TIM_Base_Init(&htim2) != HAL_OK) if (HAL_TIM_Base_Init(&htim2) != HAL_OK)
@ -837,7 +881,7 @@ static void MX_TIM4_Init(void)
htim4.Instance = TIM4; htim4.Instance = TIM4;
htim4.Init.Prescaler = 0; htim4.Init.Prescaler = 0;
htim4.Init.CounterMode = TIM_COUNTERMODE_UP; htim4.Init.CounterMode = TIM_COUNTERMODE_UP;
htim4.Init.Period = 0; htim4.Init.Period = 65535;
htim4.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1; htim4.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
htim4.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE; htim4.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
if (HAL_TIM_Base_Init(&htim4) != HAL_OK) if (HAL_TIM_Base_Init(&htim4) != HAL_OK)
@ -899,7 +943,7 @@ static void MX_TIM15_Init(void)
htim15.Instance = TIM15; htim15.Instance = TIM15;
htim15.Init.Prescaler = 0; htim15.Init.Prescaler = 0;
htim15.Init.CounterMode = TIM_COUNTERMODE_UP; htim15.Init.CounterMode = TIM_COUNTERMODE_UP;
htim15.Init.Period = 0; htim15.Init.Period = 65535;
htim15.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1; htim15.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
htim15.Init.RepetitionCounter = 0; htim15.Init.RepetitionCounter = 0;
htim15.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE; htim15.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
@ -942,7 +986,7 @@ static void MX_TIM16_Init(void)
htim16.Instance = TIM16; htim16.Instance = TIM16;
htim16.Init.Prescaler = 0; htim16.Init.Prescaler = 0;
htim16.Init.CounterMode = TIM_COUNTERMODE_UP; htim16.Init.CounterMode = TIM_COUNTERMODE_UP;
htim16.Init.Period = 0; htim16.Init.Period = 65535;
htim16.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1; htim16.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
htim16.Init.RepetitionCounter = 0; htim16.Init.RepetitionCounter = 0;
htim16.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE; htim16.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
@ -974,7 +1018,7 @@ static void MX_TIM17_Init(void)
htim17.Instance = TIM17; htim17.Instance = TIM17;
htim17.Init.Prescaler = 0; htim17.Init.Prescaler = 0;
htim17.Init.CounterMode = TIM_COUNTERMODE_UP; htim17.Init.CounterMode = TIM_COUNTERMODE_UP;
htim17.Init.Period = 0; htim17.Init.Period = 65535;
htim17.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1; htim17.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
htim17.Init.RepetitionCounter = 0; htim17.Init.RepetitionCounter = 0;
htim17.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE; htim17.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;

View File

@ -160,6 +160,67 @@ void HAL_ADC_MspDeInit(ADC_HandleTypeDef* hadc)
} }
/**
* @brief DAC MSP Initialization
* This function configures the hardware resources used in this example
* @param hdac: DAC handle pointer
* @retval None
*/
void HAL_DAC_MspInit(DAC_HandleTypeDef* hdac)
{
GPIO_InitTypeDef GPIO_InitStruct = {0};
if(hdac->Instance==DAC1)
{
/* USER CODE BEGIN DAC1_MspInit 0 */
/* USER CODE END DAC1_MspInit 0 */
/* Peripheral clock enable */
__HAL_RCC_DAC1_CLK_ENABLE();
__HAL_RCC_GPIOA_CLK_ENABLE();
/**DAC1 GPIO Configuration
PA4 ------> DAC1_OUT1
*/
GPIO_InitStruct.Pin = GPIO_PIN_4;
GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
GPIO_InitStruct.Pull = GPIO_NOPULL;
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
/* USER CODE BEGIN DAC1_MspInit 1 */
/* USER CODE END DAC1_MspInit 1 */
}
}
/**
* @brief DAC MSP De-Initialization
* This function freeze the hardware resources used in this example
* @param hdac: DAC handle pointer
* @retval None
*/
void HAL_DAC_MspDeInit(DAC_HandleTypeDef* hdac)
{
if(hdac->Instance==DAC1)
{
/* USER CODE BEGIN DAC1_MspDeInit 0 */
/* USER CODE END DAC1_MspDeInit 0 */
/* Peripheral clock disable */
__HAL_RCC_DAC1_CLK_DISABLE();
/**DAC1 GPIO Configuration
PA4 ------> DAC1_OUT1
*/
HAL_GPIO_DeInit(GPIOA, GPIO_PIN_4);
/* USER CODE BEGIN DAC1_MspDeInit 1 */
/* USER CODE END DAC1_MspDeInit 1 */
}
}
/** /**
* @brief LPTIM MSP Initialization * @brief LPTIM MSP Initialization
* This function configures the hardware resources used in this example * This function configures the hardware resources used in this example

View File

@ -308,6 +308,16 @@ menu "On-chip Peripheral Drivers"
default n default n
endif endif
menuconfig BSP_USING_DAC
bool "Enable DAC"
default n
select RT_USING_DAC
if BSP_USING_DAC
config BSP_USING_DAC1
bool "Enable DAC1"
default n
endif
menuconfig BSP_USING_ONCHIP_RTC menuconfig BSP_USING_ONCHIP_RTC
bool "Enable RTC" bool "Enable RTC"
select RT_USING_RTC select RT_USING_RTC