ST STM32F0 Series Application Note

ST STM32F0 Series Application Note

Clock configuration too
Hide thumbs Also See for STM32F0 Series:

Advertisement

Quick Links

Clock configuration tool for STM32F0xx microcontrollers
Introduction
This application note presents the clock system configuration tool for the STM32F0xx
microcontroller family.
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.
The configuration tool is implemented in the "STM32F0xx_Clock_Configuration_VX.Y.Z.xls"
file which is supplied with the STM32F0xx Standard Peripherals Library and can be
downloaded from www.st.com.
This tool supports the following functionalities for the STM32F0xx:
Configuration of the system clock, HCLK source and output frequency
Configuration of the Flash latency (number of wait states depending on the HCLK
frequency)
Setting of the PCLK1, PCLK2, TIMCLK (timer clocks) and I2SCLK frequencies
Generation of a ready-to-use system_stm32f0xx.c file with all the above settings
(STM32F0xx CMSIS Cortex-M0 Device Peripheral Access Layer System Source File)
The STM32F0xx_Clock_Configuration_VX.Y.Z.xls is referred to as "clock tool" throughout
this document.
Before using the clock tool, it is essential to read the STM32F0xx microcontroller reference
manual (RM0091). This application note is not a substitute for the reference manual.
This tool supports only the STM32F0xx devices.
For VX.Y.Z, please refer to the tool version, example V1.0.0
May 2012
Doc ID 022837 Rev 1
AN4055
Application note
1/17
www.st.com

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the STM32F0 Series and is the answer not in the manual?

Questions and answers

Summary of Contents for ST STM32F0 Series

  • Page 1 Flash access mode. The configuration tool is implemented in the “STM32F0xx_Clock_Configuration_VX.Y.Z.xls” file which is supplied with the STM32F0xx Standard Peripherals Library and can be downloaded from www.st.com. This tool supports the following functionalities for the STM32F0xx: ●...
  • Page 2: Table Of Contents

    Contents AN4055 Contents Glossary ........... 5 Getting started .
  • Page 3 AN4055 List of tables List of tables Table 1. Definition of terms ............5 Table 2.
  • Page 4 List of figures AN4055 List of figures Figure 1. Clock scheme ............8 Figure 2.
  • Page 5: Glossary

    AN4055 Glossary Glossary Table 1. Definition of terms Term Description HCLK AHB clock PCLK1 APB1 clock PCLK2 APB2 clock TIMCLK Timer clock Cortex-M0 clock Ext.Clock External clock Power supply High-speed internal clock High-speed external clock MCLK Master clock Integrated interchip sound Sampling frequency I2SCLK I2S clock...
  • Page 6: Getting Started

    Before starting to use the clock tool, make sure that Microsoft Office is installed on your machine and then follow these steps: ● Download the latest version of the clock tool for the STM32F0xx product from www.st.com. ® ● Enable macros and ActiveX controls: ®...
  • Page 7: Hardware Requirements

    AN4055 Getting started Hardware requirements 2.2.1 Introduction The clock tool is designed to configure the system clocks and generate the system_stm32f0xx.c file for STM32F0xx microcontrollers. The system_stm32f0xx.c file is provided as a template system clock configuration file which can be easily modified to select the corresponding system clock frequency and to configure the Flash latency.
  • Page 8: Figure 1. Clock Scheme

    Getting started AN4055 Figure 1. Clock scheme 8/17 Doc ID 022837 Rev 1...
  • Page 9: I2S Clock Generator

    AN4055 Getting started 2.2.3 I2S clock generator This section describes the I2S clock generator. It is dependent on: ● Master clock MCLK (enable or disable) ● Frame width ● I2S peripheral clock (I2SCLK). Figure 2. I2S clock generator architecture I2SxCLK 8-bit linear Div2...
  • Page 10: Tutorials

    Tutorials AN4055 Tutorials This section describes how to use the clock tool to configure all system clocks and generate the system_stm32f0xx.c file. Two modes are available: Wizard and Expert. The selection is made in the Configuration mode list box. Wizard mode This mode (default mode) guides you through a series of steps to obtain the desired clock system configuration quickly and easily.
  • Page 11: Figure 4. Select The Clock Source

    AN4055 Tutorials Note: In this product PCLK1 and PCLK2 share the some clock signal, so APB1 prescaler should always equal APB2 prescaler. If the I2S clock is needed, select the frame width (16 or 32 bits). Specify if the master clock is enabled or disabled (Select ON/OFF from the list box). Select the Frequency from the list box.
  • Page 12: Expert Mode

    Tutorials AN4055 Expert mode This mode provides more flexibility regarding the configuration setup but the user must ensure that the configuration is correct. Figure 6. Expert mode user interface The ‘View’ button permits the .xls file to be viewed in full screen, to be activated or deactivated.
  • Page 13: Figure 7. System Clock Frequency Is Exceeded

    AN4055 Tutorials Configure the SYSCLK frequency. If the HSE is used in your application, set its frequency to between 4 MHz and 32 MHz (set it to 32 MHz if a crystal oscillator is used for the STM32F0xx. If the frequency entered is out of range, an error message is displayed. A valid frequency must be entered.
  • Page 14: Known Limitations

    Known limitations AN4055 Known limitations This section describes the known limitations of the clock configuration tool. This tool does not support configurations that use the HSE external clock source (HSE bypass). 14/17 Doc ID 022837 Rev 1...
  • Page 15: Conclusion

    AN4055 Conclusion Conclusion This application note provides a description of how to use the clock tool with the STM32F0xx microcontroller devices. This tool generates a source code file system_stm32f0xx.c to configure the clock system of the STM32F0xx. It can be accessed from either of the two configuration modes: ●...
  • Page 16: Revision History

    Revision history AN4055 Revision history Table 2. Document revision history Date Revision Changes 03-May-2012 Initial release 16/17 Doc ID 022837 Rev 1...
  • Page 17 No license, express or implied, by estoppel or otherwise, to any intellectual property rights is granted under this document. If any part of this document refers to any third party products or services it shall not be deemed a license grant by ST for the use of such third party products or services, or any intellectual property contained therein or considered as a warranty covering the use in any manner whatsoever of such third party products or services or any intellectual property contained therein.

Table of Contents