PER Firmware
Loading...
Searching...
No Matches
rcc_priv.c File Reference

G4 RCC private/register level implementation. More...

Include dependency graph for rcc_priv.c:

Functions

void PHAL_RCC_priv_enableHSI (void)
 Enable HSI16 and block until it's ready.
 
void PHAL_RCC_priv_disableHSI (void)
 Disable HSI16 and block until it's off.
 
void PHAL_RCC_priv_enableHSE (void)
 
void PHAL_RCC_priv_setFlashLatency (uint32_t latency_ws)
 
void PHAL_RCC_priv_configurePLL (RCC_PRIV_PLLSource_t src)
 
void PHAL_RCC_priv_enableBoostMode (void)
 
void PHAL_RCC_priv_switchSysclkToHSI (void)
 Switch SYSCLK to HSI16 and block until the switch is confirmed.
 
void PHAL_RCC_priv_switchSysclkToHSE (void)
 Switch SYSCLK to HSE and block until the switch is confirmed.
 
void PHAL_RCC_priv_switchSysclkToPLL (void)
 Switch SYSCLK to the PLL and block until the switch is confirmed.
 
void PHAL_RCC_priv_setBusPrescalersToDiv1 (void)
 Set the AHB, APB1, and APB2 prescalers to divide-by-1 (undivided)
 

Detailed Description

G4 RCC private/register level implementation.

Author
Millan Kumar (kumar.nosp@m.798@.nosp@m.purdu.nosp@m.e.ed.nosp@m.u)

Function Documentation

◆ PHAL_RCC_priv_configurePLL()

void PHAL_RCC_priv_configurePLL ( RCC_PRIV_PLLSource_t src)

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

Here is the caller graph for this function:

◆ PHAL_RCC_priv_disableHSI()

void PHAL_RCC_priv_disableHSI ( void )

Disable HSI16 and block until it's off.

Here is the caller graph for this function:

◆ 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

Here is the caller graph for this function:

◆ 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

Here is the caller graph for this function:

◆ PHAL_RCC_priv_enableHSI()

void PHAL_RCC_priv_enableHSI ( void )

Enable HSI16 and block until it's ready.

Here is the caller graph for this function:

◆ PHAL_RCC_priv_setBusPrescalersToDiv1()

void PHAL_RCC_priv_setBusPrescalersToDiv1 ( void )

Set the AHB, APB1, and APB2 prescalers to divide-by-1 (undivided)

Here is the caller graph for this function:

◆ 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)

Here is the caller graph for this function:

◆ PHAL_RCC_priv_switchSysclkToHSE()

void PHAL_RCC_priv_switchSysclkToHSE ( void )

Switch SYSCLK to HSE and block until the switch is confirmed.

Here is the caller graph for this function:

◆ PHAL_RCC_priv_switchSysclkToHSI()

void PHAL_RCC_priv_switchSysclkToHSI ( void )

Switch SYSCLK to HSI16 and block until the switch is confirmed.

Here is the caller graph for this function:

◆ PHAL_RCC_priv_switchSysclkToPLL()

void PHAL_RCC_priv_switchSysclkToPLL ( void )

Switch SYSCLK to the PLL and block until the switch is confirmed.

Here is the caller graph for this function: