Skip to content

Commit 647e87a

Browse files
committed
[MP1] Update stm32mp1xx_hal_conf_default.h
Signed-off-by: Frederic Pillon <[email protected]>
1 parent e3b5de5 commit 647e87a

File tree

1 file changed

+90
-112
lines changed

1 file changed

+90
-112
lines changed

system/STM32MP1xx/stm32mp1xx_hal_conf_default.h

+90-112
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@
22
******************************************************************************
33
* @file stm32mp1xx_hal_conf.h
44
* @author MCD Application Team
5-
* @brief HAL configuration template file.
5+
* @brief HAL configuration template file.
66
* This file should be copied to the application folder and renamed
77
* to stm32mp1xx_hal_conf.h.
88
******************************************************************************
9-
*
109
* @attention
1110
*
1211
* <h2><center>&copy; Copyright (c) 2019 STMicroelectronics.
@@ -58,90 +57,118 @@
5857
#define HAL_MODULE_ENABLED
5958
#define HAL_ADC_MODULE_ENABLED
6059
#define HAL_CEC_MODULE_ENABLED
60+
#define HAL_CORTEX_MODULE_ENABLED
6161
#define HAL_CRC_MODULE_ENABLED
62+
#define HAL_CRYP_MODULE_ENABLED
6263
#define HAL_DAC_MODULE_ENABLED
63-
#define HAL_DSI_MODULE_ENABLED
64+
#define HAL_DCMI_MODULE_ENABLED
6465
#define HAL_DFSDM_MODULE_ENABLED
65-
#define HAL_ETH_MODULE_ENABLED
66+
#define HAL_DMA_MODULE_ENABLED
6667
#define HAL_EXTI_MODULE_ENABLED
6768
#define HAL_FDCAN_MODULE_ENABLED
69+
#define HAL_GPIO_MODULE_ENABLED
6870
#define HAL_HASH_MODULE_ENABLED
6971
#define HAL_HSEM_MODULE_ENABLED
70-
#define HAL_HCD_MODULE_ENABLED
7172
#define HAL_I2C_MODULE_ENABLED
72-
#define HAL_I2S_MODULE_ENABLED
7373
#define HAL_IPCC_MODULE_ENABLED
74-
#define HAL_IWDG_MODULE_ENABLED
7574
#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
8077
#define HAL_QSPI_MODULE_ENABLED
78+
#define HAL_RCC_MODULE_ENABLED
8179
#define HAL_RNG_MODULE_ENABLED
80+
#define HAL_RTC_MODULE_ENABLED
8281
#define HAL_SAI_MODULE_ENABLED
8382
#define HAL_SD_MODULE_ENABLED
84-
#define HAL_RTC_MODULE_ENABLED
8583
#define HAL_SMBUS_MODULE_ENABLED
8684
#define HAL_SPDIFRX_MODULE_ENABLED
8785
#define HAL_SPI_MODULE_ENABLED
88-
#define HAL_SRAM_MODULE_ENABLED
89-
#define HAL_TAMP_MODULE_ENABLED
9086
#define HAL_TIM_MODULE_ENABLED
91-
#define HAL_TMPSENS_MODULE_ENABLED
9287
#define HAL_UART_MODULE_ENABLED
9388
#define HAL_USART_MODULE_ENABLED
9489
#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
10190
#endif
10291

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 ################### */
104117
/**
105118
* @brief Adjust the value of External High Speed oscillator (HSE) used in your application.
106119
* 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).
108121
*/
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 */
111124
#endif /* HSE_VALUE */
112125

126+
/**
127+
* @brief In the following line adjust the External High Speed oscillator (HSE) Startup
128+
* Timeout value
129+
*/
113130
#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 */
115132
#endif /* HSE_STARTUP_TIMEOUT */
116133

117134
/**
118135
* @brief Internal High Speed oscillator (HSI) value.
119136
* 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).
121138
*/
122139
#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*/
124141
#endif /* HSI_VALUE */
125142

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+
126152
/**
127153
* @brief Internal Low Speed oscillator (LSI) value.
128154
*/
129-
#if !defined (LSI_VALUE)
155+
#if !defined (LSI_VALUE)
130156
#define LSI_VALUE 32000U
131157
#endif /* LSI_VALUE */ /*!< Value of the Internal Low Speed oscillator in Hz
132158
The real value may vary depending on the variations
133159
in voltage and temperature. */
134-
135160
/**
136161
* @brief External Low Speed oscillator (LSE) value.
137-
* This value is used by the UART, RTC HAL module to compute the system frequency
138162
*/
139163
#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 */
141165
#endif /* LSE_VALUE */
142166

167+
/**
168+
* @brief Time out for LSE start up value in ms.
169+
*/
143170
#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 */
145172
#endif /* LSE_STARTUP_TIMEOUT */
146173

147174
/**
@@ -154,8 +181,8 @@
154181

155182
/**
156183
* @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.
159186
*/
160187
#if !defined (EXTERNAL_CLOCK_VALUE)
161188
#define EXTERNAL_CLOCK_VALUE 12288000U /*!< Value of the External clock in Hz*/
@@ -167,25 +194,36 @@
167194
/* ########################### System Configuration ######################### */
168195
/**
169196
* @brief This is the HAL system configuration section
170-
*/
197+
*/
198+
#if !defined (VDD_VALUE)
171199
#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)
173205
#define USE_RTOS 0U
174-
206+
#endif
207+
#if !defined (PREFETCH_ENABLE)
175208
#define PREFETCH_ENABLE 0U
209+
#endif
210+
#if !defined (INSTRUCTION_CACHE_ENABLE)
176211
#define INSTRUCTION_CACHE_ENABLE 0U
212+
#endif
213+
#if !defined (DATA_CACHE_ENABLE)
177214
#define DATA_CACHE_ENABLE 0U
215+
#endif
178216

