clock
Keywords:STM32
Reference address:STM32 study notes RCC
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);
}
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]
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]
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]
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]
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]
- Popular Resources
- Popular amplifiers
Recommended Content
Latest Microcontroller Articles
He Limin Column
Microcontroller and Embedded Systems Bible
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
MoreSelected Circuit Diagrams
MorePopular Articles
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
MoreDaily News
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
Guess you like
- Distance, speed, angle full detection millimeter wave sensor gives you a unique automatic door
- Is the impedance you see real?
- Working principle circuit diagram of automatic humidifier
- How to Design an RTC Circuit
- Experience in solving audio signal ground noise based on BA3121
- Liquid Level Measurement System Based on Single Chip Microcomputer
- UART emulation LIN problem
- Floating point issues with MicroPython
- The use of stack in DSP
- Cubietruck dual-core A20 development board