目前共有2篇帖子。 內容轉換:不轉換▼
 
點擊 回復
767 1
【实测数据】STM32F107VCT6接了25MHz外部晶振后,开机时的时钟情况
一派護法 十九級
1樓 發表于:2017-6-8 23:10
volatile uint32_t num;
num = RCC->CFGR; // 0x001D040A
// MCO=0: Microcontroller clock output, No clock
// OTGFSPRE=0: USB OTG FS prescaler, PLL VCO (2 x PLLCLK) clock is divided by 3 (PLL must be configured to output 72 MHz)
// PLLMUL=0111: PLL multiplication factor: PLL input clock x 9
// PLLXTPRE=0, LSB of division factor PREDIV1
// PLLSRC=1: Clock from PREDIV1 selected as PLL input clock
// ADCPRE=00: ADC prescaler = PCLK2 divided by 2
// PPRE2=000: APB high-speed prescaler (APB2), HCLK not divided
// PPRE1=100: APB Low-speed prescaler (APB1), HCLK divided by 2
// HPRE=0000: AHB prescaler, SYSCLK not divided
// SWS=10: System clock switch status, PLL used as system clock
// SW=10: System clock Switch, PLL selected as system clock

num = RCC->CFGR2; // 0x00010644
// I2S3SRC=0: I2S3 clock source, System clock (SYSCLK) selected as I2S3 clock entry
// I2S2SRC=0: I2S2 clock source, System clock (SYSCLK) selected as I2S2 clock entry
// PREDIV1SRC=1: PREDIV1 entry clock source, PLL2 selected as PREDIV1 clock entry
// PLL3MUL=0000: PLL3 Multiplication Factor, Reserved
// PLL2MUL=0110: PLL2 Multiplication Factor, PLL2 clock entry x 8
// PREDIV2=0100: PREDIV2 division factor, PREDIV2 input clock divided by 5
// PREDIV1=0100: PREDIV1 division factor, PREDIV1 input clock divided by 5

num = RCC->CR; // 0x0F035783
// PLL3RDY=0: PLL3 clock ready flag, PLL3 unlocked
// PLL3ON=0: PLL3 enable, PLL3 OFF
// PLL2RDY=1: PLL2 clock ready flag, PLL2 locked
// PLL2ON=1: PLL2 enable, PLL2 ON
// PLLRDY=1: PLL clock ready flag, PLL locked
// PLLON=1: PLL enable, PLL ON
// CSSON=0: Clock security system enable, Clock detector OFF
// HSEBYP=0: External high-speed clock bypass, external 3-25 MHz oscillator not bypassed
// HSERDY=1: External high-speed clock ready flag, HSE oscillator ready
// HSEON=1: HSE clock enable, HSE oscillator ON
// HSICAL=01010111: Internal high-speed clock calibration
// HSITRIM=10000: Internal high-speed clock trimming
// HSIRDY=1: Internal high-speed clock ready flag, Internal 8 MHz RC oscillator ready
// HSION=1: Internal high-speed clock enable, Internal 8 MHz RC oscillator ON

// PLL2 and PLL3 are clocked by HSE through a specific configurable divider.
// PLL2=25MHz/5*8=40MHz
// SYSCLK=PLL=40MHz/5*9=72MHz
// USB: 2*72/3=48MHz

// AHB: 72MHz
// APB1: 36MHz
// APB2: 72MHz
一派護法 十九級
2樓 發表于:2017-6-8 23:13
num的值是通过J-Link调试器在Keil MDK中调试出来的。

回復帖子

內容:
用戶名: 您目前是匿名發表
驗證碼:
(快捷鍵:Ctrl+Enter)
 

本帖信息

點擊數:767 回複數:1
評論數: ?
作者:巨大八爪鱼
最後回復:巨大八爪鱼
最後回復時間:2017-6-8 23:13
 
©2010-2024 Arslanbar Ver2.0
除非另有聲明,本站採用共享創意姓名標示-相同方式分享 3.0 Unported許可協議進行許可。