2 ******************************************************************************
\r
3 * @file stm32f7xx_hal_conf_template.h
\r
4 * @author MCD Application Team
\r
6 * @date 24-March-2015
\r
7 * @brief HAL configuration template file.
\r
8 * This file should be copied to the application folder and renamed
\r
9 * to stm32f7xx_hal_conf.h.
\r
10 ******************************************************************************
\r
13 * <h2><center>© COPYRIGHT(c) 2015 STMicroelectronics</center></h2>
\r
15 * Redistribution and use in source and binary forms, with or without modification,
\r
16 * are permitted provided that the following conditions are met:
\r
17 * 1. Redistributions of source code must retain the above copyright notice,
\r
18 * this list of conditions and the following disclaimer.
\r
19 * 2. Redistributions in binary form must reproduce the above copyright notice,
\r
20 * this list of conditions and the following disclaimer in the documentation
\r
21 * and/or other materials provided with the distribution.
\r
22 * 3. Neither the name of STMicroelectronics nor the names of its contributors
\r
23 * may be used to endorse or promote products derived from this software
\r
24 * without specific prior written permission.
\r
26 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
\r
27 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
\r
28 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
\r
29 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
\r
30 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
\r
31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
\r
32 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
\r
33 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
\r
34 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
\r
35 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\r
37 ******************************************************************************
\r
40 /* Define to prevent recursive inclusion -------------------------------------*/
\r
41 #ifndef __STM32F7xx_HAL_CONF_H
\r
42 #define __STM32F7xx_HAL_CONF_H
\r
48 /* Exported types ------------------------------------------------------------*/
\r
49 /* Exported constants --------------------------------------------------------*/
\r
51 /* ########################## Module Selection ############################## */
\r
53 * @brief This is the list of modules to be used in the HAL driver
\r
55 #define HAL_MODULE_ENABLED
\r
56 #define HAL_ADC_MODULE_ENABLED
\r
57 #define HAL_CAN_MODULE_ENABLED
\r
58 #define HAL_CEC_MODULE_ENABLED
\r
59 #define HAL_CRC_MODULE_ENABLED
\r
60 #define HAL_CRYP_MODULE_ENABLED
\r
61 #define HAL_DAC_MODULE_ENABLED
\r
62 #define HAL_DCMI_MODULE_ENABLED
\r
63 #define HAL_DMA_MODULE_ENABLED
\r
64 #define HAL_DMA2D_MODULE_ENABLED
\r
65 #define HAL_ETH_MODULE_ENABLED
\r
66 #define HAL_FLASH_MODULE_ENABLED
\r
67 #define HAL_NAND_MODULE_ENABLED
\r
68 #define HAL_NOR_MODULE_ENABLED
\r
69 #define HAL_SRAM_MODULE_ENABLED
\r
70 #define HAL_SDRAM_MODULE_ENABLED
\r
71 #define HAL_HASH_MODULE_ENABLED
\r
72 #define HAL_GPIO_MODULE_ENABLED
\r
73 #define HAL_I2C_MODULE_ENABLED
\r
74 #define HAL_I2S_MODULE_ENABLED
\r
75 #define HAL_IWDG_MODULE_ENABLED
\r
76 #define HAL_LPTIM_MODULE_ENABLED
\r
77 #define HAL_LTDC_MODULE_ENABLED
\r
78 #define HAL_PWR_MODULE_ENABLED
\r
79 #define HAL_QSPI_MODULE_ENABLED
\r
80 #define HAL_RCC_MODULE_ENABLED
\r
81 #define HAL_RNG_MODULE_ENABLED
\r
82 #define HAL_RTC_MODULE_ENABLED
\r
83 #define HAL_SAI_MODULE_ENABLED
\r
84 #define HAL_SD_MODULE_ENABLED
\r
85 #define HAL_SPDIFRX_MODULE_ENABLED
\r
86 #define HAL_SPI_MODULE_ENABLED
\r
87 #define HAL_TIM_MODULE_ENABLED
\r
88 #define HAL_UART_MODULE_ENABLED
\r
89 #define HAL_USART_MODULE_ENABLED
\r
90 #define HAL_IRDA_MODULE_ENABLED
\r
91 #define HAL_SMARTCARD_MODULE_ENABLED
\r
92 #define HAL_WWDG_MODULE_ENABLED
\r
93 #define HAL_CORTEX_MODULE_ENABLED
\r
94 #define HAL_PCD_MODULE_ENABLED
\r
95 #define HAL_HCD_MODULE_ENABLED
\r
98 /* ########################## HSE/HSI Values adaptation ##################### */
\r
100 * @brief Adjust the value of External High Speed oscillator (HSE) used in your application.
\r
101 * This value is used by the RCC HAL module to compute the system frequency
\r
102 * (when HSE is used as system clock source, directly or through the PLL).
\r
104 #if !defined (HSE_VALUE)
\r
105 #define HSE_VALUE ((uint32_t)25000000) /*!< Value of the External oscillator in Hz */
\r
106 #endif /* HSE_VALUE */
\r
108 #if !defined (HSE_STARTUP_TIMEOUT)
\r
109 #define HSE_STARTUP_TIMEOUT ((uint32_t)5000) /*!< Time out for HSE start up, in ms */
\r
110 #endif /* HSE_STARTUP_TIMEOUT */
\r
113 * @brief Internal High Speed oscillator (HSI) value.
\r
114 * This value is used by the RCC HAL module to compute the system frequency
\r
115 * (when HSI is used as system clock source, directly or through the PLL).
\r
117 #if !defined (HSI_VALUE)
\r
118 #define HSI_VALUE ((uint32_t)16000000) /*!< Value of the Internal oscillator in Hz*/
\r
119 #endif /* HSI_VALUE */
\r
122 * @brief Internal Low Speed oscillator (LSI) value.
\r
124 #if !defined (LSI_VALUE)
\r
125 #define LSI_VALUE ((uint32_t)32000) /*!< LSI Typical Value in Hz*/
\r
126 #endif /* LSI_VALUE */ /*!< Value of the Internal Low Speed oscillator in Hz
\r
127 The real value may vary depending on the variations
\r
128 in voltage and temperature. */
\r
130 * @brief External Low Speed oscillator (LSE) value.
\r
132 #if !defined (LSE_VALUE)
\r
133 #define LSE_VALUE ((uint32_t)32768) /*!< Value of the External Low Speed oscillator in Hz */
\r
134 #endif /* LSE_VALUE */
\r
137 * @brief External clock source for I2S peripheral
\r
138 * This value is used by the I2S HAL module to compute the I2S clock source
\r
139 * frequency, this source is inserted directly through I2S_CKIN pad.
\r
141 #if !defined (EXTERNAL_CLOCK_VALUE)
\r
142 #define EXTERNAL_CLOCK_VALUE ((uint32_t)12288000) /*!< Value of the Internal oscillator in Hz*/
\r
143 #endif /* EXTERNAL_CLOCK_VALUE */
\r
145 /* Tip: To avoid modifying this file each time you need to use different HSE,
\r
146 === you can define the HSE value in your toolchain compiler preprocessor. */
\r
148 /* ########################### System Configuration ######################### */
\r
150 * @brief This is the HAL system configuration section
\r
152 #define VDD_VALUE ((uint32_t)3300) /*!< Value of VDD in mv */
\r
153 #define TICK_INT_PRIORITY ((uint32_t)0x0F) /*!< tick interrupt priority */
\r
155 #define PREFETCH_ENABLE 1
\r
156 #define ART_ACCLERATOR_ENABLE 1 /* To enable instruction cache and prefetch */
\r
158 /* ########################## Assert Selection ############################## */
\r
160 * @brief Uncomment the line below to expanse the "assert_param" macro in the
\r
163 /* #define USE_FULL_ASSERT 1 */
\r
165 /* ################## Ethernet peripheral configuration ##################### */
\r
167 /* Section 1 : Ethernet peripheral configuration */
\r
169 /* MAC ADDRESS: MAC_ADDR0:MAC_ADDR1:MAC_ADDR2:MAC_ADDR3:MAC_ADDR4:MAC_ADDR5 */
\r
170 #define MAC_ADDR0 2
\r
171 #define MAC_ADDR1 0
\r
172 #define MAC_ADDR2 0
\r
173 #define MAC_ADDR3 0
\r
174 #define MAC_ADDR4 0
\r
175 #define MAC_ADDR5 0
\r
177 /* Definition of the Ethernet driver buffers size and count */
\r
178 #define ETH_RX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for receive */
\r
179 #define ETH_TX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for transmit */
\r
180 #define ETH_RXBUFNB ((uint32_t)4) /* 4 Rx buffers of size ETH_RX_BUF_SIZE */
\r
181 #define ETH_TXBUFNB ((uint32_t)4) /* 4 Tx buffers of size ETH_TX_BUF_SIZE */
\r
183 /* Section 2: PHY configuration section */
\r
185 /* DP83848 PHY Address*/
\r
186 #define DP83848_PHY_ADDRESS 0x01
\r
187 /* PHY Reset delay these values are based on a 1 ms Systick interrupt*/
\r
188 #define PHY_RESET_DELAY ((uint32_t)0x000000FF)
\r
189 /* PHY Configuration delay */
\r
190 #define PHY_CONFIG_DELAY ((uint32_t)0x00000FFF)
\r
192 #define PHY_READ_TO ((uint32_t)0x0000FFFF)
\r
193 #define PHY_WRITE_TO ((uint32_t)0x0000FFFF)
\r
195 /* Section 3: Common PHY Registers */
\r
197 #define PHY_BCR ((uint16_t)0x00) /*!< Transceiver Basic Control Register */
\r
198 #define PHY_BSR ((uint16_t)0x01) /*!< Transceiver Basic Status Register */
\r
200 #define PHY_RESET ((uint16_t)0x8000) /*!< PHY Reset */
\r
201 #define PHY_LOOPBACK ((uint16_t)0x4000) /*!< Select loop-back mode */
\r
202 #define PHY_FULLDUPLEX_100M ((uint16_t)0x2100) /*!< Set the full-duplex mode at 100 Mb/s */
\r
203 #define PHY_HALFDUPLEX_100M ((uint16_t)0x2000) /*!< Set the half-duplex mode at 100 Mb/s */
\r
204 #define PHY_FULLDUPLEX_10M ((uint16_t)0x0100) /*!< Set the full-duplex mode at 10 Mb/s */
\r
205 #define PHY_HALFDUPLEX_10M ((uint16_t)0x0000) /*!< Set the half-duplex mode at 10 Mb/s */
\r
206 #define PHY_AUTONEGOTIATION ((uint16_t)0x1000) /*!< Enable auto-negotiation function */
\r
207 #define PHY_RESTART_AUTONEGOTIATION ((uint16_t)0x0200) /*!< Restart auto-negotiation function */
\r
208 #define PHY_POWERDOWN ((uint16_t)0x0800) /*!< Select the power down mode */
\r
209 #define PHY_ISOLATE ((uint16_t)0x0400) /*!< Isolate PHY from MII */
\r
211 #define PHY_AUTONEGO_COMPLETE ((uint16_t)0x0020) /*!< Auto-Negotiation process completed */
\r
212 #define PHY_LINKED_STATUS ((uint16_t)0x0004) /*!< Valid link established */
\r
213 #define PHY_JABBER_DETECTION ((uint16_t)0x0002) /*!< Jabber condition detected */
\r
215 /* Section 4: Extended PHY Registers */
\r
217 #define PHY_SR ((uint16_t)0x10) /*!< PHY status register Offset */
\r
218 #define PHY_MICR ((uint16_t)0x11) /*!< MII Interrupt Control Register */
\r
219 #define PHY_MISR ((uint16_t)0x12) /*!< MII Interrupt Status and Misc. Control Register */
\r
221 #define PHY_LINK_STATUS ((uint16_t)0x0001) /*!< PHY Link mask */
\r
222 #define PHY_SPEED_STATUS ((uint16_t)0x0002) /*!< PHY Speed mask */
\r
223 #define PHY_DUPLEX_STATUS ((uint16_t)0x0004) /*!< PHY Duplex mask */
\r
225 #define PHY_MICR_INT_EN ((uint16_t)0x0002) /*!< PHY Enable interrupts */
\r
226 #define PHY_MICR_INT_OE ((uint16_t)0x0001) /*!< PHY Enable output interrupt events */
\r
228 #define PHY_MISR_LINK_INT_EN ((uint16_t)0x0020) /*!< Enable Interrupt on change of link status */
\r
229 #define PHY_LINK_INTERRUPT ((uint16_t)0x2000) /*!< PHY link status interrupt mask */
\r
231 /* Includes ------------------------------------------------------------------*/
\r
233 * @brief Include module's header file
\r
236 #ifdef HAL_RCC_MODULE_ENABLED
\r
237 #include "stm32f7xx_hal_rcc.h"
\r
238 #endif /* HAL_RCC_MODULE_ENABLED */
\r
240 #ifdef HAL_GPIO_MODULE_ENABLED
\r
241 #include "stm32f7xx_hal_gpio.h"
\r
242 #endif /* HAL_GPIO_MODULE_ENABLED */
\r
244 #ifdef HAL_DMA_MODULE_ENABLED
\r
245 #include "stm32f7xx_hal_dma.h"
\r
246 #endif /* HAL_DMA_MODULE_ENABLED */
\r
248 #ifdef HAL_CORTEX_MODULE_ENABLED
\r
249 #include "stm32f7xx_hal_cortex.h"
\r
250 #endif /* HAL_CORTEX_MODULE_ENABLED */
\r
252 #ifdef HAL_ADC_MODULE_ENABLED
\r
253 #include "stm32f7xx_hal_adc.h"
\r
254 #endif /* HAL_ADC_MODULE_ENABLED */
\r
256 #ifdef HAL_CAN_MODULE_ENABLED
\r
257 #include "stm32f7xx_hal_can.h"
\r
258 #endif /* HAL_CAN_MODULE_ENABLED */
\r
260 #ifdef HAL_CEC_MODULE_ENABLED
\r
261 #include "stm32f7xx_hal_cec.h"
\r
262 #endif /* HAL_CEC_MODULE_ENABLED */
\r
264 #ifdef HAL_CRC_MODULE_ENABLED
\r
265 #include "stm32f7xx_hal_crc.h"
\r
266 #endif /* HAL_CRC_MODULE_ENABLED */
\r
268 #ifdef HAL_CRYP_MODULE_ENABLED
\r
269 #include "stm32f7xx_hal_cryp.h"
\r
270 #endif /* HAL_CRYP_MODULE_ENABLED */
\r
272 #ifdef HAL_DMA2D_MODULE_ENABLED
\r
273 #include "stm32f7xx_hal_dma2d.h"
\r
274 #endif /* HAL_DMA2D_MODULE_ENABLED */
\r
276 #ifdef HAL_DAC_MODULE_ENABLED
\r
277 #include "stm32f7xx_hal_dac.h"
\r
278 #endif /* HAL_DAC_MODULE_ENABLED */
\r
280 #ifdef HAL_DCMI_MODULE_ENABLED
\r
281 #include "stm32f7xx_hal_dcmi.h"
\r
282 #endif /* HAL_DCMI_MODULE_ENABLED */
\r
284 #ifdef HAL_ETH_MODULE_ENABLED
\r
285 #include "stm32f7xx_hal_eth.h"
\r
286 #endif /* HAL_ETH_MODULE_ENABLED */
\r
288 #ifdef HAL_FLASH_MODULE_ENABLED
\r
289 #include "stm32f7xx_hal_flash.h"
\r
290 #endif /* HAL_FLASH_MODULE_ENABLED */
\r
292 #ifdef HAL_SRAM_MODULE_ENABLED
\r
293 #include "stm32f7xx_hal_sram.h"
\r
294 #endif /* HAL_SRAM_MODULE_ENABLED */
\r
296 #ifdef HAL_NOR_MODULE_ENABLED
\r
297 #include "stm32f7xx_hal_nor.h"
\r
298 #endif /* HAL_NOR_MODULE_ENABLED */
\r
300 #ifdef HAL_NAND_MODULE_ENABLED
\r
301 #include "stm32f7xx_hal_nand.h"
\r
302 #endif /* HAL_NAND_MODULE_ENABLED */
\r
304 #ifdef HAL_SDRAM_MODULE_ENABLED
\r
305 #include "stm32f7xx_hal_sdram.h"
\r
306 #endif /* HAL_SDRAM_MODULE_ENABLED */
\r
308 #ifdef HAL_HASH_MODULE_ENABLED
\r
309 #include "stm32f7xx_hal_hash.h"
\r
310 #endif /* HAL_HASH_MODULE_ENABLED */
\r
312 #ifdef HAL_I2C_MODULE_ENABLED
\r
313 #include "stm32f7xx_hal_i2c.h"
\r
314 #endif /* HAL_I2C_MODULE_ENABLED */
\r
316 #ifdef HAL_I2S_MODULE_ENABLED
\r
317 #include "stm32f7xx_hal_i2s.h"
\r
318 #endif /* HAL_I2S_MODULE_ENABLED */
\r
320 #ifdef HAL_IWDG_MODULE_ENABLED
\r
321 #include "stm32f7xx_hal_iwdg.h"
\r
322 #endif /* HAL_IWDG_MODULE_ENABLED */
\r
324 #ifdef HAL_LPTIM_MODULE_ENABLED
\r
325 #include "stm32f7xx_hal_lptim.h"
\r
326 #endif /* HAL_LPTIM_MODULE_ENABLED */
\r
328 #ifdef HAL_LTDC_MODULE_ENABLED
\r
329 #include "stm32f7xx_hal_ltdc.h"
\r
330 #endif /* HAL_LTDC_MODULE_ENABLED */
\r
332 #ifdef HAL_PWR_MODULE_ENABLED
\r
333 #include "stm32f7xx_hal_pwr.h"
\r
334 #endif /* HAL_PWR_MODULE_ENABLED */
\r
336 #ifdef HAL_QSPI_MODULE_ENABLED
\r
337 #include "stm32f7xx_hal_qspi.h"
\r
338 #endif /* HAL_QSPI_MODULE_ENABLED */
\r
340 #ifdef HAL_RNG_MODULE_ENABLED
\r
341 #include "stm32f7xx_hal_rng.h"
\r
342 #endif /* HAL_RNG_MODULE_ENABLED */
\r
344 #ifdef HAL_RTC_MODULE_ENABLED
\r
345 #include "stm32f7xx_hal_rtc.h"
\r
346 #endif /* HAL_RTC_MODULE_ENABLED */
\r
348 #ifdef HAL_SAI_MODULE_ENABLED
\r
349 #include "stm32f7xx_hal_sai.h"
\r
350 #endif /* HAL_SAI_MODULE_ENABLED */
\r
352 #ifdef HAL_SD_MODULE_ENABLED
\r
353 #include "stm32f7xx_hal_sd.h"
\r
354 #endif /* HAL_SD_MODULE_ENABLED */
\r
356 #ifdef HAL_SPDIFRX_MODULE_ENABLED
\r
357 #include "stm32f7xx_hal_spdifrx.h"
\r
358 #endif /* HAL_SPDIFRX_MODULE_ENABLED */
\r
360 #ifdef HAL_SPI_MODULE_ENABLED
\r
361 #include "stm32f7xx_hal_spi.h"
\r
362 #endif /* HAL_SPI_MODULE_ENABLED */
\r
364 #ifdef HAL_TIM_MODULE_ENABLED
\r
365 #include "stm32f7xx_hal_tim.h"
\r
366 #endif /* HAL_TIM_MODULE_ENABLED */
\r
368 #ifdef HAL_UART_MODULE_ENABLED
\r
369 #include "stm32f7xx_hal_uart.h"
\r
370 #endif /* HAL_UART_MODULE_ENABLED */
\r
372 #ifdef HAL_USART_MODULE_ENABLED
\r
373 #include "stm32f7xx_hal_usart.h"
\r
374 #endif /* HAL_USART_MODULE_ENABLED */
\r
376 #ifdef HAL_IRDA_MODULE_ENABLED
\r
377 #include "stm32f7xx_hal_irda.h"
\r
378 #endif /* HAL_IRDA_MODULE_ENABLED */
\r
380 #ifdef HAL_SMARTCARD_MODULE_ENABLED
\r
381 #include "stm32f7xx_hal_smartcard.h"
\r
382 #endif /* HAL_SMARTCARD_MODULE_ENABLED */
\r
384 #ifdef HAL_WWDG_MODULE_ENABLED
\r
385 #include "stm32f7xx_hal_wwdg.h"
\r
386 #endif /* HAL_WWDG_MODULE_ENABLED */
\r
388 #ifdef HAL_PCD_MODULE_ENABLED
\r
389 #include "stm32f7xx_hal_pcd.h"
\r
390 #endif /* HAL_PCD_MODULE_ENABLED */
\r
392 #ifdef HAL_HCD_MODULE_ENABLED
\r
393 #include "stm32f7xx_hal_hcd.h"
\r
394 #endif /* HAL_HCD_MODULE_ENABLED */
\r
396 /* Exported macro ------------------------------------------------------------*/
\r
397 #ifdef USE_FULL_ASSERT
\r
399 * @brief The assert_param macro is used for function's parameters check.
\r
400 * @param expr: If expr is false, it calls assert_failed function
\r
401 * which reports the name of the source file and the source
\r
402 * line number of the call that failed.
\r
403 * If expr is true, it returns no value.
\r
406 #define assert_param(expr) ((expr) ? (void)0 : assert_failed((uint8_t *)__FILE__, __LINE__))
\r
407 /* Exported functions ------------------------------------------------------- */
\r
408 void assert_failed(uint8_t* file, uint32_t line);
\r
410 #define assert_param(expr) ((void)0)
\r
411 #endif /* USE_FULL_ASSERT */
\r
418 #endif /* __STM32F7xx_HAL_CONF_H */
\r
421 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
\r