STM32L4xx_HAL_Driver  1.14.0
stm32l4xx_hal_rcc.c File Reference

RCC HAL module driver. This file provides firmware functions to manage the following functionalities of the Reset and Clock Control (RCC) peripheral: More...

Go to the source code of this file.

Functions

static HAL_StatusTypeDef RCC_SetFlashLatencyFromMSIRange (uint32_t msirange)
 Update number of Flash wait states in line with MSI range and current voltage range. More...
 
static uint32_t RCC_GetSysClockFreqFromPLLSource (void)
 Compute SYSCLK frequency based on PLL SYSCLK source. More...
 
HAL_StatusTypeDef HAL_RCC_DeInit (void)
 Reset the RCC clock configuration to the default reset state. More...
 
HAL_StatusTypeDef HAL_RCC_OscConfig (RCC_OscInitTypeDef *RCC_OscInitStruct)
 Initialize the RCC Oscillators according to the specified parameters in the RCC_OscInitTypeDef. More...
 
HAL_StatusTypeDef HAL_RCC_ClockConfig (RCC_ClkInitTypeDef *RCC_ClkInitStruct, uint32_t FLatency)
 Initialize the CPU, AHB and APB busses clocks according to the specified parameters in the RCC_ClkInitStruct. More...
 
void HAL_RCC_MCOConfig (uint32_t RCC_MCOx, uint32_t RCC_MCOSource, uint32_t RCC_MCODiv)
 Select the clock source to output on MCO pin(PA8). More...
 
uint32_t HAL_RCC_GetSysClockFreq (void)
 Return the SYSCLK frequency. More...
 
uint32_t HAL_RCC_GetHCLKFreq (void)
 Return the HCLK frequency. More...
 
uint32_t HAL_RCC_GetPCLK1Freq (void)
 Return the PCLK1 frequency. More...
 
uint32_t HAL_RCC_GetPCLK2Freq (void)
 Return the PCLK2 frequency. More...
 
void HAL_RCC_GetOscConfig (RCC_OscInitTypeDef *RCC_OscInitStruct)
 Configure the RCC_OscInitStruct according to the internal RCC configuration registers. More...
 
void HAL_RCC_GetClockConfig (RCC_ClkInitTypeDef *RCC_ClkInitStruct, uint32_t *pFLatency)
 Configure the RCC_ClkInitStruct according to the internal RCC configuration registers. More...
 
void HAL_RCC_EnableCSS (void)
 Enable the Clock Security System. More...
 
void HAL_RCC_NMI_IRQHandler (void)
 Handle the RCC Clock Security System interrupt request. More...
 
void HAL_RCC_CSSCallback (void)
 RCC Clock Security System interrupt callback. More...
 

Detailed Description

RCC HAL module driver. This file provides firmware functions to manage the following functionalities of the Reset and Clock Control (RCC) peripheral:

Author
MCD Application Team
  • Initialization and de-initialization functions
  • Peripheral Control functions
==============================================================================
                    ##### RCC specific features #####
==============================================================================
  [..]
    After reset the device is running from Multiple Speed Internal oscillator
    (4 MHz) with Flash 0 wait state. Flash prefetch buffer, D-Cache
    and I-Cache are disabled, and all peripherals are off except internal
    SRAM, Flash and JTAG.

    (+) There is no prescaler on High speed (AHBs) and Low speed (APBs) busses:
        all peripherals mapped on these busses are running at MSI speed.
    (+) The clock for all peripherals is switched off, except the SRAM and FLASH.
    (+) All GPIOs are in analog mode, except the JTAG pins which
        are assigned to be used for debug purpose.

  [..]
    Once the device started from reset, the user application has to:
    (+) Configure the clock source to be used to drive the System clock
        (if the application needs higher frequency/performance)
    (+) Configure the System clock frequency and Flash settings
    (+) Configure the AHB and APB busses prescalers
    (+) Enable the clock for the peripheral(s) to be used
    (+) Configure the clock source(s) for peripherals which clocks are not
        derived from the System clock (SAIx, RTC, ADC, USB OTG FS/SDMMC1/RNG)
Attention

© Copyright (c) 2017 STMicroelectronics. All rights reserved.

This software component is licensed by ST under BSD 3-Clause license, the "License"; You may not use this file except in compliance with the License. You may obtain a copy of the License at: opensource.org/licenses/BSD-3-Clause

Definition in file stm32l4xx_hal_rcc.c.