179217
/* ########################## Assert Selection ############################## */
180218
/**
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
182220
* HAL drivers code
183221
*/
184-
/* #define USE_FULL_ASSERT 1U */
222+
/* #define USE_FULL_ASSERT 1U */
185223

186224
/* Includes ------------------------------------------------------------------*/
187225
/**
188-
* @brief Include module's header file
226+
* @brief Include module's header file
189227
*/
190228

191229
#ifdef HAL_RCC_MODULE_ENABLED
@@ -244,18 +282,6 @@
244282
#include "stm32mp1xx_hal_dfsdm.h"
245283
#endif /* HAL_DFSDM_MODULE_ENABLED */
246284

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-
259285
#ifdef HAL_FDCAN_MODULE_ENABLED
260286
#include "stm32mp1xx_hal_fdcan.h"
261287
#endif /* HAL_FDCAN_MODULE_ENABLED */
@@ -264,50 +290,18 @@
264290
#include "stm32mp1xx_hal_hash.h"
265291
#endif /* HAL_HASH_MODULE_ENABLED */
266292

267-
#ifdef HAL_HCD_MODULE_ENABLED
268-
#include "stm32mp1xx_hal_hcd.h"
269-
#endif /* HAL_HASH_MODULE_ENABLED */
270-
271293
#ifdef HAL_I2C_MODULE_ENABLED
272294
#include "stm32mp1xx_hal_i2c.h"
273295
#endif /* HAL_I2C_MODULE_ENABLED */
274296

275-
#ifdef HAL_I2S_MODULE_ENABLED
276-
#include "stm32mp1xx_hal_i2s.h"
277-
#endif /* HAL_I2S_MODULE_ENABLED */
278-
279297
#ifdef HAL_IPCC_MODULE_ENABLED
280298
#include "stm32mp1xx_hal_ipcc.h"
281299
#endif /* HAL_IPCC_MODULE_ENABLED */
282300

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-
291301
#ifdef HAL_LPTIM_MODULE_ENABLED
292302
#include "stm32mp1xx_hal_lptim.h"
293303
#endif /* HAL_LPTIM_MODULE_ENABLED */
294304

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-
311305
#ifdef HAL_PWR_MODULE_ENABLED
312306
#include "stm32mp1xx_hal_pwr.h"
313307
#endif /* HAL_PWR_MODULE_ENABLED */
@@ -320,6 +314,10 @@
320314
#include "stm32mp1xx_hal_rng.h"
321315
#endif /* HAL_RNG_MODULE_ENABLED */
322316

317+
#ifdef HAL_RTC_MODULE_ENABLED
318+
#include "stm32mp1xx_hal_rtc.h"
319+
#endif /* HAL_RTC_MODULE_ENABLED */
320+
323321
#ifdef HAL_SAI_MODULE_ENABLED
324322
#include "stm32mp1xx_hal_sai.h"
325323
#endif /* HAL_SAI_MODULE_ENABLED */
@@ -328,14 +326,6 @@
328326
#include "stm32mp1xx_hal_sd.h"
329327
#endif /* HAL_SD_MODULE_ENABLED */
330328

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-
339329
#ifdef HAL_SMBUS_MODULE_ENABLED
340330
#include "stm32mp1xx_hal_smbus.h"
341331
#endif /* HAL_SMBUS_MODULE_ENABLED */
@@ -348,26 +338,10 @@
348338
#include "stm32mp1xx_hal_spi.h"
349339
#endif /* HAL_SPI_MODULE_ENABLED */
350340

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-
363341
#ifdef HAL_TIM_MODULE_ENABLED
364342
#include "stm32mp1xx_hal_tim.h"
365343
#endif /* HAL_TIM_MODULE_ENABLED */
366344

367-
#ifdef HAL_TMPSENS_MODULE_ENABLED
368-
#include "stm32mp1xx_hal_tmpsens.h"
369-
#endif /* HAL_TMPSENS_MODULE_ENABLED */
370-
371345
#ifdef HAL_UART_MODULE_ENABLED
372346
#include "stm32mp1xx_hal_uart.h"
373347
#endif /* HAL_UART_MODULE_ENABLED */
@@ -379,26 +353,30 @@
379353
#ifdef HAL_WWDG_MODULE_ENABLED
380354
#include "stm32mp1xx_hal_wwdg.h"
381355
#endif /* HAL_WWDG_MODULE_ENABLED */
382-
356+
383357
/* Exported macro ------------------------------------------------------------*/
384358
#ifdef USE_FULL_ASSERT
385359
/**
386360
* @brief The assert_param macro is used for function's parameters check.
387361
* @param expr: If expr is false, it calls assert_failed function
388362
* 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.
390364
* If expr is true, it returns no value.
391365
* @retval None
392366
*/
393367
#define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__))
394368
/* Exported functions ------------------------------------------------------- */
395369
void assert_failed(uint8_t* file, uint32_t line);
396370
#else
397-
#define assert_param(expr) ((void)0)
371+
#define assert_param(expr) ((void)0U)
398372
#endif /* USE_FULL_ASSERT */
399373

400374
#ifdef __cplusplus
401375
}
402376
#endif
403377

404378
#endif /* __STM32MP1xx_HAL_CONF_DEFAULT_H */
379+
380+
381+
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
382+

0 commit comments

Comments
 (0)