Skip to content

Commit c5f6381

Browse files
committed
STM32MP1xx: Review HAL default configuration
1 parent 19b384d commit c5f6381

File tree

2 files changed

+63
-63
lines changed

2 files changed

+63
-63
lines changed

system/Drivers/CMSIS/Device/ST/STM32MP1xx/Include/stm32mp1xx.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
* is using in the C source code, usually in main.c. This file contains:
99
* - Configuration section that allows to select:
1010
* - The STM32MP1xx device used in the target application
11-
* - To use or not the peripherals drivers in application code(i.e.
12-
* code will be based on direct access to peripherals registers
11+
* - To use or not the peripherals drivers in application code(i.e.
12+
* code will be based on direct access to peripherals registers
1313
* rather than drivers API), this option is controlled by
1414
* "#define USE_HAL_DRIVER"
1515
*
@@ -197,7 +197,7 @@ typedef enum
197197
*/
198198

199199
#if defined (USE_HAL_DRIVER)
200-
#include "stm32mp1xx_hal_conf.h"
200+
#include "stm32mp1xx_hal.h"
201201
#endif /* USE_HAL_DRIVER */
202202

203203

system/STM32MP1xx/stm32mp1xx_hal_conf_default.h

Lines changed: 60 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
/**
22
******************************************************************************
3-
* @file stm32mp1xx_hal_conf.h
4-
* @author MCD Application Team
5-
* @brief HAL configuration template file.
6-
* This file should be copied to the application folder and renamed
7-
* to stm32mp1xx_hal_conf.h.
3+
* @file stm32mp1xx_hal_conf_default.h
4+
* @brief HAL default configuration file.
85
******************************************************************************
9-
*
106
* @attention
117
*
128
* <h2><center>&copy; Copyright (c) 2019 STMicroelectronics.
@@ -22,73 +18,78 @@
2218
*/
2319

2420
/* Define to prevent recursive inclusion -------------------------------------*/
25-
#ifndef __STM32MP1xx_HAL_CONF_H
26-
#define __STM32MP1xx_HAL_CONF_H
21+
#ifndef __STM32MP1xx_HAL_CONF_DEFAULT_H
22+
#define __STM32MP1xx_HAL_CONF_DEFAULT_H
2723

2824
#ifdef __cplusplus
29-
extern "C" {
25+
extern "C" {
3026
#endif
3127

32-
33-
3428
/* Exported types ------------------------------------------------------------*/
3529
/* Exported constants --------------------------------------------------------*/
3630

3731
/* ########################## Module Selection ############################## */
3832
/**
39-
* @brief This is the list of modules to be used in the HAL driver
33+
* @brief Include the default list of modules to be used in the HAL driver
34+
* and manage module deactivation
35+
*/
36+
#include "stm32yyxx_hal_conf.h"
37+
#if 0
38+
/**
39+
* @brief This is the list of modules to be used in the HAL driver
4040
*/
41-
#define HAL_MODULE_ENABLED
42-
/*#define HAL_ADC_MODULE_ENABLED */
43-
/*#define HAL_CEC_MODULE_ENABLED */
44-
/*#define HAL_CRC_MODULE_ENABLED */
45-
/*#define HAL_DAC_MODULE_ENABLED */
46-
/*#define HAL_DSI_MODULE_ENABLED */
47-
/*#define HAL_DFSDM_MODULE_ENABLED */
48-
/*#define HAL_ETH_MODULE_ENABLED */
41+
#define HAL_MODULE_ENABLED
42+
#define HAL_ADC_MODULE_ENABLED
43+
#define HAL_CEC_MODULE_ENABLED
44+
#define HAL_CRC_MODULE_ENABLED
45+
#define HAL_DAC_MODULE_ENABLED
46+
#define HAL_DSI_MODULE_ENABLED
47+
#define HAL_DFSDM_MODULE_ENABLED
48+
#define HAL_ETH_MODULE_ENABLED
4949
#define HAL_EXTI_MODULE_ENABLED
50-
/*#define HAL_FDCAN_MODULE_ENABLED */
51-
/*#define HAL_HASH_MODULE_ENABLED */
50+
#define HAL_FDCAN_MODULE_ENABLED
51+
#define HAL_HASH_MODULE_ENABLED
5252
#define HAL_HSEM_MODULE_ENABLED
53-
/*#define HAL_HCD_MODULE_ENABLED */
54-
/*#define HAL_I2C_MODULE_ENABLED */
55-
/*#define HAL_I2S_MODULE_ENABLED */
53+
#define HAL_HCD_MODULE_ENABLED
54+
#define HAL_I2C_MODULE_ENABLED
55+
#define HAL_I2S_MODULE_ENABLED
5656
#define HAL_IPCC_MODULE_ENABLED
57-
/*#define HAL_IWDG_MODULE_ENABLED */
58-
/*#define HAL_LPTIM_MODULE_ENABLED */
59-
/*#define HAL_LTDC_MODULE_ENABLED */
60-
/*#define HAL_NAND_MODULE_ENABLED */
61-
/*#define HAL_NOR_MODULE_ENABLED */
62-
/*#define HAL_PCD_MODULE_ENABLED */
63-
/*#define HAL_QSPI_MODULE_ENABLED */
64-
/*#define HAL_RNG_MODULE_ENABLED */
65-
/*#define HAL_SAI_MODULE_ENABLED */
66-
/*#define HAL_SD_MODULE_ENABLED */
67-
/*#define HAL_RTC_MODULE_ENABLED */
68-
/*#define HAL_SMBUS_MODULE_ENABLED */
69-
/*#define HAL_SPDIFRX_MODULE_ENABLED */
70-
/*#define HAL_SPI_MODULE_ENABLED */
71-
/*#define HAL_SRAM_MODULE_ENABLED */
72-
/*#define HAL_TAMP_MODULE_ENABLED */
73-
/*#define HAL_TIM_MODULE_ENABLED */
74-
/*#define HAL_TMPSENS_MODULE_ENABLED */
75-
/*#define HAL_UART_MODULE_ENABLED */
76-
/*#define HAL_USART_MODULE_ENABLED */
77-
/*#define HAL_WWDG_MODULE_ENABLED */
57+
#define HAL_IWDG_MODULE_ENABLED
58+
#define HAL_LPTIM_MODULE_ENABLED
59+
#define HAL_LTDC_MODULE_ENABLED
60+
#define HAL_NAND_MODULE_ENABLED
61+
#define HAL_NOR_MODULE_ENABLED
62+
#define HAL_PCD_MODULE_ENABLED
63+
#define HAL_QSPI_MODULE_ENABLED
64+
#define HAL_RNG_MODULE_ENABLED
65+
#define HAL_SAI_MODULE_ENABLED
66+
#define HAL_SD_MODULE_ENABLED
67+
#define HAL_RTC_MODULE_ENABLED
68+
#define HAL_SMBUS_MODULE_ENABLED
69+
#define HAL_SPDIFRX_MODULE_ENABLED
70+
#define HAL_SPI_MODULE_ENABLED
71+
#define HAL_SRAM_MODULE_ENABLED
72+
#define HAL_TAMP_MODULE_ENABLED
73+
#define HAL_TIM_MODULE_ENABLED
74+
#define HAL_TMPSENS_MODULE_ENABLED
75+
#define HAL_UART_MODULE_ENABLED
76+
#define HAL_USART_MODULE_ENABLED
77+
#define HAL_WWDG_MODULE_ENABLED
7878
#define HAL_GPIO_MODULE_ENABLED
7979
#define HAL_DMA_MODULE_ENABLED
8080
#define HAL_MDMA_MODULE_ENABLED
8181
#define HAL_RCC_MODULE_ENABLED
8282
#define HAL_PWR_MODULE_ENABLED
8383
#define HAL_CORTEX_MODULE_ENABLED
84+
#endif
8485

8586
/* ########################## Oscillator Values adaptation ####################*/
8687
/**
8788
* @brief Adjust the value of External High Speed oscillator (HSE) used in your application.
8889
* This value is used by the RCC HAL module to compute the system frequency
89-
* (when HSE is used as system clock source, directly or through the PLL).
90+
* (when HSE is used as system clock source, directly or through the PLL).
9091
*/
91-
#if !defined (HSE_VALUE)
92+
#if !defined (HSE_VALUE)
9293
#define HSE_VALUE ((uint32_t)24000000) /*!< Value of the External oscillator in Hz : FPGA case fixed to 60MHZ */
9394
#endif /* HSE_VALUE */
9495

@@ -99,7 +100,7 @@
99100
/**
100101
* @brief Internal High Speed oscillator (HSI) value.
101102
* This value is used by the RCC HAL module to compute the system frequency
102-
* (when HSI is used as system clock source, directly or through the PLL).
103+
* (when HSI is used as system clock source, directly or through the PLL).
103104
*/
104105
#if !defined (HSI_VALUE)
105106
#define HSI_VALUE ((uint32_t)64000000) /*!< Value of the Internal oscillator in Hz*/
@@ -116,7 +117,7 @@
116117
/**
117118
* @brief Internal Low Speed oscillator (LSI) value.
118119
*/
119-
#if !defined (LSI_VALUE)
120+
#if !defined (LSI_VALUE)
120121
#define LSI_VALUE 32000U
121122
#endif /* LSI_VALUE */ /*!< Value of the Internal Low Speed oscillator in Hz
122123
The real value may vary depending on the variations
@@ -147,8 +148,8 @@
147148

148149
/**
149150
* @brief External clock source for I2S peripheral
150-
* This value is used by the I2S HAL module to compute the I2S clock source
151-
* frequency, this source is inserted directly through I2S_CKIN pad.
151+
* This value is used by the I2S HAL module to compute the I2S clock source
152+
* frequency, this source is inserted directly through I2S_CKIN pad.
152153
*/
153154
#if !defined (EXTERNAL_CLOCK_VALUE)
154155
#define EXTERNAL_CLOCK_VALUE 12288000U /*!< Value of the External clock in Hz*/
@@ -160,7 +161,7 @@
160161
/* ########################### System Configuration ######################### */
161162
/**
162163
* @brief This is the HAL system configuration section
163-
*/
164+
*/
164165
#define VDD_VALUE 3300U /*!< Value of VDD in mv */
165166
#define TICK_INT_PRIORITY 0U /*!< tick interrupt priority */
166167
#define USE_RTOS 0U
@@ -171,14 +172,14 @@
171172

172173
/* ########################## Assert Selection ############################## */
173174
/**
174-
* @brief Uncomment the line below to expanse the "assert_param" macro in the
175+
* @brief Uncomment the line below to expanse the "assert_param" macro in the
175176
* HAL drivers code
176177
*/
177-
/* #define USE_FULL_ASSERT 1U */
178+
/* #define USE_FULL_ASSERT 1U */
178179

179180
/* Includes ------------------------------------------------------------------*/
180181
/**
181-
* @brief Include module's header file
182+
* @brief Include module's header file
182183
*/
183184

184185
#ifdef HAL_RCC_MODULE_ENABLED
@@ -364,14 +365,14 @@
364365
#ifdef HAL_WWDG_MODULE_ENABLED
365366
#include "stm32mp1xx_hal_wwdg.h"
366367
#endif /* HAL_WWDG_MODULE_ENABLED */
367-
368+
368369
/* Exported macro ------------------------------------------------------------*/
369370
#ifdef USE_FULL_ASSERT
370371
/**
371372
* @brief The assert_param macro is used for function's parameters check.
372373
* @param expr: If expr is false, it calls assert_failed function
373374
* which reports the name of the source file and the source
374-
* line number of the call that failed.
375+
* line number of the call that failed.
375376
* If expr is true, it returns no value.
376377
* @retval None
377378
*/
@@ -386,5 +387,4 @@
386387
}
387388
#endif
388389

389-
#endif /* __STM32MP1xx_HAL_CONF_H */
390-
390+
#endif /* __STM32MP1xx_HAL_CONF_DEFAULT_H */

0 commit comments

Comments
 (0)