|
2 | 2 | ******************************************************************************
|
3 | 3 | * @file stm32mp1xx_hal_conf.h
|
4 | 4 | * @author MCD Application Team
|
5 |
| - * @brief HAL configuration template file. |
| 5 | + * @brief HAL configuration template file. |
6 | 6 | * This file should be copied to the application folder and renamed
|
7 | 7 | * to stm32mp1xx_hal_conf.h.
|
8 | 8 | ******************************************************************************
|
9 |
| - * |
10 | 9 | * @attention
|
11 | 10 | *
|
12 | 11 | * <h2><center>© Copyright (c) 2019 STMicroelectronics.
|
|
58 | 57 | #define HAL_MODULE_ENABLED
|
59 | 58 | #define HAL_ADC_MODULE_ENABLED
|
60 | 59 | #define HAL_CEC_MODULE_ENABLED
|
| 60 | +#define HAL_CORTEX_MODULE_ENABLED |
61 | 61 | #define HAL_CRC_MODULE_ENABLED
|
| 62 | +#define HAL_CRYP_MODULE_ENABLED |
62 | 63 | #define HAL_DAC_MODULE_ENABLED
|
63 |
| -#define HAL_DSI_MODULE_ENABLED |
| 64 | +#define HAL_DCMI_MODULE_ENABLED |
64 | 65 | #define HAL_DFSDM_MODULE_ENABLED
|
65 |
| -#define HAL_ETH_MODULE_ENABLED |
| 66 | +#define HAL_DMA_MODULE_ENABLED |
66 | 67 | #define HAL_EXTI_MODULE_ENABLED
|
67 | 68 | #define HAL_FDCAN_MODULE_ENABLED
|
| 69 | +#define HAL_GPIO_MODULE_ENABLED |
68 | 70 | #define HAL_HASH_MODULE_ENABLED
|
69 | 71 | #define HAL_HSEM_MODULE_ENABLED
|
70 |
| -#define HAL_HCD_MODULE_ENABLED |
71 | 72 | #define HAL_I2C_MODULE_ENABLED
|
72 |
| -#define HAL_I2S_MODULE_ENABLED |
73 | 73 | #define HAL_IPCC_MODULE_ENABLED
|
74 |
| -#define HAL_IWDG_MODULE_ENABLED |
75 | 74 | #define HAL_LPTIM_MODULE_ENABLED
|
76 |
| -#define HAL_LTDC_MODULE_ENABLED |
77 |
| -#define HAL_NAND_MODULE_ENABLED |
78 |
| -#define HAL_NOR_MODULE_ENABLED |
79 |
| -#define HAL_PCD_MODULE_ENABLED |
| 75 | +#define HAL_MDMA_MODULE_ENABLED |
| 76 | +#define HAL_PWR_MODULE_ENABLED |
80 | 77 | #define HAL_QSPI_MODULE_ENABLED
|
| 78 | +#define HAL_RCC_MODULE_ENABLED |
81 | 79 | #define HAL_RNG_MODULE_ENABLED
|
| 80 | +#define HAL_RTC_MODULE_ENABLED |
82 | 81 | #define HAL_SAI_MODULE_ENABLED
|
83 | 82 | #define HAL_SD_MODULE_ENABLED
|
84 |
| -#define HAL_RTC_MODULE_ENABLED |
85 | 83 | #define HAL_SMBUS_MODULE_ENABLED
|
86 | 84 | #define HAL_SPDIFRX_MODULE_ENABLED
|
87 | 85 | #define HAL_SPI_MODULE_ENABLED
|
88 |
| -#define HAL_SRAM_MODULE_ENABLED |
89 |
| -#define HAL_TAMP_MODULE_ENABLED |
90 | 86 | #define HAL_TIM_MODULE_ENABLED
|
91 |
| -#define HAL_TMPSENS_MODULE_ENABLED |
92 | 87 | #define HAL_UART_MODULE_ENABLED
|
93 | 88 | #define HAL_USART_MODULE_ENABLED
|
94 | 89 | #define HAL_WWDG_MODULE_ENABLED
|
95 |
| -#define HAL_GPIO_MODULE_ENABLED |
96 |
| -#define HAL_DMA_MODULE_ENABLED |
97 |
| -/*#define HAL_MDMA_MODULE_ENABLED */ |
98 |
| -#define HAL_RCC_MODULE_ENABLED |
99 |
| -#define HAL_PWR_MODULE_ENABLED |
100 |
| -#define HAL_CORTEX_MODULE_ENABLED |
101 | 90 | #endif
|
102 | 91 |
|
103 |
| -/* ########################## Oscillator Values adaptation ####################*/ |
| 92 | +/* ########################## Register Callbacks selection ############################## */ |
| 93 | +/** |
| 94 | + * @brief This is the list of modules where register callback can be used |
| 95 | + */ |
| 96 | +#define USE_HAL_ADC_REGISTER_CALLBACKS 0u |
| 97 | +#define USE_HAL_CEC_REGISTER_CALLBACKS 0u |
| 98 | +#define USE_HAL_DAC_REGISTER_CALLBACKS 0u |
| 99 | +#define USE_HAL_I2C_REGISTER_CALLBACKS 0u |
| 100 | +#define USE_HAL_RNG_REGISTER_CALLBACKS 0u |
| 101 | +#define USE_HAL_SPI_REGISTER_CALLBACKS 0u |
| 102 | +#define USE_HAL_UART_REGISTER_CALLBACKS 0u |
| 103 | +#define USE_HAL_USART_REGISTER_CALLBACKS 0u |
| 104 | +#define USE_HAL_WWDG_REGISTER_CALLBACKS 0u |
| 105 | + |
| 106 | +/* ################## SPI peripheral configuration ########################## */ |
| 107 | + |
| 108 | +/* CRC FEATURE: Use to activate CRC feature inside HAL SPI Driver |
| 109 | +* Activated: CRC code is present inside driver |
| 110 | +* Deactivated: CRC code cleaned from driver |
| 111 | +*/ |
| 112 | +#if !defined (USE_SPI_CRC) |
| 113 | +#define USE_SPI_CRC 0U |
| 114 | +#endif |
| 115 | + |
| 116 | +/* ######################### Oscillator Values adaptation ################### */ |
104 | 117 | /**
|
105 | 118 | * @brief Adjust the value of External High Speed oscillator (HSE) used in your application.
|
106 | 119 | * This value is used by the RCC HAL module to compute the system frequency
|
107 |
| - * (when HSE is used as system clock source, directly or through the PLL). |
| 120 | + * (when HSE is used as system clock source, directly or through the PLL). |
108 | 121 | */
|
109 |
| -#if !defined (HSE_VALUE) |
110 |
| -#define HSE_VALUE ((uint32_t)24000000) /*!< Value of the External oscillator in Hz : FPGA case fixed to 60MHZ */ |
| 122 | +#if !defined (HSE_VALUE) |
| 123 | + #define HSE_VALUE 24000000U /*!< Value of the External oscillator in Hz */ |
111 | 124 | #endif /* HSE_VALUE */
|
112 | 125 |
|
| 126 | +/** |
| 127 | + * @brief In the following line adjust the External High Speed oscillator (HSE) Startup |
| 128 | + * Timeout value |
| 129 | + */ |
113 | 130 | #if !defined (HSE_STARTUP_TIMEOUT)
|
114 |
| - #define HSE_STARTUP_TIMEOUT ((uint32_t)100U) /*!< Time out for HSE start up, in ms */ |
| 131 | + #define HSE_STARTUP_TIMEOUT 100U /*!< Time out for HSE start up, in ms */ |
115 | 132 | #endif /* HSE_STARTUP_TIMEOUT */
|
116 | 133 |
|
117 | 134 | /**
|
118 | 135 | * @brief Internal High Speed oscillator (HSI) value.
|
119 | 136 | * This value is used by the RCC HAL module to compute the system frequency
|
120 |
| - * (when HSI is used as system clock source, directly or through the PLL). |
| 137 | + * (when HSI is used as system clock source, directly or through the PLL). |
121 | 138 | */
|
122 | 139 | #if !defined (HSI_VALUE)
|
123 |
| - #define HSI_VALUE ((uint32_t)64000000) /*!< Value of the Internal oscillator in Hz*/ |
| 140 | + #define HSI_VALUE 64000000U /*!< Value of the Internal oscillator in Hz*/ |
124 | 141 | #endif /* HSI_VALUE */
|
125 | 142 |
|
| 143 | +/** |
| 144 | + * @brief In the following line adjust the Internal High Speed oscillator (HSI) Startup |
| 145 | + * Timeout value |
| 146 | + */ |
| 147 | +#if !defined (HSI_STARTUP_TIMEOUT) |
| 148 | + #define HSI_STARTUP_TIMEOUT 5000U /*!< Time out for HSI start up */ |
| 149 | +#endif /* HSI_STARTUP_TIMEOUT */ |
| 150 | + |
| 151 | + |
126 | 152 | /**
|
127 | 153 | * @brief Internal Low Speed oscillator (LSI) value.
|
128 | 154 | */
|
129 |
| -#if !defined (LSI_VALUE) |
| 155 | +#if !defined (LSI_VALUE) |
130 | 156 | #define LSI_VALUE 32000U
|
131 | 157 | #endif /* LSI_VALUE */ /*!< Value of the Internal Low Speed oscillator in Hz
|
132 | 158 | The real value may vary depending on the variations
|
133 | 159 | in voltage and temperature. */
|
134 |
| - |
135 | 160 | /**
|
136 | 161 | * @brief External Low Speed oscillator (LSE) value.
|
137 |
| - * This value is used by the UART, RTC HAL module to compute the system frequency |
138 | 162 | */
|
139 | 163 | #if !defined (LSE_VALUE)
|
140 |
| - #define LSE_VALUE ((uint32_t)32768U) /*!< Value of the External oscillator in Hz*/ |
| 164 | + #define LSE_VALUE 32768U /*!< Value of the External Low Speed oscillator in Hz */ |
141 | 165 | #endif /* LSE_VALUE */
|
142 | 166 |
|
| 167 | +/** |
| 168 | + * @brief Time out for LSE start up value in ms. |
| 169 | + */ |
143 | 170 | #if !defined (LSE_STARTUP_TIMEOUT)
|
144 |
| - #define LSE_STARTUP_TIMEOUT ((uint32_t)5000U) /*!< Time out for LSE start up, in ms */ |
| 171 | + #define LSE_STARTUP_TIMEOUT 5000U /*!< Time out for LSE start up, in ms */ |
145 | 172 | #endif /* LSE_STARTUP_TIMEOUT */
|
146 | 173 |
|
147 | 174 | /**
|
|
154 | 181 |
|
155 | 182 | /**
|
156 | 183 | * @brief External clock source for I2S peripheral
|
157 |
| - * This value is used by the I2S HAL module to compute the I2S clock source |
158 |
| - * frequency, this source is inserted directly through I2S_CKIN pad. |
| 184 | + * This value is used by the I2S HAL module to compute the I2S clock source |
| 185 | + * frequency, this source is inserted directly through I2S_CKIN pad. |
159 | 186 | */
|
160 | 187 | #if !defined (EXTERNAL_CLOCK_VALUE)
|
161 | 188 | #define EXTERNAL_CLOCK_VALUE 12288000U /*!< Value of the External clock in Hz*/
|
|
167 | 194 | /* ########################### System Configuration ######################### */
|
168 | 195 | /**
|
169 | 196 | * @brief This is the HAL system configuration section
|
170 |
| - */ |
| 197 | + */ |
| 198 | +#if !defined (VDD_VALUE) |
171 | 199 | #define VDD_VALUE 3300U /*!< Value of VDD in mv */
|
172 |
| -#define TICK_INT_PRIORITY 0x0FU /*!< tick interrupt priority */ |
| 200 | +#endif |
| 201 | +#if !defined (TICK_INT_PRIORITY) |
| 202 | +#define TICK_INT_PRIORITY ((uint32_t)0x00) /*!< tick interrupt priority */ |
| 203 | +#endif |
| 204 | +#if !defined (USE_RTOS) |
173 | 205 | #define USE_RTOS 0U
|
174 |
| - |
| 206 | +#endif |
| 207 | +#if !defined (PREFETCH_ENABLE) |
175 | 208 | #define PREFETCH_ENABLE 0U
|
| 209 | +#endif |
| 210 | +#if !defined (INSTRUCTION_CACHE_ENABLE) |
176 | 211 | #define INSTRUCTION_CACHE_ENABLE 0U
|
| 212 | +#endif |
| 213 | +#if !defined (DATA_CACHE_ENABLE) |
177 | 214 | #define DATA_CACHE_ENABLE 0U
|
| 215 | +#endif |
178 | 216 |
|
179 | 217 | /* ########################## Assert Selection ############################## */
|
180 | 218 | /**
|
181 |
| - * @brief Uncomment the line below to expanse the "assert_param" macro in the |
| 219 | + * @brief Uncomment the line below to expanse the "assert_param" macro in the |
182 | 220 | * HAL drivers code
|
183 | 221 | */
|
184 |
| -/* #define USE_FULL_ASSERT 1U */ |
| 222 | +/* #define USE_FULL_ASSERT 1U */ |
185 | 223 |
|
186 | 224 | /* Includes ------------------------------------------------------------------*/
|
187 | 225 | /**
|
188 |
| - * @brief Include module's header file |
| 226 | + * @brief Include module's header file |
189 | 227 | */
|
190 | 228 |
|
191 | 229 | #ifdef HAL_RCC_MODULE_ENABLED
|
|
244 | 282 | #include "stm32mp1xx_hal_dfsdm.h"
|
245 | 283 | #endif /* HAL_DFSDM_MODULE_ENABLED */
|
246 | 284 |
|
247 |
| -#ifdef HAL_DSI_MODULE_ENABLED |
248 |
| - #include "stm32mp1xx_hal_dsi.h" |
249 |
| -#endif /* HAL_DSI_MODULE_ENABLED */ |
250 |
| - |
251 |
| -#ifdef HAL_ETH_MODULE_ENABLED |
252 |
| - #include "stm32mp1xx_hal_eth.h" |
253 |
| -#endif /* HAL_ETH_MODULE_ENABLED */ |
254 |
| - |
255 |
| -#ifdef HAL_EXTI_MODULE_ENABLED |
256 |
| - #include "stm32mp1xx_hal_exti.h" |
257 |
| -#endif /* HAL_EXTI_MODULE_ENABLED */ |
258 |
| - |
259 | 285 | #ifdef HAL_FDCAN_MODULE_ENABLED
|
260 | 286 | #include "stm32mp1xx_hal_fdcan.h"
|
261 | 287 | #endif /* HAL_FDCAN_MODULE_ENABLED */
|
|
264 | 290 | #include "stm32mp1xx_hal_hash.h"
|
265 | 291 | #endif /* HAL_HASH_MODULE_ENABLED */
|
266 | 292 |
|
267 |
| -#ifdef HAL_HCD_MODULE_ENABLED |
268 |
| - #include "stm32mp1xx_hal_hcd.h" |
269 |
| -#endif /* HAL_HASH_MODULE_ENABLED */ |
270 |
| - |
271 | 293 | #ifdef HAL_I2C_MODULE_ENABLED
|
272 | 294 | #include "stm32mp1xx_hal_i2c.h"
|
273 | 295 | #endif /* HAL_I2C_MODULE_ENABLED */
|
274 | 296 |
|
275 |
| -#ifdef HAL_I2S_MODULE_ENABLED |
276 |
| - #include "stm32mp1xx_hal_i2s.h" |
277 |
| -#endif /* HAL_I2S_MODULE_ENABLED */ |
278 |
| - |
279 | 297 | #ifdef HAL_IPCC_MODULE_ENABLED
|
280 | 298 | #include "stm32mp1xx_hal_ipcc.h"
|
281 | 299 | #endif /* HAL_IPCC_MODULE_ENABLED */
|
282 | 300 |
|
283 |
| -#ifdef HAL_IWDG_MODULE_ENABLED |
284 |
| - #include "stm32mp1xx_hal_iwdg.h" |
285 |
| -#endif /* HAL_IWDG_MODULE_ENABLED */ |
286 |
| - |
287 |
| -#ifdef HAL_IWDG_MODULE_ENABLED |
288 |
| - #include "stm32mp1xx_hal_iwdg.h" |
289 |
| -#endif /* HAL_IWDG_MODULE_ENABLED */ |
290 |
| - |
291 | 301 | #ifdef HAL_LPTIM_MODULE_ENABLED
|
292 | 302 | #include "stm32mp1xx_hal_lptim.h"
|
293 | 303 | #endif /* HAL_LPTIM_MODULE_ENABLED */
|
294 | 304 |
|
295 |
| -#ifdef HAL_LTDC_MODULE_ENABLED |
296 |
| - #include "stm32mp1xx_hal_ltdc.h" |
297 |
| -#endif /* HAL_LTDC_MODULE_ENABLED */ |
298 |
| - |
299 |
| -#ifdef HAL_NAND_MODULE_ENABLED |
300 |
| - #include "stm32mp1xx_hal_nand.h" |
301 |
| -#endif /* HAL_NAND_MODULE_ENABLED */ |
302 |
| - |
303 |
| -#ifdef HAL_NOR_MODULE_ENABLED |
304 |
| - #include "stm32mp1xx_hal_nor.h" |
305 |
| -#endif /* HAL_NOR_MODULE_ENABLED */ |
306 |
| - |
307 |
| -#ifdef HAL_PCD_MODULE_ENABLED |
308 |
| - #include "stm32mp1xx_hal_pcd.h" |
309 |
| -#endif /* HAL_PCD_MODULE_ENABLED */ |
310 |
| - |
311 | 305 | #ifdef HAL_PWR_MODULE_ENABLED
|
312 | 306 | #include "stm32mp1xx_hal_pwr.h"
|
313 | 307 | #endif /* HAL_PWR_MODULE_ENABLED */
|
|
320 | 314 | #include "stm32mp1xx_hal_rng.h"
|
321 | 315 | #endif /* HAL_RNG_MODULE_ENABLED */
|
322 | 316 |
|
| 317 | +#ifdef HAL_RTC_MODULE_ENABLED |
| 318 | + #include "stm32mp1xx_hal_rtc.h" |
| 319 | +#endif /* HAL_RTC_MODULE_ENABLED */ |
| 320 | + |
323 | 321 | #ifdef HAL_SAI_MODULE_ENABLED
|
324 | 322 | #include "stm32mp1xx_hal_sai.h"
|
325 | 323 | #endif /* HAL_SAI_MODULE_ENABLED */
|
|
328 | 326 | #include "stm32mp1xx_hal_sd.h"
|
329 | 327 | #endif /* HAL_SD_MODULE_ENABLED */
|
330 | 328 |
|
331 |
| -#ifdef HAL_MMC_MODULE_ENABLED |
332 |
| - #include "stm32mp1xx_hal_mmc.h" |
333 |
| -#endif /* HAL_MMC_MODULE_ENABLED */ |
334 |
| - |
335 |
| -#ifdef HAL_SMARTCARD_MODULE_ENABLED |
336 |
| - #include "stm32mp1xx_hal_smartcard.h" |
337 |
| -#endif /* HAL_SMARTCARD_MODULE_ENABLED */ |
338 |
| - |
339 | 329 | #ifdef HAL_SMBUS_MODULE_ENABLED
|
340 | 330 | #include "stm32mp1xx_hal_smbus.h"
|
341 | 331 | #endif /* HAL_SMBUS_MODULE_ENABLED */
|
|
348 | 338 | #include "stm32mp1xx_hal_spi.h"
|
349 | 339 | #endif /* HAL_SPI_MODULE_ENABLED */
|
350 | 340 |
|
351 |
| -#ifdef HAL_SRAM_MODULE_ENABLED |
352 |
| - #include "stm32mp1xx_hal_sram.h" |
353 |
| -#endif /* HAL_SRAM_MODULE_ENABLED */ |
354 |
| - |
355 |
| -#ifdef HAL_RTC_MODULE_ENABLED |
356 |
| - #include "stm32mp1xx_hal_rtc.h" |
357 |
| -#endif /* HAL_RTC_MODULE_ENABLED */ |
358 |
| - |
359 |
| -#ifdef HAL_TAMP_MODULE_ENABLED |
360 |
| - #include "stm32mp1xx_hal_tamp.h" |
361 |
| -#endif /* HAL_TAMP_MODULE_ENABLED */ |
362 |
| - |
363 | 341 | #ifdef HAL_TIM_MODULE_ENABLED
|
364 | 342 | #include "stm32mp1xx_hal_tim.h"
|
365 | 343 | #endif /* HAL_TIM_MODULE_ENABLED */
|
366 | 344 |
|
367 |
| -#ifdef HAL_TMPSENS_MODULE_ENABLED |
368 |
| - #include "stm32mp1xx_hal_tmpsens.h" |
369 |
| -#endif /* HAL_TMPSENS_MODULE_ENABLED */ |
370 |
| - |
371 | 345 | #ifdef HAL_UART_MODULE_ENABLED
|
372 | 346 | #include "stm32mp1xx_hal_uart.h"
|
373 | 347 | #endif /* HAL_UART_MODULE_ENABLED */
|
|
379 | 353 | #ifdef HAL_WWDG_MODULE_ENABLED
|
380 | 354 | #include "stm32mp1xx_hal_wwdg.h"
|
381 | 355 | #endif /* HAL_WWDG_MODULE_ENABLED */
|
382 |
| - |
| 356 | + |
383 | 357 | /* Exported macro ------------------------------------------------------------*/
|
384 | 358 | #ifdef USE_FULL_ASSERT
|
385 | 359 | /**
|
386 | 360 | * @brief The assert_param macro is used for function's parameters check.
|
387 | 361 | * @param expr: If expr is false, it calls assert_failed function
|
388 | 362 | * which reports the name of the source file and the source
|
389 |
| - * line number of the call that failed. |
| 363 | + * line number of the call that failed. |
390 | 364 | * If expr is true, it returns no value.
|
391 | 365 | * @retval None
|
392 | 366 | */
|
393 | 367 | #define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__))
|
394 | 368 | /* Exported functions ------------------------------------------------------- */
|
395 | 369 | void assert_failed(uint8_t* file, uint32_t line);
|
396 | 370 | #else
|
397 |
| - #define assert_param(expr) ((void)0) |
| 371 | + #define assert_param(expr) ((void)0U) |
398 | 372 | #endif /* USE_FULL_ASSERT */
|
399 | 373 |
|
400 | 374 | #ifdef __cplusplus
|
401 | 375 | }
|
402 | 376 | #endif
|
403 | 377 |
|
404 | 378 | #endif /* __STM32MP1xx_HAL_CONF_DEFAULT_H */
|
| 379 | + |
| 380 | + |
| 381 | +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |
| 382 | + |
0 commit comments