HAL library 01- RCC for STM32Fxxx

This is first description for libraries in HAL section for STM32F4 and F7 lines using HAL drivers provided from ST for each section.

RCC (Reset and Clock Control) library is needed to set up clocks for running STM devices at high speed.

It sets up PLL parameters provided from user and enables internal or external high speed clock.

Library

Read more about new HAL libraries

Features

  • Works on STM32F0xx, STM32F4xx and STM32F7xx series
  • Enables HSE or HSI oscillator
  • Sets PLL parameters for high speed clock provided from user
  • Sets over-drive mode for devices where needed to achieve 180+ MHz clock
  • Enables Instruction and Data Cache for STM32F7xx lines

Dependencies

  • HAL
    • RCC
  • TM
    • STM32Fxxx HAL
    • defines.h

Required input parameters

In order to get library properly to work, you have to specify some parameters according to your board/settings you use in project. These settings are:

  • PLL parameters and
  • HSI or HSE clock which is used in your application

To specify parameters, I recommend you use defines.h file where you can put all your defines which are used in my libraries:

Example settings above can be used for STM32F429-Discovery board or any board which works on 180MHz clock and uses external 8MHz oscillator.

When running my examples in Keil uVision, you won’t see these settings in defines.h file. I’ve setup settings in Options for Target using global defines for each target!

Functions and enumerations

Example

There is no example for this library, because this library should be used in all project you use. This is main library and is important to set-up clock for your system.

tilz0R

Owner of this site. Application engineer, currently employed by STMicroelectronics. Exploring latest technologies and owner of different libraries posted on Github.

You may also like...