TA的每日心情 | 奋斗 2016-8-25 12:42 |
---|
签到天数: 692 天 连续签到: 1 天 [LV.9]以坛为家II
|
发表于 2012-11-6 22:00:50
|
显示全部楼层
本帖最后由 fengye5340 于 2012-11-6 22:02 编辑
板子上点后,默认采用内部8MHZ RC振荡器时钟,然后启用PLL锁相环作为系统的主时钟,用SystemInit()这个函数初始化后,系统频率就是8MHZ*6=48MHZ了,呵呵,不过,固件库里面说,这个时钟并不很精确,有误差的。
建议楼主看看 system_stm32f0xx.c 这个文件,里面的时钟设置就很清楚了。
一、The STM32F0xx is configured to run at 48 MHz, following the three
* configuration below:
* - PLL_SOURCE_HSI (default): HSI (~8MHz) used to clock the PLL, and
* the PLL is used as system clock source.
* - PLL_SOURCE_HSE : HSE (8MHz) used to clock the PLL, and
* the PLL is used as system clock source.
* - PLL_SOURCE_HSE_BYPASS : HSE bypassed with an external clock
* (8MHz, coming from ST-Link) used to clock
* the PLL, and the PLL is used as system
* clock source.
*
二、/* Select the PLL clock source */
#define PLL_SOURCE_HSI // HSI (~8MHz) used to clock the PLL, and the PLL is used as system clock source
|
|