首页 > 其他 > 详细

crazyflie2.0 RCC时钟知识

时间:2015-07-26 15:44:05      阅读:231      评论:0      收藏:0      [点我收藏+]

由于目前手里只有16MHZ的2520封装的贴片晶振,8MHZ这种封装做不到这么小,所以就先用16MHZ,这样我们就需要修改程序相关的RCC时钟:

1,stm32f4xx.h

#define HSE_VALUE    ((uint32_t)16000000) /*!< Value of the External oscillator in Hz */

2,system_stm32f4xx.c

/* PLL_VCO = (HSE_VALUE or HSI_VALUE / PLL_M) * PLL_N */
#define PLL_M      16
/* USB OTG FS, SDIO and RNG Clock =  PLL_VCO / PLLQ */
#define PLL_Q      7


#if defined (STM32F40_41xxx)
#define PLL_N      336
/* SYSCLK = PLL_VCO / PLL_P */
#define PLL_P      2
#endif /* STM32F40_41xxx */


#if defined (STM32F427_437xx) || defined (STM32F429_439xx)
#define PLL_N      360
/* SYSCLK = PLL_VCO / PLL_P */
#define PLL_P      2
#endif /* STM32F427_437x || STM32F429_439xx */


#if defined (STM32F401xx)
#define PLL_N      336
/* SYSCLK = PLL_VCO / PLL_P */
#define PLL_P      4
#endif /* STM32F401xx */


版权声明:本文为博主原创文章,未经博主允许不得转载。

crazyflie2.0 RCC时钟知识

原文:http://blog.csdn.net/xingqingly/article/details/47068337

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!