Kinetis SDK v.1.3 API Reference Manual  Rev. 0
Freescale Semiconductor, Inc.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
fsl_clock_MKM34Z7.h File Reference
#include <fsl_mcg_hal.h>
#include "fsl_mcg_hal_modes.h"
#include "fsl_osc_hal.h"

Data Structures

struct  sim_config_t
 SIM configuration structure for dynamic clock setting. More...
 

Macros

#define AFE_EXT_CLK_COUNT   1
 AFE external clock source count. More...
 
#define IRTC_OSC_ENABLE_MASK   (1U << 0U)
 RTC OSC Enable bit in the IRTC_GP register.
 
#define IRTC_OSC_SC2P_MASK   (1U << 1U)
 Bit in the IRTC_GP register to enable RTC OSC 2pF capacitor.
 
#define IRTC_OSC_SC4P_MASK   (1U << 2U)
 Bit in the IRTC_GP register to enable RTC OSC 4pF capacitor.
 
#define IRTC_OSC_SC8P_MASK   (1U << 3U)
 Bit in the IRTC_GP register to enable RTC OSC 8pF capacitor.
 
#define IRTC_OSC_SC16P_MASK   (1U << 4U)
 Bit in the IRTC_GP register to enable RTC OSC 16pF capacitor.
 
#define IRTC_OSC_BOOT_MASK   (1U << 7U)
 

Functions

static void CLOCK_SYS_SetSysDiv (uint8_t sysdiv)
 Sets the system clock divider setting(CLKDIVSYS). More...
 
static uint8_t CLOCK_SYS_GetSysDiv (void)
 Gets the system clock divider setting(CLKDIVSYS). More...
 
static void CLOCK_SYS_SetBusDiv (uint8_t busdiv)
 Sets the bus clock divider setting(CLKDIVBUS). More...
 
static uint8_t CLOCK_SYS_GetBusDiv (void)
 Gets the bus clock divider setting(CLKDIVBUS). More...
 
static void CLOCK_SYS_SetFlashClockMode (uint8_t flashclkmode)
 Sets the flash clock mode setting(FLASHCLKMODE). More...
 
static uint8_t CLOCK_SYS_GetFlashClkMode (void)
 Gets the flash clock divider setting(FLASHCLKMODE). 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_GetRtcOutFreq (void)
 Gets RTC_CLK frequency. More...
 
static void CLOCK_SYS_SetRtcOutSrc (clock_rtcout_src_t src)
 Gets RTC_CLK source. More...
 
static clock_rtcout_src_t CLOCK_SYS_GetRtcOutSrc (void)
 Gets RTC_CLK source. More...
 
uint32_t CLOCK_SYS_GetAfeFreq (uint32_t instance, clock_afe_src_t afeSrc)
 Gets the AFE module clock frequency. More...
 
uint32_t CLOCK_SYS_GetWdogFreq (uint32_t instance, clock_wdog_src_t wdogSrc)
 Gets the watch dog 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...
 
uint32_t CLOCK_SYS_GetSlcdFreq (uint32_t instance, clock_slcd_src_t slcdSrc)
 Gets the Segment LCD clock frequency. More...
 
uint32_t CLOCK_SYS_GetUartFreq (uint32_t instance)
 Gets the clock frequency for UART module. More...
 
static uint32_t CLOCK_SYS_GetAdcAltFreq (uint32_t instance)
 Gets ADC alternate clock frequency. More...
 
static uint32_t CLOCK_SYS_GetGpioFreq (uint32_t instance)
 Gets the clock frequency for GPIO module. More...
 
static uint32_t CLOCK_SYS_GetEwmFreq (uint32_t instance)
 Gets the clock frequency for EWM module. More...
 
static uint32_t CLOCK_SYS_GetPdbFreq (uint32_t instance)
 Gets the clock frequency for PDB module. More...
 
