. /* ########################## Module Selection ############################## */
. /**
. * @brief This is the list of modules to be used in the HAL driver
. */
. #define HAL_MODULE_ENABLED
. #define HAL_ADC_MODULE_ENABLED
. #define HAL_CEC_MODULE_ENABLED
.
. /* 省略未写 */
.
. /* ########################## Oscillator Values adaptation ####################*/
. /**
. * @brief Adjust the value of External High Speed oscillator (HSE) used in your application.
. * This value is used by the RCC HAL module to compute the system frequency
. * (when HSE is used as system clock source, directly or through the PLL).
. */
. #if !defined (HSE_VALUE)
. #define HSE_VALUE ((uint32_t)25000000) /*!< Value of the External oscillator in Hz */
. #endif /* HSE_VALUE */
.
. #if !defined (HSE_STARTUP_TIMEOUT)
. #define HSE_STARTUP_TIMEOUT ((uint32_t)5000) /*!< Time out for HSE start up, in ms */
. #endif /* HSE_STARTUP_TIMEOUT */
.
. /**
. * @brief Internal oscillator (CSI) default value.
. * This value is the default CSI value after Reset.
. */
. #if !defined (CSI_VALUE)
. #define CSI_VALUE ((uint32_t)4000000) /*!< Value of the Internal oscillator in Hz*/
. #endif /* CSI_VALUE */
.
. /**
. * @brief Internal High Speed oscillator (HSI) value.
. * This value is used by the RCC HAL module to compute the system frequency
. * (when HSI is used as system clock source, directly or through the PLL).
. */
. #if !defined (HSI_VALUE)
. #define HSI_VALUE ((uint32_t)64000000) /*!< Value of the Internal oscillator in Hz*/
. #endif /* HSI_VALUE */
.
. /**
. * @brief External Low Speed oscillator (LSE) value.
. * This value is used by the UART, RTC HAL module to compute the system frequency
. */
. #if !defined (LSE_VALUE)
. #define LSE_VALUE ((uint32_t)32768) /*!< Value of the External oscillator in Hz*/
. #endif /* LSE_VALUE */
.
.
. #if !defined (LSE_STARTUP_TIMEOUT)
. #define LSE_STARTUP_TIMEOUT ((uint32_t)5000) /*!< Time out for LSE start up, in ms */
. #endif /* LSE_STARTUP_TIMEOUT */
.
. /**
. * @brief External clock source for I2S peripheral
. * This value is used by the I2S HAL module to compute the I2S clock source
. * frequency, this source is inserted directly through I2S_CKIN pad.
. */
. #if !defined (EXTERNAL_CLOCK_VALUE)
. #define EXTERNAL_CLOCK_VALUE 12288000U /*!< Value of the External clock in Hz*/
. #endif /* EXTERNAL_CLOCK_VALUE */
.
. /* Tip: To avoid modifying this file each time you need to use different HSE,
. === you can define the HSE value in your toolchain compiler preprocessor. */
.
. /* ########################### System Configuration ######################### */
. /**
. * @brief This is the HAL system configuration section
. */
. #define VDD_VALUE ((uint32_t)3300) /*!< Value of VDD in mv */
. #define TICK_INT_PRIORITY ((uint32_t)0x0F) /*!< tick interrupt priority */
. #define USE_RTOS 0
. /* #define USE_SD_TRANSCEIVER 1U */ /*!< use uSD Transceiver */
.
. /* ########################### Ethernet Configuration ######################### */
. #define ETH_TX_DESC_CNT 4 /* number of Ethernet Tx DMA descriptors */
. #define ETH_RX_DESC_CNT 4 /* number of Ethernet Rx DMA descriptors */
.
. #define ETH_MAC_ADDR0 ((uint8_t)0x02)
. #define ETH_MAC_ADDR1 ((uint8_t)0x00)
. #define ETH_MAC_ADDR2 ((uint8_t)0x00)
. #define ETH_MAC_ADDR3 ((uint8_t)0x00)
. #define ETH_MAC_ADDR4 ((uint8_t)0x00)
. #define ETH_MAC_ADDR5 ((uint8_t)0x00)
.
. /* ########################## Assert Selection ############################## */
. /**
. * @brief Uncomment the line below to expanse the "assert_param" macro in the
. * HAL drivers code
. */
. /* #define USE_FULL_ASSERT 1 */
.
.
. /* ################## SPI peripheral configuration ########################## */
. /**
. * @brief Used to activate CRC feature inside HAL SPI Driver
. * Activated (1U): CRC code is compiled within HAL SPI driver
. * Deactivated (0U): CRC code excluded from HAL SPI driver
. */
.
. #define USE_SPI_CRC 1U
.
.
. /* Includes ------------------------------------------------------------------*/
. /**
. * @brief Include module's header file
. */
.
. #ifdef HAL_RCC_MODULE_ENABLED
. #include "stm32h7xx_hal_rcc.h"
. #endif /* HAL_RCC_MODULE_ENABLED */
. /* 省略未写 */
.
.
. /* Exported macro ------------------------------------------------------------*/
. #ifdef USE_FULL_ASSERT
. /**
. * @brief The assert_param macro is used for function's parameters check.
. * @param expr: If expr is false, it calls assert_failed function
. * which reports the name of the source file and the source
. * line number of the call that failed.
. * If expr is true, it returns no value.
. * @retval None
. */
. #define assert_param(expr) ((expr) ? (void)0 : assert_failed((uint8_t *)__FILE__, __LINE__))
. /* Exported functions ------------------------------------------------------- */
. void assert_failed(uint8_t* file, uint32_t line);
. #else
. #define assert_param(expr) ((void)0)
. #endif /* USE_FULL_ASSERT */
除了HSE_VALUE,下面几个也要作为了解: