Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: STM32L4xx_HAL_Driver CMSIS_DSP_401
stm32l4xx_hal_conf.h
00001 /** 00002 ****************************************************************************** 00003 * @file stm32l4xx_hal_conf.h 00004 * @author MCD Application Team 00005 * @version V1.1.0 00006 * @date 16-September-2015 00007 * @brief HAL configuration file. 00008 ****************************************************************************** 00009 * @attention 00010 * 00011 * <h2><center>© COPYRIGHT(c) 2015 STMicroelectronics</center></h2> 00012 * 00013 * Redistribution and use in source and binary forms, with or without modification, 00014 * are permitted provided that the following conditions are met: 00015 * 1. Redistributions of source code must retain the above copyright notice, 00016 * this list of conditions and the following disclaimer. 00017 * 2. Redistributions in binary form must reproduce the above copyright notice, 00018 * this list of conditions and the following disclaimer in the documentation 00019 * and/or other materials provided with the distribution. 00020 * 3. Neither the name of STMicroelectronics nor the names of its contributors 00021 * may be used to endorse or promote products derived from this software 00022 * without specific prior written permission. 00023 * 00024 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 00025 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00026 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 00027 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 00028 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 00029 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 00030 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 00031 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 00032 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 00033 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00034 * 00035 ****************************************************************************** 00036 */ 00037 00038 /* Define to prevent recursive inclusion -------------------------------------*/ 00039 #ifndef __STM32L4xx_HAL_CONF_H 00040 #define __STM32L4xx_HAL_CONF_H 00041 00042 #ifdef __cplusplus 00043 extern "C" { 00044 #endif 00045 00046 /* Exported types ------------------------------------------------------------*/ 00047 /* Exported constants --------------------------------------------------------*/ 00048 00049 /* ########################## Module Selection ############################## */ 00050 /** 00051 * @brief This is the list of modules to be used in the HAL driver 00052 */ 00053 #define HAL_MODULE_ENABLED 00054 /* #define HAL_ADC_MODULE_ENABLED */ 00055 /* #define HAL_CAN_MODULE_ENABLED */ 00056 /* #define HAL_COMP_MODULE_ENABLED */ 00057 #define HAL_CORTEX_MODULE_ENABLED 00058 /* #define HAL_CRC_MODULE_ENABLED */ 00059 /* #define HAL_CRYP_MODULE_ENABLED */ 00060 /* #define HAL_DAC_MODULE_ENABLED */ 00061 #define HAL_DFSDM_MODULE_ENABLED 00062 #define HAL_DMA_MODULE_ENABLED 00063 /* #define HAL_FIREWALL_MODULE_ENABLED */ 00064 #define HAL_FLASH_MODULE_ENABLED 00065 /* #define HAL_HCD_MODULE_ENABLED */ 00066 /* #define HAL_NAND_MODULE_ENABLED */ 00067 /* #define HAL_NOR_MODULE_ENABLED */ 00068 /* #define HAL_SRAM_MODULE_ENABLED */ 00069 #define HAL_GPIO_MODULE_ENABLED 00070 #define HAL_I2C_MODULE_ENABLED 00071 /* #define HAL_IRDA_MODULE_ENABLED */ 00072 /* #define HAL_IWDG_MODULE_ENABLED */ 00073 #define HAL_LCD_MODULE_ENABLED 00074 /* #define HAL_LPTIM_MODULE_ENABLED */ 00075 /* #define HAL_OPAMP_MODULE_ENABLED */ 00076 /* #define HAL_PCD_MODULE_ENABLED */ 00077 #define HAL_PWR_MODULE_ENABLED 00078 #define HAL_QSPI_MODULE_ENABLED 00079 #define HAL_RCC_MODULE_ENABLED 00080 /* #define HAL_RNG_MODULE_ENABLED */ 00081 #define HAL_RTC_MODULE_ENABLED 00082 #define HAL_SAI_MODULE_ENABLED 00083 /* #define HAL_SD_MODULE_ENABLED */ 00084 /* #define HAL_SMARTCARD_MODULE_ENABLED */ 00085 /* #define HAL_SMBUS_MODULE_ENABLED */ 00086 #define HAL_SPI_MODULE_ENABLED 00087 /* #define HAL_SWPMI_MODULE_ENABLED */ 00088 /* #define HAL_TIM_MODULE_ENABLED */ 00089 /* #define HAL_TSC_MODULE_ENABLED */ 00090 #define HAL_UART_MODULE_ENABLED 00091 /* #define HAL_USART_MODULE_ENABLED */ 00092 /* #define HAL_WWDG_MODULE_ENABLED */ 00093 00094 00095 /* ########################## Oscillator Values adaptation ####################*/ 00096 /** 00097 * @brief Adjust the value of External High Speed oscillator (HSE) used in your application. 00098 * This value is used by the RCC HAL module to compute the system frequency 00099 * (when HSE is used as system clock source, directly or through the PLL). 00100 */ 00101 #if !defined (HSE_VALUE) 00102 #define HSE_VALUE ((uint32_t)8000000) /*!< Value of the External oscillator in Hz */ 00103 #endif /* HSE_VALUE */ 00104 00105 #if !defined (HSE_STARTUP_TIMEOUT) 00106 #define HSE_STARTUP_TIMEOUT ((uint32_t)5000) /*!< Time out for HSE start up, in ms */ 00107 #endif /* HSE_STARTUP_TIMEOUT */ 00108 00109 /** 00110 * @brief Internal Multiple Speed oscillator (MSI) default value. 00111 * This value is the default MSI range value after Reset. 00112 */ 00113 #if !defined (MSI_VALUE) 00114 #define MSI_VALUE ((uint32_t)4000000) /*!< Value of the Internal oscillator in Hz*/ 00115 #endif /* MSI_VALUE */ 00116 00117 /** 00118 * @brief Internal High Speed oscillator (HSI) value. 00119 * This value is used by the RCC HAL module to compute the system frequency 00120 * (when HSI is used as system clock source, directly or through the PLL). 00121 */ 00122 #if !defined (HSI_VALUE) 00123 #define HSI_VALUE ((uint32_t)16000000) /*!< Value of the Internal oscillator in Hz*/ 00124 #endif /* HSI_VALUE */ 00125 00126 /** 00127 * @brief Internal Low Speed oscillator (LSI) value. 00128 */ 00129 #if !defined (LSI_VALUE) 00130 #define LSI_VALUE ((uint32_t)32000) /*!< LSI Typical Value in Hz*/ 00131 #endif /* LSI_VALUE */ /*!< Value of the Internal Low Speed oscillator in Hz 00132 The real value may vary depending on the variations 00133 in voltage and temperature.*/ 00134 /** 00135 * @brief External Low Speed oscillator (LSE) value. 00136 * This value is used by the UART, RTC HAL module to compute the system frequency 00137 */ 00138 #if !defined (LSE_VALUE) 00139 #define LSE_VALUE ((uint32_t)32768) /*!< Value of the External oscillator in Hz*/ 00140 #endif /* LSE_VALUE */ 00141 00142 #if !defined (LSE_STARTUP_TIMEOUT) 00143 #define LSE_STARTUP_TIMEOUT ((uint32_t)5000) /*!< Time out for LSE start up, in ms */ 00144 #endif /* HSE_STARTUP_TIMEOUT */ 00145 00146 /** 00147 * @brief External clock source for SAI1 peripheral 00148 * This value is used by the RCC HAL module to compute the SAI1 & SAI2 clock source 00149 * frequency. 00150 */ 00151 #if !defined (EXTERNAL_SAI1_CLOCK_VALUE) 00152 #define EXTERNAL_SAI1_CLOCK_VALUE ((uint32_t)48000) /*!< Value of the SAI1 External clock source in Hz*/ 00153 #endif /* EXTERNAL_SAI1_CLOCK_VALUE */ 00154 00155 /** 00156 * @brief External clock source for SAI2 peripheral 00157 * This value is used by the RCC HAL module to compute the SAI1 & SAI2 clock source 00158 * frequency. 00159 */ 00160 #if !defined (EXTERNAL_SAI2_CLOCK_VALUE) 00161 #define EXTERNAL_SAI2_CLOCK_VALUE ((uint32_t)48000) /*!< Value of the SAI2 External clock source in Hz*/ 00162 #endif /* EXTERNAL_SAI2_CLOCK_VALUE */ 00163 00164 /* Tip: To avoid modifying this file each time you need to use different HSE, 00165 === you can define the HSE value in your toolchain compiler preprocessor. */ 00166 00167 /* ########################### System Configuration ######################### */ 00168 /** 00169 * @brief This is the HAL system configuration section 00170 */ 00171 #define VDD_VALUE ((uint32_t)3300) /*!< Value of VDD in mv */ 00172 #define TICK_INT_PRIORITY ((uint32_t)0x0F) /*!< tick interrupt priority */ 00173 #define USE_RTOS 0 00174 #define PREFETCH_ENABLE 1 00175 #define INSTRUCTION_CACHE_ENABLE 1 00176 #define DATA_CACHE_ENABLE 1 00177 00178 /* ########################## Assert Selection ############################## */ 00179 /** 00180 * @brief Uncomment the line below to expanse the "assert_param" macro in the 00181 * HAL drivers code 00182 */ 00183 /* #define USE_FULL_ASSERT 1 */ 00184 00185 /* Includes ------------------------------------------------------------------*/ 00186 /** 00187 * @brief Include module's header file 00188 */ 00189 00190 #ifdef HAL_RCC_MODULE_ENABLED 00191 #include "stm32l4xx_hal_rcc.h" 00192 #endif /* HAL_RCC_MODULE_ENABLED */ 00193 00194 #ifdef HAL_GPIO_MODULE_ENABLED 00195 #include "stm32l4xx_hal_gpio.h" 00196 #endif /* HAL_GPIO_MODULE_ENABLED */ 00197 00198 #ifdef HAL_DMA_MODULE_ENABLED 00199 #include "stm32l4xx_hal_dma.h" 00200 #endif /* HAL_DMA_MODULE_ENABLED */ 00201 00202 #ifdef HAL_DFSDM_MODULE_ENABLED 00203 #include "stm32l4xx_hal_dfsdm.h" 00204 #endif /* HAL_DFSDM_MODULE_ENABLED */ 00205 00206 #ifdef HAL_CORTEX_MODULE_ENABLED 00207 #include "stm32l4xx_hal_cortex.h" 00208 #endif /* HAL_CORTEX_MODULE_ENABLED */ 00209 00210 #ifdef HAL_ADC_MODULE_ENABLED 00211 #include "stm32l4xx_hal_adc.h" 00212 #endif /* HAL_ADC_MODULE_ENABLED */ 00213 00214 #ifdef HAL_CAN_MODULE_ENABLED 00215 #include "stm32l4xx_hal_can.h" 00216 #endif /* HAL_CAN_MODULE_ENABLED */ 00217 00218 #ifdef HAL_COMP_MODULE_ENABLED 00219 #include "stm32l4xx_hal_comp.h" 00220 #endif /* HAL_COMP_MODULE_ENABLED */ 00221 00222 #ifdef HAL_CRC_MODULE_ENABLED 00223 #include "stm32l4xx_hal_crc.h" 00224 #endif /* HAL_CRC_MODULE_ENABLED */ 00225 00226 #ifdef HAL_CRYP_MODULE_ENABLED 00227 #include "stm32l4xx_hal_cryp.h" 00228 #endif /* HAL_CRYP_MODULE_ENABLED */ 00229 00230 #ifdef HAL_DAC_MODULE_ENABLED 00231 #include "stm32l4xx_hal_dac.h" 00232 #endif /* HAL_DAC_MODULE_ENABLED */ 00233 00234 #ifdef HAL_FIREWALL_MODULE_ENABLED 00235 #include "stm32l4xx_hal_firewall.h" 00236 #endif /* HAL_FIREWALL_MODULE_ENABLED */ 00237 00238 #ifdef HAL_FLASH_MODULE_ENABLED 00239 #include "stm32l4xx_hal_flash.h" 00240 #endif /* HAL_FLASH_MODULE_ENABLED */ 00241 00242 #ifdef HAL_SRAM_MODULE_ENABLED 00243 #include "stm32l4xx_hal_sram.h" 00244 #endif /* HAL_SRAM_MODULE_ENABLED */ 00245 00246 #ifdef HAL_NOR_MODULE_ENABLED 00247 #include "stm32l4xx_hal_nor.h" 00248 #endif /* HAL_NOR_MODULE_ENABLED */ 00249 00250 #ifdef HAL_NAND_MODULE_ENABLED 00251 #include "stm32l4xx_hal_nand.h" 00252 #endif /* HAL_NAND_MODULE_ENABLED */ 00253 00254 #ifdef HAL_I2C_MODULE_ENABLED 00255 #include "stm32l4xx_hal_i2c.h" 00256 #endif /* HAL_I2C_MODULE_ENABLED */ 00257 00258 #ifdef HAL_IWDG_MODULE_ENABLED 00259 #include "stm32l4xx_hal_iwdg.h" 00260 #endif /* HAL_IWDG_MODULE_ENABLED */ 00261 00262 #ifdef HAL_LCD_MODULE_ENABLED 00263 #include "stm32l4xx_hal_lcd.h" 00264 #endif /* HAL_LCD_MODULE_ENABLED */ 00265 00266 #ifdef HAL_LPTIM_MODULE_ENABLED 00267 #include "stm32l4xx_hal_lptim.h" 00268 #endif /* HAL_LPTIM_MODULE_ENABLED */ 00269 00270 #ifdef HAL_OPAMP_MODULE_ENABLED 00271 #include "stm32l4xx_hal_opamp.h" 00272 #endif /* HAL_OPAMP_MODULE_ENABLED */ 00273 00274 #ifdef HAL_PWR_MODULE_ENABLED 00275 #include "stm32l4xx_hal_pwr.h" 00276 #endif /* HAL_PWR_MODULE_ENABLED */ 00277 00278 #ifdef HAL_QSPI_MODULE_ENABLED 00279 #include "stm32l4xx_hal_qspi.h" 00280 #endif /* HAL_QSPI_MODULE_ENABLED */ 00281 00282 #ifdef HAL_RNG_MODULE_ENABLED 00283 #include "stm32l4xx_hal_rng.h" 00284 #endif /* HAL_RNG_MODULE_ENABLED */ 00285 00286 #ifdef HAL_RTC_MODULE_ENABLED 00287 #include "stm32l4xx_hal_rtc.h" 00288 #endif /* HAL_RTC_MODULE_ENABLED */ 00289 00290 #ifdef HAL_SAI_MODULE_ENABLED 00291 #include "stm32l4xx_hal_sai.h" 00292 #endif /* HAL_SAI_MODULE_ENABLED */ 00293 00294 #ifdef HAL_SD_MODULE_ENABLED 00295 #include "stm32l4xx_hal_sd.h" 00296 #endif /* HAL_SD_MODULE_ENABLED */ 00297 00298 #ifdef HAL_SMBUS_MODULE_ENABLED 00299 #include "stm32l4xx_hal_smbus.h" 00300 #endif /* HAL_SMBUS_MODULE_ENABLED */ 00301 00302 #ifdef HAL_SPI_MODULE_ENABLED 00303 #include "stm32l4xx_hal_spi.h" 00304 #endif /* HAL_SPI_MODULE_ENABLED */ 00305 00306 #ifdef HAL_SWPMI_MODULE_ENABLED 00307 #include "stm32l4xx_hal_swpmi.h" 00308 #endif /* HAL_SWPMI_MODULE_ENABLED */ 00309 00310 #ifdef HAL_TIM_MODULE_ENABLED 00311 #include "stm32l4xx_hal_tim.h" 00312 #endif /* HAL_TIM_MODULE_ENABLED */ 00313 00314 #ifdef HAL_TSC_MODULE_ENABLED 00315 #include "stm32l4xx_hal_tsc.h" 00316 #endif /* HAL_TSC_MODULE_ENABLED */ 00317 00318 #ifdef HAL_UART_MODULE_ENABLED 00319 #include "stm32l4xx_hal_uart.h" 00320 #endif /* HAL_UART_MODULE_ENABLED */ 00321 00322 #ifdef HAL_USART_MODULE_ENABLED 00323 #include "stm32l4xx_hal_usart.h" 00324 #endif /* HAL_USART_MODULE_ENABLED */ 00325 00326 #ifdef HAL_IRDA_MODULE_ENABLED 00327 #include "stm32l4xx_hal_irda.h" 00328 #endif /* HAL_IRDA_MODULE_ENABLED */ 00329 00330 #ifdef HAL_SMARTCARD_MODULE_ENABLED 00331 #include "stm32l4xx_hal_smartcard.h" 00332 #endif /* HAL_SMARTCARD_MODULE_ENABLED */ 00333 00334 #ifdef HAL_WWDG_MODULE_ENABLED 00335 #include "stm32l4xx_hal_wwdg.h" 00336 #endif /* HAL_WWDG_MODULE_ENABLED */ 00337 00338 #ifdef HAL_PCD_MODULE_ENABLED 00339 #include "stm32l4xx_hal_pcd.h" 00340 #endif /* HAL_PCD_MODULE_ENABLED */ 00341 00342 #ifdef HAL_HCD_MODULE_ENABLED 00343 #include "stm32l4xx_hal_hcd.h" 00344 #endif /* HAL_HCD_MODULE_ENABLED */ 00345 00346 /* Exported macro ------------------------------------------------------------*/ 00347 #ifdef USE_FULL_ASSERT 00348 /** 00349 * @brief The assert_param macro is used for function's parameters check. 00350 * @param expr: If expr is false, it calls assert_failed function 00351 * which reports the name of the source file and the source 00352 * line number of the call that failed. 00353 * If expr is true, it returns no value. 00354 * @retval None 00355 */ 00356 #define assert_param(expr) ((expr) ? (void)0 : assert_failed((uint8_t *)__FILE__, __LINE__)) 00357 /* Exported functions ------------------------------------------------------- */ 00358 void assert_failed(uint8_t* file, uint32_t line); 00359 #else 00360 #define assert_param(expr) ((void)0) 00361 #endif /* USE_FULL_ASSERT */ 00362 00363 #ifdef __cplusplus 00364 } 00365 #endif 00366 00367 #endif /* __STM32L4xx_HAL_CONF_H */ 00368 00369 00370 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 00371
Generated on Wed Jul 13 2022 00:08:45 by
1.7.2