static uint32_t CLOCK_SYS_GetCrcFreq (uint32_t instance)
 Gets the clock frequency for CRC 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_GetCmpFreq (uint32_t instance)
 Gets the clock frequency for CMP module. More...
 
static uint32_t CLOCK_SYS_GetPitFreq (uint32_t instance)
 Gets the clock frequency for PIT module. More...
 
static uint32_t CLOCK_SYS_GetFtfFreq (uint32_t instance)
 Gets the clock frequency for FTF 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_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...
 
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_EnablePitClock (uint32_t instance)
 Enable the clock for PIT module. More...
 
void CLOCK_SYS_DisablePitClock (uint32_t instance)
 Disable the clock for PIT module. More...
 
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...
 
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_EnableRtcRegFileClock (uint32_t instance)
 Enable the clock for RTC_REG_FILE . More...
 
static void CLOCK_SYS_DisableRtcRegFileClock (uint32_t instance)
 Disable the clock for RTC_REG_FILE. More...
 
static bool CLOCK_SYS_GetRtcRegFileGateCmd (uint32_t instance)
 Get the the clock gate state for RTC_REG_FILE. 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_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...
 
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...
 
static void CLOCK_SYS_EnableMmauClock (uint32_t instance)
 Enable the clock for MMAU module. More...
 
static void CLOCK_SYS_DisableMmauClock (uint32_t instance)
 Disable the clock for MMAU module. More...
 
static bool CLOCK_SYS_GetMmauGateCmd (uint32_t instance)
 Get the the clock gate state for MMAU module. More...
 
static void CLOCK_SYS_EnableCauClock (uint32_t instance)
 Enable the clock for CAU module. More...
 
static void CLOCK_SYS_DisableCauClock (uint32_t instance)
 Disable the clock for CAU module. More...
 
static bool CLOCK_SYS_GetCauGateCmd (uint32_t instance)
 Get the the clock gate state for CAU 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_EnableAfeClock (uint32_t instance)
 Enable the clock for AFE module. More...
 
static void CLOCK_SYS_DisableAfeClock (uint32_t instance)
 Disable the clock for AFE module. More...
 
static bool CLOCK_SYS_GetAfeGateCmd (uint32_t instance)
 Get the the clock gate state for AFE 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...
 
void CLOCK_SYS_EnableQuadTmrClock (uint32_t instance)
 Enable the clock for Quad Timer module. More...
 
void CLOCK_SYS_DisableQuadTmrClock (uint32_t instance)
 Disable the clock for Quad Timer module. More...
 
bool CLOCK_SYS_GetQuadTmrGateCmd (uint32_t instance)
 Get the the clock gate state for Quad Timer module. More...
 
static void CLOCK_SYS_EnableSlcdClock (uint32_t instance)
 Enable the clock for SLCD module. More...
 
static void CLOCK_SYS_DisableSlcdClock (uint32_t instance)
 Disable the clock for SLCD module. More...
 
static bool CLOCK_SYS_GetSlcdGateCmd (uint32_t instance)
 Get the the clock gate state for SLCD 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_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_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 void CLOCK_SYS_SetLpuartSrc (uint32_t instance, clock_lpuart_src_t lpuartSrc)
 Sets the clock source for LPUART module. More...
 
static clock_lpuart_src_t CLOCK_SYS_GetLpuartSrc (uint32_t instance)
 Gets the clock source 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_GetLpuartFreq (uint32_t instance)
 Gets the clock frequency for LPUART module. More...
 
uint32_t CLOCK_SYS_GetPllFllClockFreq (void)
 Get the MCGPLLCLK/MCGFLLCLK/BUS/RTC_OSC clock frequency selected by PLLFLL register bit. 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...
 
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...
 
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_SetAfeExternalFreq (uint32_t srcInstance, uint32_t freq)
 Set the AFE external clock frequency(AFE_CLKx). More...
 

Variables

uint32_t g_afeClkFreq [AFE_EXT_CLK_COUNT]
 AFE_CLK.