下面只需定义一下自己开发板的外部时钟源频率即可:(加个宏定义)
/**
* @brief In the following line adjust the value of External High Speed oscillator (HSE)
used in your application
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.
*/
#define HSE_VALUE ((uint32_t)8000000) // 定义自己开发版上的外部时钟源频率
#if !defined (HSE_VALUE)
#define HSE_VALUE ((uint32_t)25000000) /*!< Value of the External oscillator in Hz */
#endif /* HSE_VALUE */
|