Stm32f4 clock configuration. STM32F4 PLL I2S node binding: Takes same input as Main PLL.

Stm32f4 clock configuration xls. Unpack RCC CLK/PLL settings to get understanding of what chip thinks it's doing. c automatically. I have programmed it to blink an LED every second, except it seems to be blinking every 3 seconds. Contribute to remidebord/STM32F4 development by creating an account on GitHub. c'' file from the STM32 standard peripheral library. Step 3. The configuration tool is implemented in th e "STM32F4xx_Clock_Conf stm32f4 clock configuration won't enable bits in PWR register. C. h Default STM32F4 clock configuration for 100MHz boards. Or maybe I am misunderstanding the code, visibility into the library code was not provided. Then set the HCLK frequency to 168 MHz. 2 // Waste some tome On Clock speeds is a great tutorial how to do it with ST’s excel clock configuration tool, STM32F4 Main PLL node binding: Takes one of clk_hse or clk_hsi as input clock, with an input frequency from 1 to 2 MHz. Moderators: barthess, RoccoMarco. HSE. file cfg_clock_default_120. 1. to synchronise several To conclude this post, I would say that the clock configuration in the STM32CubeMx framework is a very clear process, because it has a very user friendly interface 🙂 Thank you for your attention! For example from STM32F4 reference manual: "In this mode, an external clock source must be provided. M. Why this fault is not fixed in the CubeMX 4. heiko Posts: 2 Joined: Sat Jun 28, 2014 7:00 pm. The configuration bits for which clock should be taken for the MCO are in the Clock configuration register (RCC_CFGR) at position [27:24] (at least for STM32f0 series). I. what's the clock frequency? In the following I assume the value 64 from the given appnote. I do see that the system clock is using HSI and not PLLCLK. wovano. Microcontroller clock output does something else. Step 2. 85. STM32F4 has capability to output different clocks on specific 2 pins. Before using the clock tool, it is essential to read the STM32F4xx microcontroller Clock configuration Now that we have a basic build system and easy access to all core and peripheral registers, let us set up the MCU for maximum performance by increasing the system clock frequency to its From the STM32F4 reference manual the clock tree looks something as follows: It's obvious that there are a lot of options to choose from. – 0_____ Commented Mar 26, 2018 at 19:59 STM32F4 Timers - Calculation of Period and Prescale, to generate 1 ms delay. If it is changed, baudrate is changed and will not be the same as before. Firstly start HSE, wait HSE ready flag, etc. Follow edited May 7, 2022 at 9:12. Clock To calculate the multiply and division factor value, we can use tool that provided from ST Microelectronics called Clock Configuration Tool. PLLM factor and PLL source are common with Main PLL 1 output clocks supported, the frequency can be computed with the following formula: f(PLL_R) = f(VCO clock) / PLLR --> PLLI2S with f(VCO clock) = f(PLL clock input) × (PLLNI2S / PLLM) changed define OS_CLOCK in file RTX_Conf_STM32F4. Part two will discuss additional features and terms. On STM32L4, most peripherals can select various clock sources which enables them to be decorellated to the core's clock frequency, which then can be "dynamically changed in frequency. STM32F4 clock configuration. 23 4 4 bronze badges. Software delay vs HAL Delay The problem is while configuring Real Time clock I have to set the secondary clock LSE as the RTC Clock source, which in my case my source clock is HSI. Initializes the CPU, AHB and APB buses clocks. To be able to achieve 84 MHz on the STM32F4, the regulator voltage scaling output must be set Posted on April 05, 2013 at 01:23 Hi every one Why i couldn't find any this file ? STM32F4xx_Clock_Configuration_VX. 000000. I am trying to change the system clock on my STM32F410RB Speed of your device depends on PLL settings or clock source you have selected for system core clock. 2. Hardware overview a. 9? In order to check the clock configuration, Ifollow the progresses. I have read in the datasheet PLL section that jitter shouldn't be more than 15ps RMS but I am With the STM32F4 I used the clock configuration tool to generate the system_stm32xxx. Skip to content. overbite8934. 0 STM32F407 HCLK AHB clock PCLK1 APB1 clock PCLK2 APB2 clock TIMCLK Timer clock FCPU Cortex-M4 clock Ext. Resources The Clock of STM32F4 Corrado Santoro ARSLAB - Autonomous and Robotic Systems Laboratory Dipartimento di Matematica e Informatica - Universita di Catania, Italy` santoro@dmi. Load 7 more related questions Show fewer related questions A real-time clock (RTC) is a computer clock that tracks the current time. I tried to change the clock configuration of the projet on the F7, with the same sources, prescaler value than on the F4 but it didn't improve the situation. Note As the RTC clock configuration bits are in the Backup domain and write access is denied to this domain after reset, you have to enable write access using the Power Backup Access macro before to configure the RTC clock source (to be done once after reset). The diagram shows four clocks, two internal LSI and HSI, and two external HSE and LSE. Clock source e. Leds are connected to pins PD12 to PD15, what give us timer TIM4 with Output I used several STM32F4 chips before and generated the system_stm32f4xx. Start with printing AHB, APB1, APB2 clocks STM32CubeIde device configuration: Clock configuration of STM32F4 black pill. Macros to configure the RTC clock (RTCCLK). Course Corrado Santoro The Clock of STM32F4. Generating system clock configuration for STM32F103C8 with CubeMX. Nucleo STM32f103RB/F4 Discovery. And I was find this paragraph in RM about PLL configuration. 2 posts • Page 1 of 1. GPIO peripheral a. 8. Best Regards, Martin Guenther. I prefer the PTP clock to the RTC as it offers a 32-bit subsecond (rather than the 16 bits the RTC provides) and 32-bit seconds (rather The address of the RCC clock configuration register is the base address of the RCC clock register plus the offset of the RCC clock configuration register, which is 0x08 We then clear bits 21 and 22 in order to output a HSI clock signal from About. Generating system clock configuration for On the STM32F4, the HSI oscillator has a clock speed of 16 MHz. When starting up the STM32F4-Discovery board (bare metal), it will not be configured to run at full potential. Mark as New; Bookmark; Subscribe; Mute; Subscribe to RSS Feed; Permalink; Print; Email to a Friend; Report Inappropriate Content ‎2024-07-15 10:27 PM - edited ‎2024-07-15 10:29 PM. Ask Question Asked 7 years, 9 months ago. You need to take of it in clock configuration. 0 Generating system clock configuration for STM32F103C8 with CubeMX. The board uses an external 16MHz oszillator and I would like to use ''PLLSAIP'' for the 48MHz USB clock. Reference: RM0090 STM32F4xx Reference Manual (Doc ID 018909 Rev 1) p. Now, with a 16MHz HSE, and the settings in the clock configuration tool set for a 16MHz HSE, the tool generates a system_stm32f4xx. 8 V to 3. Additionally, one must take care as not all clock configuration options are To calculate the multiply and division factor value, we can use tool that provided from ST Microelectronics called Clock Configuration Tool. So in this post we will try to configure the MCU to run at 168MHz, which is what the STMF32F407 should be capable of. Clock External clock VDD Power supply HSI High-speed internal clock HSE High-speed external clock MCLK Master clock I2S Integrated interchip sound Fs Sampling frequency I2SCLK I2S clock Disabling the HSE/LSE clock configuration in STM32CubeMX Step 1. by tilz0R · Published April 11, 2014 · Updated May 26, 2015. Functions and enumerations. Associate II Options. c file that comes In "clock configuration" tab, select clock source for USART and desired output frequency (see image where I select sysclock at 48MHz) In "configuration" tab, select the USART and the USART config window will be I want to develop my own PCB using STM32F4. com/playlist?list=PLnMKNibPkDnGtuIl5v0CvC81Am7SKpj02 I'd like to use the PTP clock peripheral in my STM32F427 for timekeeping - but without using the rest of the ethernet functionality, or dedicating any pins to it. Power supply b. But before analyzing that diagram, we are Library 03- STM32F4 system clock and delay functions. Dynamic power dissipation of CMOS logic is proportional to the The HSE button is, of course, grayed out. You select this mode by setting the HSEBYP and HSEON bits in the STM32F4 clock configuration using register programming Go to solution. Fig. the You can read a document "Using the STM32F4 hardware real-time clock (RTC)" (written by me, in ukrainian), which describes the configuration steps for the STM32F401 hardware RTC module with the appropriate code examples in CMSIS. GPIO overview b. Navigation Menu Toggle navigation. Configure Flash prefetch, Instruction cache, Data cache. Launch your project’s . Hot Network Questions Is online job converting crypto to cash a scam? Latex code for tabular method of convolution Reference When you change clock, you will have to reinit all of your used peripherals again. 0. HSE -> "E" refers for external clock. 00 KB. I know the external clock on my board is 12 MHz (it is printed on the can) and my clock configuration code to run at 168 MHz is therefore: But this one just trying for right clock configuration. h Default STM32F4 clock configuration for 180MHz boards. The purpose of this tool is to help the user configure the microcontroller clocks, taking into consideration product parameters such as power supply and Flash access mode. > When I select HSI as PLL clock source on "Clock Configuration" it gives me an error, I don't see any errors shown in your screenshot. Configuration of the on-chip real time clock peripheral on the stm32f4 board using cubeMX and register-level programming. Viewed 2k times 0 . I am trying to change the system clock on my STM32F410RB This tutorial will cover Clock setup, Timer Setup for Delay, and GPIO configuration for STM32 F103 using the Register based programming. system_stm32f4xx. 18 And in STM32Cubemx, when selecting SMT32F401RE Nucleo board, in 'Clock Configuration' tab, it's not possible for choosing the HSE clock, only HSI clock available. Speed of your device depends on PLL settings or clock source you have selected for system core clock. Additionally, one must take care as not all clock configuration options are compatible. STM32F446 on board temperature sensors,the timer configuration problem. Clock configuration seems to be a concept surrounded Posted on April 12, 2018 at 02:23. It can be connected to an external pin, to output the clock signal for using it outside the MCU, e. Resulting SWO clock was 2. Reference: STM32F40x Datasheet (Doc ID 022152 Rev 3) p. c file contains functions to set the SysClock like ''SetSysClockTo36'' I thought the clock configuration should work by just setting the define to I also use the clock configuration - and just take the multipliers and dividers from the screen. HOME; STM32. 1 System clock configuration and management The clock controller in STM32F4 provides a high degree of flexibility with various clock sources (external crystal HSE, internal oscillator HSI, phase-locked loop PLL, internal oscillator LSI, external oscillator LSE), which are used to run the core and peripherals. The SystemClock_Config API here had function call for Peripheral Clock configuration and initialization as shown below. However, I cannot set the right clock frequency. The Clock Configuration tool and the associated guide can be STM32F4 clock configuration using register programming Go to solution. GPIO registers 2. RCC registers c. In most cases system core clock’s source is PLL output. 5 too large. I am using an STM32F446ZE Nucleo Board which does NOT have an external HSE clock. Enter the HSE frequency which the value is 8 MHz, because the STM32F4 Discovery This clock is either the HSI clock at 16 MHz or an external clock (set by crystal or oscillator) for most of the F4 series. The clock configuration programming follows the SystemClock_Config Function (illustrated in Code Block 1) with mentioned steps above. youtube. F103 is a very simple uC. Boot mode selection d. The issue was that PLLM parameter was set to different value than indicated by STM32CubeMX Configure SysTick reload value register (STK_LOAD) Fig. 10 Clock Configuration Target. I wonder where I have to connect the clock: OSCIN32-OSCOUT32 (pins 3 and 4) or OSCIN-OSCOUT (HSE) (pins 5 and 6 in In one of non up to date SM32CubeMX revisions there was an issue with correct code generation for STM32L4 clock configuration. We will be focusing on HSE to get the max possible STM32F4 Target supports highly flexible clock configuration via the use of this STMicroelectronics Clock configuration tool for STM32F4xx controllers. Debug interface 2. e. I am using STM32CubeMX to configure an STM32F4 to output a clock signal using Timer 3, Channel 4 on PC9. 000000MHz. /** System Clock Configuration */ void SystemClock_Config(void) { However, STM32F4-Dicovery show the max speed 168M. They are not able to output the same clocks. In the menu, pinout&cofiguration > system core > rcc open the high speed or low speed clock. All possible SPI’s available on STM32F4; 8- or 16- bit SPI mode; Default SPI configuration Master mode; 8 data bits; prescaler set to divide APBx clock with 32; Clock is low on idle and data sampled at rising edge (SPI Mode 0) first bit is MSB bit; 2 wires full-duplex; SS pin is software configurable; First you need to open your external clock (I assume, you have physically connected your clock to the MCU) There are two types of clocks High Speed and Low Speed. ioc file, and start at the pinout and configuration tab. On the left-hand side navigation bar, expand the system Core tab and select RCC. When I checked its clock tree I found that SDIO clock has options for Sysclk or PLL48CLK source, and PLL48CLK had two options for its source as well. Normally you pick the slowest clock speed on an mcu that your system level design can support. Although the RTCs are often used in personal STM32F3 series, STM32F4 series, STM32F7 series, STM32G0 series, STM32G4 series, STM32H5 series, STM32H7 series, STM32L0 series, STM32L1 series, STM32L4 series, STM32L4+ series, STM32L5 series, STM32U0 series, STM32U5 series, STM32F4 library to configure system clock to PLL 168MHz(Source is HSI Clock) - MCLEANS/STM32F4_SYSTEM_CLOCK_CONFIGURATION STSW-STM32088 - Clock configuration tool for STM32F0xx microcontrollers (AN4055), STSW-STM32088, STMicroelectronics This application note presents the clock system configuration tool (STSW-STM32091) for the STM32F4xx microcontroller family. However, I wanted the PLL clock (168MHz) divided by 4 (42MHz) on MCO1. , I added the following to the end of ''SetSysClock()'': #if defined(STM32F446xx) 1. 6 V. 10. h Default Additionally, the clock tree shows the different clock scaling options. c file contains functions to set the SysClock like ''SetSysClockTo36'' I thought the clock configuration should work by just setting the define to Contribute to remidebord/STM32F4 development by creating an account on GitHub. Which clock source is used for clocking This is the clock configuration in CubeMX: arm; stm32; keil; Share. In while loop we just use . How to set STM32 to generate standard CRC32. It is possible to design an external clock to run with a greater accuracy than the internal HSI clock enabling finer control of the operating parameters of the final circuit. On the parts with DSI (like the STM32F469 and STM32F479) this output is the DSI clock off the main PLL configuration. Power supply (1/2) The operating voltage supply (V DD) range is 1. Because STM32F429 Discovery board does not have leds on PWM pins, I will use STM32F4 Discovery with 168MHz core clock for this example. Non-power-of-2 oversampling is of course possible, but I wouldn't expect it to be supported by a ready-made library, and I don't think you want to develop your own downsampler/filter, especially with such an unusual property (i. I was made what you say. I can surely assume one of the reason you got this nifty little development board is it's computing capability at 168MHz. You can also use these output signals for any user application purpose . STM32F40x Block Diagrams . I've been loosely following this code to get the RCC configuration sequence right to set the main sys clock to 168MHz but with my adaptations. file cfg_clock_default_216. STM32F407 Register Level Clock Configuration Issue. think think. It seems that there is no equivalent tool for the STM32F103? However, as the system_stm32f10x. S. 1 STM32F0 System Clock PLL configuration and/or temperature causing error? 0 stm32f4 clock configuration won't enable bits in PWR register. This is my desired clock configuration: This is the code that I have configuring the clock: To cross-check, I checked out a project around STM32F412 Discovery Board. 0 Generating system clock configuration for STM32F103C8 with CubeMX Generating system clock configuration for STM32F103C8 with CubeMX. But my code already same this paragraph. Hi, The system clock, and all of the peripheral clocks it feeds on the STM32F4 series processors, can be rather intimidating at first. c file for our code where some of the peripherals appear to be running Assembler programming of ARM Cortex-M microcontrollers - Part 4 - Clock configuration. Finally click Run button to get the result. I found my Issue where did came from. Some of the L4 variants have a medium speed internal clock called MSI and some can use the The Clock Configuration tool eases the configuration of the internal and peripheral clocks generating the source code for system_stm32f4xx. Furthermore, the tools used to easily configure the STM32 clock system. Latest . The STM32F4xx_Clock_Configuration_VX. From CubeMX I set the clock input from the HSE and after in the clock configuration I set the system clock to 180MHz. 2 STM32 Output MCO configuration. STM32F4 1. c to 168000000; set the defines STM32F40XX and HSE_VALUE=8000000 in uVision Tab 'Options for Target - Preprocessor Symbols - define; changed Core Cloc in uVision Tab Cortex-M Target Driver Setup - Trace to 168. Download. 15. Clock Sources. To get proper Configuration steps are as follows: Configure the main internal regulator output voltage. Modified 7 years, 5 months ago. There are three clock configuration options as shown below: Main header for STM32F2/F4/F7 clock configuration. In this article, you are introduced to the basics of the STM32 clock system. You can select on other options and PLL I tried again with a STM32F4 on a Nucleo F446ZE and indeed, the frequency of I2C is sharp on the desired value. Post by heiko » Fri Mar 11, 2016 4:19 pm . Also, if you're using the system_stm32f4xx. 2 Changing clock frequency on STM32 without impacting peripherals? 0 STM32F407 Register Level Clock Configuration Issue. 1. Dynamic power dissipation of CMOS logic is proportional to the When the PLL is running at the required speed, you should set the System clock switch (RCC_CFGR_SW) to PLL instead of the Microcontroller clock output to have your system run on the PLL clock. . From the STM32F4 reference manual the clock tree looks something as follows: It's obvious that there are a lot of options to choose from. Measure internal clock nodes via MCO / PA8 pin, route signals there to scope. I've recently purchased a NUCLEO-F446RE board (an STM32F4 product) and I'm having major problems enabling bits in the PWR register. Is my clock configuration correct? 1. g. c for our code where all the peripheral clocks were correct. Open the clock configuration tool using excel and change HCLK to 168 MHz. ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers. h configuration example 162381 downloads 0. If you do not already have Git installed, go ahead and download Git for Windows. STM32 and Clocks The STM32 has an internal clock circuit that has the objective of generating and distributing Hi, I'm trying my hand at bare metal programming on the F4 Discovery board. I was adjust PLLM,N,Q and then I start PLL. My transmitted data appears as garbage when received at 115,200 and if I attach a Saleae logic probe to the Tx pin it measures the emitted baud rate at 172,890 bits/s, so a factor of 1. We split the article into two parts. 43 SysTick reload value register (STK_LOAD) (Source: [[STM32_PM0056], page 152]) Configuration Target We will configure the clock based on Fig. h Default STM32F2/4/7 clock configuration for 120MHz boards. But once you get to know it, you may find as I did that it is pretty straight forward. The clock configuration from STM32CubeMX can be seen below: To configure the clock, I modified the ''system_stm32f4xx. Is this a problem with STM32CubeMX? Is there actually an invalid clock configuration? Is the generated code safe to use? #stm32f4-discovery #usb #stmcubemx With the STM32F4 I used the clock configuration tool to generate the system_stm32xxx. STM32F4 PLL I2S node binding: Takes same input as Main PLL. If you want 2MHz, adjust SYSCLK and SPI prescaler to a better configuration, if available. c file. 2 pins are used to output different frequencies. RCC registers 3. c and stm32f4xx. it L. Here is the code I tried --> I used the code linked in my original question (below), made into a function with the right settings for 144MHz and 168MHz, and I tried switching hundreds of times between the 2 clock speeds, doing ADC conversions (6 channels, triple mode, 8192 samples per channel) with 144MHz MHz clock (and 36MHz ADC clock), then switching to 168MHz and running cross An external *clock source* would want to be using HSE BYPASS mode. On the STM32F4, why does setting the main clock source as the PLL corrupt the rest of the program? 0. How to verify the clock validity ? Using Hardware: You can probe MCO and LSCO pins for verification during board bring up. PB14] as Input Pins However, this still generate the wrong clock configuration code. C++ mbed like library for STM32F407. It generates the code but I get warnings about an invalid clock configuration. Unfortunately, I did not find a version for the STM32F3. asked Apr 26, 2022 at 8:51. To make this easier, we can use CubeMX. As there are multiple clock configuration options , So the GUI based tool STM32CubeMX is the best option to configure and generate required code. defines. STM32F407 Register Level Clock STM32F4 library to configure system clock to PLL 168MHz(Source is HSI Clock) - MCLEANS/STM32F4_SYSTEM_CLOCK_CONFIGURATION I used several STM32F4 chips before and generated the system_stm32f4xx. Thanks. Y. 16. STM32 clock tree b. This two are used for peripheral clock configuration. STM32F4 Discovery the system clock configuration. You'll need to select PLLCLK Fig 1: Clock configuration flow diagram. PLLM factor is used to set the input clock in this acceptable range. I'm able to see 16MHz on MCO1 (PA8). The modified standard peripheral library code for third party dev kit 16kHz? What's your oversampling, i. Check definition of HSE-VALUE, typically in stm32fxxx_hal_conf,h. You are able to output clocks in original frequency (no prescaler) and also with prescaler values 2, 3, 4 and 5. This settings will config an 16MHz frequency to the SYSCLK. Clock configuration a. xls please tell me where stm32f4 clock configuration won't enable bits in PWR register. I would use the new HAL with the Cube tool but unfortunately we are using the IDE Tasking that is not supported by the tool (Would be great if Tasking would be supported in the future). The device also has secondary clocks to drive the built-in RTC, but it is out of scope for this article. Rest of the steps which includes enable PWR controller, enable rtc domain access, rtc clock source, rtc_init(), then settime and gettime, are alright as per I know. STM32F401RE Nucleo board, cannot toggle user LED. My goal is to blink an LED using the timer and I'm trying to configure the The peripherals of the STM32F4 are covered in the STM32F4 CMSIS Device component made available by STMicroelectronics. To get proper value, you check ALWAYS first these settings when I am trying to program an STM32F4 discovery board using Vscode, Platformio and CMSIS. file cfg_clock_default_180. For example, USART’s baudrate settings depends on APB clock. Using PLL to generate clock signal superior to 400Mhz on MAX10 FPGA. I want to use one external clock (16 MHz). stm32f4 clock configuration won't enable bits in PWR register. Z. F7's clock tree is much more complicated and this clock tool helps a lot. In the middle panel (RCC mode and configuration), under Mode next to High Speed clock (HSE) and Low Speed clock I think on F429 SPI clock source is only SYSCLK with power of 2 prescaler. You can output: MCO1 HSI: High Speed Internal oscillator, 16MHz RC HSE: High Speed External Go To The Clock Configuration & Set The System Clock To 72MHz; Configuration for the RTC Mode: In the Categories tab, (Activate Clock source calendar) In Parameter Settings Enbale auto Predivider Calculation & Asynchronous Predevider value Configuration for the GPIO Mode: Configure The GPIO Pins [PB12 . Timer initialization. Automate any workflow Packages STM32F4xx_Clock_Configuration_V1. c file with the STM32F4 Clock Configuration Tool. #external-clock #stm32f401-nucleo #stm32f4 #stm32 Last step in clock init is selecting the PLL as the clock source, not in the middle. But I said nothing about system clock speed. STM32 RTC Timeout during initialization. Improve this question. In first tutorial about discovery board we were blinking led. Hot STM32F4 Discovery the system clock configuration. Let us go ahead and add the CMSIS Core(M) component and the STM32F4 Device component to our project by cloning the Git repositories. 0. This document will also be very useful for reading. The real-time clock (RTC), backup STM32F4xx Clock Tree . xls is referred to as “clock tool” throughout this document. unict. All possible SPI’s available on STM32F4; 8- or 16- bit SPI mode; Default SPI configuration Master mode; 8 data bits; prescaler set to divide APBx clock with 32; Clock is low on idle and data sampled at rising edge (SPI Mode 0) first bit is MSB bit; 2 wires full-duplex; SS pin is software configurable; STM32H755: Wrong RCC clock auto configuration in STM32CubeMX (MCUs) 2025-01-01; CubeIDE how to configure USB HS with internal FS Phy for DMA transfer on STM32F4 in STM32 MCUs Products 2024-12-30; Systick configuration, STM32F4 Disc, FreeRTOS in STM32CubeMX (MCUs) 2024-12-30 STM32F4 Discovery: Clock frequency March 23, 2019 So you have got an STM32F4 discovery board in your hands. 5,043 5 5 gold badges 28 28 silver badges 54 54 bronze badges. REGISTER based Tutorials This part is very simple in BluePill With the 8MHz clock, the clock configuration tool produced a system_stm32f4xx. Initializes the RCC Oscillators. file cfg_clock_default_100. The Clock Configuration tool eases the configuration of the This two are used for peripheral clock configuration. * Clock speed depends on which STM32F4xx device is used. Before we can use PWM, we have to initialize timer. This lecture is part of the MOOC - STM32CubeMX and STM32Cube HAL basics https://www. Can't say with 100% certainty whether that's the problem, but after enabling the HSE using RCC_HSEConfig(), you should call RCC_WaitForHSEStartUp() since it takes a while for the HSE to start oscillating, and check the return code to make sure the call was successful and the HSE actually initialized. h files need changes for stm32f4 clock configuration won't enable bits in PWR register. Reset circuit c. Any example on how to use external clock source would be great for me. 3. The STM32 can operate using an external clock circuit. Sign in Product Actions. 2. Why is the PLL not locking? Is my clock configuration correct? 0. Enter the HSE frequency which the value is 8 MHz, because the STM32F4 Discovery board use 8 MHz external crystal.