STM32F4XX IO port clock multiplexing function

Publisher:RadiantDreamsLatest update time:2018-08-15 Source: eefocusKeywords:STM32F4XX Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Based on STM32F412, the System Clock is output on PC9. Similarly, other clock functions can also be output on PA8.


 


    GPIO_InitTypeDef  GPIO_InitStructure;

    GPIO_InitStructure.GPIO_Pin = GPIO_Pin_9;

    GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF;

    GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;

    GPIO_InitStructure.GPIO_Speed = GPIO_Speed_100MHz;

    GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL;

    GPIO_Init(GPIOC, &GPIO_InitStructure); 

    

    GPIO_PinAFConfig(GPIOC,GPIO_PinSource9,GPIO_AF_MCO);

    

    RCC_MCO2Config(RCC_MCO2Source_SYSCLK, RCC_MCO2Div_4); 

The output parameters can be set by calling the RCC_MCO1Config() and RCC_MCO2Config() functions. The explanation of the library functions is very clear and there is no need to repeat them.


Keywords:STM32F4XX Reference address:STM32F4XX IO port clock multiplexing function

Previous article:Related settings when KEIL 5 downloads the program to the STM32F103ZET6 chip
Next article:STM32F103_USART_GPIO configuration and corresponding IO port settings

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号