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.
stm32l0xx_hal_conf.h
00001 /** 00002 ****************************************************************************** 00003 * @file stm32l0xx_hal_conf.h 00004 * @author MCD Application Team 00005 * @version V1.0.0 00006 * @date 24-April-2014 00007 * @brief HAL configuration file. 00008 ****************************************************************************** 00009 * @attention 00010 * 00011 * <h2><center>© COPYRIGHT(c) 2014 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 __STM32L0xx_HAL_CONF_H 00040 #define __STM32L0xx_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_COMP_MODULE_ENABLED */ 00056 /* #define HAL_CRC_MODULE_ENABLED */ 00057 /* #define HAL_CRYP_MODULE_ENABLED */ 00058 /* #define HAL_DAC_MODULE_ENABLED */ 00059 #define HAL_DMA_MODULE_ENABLED 00060 #define HAL_FLASH_MODULE_ENABLED 00061 #define HAL_GPIO_MODULE_ENABLED 00062 /* #define HAL_I2C_MODULE_ENABLED */ 00063 /* #define HAL_I2S_MODULE_ENABLED */ 00064 /* #define HAL_IWDG_MODULE_ENABLED */ 00065 /* #define HAL_LCD_MODULE_ENABLED */ 00066 /* #define HAL_LPTIM_MODULE_ENABLED */ 00067 #define HAL_PWR_MODULE_ENABLED 00068 #define HAL_RCC_MODULE_ENABLED 00069 /* #define HAL_RNG_MODULE_ENABLED */ 00070 #define HAL_RTC_MODULE_ENABLED 00071 #define HAL_SPI_MODULE_ENABLED 00072 /* #define HAL_TIM_MODULE_ENABLED */ 00073 /* #define HAL_UART_MODULE_ENABLED */ 00074 /* #define HAL_USART_MODULE_ENABLED */ 00075 /* #define HAL_IRDA_MODULE_ENABLED */ 00076 /* #define HAL_SMARTCARD_MODULE_ENABLED */ 00077 /* #define HAL_SMBUS_MODULE_ENABLED */ 00078 /* #define HAL_WWDG_MODULE_ENABLED */ 00079 #define HAL_CORTEX_MODULE_ENABLED 00080 /* #define HAL_PCD_MODULE_ENABLED */ 00081 00082 00083 /* ########################## Oscillator Values adaptation ####################*/ 00084 /** 00085 * @brief Adjust the value of External High Speed oscillator (HSE) used in your application. 00086 * This value is used by the RCC HAL module to compute the system frequency 00087 * (when HSE is used as system clock source, directly or through the PLL). 00088 */ 00089 #if !defined (HSE_VALUE) 00090 #define HSE_VALUE ((uint32_t)8000000) /*!< Value of the External oscillator in Hz */ 00091 #endif /* HSE_VALUE */ 00092 00093 #if !defined (HSE_STARTUP_TIMEOUT) 00094 #define HSE_STARTUP_TIMEOUT ((uint32_t)5000) /*!< Time out for HSE start up, in ms */ 00095 #endif /* HSE_STARTUP_TIMEOUT */ 00096 00097 /** 00098 * @brief Internal Multiple Speed oscillator (MSI) default value. 00099 * This value is the default MSI range value after Reset. 00100 */ 00101 #if !defined (MSI_VALUE) 00102 #define MSI_VALUE ((uint32_t)2000000) /*!< Value of the Internal oscillator in Hz*/ 00103 #endif /* MSI_VALUE */ 00104 00105 /** 00106 * @brief Internal High Speed oscillator (HSI) value. 00107 * This value is used by the RCC HAL module to compute the system frequency 00108 * (when HSI is used as system clock source, directly or through the PLL). 00109 */ 00110 #if !defined (HSI_VALUE) 00111 #define HSI_VALUE ((uint32_t)16000000) /*!< Value of the Internal oscillator in Hz*/ 00112 #endif /* HSI_VALUE */ 00113 00114 /** 00115 * @brief External Low Speed oscillator (LSE) value. 00116 * This value is used by the UART, RTC HAL module to compute the system frequency 00117 */ 00118 #if !defined (LSE_VALUE) 00119 #define LSE_VALUE ((uint32_t)32768) /*!< Value of the External oscillator in Hz*/ 00120 #endif /* LSE_VALUE */ 00121 00122 00123 #if !defined (LSE_STARTUP_TIMEOUT) 00124 #define LSE_STARTUP_TIMEOUT ((uint32_t)5000) /*!< Time out for LSE start up, in ms */ 00125 #endif /* HSE_STARTUP_TIMEOUT */ 00126 00127 00128 /* Tip: To avoid modifying this file each time you need to use different HSE, 00129 === you can define the HSE value in your toolchain compiler preprocessor. */ 00130 00131 /* ########################### System Configuration ######################### */ 00132 /** 00133 * @brief This is the HAL system configuration section 00134 */ 00135 #define VDD_VALUE ((uint32_t)3300) /*!< Value of VDD in mv */ 00136 #define TICK_INT_PRIORITY ((uint32_t)3) /*!< tick interrupt priority */ 00137 #define USE_RTOS 0 00138 #define PREFETCH_ENABLE 1 00139 #define PREREAD_ENABLE 1 00140 #define BUFFER_CACHE_DISABLE 0 00141 00142 /* ########################## Assert Selection ############################## */ 00143 /** 00144 * @brief Uncomment the line below to expanse the "assert_param" macro in the 00145 * HAL drivers code 00146 */ 00147 /* #define USE_FULL_ASSERT 1 */ 00148 00149 /* Includes ------------------------------------------------------------------*/ 00150 /** 00151 * @brief Include module's header file 00152 */ 00153 00154 #ifdef HAL_RCC_MODULE_ENABLED 00155 #include "stm32l0xx_hal_rcc.h" 00156 #endif /* HAL_RCC_MODULE_ENABLED */ 00157 00158 #ifdef HAL_GPIO_MODULE_ENABLED 00159 #include "stm32l0xx_hal_gpio.h" 00160 #endif /* HAL_GPIO_MODULE_ENABLED */ 00161 00162 #ifdef HAL_DMA_MODULE_ENABLED 00163 #include "stm32l0xx_hal_dma.h" 00164 #endif /* HAL_DMA_MODULE_ENABLED */ 00165 00166 #ifdef HAL_CORTEX_MODULE_ENABLED 00167 #include "stm32l0xx_hal_cortex.h" 00168 #endif /* HAL_CORTEX_MODULE_ENABLED */ 00169 00170 #ifdef HAL_ADC_MODULE_ENABLED 00171 #include "stm32l0xx_hal_adc.h" 00172 #endif /* HAL_ADC_MODULE_ENABLED */ 00173 00174 #ifdef HAL_COMP_MODULE_ENABLED 00175 #include "stm32l0xx_hal_comp.h" 00176 #endif /* HAL_COMP_MODULE_ENABLED */ 00177 00178 #ifdef HAL_CRC_MODULE_ENABLED 00179 #include "stm32l0xx_hal_crc.h" 00180 #endif /* HAL_CRC_MODULE_ENABLED */ 00181 00182 #ifdef HAL_CRYP_MODULE_ENABLED 00183 #include "stm32l0xx_hal_cryp.h" 00184 #endif /* HAL_CRYP_MODULE_ENABLED */ 00185 00186 #ifdef HAL_DAC_MODULE_ENABLED 00187 #include "stm32l0xx_hal_dac.h" 00188 #endif /* HAL_DAC_MODULE_ENABLED */ 00189 00190 #ifdef HAL_FLASH_MODULE_ENABLED 00191 #include "stm32l0xx_hal_flash.h" 00192 #endif /* HAL_FLASH_MODULE_ENABLED */ 00193 00194 #ifdef HAL_I2C_MODULE_ENABLED 00195 #include "stm32l0xx_hal_i2c.h" 00196 #endif /* HAL_I2C_MODULE_ENABLED */ 00197 00198 #ifdef HAL_I2S_MODULE_ENABLED 00199 #include "stm32l0xx_hal_i2s.h" 00200 #endif /* HAL_I2S_MODULE_ENABLED */ 00201 00202 #ifdef HAL_IWDG_MODULE_ENABLED 00203 #include "stm32l0xx_hal_iwdg.h" 00204 #endif /* HAL_IWDG_MODULE_ENABLED */ 00205 00206 #ifdef HAL_LCD_MODULE_ENABLED 00207 #include "stm32l0xx_hal_lcd.h" 00208 #endif /* HAL_LCD_MODULE_ENABLED */ 00209 00210 #ifdef HAL_LPTIM_MODULE_ENABLED 00211 #include "stm32l0xx_hal_lptim.h" 00212 #endif /* HAL_LPTIM_MODULE_ENABLED */ 00213 00214 #ifdef HAL_PWR_MODULE_ENABLED 00215 #include "stm32l0xx_hal_pwr.h" 00216 #endif /* HAL_PWR_MODULE_ENABLED */ 00217 00218 #ifdef HAL_RNG_MODULE_ENABLED 00219 #include "stm32l0xx_hal_rng.h" 00220 #endif /* HAL_RNG_MODULE_ENABLED */ 00221 00222 #ifdef HAL_RTC_MODULE_ENABLED 00223 #include "stm32l0xx_hal_rtc.h" 00224 00225 #endif /* HAL_RTC_MODULE_ENABLED */ 00226 00227 #ifdef HAL_SPI_MODULE_ENABLED 00228 #include "stm32l0xx_hal_spi.h" 00229 #endif /* HAL_SPI_MODULE_ENABLED */ 00230 00231 #ifdef HAL_TIM_MODULE_ENABLED 00232 #include "stm32l0xx_hal_tim.h" 00233 #endif /* HAL_TIM_MODULE_ENABLED */ 00234 00235 #ifdef HAL_UART_MODULE_ENABLED 00236 #include "stm32l0xx_hal_uart.h" 00237 #endif /* HAL_UART_MODULE_ENABLED */ 00238 00239 #ifdef HAL_USART_MODULE_ENABLED 00240 #include "stm32l0xx_hal_usart.h" 00241 #endif /* HAL_USART_MODULE_ENABLED */ 00242 00243 #ifdef HAL_IRDA_MODULE_ENABLED 00244 #include "stm32l0xx_hal_irda.h" 00245 #endif /* HAL_IRDA_MODULE_ENABLED */ 00246 00247 #ifdef HAL_SMARTCARD_MODULE_ENABLED 00248 #include "stm32l0xx_hal_smartcard.h" 00249 #endif /* HAL_SMARTCARD_MODULE_ENABLED */ 00250 00251 #ifdef HAL_SMBUS_MODULE_ENABLED 00252 #include "stm32l0xx_hal_smbus.h" 00253 #endif /* HAL_SMBUS_MODULE_ENABLED */ 00254 00255 #ifdef HAL_WWDG_MODULE_ENABLED 00256 #include "stm32l0xx_hal_wwdg.h" 00257 #endif /* HAL_WWDG_MODULE_ENABLED */ 00258 00259 #ifdef HAL_PCD_MODULE_ENABLED 00260 #include "stm32l0xx_hal_pcd.h" 00261 #endif /* HAL_PCD_MODULE_ENABLED */ 00262 00263 /* Exported macro ------------------------------------------------------------*/ 00264 #ifdef USE_FULL_ASSERT 00265 /** 00266 * @brief The assert_param macro is used for function's parameters check. 00267 * @param expr: If expr is false, it calls assert_failed function 00268 * which reports the name of the source file and the source 00269 * line number of the call that failed. 00270 * If expr is true, it returns no value. 00271 * @retval None 00272 */ 00273 #define assert_param(expr) ((expr) ? (void)0 : assert_failed((uint8_t *)__FILE__, __LINE__)) 00274 /* Exported functions ------------------------------------------------------- */ 00275 void assert_failed(uint8_t* file, uint32_t line); 00276 #else 00277 #define assert_param(expr) ((void)0) 00278 #endif /* USE_FULL_ASSERT */ 00279 00280 #ifdef __cplusplus 00281 } 00282 #endif 00283 00284 #endif /* __STM32L0xx_HAL_CONF_H */ 00285 00286 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 00287
Generated on Tue Jul 12 2022 17:28:29 by
1.7.2