|
2 | 2 | ******************************************************************************
|
3 | 3 | * @file stm32f7xx_hal_conf_template.h
|
4 | 4 | * @author MCD Application Team
|
5 |
| - * @version V1.0.4 |
6 |
| - * @date 09-December-2015 |
| 5 | + * @version V1.1.0 |
| 6 | + * @date 22-April-2016 |
7 | 7 | * @brief HAL configuration template file.
|
8 | 8 | * This file should be copied to the application folder and renamed
|
9 | 9 | * to stm32f7xx_hal_conf.h.
|
|
93 | 93 | #define HAL_CORTEX_MODULE_ENABLED
|
94 | 94 | #define HAL_PCD_MODULE_ENABLED
|
95 | 95 | #define HAL_HCD_MODULE_ENABLED
|
| 96 | +#define HAL_DFSDM_MODULE_ENABLED |
| 97 | +#define HAL_DSI_MODULE_ENABLED |
| 98 | +#define HAL_JPEG_MODULE_ENABLED |
| 99 | +#define HAL_MDIOS_MODULE_ENABLED |
96 | 100 |
|
97 | 101 |
|
98 | 102 | /* ########################## HSE/HSI Values adaptation ##################### */
|
|
102 | 106 | * (when HSE is used as system clock source, directly or through the PLL).
|
103 | 107 | */
|
104 | 108 | #if !defined (HSE_VALUE)
|
105 |
| - #define HSE_VALUE ((uint32_t)25000000) /*!< Value of the External oscillator in Hz */ |
| 109 | + #define HSE_VALUE 25000000U /*!< Value of the External oscillator in Hz */ |
106 | 110 | #endif /* HSE_VALUE */
|
107 | 111 |
|
108 | 112 | #if !defined (HSE_STARTUP_TIMEOUT)
|
109 |
| - #define HSE_STARTUP_TIMEOUT ((uint32_t)200) /*!< Time out for HSE start up, in ms */ |
| 113 | + #define HSE_STARTUP_TIMEOUT 200U /*!< Time out for HSE start up, in ms */ |
110 | 114 | #endif /* HSE_STARTUP_TIMEOUT */
|
111 | 115 |
|
112 | 116 | /**
|
|
115 | 119 | * (when HSI is used as system clock source, directly or through the PLL).
|
116 | 120 | */
|
117 | 121 | #if !defined (HSI_VALUE)
|
118 |
| - #define HSI_VALUE ((uint32_t)16000000) /*!< Value of the Internal oscillator in Hz*/ |
| 122 | + #define HSI_VALUE 16000000U /*!< Value of the Internal oscillator in Hz*/ |
119 | 123 | #endif /* HSI_VALUE */
|
120 | 124 |
|
121 | 125 | /**
|
122 | 126 | * @brief Internal Low Speed oscillator (LSI) value.
|
123 | 127 | */
|
124 | 128 | #if !defined (LSI_VALUE)
|
125 |
| - #define LSI_VALUE ((uint32_t)32000) /*!< LSI Typical Value in Hz*/ |
| 129 | + #define LSI_VALUE 32000U /*!< LSI Typical Value in Hz*/ |
126 | 130 | #endif /* LSI_VALUE */ /*!< Value of the Internal Low Speed oscillator in Hz
|
127 | 131 | The real value may vary depending on the variations
|
128 | 132 | in voltage and temperature. */
|
129 | 133 | /**
|
130 | 134 | * @brief External Low Speed oscillator (LSE) value.
|
131 | 135 | */
|
132 | 136 | #if !defined (LSE_VALUE)
|
133 |
| - #define LSE_VALUE ((uint32_t)32768) /*!< Value of the External Low Speed oscillator in Hz */ |
| 137 | + #define LSE_VALUE 32768U /*!< Value of the External Low Speed oscillator in Hz */ |
134 | 138 | #endif /* LSE_VALUE */
|
135 | 139 |
|
| 140 | +#if !defined (LSE_STARTUP_TIMEOUT) |
| 141 | + #define LSE_STARTUP_TIMEOUT 5000U /*!< Time out for LSE start up, in ms */ |
| 142 | +#endif /* LSE_STARTUP_TIMEOUT */ |
| 143 | + |
136 | 144 | /**
|
137 | 145 | * @brief External clock source for I2S peripheral
|
138 | 146 | * This value is used by the I2S HAL module to compute the I2S clock source
|
139 | 147 | * frequency, this source is inserted directly through I2S_CKIN pad.
|
140 | 148 | */
|
141 | 149 | #if !defined (EXTERNAL_CLOCK_VALUE)
|
142 |
| - #define EXTERNAL_CLOCK_VALUE ((uint32_t)12288000) /*!< Value of the Internal oscillator in Hz*/ |
| 150 | + #define EXTERNAL_CLOCK_VALUE 12288000U /*!< Value of the Internal oscillator in Hz*/ |
143 | 151 | #endif /* EXTERNAL_CLOCK_VALUE */
|
144 | 152 |
|
145 | 153 | /* Tip: To avoid modifying this file each time you need to use different HSE,
|
|
149 | 157 | /**
|
150 | 158 | * @brief This is the HAL system configuration section
|
151 | 159 | */
|
152 |
| -#define VDD_VALUE ((uint32_t)3300) /*!< Value of VDD in mv */ |
153 |
| -#define TICK_INT_PRIORITY ((uint32_t)0x0F) /*!< tick interrupt priority */ |
154 |
| -#define USE_RTOS 0 |
155 |
| -#define PREFETCH_ENABLE 1 |
156 |
| -#define ART_ACCLERATOR_ENABLE 1 /* To enable instruction cache and prefetch */ |
| 160 | +#define VDD_VALUE 3300U /*!< Value of VDD in mv */ |
| 161 | +#define TICK_INT_PRIORITY 0x0FU /*!< tick interrupt priority */ |
| 162 | +#define USE_RTOS 0U |
| 163 | +#define PREFETCH_ENABLE 1U |
| 164 | +#define ART_ACCLERATOR_ENABLE 1U /* To enable instruction cache and prefetch */ |
157 | 165 |
|
158 | 166 | /* ########################## Assert Selection ############################## */
|
159 | 167 | /**
|
|
167 | 175 | /* Section 1 : Ethernet peripheral configuration */
|
168 | 176 |
|
169 | 177 | /* MAC ADDRESS: MAC_ADDR0:MAC_ADDR1:MAC_ADDR2:MAC_ADDR3:MAC_ADDR4:MAC_ADDR5 */
|
170 |
| -#define MAC_ADDR0 2 |
171 |
| -#define MAC_ADDR1 0 |
172 |
| -#define MAC_ADDR2 0 |
173 |
| -#define MAC_ADDR3 0 |
174 |
| -#define MAC_ADDR4 0 |
175 |
| -#define MAC_ADDR5 0 |
| 178 | +#define MAC_ADDR0 2U |
| 179 | +#define MAC_ADDR1 0U |
| 180 | +#define MAC_ADDR2 0U |
| 181 | +#define MAC_ADDR3 0U |
| 182 | +#define MAC_ADDR4 0U |
| 183 | +#define MAC_ADDR5 0U |
176 | 184 |
|
177 | 185 | /* Definition of the Ethernet driver buffers size and count */
|
178 | 186 | #define ETH_RX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for receive */
|
179 | 187 | #define ETH_TX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for transmit */
|
180 |
| -#define ETH_RXBUFNB ((uint32_t)4) /* 4 Rx buffers of size ETH_RX_BUF_SIZE */ |
181 |
| -#define ETH_TXBUFNB ((uint32_t)4) /* 4 Tx buffers of size ETH_TX_BUF_SIZE */ |
| 188 | +#define ETH_RXBUFNB 4U /* 4 Rx buffers of size ETH_RX_BUF_SIZE */ |
| 189 | +#define ETH_TXBUFNB 4U /* 4 Tx buffers of size ETH_TX_BUF_SIZE */ |
182 | 190 |
|
183 | 191 | /* Section 2: PHY configuration section */
|
184 | 192 |
|
185 | 193 | /* DP83848 PHY Address*/
|
186 |
| -#define DP83848_PHY_ADDRESS 0x01 |
| 194 | +#define DP83848_PHY_ADDRESS 0x01U |
187 | 195 | /* PHY Reset delay these values are based on a 1 ms Systick interrupt*/
|
188 |
| -#define PHY_RESET_DELAY ((uint32_t)0x000000FF) |
| 196 | +#define PHY_RESET_DELAY 0x000000FFU |
189 | 197 | /* PHY Configuration delay */
|
190 |
| -#define PHY_CONFIG_DELAY ((uint32_t)0x00000FFF) |
| 198 | +#define PHY_CONFIG_DELAY 0x00000FFFU |
191 | 199 |
|
192 |
| -#define PHY_READ_TO ((uint32_t)0x0000FFFF) |
193 |
| -#define PHY_WRITE_TO ((uint32_t)0x0000FFFF) |
| 200 | +#define PHY_READ_TO 0x0000FFFFU |
| 201 | +#define PHY_WRITE_TO 0x0000FFFFU |
194 | 202 |
|
195 | 203 | /* Section 3: Common PHY Registers */
|
196 | 204 |
|
197 |
| -#define PHY_BCR ((uint16_t)0x00) /*!< Transceiver Basic Control Register */ |
198 |
| -#define PHY_BSR ((uint16_t)0x01) /*!< Transceiver Basic Status Register */ |
| 205 | +#define PHY_BCR ((uint16_t)0x00U) /*!< Transceiver Basic Control Register */ |
| 206 | +#define PHY_BSR ((uint16_t)0x01U) /*!< Transceiver Basic Status Register */ |
199 | 207 |
|
200 |
| -#define PHY_RESET ((uint16_t)0x8000) /*!< PHY Reset */ |
201 |
| -#define PHY_LOOPBACK ((uint16_t)0x4000) /*!< Select loop-back mode */ |
202 |
| -#define PHY_FULLDUPLEX_100M ((uint16_t)0x2100) /*!< Set the full-duplex mode at 100 Mb/s */ |
203 |
| -#define PHY_HALFDUPLEX_100M ((uint16_t)0x2000) /*!< Set the half-duplex mode at 100 Mb/s */ |
204 |
| -#define PHY_FULLDUPLEX_10M ((uint16_t)0x0100) /*!< Set the full-duplex mode at 10 Mb/s */ |
205 |
| -#define PHY_HALFDUPLEX_10M ((uint16_t)0x0000) /*!< Set the half-duplex mode at 10 Mb/s */ |
206 |
| -#define PHY_AUTONEGOTIATION ((uint16_t)0x1000) /*!< Enable auto-negotiation function */ |
207 |
| -#define PHY_RESTART_AUTONEGOTIATION ((uint16_t)0x0200) /*!< Restart auto-negotiation function */ |
208 |
| -#define PHY_POWERDOWN ((uint16_t)0x0800) /*!< Select the power down mode */ |
209 |
| -#define PHY_ISOLATE ((uint16_t)0x0400) /*!< Isolate PHY from MII */ |
210 |
| - |
211 |
| -#define PHY_AUTONEGO_COMPLETE ((uint16_t)0x0020) /*!< Auto-Negotiation process completed */ |
212 |
| -#define PHY_LINKED_STATUS ((uint16_t)0x0004) /*!< Valid link established */ |
213 |
| -#define PHY_JABBER_DETECTION ((uint16_t)0x0002) /*!< Jabber condition detected */ |
| 208 | +#define PHY_RESET ((uint16_t)0x8000U) /*!< PHY Reset */ |
| 209 | +#define PHY_LOOPBACK ((uint16_t)0x4000U) /*!< Select loop-back mode */ |
| 210 | +#define PHY_FULLDUPLEX_100M ((uint16_t)0x2100U) /*!< Set the full-duplex mode at 100 Mb/s */ |
| 211 | +#define PHY_HALFDUPLEX_100M ((uint16_t)0x2000U) /*!< Set the half-duplex mode at 100 Mb/s */ |
| 212 | +#define PHY_FULLDUPLEX_10M ((uint16_t)0x0100U) /*!< Set the full-duplex mode at 10 Mb/s */ |
| 213 | +#define PHY_HALFDUPLEX_10M ((uint16_t)0x0000U) /*!< Set the half-duplex mode at 10 Mb/s */ |
| 214 | +#define PHY_AUTONEGOTIATION ((uint16_t)0x1000U) /*!< Enable auto-negotiation function */ |
| 215 | +#define PHY_RESTART_AUTONEGOTIATION ((uint16_t)0x0200U) /*!< Restart auto-negotiation function */ |
| 216 | +#define PHY_POWERDOWN ((uint16_t)0x0800U) /*!< Select the power down mode */ |
| 217 | +#define PHY_ISOLATE ((uint16_t)0x0400U) /*!< Isolate PHY from MII */ |
| 218 | + |
| 219 | +#define PHY_AUTONEGO_COMPLETE ((uint16_t)0x0020U) /*!< Auto-Negotiation process completed */ |
| 220 | +#define PHY_LINKED_STATUS ((uint16_t)0x0004U) /*!< Valid link established */ |
| 221 | +#define PHY_JABBER_DETECTION ((uint16_t)0x0002U) /*!< Jabber condition detected */ |
214 | 222 |
|
215 | 223 | /* Section 4: Extended PHY Registers */
|
216 | 224 |
|
217 |
| -#define PHY_SR ((uint16_t)0x10) /*!< PHY status register Offset */ |
218 |
| -#define PHY_MICR ((uint16_t)0x11) /*!< MII Interrupt Control Register */ |
219 |
| -#define PHY_MISR ((uint16_t)0x12) /*!< MII Interrupt Status and Misc. Control Register */ |
| 225 | +#define PHY_SR ((uint16_t)0x10U) /*!< PHY status register Offset */ |
| 226 | +#define PHY_MICR ((uint16_t)0x11U) /*!< MII Interrupt Control Register */ |
| 227 | +#define PHY_MISR ((uint16_t)0x12U) /*!< MII Interrupt Status and Misc. Control Register */ |
220 | 228 |
|
221 |
| -#define PHY_LINK_STATUS ((uint16_t)0x0001) /*!< PHY Link mask */ |
222 |
| -#define PHY_SPEED_STATUS ((uint16_t)0x0002) /*!< PHY Speed mask */ |
223 |
| -#define PHY_DUPLEX_STATUS ((uint16_t)0x0004) /*!< PHY Duplex mask */ |
| 229 | +#define PHY_LINK_STATUS ((uint16_t)0x0001U) /*!< PHY Link mask */ |
| 230 | +#define PHY_SPEED_STATUS ((uint16_t)0x0002U) /*!< PHY Speed mask */ |
| 231 | +#define PHY_DUPLEX_STATUS ((uint16_t)0x0004U) /*!< PHY Duplex mask */ |
| 232 | + |
| 233 | +#define PHY_MICR_INT_EN ((uint16_t)0x0002U) /*!< PHY Enable interrupts */ |
| 234 | +#define PHY_MICR_INT_OE ((uint16_t)0x0001U) /*!< PHY Enable output interrupt events */ |
| 235 | + |
| 236 | +#define PHY_MISR_LINK_INT_EN ((uint16_t)0x0020U) /*!< Enable Interrupt on change of link status */ |
| 237 | +#define PHY_LINK_INTERRUPT ((uint16_t)0x2000U) /*!< PHY link status interrupt mask */ |
| 238 | + |
| 239 | +/* ################## SPI peripheral configuration ########################## */ |
224 | 240 |
|
225 |
| -#define PHY_MICR_INT_EN ((uint16_t)0x0002) /*!< PHY Enable interrupts */ |
226 |
| -#define PHY_MICR_INT_OE ((uint16_t)0x0001) /*!< PHY Enable output interrupt events */ |
| 241 | +/* CRC FEATURE: Use to activate CRC feature inside HAL SPI Driver |
| 242 | +* Activated: CRC code is present inside driver |
| 243 | +* Deactivated: CRC code cleaned from driver |
| 244 | +*/ |
227 | 245 |
|
228 |
| -#define PHY_MISR_LINK_INT_EN ((uint16_t)0x0020) /*!< Enable Interrupt on change of link status */ |
229 |
| -#define PHY_LINK_INTERRUPT ((uint16_t)0x2000) /*!< PHY link status interrupt mask */ |
| 246 | +#define USE_SPI_CRC 1U |
230 | 247 |
|
231 | 248 | /* Includes ------------------------------------------------------------------*/
|
232 | 249 | /**
|
|
392 | 409 | #ifdef HAL_HCD_MODULE_ENABLED
|
393 | 410 | #include "stm32f7xx_hal_hcd.h"
|
394 | 411 | #endif /* HAL_HCD_MODULE_ENABLED */
|
| 412 | + |
| 413 | +#ifdef HAL_DFSDM_MODULE_ENABLED |
| 414 | + #include "stm32f7xx_hal_dfsdm.h" |
| 415 | +#endif /* HAL_DFSDM_MODULE_ENABLED */ |
| 416 | + |
| 417 | +#ifdef HAL_DSI_MODULE_ENABLED |
| 418 | + #include "stm32f7xx_hal_dsi.h" |
| 419 | +#endif /* HAL_DSI_MODULE_ENABLED */ |
| 420 | + |
| 421 | +#ifdef HAL_JPEG_MODULE_ENABLED |
| 422 | + #include "stm32f7xx_hal_jpeg.h" |
| 423 | +#endif /* HAL_JPEG_MODULE_ENABLED */ |
| 424 | + |
| 425 | +#ifdef HAL_MDIOS_MODULE_ENABLED |
| 426 | + #include "stm32f7xx_hal_mdios.h" |
| 427 | +#endif /* HAL_MDIOS_MODULE_ENABLED */ |
395 | 428 |
|
396 | 429 | /* Exported macro ------------------------------------------------------------*/
|
397 | 430 | #ifdef USE_FULL_ASSERT
|
|
0 commit comments