Kinetis SDK v.1.3 API Reference Manual  Rev. 0
Freescale Semiconductor, Inc.
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Clock Manager (Clock)

The Kinetis SDK Clock Manager provides a set of API/services to configure the clock-related IPs, such as MCG, SIM, and so on. More...

Overview

Modules

 K02F12810
 The data structure definition for K02F12810 Clock Manager.
 
 K10D10
 The data structure definition for K10D10 Clock Manager.
 
 K11DA5
 The data structure definition for K11DA5 Clock Manager.
 
 K128T7
 The data structure definition for K128T7 Clock Manager.
 
 K128Z7
 The data structure definition for K128Z7 Clock Manager.
 
 K20D10
 The data structure definition for K20D10 Clock Manager.
 
 K21DA5
 The data structure definition for K21DA5 Clock Manager.
 
 K21FA12
 The data structure definition for K21FA12 Clock Manager.
 
 K22F12810
 The data structure definition for K22F12810 Clock Manager.
 
 K22F25612
 The data structure definition for K22F25612 Clock Manager.
 
 K22F51212
 The data structure definition for K22F51212 Clock Manager.
 
 K22FA12
 The data structure definition for K22FA12 Clock Manager.
 
 K24F12
 The data structure definition for K24F12 Clock Manager.
 
 K24F25612
 The data structure definition for K24F25612 Clock Manager.
 
 K30D10
 The data structure definition for K30D10 Clock Manager.
 
 K40D10
 The data structure definition for K40D10 Clock Manager.
 
 K50D10
 The data structure definition for K50D10 Clock Manager.
 
 K51D10
 The data structure definition for K51D10 Clock Manager.
 
 K52D10
 The data structure definition for K52D10 Clock Manager.
 
 K53D10
 The data structure definition for K53D10 Clock Manager.
 
 K60D10
 The data structure definition for K60D10 Clock Manager.
 
 K63F12
 The data structure definition for K63F12 Clock Manager.
 
 K64F12
 The data structure definition for K64F12 Clock Manager.
 
 KL02Z4
 The data structure definition for KL02Z4 Clock Manager.
 
 KL03Z4
 The data structure definition for KL03Z4 Clock Manager.
 
 KL127Z644
 The data structure definition for KL127Z644 Clock Manager.
 
 KL13Z644
 The data structure definition for KL13Z644 Clock Manager.
 
 KL14Z4
 The data structure definition for KL14Z4 Clock Manager.
 
 KL15Z4
 The data structure definition for KL15Z4 Clock Manager.
 
 KL16Z4
 The data structure definition for KL16Z4 Clock Manager.
 
 KL17Z4
 The data structure definition for KL17Z4 Clock Manager.
 
 KL17Z644
 The data structure definition for KL17Z644 Clock Manager.
 
 KL24Z4
 The data structure definition for KL24Z4 Clock Manager.
 
 KL25Z4
 The data structure definition for KL25Z4 Clock Manager.
 
 KL26Z4
 The data structure definition for KL26Z4 Clock Manager.
 
 KL27Z4
 The data structure definition for KL27Z4 Clock Manager.
 
 KL33Z4
 The data structure definition for KL33Z4 Clock Manager.
 
 KL33Z644
 The data structure definition for KL33Z644 Clock Manager.
 
 KL34Z4
 The data structure definition for KL34Z4 Clock Manager.
 
 KL36Z4
 The data structure definition for KL36Z4 Clock Manager.
 
 KL43Z4
 The data structure definition for KL43Z4 Clock Manager.
 
 KL46Z4
 The data structure definition for KL46Z4 Clock Manager.
 
 KM34Z7
 The data structure definition for KM34Z7 Clock Manager.
 
 KV10Z1287
 The data structure definition for KV10Z1287 Clock Manager.
 
 KV10Z7
 The data structure definition for KV10Z7 Clock Manager.
 
 KV11Z7
 The data structure definition for KV11Z7 Clock Manager.
 
 KV30F12810
 The data structure definition for KV30F12810 Clock Manager.
 
 KV31F12810
 The data structure definition for KV31F12810 Clock Manager.
 
 KV31F25612
 The data structure definition for KV31F25612 Clock Manager.
 
 KV31F51212
 The data structure definition for KV31F51212 Clock Manager.
 
 KW20Z4
 The data structure definition for KW20Z4 Clock Manager.
 
 KW21D5
 The data structure definition for KW21D5 Clock Manager.
 
 KW22D5
 The data structure definition for KW22D5 Clock Manager.
 
 KW24D5
 The data structure definition for KW24D5 Clock Manager.
 
 KW30Z4
 The data structure definition for KW30Z4 Clock Manager.
 
 KW40Z4
 The data structure definition for KW40Z4 Clock Manager.
 

Files

file  fsl_clock_manager.h
 
file  fsl_clock_MKV40F15.h
 
file  fsl_clock_MKV43F15.h
 
file  fsl_clock_MKV44F15.h
 
file  fsl_clock_MKV45F15.h
 
file  fsl_clock_MKV46F15.h
 

Data Structures

struct  oscer_config_t
 OSC configuration for OSCERCLK. More...
 
struct  osc_user_config_t
 OSC Initialization Configuration Structure. More...
 
struct  rtc_osc_user_config_t
 RTC OSC Initialization Configuration Structure. More...
 
struct  mcglite_config_t
 MCG_LITE configure structure for mode change. More...
 
struct  clock_manager_user_config_t
 Clock configuration structure. More...
 
struct  clock_notify_struct_t
 Clock notification structure passed to clock callback function. More...
 
struct  clock_manager_callback_user_config_t
 The structure for callback function and its parameter. More...
 
struct  clock_manager_state_t
 Clock manager state structure. More...
 
struct  sim_config_t
 SIM configuration structure for dynamic clock setting. More...
 
struct  clock_name_config_t
 Clock name configuration table structure. More...
 

Macros

#define CPU_LPO_CLK_HZ   1000U
 Frequency of the LPO. More...
 

Typedefs

typedef
clock_manager_error_code_t(* 
clock_manager_callback_t )(clock_notify_struct_t *notify, void *callbackData)
 Type of the clock callback functions. More...
 

Enumerations

enum  clock_systick_src_t {
  kClockSystickSrcExtRef = 0U,
  kClockSystickSrcCore = 1U
}
 Systick clock source selection. More...
 
enum  clock_names_t {
  kCoreClock,
  kSystemClock,
  kPlatformClock,
  kBusClock,
  kFlexBusClock,
  kFlashClock,
  kFastPeripheralClock,
  kSystickClock,
  kOsc32kClock,
  kOsc0ErClock,
  kOsc1ErClock,
  kOsc0ErClockUndiv,
  kIrc48mClock,
  kRtcoutClock,
  kMcgFfClock,
  kMcgFllClock,
  kMcgPll0Clock,
  kMcgPll1Clock,
  kMcgExtPllClock,
  kMcgOutClock,
  kMcgIrClock,
  kLpoClock
}
 A clock name used to get the clock frequency. More...
 
enum  clock_manager_error_code_t {
  kClockManagerSuccess,
  kClockManagerError,
  kClockManagerNoSuchClockName,
  kClockManagerInvalidParam,
  kClockManagerErrorOutOfRange,
  kClockManagerErrorNotificationBefore,
  kClockManagerErrorNotificationAfter,
  kClockManagerErrorUnknown
}
 Error code definition for the clock manager APIs. More...
 
enum  clock_manager_notify_t {
  kClockManagerNotifyRecover = 0x00U,
  kClockManagerNotifyBefore = 0x01U,
  kClockManagerNotifyAfter = 0x02U
}
 The clock notification type. More...
 
enum  clock_manager_callback_type_t {
  kClockManagerCallbackBefore = 0x01U,
  kClockManagerCallbackAfter = 0x02U,
  kClockManagerCallbackBeforeAfter = 0x03U
}
 The callback type, which indicates the kinds of notification this callback handles. More...
 
enum  clock_manager_policy_t {
  kClockManagerPolicyAgreement,
  kClockManagerPolicyForcible
}
 Clock transition policy. More...
 

Functions

clock_manager_error_code_t CLOCK_SYS_GetFreq (clock_names_t clockName, uint32_t *frequency)
 Gets the clock frequency for a specific clock name. More...
 
uint32_t CLOCK_SYS_GetCoreClockFreq (void)
 Gets the core clock frequency. More...
 
uint32_t CLOCK_SYS_GetSystemClockFreq (void)
 Gets the system clock frequency. More...
 
uint32_t CLOCK_SYS_GetBusClockFreq (void)
 Gets the bus clock frequency. More...
 
uint32_t CLOCK_SYS_GetFlashClockFreq (void)
 Gets the flash clock frequency. More...
 
static uint32_t CLOCK_SYS_GetLpoClockFreq (void)
 Gets the LPO clock frequency. More...
 
static void CLOCK_SYS_SetSystickSrc (clock_systick_src_t src)
 Sets the Systick clock source SYST_CSR[CLKSOURCE]. More...
 
static uint32_t CLOCK_SYS_GetSystickFreq (void)
 Gets the Systick clock frequency. More...
 
static void CLOCK_SYS_SetOutDiv1 (uint8_t outdiv1)
 Sets the clock out divider1 setting(OUTDIV1). More...
 
static uint8_t CLOCK_SYS_GetOutDiv1 (void)
 Gets the clock out divider1 setting(OUTDIV1). More...
 
static void CLOCK_SYS_SetOutDiv2 (uint8_t outdiv2)
 Sets the clock out divider2 setting(OUTDIV2). More...
 
static uint8_t CLOCK_SYS_GetOutDiv2 (void)
 Gets the clock out divider2 setting(OUTDIV2). More...
 
static void CLOCK_SYS_SetOutDiv4 (uint8_t outdiv4)
 Sets the clock out divider4 setting(OUTDIV4). More...
 
static uint8_t CLOCK_SYS_GetOutDiv4 (void)
 Gets the clock out divider4 setting(OUTDIV4). More...
 
static void CLOCK_SYS_SetOutDiv (uint8_t outdiv1, uint8_t outdiv2, uint8_t outdiv3, uint8_t outdiv4)
 Sets the clock out dividers setting. More...
 
static void CLOCK_SYS_GetOutDiv (uint8_t *outdiv1, uint8_t *outdiv2, uint8_t *outdiv3, uint8_t *outdiv4)
 Gets the clock out dividers setting. More...
 
uint32_t CLOCK_SYS_GetPllFllClockFreq (void)
 Get the MCGPLLCLK/MCGFLLCLK/IRC48MCLK clock frequency. More...
 
static void CLOCK_SYS_SetPllfllSel (clock_pllfll_sel_t setting)
 Set PLL/FLL clock selection. More...
 
static clock_pllfll_sel_t CLOCK_SYS_GetPllfllSel (void)
 Get PLL/FLL clock selection. More...
 
static uint32_t CLOCK_SYS_GetFixedFreqClockFreq (void)
 Gets the MCGFFCLK clock frequency. More...
 
static uint32_t CLOCK_SYS_GetInternalRefClockFreq (void)
 Get internal reference clock frequency. More...
 
uint32_t CLOCK_SYS_GetExternalRefClock32kFreq (void)
 Gets the external reference 32k clock frequency. More...
 
static void CLOCK_SYS_SetExternalRefClock32kSrc (clock_er32k_src_t src)
 Set the clock selection of ERCLK32K. More...
 
static clock_er32k_src_t CLOCK_SYS_GetExternalRefClock32kSrc (void)
 Get the clock selection of ERCLK32K. More...
 
uint32_t CLOCK_SYS_GetOsc0ExternalRefClockFreq (void)
 Gets the OSC0ERCLK frequency. More...
 
uint32_t CLOCK_SYS_GetOsc0ExternalRefClockUndivFreq (void)
 Gets the OSC0ERCLK_UNDIV frequency. More...
 
uint32_t CLOCK_SYS_GetWdogFreq (uint32_t instance, clock_wdog_src_t wdogSrc)
 Gets the watch dog clock frequency. More...
 
static clock_trace_src_t CLOCK_SYS_GetTraceSrc (uint32_t instance)
 Gets the debug trace clock source. More...
 
static void CLOCK_SYS_SetTraceSrc (uint32_t instance, clock_trace_src_t src)
 Sets the debug trace clock source. More...
 
uint32_t CLOCK_SYS_GetTraceFreq (uint32_t instance)
 Gets the debug trace clock frequency. More...
 
uint32_t CLOCK_SYS_GetPortFilterFreq (uint32_t instance, clock_port_filter_src_t src)
 Gets PORTx digital input filter clock frequency. More...
 
uint32_t CLOCK_SYS_GetLptmrFreq (uint32_t instance, clock_lptmr_src_t lptmrSrc)
 Gets LPTMRx pre-scaler/glitch filter clock frequency. More...
 
static uint32_t CLOCK_SYS_GetEwmFreq (uint32_t instance)
 Gets the clock frequency for EWM module. More...
 
static uint32_t CLOCK_SYS_GetFtfFreq (uint32_t instance)
 Gets the clock frequency for FTF module. More...
 
static uint32_t CLOCK_SYS_GetCrcFreq (uint32_t instance)
 Gets the clock frequency for CRC module. More...
 
static uint32_t CLOCK_SYS_GetCmpFreq (uint32_t instance)
 Gets the clock frequency for CMP module. More...
 
static uint32_t CLOCK_SYS_GetVrefFreq (uint32_t instance)
 Gets the clock frequency for VREF module. More...
 
static uint32_t CLOCK_SYS_GetPdbFreq (uint32_t instance)
 Gets the clock frequency for PDB module. More...
 
static uint32_t CLOCK_SYS_GetPitFreq (uint32_t instance)
 Gets the clock frequency for PIT module. More...
 
static uint32_t CLOCK_SYS_GetSpiFreq (uint32_t instance)
 Gets the clock frequency for SPI module. More...
 
static uint32_t CLOCK_SYS_GetI2cFreq (uint32_t instance)
 Gets the clock frequency for I2C module. More...
 
static uint32_t CLOCK_SYS_GetAdcAltFreq (uint32_t instance)
 Gets ADC alternate clock frequency. More...
 
static uint32_t CLOCK_SYS_GetAdcAlt2Freq (uint32_t instance)
 Gets ADC alternate 2 clock frequency. More...
 
static uint32_t CLOCK_SYS_GetFtmFixedFreq (uint32_t instance)
 Gets FTM fixed frequency clock frequency. More...
 
static uint32_t CLOCK_SYS_GetFtmSystemClockFreq (uint32_t instance)
 Gets FTM's system clock frequency. More...
 
uint32_t CLOCK_SYS_GetFtmExternalFreq (uint32_t instance)
 Gets FTM external clock frequency. More...
 
static sim_ftm_clk_sel_t CLOCK_SYS_GetFtmExternalSrc (uint32_t instance)
 Gets FTM external clock source. More...
 
static void CLOCK_SYS_SetFtmExternalSrc (uint32_t instance, sim_ftm_clk_sel_t ftmSrc)
 Sets FTM external clock source. More...
 
uint32_t CLOCK_SYS_GetUartFreq (uint32_t instance)
 Gets the clock frequency for UART module. More...
 
static uint32_t CLOCK_SYS_GetGpioFreq (uint32_t instance)
 Gets the clock frequency for GPIO module. More...
 
static void CLOCK_SYS_EnableDmaClock (uint32_t instance)
 Enable the clock for DMA module. More...
 
static void CLOCK_SYS_DisableDmaClock (uint32_t instance)
 Disable the clock for DMA module. More...
 
static bool CLOCK_SYS_GetDmaGateCmd (uint32_t instance)
 Get the the clock gate state for DMA module. More...
 
static void CLOCK_SYS_EnableDmamuxClock (uint32_t instance)
 Enable the clock for DMAMUX module. More...
 
static void CLOCK_SYS_DisableDmamuxClock (uint32_t instance)
 Disable the clock for DMAMUX module. More...
 
static bool CLOCK_SYS_GetDmamuxGateCmd (uint32_t instance)
 Get the the clock gate state for DMAMUX module. More...
 
void CLOCK_SYS_EnablePortClock (uint32_t instance)
 Enable the clock for PORT module. More...
 
void CLOCK_SYS_DisablePortClock (uint32_t instance)
 Disable the clock for PORT module. More...
 
bool CLOCK_SYS_GetPortGateCmd (uint32_t instance)
 Get the the clock gate state for PORT module. More...
 
static void CLOCK_SYS_EnableEwmClock (uint32_t instance)
 Enable the clock for EWM module. More...
 
static void CLOCK_SYS_DisableEwmClock (uint32_t instance)
 Disable the clock for EWM module. More...
 
static bool CLOCK_SYS_GetEwmGateCmd (uint32_t instance)
 Get the the clock gate state for EWM module. More...
 
static void CLOCK_SYS_EnableFtfClock (uint32_t instance)
 Enable the clock for FTF module. More...
 
static void CLOCK_SYS_DisableFtfClock (uint32_t instance)
 Disable the clock for FTF module. More...
 
static bool CLOCK_SYS_GetFtfGateCmd (uint32_t instance)
 Get the the clock gate state for FTF module. More...
 
static void CLOCK_SYS_EnableCrcClock (uint32_t instance)
 Enable the clock for CRC module. More...
 
static void CLOCK_SYS_DisableCrcClock (uint32_t instance)
 Disable the clock for CRC module. More...
 
static bool CLOCK_SYS_GetCrcGateCmd (uint32_t instance)
 Get the the clock gate state for CRC module. More...
 
void CLOCK_SYS_EnableAdcClock (uint32_t instance)
 Enable the clock for ADC module. More...
 
