The clock setting of STM32F107 is changed from 25M to 8M

Publisher:会弹琴的鲸鱼3312Latest update time:2018-08-21 Source: eefocusKeywords:STM32F107 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1. First find the two files stm32f10x.h and system_stm32f10x.c;

2. Modification of system_stm32f10x.c

#if defined (STM32F10X_LD_VL) || (defined STM32F10X_MD_VL) 
 #define SYSCLK_FREQ_HSE    HSE_Value
 /*#define SYSCLK_FREQ_24MHz  24000000 */
#else
/* #define SYSCLK_FREQ_HSE    HSE_Value */
/* #define SYSCLK_FREQ_24MHz  24000000 */ 
/* #define SYSCLK_FREQ_36MHz  36000000 */
/* #define SYSCLK_FREQ_48MHz  48000000 */
/* #define SYSCLK_FREQ_56MHz  56000000 */
//#define SYSCLK_FREQ_72MHz  72000000
#endif

3.stm32f10x.h modification

#if !defined  HSE_VALUE
 #ifdef STM32F10X_CL   
  #define HSE_VALUE    ((uint32_t)8000000) /*!< Value of the External oscillator in Hz */
 #else 
  #define HSE_VALUE    ((uint32_t)8000000) /*!< Value of the External oscillator in Hz */
 #endif /* STM32F10X_CL */
#endif /* HSE_VALUE */


Keywords:STM32F107 Reference address:The clock setting of STM32F107 is changed from 25M to 8M

Previous article:Abnormality when using 16M external crystal oscillator in STM32
Next article:The problem that the crystal oscillator parameters do not match the actual ones when using the STM32 library function

Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号