|
1 | 1 | /**
|
2 | 2 | ******************************************************************************
|
3 |
| - * @file stm32f7xx_hal_conf_template.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 stm32f7xx_hal_conf.h. |
| 3 | + * @file stm32f7xx_hal_conf.h |
| 4 | + * @brief HAL configuration file. |
8 | 5 | ******************************************************************************
|
9 | 6 | * @attention
|
10 | 7 | *
|
11 |
| - * <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2> |
| 8 | + * <h2><center>© COPYRIGHT(c) 2018 STMicroelectronics</center></h2> |
12 | 9 | *
|
13 | 10 | * Redistribution and use in source and binary forms, with or without modification,
|
14 | 11 | * are permitted provided that the following conditions are met:
|
|
51 | 48 | * @brief This is the list of modules to be used in the HAL driver
|
52 | 49 | */
|
53 | 50 | #define HAL_MODULE_ENABLED
|
54 |
| -#define HAL_ADC_MODULE_ENABLED |
55 |
| -#define HAL_CAN_MODULE_ENABLED |
56 |
| -/* #define HAL_CAN_LEGACY_MODULE_ENABLED */ |
57 |
| -/* #define HAL_CEC_MODULE_ENABLED */ |
58 |
| -/* #define HAL_CRC_MODULE_ENABLED */ |
59 |
| -/* #define HAL_CRYP_MODULE_ENABLED */ |
60 |
| -#define HAL_DAC_MODULE_ENABLED |
61 |
| -/* #define HAL_DCMI_MODULE_ENABLED */ |
62 |
| -#define HAL_DMA_MODULE_ENABLED |
63 |
| -/* #define HAL_DMA2D_MODULE_ENABLED */ |
| 51 | + |
| 52 | +/* #define HAL_ADC_MODULE_ENABLED */ |
| 53 | +/* #define HAL_CRYP_MODULE_ENABLED */ |
| 54 | +/* #define HAL_CAN_MODULE_ENABLED */ |
| 55 | +/* #define HAL_CEC_MODULE_ENABLED */ |
| 56 | +/* #define HAL_CRC_MODULE_ENABLED */ |
| 57 | +/* #define HAL_CRYP_MODULE_ENABLED */ |
| 58 | +/* #define HAL_DAC_MODULE_ENABLED */ |
| 59 | +/* #define HAL_DCMI_MODULE_ENABLED */ |
| 60 | +/* #define HAL_DMA2D_MODULE_ENABLED */ |
64 | 61 | #define HAL_ETH_MODULE_ENABLED
|
65 |
| -#define HAL_FLASH_MODULE_ENABLED |
66 |
| -/* #define HAL_NAND_MODULE_ENABLED */ |
67 |
| -/* #define HAL_NOR_MODULE_ENABLED */ |
68 |
| -/* #define HAL_SRAM_MODULE_ENABLED */ |
69 |
| -/* #define HAL_SDRAM_MODULE_ENABLED */ |
70 |
| -/* #define HAL_HASH_MODULE_ENABLED */ |
| 62 | +/* #define HAL_NAND_MODULE_ENABLED */ |
| 63 | +/* #define HAL_NOR_MODULE_ENABLED */ |
| 64 | +/* #define HAL_SRAM_MODULE_ENABLED */ |
| 65 | +/* #define HAL_SDRAM_MODULE_ENABLED */ |
| 66 | +/* #define HAL_HASH_MODULE_ENABLED */ |
| 67 | +/* #define HAL_I2S_MODULE_ENABLED */ |
| 68 | +/* #define HAL_IWDG_MODULE_ENABLED */ |
| 69 | +/* #define HAL_LPTIM_MODULE_ENABLED */ |
| 70 | +/* #define HAL_LTDC_MODULE_ENABLED */ |
| 71 | +/* #define HAL_QSPI_MODULE_ENABLED */ |
| 72 | +/* #define HAL_RNG_MODULE_ENABLED */ |
| 73 | +/* #define HAL_RTC_MODULE_ENABLED */ |
| 74 | +/* #define HAL_SAI_MODULE_ENABLED */ |
| 75 | +/* #define HAL_SD_MODULE_ENABLED */ |
| 76 | +/* #define HAL_MMC_MODULE_ENABLED */ |
| 77 | +/* #define HAL_SPDIFRX_MODULE_ENABLED */ |
| 78 | +/* #define HAL_SPI_MODULE_ENABLED */ |
| 79 | +/* #define HAL_TIM_MODULE_ENABLED */ |
| 80 | +#define HAL_UART_MODULE_ENABLED |
| 81 | +/* #define HAL_USART_MODULE_ENABLED */ |
| 82 | +/* #define HAL_IRDA_MODULE_ENABLED */ |
| 83 | +/* #define HAL_SMARTCARD_MODULE_ENABLED */ |
| 84 | +/* #define HAL_WWDG_MODULE_ENABLED */ |
| 85 | +#define HAL_PCD_MODULE_ENABLED |
| 86 | +/* #define HAL_HCD_MODULE_ENABLED */ |
| 87 | +/* #define HAL_DFSDM_MODULE_ENABLED */ |
| 88 | +/* #define HAL_DSI_MODULE_ENABLED */ |
| 89 | +/* #define HAL_JPEG_MODULE_ENABLED */ |
| 90 | +/* #define HAL_MDIOS_MODULE_ENABLED */ |
| 91 | +/* #define HAL_SMBUS_MODULE_ENABLED */ |
| 92 | +/* #define HAL_MMC_MODULE_ENABLED */ |
| 93 | +/* #define HAL_EXTI_MODULE_ENABLED */ |
71 | 94 | #define HAL_GPIO_MODULE_ENABLED
|
72 |
| -#define HAL_I2C_MODULE_ENABLED |
73 |
| -/* #define HAL_I2S_MODULE_ENABLED */ |
74 |
| -/* #define HAL_IWDG_MODULE_ENABLED */ |
75 |
| -/* #define HAL_LPTIM_MODULE_ENABLED */ |
76 |
| -/* #define HAL_LTDC_MODULE_ENABLED */ |
77 |
| -#define HAL_PWR_MODULE_ENABLED |
78 |
| -/* #define HAL_QSPI_MODULE_ENABLED */ |
| 95 | +#define HAL_DMA_MODULE_ENABLED |
79 | 96 | #define HAL_RCC_MODULE_ENABLED
|
80 |
| -/* #define HAL_RNG_MODULE_ENABLED */ |
81 |
| -#define HAL_RTC_MODULE_ENABLED |
82 |
| -/* #define HAL_SAI_MODULE_ENABLED */ |
83 |
| -#define HAL_SD_MODULE_ENABLED |
84 |
| -/* #define HAL_SPDIFRX_MODULE_ENABLED */ |
85 |
| -#define HAL_SPI_MODULE_ENABLED |
86 |
| -#define HAL_TIM_MODULE_ENABLED |
87 |
| -/* #define HAL_UART_MODULE_ENABLED */ |
88 |
| -/* #define HAL_USART_MODULE_ENABLED */ |
89 |
| -/* #define HAL_IRDA_MODULE_ENABLED */ |
90 |
| -/* #define HAL_SMARTCARD_MODULE_ENABLED */ |
91 |
| -/* #define HAL_WWDG_MODULE_ENABLED */ |
| 97 | +#define HAL_FLASH_MODULE_ENABLED |
| 98 | +#define HAL_PWR_MODULE_ENABLED |
| 99 | +#define HAL_I2C_MODULE_ENABLED |
92 | 100 | #define HAL_CORTEX_MODULE_ENABLED
|
93 |
| -#define HAL_PCD_MODULE_ENABLED |
94 |
| -#define HAL_HCD_MODULE_ENABLED |
95 |
| -/* #define HAL_DFSDM_MODULE_ENABLED */ |
96 |
| -/* #define HAL_DSI_MODULE_ENABLED */ |
97 |
| -/* #define HAL_JPEG_MODULE_ENABLED */ |
98 |
| -/* #define HAL_MDIOS_MODULE_ENABLED */ |
99 |
| -/* #define HAL_SMBUS_MODULE_ENABLED */ |
100 |
| -/* #define HAL_MMC_MODULE_ENABLED */ |
101 |
| - |
102 | 101 |
|
103 | 102 | /* ########################## HSE/HSI Values adaptation ##################### */
|
104 | 103 | /**
|
|
107 | 106 | * (when HSE is used as system clock source, directly or through the PLL).
|
108 | 107 | */
|
109 | 108 | #if !defined (HSE_VALUE)
|
110 |
| - #define HSE_VALUE 25000000U /*!< Value of the External oscillator in Hz */ |
| 109 | + #define HSE_VALUE ((uint32_t)8000000U) /*!< Value of the External oscillator in Hz */ |
111 | 110 | #endif /* HSE_VALUE */
|
112 | 111 |
|
113 | 112 | #if !defined (HSE_STARTUP_TIMEOUT)
|
114 |
| - #define HSE_STARTUP_TIMEOUT 100U /*!< Time out for HSE start up, in ms */ |
| 113 | + #define HSE_STARTUP_TIMEOUT ((uint32_t)100U) /*!< Time out for HSE start up, in ms */ |
115 | 114 | #endif /* HSE_STARTUP_TIMEOUT */
|
116 | 115 |
|
117 | 116 | /**
|
|
120 | 119 | * (when HSI is used as system clock source, directly or through the PLL).
|
121 | 120 | */
|
122 | 121 | #if !defined (HSI_VALUE)
|
123 |
| - #define HSI_VALUE 16000000U /*!< Value of the Internal oscillator in Hz*/ |
| 122 | + #define HSI_VALUE ((uint32_t)16000000U) /*!< Value of the Internal oscillator in Hz*/ |
124 | 123 | #endif /* HSI_VALUE */
|
125 | 124 |
|
126 | 125 | /**
|
127 | 126 | * @brief Internal Low Speed oscillator (LSI) value.
|
128 | 127 | */
|
129 | 128 | #if !defined (LSI_VALUE)
|
130 |
| - #define LSI_VALUE 32000U /*!< LSI Typical Value in Hz*/ |
| 129 | + #define LSI_VALUE ((uint32_t)32000U) /*!< LSI Typical Value in Hz*/ |
131 | 130 | #endif /* LSI_VALUE */ /*!< Value of the Internal Low Speed oscillator in Hz
|
132 | 131 | The real value may vary depending on the variations
|
133 | 132 | in voltage and temperature. */
|
134 | 133 | /**
|
135 | 134 | * @brief External Low Speed oscillator (LSE) value.
|
136 | 135 | */
|
137 | 136 | #if !defined (LSE_VALUE)
|
138 |
| - #define LSE_VALUE 32768U /*!< Value of the External Low Speed oscillator in Hz */ |
| 137 | + #define LSE_VALUE ((uint32_t)32768U) /*!< Value of the External Low Speed oscillator in Hz */ |
139 | 138 | #endif /* LSE_VALUE */
|
140 | 139 |
|
141 | 140 | #if !defined (LSE_STARTUP_TIMEOUT)
|
142 |
| - #define LSE_STARTUP_TIMEOUT 5000U /*!< Time out for LSE start up, in ms */ |
| 141 | + #define LSE_STARTUP_TIMEOUT ((uint32_t)5000U) /*!< Time out for LSE start up, in ms */ |
143 | 142 | #endif /* LSE_STARTUP_TIMEOUT */
|
144 | 143 |
|
145 | 144 | /**
|
|
148 | 147 | * frequency, this source is inserted directly through I2S_CKIN pad.
|
149 | 148 | */
|
150 | 149 | #if !defined (EXTERNAL_CLOCK_VALUE)
|
151 |
| - #define EXTERNAL_CLOCK_VALUE 12288000U /*!< Value of the Internal oscillator in Hz*/ |
| 150 | + #define EXTERNAL_CLOCK_VALUE ((uint32_t)12288000U) /*!< Value of the Internal oscillator in Hz*/ |
152 | 151 | #endif /* EXTERNAL_CLOCK_VALUE */
|
153 | 152 |
|
154 | 153 | /* Tip: To avoid modifying this file each time you need to use different HSE,
|
|
158 | 157 | /**
|
159 | 158 | * @brief This is the HAL system configuration section
|
160 | 159 | */
|
161 |
| -#define VDD_VALUE 3300U /*!< Value of VDD in mv */ |
162 |
| -#define TICK_INT_PRIORITY 0x0FU /*!< tick interrupt priority */ |
| 160 | +#define VDD_VALUE ((uint32_t)3300U) /*!< Value of VDD in mv */ |
| 161 | +#define TICK_INT_PRIORITY ((uint32_t)0U) /*!< tick interrupt priority */ |
163 | 162 | #define USE_RTOS 0U
|
164 |
| -#define PREFETCH_ENABLE 1U /* To enable prefetch */ |
165 |
| -#define ART_ACCLERATOR_ENABLE 1U /* To enable ART Accelerator */ |
| 163 | +#define PREFETCH_ENABLE 0U |
| 164 | +#define ART_ACCLERATOR_ENABLE 0U /* To enable instruction cache and prefetch */ |
166 | 165 |
|
167 | 166 | /* ########################## Assert Selection ############################## */
|
168 | 167 | /**
|
169 | 168 | * @brief Uncomment the line below to expanse the "assert_param" macro in the
|
170 | 169 | * HAL drivers code
|
171 | 170 | */
|
172 |
| -/* #define USE_FULL_ASSERT 1 */ |
| 171 | +/* #define USE_FULL_ASSERT 1U */ |
173 | 172 |
|
174 | 173 | /* ################## Ethernet peripheral configuration ##################### */
|
175 | 174 |
|
|
186 | 185 | /* Definition of the Ethernet driver buffers size and count */
|
187 | 186 | #define ETH_RX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for receive */
|
188 | 187 | #define ETH_TX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for transmit */
|
189 |
| -#define ETH_RXBUFNB 4U /* 4 Rx buffers of size ETH_RX_BUF_SIZE */ |
190 |
| -#define ETH_TXBUFNB 4U /* 4 Tx buffers of size ETH_TX_BUF_SIZE */ |
| 188 | +#define ETH_RXBUFNB ((uint32_t)4U) /* 4 Rx buffers of size ETH_RX_BUF_SIZE */ |
| 189 | +#define ETH_TXBUFNB ((uint32_t)4U) /* 4 Tx buffers of size ETH_TX_BUF_SIZE */ |
191 | 190 |
|
192 | 191 | /* Section 2: PHY configuration section */
|
193 |
| -/* LAN8742A PHY Address*/ |
194 |
| -#define LAN8742A_PHY_ADDRESS 0x00U |
| 192 | + |
| 193 | +/* LAN8742A_PHY_ADDRESS Address*/ |
| 194 | +#define LAN8742A_PHY_ADDRESS 0 |
195 | 195 | /* PHY Reset delay these values are based on a 1 ms Systick interrupt*/
|
196 |
| -#define PHY_RESET_DELAY 0x00000FFFU |
| 196 | +#define PHY_RESET_DELAY ((uint32_t)0x000000FFU) |
197 | 197 | /* PHY Configuration delay */
|
198 |
| -#define PHY_CONFIG_DELAY 0x00000FFFU |
| 198 | +#define PHY_CONFIG_DELAY ((uint32_t)0x00000FFFU) |
199 | 199 |
|
200 |
| -#define PHY_READ_TO 0x0000FFFFU |
201 |
| -#define PHY_WRITE_TO 0x0000FFFFU |
| 200 | +#define PHY_READ_TO ((uint32_t)0x0000FFFFU) |
| 201 | +#define PHY_WRITE_TO ((uint32_t)0x0000FFFFU) |
202 | 202 |
|
203 | 203 | /* Section 3: Common PHY Registers */
|
204 | 204 |
|
|
221 | 221 | #define PHY_JABBER_DETECTION ((uint16_t)0x0002U) /*!< Jabber condition detected */
|
222 | 222 |
|
223 | 223 | /* Section 4: Extended PHY Registers */
|
| 224 | +#define PHY_SR ((uint16_t)0x10U) /*!< PHY status register Offset */ |
224 | 225 |
|
225 |
| -#define PHY_SR ((uint16_t)0x1FU) /*!< PHY special control/ status register Offset */ |
226 |
| - |
227 |
| -#define PHY_SPEED_STATUS ((uint16_t)0x0004U) /*!< PHY Speed mask */ |
228 |
| -#define PHY_DUPLEX_STATUS ((uint16_t)0x0010U) /*!< PHY Duplex mask */ |
| 226 | +#define PHY_SPEED_STATUS ((uint16_t)0x0002U) /*!< PHY Speed mask */ |
| 227 | +#define PHY_DUPLEX_STATUS ((uint16_t)0x0004U) /*!< PHY Duplex mask */ |
229 | 228 |
|
230 |
| - |
231 |
| -#define PHY_ISFR ((uint16_t)0x01DU) /*!< PHY Interrupt Source Flag register Offset */ |
232 |
| -#define PHY_IMR ((uint16_t)0x001E) /*!< PHY Interrupt Mask register Offset */ |
233 |
| -#define PHY_ISFR_INT4 ((uint16_t)0x0010U) /*!< PHY Link down inturrupt */ |
| 229 | +#define PHY_ISFR ((uint16_t)0x000BU) /*!< PHY Interrupt Source Flag register Offset */ |
| 230 | +#define PHY_ISFR_INT4 ((uint16_t)0x000BU) /*!< PHY Link down inturrupt */ |
234 | 231 |
|
235 | 232 | /* ################## SPI peripheral configuration ########################## */
|
236 | 233 |
|
|
239 | 236 | * Deactivated: CRC code cleaned from driver
|
240 | 237 | */
|
241 | 238 |
|
242 |
| -#define USE_SPI_CRC 1U |
| 239 | +#define USE_SPI_CRC 0U |
243 | 240 |
|
244 | 241 | /* Includes ------------------------------------------------------------------*/
|
245 | 242 | /**
|
|
250 | 247 | #include "stm32f7xx_hal_rcc.h"
|
251 | 248 | #endif /* HAL_RCC_MODULE_ENABLED */
|
252 | 249 |
|
| 250 | +#ifdef HAL_EXTI_MODULE_ENABLED |
| 251 | + #include "stm32f7xx_hal_exti.h" |
| 252 | +#endif /* HAL_EXTI_MODULE_ENABLED */ |
| 253 | + |
253 | 254 | #ifdef HAL_GPIO_MODULE_ENABLED
|
254 | 255 | #include "stm32f7xx_hal_gpio.h"
|
255 | 256 | #endif /* HAL_GPIO_MODULE_ENABLED */
|
|
270 | 271 | #include "stm32f7xx_hal_can.h"
|
271 | 272 | #endif /* HAL_CAN_MODULE_ENABLED */
|
272 | 273 |
|
273 |
| -#ifdef HAL_CAN_LEGACY_MODULE_ENABLED |
274 |
| - #include "stm32f7xx_hal_can_legacy.h" |
275 |
| -#endif /* HAL_CAN_LEGACY_MODULE_ENABLED */ |
276 |
| - |
277 | 274 | #ifdef HAL_CEC_MODULE_ENABLED
|
278 | 275 | #include "stm32f7xx_hal_cec.h"
|
279 | 276 | #endif /* HAL_CEC_MODULE_ENABLED */
|
|
370 | 367 | #include "stm32f7xx_hal_sd.h"
|
371 | 368 | #endif /* HAL_SD_MODULE_ENABLED */
|
372 | 369 |
|
| 370 | +#ifdef HAL_MMC_MODULE_ENABLED |
| 371 | + #include "stm32f7xx_hal_mmc.h" |
| 372 | +#endif /* HAL_MMC_MODULE_ENABLED */ |
| 373 | + |
373 | 374 | #ifdef HAL_SPDIFRX_MODULE_ENABLED
|
374 | 375 | #include "stm32f7xx_hal_spdifrx.h"
|
375 | 376 | #endif /* HAL_SPDIFRX_MODULE_ENABLED */
|
|
430 | 431 | #include "stm32f7xx_hal_smbus.h"
|
431 | 432 | #endif /* HAL_SMBUS_MODULE_ENABLED */
|
432 | 433 |
|
433 |
| -#ifdef HAL_MMC_MODULE_ENABLED |
434 |
| - #include "stm32f7xx_hal_mmc.h" |
435 |
| -#endif /* HAL_MMC_MODULE_ENABLED */ |
436 |
| - |
437 | 434 | /* Exported macro ------------------------------------------------------------*/
|
438 | 435 | #ifdef USE_FULL_ASSERT
|
439 | 436 | /**
|
440 | 437 | * @brief The assert_param macro is used for function's parameters check.
|
441 |
| - * @param expr If expr is false, it calls assert_failed function |
| 438 | + * @param expr: If expr is false, it calls assert_failed function |
442 | 439 | * which reports the name of the source file and the source
|
443 | 440 | * line number of the call that failed.
|
444 | 441 | * If expr is true, it returns no value.
|
445 | 442 | * @retval None
|
446 | 443 | */
|
447 |
| - #define assert_param(expr) ((expr) ? (void)0 : assert_failed((uint8_t *)__FILE__, __LINE__)) |
| 444 | + #define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__)) |
448 | 445 | /* Exported functions ------------------------------------------------------- */
|
449 | 446 | void assert_failed(uint8_t* file, uint32_t line);
|
450 | 447 | #else
|
451 | 448 | #define assert_param(expr) ((void)0U)
|
452 | 449 | #endif /* USE_FULL_ASSERT */
|
453 | 450 |
|
454 |
| - |
455 | 451 | #ifdef __cplusplus
|
456 | 452 | }
|
457 | 453 | #endif
|
|
0 commit comments