Kinetis SDK v.1.2 API Reference Manual  Rev. 0
Freescale Semiconductor, Inc.
 All Data Structures Files 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, etc. 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.
 
 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.
 
 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.
 
 KV10Z7
 The data structure definition for KV10Z7 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.
 
 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.
 

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  mcg_config_t
 MCG 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
 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 CLOCK_USE_MCG   /* MCG is used. */
 
#define CPU_LPO_CLK_HZ   1000U
 Frequency of LPO. More...
 
#define FTM_EXT_CLK_COUNT   2 /* FTM external clock source count. */
 
#define FTM_EXT_CLK_COUNT   2 /* FTM external clock source count. */
 
#define FTM_EXT_CLK_COUNT   2 /* FTM external clock source count. */
 
#define FTM_EXT_CLK_COUNT   2 /* FTM external clock source count. */
 
#define FTM_EXT_CLK_COUNT   2 /* FTM external clock source count. */
 

Typedefs

typedef
clock_manager_error_code_t(* 
clock_manager_callback_t )(clock_notify_struct_t *notify, void *callbackData)
 Type of 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,
  kClockNameCount
}
 Clock name used to get 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, indicates what 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)
 Get core clock frequency. More...
 
uint32_t CLOCK_SYS_GetSystemClockFreq (void)
 Get system clock frequency. More...
 
uint32_t CLOCK_SYS_GetBusClockFreq (void)
 Get bus clock frequency. More...
 
uint32_t CLOCK_SYS_GetFlashClockFreq (void)
 Get flash clock frequency. More...
 
static uint32_t CLOCK_SYS_GetLpoClockFreq (void)
 Get LPO clock frequency. More...
 
static void CLOCK_SYS_SetSystickSrc (clock_systick_src_t src)
 Set Systick clock source SYST_CSR[CLKSOURCE]. More...
 
static uint32_t CLOCK_SYS_GetSystickFreq (void)
 Get 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...
 
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...
 
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...
 
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...
 
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...
 
void CLOCK_SYS_EnableTrngClock (uint32_t instance)
 Enable the clock for TRNG module. More...
 
void CLOCK_SYS_DisableTrngClock (uint32_t instance)
 Disable the clock for TRNG module. More...
 
bool CLOCK_SYS_GetTrngGateCmd (uint32_t instance)
 Get the the clock gate state for TRNG 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 SIM module. More...
 
MCG_Type *const g_mcgBase []
 The register base of MCG/MCG_LITE module. More...
 
OSC_Type *const g_oscBase []
 The register base of OSC module. More...
 
uint32_t g_ftmClkFreq [FTM_EXT_CLK_COUNT]
 
uint32_t g_ftmClkFreq [FTM_EXT_CLK_COUNT]
 
uint32_t g_ftmClkFreq [FTM_EXT_CLK_COUNT]
 
uint32_t g_ftmClkFreq [FTM_EXT_CLK_COUNT]
 
uint32_t g_ftmClkFreq [FTM_EXT_CLK_COUNT]
 

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)
 Install pre-defined clock configurations. More...
 
clock_manager_error_code_t CLOCK_SYS_UpdateConfiguration (uint8_t targetConfigIndex, clock_manager_policy_t policy)
 Set system clock configuration according to pre-defined structure. More...
 
clock_manager_error_code_t CLOCK_SYS_SetConfiguration (clock_manager_user_config_t const *config)
 Set system clock configuration. More...
 
uint8_t CLOCK_SYS_GetCurrentConfiguration (void)
 Get current system clock configuration. More...
 
clock_manager_callback_user_config_tCLOCK_SYS_GetErrorCallback (void)
 Get the callback which returns error in last clock switch. More...
 
mcg_mode_error_t CLOCK_SYS_SetMcgMode (mcg_config_t const *targetConfig, void(*fllStableDelay)(void))
 Set MCG to some target mode. More...
 

OSC configuration

clock_manager_error_code_t CLOCK_SYS_OscInit (uint32_t instance, osc_user_config_t *config)
 Initialize OSC. More...
 
void CLOCK_SYS_OscDeinit (uint32_t instance)
 Deinitialize OSC. More...
 
void CLOCK_SYS_SetOscerConfigration (uint32_t instance, oscer_config_t const *config)
 Configure the OSCERCLK. More...
 

Clock Manager

Overview

Clock Manager provides such kinds of 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.

    It covers such modules: SIM, MCG and OSC.
    Clock manager also provides clock dynamic change service. Based on this service, applications could switch between pre-defined clock configurations. There is also a notification framework, drivers and applications could register callback functions to this framework, every time system clock configuration is changed, drivers and applications will receive notification and change their settings.

Enable/Disable clock for IP modules

Clock manager provides these APIs with the 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