void CLOCK_SYS_DisableAdcClock (uint32_t instance)
 Disable the clock for ADC module. More...
 
bool CLOCK_SYS_GetAdcGateCmd (uint32_t instance)
 Get the the clock gate state for ADC module. More...
 
static void CLOCK_SYS_EnableCmpClock (uint32_t instance)
 Enable the clock for CMP module. More...
 
static void CLOCK_SYS_DisableCmpClock (uint32_t instance)
 Disable the clock for CMP module. More...
 
static bool CLOCK_SYS_GetCmpGateCmd (uint32_t instance)
 Get the the clock gate state for CMP module. More...
 
void CLOCK_SYS_EnableDacClock (uint32_t instance)
 Enable the clock for DAC module. More...
 
void CLOCK_SYS_DisableDacClock (uint32_t instance)
 Disable the clock for DAC module. More...
 
bool CLOCK_SYS_GetDacGateCmd (uint32_t instance)
 Get the the clock gate state for DAC module. More...
 
static void CLOCK_SYS_EnableVrefClock (uint32_t instance)
 Enable the clock for VREF module. More...
 
static void CLOCK_SYS_DisableVrefClock (uint32_t instance)
 Disable the clock for VREF module. More...
 
static bool CLOCK_SYS_GetVrefGateCmd (uint32_t instance)
 Get the the clock gate state for VREF module. More...
 
static void CLOCK_SYS_EnablePdbClock (uint32_t instance)
 Enable the clock for PDB module. More...
 
static void CLOCK_SYS_DisablePdbClock (uint32_t instance)
 Disable the clock for PDB module. More...
 
static bool CLOCK_SYS_GetPdbGateCmd (uint32_t instance)
 Get the the clock gate state for PDB module. More...
 
void CLOCK_SYS_EnableFtmClock (uint32_t instance)
 Enable the clock for FTM module. More...
 
void CLOCK_SYS_DisableFtmClock (uint32_t instance)
 Disable the clock for FTM module. More...
 
bool CLOCK_SYS_GetFtmGateCmd (uint32_t instance)
 Get the the clock gate state for FTM module. More...
 
static void CLOCK_SYS_EnablePitClock (uint32_t instance)
 Enable the clock for PIT module. More...
 
static void CLOCK_SYS_DisablePitClock (uint32_t instance)
 Disable the clock for PIT module. More...
 
static bool CLOCK_SYS_GetPitGateCmd (uint32_t instance)
 Get the the clock gate state for PIT module. More...
 
static void CLOCK_SYS_EnableLptmrClock (uint32_t instance)
 Enable the clock for LPTIMER module. More...
 
static void CLOCK_SYS_DisableLptmrClock (uint32_t instance)
 Disable the clock for LPTIMER module. More...
 
static bool CLOCK_SYS_GetLptmrGateCmd (uint32_t instance)
 Get the the clock gate state for LPTIMER module. More...
 
void CLOCK_SYS_EnableSpiClock (uint32_t instance)
 Enable the clock for SPI module. More...
 
void CLOCK_SYS_DisableSpiClock (uint32_t instance)
 Disable the clock for SPI module. More...
 
bool CLOCK_SYS_GetSpiGateCmd (uint32_t instance)
 Get the the clock gate state for SPI module. More...
 
void CLOCK_SYS_EnableI2cClock (uint32_t instance)
 Enable the clock for I2C module. More...
 
void CLOCK_SYS_DisableI2cClock (uint32_t instance)
 Disable the clock for I2C module. More...
 
bool CLOCK_SYS_GetI2cGateCmd (uint32_t instance)
 Get the the clock gate state for I2C module. More...
 
void CLOCK_SYS_EnableUartClock (uint32_t instance)
 Enable the clock for UART module. More...
 
void CLOCK_SYS_DisableUartClock (uint32_t instance)
 Disable the clock for UART module. More...
 
bool CLOCK_SYS_GetUartGateCmd (uint32_t instance)
 Get the the clock gate state for UART module. More...
 
static void CLOCK_SYS_SetFtmExternalFreq (uint32_t srcInstance, uint32_t freq)
 Set the FTM external clock frequency(FTM_CLKx). More...
 
static void CLOCK_SYS_SetOutDiv3 (uint8_t outdiv3)
 Sets the clock out divider3 setting(OUTDIV3). More...
 
static uint8_t CLOCK_SYS_GetOutDiv3 (void)
 Gets the clock out divider3 setting(OUTDIV3). More...
 
uint32_t CLOCK_SYS_GetFlexbusFreq (void)
 Get flexbus clock frequency. More...
 
static uint32_t CLOCK_SYS_GetRtcFreq (uint32_t instance)
 Gets RTC input clock frequency. More...
 
uint32_t CLOCK_SYS_GetRtcOutFreq (void)
 Gets RTC_CLKOUT frequency. More...
 
static clock_rtcout_src_t CLOCK_SYS_GetRtcOutSrc (void)
 Gets RTC_CLKOUT source. More...
 
static void CLOCK_SYS_SetRtcOutSrc (clock_rtcout_src_t src)
 Gets RTC_CLKOUT source. More...
 
static clock_rmii_src_t CLOCK_SYS_GetEnetRmiiSrc (uint32_t instance)
 Gets ethernet RMII clock source. More...
 
static void CLOCK_SYS_SetEnetRmiiSrc (uint32_t instance, clock_rmii_src_t rmiiSrc)
 Sets ethernet RMII clock source. More...
 
uint32_t CLOCK_SYS_GetEnetRmiiFreq (uint32_t instance)
 Gets ethernet RMII clock frequency. More...
 
uint32_t CLOCK_SYS_GetFlexcanFreq (uint32_t instance, clock_flexcan_src_t flexcanSrc)
 Gets FLEXCAN clock frequency. More...
 
static void CLOCK_SYS_SetEnetTimeStampSrc (uint32_t instance, clock_time_src_t timeSrc)
 Set the ethernet timestamp clock source selection. More...
 
static clock_time_src_t CLOCK_SYS_GetEnetTimeStampSrc (uint32_t instance)
 Get the ethernet timestamp clock source selection. More...
 
uint32_t CLOCK_SYS_GetEnetTimeStampFreq (uint32_t instance)
 Gets ethernet timestamp clock frequency. More...
 
static uint32_t CLOCK_SYS_GetCmtFreq (uint32_t instance)
 Gets the clock frequency for CMT module. More...
 
uint32_t CLOCK_SYS_GetSdhcFreq (uint32_t instance)
 Gets the clock frequency for SDHC. More...
 
static void CLOCK_SYS_SetSdhcSrc (uint32_t instance, clock_sdhc_src_t setting)
 Set the SDHC clock source selection. More...
 
static clock_sdhc_src_t CLOCK_SYS_GetSdhcSrc (uint32_t instance)
 Get the SDHC clock source selection. More...
 
uint32_t CLOCK_SYS_GetSaiFreq (uint32_t instance, clock_sai_src_t saiSrc)
 Gets the clock frequency for SAI. More...
 
static uint32_t CLOCK_SYS_GetUsbdcdFreq (uint32_t instance)
 Gets the clock frequency for USB DCD module. More...
 
static void CLOCK_SYS_EnableMpuClock (uint32_t instance)
 Enable the clock for MPU module. More...
 
static void CLOCK_SYS_DisableMpuClock (uint32_t instance)
 Disable the clock for MPU module. More...
 
static bool CLOCK_SYS_GetMpuGateCmd (uint32_t instance)
 Get the the clock gate state for MPU module. More...
 
static void CLOCK_SYS_EnableFlexbusClock (uint32_t instance)
 Enable the clock for FLEXBUS module. More...
 
static void CLOCK_SYS_DisableFlexbusClock (uint32_t instance)
 Disable the clock for FLEXBUS module. More...
 
static bool CLOCK_SYS_GetFlexbusGateCmd (uint32_t instance)
 Get the the clock gate state for FLEXBUS module. More...
 
static void CLOCK_SYS_EnableRngaClock (uint32_t instance)
 Enable the clock for RNGA module. More...
 
static void CLOCK_SYS_DisableRngaClock (uint32_t instance)
 Disable the clock for RNGA module. More...
 
static bool CLOCK_SYS_GetRngaGateCmd (uint32_t instance)
 Get the the clock gate state for RNGA module. More...
 
static void CLOCK_SYS_EnableSaiClock (uint32_t instance)
 Enable the clock for SAI module. More...
 
static void CLOCK_SYS_DisableSaiClock (uint32_t instance)
 Disable the clock for SAI module. More...
 
static bool CLOCK_SYS_GetSaiGateCmd (uint32_t instance)
 Get the the clock gate state for SAI module. More...
 
static void CLOCK_SYS_EnableCmtClock (uint32_t instance)
 Enable the clock for CMT module. More...
 
static void CLOCK_SYS_DisableCmtClock (uint32_t instance)
 Disable the clock for CMT module. More...
 
static bool CLOCK_SYS_GetCmtGateCmd (uint32_t instance)
 Get the the clock gate state for CMT module. More...
 
static void CLOCK_SYS_EnableRtcClock (uint32_t instance)
 Enable the clock for RTC module. More...
 
static void CLOCK_SYS_DisableRtcClock (uint32_t instance)
 Disable the clock for RTC module. More...
 
static bool CLOCK_SYS_GetRtcGateCmd (uint32_t instance)
 Get the the clock gate state for RTC module. More...
 
static void CLOCK_SYS_EnableEnetClock (uint32_t instance)
 Enable the clock for ENET module. More...
 
static void CLOCK_SYS_DisableEnetClock (uint32_t instance)
 Disable the clock for ENET module. More...
 
static bool CLOCK_SYS_GetEnetGateCmd (uint32_t instance)
 Get the the clock gate state for ENET module. More...
 
void CLOCK_SYS_EnableFlexcanClock (uint32_t instance)
 Enable the clock for FLEXCAN module. More...
 
void CLOCK_SYS_DisableFlexcanClock (uint32_t instance)
 Disable the clock for FLEXCAN module. More...
 
bool CLOCK_SYS_GetFlexcanGateCmd (uint32_t instance)
 Get the the clock gate state for FLEXCAN module. More...
 
static void CLOCK_SYS_EnableSdhcClock (uint32_t instance)
 Enable the clock for SDHC module. More...
 
static void CLOCK_SYS_DisableSdhcClock (uint32_t instance)
 Disable the clock for SDHC module. More...
 
static bool CLOCK_SYS_GetSdhcGateCmd (uint32_t instance)
 Get the the clock gate state for SDHC module. More...
 
static void CLOCK_SYS_EnableTsiClock (uint32_t instance)
 Enable the clock for TSI module. More...
 
static void CLOCK_SYS_DisableTsiClock (uint32_t instance)
 Disable the clock for TSI module. More...
 
static bool CLOCK_SYS_GetTsiGateCmd (uint32_t instance)
 Get the the clock gate state for TSI module. More...
 
static void CLOCK_SYS_EnableLlwuClock (uint32_t instance)
 Enable the clock for LLWU module. More...
 
static void CLOCK_SYS_DisableLlwuClock (uint32_t instance)
 Disable the clock for LLWU module. More...
 
static bool CLOCK_SYS_GetLlwuGateCmd (uint32_t instance)
 Get the the clock gate state for LLWU module. More...
 
static void CLOCK_SYS_SetEnetExternalFreq (uint32_t srcInstance, uint32_t freq)
 Set the ENET external clock frequency(ENET_1588_CLKIN). More...
 
static void CLOCK_SYS_SetSdhcExternalFreq (uint32_t srcInstance, uint32_t freq)
 Set the SDHC external clock frequency(SDHC_CLKIN). More...
 
uint32_t CLOCK_SYS_GetUsbfsFreq (uint32_t instance)
 Gets the clock frequency for USB FS OTG module. More...
 
static void CLOCK_SYS_SetUsbfsDiv (uint32_t instance, uint8_t usbdiv, uint8_t usbfrac)
 Set USB FS divider setting. More...
 
static void CLOCK_SYS_GetUsbfsDiv (uint32_t instance, uint8_t *usbdiv, uint8_t *usbfrac)
 Get USB FS divider setting. More...
 
static void CLOCK_SYS_EnableUsbfsClock (uint32_t instance)
 Enable the clock for USBFS module. More...
 
static void CLOCK_SYS_DisableUsbfsClock (uint32_t instance)
 Disable the clock for USBFS module. More...
 
static bool CLOCK_SYS_GetUsbfsGateCmd (uint32_t instance)
 Get the the clock gate state for USB module. More...
 
static void CLOCK_SYS_EnableUsbdcdClock (uint32_t instance)
 Enable the clock for USBDCD module. More...
 
static void CLOCK_SYS_DisableUsbdcdClock (uint32_t instance)
 Disable the clock for USBDCD module. More...
 
static bool CLOCK_SYS_GetUsbdcdGateCmd (uint32_t instance)
 Get the the clock gate state for USBDCD module. More...
 
static clock_usbfs_src_t CLOCK_SYS_GetUsbfsSrc (uint32_t instance)
 Gets the clock source for USB FS OTG module. More...
 
static void CLOCK_SYS_SetUsbfsSrc (uint32_t instance, clock_usbfs_src_t usbfsSrc)
 Sets the clock source for USB FS OTG module. More...
 
void CLOCK_SYS_Osc0Deinit (void)
 Deinitialize OSC0. More...
 
static void CLOCK_SYS_SetUsbExternalFreq (uint32_t srcInstance, uint32_t freq)
 Set the USB external clock frequency(USB_CLKIN). More...
 
static clock_lpuart_src_t CLOCK_SYS_GetLpuartSrc (uint32_t instance)
 Gets the clock source for LPUART module. More...
 
static void CLOCK_SYS_SetLpuartSrc (uint32_t instance, clock_lpuart_src_t lpuartSrc)
 Sets the clock source for LPUART module. More...
 
uint32_t CLOCK_SYS_GetLpuartFreq (uint32_t instance)
 Gets the clock frequency for LPUART module. More...
 
static void CLOCK_SYS_EnableLpuartClock (uint32_t instance)
 Enable the clock for LPUART module. More...
 
static void CLOCK_SYS_DisableLpuartClock (uint32_t instance)
 Disable the clock for LPUART module. More...
 
static bool CLOCK_SYS_GetLpuartGateCmd (uint32_t instance)
 Get the the clock gate state for LPUART module. More...
 
uint32_t CLOCK_SYS_GetPllFllDivClockFreq (void)
 Gets the PLL/FLL clock divided by the fractional divider. More...
 
uint32_t CLOCK_SYS_GetTpmFreq (uint32_t instance)
 Gets TPM clock frequency. More...
 
static void CLOCK_SYS_SetTpmSrc (uint32_t instance, clock_tpm_src_t tpmSrc)
 Set the TPM clock source selection. More...
 
static clock_tpm_src_t CLOCK_SYS_GetTpmSrc (uint32_t instance)
 Get the TPM clock source selection. More...
 
uint32_t CLOCK_SYS_GetTpmExternalFreq (uint32_t instance)
 Get the TPM external clock source frequency. More...
 
static void CLOCK_SYS_SetTpmExternalSrc (uint32_t instance, sim_tpm_clk_sel_t src)
 Set the TPM external clock source selection. More...
 
static sim_tpm_clk_sel_t CLOCK_SYS_GetTpmExternalSrc (uint32_t instance)
 Set the TPM external clock source selection. More...
 
static clock_usbhs_slowclk_src_t CLOCK_SYS_GetUsbhsSlowClockSrc (uint32_t instance)
 Gets the slow clock source for USB HS/USB PHY module. More...
 
static void CLOCK_SYS_SetUsbhsSlowClockSrc (uint32_t instance, clock_usbhs_slowclk_src_t usbhsSrc)
 Sets the clock source for USB HS/USB PHY module. More...
 
uint32_t CLOCK_SYS_GetUsbhsSlowClockFreq (uint32_t instance)
 Gets the slow clock frequency for USB HS/USB PHY module. More...
 
static void CLOCK_SYS_EnableSdramcClock (uint32_t instance)
 Enable the clock for SDRAMC module. More...
 
static void CLOCK_SYS_DisableSdramcClock (uint32_t instance)
 Disable the clock for SDRAMC module. More...
 
static bool CLOCK_SYS_GetSdramcGateCmd (uint32_t instance)
 Get the the clock gate state for SDRAMC module. More...
 
void CLOCK_SYS_EnableTpmClock (uint32_t instance)
 Enable the clock for TPM module. More...
 
void CLOCK_SYS_DisableTpmClock (uint32_t instance)
 Disable the clock for TPM module. More...
 
bool CLOCK_SYS_GetTpmGateCmd (uint32_t instance)
 Get the the clock gate state for TPM module. More...
 
static void CLOCK_SYS_EnableUsbhsClock (uint32_t instance)
 Enable the clock for USBHS module. More...
 
static void CLOCK_SYS_DisableUsbhsClock (uint32_t instance)
 Disable the clock for USBHS module. More...
 
static bool CLOCK_SYS_GetUsbhsGateCmd (uint32_t instance)
 Get the the clock gate state for USBHS module. More...
 
static void CLOCK_SYS_EnableUsbphyClock (uint32_t instance)
 Enable the clock for USBPHY module. More...
 
static void CLOCK_SYS_DisableUsbphyClock (uint32_t instance)
 Disable the clock for USBPHY module. More...
 
static bool CLOCK_SYS_GetUsbphyGateCmd (uint32_t instance)
 Get the the clock gate state for USBPHY module. More...
 
