STM32 Clock Source

Source: Internet
Author: User

STM32 clock System for a skilled microcontroller development should be more familiar, but for the novice without too many basic (such as I one months ago), see such a clock system diagram inevitably have a nod big, But when it comes to understanding the designer's purpose and then looking back at a picture like this, you'll find it's not a difficult thing to understand.



STM32F103 has 5 clock sources, namely external high-speed clock (HSE), internal high-speed clock (HSI), external low-speed clock (LSE), internal low-speed clock (LSI), and phase-locked loop clock (PLL)


For a relatively complex microcontroller system such as STM32, the system core, a variety of bus and peripheral needs of the operating frequency is not the same, so there is a variety of means in the chip to produce different speed of the clock to coordinate the work of each device. According to common sense, the entire clock system as long as there is a high-speed clock source with a variety of dividers can produce a variety of clock frequency to meet the demand, however, if the direct system to provide high-speed clock is faced with the need to solve various electromagnetic interference and stability problems, The STM32 is therefore designed to provide a ppl with a maximum 72MHz clock inside the chip and a relatively low clock as the input clock for the PLL. For this reason, the inside of the chip itself has a 8MHZ RC oscillator circuit as the input of the phase-locked loop, which is HSI. But because the clock is integrated inside the chip, its stability and accuracy can not be guaranteed, so if you want to enable the chip to work stably, it is necessary to introduce a clock source from the outside, the chip also provides an interface to introduce an external high-speed clock source, in the figure Osc_out and osc_in, the clock introduced here is HSE.

With the above HSI or HSE with the PPL, the system clock can reach the maximum of 72MHz, and then through a variety of crossover can make the whole system work together.

From the clock tree can be seen, the system clock mainly has three functions, one is to provide a running clock for the COTEX-M3 core, the second is directly or after the crossover to mount on a variety of bus peripherals to provide the clock, the third is the RTC (real-time clock) after 128 to provide a clock source.

While a system clock is fully capable of meeting the clock requirements of the entire system, the real-time clock (RTC) inside the chip needs to provide a constant and stable time for the system, in some cases requiring it to continue to operate on battery power when the system is powered down, It is therefore necessary to provide it with a low-speed clock that is independent of the system clock (as the clock does not need to be too high in frequency). This clock source is also divided into two types, one from the outside can be as accurate as possible clock source, namely the LSE, and another one by the internal RC oscillator circuit provides a limited precision clock source, namely LSI. In addition, since the chip has an independent watchdog set to reset the chip when it is running abnormally, a separate clock source is also required to provide a working clock for the independent watchdog. In stm32f103, this clock comes from LSI (internal low-speed clock).





Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.