STM32 study notes RCC

Publisher:EnchantedDreamLatest update time:2015-10-15 Source: eefocusKeywords:STM32 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
clock
Three different clock sources can be used to drive the system clock (SYSCLK):
● HSI oscillator clock
● HSE oscillator clock
● PLL clock These devices have the following two secondary clock sources:
● 40kHz low speed internal RC, can be used to drive independent watchdog and RTC through program selection. RTC is used to automatically wake up the system from stop/standby mode.
● A 32.768kHz low speed external crystal can also be used to drive the RTC (RTCCLK) through program selection. When not in use, either clock source can be independently enabled or disabled, thereby optimizing system power consumption.
 
1. When HSI is used as the PLL clock input, the maximum frequency of the system clock is 64MHz.
2. For the characteristics of internal and external clock sources, please refer to the "Electrical Characteristics" section in the corresponding product data sheet. Users can configure the frequencies of the AHB, high-speed APB (APB2), and low-speed APB (APB1) domains through multiple prescalers. The maximum frequency of the AHB and APB2 domains is 72MHz. The maximum allowed frequency of the APB1 domain is 36MHz. The clock frequency of the SDIO interface is fixed to HCLK/2.
RCC uses the AHB clock (HCLK) divided by 8 as the external clock of the Cortex system timer (SysTick). By setting the SysTick control and status register, the above clock or the Cortex (HCLK) clock can be selected as the SysTick clock. The ADC clock is obtained by dividing the high-speed APB2 clock by 2, 4, 6 or 8.
The timer clock frequency distribution is automatically set by hardware according to the following two situations: 1. If the corresponding APB pre-scaling factor is 1, the timer clock frequency is consistent with the APB bus frequency. 2. Otherwise, the timer clock frequency is set to twice the APB bus frequency connected to it.
 
 
void RCC_Configuration(void)
{
 
  SystemInit();
   
 
  RCC_APB2PeriphClockCmd(USARTy_GPIO_CLK | USARTz_GPIO_CLK | RCC_APB2Periph_AFIO, ENABLE);
#ifndef USE_STM3210C_EVAL
 
  RCC_APB2PeriphClockCmd(USARTy_CLK, ENABLE);
#else
 
  RCC_APB1PeriphClockCmd(USARTy_CLK, ENABLE);
#endif
 
  RCC_APB1PeriphClockCmd(USARTz_CLK, ENABLE); 
}
Keywords:STM32 Reference address:STM32 study notes RCC

Previous article:STM32 study notes GPIO
Next article:STM32 Study Notes SysTick

Recommended ReadingLatest update time:2024-11-16 14:54

Some experience in debugging STM32 UDP function
I'm studying STM32F107VC recently. Since a task requires UDP, I plan to use the development board combined with LWip to implement this function. However, I encountered some problems in the process of debugging UDP. After searching on the Internet for a long time, I finally got the basic functions working. I plan to re
[Microcontroller]
Focusing on AI and IoT, the STM32 Summit is coming soon
With the theme of "Gathering Wisdom, Creating the Future", the 2019 STM32 Summit focuses on three major topics: artificial intelligence and computing, industry and security, and cloud technology and connectivity. During the two-day summit, STMicroelectronics and 45 partners will jointly exhibit more than 180 prototype
[Internet of Things]
STM32 scatter loading file
By using the scatter-loading mechanism, you can specify the memory map of an image to the linker. Scatter-loading gives you complete control over the grouping and location of image components. Scatter-loading can be used for simple images, but it is usually only used for images with complex memory maps, where multiple
[Microcontroller]
STM32 scatter loading file
Differences between STM32 TIMER timers
The STM32F1 series has 14 timers, 1 to 14; the specific models vary. It is suitable for a variety of purposes, including measuring the pulse width of the input signal (input capture), or generating output waveforms (output comparison, PWM, complementary PWM with embedded dead time, etc.). Using the timer prescaler and
[Microcontroller]
Differences between STM32 TIMER timers
STM32 interrupt priority description (preemptive and responsive priority)
Note: To view the registers, please refer to the "ARM Cortex-M4 Authoritative Guide". Since I use library development, I will not delve into the registers. The summary information comes from Atom's "STM32F4 Library Development Guide", which is summarized here for easy search. STM32F4 interrupt grouping: STM32F4 divi
[Microcontroller]
STM32 interrupt priority description (preemptive and responsive priority)
Application of STM32 MCU in alcohol detector
     Drunk driving is an important cause of traffic accidents, which brings great harm to people's lives and life safety. In order to prevent motor vehicle drivers from driving after drinking, the on-site real-time inspection of the alcohol content in human breath has received increasing attention. This system solves t
[Microcontroller]
stm32systick knowledge
Systick, also known as tick timer, is a 24-bit simple timer of the STM32 core, often used for delay and system heartbeat functions. Systick has a total of 4 registers CTRL, LOAD, VAL, CALIB   The definitions of each bit of SysTick- CTRL are shown in Figure 5.1.2.1:    The definition of SysTick- LOAD is shown in Figure
[Microcontroller]
stm32systick knowledge
Production of extremely low power RCC switching power supply
The AC adapter circuit of a commercially available portable CD/VCD player is shown in the attached figure. The nominal output of the adapter is 5V, 500mA, the volume is 7×4×1.8cm, and the weight is about 180g. Its power-to-volume ratio is significantly better than that of ordinary power-frequency transformer ad
[Power Management]
Production of extremely low power RCC switching power supply
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
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号