static void CLOCK_SYS_EnableUsbhsdcdClock (uint32_t instance)
 Enable the clock for USBHSDCD module. More...
 
static void CLOCK_SYS_DisableUsbhsdcdClock (uint32_t instance)
 Disable the clock for USBHSDCD module. More...
 
static bool CLOCK_SYS_GetUsbhsdcdGateCmd (uint32_t instance)
 Get the the clock gate state for USBHSDCD module. More...
 
static clock_emvsim_src_t CLOCK_SYS_GetEmvsimSrc (uint32_t instance)
 Gets the clock source for EMVSIM module. More...
 
static void CLOCK_SYS_SetEmvsimSrc (uint32_t instance, clock_emvsim_src_t emvsimSrc)
 Sets the clock source for EMVSIM module. More...
 
uint32_t CLOCK_SYS_GetEmvsimFreq (uint32_t instance)
 Gets the clock frequency for EMVSIM module. More...
 
uint32_t CLOCK_SYS_GetFlexioFreq (uint32_t instance)
 Gets FLEXIO clock frequency. More...
 
static void CLOCK_SYS_SetFlexioSrc (uint32_t instance, clock_flexio_src_t flexioSrc)
 Set the FLEXIO clock source selection. More...
 
static clock_flexio_src_t CLOCK_SYS_GetFlexioSrc (uint32_t instance)
 Get the FLEXIO clock source selection. More...
 
uint32_t CLOCK_SYS_GetQspiFreq (uint32_t instance, clock_qspi_src_t qspiSrc)
 Gets the clock frequency for QSPI. More...
 
void CLOCK_SYS_EnableEmvsimClock (uint32_t instance)
 Enable the clock for EMVSIM module. More...
 
void CLOCK_SYS_DisableEmvsimClock (uint32_t instance)
 Disable the clock for EMVSIM module. More...
 
bool CLOCK_SYS_GetEmvsimGateCmd (uint32_t instance)
 Get the the clock gate state for EMVSIM module. More...
 
static void CLOCK_SYS_EnableQspiClock (uint32_t instance)
 Enable the clock for QSPI module. More...
 
static void CLOCK_SYS_DisableQspiClock (uint32_t instance)
 Disable the clock for QSPI module. More...
 
static bool CLOCK_SYS_GetQspiGateCmd (uint32_t instance)
 Get the the clock gate state for QSPI module. More...
 
static void CLOCK_SYS_EnableFlexioClock (uint32_t instance)
 Enable the clock for FLEXIO module. More...
 
static void CLOCK_SYS_DisableFlexioClock (uint32_t instance)
 Disable the clock for FLEXIO module. More...
 
static bool CLOCK_SYS_GetFlexioGateCmd (uint32_t instance)
 Get the clock gate state for FLEXIO module. More...
 
static void CLOCK_SYS_EnableTrngClock (uint32_t instance)
 Enable the clock for TRNG module. More...
 
static void CLOCK_SYS_DisableTrngClock (uint32_t instance)
 Disable the clock for TRNG module. More...
 
static bool CLOCK_SYS_GetTrngGateCmd (uint32_t instance)
 Get the clock gate state for TRNG module. More...
 
void CLOCK_SYS_EnableLtcClock (uint32_t instance)
 Enable the clock for LTC module. More...
 
void CLOCK_SYS_DisableLtcClock (uint32_t instance)
 Disable the clock for LTC module. More...
 
bool CLOCK_SYS_GetLtcGateCmd (uint32_t instance)
 Get the the clock gate state for LTC module. More...
 
uint32_t CLOCK_SYS_GetFllClockFreq (void)
 Get the MCGFLLCLK clock frequency. More...
 
uint32_t CLOCK_SYS_GetCopFreq (uint32_t instance, clock_cop_src_t copSrc)
 Gets the COP clock frequency. More...
 
uint32_t CLOCK_SYS_GetLpsciFreq (uint32_t instance)
 Gets the clock frequency for LPSCI module. More...
 
static void CLOCK_SYS_SetLpsciSrc (uint32_t instance, clock_lpsci_src_t lpsciSrc)
 Set the LPSCI clock source selection. More...
 
static clock_lpsci_src_t CLOCK_SYS_GetLpsciSrc (uint32_t instance)
 Get the LPSCI clock source selection. More...
 
void CLOCK_SYS_EnableLpsciClock (uint32_t instance)
 Enable the clock for LPSCI module. More...
 
void CLOCK_SYS_DisableLpsciClock (uint32_t instance)
 Disable the clock for LPSCI module. More...
 
bool CLOCK_SYS_GetLpsciGateCmd (uint32_t instance)
 Get the the clock gate state for LPSCI module. More...
 
static void CLOCK_SYS_SetTpmExternalFreq (uint32_t srcInstance, uint32_t freq)
 Set the TPM external clock frequency(TPM_CLKx). More...
 
uint32_t CLOCK_SYS_GetCopFreq (void)
 Gets COP clock frequency. More...
 
static void CLOCK_SYS_SetCopSrc (clock_cop_src_t copSrc)
 Set the COP clock source selection. More...
 
static clock_cop_src_t CLOCK_SYS_GetCopSrc (void)
 Get the COP clock source selection. More...
 
void CLOCK_SYS_EnableXrdcClock (uint32_t instance)
 Enable the clock for XRDC module. More...
 
void CLOCK_SYS_DisableXrdcClock (uint32_t instance)
 Disable the clock for XRDC module. More...
 
bool CLOCK_SYS_GetXrdcGateCmd (uint32_t instance)
 Get the the clock gate state for XRDC module. More...
 
void CLOCK_SYS_EnableSemaClock (uint32_t instance)
 Enable the clock for SEMA module. More...
 
void CLOCK_SYS_DisableSemaClock (uint32_t instance)
 Disable the clock for SEMA module. More...
 
bool CLOCK_SYS_GetSemaGateCmd (uint32_t instance)
 Get the the clock gate state for SEMA module. More...
 
void CLOCK_SYS_EnableFlashClock (uint32_t instance)
 Enable the clock for FLASH module. More...
 
void CLOCK_SYS_DisableFlashClock (uint32_t instance)
 Disable the clock for FLASH module. More...
 
bool CLOCK_SYS_GetFlashGateCmd (uint32_t instance)
 Get the the clock gate state for FLASH module. More...
 
void CLOCK_SYS_EnableMuClock (uint32_t instance)
 Enable the clock for MU module. More...
 
void CLOCK_SYS_DisableMuClock (uint32_t instance)
 Disable the clock for MU module. More...
 
bool CLOCK_SYS_GetMuGateCmd (uint32_t instance)
 Get the the clock gate state for MU module. More...
 
void CLOCK_SYS_EnableIntmuxClock (uint32_t instance)
 Enable the clock for INTMUX module. More...
 
void CLOCK_SYS_DisableIntmuxClock (uint32_t instance)
 Disable the clock for INTMUX module. More...
 
bool CLOCK_SYS_GetIntmuxGateCmd (uint32_t instance)
 Get the the clock gate state for INTMUX module. More...
 
clock_pit_src_t CLOCK_SYS_GetPitSrc (uint32_t instance)
 Gets the clock source for PIT module. More...
 
void CLOCK_SYS_SetPitSrc (uint32_t instance, clock_pit_src_t pitSrc)
 Sets the clock source for PIT module. More...
 
void CLOCK_SYS_EnableLpspiClock (uint32_t instance)
 Enable the clock for LPSPI module. More...
 
void CLOCK_SYS_DisableLpspiClock (uint32_t instance)
 Disable the clock for LPSPI module. More...
 
bool CLOCK_SYS_GetLpspiGateCmd (uint32_t instance)
 Get the the clock gate state for LPSPI module. More...
 
clock_lpspi_src_t CLOCK_SYS_GetLpspiSrc (uint32_t instance)
 Gets the clock source for LPSPI module. More...
 
void CLOCK_SYS_SetLpspiSrc (uint32_t instance, clock_lpspi_src_t lpspiSrc)
 Sets the clock source for LPSPI module. More...
 
uint32_t CLOCK_SYS_GetLpspiFreq (uint32_t instance)
 Gets the clock frequency for LPSPI module. More...
 
void CLOCK_SYS_EnableLpi2cClock (uint32_t instance)
 Enable the clock for LPI2C module. More...
 
void CLOCK_SYS_DisableLpi2cClock (uint32_t instance)
 Disable the clock for LPI2C module. More...
 
bool CLOCK_SYS_GetLpi2cGateCmd (uint32_t instance)
 Get the the clock gate state for LPI2C module. More...
 
clock_lpi2c_src_t CLOCK_SYS_GetLpi2cSrc (uint32_t instance)
 Gets the clock source for LPI2C module. More...
 
void CLOCK_SYS_SetLpi2cSrc (uint32_t instance, clock_lpi2c_src_t lpi2cSrc)
 Sets the clock source for LPI2C module. More...
 
uint32_t CLOCK_SYS_GetLpi2cFreq (uint32_t instance)
 Gets the clock frequency for LPI2C module. More...
 
void CLOCK_SYS_EnableEvmsimClock (uint32_t instance)
 Enable the clock for EVMSIM module. More...
 
void CLOCK_SYS_DisableEvmsimClock (uint32_t instance)
 Disable the clock for EVMSIM module. More...
 
bool CLOCK_SYS_GetEvmsimGateCmd (uint32_t instance)
 Get the the clock gate state for EVMSIM module. More...
 
clock_evmsim_src_t CLOCK_SYS_GetEvmsimSrc (uint32_t instance)
 Gets the clock source for EVMSIM module. More...
 
void CLOCK_SYS_SetEvmsimSrc (uint32_t instance, clock_evmsim_src_t evmsimSrc)
 Sets the clock source for EVMSIM module. More...
 
uint32_t CLOCK_SYS_GetEvmsimFreq (uint32_t instance)
 Gets the clock frequency for EVMSIM module. More...
 
void CLOCK_SYS_EnableAtxClock (uint32_t instance)
 Enable the clock for ATX module. More...
 
void CLOCK_SYS_DisableAtxClock (uint32_t instance)
 Disable the clock for ATX module. More...
 
bool CLOCK_SYS_GetAtxGateCmd (uint32_t instance)
 Get the the clock gate state for ATX module. More...
 
static void CLOCK_SYS_SetOutDiv5 (uint8_t outdiv5)
 Sets the clock out divider5 setting(OUTDIV5). More...
 
static uint8_t CLOCK_SYS_GetOutDiv5 (void)
 Gets the clock out divider5 setting(OUTDIV5). More...
 
uint32_t CLOCK_SYS_GetOutdiv5ClockFreq (void)
 Gets the OUTDIV5 output clock for ADC. More...
 
uint32_t CLOCK_SYS_GetFastPeripheralClockFreq (void)
 Gets the fast peripheral clock frequency. More...
 
uint32_t CLOCK_SYS_GetDmaFreq (uint32_t instance)
 Gets the clock frequency for DMA module. More...
 
uint32_t CLOCK_SYS_GetDmamuxFreq (uint32_t instance)
 Gets the clock frequency for DMAMUX module. More...
 
uint32_t CLOCK_SYS_GetAdcFreq (uint32_t instance)
 Gets the clock frequency for ADC module. More...
 
uint32_t CLOCK_SYS_GetPwmFreq (uint32_t instance)
 Gets the clock frequency for eFlexPWM module. More...
 
uint32_t CLOCK_SYS_GetEncFreq (uint32_t instance)
 Gets the clock frequency for ENC module. More...
 
uint32_t CLOCK_SYS_GetXbarFreq (uint32_t instance)
 Gets the clock frequency for XBAR module. More...
 
uint32_t CLOCK_SYS_GetAoiFreq (uint32_t instance)
 Gets the clock frequency for AOI module. More...
 
uint32_t CLOCK_SYS_GetFlexcanFreq (uint8_t instance, clock_flexcan_src_t flexcanSrc)
 Gets FLEXCAN clock frequency. More...
 
static void CLOCK_SYS_EnablePwmClock (uint32_t instance)
 Enable the clock for eFlexPWM module. More...
 
static void CLOCK_SYS_DisablePwmClock (uint32_t instance)
 Disable the clock for eFlexPWM module. More...
 
static bool CLOCK_SYS_GetPwmGateCmd (uint32_t instance)
 Get the the clock gate state for eFlexPWM module. More...
 
static void CLOCK_SYS_EnableAoiClock (uint32_t instance)
 Enable the clock for AOI module. More...
 
static void CLOCK_SYS_DisableAoiClock (uint32_t instance)
 Disable the clock for AOI module. More...
 
static bool CLOCK_SYS_GetAoiGateCmd (uint32_t instance)
 Get the the clock gate state for AOI module. More...
 
static void CLOCK_SYS_EnableXbarClock (uint32_t instance)
 Enable the clock for XBAR module. More...
 
static void CLOCK_SYS_DisableXbarClock (uint32_t instance)
 Disable the clock for XBAR module. More...
 
static bool CLOCK_SYS_GetXbarGateCmd (uint32_t instance)
 Get the the clock gate state for XBAR module. More...
 
static void CLOCK_SYS_EnableEncClock (uint32_t instance)
 Enable the clock for ENC module. More...
 
static void CLOCK_SYS_DisableEncClock (uint32_t instance)
 Disable the clock for ENC module. More...
 
static bool CLOCK_SYS_GetEncGateCmd (uint32_t instance)
 Get the the clock gate state for ENC module. More...
 

Variables

SIM_Type *const g_simBase []
 The register base of the SIM module. More...
 
MCG_Type *const g_mcgBase []
 The register base of the MCG/MCG_LITE module. More...
 
OSC_Type *const g_oscBase []
 The register base of the OSC module. More...
 

Dynamic clock setting

clock_manager_error_code_t CLOCK_SYS_Init (clock_manager_user_config_t const **clockConfigsPtr, uint8_t configsNumber, clock_manager_callback_user_config_t **callbacksPtr, uint8_t callbacksNumber)
 Installs pre-defined clock configurations. More...
 
clock_manager_error_code_t CLOCK_SYS_UpdateConfiguration (uint8_t targetConfigIndex, clock_manager_policy_t policy)
 Sets the system clock configuration according to a pre-defined structure. More...
 
clock_manager_error_code_t CLOCK_SYS_SetConfiguration (clock_manager_user_config_t const *config)
 Sets the system clock configuration. More...
 
uint8_t CLOCK_SYS_GetCurrentConfiguration (void)
 Gets the current system clock configuration. More...
 
clock_manager_callback_user_config_tCLOCK_SYS_GetErrorCallback (void)
 Gets the callback which returns an error in the last clock switch. More...
 
mcglite_mode_error_t CLOCK_SYS_SetMcgliteMode (mcglite_config_t const *targetConfig)
 Sets the MCGLite to a specific mode. More...
 
void CLOCK_SYS_SetSimConfigration (sim_config_t const *simConfig)
 Sets the clock configuration in SIM module. More...
 

OSC configuration

clock_manager_error_code_t CLOCK_SYS_OscInit (uint32_t instance, osc_user_config_t *config)
 Initializes the OSC. More...
 
void CLOCK_SYS_OscDeinit (uint32_t instance)
 Deinitializes the OSC. More...
 
void CLOCK_SYS_SetOscerConfigration (uint32_t instance, oscer_config_t const *config)
 Configures the OSCERCLK. More...
 

RTC OSC configuration

clock_manager_error_code_t CLOCK_SYS_RtcOscInit (uint32_t instance, rtc_osc_user_config_t *config)
 Initializes the RTC OSC. More...
 
void CLOCK_SYS_RtcOscDeinit (uint32_t instance)
 Deinitializes the RTC OSC. More...
 

Clock Manager

Overview

The Clock Manager provides these APIs:

  • Enable/Disable clock for IP modules
  • Get/Set clock source for IP modules
  • Get clock frequency for IP modules
  • Get/Set clock dividers
  • Get clock module output frequency
  • OSC initialize/deinitialize
  • Clock mode setting
The Clock Manager covers SIM, MCG, and OSC modules.
The Clock manager also provides the clock dynamic change service. Based on this service, applications can switch between pre-defined clock configurations. A notification framework enables drivers and applications to register callback functions to this framework. Each time that the system clock configuration is changed, drivers and applications receive a notification and change their settings.

Enable/Disable clock for IP modules

The Clock manager provides APIs in this format:

