Skip to content

Commit 00c7757

Browse files
committed
[NUCLEO-F767ZI]Copy stm32f7xx_hal_conf.h from Cube FW F7 1.12.0
1 parent 5681c0c commit 00c7757

File tree

1 file changed

+86
-90
lines changed

1 file changed

+86
-90
lines changed

variants/NUCLEO_F767ZI/stm32f7xx_hal_conf.h

Lines changed: 86 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
/**
22
******************************************************************************
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.
85
******************************************************************************
96
* @attention
107
*
11-
* <h2><center>&copy; COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
8+
* <h2><center>&copy; COPYRIGHT(c) 2018 STMicroelectronics</center></h2>
129
*
1310
* Redistribution and use in source and binary forms, with or without modification,
1411
* are permitted provided that the following conditions are met:
@@ -51,54 +48,56 @@
5148
* @brief This is the list of modules to be used in the HAL driver
5249
*/
5350
#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 */
6461
#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 */
7194
#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
7996
#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
92100
#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-
102101

103102
/* ########################## HSE/HSI Values adaptation ##################### */
104103
/**
@@ -107,11 +106,11 @@
107106
* (when HSE is used as system clock source, directly or through the PLL).
108107
*/
109108
#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 */
111110
#endif /* HSE_VALUE */
112111

113112
#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 */
115114
#endif /* HSE_STARTUP_TIMEOUT */
116115

117116
/**
@@ -120,26 +119,26 @@
120119
* (when HSI is used as system clock source, directly or through the PLL).
121120
*/
122121
#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*/
124123
#endif /* HSI_VALUE */
125124

126125
/**
127126
* @brief Internal Low Speed oscillator (LSI) value.
128127
*/
129128
#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*/
131130
#endif /* LSI_VALUE */ /*!< Value of the Internal Low Speed oscillator in Hz
132131
The real value may vary depending on the variations
133132
in voltage and temperature. */
134133
/**
135134
* @brief External Low Speed oscillator (LSE) value.
136135
*/
137136
#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 */
139138
#endif /* LSE_VALUE */
140139

141140
#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 */
143142
#endif /* LSE_STARTUP_TIMEOUT */
144143

145144
/**
@@ -148,7 +147,7 @@
148147
* frequency, this source is inserted directly through I2S_CKIN pad.
149148
*/
150149
#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*/
152151
#endif /* EXTERNAL_CLOCK_VALUE */
153152

154153
/* Tip: To avoid modifying this file each time you need to use different HSE,
@@ -158,18 +157,18 @@
158157
/**
159158
* @brief This is the HAL system configuration section
160159
*/
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 */
163162
#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 */
166165

167166
/* ########################## Assert Selection ############################## */
168167
/**
169168
* @brief Uncomment the line below to expanse the "assert_param" macro in the
170169
* HAL drivers code
171170
*/
172-
/* #define USE_FULL_ASSERT 1 */
171+
/* #define USE_FULL_ASSERT 1U */
173172

174173
/* ################## Ethernet peripheral configuration ##################### */
175174

@@ -186,19 +185,20 @@
186185
/* Definition of the Ethernet driver buffers size and count */
187186
#define ETH_RX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for receive */
188187
#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 */
191190

192191
/* 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
195195
/* 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)
197197
/* PHY Configuration delay */
198-
#define PHY_CONFIG_DELAY 0x00000FFFU
198+
#define PHY_CONFIG_DELAY ((uint32_t)0x00000FFFU)
199199

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)
202202

203203
/* Section 3: Common PHY Registers */
204204

@@ -221,16 +221,13 @@
221221
#define PHY_JABBER_DETECTION ((uint16_t)0x0002U) /*!< Jabber condition detected */
222222

223223
/* Section 4: Extended PHY Registers */
224+
#define PHY_SR ((uint16_t)0x10U) /*!< PHY status register Offset */
224225

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 */
229228

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 */
234231

235232
/* ################## SPI peripheral configuration ########################## */
236233

@@ -239,7 +236,7 @@
239236
* Deactivated: CRC code cleaned from driver
240237
*/
241238

242-
#define USE_SPI_CRC 1U
239+
#define USE_SPI_CRC 0U
243240

244241
/* Includes ------------------------------------------------------------------*/
245242
/**
@@ -250,6 +247,10 @@
250247
#include "stm32f7xx_hal_rcc.h"
251248
#endif /* HAL_RCC_MODULE_ENABLED */
252249

250+
#ifdef HAL_EXTI_MODULE_ENABLED
251+
#include "stm32f7xx_hal_exti.h"
252+
#endif /* HAL_EXTI_MODULE_ENABLED */
253+
253254
#ifdef HAL_GPIO_MODULE_ENABLED
254255
#include "stm32f7xx_hal_gpio.h"
255256
#endif /* HAL_GPIO_MODULE_ENABLED */
@@ -270,10 +271,6 @@
270271
#include "stm32f7xx_hal_can.h"
271272
#endif /* HAL_CAN_MODULE_ENABLED */
272273

273-
#ifdef HAL_CAN_LEGACY_MODULE_ENABLED
274-
#include "stm32f7xx_hal_can_legacy.h"
275-
#endif /* HAL_CAN_LEGACY_MODULE_ENABLED */
276-
277274
#ifdef HAL_CEC_MODULE_ENABLED
278275
#include "stm32f7xx_hal_cec.h"
279276
#endif /* HAL_CEC_MODULE_ENABLED */
@@ -370,6 +367,10 @@
370367
#include "stm32f7xx_hal_sd.h"
371368
#endif /* HAL_SD_MODULE_ENABLED */
372369

370+
#ifdef HAL_MMC_MODULE_ENABLED
371+
#include "stm32f7xx_hal_mmc.h"
372+
#endif /* HAL_MMC_MODULE_ENABLED */
373+
373374
#ifdef HAL_SPDIFRX_MODULE_ENABLED
374375
#include "stm32f7xx_hal_spdifrx.h"
375376
#endif /* HAL_SPDIFRX_MODULE_ENABLED */
@@ -430,28 +431,23 @@
430431
#include "stm32f7xx_hal_smbus.h"
431432
#endif /* HAL_SMBUS_MODULE_ENABLED */
432433

433-
#ifdef HAL_MMC_MODULE_ENABLED
434-
#include "stm32f7xx_hal_mmc.h"
435-
#endif /* HAL_MMC_MODULE_ENABLED */
436-
437434
/* Exported macro ------------------------------------------------------------*/
438435
#ifdef USE_FULL_ASSERT
439436
/**
440437
* @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
442439
* which reports the name of the source file and the source
443440
* line number of the call that failed.
444441
* If expr is true, it returns no value.
445442
* @retval None
446443
*/
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__))
448445
/* Exported functions ------------------------------------------------------- */
449446
void assert_failed(uint8_t* file, uint32_t line);
450447
#else
451448
#define assert_param(expr) ((void)0U)
452449
#endif /* USE_FULL_ASSERT */
453450

454-
455451
#ifdef __cplusplus
456452
}
457453
#endif

0 commit comments

Comments
 (0)