5个时钟源
HSI,HSE,LSI,LSE,PLL
HSE为高速外部时钟,频率范围4~16 MHz
PLL的时钟源可以为:
HSE/2
HSE
HSI/2
倍频系数为2~16倍
STM32可以选择一个时钟信号输出到MCO脚,即PA8上,可以选择位PLL输出的二分频,HSI,HSE或系统时钟
注意:任何一个外设之前,都必须使能其对应的时钟
- /**
- * @brief Reset and Clock Control
- */
- typedef struct
- {
- __IO uint32_t CR;
- __IO uint32_t CFGR;
- __IO uint32_t CIR;
- __IO uint32_t APB2RSTR;
- __IO uint32_t APB1RSTR;
- __IO uint32_t AHBENR;
- __IO uint32_t APB2ENR;
- __IO uint32_t APB1ENR;
- __IO uint32_t BDCR;
- __IO uint32_t CSR;
- #ifdef STM32F10X_CL
- __IO uint32_t AHBRSTR;
- __IO uint32_t CFGR2;
- #endif /* STM32F10X_CL */
- #if defined (STM32F10X_LD_VL) || defined (STM32F10X_MD_VL) || defined (STM32F10X_HD_VL)
- uint32_t RESERVED0;
- __IO uint32_t CFGR2;
- #endif /* STM32F10X_LD_VL || STM32F10X_MD_VL || STM32F10X_HD_VL */
- } RCC_TypeDef;
复制代码
|