ISSDK  1.8
IoT Sensing Software Development Kit
Macros | Functions | Variables
clock_config.c File Reference
#include "fsl_smc.h"
#include "clock_config.h"
Include dependency graph for clock_config.c:

Go to the source code of this file.

Macros

#define MCG_PLL_DISABLE   0U
 
#define OSC_CAP0P   0U
 
#define OSC_ER_CLK_DISABLE   0U
 
#define SIM_OSC32KSEL_LPO_CLK   3U
 
#define SIM_PLLFLLSEL_MCGFLLCLK_CLK   0U
 
#define SIM_PLLFLLSEL_MCGPLLCLK_CLK   1U
 

Functions

void BOARD_BootClockRUN (void)
 This function executes configuration of clocks. More...
 
void BOARD_BootClockVLPR (void)
 This function executes configuration of clocks. More...
 

Variables

uint32_t SystemCoreClock
 
const mcg_config_t mcgConfig_BOARD_BootClockRUN
 MCG set for BOARD_BootClockRUN configuration. More...
 
const sim_clock_config_t simConfig_BOARD_BootClockRUN
 SIM module set for BOARD_BootClockRUN configuration. More...
 
const osc_config_t oscConfig_BOARD_BootClockRUN
 OSC set for BOARD_BootClockRUN configuration. More...
 
const mcg_config_t mcgConfig_BOARD_BootClockVLPR
 MCG set for BOARD_BootClockVLPR configuration. More...
 
const sim_clock_config_t simConfig_BOARD_BootClockVLPR
 SIM module set for BOARD_BootClockVLPR configuration. More...
 
const osc_config_t oscConfig_BOARD_BootClockVLPR
 OSC set for BOARD_BootClockVLPR configuration. More...
 

Macro Definition Documentation

◆ MCG_PLL_DISABLE

#define MCG_PLL_DISABLE   0U

MCGPLLCLK disabled

Definition at line 53 of file clock_config.c.

◆ OSC_CAP0P

#define OSC_CAP0P   0U

Oscillator 0pF capacitor load

Definition at line 54 of file clock_config.c.

◆ OSC_ER_CLK_DISABLE

#define OSC_ER_CLK_DISABLE   0U

Disable external reference clock

Definition at line 55 of file clock_config.c.

◆ SIM_OSC32KSEL_LPO_CLK

#define SIM_OSC32KSEL_LPO_CLK   3U

OSC32KSEL select: LPO clock

Definition at line 56 of file clock_config.c.

◆ SIM_PLLFLLSEL_MCGFLLCLK_CLK

#define SIM_PLLFLLSEL_MCGFLLCLK_CLK   0U

PLLFLL select: MCGFLLCLK clock

Definition at line 57 of file clock_config.c.

◆ SIM_PLLFLLSEL_MCGPLLCLK_CLK

#define SIM_PLLFLLSEL_MCGPLLCLK_CLK   1U

PLLFLL select: MCGPLLCLK clock

Definition at line 58 of file clock_config.c.

Function Documentation

◆ BOARD_BootClockRUN()

void BOARD_BootClockRUN ( void  )

This function executes configuration of clocks.

Definition at line 161 of file clock_config.c.

References oscConfig_BOARD_BootClockRUN.

◆ BOARD_BootClockVLPR()

void BOARD_BootClockVLPR ( void  )

This function executes configuration of clocks.

Definition at line 254 of file clock_config.c.

References BOARD_BOOTCLOCKVLPR_CORE_CLOCK, mcgConfig_BOARD_BootClockVLPR, simConfig_BOARD_BootClockVLPR, SMC, SMC_SetPowerModeVlpr(), and SystemCoreClock.

Here is the call graph for this function:

Variable Documentation

◆ mcgConfig_BOARD_BootClockRUN

const mcg_config_t mcgConfig_BOARD_BootClockRUN
Initial value:
=
{
.mcgMode = kMCG_ModePEE,
.irclkEnableMode = kMCG_IrclkEnable,
.ircs = kMCG_IrcSlow,
.fcrdiv = 0x0U,
.frdiv = 0x0U,
.drs = kMCG_DrsLow,
.dmx32 = kMCG_Dmx32Default,
.pll0Config =
{
.enableMode = MCG_PLL_DISABLE,
.prdiv = 0x1U,
.vdiv = 0x0U,
},
}
#define MCG_PLL_DISABLE
Definition: clock_config.c:53

MCG set for BOARD_BootClockRUN configuration.

Definition at line 125 of file clock_config.c.

◆ mcgConfig_BOARD_BootClockVLPR

const mcg_config_t mcgConfig_BOARD_BootClockVLPR
Initial value:
=
{
.mcgMode = kMCG_ModeBLPI,
.irclkEnableMode = kMCG_IrclkEnable,
.ircs = kMCG_IrcFast,
.fcrdiv = 0x0U,
.frdiv = 0x0U,
.drs = kMCG_DrsLow,
.dmx32 = kMCG_Dmx32Default,
.pll0Config =
{
.enableMode = MCG_PLL_DISABLE,
.prdiv = 0x0U,
.vdiv = 0x0U,
},
}
#define MCG_PLL_DISABLE
Definition: clock_config.c:53

MCG set for BOARD_BootClockVLPR configuration.

Definition at line 218 of file clock_config.c.

◆ oscConfig_BOARD_BootClockRUN

const osc_config_t oscConfig_BOARD_BootClockRUN
Initial value:
=
{
.freq = 8000000U,
.capLoad = (OSC_CAP0P),
.workMode = kOSC_ModeOscLowPower,
.oscerConfig =
{
.enableMode = kOSC_ErClkEnable,
}
}
#define OSC_CAP0P
Definition: clock_config.c:54

OSC set for BOARD_BootClockRUN configuration.

Definition at line 147 of file clock_config.c.

◆ oscConfig_BOARD_BootClockVLPR

const osc_config_t oscConfig_BOARD_BootClockVLPR
Initial value:
=
{
.freq = 0U,
.capLoad = (OSC_CAP0P),
.workMode = kOSC_ModeOscLowPower,
.oscerConfig =
{
.enableMode = OSC_ER_CLK_DISABLE,
}
}
#define OSC_CAP0P
Definition: clock_config.c:54
#define OSC_ER_CLK_DISABLE
Definition: clock_config.c:55

OSC set for BOARD_BootClockVLPR configuration.

Definition at line 240 of file clock_config.c.

◆ simConfig_BOARD_BootClockRUN

const sim_clock_config_t simConfig_BOARD_BootClockRUN
Initial value:
=
{
.er32kSrc = SIM_OSC32KSEL_LPO_CLK,
.clkdiv1 = 0x10010000U,
}
#define SIM_OSC32KSEL_LPO_CLK
Definition: clock_config.c:56
#define SIM_PLLFLLSEL_MCGPLLCLK_CLK
Definition: clock_config.c:58

SIM module set for BOARD_BootClockRUN configuration.

Definition at line 141 of file clock_config.c.

◆ simConfig_BOARD_BootClockVLPR

const sim_clock_config_t simConfig_BOARD_BootClockVLPR
Initial value:
=
{
.er32kSrc = SIM_OSC32KSEL_LPO_CLK,
.clkdiv1 = 0x40000U,
}
#define SIM_OSC32KSEL_LPO_CLK
Definition: clock_config.c:56
#define SIM_PLLFLLSEL_MCGFLLCLK_CLK
Definition: clock_config.c:57

SIM module set for BOARD_BootClockVLPR configuration.

Definition at line 234 of file clock_config.c.

◆ SystemCoreClock

uint32_t SystemCoreClock