STM32 gets the current system clock

Publisher:YaqiLatest update time:2018-08-13 Source: eefocusKeywords:STM32 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

code show as below:


    RCC_ClocksTypeDef get_rcc_clock; //Get system clock status

    RCC_GetClocksFreq(&get_rcc_clock); //When simulating, you can see the clocks of various peripherals in the structure get_rcc_clock


Notice: 

The prototype of the structure RCC_ClocksTypeDef in the above code can be found in the library file stm32f10x_rcc.h as follows:


typedef struct

{

  uint32_t SYSCLK_Frequency;  /*!< returns SYSCLK clock frequency expressed in Hz */

  uint32_t HCLK_Frequency;    /*!< returns HCLK clock frequency expressed in Hz */

  uint32_t PCLK1_Frequency;   /*!< returns PCLK1 clock frequency expressed in Hz */

  uint32_t PCLK2_Frequency;   /*!< returns PCLK2 clock frequency expressed in Hz */

  uint32_t ADCCLK_Frequency;  /*!< returns ADCCLK clock frequency expressed in Hz */

}RCC_ClocksTypeDef;

As shown below: 
Write the picture description here

Keywords:STM32 Reference address:STM32 gets the current system clock

Previous article:Detailed arrangement of STM32 clock system RCC
Next article:STM32 clock introduction and configuration method

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号