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_RTC32KCLK_CLK   2U
 
#define SIM_PLLFLLSEL_IRC48MCLK_CLK   3U
 
#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_RTC32KCLK_CLK

#define SIM_OSC32KSEL_RTC32KCLK_CLK   2U

OSC32KSEL select: RTC32KCLK clock (32.768kHz)

Definition at line 56 of file clock_config.c.

◆ SIM_PLLFLLSEL_IRC48MCLK_CLK

#define SIM_PLLFLLSEL_IRC48MCLK_CLK   3U

PLLFLL select: IRC48MCLK 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 168 of file clock_config.c.

Referenced by BOARD_InitBootClocks().

Here is the caller graph for this function:

◆ BOARD_BootClockVLPR()

void BOARD_BootClockVLPR ( void  )

This function executes configuration of clocks.

Definition at line 266 of file clock_config.c.

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,
.oscsel = kMCG_OscselOsc,
.pll0Config =
{
.enableMode = MCG_PLL_DISABLE,
.prdiv = 0x13U,
.vdiv = 0x18U,
},
}
#define MCG_PLL_DISABLE
Definition: clock_config.c:53

MCG set for BOARD_BootClockRUN configuration.

Definition at line 131 of file clock_config.c.

Referenced by BOARD_BootClockRUN().

◆ 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,
.oscsel = kMCG_OscselOsc,
.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 229 of file clock_config.c.

Referenced by BOARD_BootClockVLPR().

◆ oscConfig_BOARD_BootClockRUN

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

OSC set for BOARD_BootClockRUN configuration.

Definition at line 154 of file clock_config.c.

Referenced by BOARD_BootClockRUN().

◆ oscConfig_BOARD_BootClockVLPR

const osc_config_t oscConfig_BOARD_BootClockVLPR
Initial value:
=
{
.freq = 0U,
.capLoad = (OSC_CAP0P),
.workMode = kOSC_ModeExt,
.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 252 of file clock_config.c.

◆ simConfig_BOARD_BootClockRUN

const sim_clock_config_t simConfig_BOARD_BootClockRUN
Initial value:
=
{
.clkdiv1 = 0x1240000U,
}
#define SIM_OSC32KSEL_RTC32KCLK_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 148 of file clock_config.c.

Referenced by BOARD_BootClockRUN().

◆ simConfig_BOARD_BootClockVLPR

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

SIM module set for BOARD_BootClockVLPR configuration.

Definition at line 246 of file clock_config.c.

Referenced by BOARD_BootClockVLPR().

◆ SystemCoreClock

uint32_t SystemCoreClock