/* Enable IP clock.
void CLOCK_SYS_EnableIpClock(uint32_t instance);
/* Disable IP clock.
void CLOCK_SYS_DisableIpClock(uint32_t instance);
/* Get IP clock status.
bool CLOCK_SYS_GetIpGateCmd(uint32_t instance);

Get/Set clock source for IP modules

The Clock manager provides the clock source get/set APIs for the modules whose control registers are in SIM and MCG. These APIs are defined in this format:

/* Get the IP module source.
clock_ip_src_t CLOCK_SYS_GetIpSrc(uint32_t instance);
/* Set the IP module source.
void CLOCK_SYS_SetIpSrc(uint32_t instance, clock_ip_src_t ipSrc);
These functions are only thin wraps of HAL drivers. The parameter clock_ip_src_t is an enumeration defined in SIM HAL driver. See SIM HAL driver for details.

Get clock frequency for IP modules

There are two circumstances:
  1. Some IP modules' clock source are chosen by SIM registers. The Clock Manager provides APIs in this format:
    uint32_t CLOCK_SYS_GetIpFreq(uint32_t instance);
These functions return the clock frequency. If the clock source is not available, they return 0.
  1. Some IP modules' clock source are chosen by the IP internal registers, for example SAI module. For these modules, the clock frequency APIs are defined as follows:
    uint32_t CLOCK_SYS_GetIpFreq(clock_ip_src_t ipSrc, uint32_t instance);
The clock source selection is passed as a parameter. The IP driver reads its internal register and passes it to the Clock Manager to get the clock frequency.

Get/Set clock dividers

The Clock manager provides separate divider APIs for different clocks. They are defined as follows:

/* Get divider values.
void CLOCK_SYS_GetIpDiv(uint32_t instance, type1 *div1, type2 *div2, ...);
/* Set divider values.
void CLOCK_SYS_SetIpDiv(uint32_t instance, type1 div1, type2 div2, ...);

Get clock module output frequency

The Clock module outputs clocks, including MCGFFCLK, MCGIRCLK, MCGPLLFLLCLK OSCERCLK, ERCLK32K, LPO, RTC_CLKOUT, core clock, bus clock and so on. The Clock Manager provides separate APIs to get the frequency of these clocks. These functions are defined as follows:

uint32_t CLOCK_SYS_GetNameFreq();
These functions return the frequency in hertz. If the clock source is not available, theyr return 0. Passing the clock name as a parameter to the API CLOCK_SYS_GetFreq() function obtains the corresponding frequency.

OSC initialize/deinitialize

The Clock Manager provides functions to initialize and deinitialize the OSC. The OSC configurations are passed by the structure osc_user_config_t.

clock_manager_error_code_t CLOCK_SYS_Osc0Init(osc_user_config_t *config);

Clock mode setting

The Clock generator (MCG and MCG_Lite) works in several clock modes. When switching the clock mode, the user must choose the proper path. The Clock Manager provides functions for this purpose:
mcg_mode_error_t CLOCK_SYS_SetMcgMode(mcg_config_t const *targetConfig);
These functions help to set MCG or MCG_Lite to target mode automatically, which means that, if the target mode cannot be reached directly, these functions are used to choose the correct path.
These functions are easy to use but have a large code size, especially for MCG. To set the MCG to some specific mode during system startup, the function CLOCK_SYS_SetMcgMode may not be the correct choice. In this case, the Clock Manager provides functions such as CLOCK_SYS_BootToPee, which are dedicate to set up the Clock during system startup. Because the target mode is specific, these functions are easier, light-weight, and have a small code size.

Dynamic clock setting

The Clock Manager dynamic clock setting is based on two components:
  1. The system can switch between pre-defined Clock configurations dynamically.
    Generally, there are two configurations, one for normal run mode and the other for very low power run (VLPR) mode. Some platforms, such as K22, run in HRUN power mode, which creates a need for an additional clock configuration for peak performance. See the structure g_defaultClockConfigurations for details.
  2. Notification framework.
    The Clock Manager provides a notification mechanism. IP drivers and applications should register callback functions to the notification framework. To simplify, the Clock Manager only supports the static callback registration. This means that, for applications, all callback functions are collected into a static table and passed to the Clock Manager.
    The clock mode transition includes 3 steps:
    1. Before clock mode transition, the Clock Manager sends a "BEFORE" message to the callback table. When this message is received, IP drivers should check whether any current processes can be stopped and stop them. If the processes cannot be stopped, the callback function returns an error.
      The Clock Manager supports two types of transition policies, a graceful policy and a forceful policy. When the graceful policy is used, if some callbacks return an error while sending "BEFORE" message, the clock mode transition stops and the Clock Manager sends a "RECOVER" message to all drivers that have stopped. Then, these drivers can recover the previous status and continue to work. When the forceful policy is used, drivers are stopped forcefully.
    2. After the "BEFORE" message is processed successfully, the system clock mode changes according to the new configuration.
    3. After the system clock mode changes, the Clock Manager sends an "AFTER" message to the callback table to notify drivers that the clock mode transition is finished.
This is an example that shows how to enable the dynamic clock setting in the application:

/* Callback for UART0.
uart_callback_data_t uart0CallbackData;
clock_manager_error_code_t uart0Callback(clock_notify_struct_t *notify,
void* driverData);
/* Callback for ADC1.
adc_callback_data_t adc1CallbackData;
clock_manager_error_code_t adc1Callback(clock_notify_struct_t *notify,
void* driverData);
/* Callback configuration for UART0.
clock_manager_callback_user_config_t uart0callbackConfig =
{
.callback = uart0Callback,
.callbackType = kClockManagerCallbackBeforeAfter,
.callbackData = &uart0CallbackData
};
/* Callback configuration for ADC1.
clock_manager_callback_user_config_t adc1callbackConfig =
{
.callback = adc1Callback,
.callbackType = kClockManagerCallbackBeforeAfter,
.callbackData = &adc1CallbackData
};
/* static clock callback table.
static clock_manager_callback_user_config clockCallbackTable [] =
{
&uart0callbackConfig,
&adc1callbackConfig,
};
/* Set configuration and callback table to Clock Manager.
CLOCK_SYS_Init(g_defaultClockConfigurations,
CLOCK_CONFIG_NUM,
clockCallbackTable,
ARRAY_SIZE(clockCallbackTable));
The Clock Manager provides the default clock configuration table with the name g_defaultClockConfigurations. The application needs to construct the callback function table. Finally, use the function CLOCK_SYS_Init to set up the clock configuration and a callback table for the Clock Manager.
This is an example of a callback function:

void *callbackData)
{
switch (notify->notifyTpye)
{
case kClockManagerNotifyBefore: // Received "BEFORE" message
if (!ready_to_change)
{
}
if ((ret == kClockManagerSuccess) ||
{
// Gate IP clock and stop work.
}
break;
case kClockManagerNotifyRecover: // Received "RECOVER" message
// Recover work.
break;
case kClockManagerNotifyAfter: // Received "AFTER" message
// Ungate IP clock and re-configure driver.
break;
default:
break;
}
return ret;
}

Data Structure Documentation

struct oscer_config_t

Data Fields

bool enable
 OSCERCLK enabled or not. More...
 
bool enableInStop
 OSCERCLK enabled or not in stop mode. More...
 

Field Documentation

bool oscer_config_t::enable
bool oscer_config_t::enableInStop
struct osc_user_config_t

Defines the configuration data structure to initialize the OSC. When porting to a new board, set the following members according to the board setting:

  1. freq: The external frequency.
  2. hgo/range/erefs: These members should be set based on the board setting.

Data Fields

uint32_t freq
 External clock frequency. More...
 
bool enableCapacitor2p
 Enable 2 pF capacitor load. More...
 
bool enableCapacitor4p
 Enable 4 pF capacitor load. More...
 
bool enableCapacitor8p
 Enable 8 pF capacitor load. More...
 
bool enableCapacitor16p
 Enable 16 pF capacitor load. More...
 
osc_gain_t hgo
 High-gain oscillator select. More...
 
osc_range_t range
 Oscillator range setting. More...
 
osc_src_t erefs
 External reference select. More...
 
oscer_config_t oscerConfig
 Configuration for OSCERCLK. More...
 

Field Documentation

uint32_t osc_user_config_t::freq
bool osc_user_config_t::enableCapacitor2p
bool osc_user_config_t::enableCapacitor4p
bool osc_user_config_t::enableCapacitor8p
bool osc_user_config_t::enableCapacitor16p
osc_gain_t osc_user_config_t::hgo
osc_range_t osc_user_config_t::range
osc_src_t osc_user_config_t::erefs
oscer_config_t osc_user_config_t::oscerConfig
struct rtc_osc_user_config_t

Defines the configuration data structure to initialize the RTC OSC. When porting to a new board, set the following members according to the board settings:

  1. freq: The external frequency for RTC.
  2. enableOSC: RTC can either use its dedicate OSC or override the OSC0 setting and use OSC0, or use external input clock directly. This is different for each SoC and board setting.

Data Fields

uint32_t freq
 External clock frequency. More...
 
bool enableCapacitor2p
 Enable 2 pF capacitor load. More...
 
bool enableCapacitor4p
 Enable 4 pF capacitor load. More...
 
bool enableCapacitor8p
 Enable 8 pF capacitor load. More...
 
bool enableCapacitor16p
 Enable 16 pF capacitor load. More...
 
bool enableOsc
 Enable OSC or use external clock directly. More...
 

Field Documentation

uint32_t rtc_osc_user_config_t::freq
bool rtc_osc_user_config_t::enableCapacitor2p
bool rtc_osc_user_config_t::enableCapacitor4p
bool rtc_osc_user_config_t::enableCapacitor8p
bool rtc_osc_user_config_t::enableCapacitor16p
bool rtc_osc_user_config_t::enableOsc
struct mcglite_config_t

Data Fields

mcglite_mode_t mcglite_mode
 MCG_LITE mode. More...
 
bool irclkEnable
 MCGIRCLK enable. More...
 
bool irclkEnableInStop
 MCGIRCLK enable in stop mode. More...
 
mcglite_lirc_select_t ircs
 MCG_C2[IRCS]. More...
 
mcglite_lirc_div_t fcrdiv
 MCG_SC[FCRDIV]. More...
 
mcglite_lirc_div_t lircDiv2
 MCG_MC[LIRC_DIV2]. More...
 
bool hircEnableInNotHircMode
 HIRC enable when not in HIRC mode. More...
 

Field Documentation

mcglite_mode_t mcglite_config_t::mcglite_mode
bool mcglite_config_t::irclkEnable
bool mcglite_config_t::irclkEnableInStop
mcglite_lirc_select_t mcglite_config_t::ircs
mcglite_lirc_div_t mcglite_config_t::fcrdiv
mcglite_lirc_div_t mcglite_config_t::lircDiv2
bool mcglite_config_t::hircEnableInNotHircMode
struct clock_manager_user_config_t

Data Fields

mcglite_config_t mcgliteConfig
 MCGLite configuration. More...
 
oscer_config_t oscerConfig
 OSCERCLK configuration. More...
 
sim_config_t simConfig
 SIM configuration. More...
 

Field Documentation

mcglite_config_t clock_manager_user_config_t::mcgliteConfig
oscer_config_t clock_manager_user_config_t::oscerConfig
sim_config_t clock_manager_user_config_t::simConfig
struct clock_notify_struct_t

Data Fields

uint8_t targetClockConfigIndex
 Target clock configuration index. More...
 
clock_manager_policy_t policy
 Clock transition policy. More...
 
clock_manager_notify_t notifyType
 Clock notification type. More...
 

Field Documentation

uint8_t clock_notify_struct_t::targetClockConfigIndex
clock_manager_policy_t clock_notify_struct_t::policy
clock_manager_notify_t clock_notify_struct_t::notifyType
struct clock_manager_callback_user_config_t

Data Fields

clock_manager_callback_t callback
 Entry of callback function. More...
 
clock_manager_callback_type_t callbackType
 Callback type. More...
 
void * callbackData
 Parameter of callback function. More...
 

Field Documentation

clock_manager_callback_t clock_manager_callback_user_config_t::callback
clock_manager_callback_type_t clock_manager_callback_user_config_t::callbackType
void* clock_manager_callback_user_config_t::callbackData
struct clock_manager_state_t

Data Fields

clock_manager_user_config_t
const ** 
configTable
 Pointer to the clock configuration table. More...
 
uint8_t clockConfigNum
 Number of clock configurations. More...
 
uint8_t curConfigIndex
 Index of the current configuration. More...
 
clock_manager_callback_user_config_t ** callbackConfig
 Pointer to the callback table. More...
 
uint8_t callbackNum
 Number of clock callbacks. More...
 
uint8_t errorCallbackIndex
 Index of callback returns error. More...
 

Field Documentation

clock_manager_user_config_t const** clock_manager_state_t::configTable
uint8_t clock_manager_state_t::clockConfigNum
uint8_t clock_manager_state_t::curConfigIndex
clock_manager_callback_user_config_t** clock_manager_state_t::callbackConfig
uint8_t clock_manager_state_t::callbackNum
uint8_t clock_manager_state_t::errorCallbackIndex
struct sim_config_t

Data Fields

clock_pllfll_sel_t pllFllSel
 PLL/FLL selection. More...
 
clock_er32k_src_t er32kSrc
 ERCLK32K source selection. More...
 
uint8_t flashclkmode
 CLKDIV setting. More...
 
uint8_t outdiv4
 OUTDIV setting. More...
 

Field Documentation

clock_pllfll_sel_t sim_config_t::pllFllSel
clock_er32k_src_t sim_config_t::er32kSrc
uint8_t sim_config_t::flashclkmode
uint8_t sim_config_t::outdiv4
struct clock_name_config_t

Data Fields

bool useOtherRefClock
 if it uses the other ref clock
 
clock_names_t otherRefClockName
 other ref clock name
 
clock_divider_names_t dividerName
 clock divider name
 

Macro Definition Documentation

#define CPU_LPO_CLK_HZ   1000U

Typedef Documentation

typedef clock_manager_error_code_t(* clock_manager_callback_t)(clock_notify_struct_t *notify, void *callbackData)

Enumeration Type Documentation

Enumerator
kClockSystickSrcExtRef 

Use external reference clock.

kClockSystickSrcCore 

Use processor clock (Core clock).

Enumerator
kCoreClock 

Core clock.

kSystemClock 

System clock.

kPlatformClock 

Platform clock.

kBusClock 

Bus clock.

kFlexBusClock 

FlexBus clock.

kFlashClock 

Flash clock.

kFastPeripheralClock 

Flash peripheral clock.

kSystickClock 

Clock for Systick.

kOsc32kClock 

ERCLK32K.

kOsc0ErClock 

OSC0ERCLK.

kOsc1ErClock 

OSC1ERCLK.

kOsc0ErClockUndiv 

OSC0ERCLK_UNDIV.

kIrc48mClock 

IRC 48M.

kRtcoutClock 

RTC_CLKOUT.

kMcgFfClock 

MCG fixed frequency clock (MCGFFCLK)

kMcgFllClock 

MCGFLLCLK.

kMcgPll0Clock 

MCGPLL0CLK.

kMcgPll1Clock 

MCGPLL1CLK.

kMcgExtPllClock 

EXT_PLLCLK.

kMcgOutClock 

MCGOUTCLK.

kMcgIrClock 

MCGIRCLK.

kLpoClock 

LPO clock.

Enumerator
kClockManagerSuccess 

Success.

kClockManagerError 

Some error occurs.

kClockManagerNoSuchClockName 

Invalid name.

kClockManagerInvalidParam 

Invalid parameter.

kClockManagerErrorOutOfRange 

Configuration index out of range.

kClockManagerErrorNotificationBefore 

Error occurs during send "BEFORE" notification.

kClockManagerErrorNotificationAfter 

Error occurs during send "AFTER" notification.

kClockManagerErrorUnknown 

Unknown error.

Enumerator
kClockManagerNotifyRecover 

Notify IP to recover to previous work state.

kClockManagerNotifyBefore 

Notify IP that system will change clock setting.

kClockManagerNotifyAfter 

Notify IP that have changed to new clock setting.

Enumerator
kClockManagerCallbackBefore 

Callback handles BEFORE notification.

kClockManagerCallbackAfter 

Callback handles AFTER notification.

kClockManagerCallbackBeforeAfter 

Callback handles BEFORE and AFTER notification.

Enumerator
kClockManagerPolicyAgreement 

Clock transfers gracefully.

kClockManagerPolicyForcible 

Clock transfers forcefully.

Function Documentation

clock_manager_error_code_t CLOCK_SYS_GetFreq ( clock_names_t  clockName,
uint32_t *  frequency 
)

This function checks the current clock configurations and then calculates the clock frequency for a specific clock name defined in clock_names_t. The MCG must be properly configured before using this function. See the reference manual for supported clock names for different chip families. The returned value is in Hertz. If it cannot find the clock name or the name is not supported for a specific chip family, it returns an error.

Parameters
clockNameClock names defined in clock_names_t
frequencyReturned clock frequency value in Hertz
Returns
status Error code defined in clock_manager_error_code_t
uint32_t CLOCK_SYS_GetCoreClockFreq ( void  )

This function gets the core clock frequency.

Returns
Current core clock frequency.
uint32_t CLOCK_SYS_GetSystemClockFreq ( void  )

This function gets the system clock frequency.

Returns
Current system clock frequency.
uint32_t CLOCK_SYS_GetBusClockFreq ( void  )

This function gets the bus clock frequency.

Returns
Current bus clock frequency.
uint32_t CLOCK_SYS_GetFlashClockFreq ( void  )

This function gets the flash clock frequency.

Returns
Current flash clock frequency.
static uint32_t CLOCK_SYS_GetLpoClockFreq ( void  )
inlinestatic

This function gets the LPO clock frequency.

Returns
Current clock frequency.
static void CLOCK_SYS_SetSystickSrc ( clock_systick_src_t  src)
inlinestatic

This function selects the clock source for Systick. The Systick clock source can be an external reference clock or a processor clock. See a reference manual for details.

Parameters
srcClock source for Systick.
static uint32_t CLOCK_SYS_GetSystickFreq ( void  )
inlinestatic

This function gets the clock frequency for Systick. The Systick clock source can be an external reference clock or a processor clock. See a reference manual for details.

Returns
Clock frequency for Systick.
clock_manager_error_code_t CLOCK_SYS_Init ( clock_manager_user_config_t const **  clockConfigsPtr,
uint8_t  configsNumber,
clock_manager_callback_user_config_t **  callbacksPtr,
uint8_t  callbacksNumber 
)

This function installs the pre-defined clock configuration table to the Clock Manager.

Parameters
clockConfigsPtrPointer to the clock configuration table.
configsNumberNumber of clock configurations in table.
callbacksPtrPointer to the callback configuration table.
callbacksNumberNumber of callback configurations in table.
Returns
Error code.
clock_manager_error_code_t CLOCK_SYS_UpdateConfiguration ( uint8_t  targetConfigIndex,
clock_manager_policy_t  policy 
)

This function sets the system to the target clock configuration. Before transition, the Clock Manager sends notifications to all drivers registered to the callback table. When the graceful policy is used, if some drivers are not ready to change, the clock transition does not occur, all drivers still work in the previous configuration, and error is returned. When the forceful policy is used, all drivers should stop work and the system changes to the new clock configuration.

Parameters
targetConfigIndexIndex of the clock configuration.
policyTransaction policy, graceful or forceful.
Returns
Error code.
Note
If the external clock is used in the target mode, make sure it is enabled, for example, if the external oscillator is used, set up the EREFS/HGO correctly and make sure that OSCINIT is set.
clock_manager_error_code_t CLOCK_SYS_SetConfiguration ( clock_manager_user_config_t const *  config)

This function sets the system to the target configuration. It only sets the clock module registers for clock mode change, but does not send notifications to drivers. This function is different for each SoC.

Parameters
configTarget configuration.
Returns
Error code.
Note
If an external clock is used in the target mode, make sure it is enabled, for example, if the external oscillator is used, set up the EREFS/HGO correctly and make sure that OSCINIT is set.
uint8_t CLOCK_SYS_GetCurrentConfiguration ( void  )
Returns
Current clock configuration index.
clock_manager_callback_user_config_t* CLOCK_SYS_GetErrorCallback ( void  )

When the graceful policy is used, if an IP is not ready to change the clock setting, the callback returns an error and the system stays in the current configuration. Applications can use this function to check which IP callback returns an error.

Returns
Pointer to the callback which returns error.
mcglite_mode_error_t CLOCK_SYS_SetMcgliteMode ( mcglite_config_t const *  targetConfig)

This function sets the MCGLite to a mode according to the configuration parameter.

Parameters
targetConfigPointer to the configure structure.
Returns
Error code.
void CLOCK_SYS_SetSimConfigration ( sim_config_t const *  simConfig)
Parameters
simConfigPointer to the target SIM configuration structure.
clock_manager_error_code_t CLOCK_SYS_OscInit ( uint32_t  instance,
osc_user_config_t config 
)

This function initializes the OSC according to the board configuration.

Parameters
instanceInstance of the OSC.
configPointer to the OSC configuration structure.
Returns
kClockManagerSuccess on success.
void CLOCK_SYS_OscDeinit ( uint32_t  instance)

This function deinitializes the OSC.

Parameters
instanceInstance of the OSC.
void CLOCK_SYS_SetOscerConfigration ( uint32_t  instance,
oscer_config_t const *  config 
)

This function configures the OSCERCLK, including whether OSCERCLK is enabled in normal mode and stop mode or not.

Parameters
instanceInstance of the OSC.
configPointer to the OSCERCLK configuration structure.
clock_manager_error_code_t CLOCK_SYS_RtcOscInit ( uint32_t  instance,
rtc_osc_user_config_t config 
)

This function initializes the RTC OSC according to the board configuration.

Parameters
instanceInstance of the RTC OSC.
configPointer to the configuration structure.
Returns
kClockManagerSuccess on success.
void CLOCK_SYS_RtcOscDeinit ( uint32_t  instance)

This function deinitializes the RTC OSC.

Parameters
instanceInstance of the RTC OSC.
static void CLOCK_SYS_SetOutDiv1 ( uint8_t  outdiv1)
inlinestatic

This function sets divide value OUTDIV1.

Parameters
outdiv1Outdivider1 setting
static uint8_t CLOCK_SYS_GetOutDiv1 ( void  )
inlinestatic

This function gets divide value OUTDIV1.

Returns
Outdivider1 setting
static void CLOCK_SYS_SetOutDiv2 ( uint8_t  outdiv2)
inlinestatic

This function sets divide value OUTDIV2.

Parameters
outdiv2Outdivider2 setting
static uint8_t CLOCK_SYS_GetOutDiv2 ( void  )
inlinestatic

This function gets divide value OUTDIV2.

Returns
Outdivider2 setting
static void CLOCK_SYS_SetOutDiv4 ( uint8_t  outdiv4)
inlinestatic

This function sets divide value OUTDIV4.

Parameters
outdiv4Outdivider4 setting
static uint8_t CLOCK_SYS_GetOutDiv4 ( void  )
inlinestatic

This function gets divide value OUTDIV4.

Returns
Outdivider4 setting
static void CLOCK_SYS_SetOutDiv ( uint8_t  outdiv1,
uint8_t  outdiv2,
uint8_t  outdiv3,
uint8_t  outdiv4 
)
inlinestatic

This function sets the setting for all clock out dividers at the same time.

Parameters
outdiv1Outdivider1 setting
outdiv2Outdivider2 setting
outdiv3Outdivider3 setting
outdiv4Outdivider4 setting
static void CLOCK_SYS_GetOutDiv ( uint8_t *  outdiv1,
uint8_t *  outdiv2,
uint8_t *  outdiv3,
uint8_t *  outdiv4 
)
inlinestatic

This function gets the setting for all clock out dividers at the same time.

Parameters
outdiv1Outdivider1 setting
outdiv2Outdivider2 setting
outdiv3Outdivider3 setting
outdiv4Outdivider4 setting
uint32_t CLOCK_SYS_GetPllFllClockFreq ( void  )

This function gets the frequency of the MCGPLLCLK/MCGFLLCLK/IRC48MCLK.

Returns
Current clock frequency.
static void CLOCK_SYS_SetPllfllSel ( clock_pllfll_sel_t  setting)
inlinestatic

This function sets the selection of the high frequency clock for various peripheral clocking options

Parameters
settingThe value to set.
static clock_pllfll_sel_t CLOCK_SYS_GetPllfllSel ( void  )
inlinestatic

This function gets the selection of the high frequency clock for various peripheral clocking options

Returns
Current selection.
static uint32_t CLOCK_SYS_GetFixedFreqClockFreq ( void  )
inlinestatic

This function gets the MCG fixed frequency clock (MCGFFCLK) frequency.

Returns
Current clock frequency.
static uint32_t CLOCK_SYS_GetInternalRefClockFreq ( void  )
inlinestatic

This function gets the internal reference clock frequency.

Returns
Current clock frequency.
uint32_t CLOCK_SYS_GetExternalRefClock32kFreq ( void  )

This function gets the external reference (ERCLK32K) clock frequency.

Returns
Current frequency.
static void CLOCK_SYS_SetExternalRefClock32kSrc ( clock_er32k_src_t  src)
inlinestatic

This function sets the clock selection of ERCLK32K.

Parameters
srcclock source.
static clock_er32k_src_t CLOCK_SYS_GetExternalRefClock32kSrc ( void  )
inlinestatic

This function gets the clock selection of ERCLK32K.

Returns
Current selection.
uint32_t CLOCK_SYS_GetOsc0ExternalRefClockFreq ( void  )

Gets the frequency.

This function gets the OSC0 external reference frequency.

Returns
Current frequency.
uint32_t CLOCK_SYS_GetOsc0ExternalRefClockUndivFreq ( void  )

This function gets the undivided OSC0 external reference frequency.

Returns
Current frequency.
uint32_t CLOCK_SYS_GetWdogFreq ( uint32_t  instance,
clock_wdog_src_t  wdogSrc 
)

This function gets the watch dog clock frequency.

Parameters
instancemodule device instance
wdogSrcwatch dog clock source selection, WDOG_STCTRLH[CLKSRC].
Returns
Current frequency.
static clock_trace_src_t CLOCK_SYS_GetTraceSrc ( uint32_t  instance)
inlinestatic

This function gets the debug trace clock source.

Parameters
instancemodule device instance
Returns
Current source.
static void CLOCK_SYS_SetTraceSrc ( uint32_t  instance,
clock_trace_src_t  src 
)
inlinestatic

This function sets the debug trace clock source.

Parameters
instancemodule device instance.
srcdebug trace clock source.
uint32_t CLOCK_SYS_GetTraceFreq ( uint32_t  instance)

This function gets the debug trace clock frequency.

Parameters
instancemodule device instance
Returns
Current frequency.

This function gets the debug trace clock frequency.

Parameters
instancemodule device instance.
Returns
Current frequency.
uint32_t CLOCK_SYS_GetPortFilterFreq ( uint32_t  instance,
clock_port_filter_src_t  src 
)

This function gets the PORTx digital input filter clock frequency.

Parameters
instancemodule device instance.
srcPORTx source selection.
Returns
Current frequency.
uint32_t CLOCK_SYS_GetLptmrFreq ( uint32_t  instance,
clock_lptmr_src_t  lptmrSrc 
)

This function gets the LPTMRx pre-scaler/glitch filter clock frequency.

Parameters
instancemodule device instance
lptmrSrcLPTMRx clock source selection.
Returns
Current frequency.
static uint32_t CLOCK_SYS_GetEwmFreq ( uint32_t  instance)
inlinestatic

This function gets the clock frequency for EWM module.

Parameters
instancemodule device instance
Returns
freq clock frequency for this module

This function gets the clock frequence for EWM moudle.

Parameters
instancemodule device instance
Returns
freq clock frequence for this module
static uint32_t CLOCK_SYS_GetFtfFreq ( uint32_t  instance)
inlinestatic

(Flash Memory)

This function gets the clock frequency for FTF module. (Flash Memory)

Parameters
instancemodule device instance
Returns
freq clock frequency for this module

(Flash Memory)

This function gets the clock frequence for FTF module. (Flash Memory)

Parameters
instancemodule device instance
Returns
freq clock frequence for this module
static uint32_t CLOCK_SYS_GetCrcFreq ( uint32_t  instance)
inlinestatic

This function gets the clock frequency for CRC module.

Parameters
instancemodule device instance
Returns
freq clock frequency for this module

This function gets the clock frequence for CRC module.

Parameters
instancemodule device instance
Returns
freq clock frequence for this module
static uint32_t CLOCK_SYS_GetCmpFreq ( uint32_t  instance)
inlinestatic

This function gets the clock frequency for CMP module.

Parameters
instancemodule device instance
Returns
freq clock frequency for this module

This function gets the clock frequence for CMP module.

Parameters
instancemodule device instance
Returns
freq clock frequence for this module
static uint32_t CLOCK_SYS_GetVrefFreq ( uint32_t  instance)
inlinestatic

This function gets the clock frequency for VREF module.

Parameters
instancemodule device instance
Returns
freq clock frequency for this module
static uint32_t CLOCK_SYS_GetPdbFreq ( uint32_t  instance)
inlinestatic

This function gets the clock frequency for PDB module.

Parameters
instancemodule device instance
Returns
freq clock frequency for this module

This function gets the clock frequence for PDB module.

Parameters
instancemodule device instance
Returns
freq clock frequence for this module
static uint32_t CLOCK_SYS_GetPitFreq ( uint32_t  instance)
inlinestatic

This function gets the clock frequency for PIT module.

Parameters
instancemodule device instance
Returns
freq clock frequency for this module

This function gets the clock frequence for PIT module.

Parameters
instancemodule device instance
Returns
freq clock frequence for this module
static uint32_t CLOCK_SYS_GetSpiFreq ( uint32_t  instance)
inlinestatic

Gets the clock frequency for USB FS OTG module.

This function gets the clock frequency for SPI module.

Parameters
instancemodule device instance
Returns
freq clock frequency for this module

This function gets the clock frequency for USB FS OTG module.

Parameters
instancemodule device instance
Returns
freq clock frequency for this module

Gets the clock frequency for SPI module

This function gets the clock frequency for SPI module.

Parameters
instancemodule device instance
Returns
freq clock frequency for this module

This function gets the clock frequence for SPI module.

Parameters
instancemodule device instance
Returns
freq clock frequence for this module
static uint32_t CLOCK_SYS_GetI2cFreq ( uint32_t  instance)
inlinestatic

This function gets the clock frequency for I2C module.

Parameters
instancemodule device instance
Returns
freq clock frequency for this module

This function gets the clock frequence for I2C module.

Parameters
instancemodule device instance
Returns
freq clock frequence for this module
static uint32_t CLOCK_SYS_GetAdcAltFreq ( uint32_t  instance)
inlinestatic

This function gets the ADC alternate clock frequency.

Parameters
instancemodule device instance
Returns
freq Current frequency.
static uint32_t CLOCK_SYS_GetAdcAlt2Freq ( uint32_t  instance)
inlinestatic

This function gets the ADC alternate 2 clock frequency (ALTCLK2).

Parameters
instancemodule device instance
Returns
freq Current frequency.
static uint32_t CLOCK_SYS_GetFtmFixedFreq ( uint32_t  instance)
inlinestatic

This function gets the FTM fixed frequency clock frequency.

Parameters
instancemodule device instance
Returns
freq Current frequency.
static uint32_t CLOCK_SYS_GetFtmSystemClockFreq ( uint32_t  instance)
inlinestatic

This function gets the FTM's system clock frequency.

Parameters
instancemodule device instance
Returns
Current frequency.
uint32_t CLOCK_SYS_GetFtmExternalFreq ( uint32_t  instance)

This function gets the FTM external clock frequency.

Parameters
instancemodule device instance
Returns
freq Current frequency.
static sim_ftm_clk_sel_t CLOCK_SYS_GetFtmExternalSrc ( uint32_t  instance)
inlinestatic

This function gets the FTM external clock source.

Parameters
instancemodule device instance.
Returns
Ftm external clock source.
static void CLOCK_SYS_SetFtmExternalSrc ( uint32_t  instance,
sim_ftm_clk_sel_t  ftmSrc 
)
inlinestatic

This function sets the FTM external clock source.

Parameters
instancemodule device instance.
ftmSrcFTM clock source setting.
uint32_t CLOCK_SYS_GetUartFreq ( uint32_t  instance)
inline

Get the UART clock frequency.

This function gets the clock frequency for UART module.

Parameters
instancemodule device instance
Returns
freq clock frequency for this module

This function gets the UART clock frequency.

Parameters
instanceIP instance.
Returns
Current frequency.

This function gets the clock frequence for UART module.

Parameters
instancemodule device instance
Returns
freq clock frequence for this module
static uint32_t CLOCK_SYS_GetGpioFreq ( uint32_t  instance)
inlinestatic

This function gets the clock frequency for GPIO module.

Parameters
instancemodule device instance
Returns
freq clock frequency for this module

This function gets the clock frequence for GPIO module.

Parameters
instancemodule device instance
Returns
freq clock frequence for this module
static void CLOCK_SYS_EnableDmaClock ( uint32_t  instance)
inlinestatic

This function enables the clock for DMA module.

Parameters
instancemodule device instance
static void CLOCK_SYS_DisableDmaClock ( uint32_t  instance)
inlinestatic

This function disables the clock for DMA module.

Parameters
instancemodule device instance
static bool CLOCK_SYS_GetDmaGateCmd ( uint32_t  instance)
inlinestatic

This function will get the clock gate state for DMA module.

Parameters
instancemodule device instance
Returns
state true - ungated(Enabled), false - gated (Disabled)
static void CLOCK_SYS_EnableDmamuxClock ( uint32_t  instance)
inlinestatic

This function enables the clock for DMAMUX module.

Parameters
instancemodule device instance
static void CLOCK_SYS_DisableDmamuxClock ( uint32_t  instance)
inlinestatic

This function disables the clock for DMAMUX module.

Parameters
instancemodule device instance
static bool CLOCK_SYS_GetDmamuxGateCmd ( uint32_t  instance)
inlinestatic

This function will get the clock gate state for DMAMUX module.

Parameters
instancemodule device instance
Returns
state true - ungated(Enabled), false - gated (Disabled)
void CLOCK_SYS_EnablePortClock ( uint32_t  instance)

This function enables the clock for PORT module.

Parameters
instancemodule device instance
void CLOCK_SYS_DisablePortClock ( uint32_t  instance)

This function disables the clock for PORT module.

Parameters
instancemodule device instance
bool CLOCK_SYS_GetPortGateCmd ( uint32_t  instance)

This function will get the clock gate state for PORT module.

Parameters
instancemodule device instance
Returns
state true - ungated(Enabled), false - gated (Disabled)
static void CLOCK_SYS_EnableEwmClock ( uint32_t  instance)
inlinestatic

This function enables the clock for EWM module.

Parameters
instancemodule device instance
static void CLOCK_SYS_DisableEwmClock ( uint32_t  instance)
inlinestatic

This function disables the clock for EWM module.

Parameters
instancemodule device instance
static bool CLOCK_SYS_GetEwmGateCmd ( uint32_t  instance)
inlinestatic

This function will get the clock gate state for EWM module.

Parameters
instancemodule device instance
Returns
state true - ungated(Enabled), false - gated (Disabled)
static void CLOCK_SYS_EnableFtfClock ( uint32_t  instance)
inlinestatic

This function enables the clock for FTF module.

Parameters
instancemodule device instance
static void CLOCK_SYS_DisableFtfClock ( uint32_t  instance)
inlinestatic

This function disables the clock for FTF module.

Parameters
instancemodule device instance
static bool CLOCK_SYS_GetFtfGateCmd ( uint32_t  instance)
inlinestatic

This function will get the clock gate state for FTF module.

Parameters
instancemodule device instance
Returns
state true - ungated(Enabled), false - gated (Disabled)
static void CLOCK_SYS_EnableCrcClock ( uint32_t  instance)
inlinestatic

This function enables the clock for CRC module.

Parameters
instancemodule device instance
static void CLOCK_SYS_DisableCrcClock ( uint32_t  instance)
inlinestatic

This function disables the clock for CRC module.

Parameters
instancemodule device instance
static bool CLOCK_SYS_GetCrcGateCmd ( uint32_t  instance)
inlinestatic

This function will get the clock gate state for CRC module.

Parameters
instancemodule device instance
Returns
state true - ungated(Enabled), false - gated (Disabled)
void CLOCK_SYS_EnableAdcClock ( uint32_t  instance)
inline

This function enables the clock for ADC module.

Parameters
instancemodule device instance

This function enables the clock for ADC moudle.

Parameters
instancemodule device instance
void CLOCK_SYS_DisableAdcClock ( uint32_t  instance)
inline

This function disables the clock for ADC module.

Parameters
instancemodule device instance

This function disables the clock for ADC moudle.

Parameters
instancemodule device instance
bool CLOCK_SYS_GetAdcGateCmd ( uint32_t  instance)
inline

This function will get the clock gate state for ADC module.

Parameters
instancemodule device instance
Returns
state true - ungated(Enabled), false - gated (Disabled)

This function will get the clock gate state for ADC moudle.

Parameters
instancemodule device instance
Returns
state true - ungated(Enabled), false - gated (Disabled)
static void CLOCK_SYS_EnableCmpClock ( uint32_t  instance)
inlinestatic

This function enables the clock for CMP module.

Parameters
instancemodule device instance
static void CLOCK_SYS_DisableCmpClock ( uint32_t  instance)
inlinestatic

This function disables the clock for CMP module.

Parameters
instancemodule device instance
static bool CLOCK_SYS_GetCmpGateCmd ( uint32_t  instance)
inlinestatic

This function will get the clock gate state for CMP module.

Parameters
instancemodule device instance
Returns
state true - ungated(Enabled), false - gated (Disabled)
void CLOCK_SYS_EnableDacClock ( uint32_t  instance)
inline

This function enables the clock for DAC module.

Parameters
instancemodule device instance

This function enables the clock for DAC moudle.

Parameters
instancemodule device instance
void CLOCK_SYS_DisableDacClock ( uint32_t  instance)
inline

This function disables the clock for DAC module.

Parameters
instancemodule device instance

This function disables the clock for DAC moudle.

Parameters
instancemodule device instance
bool CLOCK_SYS_GetDacGateCmd ( uint32_t  instance)
inline

This function will get the clock gate state for DAC module.

Parameters
instancemodule device instance
Returns
state true - ungated(Enabled), false - gated (Disabled)

This function will get the clock gate state for DAC moudle.

Parameters
instancemodule device instance
Returns
state true - ungated(Enabled), false - gated (Disabled)
static void CLOCK_SYS_EnableVrefClock ( uint32_t  instance)
inlinestatic

This function enables the clock for VREF module.

Parameters
instancemodule device instance
static void CLOCK_SYS_DisableVrefClock ( uint32_t  instance)
inlinestatic

This function disables the clock for VREF module.

Parameters
instancemodule device instance
static bool CLOCK_SYS_GetVrefGateCmd ( uint32_t  instance)
inlinestatic

This function will get the clock gate state for VREF module.

Parameters
instancemodule device instance
Returns
state true - ungated(Enabled), false - gated (Disabled)
static void CLOCK_SYS_EnablePdbClock ( uint32_t  instance)
inlinestatic

This function enables the clock for PDB module.

Parameters
instancemodule device instance
static void CLOCK_SYS_DisablePdbClock ( uint32_t  instance)
inlinestatic

This function disables the clock for PDB module.

Parameters
instancemodule device instance
static bool CLOCK_SYS_GetPdbGateCmd ( uint32_t  instance)
inlinestatic

This function will get the clock gate state for PDB module.

Parameters
instancemodule device instance
Returns
state true - ungated(Enabled), false - gated (Disabled)
void CLOCK_SYS_EnableFtmClock ( uint32_t  instance)
inline

This function enables the clock for FTM module.

Parameters
instancemodule device instance

This function enables the clock for FTM moudle.

Parameters
instancemodule device instance
void CLOCK_SYS_DisableFtmClock ( uint32_t  instance)
inline

This function disables the clock for FTM module.

Parameters
instancemodule device instance

This function disables the clock for FTM moudle.

Parameters
instancemodule device instance
bool CLOCK_SYS_GetFtmGateCmd ( uint32_t  instance)
inline

This function will get the clock gate state for FTM module.

Parameters
instancemodule device instance
Returns
state true - ungated(Enabled), false - gated (Disabled)

This function will get the clock gate state for FTM moudle.

Parameters
instancemodule device instance
Returns
state true - ungated(Enabled), false - gated (Disabled)
static void CLOCK_SYS_EnablePitClock ( uint32_t  instance)
inlinestatic

This function enables the clock for PIT module.

Parameters
instancemodule device instance
static void CLOCK_SYS_DisablePitClock ( uint32_t  instance)
inlinestatic

This function disables the clock for PIT module.

Parameters
instancemodule device instance
static bool CLOCK_SYS_GetPitGateCmd ( uint32_t  instance)
inlinestatic

This function will get the clock gate state for PIT module.

Parameters
instancemodule device instance
Returns
state true - ungated(Enabled), false - gated (Disabled)
static void CLOCK_SYS_EnableLptmrClock ( uint32_t  instance)
inlinestatic

Enable the clock for LPTMR module.

This function enables the clock for LPTIMER module.

Parameters
instancemodule device instance

This function enables the clock for LPTMR module.

Parameters
instancemodule device instance
static void CLOCK_SYS_DisableLptmrClock ( uint32_t  instance)
inlinestatic

Disable the clock for LPTMR module.

This function disables the clock for LPTIMER module.

Parameters
instancemodule device instance

This function disables the clock for LPTMR module.

Parameters
instancemodule device instance
static bool CLOCK_SYS_GetLptmrGateCmd ( uint32_t  instance)
inlinestatic

Get the the clock gate state for LPTMR module.

This function will get the clock gate state for LPTIMER module.

Parameters
instancemodule device instance
Returns
state true - ungated(Enabled), false - gated (Disabled)

This function will get the clock gate state for LPTMR module.

Parameters
instancemodule device instance
Returns
state true - ungated(Enabled), false - gated (Disabled)
void CLOCK_SYS_EnableSpiClock ( uint32_t  instance)
inline

Enable the clock for USBFS module.

This function enables the clock for SPI module.

Parameters
instancemodule device instance

This function enables the clock for USBFS module.

Parameters
instancemodule device instance

Enable the clock for SPI module.

This function enables the clock for SPI module.

Parameters
instancemodule device instance

This function enables the clock for SPI moudle.

Parameters
instancemodule device instance
void CLOCK_SYS_DisableSpiClock ( uint32_t  instance)
inline

This function disables the clock for SPI module.

Parameters
instancemodule device instance

This function disables the clock for SPI moudle.

Parameters
instancemodule device instance
bool CLOCK_SYS_GetSpiGateCmd ( uint32_t  instance)
inline

This function will get the clock gate state for SPI module.

Parameters
instancemodule device instance
Returns
state true - ungated(Enabled), false - gated (Disabled)

This function will get the clock gate state for SPI moudle.

Parameters
instancemodule device instance
Returns
state true - ungated(Enabled), false - gated (Disabled)
void CLOCK_SYS_EnableI2cClock ( uint32_t  instance)
inline

This function enables the clock for I2C module.

Parameters
instancemodule device instance

This function enables the clock for I2C moudle.

Parameters
instancemodule device instance
void CLOCK_SYS_DisableI2cClock ( uint32_t  instance)
inline

This function disables the clock for I2C module.

Parameters
instancemodule device instance

This function disables the clock for I2C moudle.

Parameters
instancemodule device instance
bool CLOCK_SYS_GetI2cGateCmd ( uint32_t  instance)
inline

This function will get the clock gate state for I2C module.

Parameters
instancemodule device instance
Returns
state true - ungated(Enabled), false - gated (Disabled)

This function will get the clock gate state for I2C moudle.

Parameters
instancemodule device instance
Returns
state true - ungated(Enabled), false - gated (Disabled)
void CLOCK_SYS_EnableUartClock ( uint32_t  instance)
inline

This function enables the clock for UART module.

Parameters
instancemodule device instance

This function enables the clock for UART moudle.

Parameters
instancemodule device instance
void CLOCK_SYS_DisableUartClock ( uint32_t  instance)
inline

This function disables the clock for UART module.

Parameters
instancemodule device instance

This function disables the clock for UART moudle.

Parameters
instancemodule device instance
bool CLOCK_SYS_GetUartGateCmd ( uint32_t  instance)
inline

This function will get the clock gate state for UART module.

Parameters
instancemodule device instance
Returns
state true - ungated(Enabled), false - gated (Disabled)

This function will get the clock gate state for UART moudle.

Parameters
instancemodule device instance
Returns
state true - ungated(Enabled), false - gated (Disabled)
static void CLOCK_SYS_SetFtmExternalFreq ( uint32_t  srcInstance,
uint32_t  freq 
)
inlinestatic

This function sets the FTM external clock frequency (FTM_CLKx).

Parameters
srcInstanceExternal source instance.
freqFrequency value.
static void CLOCK_SYS_SetOutDiv3 ( uint8_t  outdiv3)
inlinestatic

This function sets divide value OUTDIV3.

Parameters
outdiv3Outdivider3 setting
static uint8_t CLOCK_SYS_GetOutDiv3 ( void  )
inlinestatic

This function gets divide value OUTDIV3.

Returns
Outdivider3 setting
uint32_t CLOCK_SYS_GetFlexbusFreq ( void  )

This function gets the flexbus clock frequency.

Returns
Current flexbus clock frequency.
static uint32_t CLOCK_SYS_GetRtcFreq ( uint32_t  instance)
inlinestatic

This function gets the RTC input clock frequency.

Parameters
instancemodule device instance
Returns
Current frequency.
uint32_t CLOCK_SYS_GetRtcOutFreq ( void  )

This function gets the frequency of RTC_CLKOUT.

Returns
Current frequency.
static clock_rtcout_src_t CLOCK_SYS_GetRtcOutSrc ( void  )
inlinestatic

This function gets the source of RTC_CLKOUT. It is determined by RTCCLKOUTSEL.

Returns
Current source.
static void CLOCK_SYS_SetRtcOutSrc ( clock_rtcout_src_t  src)
inlinestatic

This function sets the source of RTC_CLKOUT.

Parameters
srcRTC_CLKOUT source to set.
static clock_rmii_src_t CLOCK_SYS_GetEnetRmiiSrc ( uint32_t  instance)
inlinestatic

This function gets the ethernet RMII clock source.

Parameters
instancemodule device instance
Returns
Current source.
static void CLOCK_SYS_SetEnetRmiiSrc ( uint32_t  instance,
clock_rmii_src_t  rmiiSrc 
)
inlinestatic

This function sets the ethernet RMII clock source.

Parameters
instancemodule device instance.
rmiiSrcRMII clock source.
uint32_t CLOCK_SYS_GetEnetRmiiFreq ( uint32_t  instance)

This function gets the ethernet RMII clock frequency.

Parameters
instancemodule device instance
Returns
Current frequency.
uint32_t CLOCK_SYS_GetFlexcanFreq ( uint32_t  instance,
clock_flexcan_src_t  flexcanSrc 
)

This function gets the FLEXCAN clock frequency.

Parameters
instancemodule device instance
flexcanSrcclock source
Returns
Current frequency.
static void CLOCK_SYS_SetEnetTimeStampSrc ( uint32_t  instance,
clock_time_src_t  timeSrc 
)
inlinestatic

This function sets the ethernet timestamp clock source selection.

Parameters
instancemodule device instance.
timeSrcEthernet timestamp clock source.
static clock_time_src_t CLOCK_SYS_GetEnetTimeStampSrc ( uint32_t  instance)
inlinestatic

This function gets the ethernet timestamp clock source selection.

Parameters
instanceIP instance.
Returns
Current source.
uint32_t CLOCK_SYS_GetEnetTimeStampFreq ( uint32_t  instance)

This function gets the ethernet timestamp clock frequency.

Parameters
instancemodule device instance
Returns
Current frequency.
static uint32_t CLOCK_SYS_GetCmtFreq ( uint32_t  instance)
inlinestatic

This function gets the clock frequency for CMT module.

Parameters
instancemodule device instance
Returns
freq clock frequency for this module
uint32_t CLOCK_SYS_GetSdhcFreq ( uint32_t  instance)

This function gets the clock frequency for SDHC.

Parameters
instancemodule device instance
Returns
freq clock frequency for this module.
static void CLOCK_SYS_SetSdhcSrc ( uint32_t  instance,
clock_sdhc_src_t  setting 
)
inlinestatic

This function sets the SDHC clock source selection.

Parameters
instanceIP instance.
settingThe value to set.
static clock_sdhc_src_t CLOCK_SYS_GetSdhcSrc ( uint32_t  instance)
inlinestatic

This function gets the SDHC clock source selection.

Parameters
instanceIP instance.
Returns
Current selection.
uint32_t CLOCK_SYS_GetSaiFreq ( uint32_t  instance,
clock_sai_src_t  saiSrc 
)

This function gets the clock frequency for SAI.

Parameters
instancemodule device instance.
saiSrcSAI clock source selection according to its internal register.
Returns
freq clock frequency for this module.
static uint32_t CLOCK_SYS_GetUsbdcdFreq ( uint32_t  instance)
inlinestatic

This function gets the clock frequency for USB DCD module.

Parameters
instancemodule device instance
Returns
freq clock frequency for this module
static void CLOCK_SYS_EnableMpuClock ( uint32_t  instance)
inlinestatic

This function enables the clock for MPU module.

Parameters
instancemodule device instance
static void CLOCK_SYS_DisableMpuClock ( uint32_t  instance)
inlinestatic

This function disables the clock for MPU module.

Parameters
instancemodule device instance
static bool CLOCK_SYS_GetMpuGateCmd ( uint32_t  instance)
inlinestatic

This function will get the clock gate state for MPU module.

Parameters
instancemodule device instance
Returns
state true - ungated(Enabled), false - gated (Disabled)
static void CLOCK_SYS_EnableFlexbusClock ( uint32_t  instance)
inlinestatic

This function enables the clock for FLEXBUS module.

Parameters
instancemodule device instance
static void CLOCK_SYS_DisableFlexbusClock ( uint32_t  instance)
inlinestatic

This function disables the clock for FLEXBUS module.

Parameters
instancemodule device instance
static bool CLOCK_SYS_GetFlexbusGateCmd ( uint32_t  instance)
inlinestatic

This function will get the clock gate state for FLEXBUS module.

Parameters
instancemodule device instance
Returns
state true - ungated(Enabled), false - gated (Disabled)
static void CLOCK_SYS_EnableRngaClock ( uint32_t  instance)
inlinestatic

This function enables the clock for RNGA module.

Parameters
instancemodule device instance
static void CLOCK_SYS_DisableRngaClock ( uint32_t  instance)
inlinestatic

This function disables the clock for RNGA module.

Parameters
instancemodule device instance
static bool CLOCK_SYS_GetRngaGateCmd ( uint32_t  instance)
inlinestatic

This function will get the clock gate state for RNGA module.

Parameters
instancemodule device instance
Returns
state true - ungated(Enabled), false - gated (Disabled)
static void CLOCK_SYS_EnableSaiClock ( uint32_t  instance)
inlinestatic

This function enables the clock for SAI module.

Parameters
instancemodule device instance
static void CLOCK_SYS_DisableSaiClock ( uint32_t  instance)
inlinestatic

This function disables the clock for SAI module.

Parameters
instancemodule device instance
static bool CLOCK_SYS_GetSaiGateCmd ( uint32_t  instance)
inlinestatic

This function will get the clock gate state for SAI module.

Parameters
instancemodule device instance
Returns
state true - ungated(Enabled), false - gated (Disabled)
static void CLOCK_SYS_EnableCmtClock ( uint32_t  instance)
inlinestatic

This function enables the clock for CMT module.

Parameters
instancemodule device instance
static void CLOCK_SYS_DisableCmtClock ( uint32_t  instance)
inlinestatic

This function disables the clock for CMT module.

Parameters
instancemodule device instance
static bool CLOCK_SYS_GetCmtGateCmd ( uint32_t  instance)
inlinestatic

This function will get the clock gate state for CMT module.

Parameters
instancemodule device instance
Returns
state true - ungated(Enabled), false - gated (Disabled)
static void CLOCK_SYS_EnableRtcClock ( uint32_t  instance)
inlinestatic

This function enables the clock for RTC module.

Parameters
instancemodule device instance
static void CLOCK_SYS_DisableRtcClock ( uint32_t  instance)
inlinestatic

This function disables the clock for RTC module.

Parameters
instancemodule device instance
static bool CLOCK_SYS_GetRtcGateCmd ( uint32_t  instance)
inlinestatic

This function will get the clock gate state for RTC module.

Parameters
instancemodule device instance
Returns
state true - ungated(Enabled), false - gated (Disabled)
static void CLOCK_SYS_EnableEnetClock ( uint32_t  instance)
inlinestatic

This function enables the clock for ENET module.

Parameters
instancemodule device instance
static void CLOCK_SYS_DisableEnetClock ( uint32_t  instance)
inlinestatic

This function disables the clock for ENET module.

Parameters
instancemodule device instance
static bool CLOCK_SYS_GetEnetGateCmd ( uint32_t  instance)
inlinestatic

This function will get the clock gate state for ENET module.

Parameters
instancemodule device instance
Returns
state true - ungated(Enabled), false - gated (Disabled)
static void CLOCK_SYS_EnableFlexcanClock ( uint32_t  instance)
inline

This function enables the clock for FLEXCAN module.

Parameters
instancemodule device instance

This function enables the clock for FLEXCAN moudle.

Parameters
instancemodule device instance
static void CLOCK_SYS_DisableFlexcanClock ( uint32_t  instance)
inline

This function disables the clock for FLEXCAN module.

Parameters
instancemodule device instance

This function disables the clock for FLEXCAN moudle.

Parameters
instancemodule device instance
static bool CLOCK_SYS_GetFlexcanGateCmd ( uint32_t  instance)
inline

This function will get the clock gate state for FLEXCAN module.

Parameters
instancemodule device instance
Returns
state true - ungated(Enabled), false - gated (Disabled)

This function will get the clock gate state for FLEXCAN moudle.

Parameters
instancemodule device instance
Returns
state true - ungated(Enabled), false - gated (Disabled)
static void CLOCK_SYS_EnableSdhcClock ( uint32_t  instance)
inlinestatic

This function enables the clock for SDHC module.

Parameters
instancemodule device instance
static void CLOCK_SYS_DisableSdhcClock ( uint32_t  instance)
inlinestatic

This function disables the clock for SDHC module.

Parameters
instancemodule device instance
static bool CLOCK_SYS_GetSdhcGateCmd ( uint32_t  instance)
inlinestatic

This function will get the clock gate state for SDHC module.

Parameters
instancemodule device instance
Returns
state true - ungated(Enabled), false - gated (Disabled)
static void CLOCK_SYS_EnableTsiClock ( uint32_t  instance)
inlinestatic

This function enables the clock for TSI module.

Parameters
instancemodule device instance
static void CLOCK_SYS_DisableTsiClock ( uint32_t  instance)
inlinestatic

This function disables the clock for TSI module.

Parameters
instancemodule device instance
static bool CLOCK_SYS_GetTsiGateCmd ( uint32_t  instance)
inlinestatic

This function will get the clock gate state for TSI module.

Parameters
instancemodule device instance
Returns
state true - ungated(Enabled), false - gated (Disabled)
static void CLOCK_SYS_EnableLlwuClock ( uint32_t  instance)
inlinestatic

This function enables the clock for LLWU module.

Parameters
instancemodule device instance
static void CLOCK_SYS_DisableLlwuClock ( uint32_t  instance)
inlinestatic

This function disables the clock for LLWU module.

Parameters
instancemodule device instance
static bool CLOCK_SYS_GetLlwuGateCmd ( uint32_t  instance)
inlinestatic

This function will get the clock gate state for LLWU module.

Parameters
instancemodule device instance
Returns
state true - ungated(Enabled), false - gated (Disabled)
static void CLOCK_SYS_SetEnetExternalFreq ( uint32_t  srcInstance,
uint32_t  freq 
)
inlinestatic

This function sets the ENET external clock frequency (ENET_1588_CLKIN).

Parameters
srcInstanceExternal source instance.
freqFrequency value.
static void CLOCK_SYS_SetSdhcExternalFreq ( uint32_t  srcInstance,
uint32_t  freq 
)
inlinestatic

This function sets the SDHC external clock frequency (SDHC_CLKIN).

Parameters
srcInstanceExternal source instance.
freqFrequency value.
uint32_t CLOCK_SYS_GetUsbfsFreq ( uint32_t  instance)

Gets the clock frequency for USBFS module.

This function gets the clock frequency for USB FS OTG module.

Parameters
instancemodule device instance
Returns
freq clock frequency for this module

This function gets the clock frequency for USBFS module.

Parameters
instancemodule device instance
Returns
freq clock frequency for this module
static void CLOCK_SYS_SetUsbfsDiv ( uint32_t  instance,
uint8_t  usbdiv,
uint8_t  usbfrac 
)
inlinestatic

This function sets USB FS divider setting. Divider output clock = Divider input clock * [ (USBFSFRAC+1) / (USBFSDIV+1) ]

Parameters
instanceUSB FS module instance.
usbdivValue of USBFSDIV.
usbfracValue of USBFSFRAC.
static void CLOCK_SYS_GetUsbfsDiv ( uint32_t  instance,
uint8_t *  usbdiv,
uint8_t *  usbfrac 
)
inlinestatic

This function gets USB FS divider setting. Divider output clock = Divider input clock * [ (USBFSFRAC+1) / (USBFSDIV+1) ]

Parameters
instanceUSB FS module instance.
usbdivValue of USBFSDIV.
usbfracValue of USBFSFRAC.
static void CLOCK_SYS_EnableUsbfsClock ( uint32_t  instance)
inlinestatic

This function enables the clock for USBFS module.

Parameters
instancemodule device instance
static void CLOCK_SYS_DisableUsbfsClock ( uint32_t  instance)
inlinestatic

This function disables the clock for USBFS module.

Parameters
instancemodule device instance
static bool CLOCK_SYS_GetUsbfsGateCmd ( uint32_t  instance)
inlinestatic

Get the the clock gate state for USBFS module.

This function will get the clock gate state for USB module.

Parameters
instancemodule device instance
Returns
state true - ungated(Enabled), false - gated (Disabled)

This function will get the clock gate state for USBFS module.

Parameters
instancemodule device instance
Returns
state true - ungated(Enabled), false - gated (Disabled)
static void CLOCK_SYS_EnableUsbdcdClock ( uint32_t  instance)
inlinestatic

This function enables the clock for USBDCD module.

Parameters
instancemodule device instance
static void CLOCK_SYS_DisableUsbdcdClock ( uint32_t  instance)
inlinestatic

This function disables the clock for USBDCD module.

Parameters
instancemodule device instance
static bool CLOCK_SYS_GetUsbdcdGateCmd ( uint32_t  instance)
inlinestatic

This function will get the clock gate state for USBDCD module.

Parameters
instancemodule device instance
Returns
state true - ungated(Enabled), false - gated (Disabled)
static clock_usbfs_src_t CLOCK_SYS_GetUsbfsSrc ( uint32_t  instance)
inlinestatic

Gets the clock source for USBFS module.

This function gets the clock source for USB FS OTG module.

Parameters
instancemodule device instance
Returns
Clock source.

This function gets the clock source for USBFS module.

Parameters
instancemodule device instance
Returns
source Clock source for this module.
static void CLOCK_SYS_SetUsbfsSrc ( uint32_t  instance,
clock_usbfs_src_t  usbfsSrc 
)
inlinestatic

Sets the clock source for USBFS module.

This function sets the clock source for USB FS OTG module.

Parameters
instancemodule device instance.
usbfsSrcUSB FS clock source setting.

This function sets the clock source for USBFS module.

Parameters
instancemodule device instance
usbfsSrcClock source to set.
void CLOCK_SYS_Osc0Deinit ( void  )

This function deinitializes OSC0.

static void CLOCK_SYS_SetUsbExternalFreq ( uint32_t  srcInstance,
uint32_t  freq 
)
inlinestatic

This function sets the USB external clock frequency (USB_CLKIN).

Parameters
srcInstanceExternal source instance.
freqFrequcney value.
static clock_lpuart_src_t CLOCK_SYS_GetLpuartSrc ( uint32_t  instance)
inlinestatic

This function gets the clock source for LPUART module.

Parameters
instancemodule device instance
Returns
Clock source.

This function gets the clock source for LPUART module.

Parameters
instancemodule device instance
Returns
source Clock source for this module.
static void CLOCK_SYS_SetLpuartSrc ( uint32_t  instance,
clock_lpuart_src_t  lpuartSrc 
)
inlinestatic

This function sets the clock source for LPUART module.

Parameters
instancemodule device instance
lpuartSrcClock source.

This function sets the clock source for LPUART module.

Parameters
instancemodule device instance
lpuartSrcClock source to set.
uint32_t CLOCK_SYS_GetLpuartFreq ( uint32_t  instance)

Get the LPUART clock frequency.

This function gets the clock frequency for LPUART module.

Parameters
instancemodule device instance
Returns
freq clock frequency for this module

This function gets the LPUART clock frequency.

Parameters
instanceIP instance.
Returns
Current frequency.
static void CLOCK_SYS_EnableLpuartClock ( uint32_t  instance)
inlinestatic

Enable the clock for UART module.

This function enables the clock for LPUART module.

Parameters
instancemodule device instance

This function enables the clock for UART module.

Parameters
instancemodule device instance
static void CLOCK_SYS_DisableLpuartClock ( uint32_t  instance)
inlinestatic

Disable the clock for UART module.

This function disables the clock for LPUART module.

Parameters
instancemodule device instance

This function disables the clock for UART module.

Parameters
instancemodule device instance
static bool CLOCK_SYS_GetLpuartGateCmd ( uint32_t  instance)
inlinestatic

Get the the clock gate state for UART module.

This function will get the clock gate state for LPUART module.

Parameters
instancemodule device instance
Returns
state true - ungated(Enabled), false - gated (Disabled)

This function will get the clock gate state for UART module.

Parameters
instancemodule device instance
Returns
state true - ungated(Enabled), false - gated (Disabled)
uint32_t CLOCK_SYS_GetPllFllDivClockFreq ( void  )

This function gets the frequency of the PLL/FLL clock divided by the fractional divider configured by SIM_CLKDIV3[PLLFLLFRAC, PLLFLLDIV].

Returns
Current clock frequency.
uint32_t CLOCK_SYS_GetTpmFreq ( uint32_t  instance)

Gets the clock frequency for TPM module.

This function gets the TPM clock frequency.

Parameters
instancemodule device instance
Returns
Current frequency.

This function gets the clock frequency for TPM module.

Parameters
instanceIP instance.
Returns
Current frequency.

This function gets the clock frequency for TPM module.

Parameters
instancemodule device instance
Returns
freq clock frequency for this module
static void CLOCK_SYS_SetTpmSrc ( uint32_t  instance,
clock_tpm_src_t  tpmSrc 
)
inlinestatic

Sets the clock source for TPM module.

This function sets the TPM clock source selection.

Parameters
instanceIP instance.
tpmSrcThe value to set.

This function sets the clock source for TPM module.

Parameters
instancemodule device instance
tpmSrcClock source to set.
static clock_tpm_src_t CLOCK_SYS_GetTpmSrc ( uint32_t  instance)
inlinestatic

Gets the clock source for TPM module.

This function gets the TPM clock source selection.

Parameters
instanceIP instance.
Returns
Current selection.

This function gets the clock source for TPM module.

Parameters
instancemodule device instance
Returns
source Clock source for this module.
uint32_t CLOCK_SYS_GetTpmExternalFreq ( uint32_t  instance)

Gets the external clock frequency for TPM module.

Gets Tpm external clock frequency.

This function gets the TPM external clock source frequency.

Parameters
instanceIP instance.
Returns
TPM external clock frequency.

This function will get the Tpm external clock frequency.

Parameters
instancemodule device instance
Returns
Current frequency.

This function gets the externel clock frequency for TPM module.

Parameters
instancemodule device instance.
Returns
freq External clock frequency.
static void CLOCK_SYS_SetTpmExternalSrc ( uint32_t  instance,
sim_tpm_clk_sel_t  src 
)
inlinestatic

This function sets the TPM external clock source selection.

Parameters
instanceIP instance.
srcTPM external clock source.
static sim_tpm_clk_sel_t CLOCK_SYS_GetTpmExternalSrc ( uint32_t  instance)
inlinestatic

This function sets the TPM external clock source selection.

Parameters
instanceIP instance.
Returns
setting Current TPM external clock source.
static clock_usbhs_slowclk_src_t CLOCK_SYS_GetUsbhsSlowClockSrc ( uint32_t  instance)
inlinestatic

This function gets the slow clock source for USB HS/USB PHY module, used to detect wakeup and resume events.

Parameters
instancemodule device instance
Returns
Clock source.
static void CLOCK_SYS_SetUsbhsSlowClockSrc ( uint32_t  instance,
clock_usbhs_slowclk_src_t  usbhsSrc 
)
inlinestatic

This function sets the clock source for USB HS/USB PHY module, used to detect wakeup and resume events.

Parameters
instancemodule device instance.
usbhsSrcUSB FS clock source setting.
uint32_t CLOCK_SYS_GetUsbhsSlowClockFreq ( uint32_t  instance)

This function gets the clock frequency for USB HS/USB PHY module, used to detect wakeup and resume events.

Parameters
instancemodule device instance
Returns
freq clock frequency for this module
static void CLOCK_SYS_EnableSdramcClock ( uint32_t  instance)
inlinestatic

This function enables the clock for SDRAMC module.

Parameters
instancemodule device instance
static void CLOCK_SYS_DisableSdramcClock ( uint32_t  instance)
inlinestatic

This function disables the clock for SDRAMC module.

Parameters
instancemodule device instance
static bool CLOCK_SYS_GetSdramcGateCmd ( uint32_t  instance)
inlinestatic

This function will get the clock gate state for SDRAMC module.

Parameters
instancemodule device instance
Returns
state true - ungated(Enabled), false - gated (Disabled)
void CLOCK_SYS_EnableTpmClock ( uint32_t  instance)

This function enables the clock for TPM module.

Parameters
instancemodule device instance

This function enables the clock for TPM module

Parameters
instanceIP instance.
void CLOCK_SYS_DisableTpmClock ( uint32_t  instance)

This function disables the clock for TPM module.

Parameters
instancemodule device instance

This function disables the clock for TPM module

Parameters
instanceIP instance.
bool CLOCK_SYS_GetTpmGateCmd ( uint32_t  instance)

This function will get the clock gate state for TPM module.

Parameters
instancemodule device instance
Returns
state true - ungated(Enabled), false - gated (Disabled)

This function will get the clock gate state for TPM module.

Parameters
instanceIP instance.
Returns
state true - ungated(Enabled), false - gated (Disabled)
static void CLOCK_SYS_EnableUsbhsClock ( uint32_t  instance)
inlinestatic

This function enables the clock for USBHS module.

Parameters
instancemodule device instance
static void CLOCK_SYS_DisableUsbhsClock ( uint32_t  instance)
inlinestatic

This function disables the clock for USBHS module.

Parameters
instancemodule device instance
static bool CLOCK_SYS_GetUsbhsGateCmd ( uint32_t  instance)
inlinestatic

This function will get the clock gate state for USBHS module.

Parameters
instancemodule device instance
Returns
state true - ungated(Enabled), false - gated (Disabled)
static void CLOCK_SYS_EnableUsbphyClock ( uint32_t  instance)
inlinestatic

This function enables the clock for USBPHY module.

Parameters
instancemodule device instance
static void CLOCK_SYS_DisableUsbphyClock ( uint32_t  instance)
inlinestatic

This function disables the clock for USBPHY module.

Parameters
instancemodule device instance
static bool CLOCK_SYS_GetUsbphyGateCmd ( uint32_t  instance)
inlinestatic

This function will get the clock gate state for USBPHY module.

Parameters
instancemodule device instance
Returns
state true - ungated(Enabled), false - gated (Disabled)
static void CLOCK_SYS_EnableUsbhsdcdClock ( uint32_t  instance)
inlinestatic

This function enables the clock for USBHSDCD module.

Parameters
instancemodule device instance
static void CLOCK_SYS_DisableUsbhsdcdClock ( uint32_t  instance)
inlinestatic

This function disables the clock for USBHSDCD module.

Parameters
instancemodule device instance
static bool CLOCK_SYS_GetUsbhsdcdGateCmd ( uint32_t  instance)
inlinestatic

This function will get the clock gate state for USBHSDCD module.

Parameters
instancemodule device instance
Returns
state true - ungated(Enabled), false - gated (Disabled)
static clock_emvsim_src_t CLOCK_SYS_GetEmvsimSrc ( uint32_t  instance)
inlinestatic

This function gets the clock source for EMVSIM module.

Parameters
instancemodule device instance
Returns
Clock source.
static void CLOCK_SYS_SetEmvsimSrc ( uint32_t  instance,
clock_emvsim_src_t  emvsimSrc 
)
inlinestatic

This function sets the clock source for EMVSIM module.

Parameters
instancemodule device instance
emvsimSrcClock source.
uint32_t CLOCK_SYS_GetEmvsimFreq ( uint32_t  instance)

This function gets the clock frequency for EMVSIM module.

Parameters
instancemodule device instance
Returns
freq clock frequency for this module
uint32_t CLOCK_SYS_GetFlexioFreq ( uint32_t  instance)

Gets the clock frequency for FLEXIO module.

This function gets the FLEXIO clock frequency.

Parameters
instancemodule device instance
Returns
Current frequency.

This function gets the clock frequency for FLEXIO module.

Parameters
instancemodule device instance
Returns
freq clock frequency for this module
static void CLOCK_SYS_SetFlexioSrc ( uint32_t  instance,
clock_flexio_src_t  flexioSrc 
)
inlinestatic

Sets the clock source for FLEXIO module.

This function sets the FLEXIO clock source selection.

Parameters
instanceIP instance.
flexioSrcThe value to set.

This function sets the clock source for FLEXIO module.

Parameters
instancemodule device instance
flexioSrcClock source to set.
static clock_flexio_src_t CLOCK_SYS_GetFlexioSrc ( uint32_t  instance)
inlinestatic

Gets the clock source for FLEXIO module.

This function gets the FLEXIO clock source selection.

Parameters
instanceIP instance.
Returns
Current selection.

This function gets the clock source for FLEXIO module.

Parameters
instancemodule device instance
Returns
source Clock source for this module.
uint32_t CLOCK_SYS_GetQspiFreq ( uint32_t  instance,
clock_qspi_src_t  qspiSrc 
)

This function gets the clock frequency for QSPI.

Parameters
instancemodule device instance.
qspiSrcQSPI clock source selection according to its internal register.
Returns
freq clock frequency for this module.
void CLOCK_SYS_EnableEmvsimClock ( uint32_t  instance)

This function enables the clock for EMVSIM module.

Parameters
instancemodule device instance
void CLOCK_SYS_DisableEmvsimClock ( uint32_t  instance)

This function disables the clock for EMVSIM module.

Parameters
instancemodule device instance
bool CLOCK_SYS_GetEmvsimGateCmd ( uint32_t  instance)

This function will get the clock gate state for EMVSIM module.

Parameters
instancemodule device instance
Returns
state true - ungated(Enabled), false - gated (Disabled)
static void CLOCK_SYS_EnableQspiClock ( uint32_t  instance)
inlinestatic

This function enables the clock for QSPI module.

Parameters
instancemodule device instance
static void CLOCK_SYS_DisableQspiClock ( uint32_t  instance)
inlinestatic

This function disables the clock for QSPI module.

Parameters
instancemodule device instance
static bool CLOCK_SYS_GetQspiGateCmd ( uint32_t  instance)
inlinestatic

This function will get the clock gate state for QSPI module.

Parameters
instancemodule device instance
Returns
state true - ungated(Enabled), false - gated (Disabled)
static void CLOCK_SYS_EnableFlexioClock ( uint32_t  instance)
inlinestatic

This function enables the clock for FLEXIO module.

Parameters
instancemodule device instance
static void CLOCK_SYS_DisableFlexioClock ( uint32_t  instance)
inlinestatic

This function disables the clock for FLEXIO module.

Parameters
instancemodule device instance
static bool CLOCK_SYS_GetFlexioGateCmd ( uint32_t  instance)
inlinestatic

Get the the clock gate state for FLEXIO module.

This function will get the clock gate state for FLEXIO module.

Parameters
instancemodule device instance
Returns
state true - ungated(Enabled), false - gated (Disabled)
static void CLOCK_SYS_EnableTrngClock ( uint32_t  instance)
inlinestatic

This function enables the clock for TRNG module.

Parameters
instancemodule device instance
static void CLOCK_SYS_DisableTrngClock ( uint32_t  instance)
inlinestatic

This function disables the clock for TRNG module.

Parameters
instancemodule device instance
static bool CLOCK_SYS_GetTrngGateCmd ( uint32_t  instance)
inlinestatic

Get the the clock gate state for TRNG module.

This function will get the clock gate state for TRNG module.

Parameters
instancemodule device instance
Returns
state true - ungated(Enabled), false - gated (Disabled)
void CLOCK_SYS_EnableLtcClock ( uint32_t  instance)

This function enables the clock for LTC module.

Parameters
instancemodule device instance
void CLOCK_SYS_DisableLtcClock ( uint32_t  instance)

This function disables the clock for LTC module.

Parameters
instancemodule device instance
bool CLOCK_SYS_GetLtcGateCmd ( uint32_t  instance)

This function will get the clock gate state for LTC module.

Parameters
instancemodule device instance
Returns
state true - ungated(Enabled), false - gated (Disabled)
uint32_t CLOCK_SYS_GetFllClockFreq ( void  )

This function gets the frequency of the MCGFLLCLK.

Returns
Current clock frequency.
uint32_t CLOCK_SYS_GetCopFreq ( uint32_t  instance,
clock_cop_src_t  copSrc 
)

This function gets the COP clock frequency.

Parameters
instancemodule device instance
copSrcCOP clock source selection.
Returns
Current frequency.
uint32_t CLOCK_SYS_GetLpsciFreq ( uint32_t  instance)

This function gets the clock frequency for LPSCI module.

Parameters
instancemodule device instance
Returns
freq clock frequency for this module
static void CLOCK_SYS_SetLpsciSrc ( uint32_t  instance,
clock_lpsci_src_t  lpsciSrc 
)
inlinestatic

This function sets the LPSCI clock source selection.

Parameters
instanceIP instance.
lpsciSrcThe value to set.
static clock_lpsci_src_t CLOCK_SYS_GetLpsciSrc ( uint32_t  instance)
inlinestatic

This function gets the LPSCI clock source selection.

Parameters
instanceIP instance.
Returns
Current selection.
void CLOCK_SYS_EnableLpsciClock ( uint32_t  instance)

This function enables the clock for LPSCI module.

Parameters
instancemodule device instance
void CLOCK_SYS_DisableLpsciClock ( uint32_t  instance)

This function disables the clock for LPSCI module.

Parameters
instancemodule device instance
bool CLOCK_SYS_GetLpsciGateCmd ( uint32_t  instance)

This function will get the clock gate state for LPSCI module.

Parameters
instancemodule device instance
Returns
state true - ungated(Enabled), false - gated (Disabled)
static void CLOCK_SYS_SetTpmExternalFreq ( uint32_t  srcInstance,
uint32_t  freq 
)
inlinestatic

This function sets the TPM external clock frequency (TPM_CLKx).

Parameters
srcInstanceExternal source instance.
freqFrequcney value.
uint32_t CLOCK_SYS_GetCopFreq ( void  )

This function gets the COP clock frequency.

Returns
Current frequency.
static void CLOCK_SYS_SetCopSrc ( clock_cop_src_t  copSrc)
inlinestatic

This function sets the COP clock source selection.

Parameters
copSrcThe value to set.
static clock_cop_src_t CLOCK_SYS_GetCopSrc ( void  )
inlinestatic

This function gets the COP clock source selection.

Returns
Current selection.
void CLOCK_SYS_EnableXrdcClock ( uint32_t  instance)

This function enables the clock for XRDC module.

Parameters
instancemodule device instance
void CLOCK_SYS_DisableXrdcClock ( uint32_t  instance)

This function disables the clock for XRDC module.

Parameters
instancemodule device instance
bool CLOCK_SYS_GetXrdcGateCmd ( uint32_t  instance)

This function will get the clock gate state for XRDC module.

Parameters
instancemodule device instance
Returns
state true - ungated(Enabled), false - gated (Disabled)
void CLOCK_SYS_EnableSemaClock ( uint32_t  instance)

This function enables the clock for SEMA module.

Parameters
instancemodule device instance
void CLOCK_SYS_DisableSemaClock ( uint32_t  instance)

This function disables the clock for SEMA module.

Parameters
instancemodule device instance
bool CLOCK_SYS_GetSemaGateCmd ( uint32_t  instance)

This function will get the clock gate state for SEMA module.

Parameters
instancemodule device instance
Returns
state true - ungated(Enabled), false - gated (Disabled)
void CLOCK_SYS_EnableFlashClock ( uint32_t  instance)

This function enables the clock for FLASH module.

Parameters
instancemodule device instance
void CLOCK_SYS_DisableFlashClock ( uint32_t  instance)

This function disables the clock for FLASH module.

Parameters
instancemodule device instance
bool CLOCK_SYS_GetFlashGateCmd ( uint32_t  instance)

This function will get the clock gate state for FLASH module.

Parameters
instancemodule device instance
Returns
state true - ungated(Enabled), false - gated (Disabled)
void CLOCK_SYS_EnableMuClock ( uint32_t  instance)

This function enables the clock for MU module.

Parameters
instancemodule device instance
void CLOCK_SYS_DisableMuClock ( uint32_t  instance)

This function disables the clock for MU module.

Parameters
instancemodule device instance
bool CLOCK_SYS_GetMuGateCmd ( uint32_t  instance)

This function will get the clock gate state for MU module.

Parameters
instancemodule device instance
Returns
state true - ungated(Enabled), false - gated (Disabled)
void CLOCK_SYS_EnableIntmuxClock ( uint32_t  instance)

This function enables the clock for INTMUX module.

Parameters
instancemodule device instance
void CLOCK_SYS_DisableIntmuxClock ( uint32_t  instance)

This function disables the clock for INTMUX module.

Parameters
instancemodule device instance
bool CLOCK_SYS_GetIntmuxGateCmd ( uint32_t  instance)

This function will get the clock gate state for INTMUX module.

Parameters
instancemodule device instance
Returns
state true - ungated(Enabled), false - gated (Disabled)
clock_pit_src_t CLOCK_SYS_GetPitSrc ( uint32_t  instance)

This function gets the clock source for PIT module.

Parameters
instancemodule device instance
Returns
source Clock source for this module.
void CLOCK_SYS_SetPitSrc ( uint32_t  instance,
clock_pit_src_t  pitSrc 
)

This function sets the clock source for PIT module.

Parameters
instancemodule device instance
pitSrcClock source to set.
void CLOCK_SYS_EnableLpspiClock ( uint32_t  instance)

This function enables the clock for LPSPI module.

Parameters
instancemodule device instance
void CLOCK_SYS_DisableLpspiClock ( uint32_t  instance)

This function disables the clock for LPSPI module.

Parameters
instancemodule device instance
bool CLOCK_SYS_GetLpspiGateCmd ( uint32_t  instance)

This function will get the clock gate state for LPSPI module.

Parameters
instancemodule device instance
Returns
state true - ungated(Enabled), false - gated (Disabled)
clock_lpspi_src_t CLOCK_SYS_GetLpspiSrc ( uint32_t  instance)

This function gets the clock source for LPSPI module.

Parameters
instancemodule device instance
Returns
source Clock source for this module.
void CLOCK_SYS_SetLpspiSrc ( uint32_t  instance,
clock_lpspi_src_t  lpspiSrc 
)

This function sets the clock source for LPSPI module.

Parameters
instancemodule device instance
lpspiSrcClock source to set.
uint32_t CLOCK_SYS_GetLpspiFreq ( uint32_t  instance)

This function gets the clock frequency for LPSPI module.

Parameters
instancemodule device instance
Returns
freq clock frequency for this module
void CLOCK_SYS_EnableLpi2cClock ( uint32_t  instance)

This function enables the clock for LPI2C module.

Parameters
instancemodule device instance
void CLOCK_SYS_DisableLpi2cClock ( uint32_t  instance)

This function disables the clock for LPI2C module.

Parameters
instancemodule device instance
bool CLOCK_SYS_GetLpi2cGateCmd ( uint32_t  instance)

This function will get the clock gate state for LPI2C module.

Parameters
instancemodule device instance
Returns
state true - ungated(Enabled), false - gated (Disabled)
clock_lpi2c_src_t CLOCK_SYS_GetLpi2cSrc ( uint32_t  instance)

This function gets the clock source for LPI2C module.

Parameters
instancemodule device instance
Returns
source Clock source for this module.
void CLOCK_SYS_SetLpi2cSrc ( uint32_t  instance,
clock_lpi2c_src_t  lpi2cSrc 
)

This function sets the clock source for LPI2C module.

Parameters
instancemodule device instance
lpi2cSrcClock source to set.
uint32_t CLOCK_SYS_GetLpi2cFreq ( uint32_t  instance)

This function gets the clock frequency for LPI2C module.

Parameters
instancemodule device instance
Returns
freq clock frequency for this module
void CLOCK_SYS_EnableEvmsimClock ( uint32_t  instance)

This function enables the clock for EVMSIM module.

Parameters
instancemodule device instance
void CLOCK_SYS_DisableEvmsimClock ( uint32_t  instance)

This function disables the clock for EVMSIM module.

Parameters
instancemodule device instance
bool CLOCK_SYS_GetEvmsimGateCmd ( uint32_t  instance)

This function will get the clock gate state for EVMSIM module.

Parameters
instancemodule device instance
Returns
state true - ungated(Enabled), false - gated (Disabled)
clock_evmsim_src_t CLOCK_SYS_GetEvmsimSrc ( uint32_t  instance)

This function gets the clock source for EVMSIM module.

Parameters
instancemodule device instance
Returns
source Clock source for this module.
void CLOCK_SYS_SetEvmsimSrc ( uint32_t  instance,
clock_evmsim_src_t  evmsimSrc 
)

This function sets the clock source for EVMSIM module.

Parameters
instancemodule device instance
evmsimSrcClock source to set.
uint32_t CLOCK_SYS_GetEvmsimFreq ( uint32_t  instance)

This function gets the clock frequency for EVMSIM module.

Parameters
instancemodule device instance
Returns
freq clock frequency for this module
void CLOCK_SYS_EnableAtxClock ( uint32_t  instance)

This function enables the clock for ATX module.

Parameters
instancemodule device instance
void CLOCK_SYS_DisableAtxClock ( uint32_t  instance)

This function disables the clock for ATX module.

Parameters
instancemodule device instance
bool CLOCK_SYS_GetAtxGateCmd ( uint32_t  instance)

This function will get the clock gate state for ATX module.

Parameters
instancemodule device instance
Returns
state true - ungated(Enabled), false - gated (Disabled)
static void CLOCK_SYS_SetOutDiv5 ( uint8_t  outdiv5)
inlinestatic

This function sets divide value OUTDIV5.

Parameters
outdiv5Outdivider5 setting
static uint8_t CLOCK_SYS_GetOutDiv5 ( void  )
inlinestatic

This function gets divide value OUTDIV5.

Returns
Outdivider5 setting
uint32_t CLOCK_SYS_GetOutdiv5ClockFreq ( void  )

This function gets the OUTDIV5 output clock for ADC.

Returns
freq Current frequency.
uint32_t CLOCK_SYS_GetFastPeripheralClockFreq ( void  )

This function gets the fast peripheral clock frequency.

Returns
Current clock frequency.
uint32_t CLOCK_SYS_GetDmaFreq ( uint32_t  instance)

This function gets the clock frequence for DMA moudle.

Parameters
instancemodule device instance
Returns
freq clock frequence for this module
uint32_t CLOCK_SYS_GetDmamuxFreq ( uint32_t  instance)

This function gets the clock frequence for DMAMUX moudle.

Parameters
instancemodule device instance
Returns
freq clock frequence for this module
uint32_t CLOCK_SYS_GetAdcFreq ( uint32_t  instance)

This function gets the clock frequence for ADC module.

Parameters
instancemodule device instance
Returns
freq clock frequence for this module
uint32_t CLOCK_SYS_GetPwmFreq ( uint32_t  instance)

This function gets the clock frequence for eFlexPWM module.

Parameters
instancemodule device instance
Returns
freq clock frequence for this module
uint32_t CLOCK_SYS_GetEncFreq ( uint32_t  instance)

This function gets the clock frequence for ENC module.

Parameters
instancemodule device instance
Returns
freq clock frequence for this module
uint32_t CLOCK_SYS_GetXbarFreq ( uint32_t  instance)

This function gets the clock frequence for XBAR module.

Parameters
instancemodule device instance
Returns
freq clock frequence for this module
uint32_t CLOCK_SYS_GetAoiFreq ( uint32_t  instance)

This function gets the clock frequence for AOI module.

Parameters
instancemodule device instance
Returns
freq clock frequence for this module
uint32_t CLOCK_SYS_GetFlexcanFreq ( uint8_t  instance,
clock_flexcan_src_t  flexcanSrc 
)

This function gets the FLEXCAN clock frequency.

Parameters
instancemodule device instance
flexcanSrcclock source
Returns
Current frequency.
static void CLOCK_SYS_EnablePwmClock ( uint32_t  instance)
inlinestatic

This function enables the clock for eFlexPWM moudle.

Parameters
instancemodule device instance
static void CLOCK_SYS_DisablePwmClock ( uint32_t  instance)
inlinestatic

This function disables the clock for eFlexPWM moudle.

Parameters
instancemodule device instance
static bool CLOCK_SYS_GetPwmGateCmd ( uint32_t  instance)
inlinestatic

This function will get the clock gate state for eFlexPWM moudle.

Parameters
instancemodule device instance
Returns
state true - ungated(Enabled), false - gated (Disabled)
static void CLOCK_SYS_EnableAoiClock ( uint32_t  instance)
inlinestatic

This function enables the clock for AOI moudle.

Parameters
instancemodule device instance
static void CLOCK_SYS_DisableAoiClock ( uint32_t  instance)
inlinestatic

This function disables the clock for AOI moudle.

Parameters
instancemodule device instance
static bool CLOCK_SYS_GetAoiGateCmd ( uint32_t  instance)
inlinestatic

This function will get the clock gate state for AOI moudle.

Parameters
instancemodule device instance
Returns
state true - ungated(Enabled), false - gated (Disabled)
static void CLOCK_SYS_EnableXbarClock ( uint32_t  instance)
inlinestatic

This function enables the clock for XBAR moudle.

Parameters
instancemodule device instance
static void CLOCK_SYS_DisableXbarClock ( uint32_t  instance)
inlinestatic

This function disables the clock for XBAR moudle.

Parameters
instancemodule device instance
static bool CLOCK_SYS_GetXbarGateCmd ( uint32_t  instance)
inlinestatic

This function will get the clock gate state for XBAR moudle.

Parameters
instancemodule device instance
Returns
state true - ungated(Enabled), false - gated (Disabled)
static void CLOCK_SYS_EnableEncClock ( uint32_t  instance)
inlinestatic

This function enables the clock for ENC moudle.

Parameters
instancemodule device instance
static void CLOCK_SYS_DisableEncClock ( uint32_t  instance)
inlinestatic

This function disables the clock for ENC moudle.

Parameters
instancemodule device instance
static bool CLOCK_SYS_GetEncGateCmd ( uint32_t  instance)
inlinestatic

This function will get the clock gate state for ENC moudle.

Parameters
instancemodule device instance
Returns
state true - ungated(Enabled), false - gated (Disabled)

Variable Documentation

SIM_Type* const g_simBase[]
MCG_Type* const g_mcgBase[]
OSC_Type* const g_oscBase[]