Clock manager only provides clock source get/set APIs for the modules whose control registers are in SIM and MCG. These APIs are defined with the 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 wrap of HAL drivers. The parameter clock_ip_src_t is enumeration defined in SIM HAL driver, please check 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, then clock manager provides APIs with the format:

    uint32_t CLOCK_SYS_GetIpFreq(uint32_t instance);

    These functions return clock frequency, if clock source is not available, will return 0.

  2. Some IP modules' clock source are chosen by IP internal registers, for example SAI module. For these modules, the clock frequency APIs are defined as:

    uint32_t CLOCK_SYS_GetIpFreq(clock_ip_src_t ipSrc, uint32_t instance);

    The clock source selection is passed as parameter, then IP driver could read its internal register and pass it to clock manager to get clock frequency.

Get/Set clock dividers

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

/* 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 output clocks, including MCGFFCLK, MCGIRCLK, MCGPLLFLLCLK OSCERCLK, ERCLK32K, LPO, RTC_CLKOUT, core clock, Bus clock and so on, clock manager provides separate APIs to get the frequency of these clocks. These functions are defined as:

uint32_t CLOCK_SYS_GetNameFreq();
These functions return the frequency in Hz, if clock source is not available, return 0. There is also an API CLOCK_SYS_GetFreq(), passing clock name as parameter could get corresponding frequency.

OSC initialize/deinitialize

Clock manager provides functions to initialize and deinitialize 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);

Dynamic clock setting

Clock manager dynamic clock setting is based on two components:
  1. Some pre-defined clock configurations, system could switch between these 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, there is a HRUN power mode, then there will be an additional clock configuration correspondingly for peak performance. Please check the structure g_defaultClockConfigurations for details.
  2. Notification framework.
    Clock manager provides a notification mechanism, IP drivers and application should register callback functions to notification framework. To simplify, clock manager only support static callback registration. It means that in applications, all callbak functions are collected into a static table and passed to clock manager.
    The clock mode transition includes 3 steps:
    1. Before clock mode transition, clock manager will send a "BEFORE" message to callback table. When receives this message, IP drivers should check whether current work could be stopped and stop it. If the work could not be stopped, the callback function returns error.
      Clock manager supports two types of transition policies, graceful policy and forceful policy. When graceful policy is used, if some callbacks return error during sending "BEFORE" message, the clock mode transition stops and clock manager will send "RECOVER" message to all the drivers that have stopped. Then these drivers could recover to the previous status and continue to work. When forceful policy is used, drivers should stop forcefully.
    2. After "BEFORE"message is processed successfully, the system clock mode will change according to the new configuration.
    3. After system clock mode change, clock manager will send an "AFTER" message to callback table to notify drivers that clock mode transition is finished.
There is an example for how to enable dynamic clock setting in application:

/* Callback for UART0. */
uart_callback_data_t uart0CallbackData;
void* driverData);
/* Callback for ADC1. */
adc_callback_data_t adc1CallbackData;
void* driverData);
/* Callback configuration for UART0. */
{
.callback = uart0Callback,
.callbackData = &uart0CallbackData
};
/* Callback configuration for ADC1. */
{
.callback = adc1Callback,
.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,
clockCallbackTable,
ARRAY_SIZE(clockCallbackTable));
Clock manager has provided the default clock configuration table with the name g_defaultClockConfigurations, application only need to construct the callback function table. Finally, use the function CLOCK_SYS_Init to setup clock configuration and callback table to clock manager.
There is an example for 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 enable or not. More...
 
bool enableInStop
 OSCERCLK enable 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, please set the following members according to board setting:

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

Data Fields

uint32_t freq
 External clock frequency. More...
 
bool enableCapacitor2p
 Enable 2pF capacitor load. More...
 
bool enableCapacitor4p
 Enable 4pF capacitor load. More...
 
bool enableCapacitor8p
 Enable 8pF capacitor load. More...
 
bool enableCapacitor16p
 Enable 16pF 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, please set the following members according to board setting:

  1. freq: The external frequency for RTC.
  2. enableOSC: RTC could use its dedicate OSC, or override the OSC0 setting and use OSC0, or use external input clock directly. This is different by SOC and board setting, please set this correctly.

Data Fields

uint32_t freq
 External clock frequency. More...
 
bool enableCapacitor2p
 Enable 2pF capacitor load. More...
 
bool enableCapacitor4p
 Enable 4pF capacitor load. More...
 
bool enableCapacitor8p
 Enable 8pF capacitor load. More...
 
bool enableCapacitor16p
 Enable 16pF capacitor load. More...
 
bool enableOsc
 Enable OSC or use external clock directly. More...
 
bool enableClockOutput
 Output clock to other peripherals or not. 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
bool rtc_osc_user_config_t::enableClockOutput
struct mcg_config_t

When porting to a new board, please set the following members according to board setting:

  1. frdiv: If FLL uses the external reference clock, please set this value to make sure external reference clock divided by frdiv is in the range 31.25kHz to 39.0625kHz.
  2. prdiv0/vdiv0/prdiv1/vdiv1: Please set these values for PLL, the PLL reference clock frequency after prdiv should be in the range of FSL_FEATURE_MCG_PLL_REF_MIN to FSL_FEATURE_MCG_PLL_REF_MAX.

