Summary of STM32F4 peripheral clock configuration

Publisher:九九归一74Latest update time:2018-12-18 Source: eefocusKeywords:STM32F4 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

See the end of the clock tree (stm32F407VGET6)


1. The first thing that needs to be clarified is the clock configuration   


The main clock and peripheral corresponding clock reference clock tree are as follows:


For example:



You can configure it as follows: That is, the default configuration in [1] (SetSysClock function of system_stm32F4xx.c)  


Configure SYSCLK, HCLK, PCLK2, PCLK1    



Configure the master clock:



Reference [1] has a good description:



The internal/external clock selection:


Configure RCC->CFGR through the corresponding register,



The internal clock HSI is selected at first, and then the external clock 8MHz crystal oscillator is used; if the external crystal oscillator is unstable, the internal clock is automatically used.


Another configuration (you can redefine the clock again in the main function when setting the RCC function) RCC function configuration:



The result


  System clock = 168M


  AHB=168M


  APB1=84M (divided by two PCLK1)


 APB2=168M (1-divided frequency PCLK2)


What are the allocations of each bus, and what is mounted on the AHB bus? What is mounted on the APB1 bus? What is mounted on the APB2 bus?



The bus matrix can be used to manage access arbitration between master buses, and the arbitration adopts a round-robin scheduling algorithm


For the specific buses to which the peripherals are connected, see p52, as shown in the following table


Among them: With the help of two AHB/APB bus bridges APB1 and APB2, full


Synchronous connection, allowing flexible selection of peripheral frequencies.


Table 1:

 

 

Clock Tree:



【1】STM32F4 Development Guide - Library Function Version


 【2】STM32F4XX Chinese Reference Manual


Keywords:STM32F4 Reference address:Summary of STM32F4 peripheral clock configuration

Previous article:Research on STM32 clock initialization
Next article:STM32 Problem Record: This time Keil compiler is to blame

Recommended ReadingLatest update time:2024-11-16 00:36

Timer clock frequency of STM32F407
//The idea of ​​the experiment is to initialize TIM3, then enter an infinite loop and wait for the overflow interrupt of TIM3. When the value of TIM3_CNT is equal to TIM3_ARR, an interrupt of TIM3 will be generated and the interrupt processing function will be entered; TIM3_CNT starts counting from 0. // Check the c
[Microcontroller]
Timer clock frequency of STM32F407
Fully utilize the FPU performance of STM32F4 - Setting points
 I know this, it's a problem with the ST library. In the systeminit function, just add the following sentence, which means turning on the fpu. Without this sentence, it's useless to select the keil option. In addition, it seems that the keil soft emulation doesn't work either, and it can't jump from 0x00000. In shor
[Microcontroller]
Fully utilize the FPU performance of STM32F4 - Setting points
STM32F4 study notes 1——How to use DSP library
Configuration  1. Install DSP library files  2. Configure the compilation environment.  The above additions are added in project→options→C/C++→Define, and the separation is comma, that is, __FPU_PRESENT=1,__FPU_USED=1,ARM_MATH_CM4,__CC_ARM 3. Add in the file that needs to call the DSP function #include
[Microcontroller]
STM32F4 study notes 1——How to use DSP library
Some problems caused by STM32F401 USB VBUS settings
When debugging the code on the development board, PA9 on the development board is a floating input. When mounting the chip, our board uses this pin and sets it to GPIO_MODE_OUTPUT_PP. The problem that finally caused was that USB could not communicate properly. Finally, I checked the manual and saw the following d
[Microcontroller]
Some problems caused by STM32F401 USB VBUS settings
STM32F4 (Using SysTick to accurately measure the program running time)
In the actual project development process, we often need to get the running time of a section of code. The usual method is to use an oscilloscope to measure it. This blog post will use SysTick to accurately measure the program running time. The core timer SysTick of STM32F4 is a 24-bit timer, and you need to pay atten
[Microcontroller]
STM32F4 GPIO breathing light
Some characteristics of GPIO, translated from ST's reference manual 1. 16 groups of IO available 2. Push-pull/open-drain + pull-up/pull-down 3. Data can be output from ODR or external devices 4. Each IO speed can be set independently 5. Floating input, pull-up and pull-down input, analog input 6. Input data to IDR or
[Microcontroller]
Several methods of drawing and filling circles on LCD using stm32f4
Let's talk about drawing a circle first. According to the symmetry of the circle, divide the circle into 8 equal parts. Find one of them, and the others can be obtained through coordinate transformation. You can search Baidu for the method of drawing a circle with a midpoint to get the process. program: void LCD_Draw_
[Microcontroller]
Several methods of drawing and filling circles on LCD using stm32f4
Summary of contact with STM32F407 chip
       Today I started to work on the STM32F4 board. The core chip of the board is STM32F407, which is the core of Contex M4. Compared with the STM32F1 I have used before, it is much more powerful and easier to use in design. Let me first introduce today's results.       Today I read the RCC and GPIO parts of the data
[Microcontroller]
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号