]> git.sur5r.net Git - freertos/blob - FreeRTOS/Demo/CORTEX_MPU_M3_NUCLEO_L152RE_GCC/ST_Code/Core/Inc/stm32l1xx_hal_conf.h
Add MPU demo project for Nulceo-L152RE which is Coretx-M3.
[freertos] / FreeRTOS / Demo / CORTEX_MPU_M3_NUCLEO_L152RE_GCC / ST_Code / Core / Inc / stm32l1xx_hal_conf.h
1 /**\r
2   ******************************************************************************\r
3   * @file    stm32l1xx_hal_conf.h\r
4   * @brief   HAL configuration file.             \r
5   ******************************************************************************\r
6   * @attention\r
7   *\r
8   * <h2><center>&copy; COPYRIGHT(c) 2020 STMicroelectronics</center></h2>\r
9   *\r
10   * Redistribution and use in source and binary forms, with or without modification,\r
11   * are permitted provided that the following conditions are met:\r
12   *   1. Redistributions of source code must retain the above copyright notice,\r
13   *      this list of conditions and the following disclaimer.\r
14   *   2. Redistributions in binary form must reproduce the above copyright notice,\r
15   *      this list of conditions and the following disclaimer in the documentation\r
16   *      and/or other materials provided with the distribution.\r
17   *   3. Neither the name of STMicroelectronics nor the names of its contributors\r
18   *      may be used to endorse or promote products derived from this software\r
19   *      without specific prior written permission.\r
20   *\r
21   * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"\r
22   * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
23   * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\r
24   * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\r
25   * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\r
26   * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\r
27   * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\r
28   * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\r
29   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r
30   * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
31   *\r
32   ******************************************************************************\r
33   */ \r
34 \r
35 /* Define to prevent recursive inclusion -------------------------------------*/\r
36 #ifndef __STM32L1xx_HAL_CONF_H\r
37 #define __STM32L1xx_HAL_CONF_H\r
38 \r
39 #ifdef __cplusplus\r
40  extern "C" {\r
41 #endif\r
42 \r
43 /* Exported types ------------------------------------------------------------*/\r
44 /* Exported constants --------------------------------------------------------*/\r
45 \r
46 /* ########################## Module Selection ############################## */\r
47 /**\r
48   * @brief This is the list of modules to be used in the HAL driver \r
49   */\r
50 \r
51 #define HAL_MODULE_ENABLED  \r
52 /*#define HAL_ADC_MODULE_ENABLED   */\r
53 /*#define HAL_CRYP_MODULE_ENABLED   */\r
54 /*#define HAL_COMP_MODULE_ENABLED   */\r
55 /*#define HAL_CRC_MODULE_ENABLED   */\r
56 /*#define HAL_CRYP_MODULE_ENABLED   */\r
57 /*#define HAL_DAC_MODULE_ENABLED   */\r
58 /*#define HAL_I2C_MODULE_ENABLED   */\r
59 /*#define HAL_I2S_MODULE_ENABLED   */\r
60 /*#define HAL_IRDA_MODULE_ENABLED   */\r
61 /*#define HAL_IWDG_MODULE_ENABLED   */\r
62 /*#define HAL_LCD_MODULE_ENABLED   */\r
63 /*#define HAL_NOR_MODULE_ENABLED   */\r
64 /*#define HAL_OPAMP_MODULE_ENABLED   */\r
65 /*#define HAL_PCD_MODULE_ENABLED   */\r
66 /*#define HAL_RTC_MODULE_ENABLED   */\r
67 /*#define HAL_SD_MODULE_ENABLED   */\r
68 /*#define HAL_SMARTCARD_MODULE_ENABLED   */\r
69 /*#define HAL_SPI_MODULE_ENABLED   */\r
70 /*#define HAL_SRAM_MODULE_ENABLED   */\r
71 #define HAL_TIM_MODULE_ENABLED\r
72 #define HAL_UART_MODULE_ENABLED\r
73 /*#define HAL_USART_MODULE_ENABLED   */\r
74 /*#define HAL_WWDG_MODULE_ENABLED   */\r
75 /*#define HAL_EXTI_MODULE_ENABLED   */\r
76 #define HAL_GPIO_MODULE_ENABLED\r
77 #define HAL_DMA_MODULE_ENABLED\r
78 #define HAL_RCC_MODULE_ENABLED\r
79 #define HAL_FLASH_MODULE_ENABLED\r
80 #define HAL_PWR_MODULE_ENABLED\r
81 #define HAL_CORTEX_MODULE_ENABLED\r
82 \r
83 /* ########################## Oscillator Values adaptation ####################*/\r
84 /**\r
85   * @brief Adjust the value of External High Speed oscillator (HSE) used in your application.\r
86   *        This value is used by the RCC HAL module to compute the system frequency\r
87   *        (when HSE is used as system clock source, directly or through the PLL).  \r
88   */\r
89 #if !defined  (HSE_VALUE) \r
90   #define HSE_VALUE    ((uint32_t)8000000) /*!< Value of the External oscillator in Hz */\r
91 #endif /* HSE_VALUE */\r
92 \r
93 #if !defined  (HSE_STARTUP_TIMEOUT)\r
94   #define HSE_STARTUP_TIMEOUT    ((uint32_t)100)   /*!< Time out for HSE start up, in ms */\r
95 #endif /* HSE_STARTUP_TIMEOUT */\r
96 \r
97 /**\r
98   * @brief Internal Multiple Speed oscillator (MSI) default value.\r
99   *        This value is the default MSI range value after Reset.\r
100   */\r
101 #if !defined  (MSI_VALUE)\r
102   #define MSI_VALUE    ((uint32_t)16000000) /*!< Value of the Internal oscillator in Hz*/\r
103 #endif /* MSI_VALUE */\r
104 /**\r
105   * @brief Internal High Speed oscillator (HSI) value.\r
106   *        This value is used by the RCC HAL module to compute the system frequency\r
107   *        (when HSI is used as system clock source, directly or through the PLL). \r
108   */\r
109 #if !defined  (HSI_VALUE)\r
110   #define HSI_VALUE    ((uint32_t)16000000) /*!< Value of the Internal oscillator in Hz*/\r
111 #endif /* HSI_VALUE */\r
112 \r
113 /**\r
114   * @brief Internal Low Speed oscillator (LSI) value.\r
115   */\r
116 #if !defined  (LSI_VALUE) \r
117   #define LSI_VALUE    (37000U) /*!< LSI Typical Value in Hz*/\r
118 #endif /* LSI_VALUE */          /*!< Value of the Internal Low Speed oscillator in Hz\r
119                                      The real value may vary depending on the variations\r
120                                      in voltage and temperature.*/\r
121                                      \r
122 /**\r
123   * @brief External Low Speed oscillator (LSE) value.\r
124   *        This value is used by the UART, RTC HAL module to compute the system frequency\r
125   */\r
126 #if !defined  (LSE_VALUE)\r
127   #define LSE_VALUE    ((uint32_t)32768) /*!< Value of the External oscillator in Hz*/\r
128 #endif /* LSE_VALUE */\r
129 \r
130 #if !defined  (LSE_STARTUP_TIMEOUT)\r
131   #define LSE_STARTUP_TIMEOUT    ((uint32_t)5000)   /*!< Time out for LSE start up, in ms */\r
132 #endif /* HSE_STARTUP_TIMEOUT */\r
133 \r
134 /* Tip: To avoid modifying this file each time you need to use different HSE,\r
135    ===  you can define the HSE value in your toolchain compiler preprocessor. */\r
136 \r
137 /* ########################### System Configuration ######################### */\r
138 /**\r
139   * @brief This is the HAL system configuration section\r
140   */     \r
141   \r
142 #define  VDD_VALUE                                        ((uint32_t)3300) /*!< Value of VDD in mv */           \r
143 #define  TICK_INT_PRIORITY            ((uint32_t)0)    /*!< tick interrupt priority */            \r
144 #define  USE_RTOS                     0     \r
145 #define  PREFETCH_ENABLE              0\r
146 #define  INSTRUCTION_CACHE_ENABLE     1\r
147 #define  DATA_CACHE_ENABLE            1\r
148 \r
149 /* ########################## Assert Selection ############################## */\r
150 /**\r
151   * @brief Uncomment the line below to expanse the "assert_param" macro in the \r
152   *        HAL drivers code\r
153   */\r
154 /* #define USE_FULL_ASSERT    1U */\r
155 \r
156 /* ################## Register callback feature configuration ############### */\r
157 /**\r
158   * @brief Set below the peripheral configuration  to "1U" to add the support\r
159   *        of HAL callback registration/deregistration feature for the HAL\r
160   *        driver(s). This allows user application to provide specific callback\r
161   *        functions thanks to HAL_PPP_RegisterCallback() rather than overwriting\r
162   *        the default weak callback functions (see each stm32l0xx_hal_ppp.h file\r
163   *        for possible callback identifiers defined in HAL_PPP_CallbackIDTypeDef\r
164   *        for each PPP peripheral).\r
165   */\r
166 #define USE_HAL_ADC_REGISTER_CALLBACKS        0U\r
167 #define USE_HAL_COMP_REGISTER_CALLBACKS       0U\r
168 #define USE_HAL_DAC_REGISTER_CALLBACKS        0U\r
169 #define USE_HAL_I2C_REGISTER_CALLBACKS        0U\r
170 #define USE_HAL_I2S_REGISTER_CALLBACKS        0U\r
171 #define USE_HAL_IRDA_REGISTER_CALLBACKS       0U\r
172 #define USE_HAL_OPAMP_REGISTER_CALLBACKS      0U\r
173 #define USE_HAL_PCD_REGISTER_CALLBACKS        0U\r
174 #define USE_HAL_RTC_REGISTER_CALLBACKS        0U\r
175 #define USE_HAL_SDMMC_REGISTER_CALLBACKS      0U\r
176 #define USE_HAL_SMARTCARD_REGISTER_CALLBACKS  0U\r
177 #define USE_HAL_SPI_REGISTER_CALLBACKS        0U\r
178 #define USE_HAL_TIM_REGISTER_CALLBACKS        0U\r
179 #define USE_HAL_UART_REGISTER_CALLBACKS       0U\r
180 #define USE_HAL_USART_REGISTER_CALLBACKS      0U\r
181 #define USE_HAL_WWDG_REGISTER_CALLBACKS       0U\r
182 \r
183 /* ################## SPI peripheral configuration ########################## */\r
184 \r
185 /* CRC FEATURE: Use to activate CRC feature inside HAL SPI Driver\r
186  * Activated: CRC code is present inside driver\r
187  * Deactivated: CRC code cleaned from driver\r
188  */\r
189 \r
190 #define USE_SPI_CRC                   0U\r
191 /* Includes ------------------------------------------------------------------*/\r
192 /**\r
193   * @brief Include module's header file \r
194   */\r
195 \r
196 #ifdef HAL_RCC_MODULE_ENABLED\r
197  #include "stm32l1xx_hal_rcc.h"\r
198 #endif /* HAL_RCC_MODULE_ENABLED */\r
199 \r
200 #ifdef HAL_GPIO_MODULE_ENABLED\r
201  #include "stm32l1xx_hal_gpio.h"\r
202 #endif /* HAL_GPIO_MODULE_ENABLED */\r
203 \r
204 #ifdef HAL_DMA_MODULE_ENABLED\r
205   #include "stm32l1xx_hal_dma.h"\r
206 #endif /* HAL_DMA_MODULE_ENABLED */\r
207 \r
208 #ifdef HAL_CORTEX_MODULE_ENABLED\r
209  #include "stm32l1xx_hal_cortex.h"\r
210 #endif /* HAL_CORTEX_MODULE_ENABLED */\r
211 \r
212 #ifdef HAL_ADC_MODULE_ENABLED\r
213  #include "stm32l1xx_hal_adc.h"\r
214 #endif /* HAL_ADC_MODULE_ENABLED */\r
215 \r
216 #ifdef HAL_COMP_MODULE_ENABLED\r
217   #include "stm32l1xx_hal_comp.h"\r
218 #endif /* HAL_COMP_MODULE_ENABLED */\r
219 \r
220 #ifdef HAL_CRC_MODULE_ENABLED\r
221  #include "stm32l1xx_hal_crc.h"\r
222 #endif /* HAL_CRC_MODULE_ENABLED */\r
223 \r
224 #ifdef HAL_CRYP_MODULE_ENABLED\r
225  #include "stm32l1xx_hal_cryp.h"\r
226 #endif /* HAL_CRYP_MODULE_ENABLED */\r
227 \r
228 #ifdef HAL_DAC_MODULE_ENABLED\r
229  #include "stm32l1xx_hal_dac.h"\r
230 #endif /* HAL_DAC_MODULE_ENABLED */\r
231 \r
232 #ifdef HAL_FLASH_MODULE_ENABLED\r
233  #include "stm32l1xx_hal_flash.h"\r
234 #endif /* HAL_FLASH_MODULE_ENABLED */\r
235 \r
236 #ifdef HAL_SRAM_MODULE_ENABLED\r
237  #include "stm32l1xx_hal_sram.h"\r
238 #endif /* HAL_SRAM_MODULE_ENABLED */\r
239 \r
240 #ifdef HAL_NOR_MODULE_ENABLED\r
241  #include "stm32l1xx_hal_nor.h"\r
242 #endif /* HAL_NOR_MODULE_ENABLED */ \r
243 \r
244 #ifdef HAL_I2C_MODULE_ENABLED\r
245  #include "stm32l1xx_hal_i2c.h"\r
246 #endif /* HAL_I2C_MODULE_ENABLED */\r
247 \r
248 #ifdef HAL_I2S_MODULE_ENABLED\r
249  #include "stm32l1xx_hal_i2s.h"\r
250 #endif /* HAL_I2S_MODULE_ENABLED */\r
251 \r
252 #ifdef HAL_IWDG_MODULE_ENABLED\r
253  #include "stm32l1xx_hal_iwdg.h"\r
254 #endif /* HAL_IWDG_MODULE_ENABLED */\r
255 \r
256 #ifdef HAL_LCD_MODULE_ENABLED\r
257  #include "stm32l1xx_hal_lcd.h"\r
258 #endif /* HAL_LCD_MODULE_ENABLED */\r
259    \r
260 #ifdef HAL_OPAMP_MODULE_ENABLED\r
261  #include "stm32l1xx_hal_opamp.h"\r
262 #endif /* HAL_OPAMP_MODULE_ENABLED */\r
263 \r
264 #ifdef HAL_PWR_MODULE_ENABLED\r
265  #include "stm32l1xx_hal_pwr.h"\r
266 #endif /* HAL_PWR_MODULE_ENABLED */\r
267 \r
268 #ifdef HAL_RTC_MODULE_ENABLED\r
269  #include "stm32l1xx_hal_rtc.h"\r
270 #endif /* HAL_RTC_MODULE_ENABLED */\r
271 \r
272 #ifdef HAL_SD_MODULE_ENABLED\r
273  #include "stm32l1xx_hal_sd.h"\r
274 #endif /* HAL_SD_MODULE_ENABLED */     \r
275 \r
276 #ifdef HAL_SPI_MODULE_ENABLED\r
277  #include "stm32l1xx_hal_spi.h"\r
278 #endif /* HAL_SPI_MODULE_ENABLED */\r
279 \r
280 #ifdef HAL_TIM_MODULE_ENABLED\r
281  #include "stm32l1xx_hal_tim.h"\r
282 #endif /* HAL_TIM_MODULE_ENABLED */\r
283 \r
284 #ifdef HAL_UART_MODULE_ENABLED\r
285  #include "stm32l1xx_hal_uart.h"\r
286 #endif /* HAL_UART_MODULE_ENABLED */\r
287 \r
288 #ifdef HAL_USART_MODULE_ENABLED\r
289  #include "stm32l1xx_hal_usart.h"\r
290 #endif /* HAL_USART_MODULE_ENABLED */\r
291 \r
292 #ifdef HAL_IRDA_MODULE_ENABLED\r
293  #include "stm32l1xx_hal_irda.h"\r
294 #endif /* HAL_IRDA_MODULE_ENABLED */\r
295 \r
296 #ifdef HAL_SMARTCARD_MODULE_ENABLED\r
297  #include "stm32l1xx_hal_smartcard.h"\r
298 #endif /* HAL_SMARTCARD_MODULE_ENABLED */\r
299 \r
300 #ifdef HAL_WWDG_MODULE_ENABLED\r
301  #include "stm32l1xx_hal_wwdg.h"\r
302 #endif /* HAL_WWDG_MODULE_ENABLED */\r
303 \r
304 #ifdef HAL_PCD_MODULE_ENABLED\r
305  #include "stm32l1xx_hal_pcd.h"\r
306 #endif /* HAL_PCD_MODULE_ENABLED */\r
307 \r
308 #ifdef HAL_EXTI_MODULE_ENABLED\r
309  #include "stm32l1xx_hal_exti.h"\r
310 #endif /* HAL_EXTI_MODULE_ENABLED */\r
311    \r
312 /* Exported macro ------------------------------------------------------------*/\r
313 #ifdef  USE_FULL_ASSERT\r
314 /**\r
315   * @brief  The assert_param macro is used for function's parameters check.\r
316   * @param  expr: If expr is false, it calls assert_failed function\r
317   *         which reports the name of the source file and the source\r
318   *         line number of the call that failed. \r
319   *         If expr is true, it returns no value.\r
320   * @retval None\r
321   */\r
322   #define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__))\r
323 /* Exported functions ------------------------------------------------------- */\r
324   void assert_failed(uint8_t* file, uint32_t line);\r
325 #else\r
326   #define assert_param(expr) ((void)0U)\r
327 #endif /* USE_FULL_ASSERT */   \r
328    \r
329 #ifdef __cplusplus\r
330 }\r
331 #endif\r
332 \r
333 #endif /* __STM32L1xx_HAL_CONF_H */\r
334 \r
335 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/\r