Data Fields

mcg_modes_t mcg_mode
 MCG mode. More...
 
bool irclkEnable
 MCGIRCLK enable. More...
 
bool irclkEnableInStop
 MCGIRCLK enable in stop mode. More...
 
mcg_irc_mode_t ircs
 MCG_C2[IRCS]. More...
 
uint8_t fcrdiv
 MCG_SC[FCRDIV]. More...
 
uint8_t frdiv
 MCG_C1[FRDIV]. More...
 
mcg_dco_range_select_t drs
 MCG_C4[DRST_DRS]. More...
 
mcg_dmx32_select_t dmx32
 MCG_C4[DMX32]. More...
 

Field Documentation

mcg_modes_t mcg_config_t::mcg_mode
bool mcg_config_t::irclkEnable
bool mcg_config_t::irclkEnableInStop
mcg_irc_mode_t mcg_config_t::ircs
uint8_t mcg_config_t::fcrdiv
uint8_t mcg_config_t::frdiv
mcg_dco_range_select_t mcg_config_t::drs
mcg_dmx32_select_t mcg_config_t::dmx32
struct clock_manager_user_config_t

Data Fields

mcg_config_t mcgConfig
 MCG configuration. More...
 
oscer_config_t oscerConfig
 OSCERCLK configuration. More...
 
sim_config_t simConfig
 SIM configuration. More...
 

Field Documentation

mcg_config_t clock_manager_user_config_t::mcgConfig
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 clock configure table. More...
 
uint8_t clockConfigNum
 Number of clock configurations. More...
 
uint8_t curConfigIndex
 Index of current configuration. More...
 
clock_manager_callback_user_config_t ** callbackConfig
 Pointer to 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_er32k_src_t er32kSrc
 ERCLK32K source selection. More...
 
uint8_t outdiv1
 
uint8_t outdiv2
 
uint8_t outdiv3
 
uint8_t outdiv4
 OUTDIV setting. More...
 

Field Documentation

clock_er32k_src_t sim_config_t::er32kSrc
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 processer 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, systick clock source could be external reference clock or processor clock. Please check 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. Systick clock source could be external reference clock or processor clock. Please check 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 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 system to target clock configuration, before transition, clock manager will send notifications to all drivers registered to the callback table. When graceful policy is used, if some drivers are not ready to change, clock transition will not occur, all drivers still work in previous configuration and error is returned. When forceful policy is used, all drivers should stop work and system changes to new clock configuration.

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

This funtion sets the system to target configuration, it only sets the clock modules registers for clock mode change, but not send notifications to drivers. This function is different by different SoCs.

Parameters
configTarget configuration.
Returns
Error code.
Note
If external clock is used in the target mode, please make sure it is enabled, for example, if the external oscillator is used, please setup EREFS/HGO correctly and make sure 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 graceful policy is used, if some IP is not ready to change clock setting, the callback will return error and system stay in current configuration. Applications can use this function to check which IP callback returns error.

Returns
Pointer to the callback which returns error.
mcg_mode_error_t CLOCK_SYS_SetMcgMode ( mcg_config_t const *  targetConfig,
void(*)(void)  fllStableDelay 
)

This function sets MCG to some target mode defined by the configure structure, if cannot switch to target mode directly, this function will choose the proper path.

Parameters
targetConfigPointer to the target MCG mode configuration structure.
fllStableDelayDelay function to make sure FLL is stable.
Returns
Error code.
Note
If external clock is used in the target mode, please make sure it is enabled, for example, if the external oscillator is used, please setup EREFS/HGO correctly and make sure OSCINIT is set.
clock_manager_error_code_t CLOCK_SYS_OscInit ( uint32_t  instance,
osc_user_config_t config 
)

This function initializes OSC according to 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 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 enable or not in normal mode and stop mode.

Parameters
instanceInstance of the OSC.
configPointer to the OSCERCLK configuration structure.
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)

This function gets the clock frequency for LPUART module.

Parameters
instancemodule device instance
Returns
freq clock frequency for this module
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
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.

This function gets the TPM external clock source frequency.

Parameters
instanceIP instance.
Returns
TPM external clock 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
void CLOCK_SYS_DisableTpmClock ( uint32_t  instance)

This function disables the clock for TPM module.

Parameters
instancemodule device 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)
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)
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.
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.
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)
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)
void CLOCK_SYS_EnableTrngClock ( uint32_t  instance)

This function enables the clock for TRNG module.

Parameters
instancemodule device instance
void CLOCK_SYS_DisableTrngClock ( uint32_t  instance)

This function disables the clock for TRNG module.

Parameters
instancemodule device instance
bool CLOCK_SYS_GetTrngGateCmd ( uint32_t  instance)

This function will get the clock gate state for TRNG 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[]