This HTML document primarily contains source code in the fragment section. I'll translate the visible UI elements while keeping all technical content unchanged. Here are the key translations: - "Main Page" → "主页" - "Data Structures" → "数据结构" - "File List" → "文件列表" - "Modules" → "模块" - "Files" → "文件" - "Directories" → "目录" - "Globals" → "全局变量" - "Firmware" → "固件" - "Drivers" → "驱动程序" - "STM32G4xx_HAL_Driver" → "STM32G4xx_HAL驱动程序" - "Inc" → "包含" - "stm32g4xx_ll_rcc.h" → "stm32g4xx_ll_rcc.h" (filename unchanged) The output is the translated HTML: STM32G474xx HAL User Manual: stm32g4xx_ll_rcc.h Source File
STM32G474xx HAL User Manual
stm32g4xx_ll_rcc.h
Go to the documentation of this file.
00001 /**
00002   ******************************************************************************
00003   * @file    stm32g4xx_ll_rcc.h
00004   * @author  MCD Application Team
00005   * @brief   Header file of RCC LL module.
00006   ******************************************************************************
00007   * @attention
00008   *
00009   * Copyright (c) 2019 STMicroelectronics.
00010   * All rights reserved.
00011   *
00012   * This software is licensed under terms that can be found in the LICENSE file in
00013   * the root directory of this software component.
00014   * If no LICENSE file comes with this software, it is provided AS-IS.
00015   ******************************************************************************
00016   */
00017 
00018 /* Define to prevent recursive inclusion -------------------------------------*/
00019 #ifndef STM32G4xx_LL_RCC_H
00020 #define STM32G4xx_LL_RCC_H
00021 
00022 #ifdef __cplusplus
00023 extern "C" {
00024 #endif
00025 
00026 /* Includes ------------------------------------------------------------------*/
00027 #include "stm32g4xx.h"
00028 
00029 /** @addtogroup STM32G4xx_LL_Driver
00030   * @{
00031   */
00032 
00033 /** @defgroup RCC_LL RCC
00034   * @{
00035   */
00036 
00037 /* Private types -------------------------------------------------------------*/
00038 /* Private variables ---------------------------------------------------------*/
00039 /** @defgroup RCC_LL_Private_Variables RCC Private Variables
00040   * @{
00041   */
00042 
00043 /**
00044   * @}
00045   */
00046 
00047 /* Private constants ---------------------------------------------------------*/
00048 /** @defgroup RCC_LL_Private_Constants RCC Private Constants
00049   * @{
00050   */
00051 /* Defines used to perform offsets*/
00052 /* Offset used to access to RCC_CCIPR and RCC_CCIPR2 registers */
00053 #define RCC_OFFSET_CCIPR        0U
00054 #define RCC_OFFSET_CCIPR2       0x14U
00055 
00056 /**
00057   * @}
00058   */
00059 
00060 /* Private macros ------------------------------------------------------------*/
00061 #if defined(USE_FULL_LL_DRIVER)
00062 /** @defgroup RCC_LL_Private_Macros RCC Private Macros
00063   * @{
00064   */
00065 /**
00066   * @}
00067   */
00068 #endif /*USE_FULL_LL_DRIVER*/
00069 
00070 /* Exported types ------------------------------------------------------------*/
00071 #if defined(USE_FULL_LL_DRIVER)
00072 /** @defgroup RCC_LL_Exported_Types RCC Exported Types
00073   * @{
00074   */
00075 
00076 /** @defgroup LL_ES_CLOCK_FREQ Clocks Frequency Structure
00077   * @{
00078   */
00079 
00080 /**
00081   * @brief  RCC Clocks Frequency Structure
00082   */
00083 typedef struct
00084 {
00085   uint32_t SYSCLK_Frequency;        /*!< SYSCLK clock frequency */
00086   uint32_t HCLK_Frequency;          /*!< HCLK clock frequency */
00087   uint32_t PCLK1_Frequency;         /*!< PCLK1 clock frequency */
00088   uint32_t PCLK2_Frequency;         /*!< PCLK2 clock frequency */
00089 } LL_RCC_ClocksTypeDef;
00090 
00091 /**
00092   * @}
00093   */
00094 
00095 /**
00096   * @}
00097   */
00098 #endif /* USE_FULL_LL_DRIVER */
00099 
/* Exported constants --------------------------------------------------------*/
/** @defgroup RCC_LL_Exported_Constants RCC Exported Constants
  * @{
  */

/** @defgroup RCC_LL_EC_OSC_VALUES Oscillator Values adaptation
  * @brief    Defines used to adapt values of different oscillators
  * @note     These values could be modified in the user environment according to
  *           HW set-up.
  * @{
  */
#if !defined  (HSE_VALUE)
#define HSE_VALUE    8000000U   /*!< Value of the HSE oscillator in Hz */
#endif /* HSE_VALUE */

#if !defined  (HSI_VALUE)
#define HSI_VALUE    16000000U  /*!< Value of the HSI oscillator in Hz */
#endif /* HSI_VALUE */

#if !defined  (LSE_VALUE)
#define LSE_VALUE    32768U     /*!< Value of the LSE oscillator in Hz */
#endif /* LSE_VALUE */

#if !defined  (LSI_VALUE)
#define LSI_VALUE    32000U     /*!< Value of the LSI oscillator in Hz */
#endif /* LSI_VALUE */

#if !defined  (HSI48_VALUE)
#define HSI48_VALUE  48000000U  /*!< Value of the HSI48 oscillator in Hz */
#endif /* HSI48_VALUE */

#if !defined  (EXTERNAL_CLOCK_VALUE)
#define EXTERNAL_CLOCK_VALUE    48000U     /*!< Value of the I2S_CKIN, I2S and SAI1 external clock source in Hz */
#endif /* EXTERNAL_CLOCK_VALUE */

/**
  * @}
  */

/** @defgroup RCC_LL_EC_CLEAR_FLAG Clear Flags Defines
  * @brief    Flags defines which can be used with LL_RCC_WriteReg function
  * @{
  */
00143 #define LL_RCC_CICR_LSIRDYC                RCC_CICR_LSIRDYC     /*!< LSI Ready Interrupt Clear */
00144 #define LL_RCC_CICR_LSERDYC                RCC_CICR_LSERDYC     /*!< LSE Ready Interrupt Clear */
00145 #define LL_RCC_CICR_HSIRDYC                RCC_CICR_HSIRDYC     /*!< HSI Ready Interrupt Clear */
00146 #define LL_RCC_CICR_HSERDYC                RCC_CICR_HSERDYC     /*!< HSE Ready Interrupt Clear */
00147 #define LL_RCC_CICR_PLLRDYC                RCC_CICR_PLLRDYC     /*!< PLL Ready Interrupt Clear */
00148 #define LL_RCC_CICR_HSI48RDYC              RCC_CICR_HSI48RDYC   /*!< HSI48 Ready Interrupt Clear */
00149 #define LL_RCC_CICR_LSECSSC                RCC_CICR_LSECSSC     /*!< LSE Clock Security System Interrupt Clear */
00150 #define LL_RCC_CICR_CSSC                   RCC_CICR_CSSC        /*!< Clock Security System Interrupt Clear */
/**
  * @}
  */

/** @defgroup RCC_LL_EC_GET_FLAG Get Flags Defines
  * @brief    Flags defines which can be used with LL_RCC_ReadReg function
  * @{
  */
00159 #define LL_RCC_CIFR_LSIRDYF                RCC_CIFR_LSIRDYF     /*!< LSI Ready Interrupt flag */
00160 #define LL_RCC_CIFR_LSERDYF                RCC_CIFR_LSERDYF     /*!< LSE Ready Interrupt flag */
00161 #define LL_RCC_CIFR_HSIRDYF                RCC_CIFR_HSIRDYF     /*!< HSI Ready Interrupt flag */
00162 #define LL_RCC_CIFR_HSERDYF                RCC_CIFR_HSERDYF     /*!< HSE Ready Interrupt flag */
00163 #define LL_RCC_CIFR_PLLRDYF                RCC_CIFR_PLLRDYF     /*!< PLL Ready Interrupt flag */
00164 #define LL_RCC_CIFR_HSI48RDYF              RCC_CIFR_HSI48RDYF   /*!< HSI48 Ready Interrupt flag */
00165 #define LL_RCC_CIFR_LSECSSF                RCC_CIFR_LSECSSF     /*!< LSE Clock Security System Interrupt flag */
00166 #define LL_RCC_CIFR_CSSF                   RCC_CIFR_CSSF        /*!< Clock Security System Interrupt flag */
00167 #define LL_RCC_CSR_LPWRRSTF                RCC_CSR_LPWRRSTF   /*!< Low-Power reset flag */
00168 #define LL_RCC_CSR_OBLRSTF                 RCC_CSR_OBLRSTF    /*!< OBL reset flag */
00169 #define LL_RCC_CSR_PINRSTF                 RCC_CSR_PINRSTF    /*!< PIN reset flag */
00170 #define LL_RCC_CSR_SFTRSTF                 RCC_CSR_SFTRSTF    /*!< Software Reset flag */
00171 #define LL_RCC_CSR_IWDGRSTF                RCC_CSR_IWDGRSTF   /*!< Independent Watchdog reset flag */
00172 #define LL_RCC_CSR_WWDGRSTF                RCC_CSR_WWDGRSTF   /*!< Window watchdog reset flag */
00173 #define LL_RCC_CSR_BORRSTF                 RCC_CSR_BORRSTF    /*!< BOR reset flag */
/**
  * @}
  */

/** @defgroup RCC_LL_EC_IT IT Defines
  * @brief    IT defines which can be used with LL_RCC_ReadReg and  LL_RCC_WriteReg functions
  * @{
  */
00182 #define LL_RCC_CIER_LSIRDYIE               RCC_CIER_LSIRDYIE      /*!< LSI Ready Interrupt Enable */
00183 #define LL_RCC_CIER_LSERDYIE               RCC_CIER_LSERDYIE      /*!< LSE Ready Interrupt Enable */
00184 #define LL_RCC_CIER_HSIRDYIE               RCC_CIER_HSIRDYIE      /*!< HSI Ready Interrupt Enable */
00185 #define LL_RCC_CIER_HSERDYIE               RCC_CIER_HSERDYIE      /*!< HSE Ready Interrupt Enable */
00186