其他分享
首页 > 其他分享> > 25M晶振固件不能烧写

25M晶振固件不能烧写

作者:互联网

STM32 接25M晶振固件不能烧写原因

原因

由于芯片默认是8M,换成25M固件时钟配置没做相应配置引起时钟频率不正常导致芯片锁住。

解决方法

1、更换回8M正常烧写。
2、按复位按键,重新烧写。
3、修改时钟配置如下所示:
stm32f4xxx.h文件中
#if !defined (HSE_VALUE)
#define HSE_VALUE ((uint32_t)25000000) /*!< Value of the External oscillator in Hz */

system_stm32f4xx.c文件中

/************************* PLL Parameters ************************************/
#if defined (STM32F40_41xxx) || defined (STM32F427_437xx) || defined (STM32F429_439xx) || defined (STM32F401xx)
/
PLL_VCO = (HSE_VALUE or HSI_VALUE / PLL_M) * PLL_N */
#define PLL_M 25

标签:HSE,defined,VALUE,晶振,烧写,固件,PLL
来源: https://blog.csdn.net/our540453026/article/details/120238113