STM32 internal clock output PA.8 (MCO)

Publisher:BlossomSunriseLatest update time:2016-12-07 Source: eefocusKeywords:STM32 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

The PA.8 pin of STM32 has a multiplexing function - clock output (MCO), which can output the internal clock of STM32 through PA.8. 
Operation process: 
   1) Set PA.8 to multiplexed Push-Pull mode. 
    GPIO_InitStructure.GPIO_Pin = GPIO_Pin_8; 
    GPIO_InitStructure.GPIO_Speed ​​= GPIO_Speed_50MHz; 
    GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP; 
    GPIO_Init(GPIOA, &GPIO_InitStructure); 
   2) Select the output clock source. 
    The clock selection is controlled by the MCO[2:0] bit in the clock configuration register (RCC_CFGR). 
    RCC_MCOConfig(RCC_MCO); 
    Parameter RCC_MCO is the internal clock to be output: 
      RCC_MCO_NoClock --- No clock output 
      RCC_MCO_SYSCLK --- Output system clock (SysCLK) 
      RCC_MCO_HSI --- Output internal high-speed 8MHz RC oscillator clock (HSI) 
      RCC_MCO_HSE --- Output high-speed external clock signal (HSE) 
      RCC_MCO_PLLCLK_Div2 --- Output PLL multiplied by two-divided clock (PLLCLK/2) 
Note: Since the maximum response frequency of the STM32 GPIO output pin is 50MHz, if the output frequency exceeds 50MHz, the output waveform will be distorted.

Keywords:STM32 Reference address:STM32 internal clock output PA.8 (MCO)

Previous article:STM32 Programmable Voltage Monitor (PVD)
Next article:STM32F103--(II) GPIO Practice

Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号