1
1
/**
2
2
******************************************************************************
3
3
* @file stm32h7xx_hal_conf_template.h
4
+ * @author MCD Application Team
4
5
* @brief HAL configuration template file.
5
6
* This file should be copied to the application folder and renamed
6
7
* to stm32h7xx_hal_conf.h.
@@ -45,7 +46,9 @@ extern "C" {
45
46
/* #define HAL_DFSDM_MODULE_ENABLED */
46
47
#define HAL_DMA_MODULE_ENABLED
47
48
/* #define HAL_DMA2D_MODULE_ENABLED */
49
+ /* #define HAL_DSI_MODULE_ENABLED */
48
50
#define HAL_ETH_MODULE_ENABLED
51
+ /* #define HAL_EXTI_MODULE_ENABLED */
49
52
/* #define HAL_FDCAN_MODULE_ENABLED */
50
53
#define HAL_FLASH_MODULE_ENABLED
51
54
#define HAL_GPIO_MODULE_ENABLED
@@ -69,6 +72,7 @@ extern "C" {
69
72
/* #define HAL_PCD_MODULE_ENABLED */
70
73
#define HAL_PWR_MODULE_ENABLED
71
74
/* #define HAL_QSPI_MODULE_ENABLED */
75
+ /* #define HAL_RAMECC_MODULE_ENABLED */
72
76
#define HAL_RCC_MODULE_ENABLED
73
77
/* #define HAL_RNG_MODULE_ENABLED */
74
78
#define HAL_RTC_MODULE_ENABLED
@@ -117,15 +121,6 @@ extern "C" {
117
121
#define HSI_VALUE ((uint32_t)64000000) /*!< Value of the Internal oscillator in Hz*/
118
122
#endif /* HSI_VALUE */
119
123
120
- /**
121
- * @brief Internal Low Speed oscillator (LSI) value.
122
- */
123
- #if !defined (LSI_VALUE )
124
- #define LSI_VALUE 32000U /*!< LSI Typical Value in Hz*/
125
- #endif /* LSI_VALUE */ /*!< Value of the Internal Low Speed oscillator in Hz
126
- The real value may vary depending on the variations
127
- in voltage and temperature. */
128
-
129
124
/**
130
125
* @brief External Low Speed oscillator (LSE) value.
131
126
* This value is used by the UART, RTC HAL module to compute the system frequency
@@ -139,6 +134,11 @@ in voltage and temperature. */
139
134
#define LSE_STARTUP_TIMEOUT ((uint32_t)5000) /*!< Time out for LSE start up, in ms */
140
135
#endif /* LSE_STARTUP_TIMEOUT */
141
136
137
+ #if !defined (LSI_VALUE )
138
+ #define LSI_VALUE ((uint32_t)32000) /*!< LSI Typical Value in Hz*/
139
+ #endif /* LSI_VALUE */ /*!< Value of the Internal Low Speed oscillator in Hz
140
+ The real value may vary depending on the variations
141
+ in voltage and temperature.*/
142
142
/**
143
143
* @brief External clock source for I2S peripheral
144
144
* This value is used by the I2S HAL module to compute the I2S clock source
@@ -168,6 +168,7 @@ in voltage and temperature. */
168
168
#define USE_HAL_DCMI_REGISTER_CALLBACKS 0U /* DCMI register callback disabled */
169
169
#define USE_HAL_DFSDM_REGISTER_CALLBACKS 0U /* DFSDM register callback disabled */
170
170
#define USE_HAL_DMA2D_REGISTER_CALLBACKS 0U /* DMA2D register callback disabled */
171
+ #define USE_HAL_DSI_REGISTER_CALLBACKS 0U /* DSI register callback disabled */
171
172
#define USE_HAL_ETH_REGISTER_CALLBACKS 0U /* ETH register callback disabled */
172
173
#define USE_HAL_FDCAN_REGISTER_CALLBACKS 0U /* FDCAN register callback disabled */
173
174
#define USE_HAL_NAND_REGISTER_CALLBACKS 0U /* NAND register callback disabled */
@@ -195,68 +196,18 @@ in voltage and temperature. */
195
196
#define USE_HAL_SWPMI_REGISTER_CALLBACKS 0U /* SWPMI register callback disabled */
196
197
#define USE_HAL_TIM_REGISTER_CALLBACKS 0U /* TIM register callback disabled */
197
198
#define USE_HAL_WWDG_REGISTER_CALLBACKS 0U /* WWDG register callback disabled */
199
+
198
200
/* ########################### Ethernet Configuration ######################### */
199
201
#define ETH_TX_DESC_CNT 4 /* number of Ethernet Tx DMA descriptors */
200
202
#define ETH_RX_DESC_CNT 4 /* number of Ethernet Rx DMA descriptors */
201
203
202
- /* Section 1 : Ethernet peripheral configuration */
203
-
204
- /* MAC ADDRESS: MAC_ADDR0:MAC_ADDR1:MAC_ADDR2:MAC_ADDR3:MAC_ADDR4:MAC_ADDR5 */
205
204
#define ETH_MAC_ADDR0 ((uint8_t)0x02)
206
205
#define ETH_MAC_ADDR1 ((uint8_t)0x00)
207
206
#define ETH_MAC_ADDR2 ((uint8_t)0x00)
208
207
#define ETH_MAC_ADDR3 ((uint8_t)0x00)
209
208
#define ETH_MAC_ADDR4 ((uint8_t)0x00)
210
209
#define ETH_MAC_ADDR5 ((uint8_t)0x00)
211
210
212
- /* Definition of the Ethernet driver buffers size and count */
213
- #define ETH_RX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for receive */
214
- #define ETH_TX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for transmit */
215
- #define ETH_RXBUFNB (5U) /* 5 Rx buffers of size ETH_RX_BUF_SIZE */
216
- #define ETH_TXBUFNB (5U) /* 5 Tx buffers of size ETH_TX_BUF_SIZE */
217
-
218
- /* Section 2: PHY configuration section */
219
- /* LAN8742A PHY Address*/
220
- #define LAN8742A_PHY_ADDRESS 0x00U
221
- /* PHY Reset delay these values are based on a 1 ms Systick interrupt*/
222
- #define PHY_RESET_DELAY 0x000000FFU
223
- /* PHY Configuration delay */
224
- #define PHY_CONFIG_DELAY 0x00000FFFU
225
-
226
- #define PHY_READ_TO 0x0000FFFFU
227
- #define PHY_WRITE_TO 0x0000FFFFU
228
-
229
- /* Section 3: Common PHY Registers */
230
-
231
- #define PHY_BCR ((uint16_t)0x0000) /*!< Transceiver Basic Control Register */
232
- #define PHY_BSR ((uint16_t)0x0001) /*!< Transceiver Basic Status Register */
233
-
234
- #define PHY_RESET ((uint16_t)0x8000) /*!< PHY Reset */
235
- #define PHY_LOOPBACK ((uint16_t)0x4000) /*!< Select loop-back mode */
236
- #define PHY_FULLDUPLEX_100M ((uint16_t)0x2100) /*!< Set the full-duplex mode at 100 Mb/s */
237
- #define PHY_HALFDUPLEX_100M ((uint16_t)0x2000) /*!< Set the half-duplex mode at 100 Mb/s */
238
- #define PHY_FULLDUPLEX_10M ((uint16_t)0x0100) /*!< Set the full-duplex mode at 10 Mb/s */
239
- #define PHY_HALFDUPLEX_10M ((uint16_t)0x0000) /*!< Set the half-duplex mode at 10 Mb/s */
240
- #define PHY_AUTONEGOTIATION ((uint16_t)0x1000) /*!< Enable auto-negotiation function */
241
- #define PHY_RESTART_AUTONEGOTIATION ((uint16_t)0x0200) /*!< Restart auto-negotiation function */
242
- #define PHY_POWERDOWN ((uint16_t)0x0800) /*!< Select the power down mode */
243
- #define PHY_ISOLATE ((uint16_t)0x0400) /*!< Isolate PHY from MII */
244
-
245
- #define PHY_AUTONEGO_COMPLETE ((uint16_t)0x0020) /*!< Auto-Negotiation process completed */
246
- #define PHY_LINKED_STATUS ((uint16_t)0x0004) /*!< Valid link established */
247
- #define PHY_JABBER_DETECTION ((uint16_t)0x0002) /*!< Jabber condition detected */
248
-
249
- /* Section 4: Extended PHY Registers */
250
-
251
- #define PHY_SR ((uint16_t)0x1F) /*!< PHY special control/ status register Offset */
252
-
253
- #define PHY_SPEED_STATUS ((uint16_t)0x0004) /*!< PHY Speed mask */
254
- #define PHY_DUPLEX_STATUS ((uint16_t)0x0010) /*!< PHY Duplex mask */
255
-
256
-
257
- #define PHY_ISFR ((uint16_t)0x1D) /*!< PHY Interrupt Source Flag register Offset */
258
- #define PHY_IMR ((uint16_t)0x1E) /*!< PHY Interrupt Mask register Offset */
259
- #define PHY_ISFR_INT4 ((uint16_t)0x0010) /*!< PHY Link down inturrupt */
260
211
261
212
/* ########################## Assert Selection ############################## */
262
213
/**
@@ -265,16 +216,6 @@ in voltage and temperature. */
265
216
*/
266
217
/* #define USE_FULL_ASSERT 1 */
267
218
268
- /* ################## SPI peripheral configuration ########################## */
269
- /**
270
- * @brief Used to activate CRC feature inside HAL SPI Driver
271
- * Activated (1U): CRC code is compiled within HAL SPI driver
272
- * Deactivated (0U): CRC code excluded from HAL SPI driver
273
- */
274
-
275
- #define USE_SPI_CRC 0U
276
-
277
-
278
219
/* Includes ------------------------------------------------------------------*/
279
220
/**
280
221
* @brief Include module's header file
@@ -308,6 +249,10 @@ in voltage and temperature. */
308
249
#include "stm32h7xx_hal_dma2d.h"
309
250
#endif /* HAL_DMA2D_MODULE_ENABLED */
310
251
252
+ #ifdef HAL_DSI_MODULE_ENABLED
253
+ #include "stm32h7xx_hal_dsi.h"
254
+ #endif /* HAL_DSI_MODULE_ENABLED */
255
+
311
256
#ifdef HAL_DFSDM_MODULE_ENABLED
312
257
#include "stm32h7xx_hal_dfsdm.h"
313
258
#endif /* HAL_DFSDM_MODULE_ENABLED */
@@ -502,11 +447,11 @@ in voltage and temperature. */
502
447
* If expr is true, it returns no value.
503
448
* @retval None
504
449
*/
505
- #define assert_param (expr ) ((expr) ? (void)0 : assert_failed((uint8_t *)__FILE__, __LINE__))
450
+ #define assert_param (expr ) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__))
506
451
/* Exported functions ------------------------------------------------------- */
507
452
void assert_failed (uint8_t * file , uint32_t line );
508
453
#else
509
- #define assert_param (expr ) ((void)0 )
454
+ #define assert_param (expr ) ((void)0U )
510
455
#endif /* USE_FULL_ASSERT */
511
456
512
457
#ifdef __cplusplus
0 commit comments