G4 RCC private/register level implementation.
More...
#include <stdint.h>
#include "stm32g474xx.h"
#include "common/phal_G4/rcc/rcc.h"
Go to the source code of this file.
G4 RCC private/register level implementation.
- Author
- Millan Kumar (kumar.nosp@m.798@.nosp@m.purdu.nosp@m.e.ed.nosp@m.u)
◆ RCC_PRIV_PLLSource_t
Oscillator source for RCC->PLLCFGR. Either HSI or HSE.
| Enumerator |
|---|
| RCC_PRIV_PLL_SRC_HSI | |
| RCC_PRIV_PLL_SRC_HSE | |
◆ PHAL_RCC_priv_configurePLL()
Configure and lock the PLL for RCC_PRIV_PLL_OUTPUT_HZ from the given source. Does not touch SYSCLK. PLL runs, unselected, until PHAL_RCC_priv_switchSysclkToPLL
◆ PHAL_RCC_priv_disableHSI()
| void PHAL_RCC_priv_disableHSI |
( |
void | | ) |
|
Disable HSI16 and block until it's off.
◆ PHAL_RCC_priv_enableBoostMode()
| void PHAL_RCC_priv_enableBoostMode |
( |
void | | ) |
|
Enable Range 1 boost mode, required before SYSCLK can exceed 150 MHz Call after the PLL is locked and before switching SYSCLK to it
◆ PHAL_RCC_priv_enableHSE()
| void PHAL_RCC_priv_enableHSE |
( |
void | | ) |
|
Enable HSE in bypass mode (this board feeds it an external 16 MHz signal directly, not a crystal) and block until it's ready
◆ PHAL_RCC_priv_enableHSI()
| void PHAL_RCC_priv_enableHSI |
( |
void | | ) |
|
Enable HSI16 and block until it's ready.
◆ PHAL_RCC_priv_setBusPrescalersToDiv1()
| void PHAL_RCC_priv_setBusPrescalersToDiv1 |
( |
void | | ) |
|
Set the AHB, APB1, and APB2 prescalers to divide-by-1 (undivided)
◆ PHAL_RCC_priv_setFlashLatency()
| void PHAL_RCC_priv_setFlashLatency |
( |
uint32_t | latency_ws | ) |
|
Set the flash wait states for the upcoming HCLK rate Safe to call before increasing the clock (more wait states than currently needed is fine)
◆ PHAL_RCC_priv_switchSysclkToHSE()
| void PHAL_RCC_priv_switchSysclkToHSE |
( |
void | | ) |
|
Switch SYSCLK to HSE and block until the switch is confirmed.
◆ PHAL_RCC_priv_switchSysclkToHSI()
| void PHAL_RCC_priv_switchSysclkToHSI |
( |
void | | ) |
|
Switch SYSCLK to HSI16 and block until the switch is confirmed.
◆ PHAL_RCC_priv_switchSysclkToPLL()
| void PHAL_RCC_priv_switchSysclkToPLL |
( |
void | | ) |
|
Switch SYSCLK to the PLL and block until the switch is confirmed.
◆ RCC_PRIV_HSE_CLOCK_RATE_HZ
| uint32_t RCC_PRIV_HSE_CLOCK_RATE_HZ = 16'000'000U |
|
staticconstexpr |
◆ RCC_PRIV_HSI_CLOCK_RATE_HZ
| uint32_t RCC_PRIV_HSI_CLOCK_RATE_HZ = 16'000'000U |
|
staticconstexpr |
◆ RCC_PRIV_PLL_M
| uint32_t RCC_PRIV_PLL_M = 4U |
|
staticconstexpr |
◆ RCC_PRIV_PLL_N
| uint32_t RCC_PRIV_PLL_N = 85U |
|
staticconstexpr |
◆ RCC_PRIV_PLL_OUTPUT_HZ
◆ RCC_PRIV_PLL_R
| uint32_t RCC_PRIV_PLL_R = 2U |
|
staticconstexpr |
◆ RCC_PRIV_PLL_VCO_INPUT_HZ
◆ RCC_PRIV_PLL_VCO_OUTPUT_HZ