MCUXpresso SDK API Reference Manual  Rev. 0
NXP Semiconductors
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Clock Driver

Files

file  fsl_clock.h
 

Data Structures

struct  clock_sys_pll_config_t
 PLL configuration for SYSPLL. More...
 
struct  clock_audio_pll_config_t
 PLL configuration for SYSPLL. More...
 
struct  clock_frg_clk_config_t
 PLL configuration for FRG. More...
 

Macros

#define CMP_CLOCKS
 Clock ip name array for ACMP. More...
 
#define FLEXCOMM_CLOCKS
 Clock ip name array for FLEXCOMM. More...
 
#define USART_CLOCKS
 Clock ip name array for LPUART. More...
 
#define I2C_CLOCKS
 Clock ip name array for I2C. More...
 
#define I3C_CLOCKS
 Clock ip name array for I3C. More...
 
#define SPI_CLOCKS
 Clock ip name array for SPI. More...
 
#define FLEXI2S_CLOCKS
 Clock ip name array for FLEXI2S. More...
 
#define UTICK_CLOCKS
 Clock ip name array for UTICK. More...
 
#define DMIC_CLOCKS
 Clock ip name array for DMIC. More...
 
#define CTIMER_CLOCKS
 Clock ip name array for CT32B. More...
 
#define GPIO_CLOCKS
 Clock ip name array for GPIO. More...
 
#define LPADC_CLOCKS
 Clock ip name array for ADC. More...
 
#define MRT_CLOCKS
 Clock ip name array for MRT. More...
 
#define SCT_CLOCKS
 Clock ip name array for SCT. More...
 
#define RTC_CLOCKS
 Clock ip name array for RTC. More...
 
#define WWDT_CLOCKS
 Clock ip name array for WWDT. More...
 
#define CRC_CLOCKS
 Clock ip name array for CRC. More...
 
#define USBD_CLOCKS
 Clock ip name array for USBD. More...
 
#define DMA_CLOCKS
 Clock ip name array for DMA. More...
 
#define PINT_CLOCKS
 Clock ip name array for PINT. More...
 
#define FLEXSPI_CLOCKS
 Clock ip name array for FLEXSPI.
 
#define CACHE64_CLOCKS
 Clock ip name array for Cache64.
 
#define MU_CLOCKS
 Clock ip name array for MUA.
 
#define SEMA42_CLOCKS
 Clock ip name array for SEMA.
 
#define TRNG_CLOCKS
 Clock ip name array for RNG.
 
#define USDHC_CLOCKS
 Clock ip name array for uSDHC.
 
#define OSTIMER_CLOCKS
 Clock ip name array for OSTimer.
 
#define CLK_GATE_REG_OFFSET_SHIFT   8U
 Clock gate name used for CLOCK_EnableClock/CLOCK_DisableClock. More...
 
#define SYSPLL0CLKSEL_OFFSET   0x200
 Clock Mux Switches The encoding is as follows each connection identified is 32bits wide starting from LSB upwards. More...
 

Enumerations

enum  clock_ip_name_t
 Clock gate name used for CLOCK_EnableClock/CLOCK_DisableClock. More...
 
enum  clock_name_t {
  kCLOCK_CoreSysClk,
  kCLOCK_BusClk,
  kCLOCK_MclkClk,
  kCLOCK_ClockOutClk,
  kCLOCK_AdcClk,
  kCLOCK_FlexspiClk,
  kCLOCK_SctClk,
  kCLOCK_Wdt0Clk,
  kCLOCK_Wdt1Clk,
  kCLOCK_SystickClk,
  kCLOCK_Sdio0Clk,
  kCLOCK_Sdio1Clk,
  kCLOCK_I3cClk,
  kCLOCK_UsbClk,
  kCLOCK_DmicClk,
  kCLOCK_DspCpuClk,
  kCLOCK_AcmpClk,
  kCLOCK_Flexcomm0Clk,
  kCLOCK_Flexcomm1Clk,
  kCLOCK_Flexcomm2Clk,
  kCLOCK_Flexcomm3Clk,
  kCLOCK_Flexcomm4Clk,
  kCLOCK_Flexcomm5Clk,
  kCLOCK_Flexcomm6Clk,
  kCLOCK_Flexcomm7Clk,
  kCLOCK_Flexcomm14Clk,
  kCLOCK_Flexcomm15Clk
}
 Clock name used to get clock frequency. More...
 
enum  clock_pfd_t {
  kCLOCK_Pfd0 = 0U,
  kCLOCK_Pfd1 = 1U,
  kCLOCK_Pfd2 = 2U,
  kCLOCK_Pfd3 = 3U
}
 
enum  clock_ffro_freq_t {
  kCLOCK_Ffro48M,
  kCLOCK_Ffro60M
}
 FFRO frequence configuration. More...
 
enum  sys_pll_src_t {
  kCLOCK_SysPllSFroClk = 0,
  kCLOCK_SysPllXtalIn = 1,
  kCLOCK_SysPllFFroDiv2 = 2,
  kCLOCK_SysPllNone = 7
}
 SysPLL Reference Input Clock Source. More...
 
enum  sys_pll_mult_t {
  kCLOCK_SysPllMult16 = 0,
  kCLOCK_SysPllMult17,
  kCLOCK_SysPllMult20,
  kCLOCK_SysPllMult22,
  kCLOCK_SysPllMult27,
  kCLOCK_SysPllMult33
}
 SysPLL Multiplication Factor. More...
 
enum  audio_pll_src_t {
  kCLOCK_AudioPllSFroClk = 0,
  kCLOCK_AudioPllXtalIn = 1,
  kCLOCK_AudioPllFFroDiv2 = 2,
  kCLOCK_AudioPllNone = 7
}
 AudioPll Reference Input Clock Source. More...
 
enum  audio_pll_mult_t {
  kCLOCK_AudioPllMult16 = 0,
  kCLOCK_AudioPllMult17,
  kCLOCK_AudioPllMult20,
  kCLOCK_AudioPllMult22,
  kCLOCK_AudioPllMult27,
  kCLOCK_AudioPllMult33
}
 AudioPll Multiplication Factor. More...
 

Functions

void CLOCK_AttachClk (clock_attach_id_t connection)
 Configure the clock selection muxes. More...
 
void CLOCK_SetClkDiv (clock_div_name_t div_name, uint32_t divider)
 Setup peripheral clock dividers. More...
 
uint32_t CLOCK_GetFreq (clock_name_t clockName)
 Return Frequency of selected clock. More...
 
uint32_t CLOCK_GetFRGClock (uint32_t id)
 Return Input frequency for the Fractional baud rate generator. More...
 
void CLOCK_SetFRGClock (const clock_frg_clk_config_t *config)
 Set output of the Fractional baud rate generator. More...
 
static uint32_t CLOCK_GetSFroFreq (void)
 Return Frequency of FRO 16MHz. More...
 
uint32_t CLOCK_GetSysPllFreq (void)
 Return Frequency of SYSPLL. More...
 
uint32_t CLOCK_GetSysPfdFreq (clock_pfd_t pfd)
 Get current output frequency of specific System PLL PFD. More...
 
uint32_t CLOCK_GetAudioPllFreq (void)
 Return Frequency of AUDIO PLL. More...
 
uint32_t CLOCK_GetAudioPfdFreq (clock_pfd_t pfd)
 Get current output frequency of specific Audio PLL PFD. More...
 
uint32_t CLOCK_GetFFroFreq (void)
 Return Frequency of High-Freq output of FRO. More...
 
uint32_t CLOCK_GetMainClkFreq (void)
 Return Frequency of main clk. More...
 
uint32_t CLOCK_GetDspMainClkFreq (void)
 Return Frequency of DSP main clk. More...
 
uint32_t CLOCK_GetAcmpClkFreq (void)
 Return Frequency of ACMP clk. More...
 
uint32_t CLOCK_GetDmicClkFreq (void)
 Return Frequency of DMIC clk. More...
 
uint32_t CLOCK_GetUsbClkFreq (void)
 Return Frequency of USB clk. More...
 
uint32_t CLOCK_GetSdioClkFreq (uint32_t id)
 Return Frequency of SDIO clk. More...
 
uint32_t CLOCK_GetI3cClkFreq (void)
 Return Frequency of I3C clk. More...
 
uint32_t CLOCK_GetSystickClkFreq (void)
 Return Frequency of systick clk. More...
 
uint32_t CLOCK_GetWdtClkFreq (uint32_t id)
 Return Frequency of WDT clk. More...
 
uint32_t CLOCK_GetMclkClkFreq (void)
 Return Frequency of mclk. More...
 
uint32_t CLOCK_GetSctClkFreq (void)
 Return Frequency of sct. More...
 
void CLOCK_EnableSysOscClk (bool enable, bool enableLowPower, uint32_t delay_us)
 Enable/Disable sys osc clock from external crystal clock. More...
 
static uint32_t CLOCK_GetXtalInClkFreq (void)
 Return Frequency of sys osc Clock. More...
 
static uint32_t CLOCK_GetMclkInClkFreq (void)
 Return Frequency of MCLK Input Clock. More...
 
static uint32_t CLOCK_GetLpOscFreq (void)
 Return Frequency of Lower power osc. More...
 
static uint32_t CLOCK_GetOsc32KFreq (void)
 Return Frequency of 32kHz osc. More...
 
static void CLOCK_EnableOsc32K (bool enable)
 Enables and disables 32kHz osc. More...
 
static uint32_t CLOCK_GetWakeClk32KFreq (void)
 Return Frequency of 32khz wake clk. More...
 
static void CLOCK_SetXtalFreq (uint32_t freq)
 Set the XTALIN (system OSC) frequency based on board setting. More...
 
static void CLOCK_SetClkinFreq (uint32_t freq)
 Set the CLKIN (CLKIN pin) frequency based on board setting. More...
 
static void CLOCK_SetMclkFreq (uint32_t freq)
 Set the MCLK in (mclk_in) clock frequency based on board setting. More...
 
uint32_t CLOCK_GetFlexCommClkFreq (uint32_t id)
 Return Frequency of Flexcomm functional Clock. More...
 
uint32_t CLOCK_GetCtimerClkFreq (uint32_t id)
 Return Frequency of Ctimer Clock. More...
 
uint32_t CLOCK_GetClockOutClkFreq (void)
 Return Frequency of ClockOut. More...
 
uint32_t CLOCK_GetAdcClkFreq (void)
 Return Frequency of Adc Clock. More...
 
uint32_t CLOCK_GetFlexspiClkFreq (void)
 Return Frequency of Flexspi Clock. More...
 
void CLOCK_EnableFfroClk (clock_ffro_freq_t ffroFreq)
 
void CLOCK_EnableSfroClk (void)
 
void CLOCK_InitSysPll (const clock_sys_pll_config_t *config)
 Initialize the System PLL. More...
 
static void CLOCK_DeinitSysPll (void)
 brief Deinit the System PLL. More...
 
void CLOCK_InitSysPfd (clock_pfd_t pfd, uint8_t divider)
 Initialize the System PLL PFD. More...
 
static void CLOCK_DeinitSysPfd (clock_pfd_t pfd)
 brief Disable the audio PLL PFD. More...
 
void CLOCK_InitAudioPll (const clock_audio_pll_config_t *config)
 Initialize the audio PLL. More...
 
static void CLOCK_DeinitAudioPll (void)
 brief Deinit the Audio PLL. More...
 
void CLOCK_InitAudioPfd (clock_pfd_t pfd, uint8_t divider)
 Initialize the audio PLL PFD. More...
 
static void CLOCK_DeinitAudioPfd (uint32_t pfd)
 brief Disable the audio PLL PFD. More...
 
void CLOCK_EnableUsbhsDeviceClock (void)
 Enable USB HS device PLL clock. More...
 
void CLOCK_EnableUsbhsHostClock (void)
 Enable USB HS host PLL clock. More...
 
void CLOCK_EnableUsbhsPhyClock (void)
 Enable USB HS PHY PLL clock. More...
 

Variables

volatile uint32_t g_xtalFreq
 External XTAL (SYSOSC) clock frequency. More...
 
volatile uint32_t g_clkinFreq
 External CLK_IN pin clock frequency (clkin) clock frequency. More...
 
volatile uint32_t g_mclkFreq
 External XTAL (SYSOSC) clock frequency. More...
 

Driver version

#define FSL_CLOCK_DRIVER_VERSION   (MAKE_VERSION(2, 6, 1))
 CLOCK driver version 2.6.1. More...
 

Detailed Description

The MCUXpresso SDK provides APIs for MCUXpresso SDK devices' clock operation.


Data Structure Documentation

struct clock_sys_pll_config_t

Data Fields

sys_pll_src_t sys_pll_src
 Reference Input Clock Source.
 
uint32_t numerator
 30 bit numerator of fractional loop divider. More...
 
uint32_t denominator
 30 bit numerator of fractional loop divider. More...
 
sys_pll_mult_t sys_pll_mult
 Multiplication Factor.
 

Field Documentation

uint32_t clock_sys_pll_config_t::numerator
uint32_t clock_sys_pll_config_t::denominator
struct clock_audio_pll_config_t

Data Fields

audio_pll_src_t audio_pll_src
 Reference Input Clock Source.
 
uint32_t numerator
 30 bit numerator of fractional loop divider. More...
 
uint32_t denominator
 30 bit numerator of fractional loop divider. More...
 
audio_pll_mult_t audio_pll_mult
 Multiplication Factor.
 

Field Documentation

uint32_t clock_audio_pll_config_t::numerator
uint32_t clock_audio_pll_config_t::denominator
struct clock_frg_clk_config_t

Public Types

enum  {
  kCLOCK_FrgMainClk = 0,
  kCLOCK_FrgPllDiv,
  kCLOCK_FrgSFro,
  kCLOCK_FrgFFro
}
 

Data Fields

uint8_t num
 FRG clock.
 
uint8_t divider
 Denominator of the fractional divider. More...
 
uint8_t mult
 Numerator of the fractional divider. More...
 

Member Enumeration Documentation

anonymous enum
Enumerator
kCLOCK_FrgMainClk 

Main System clock.

kCLOCK_FrgPllDiv 

Main pll clock divider.

kCLOCK_FrgSFro 

16MHz FRO

kCLOCK_FrgFFro 

FRO48/60.

Field Documentation

uint8_t clock_frg_clk_config_t::divider
uint8_t clock_frg_clk_config_t::mult

Macro Definition Documentation

#define FSL_CLOCK_DRIVER_VERSION   (MAKE_VERSION(2, 6, 1))
#define CMP_CLOCKS
Value:
{ \
kCLOCK_Acmp0 \
}
#define FLEXCOMM_CLOCKS
Value:
{ \
kCLOCK_Flexcomm0, kCLOCK_Flexcomm1, kCLOCK_Flexcomm2, kCLOCK_Flexcomm3, kCLOCK_Flexcomm4, kCLOCK_Flexcomm5, \
kCLOCK_Flexcomm6, kCLOCK_Flexcomm7, kCLOCK_Flexcomm14, kCLOCK_Flexcomm15 \
}
#define USART_CLOCKS
Value:
{ \
kCLOCK_Usart0, kCLOCK_Usart1, kCLOCK_Usart2, kCLOCK_Usart3, kCLOCK_Usart4, kCLOCK_Usart5, kCLOCK_Usart6, \
kCLOCK_Usart7 \
}
#define I2C_CLOCKS
Value:
{ \
kCLOCK_I2c0, kCLOCK_I2c1, kCLOCK_I2c2, kCLOCK_I2c3, kCLOCK_I2c4, kCLOCK_I2c5, kCLOCK_I2c6, kCLOCK_I2c7, \
kCLOCK_I2c15 \
}
#define I3C_CLOCKS
Value:
{ \
kCLOCK_I3c0 \
}
#define SPI_CLOCKS
Value:
{ \
kCLOCK_Spi0, kCLOCK_Spi1, kCLOCK_Spi2, kCLOCK_Spi3, kCLOCK_Spi4, kCLOCK_Spi5, kCLOCK_Spi6, kCLOCK_Spi7, \
kCLOCK_Spi14 \
}
#define FLEXI2S_CLOCKS
Value:
{ \
kCLOCK_FlexI2s0, kCLOCK_FlexI2s1, kCLOCK_FlexI2s2, kCLOCK_FlexI2s3, kCLOCK_FlexI2s4, kCLOCK_FlexI2s5, \
kCLOCK_FlexI2s6, kCLOCK_FlexI2s7 \
}
#define UTICK_CLOCKS
Value:
{ \
kCLOCK_Utick0 \
}
#define DMIC_CLOCKS
Value:
{ \
kCLOCK_Dmic0 \
}
#define CTIMER_CLOCKS
Value:
{ \
kCLOCK_Ct32b0, kCLOCK_Ct32b1, kCLOCK_Ct32b2, kCLOCK_Ct32b3, kCLOCK_Ct32b4 \
}
#define GPIO_CLOCKS
Value:
{ \
kCLOCK_HsGpio0, kCLOCK_HsGpio1, kCLOCK_HsGpio2, kCLOCK_HsGpio3, kCLOCK_HsGpio4, kCLOCK_HsGpio5, \
kCLOCK_HsGpio6, kCLOCK_HsGpio7 \
}
#define LPADC_CLOCKS
Value:
{ \
kCLOCK_Adc0 \
}
#define MRT_CLOCKS
Value:
{ \
kCLOCK_Mrt0 \
}
#define SCT_CLOCKS
Value:
{ \
kCLOCK_Sct \
}
#define RTC_CLOCKS
Value:
{ \
kCLOCK_Rtc \
}
#define WWDT_CLOCKS
Value:
{ \
kCLOCK_Wwdt0, kCLOCK_Wwdt1 \
}
#define CRC_CLOCKS
Value:
{ \
kCLOCK_Crc \
}
#define USBD_CLOCKS
Value:
{ \
kCLOCK_UsbhsDevice \
}
#define DMA_CLOCKS
Value:
{ \
kCLOCK_Dmac0, kCLOCK_Dmac1 \
}
#define PINT_CLOCKS
Value:
{ \
kCLOCK_Pint \
}
#define CLK_GATE_REG_OFFSET_SHIFT   8U
#define SYSPLL0CLKSEL_OFFSET   0x200

[12 bits for reg offset, 0 means end of descriptor, 4 bits for choice] [bit 31 define CLKCTL0 or CLKCTL1]*

Enumeration Type Documentation

Enumerator
kCLOCK_CoreSysClk 

Core clock (aka HCLK)

kCLOCK_BusClk 

Bus clock (AHB/APB clock, aka HCLK)

kCLOCK_MclkClk 

MCLK, to MCLK pin.

kCLOCK_ClockOutClk 

CLOCKOUT.

kCLOCK_AdcClk 

ADC.

kCLOCK_FlexspiClk 

FLEXSPI.

kCLOCK_SctClk 

SCT.

kCLOCK_Wdt0Clk 

Watchdog0.

kCLOCK_Wdt1Clk 

Watchdog1.

kCLOCK_SystickClk 

Systick.

kCLOCK_Sdio0Clk 

SDIO0.

kCLOCK_Sdio1Clk 

SDIO1.

kCLOCK_I3cClk 

I3C.

kCLOCK_UsbClk 

USB.

kCLOCK_DmicClk 

Digital Mic clock.

kCLOCK_DspCpuClk 

DSP clock.

kCLOCK_AcmpClk 

Acmp clock.

kCLOCK_Flexcomm0Clk 

Flexcomm0Clock.

kCLOCK_Flexcomm1Clk 

Flexcomm1Clock.

kCLOCK_Flexcomm2Clk 

Flexcomm2Clock.

kCLOCK_Flexcomm3Clk 

Flexcomm3Clock.

kCLOCK_Flexcomm4Clk 

Flexcomm4Clock.

kCLOCK_Flexcomm5Clk 

Flexcomm5Clock.

kCLOCK_Flexcomm6Clk 

Flexcomm6Clock.

kCLOCK_Flexcomm7Clk 

Flexcomm7Clock.

kCLOCK_Flexcomm14Clk 

Flexcomm14Clock.

kCLOCK_Flexcomm15Clk 

Flexcomm15Clock.

PLL PFD clock name

Enumerator
kCLOCK_Pfd0 

PLL PFD0.

kCLOCK_Pfd1 

PLL PFD1.

kCLOCK_Pfd2 

PLL PFD2.

kCLOCK_Pfd3 

PLL PFD3.

Enumerator
kCLOCK_Ffro48M 

48MHz FFRO clock.

kCLOCK_Ffro60M 

60MHz FFRO clock.

Enumerator
kCLOCK_SysPllSFroClk 

16MHz FRO clock

kCLOCK_SysPllXtalIn 

OSC clock.

kCLOCK_SysPllFFroDiv2 

FRO48/60 div2 clock.

kCLOCK_SysPllNone 

Gated to reduce power.

Enumerator
kCLOCK_SysPllMult16 

Divide by 16.

kCLOCK_SysPllMult17 

Divide by 17.

kCLOCK_SysPllMult20 

Divide by 20.

kCLOCK_SysPllMult22 

Divide by 22.

kCLOCK_SysPllMult27 

Divide by 27.

kCLOCK_SysPllMult33 

Divide by 33.

Enumerator
kCLOCK_AudioPllSFroClk 

16MHz FRO clock

kCLOCK_AudioPllXtalIn 

OSC clock.

kCLOCK_AudioPllFFroDiv2 

FRO48/60 div2 clock.

kCLOCK_AudioPllNone 

Gated to reduce power.

Enumerator
kCLOCK_AudioPllMult16 

Divide by 16.

kCLOCK_AudioPllMult17 

Divide by 17.

kCLOCK_AudioPllMult20 

Divide by 20.

kCLOCK_AudioPllMult22 

Divide by 22.

kCLOCK_AudioPllMult27 

Divide by 27.

kCLOCK_AudioPllMult33 

Divide by 33.

Function Documentation

void CLOCK_AttachClk ( clock_attach_id_t  connection)
Parameters
connection: Clock to be configured.
Returns
Nothing
void CLOCK_SetClkDiv ( clock_div_name_t  div_name,
uint32_t  divider 
)
Parameters
div_name: Clock divider name
divider: Value to be divided.
Returns
Nothing
uint32_t CLOCK_GetFreq ( clock_name_t  clockName)
Returns
Frequency of selected clock
uint32_t CLOCK_GetFRGClock ( uint32_t  id)
Returns
Input Frequency for FRG
void CLOCK_SetFRGClock ( const clock_frg_clk_config_t config)
Parameters
config: Configuration to set to FRGn clock.
static uint32_t CLOCK_GetSFroFreq ( void  )
inlinestatic
Returns
Frequency of FRO 12MHz
uint32_t CLOCK_GetSysPllFreq ( void  )
Returns
Frequency of SYSPLL
uint32_t CLOCK_GetSysPfdFreq ( clock_pfd_t  pfd)
Parameters
pfd: pfd name to get frequency.
Returns
Frequency of SYSPLL PFD.
uint32_t CLOCK_GetAudioPllFreq ( void  )
Returns
Frequency of AUDIO PLL
uint32_t CLOCK_GetAudioPfdFreq ( clock_pfd_t  pfd)
Parameters
pfd: pfd name to get frequency.
Returns
Frequency of AUDIO PLL PFD.
uint32_t CLOCK_GetFFroFreq ( void  )
Returns
Frequency of High-Freq output of FRO
uint32_t CLOCK_GetMainClkFreq ( void  )
Returns
Frequency of main clk
uint32_t CLOCK_GetDspMainClkFreq ( void  )
Returns
Frequency of DSP main clk
uint32_t CLOCK_GetAcmpClkFreq ( void  )
Returns
Frequency of ACMP clk
uint32_t CLOCK_GetDmicClkFreq ( void  )
Returns
Frequency of DMIC clk
uint32_t CLOCK_GetUsbClkFreq ( void  )
Returns
Frequency of USB clk
uint32_t CLOCK_GetSdioClkFreq ( uint32_t  id)
Parameters
id: SDIO index to get frequency.
Returns
Frequency of SDIO clk
uint32_t CLOCK_GetI3cClkFreq ( void  )
Returns
Frequency of I3C clk
uint32_t CLOCK_GetSystickClkFreq ( void  )
Returns
Frequency of systick clk
uint32_t CLOCK_GetWdtClkFreq ( uint32_t  id)
Parameters
id: WDT index to get frequency.
Returns
Frequency of WDT clk
uint32_t CLOCK_GetMclkClkFreq ( void  )
Returns
Frequency of mclk clk
uint32_t CLOCK_GetSctClkFreq ( void  )
Returns
Frequency of sct clk
void CLOCK_EnableSysOscClk ( bool  enable,
bool  enableLowPower,
uint32_t  delay_us 
)
Parameters
enable: true to enable system osc clock, false to bypass system osc.
enableLowPower: true to enable low power mode, false to enable high gain mode.
delay_us: Delay time after OSC power up.
static uint32_t CLOCK_GetXtalInClkFreq ( void  )
inlinestatic
Returns
Frequency of sys osc Clock. Or CLK_IN pin frequency.
static uint32_t CLOCK_GetMclkInClkFreq ( void  )
inlinestatic
Returns
Frequency of MCLK input Clock.
static uint32_t CLOCK_GetLpOscFreq ( void  )
inlinestatic
Returns
Frequency of LPOSC
static uint32_t CLOCK_GetOsc32KFreq ( void  )
inlinestatic
Returns
Frequency of 32kHz osc
static void CLOCK_EnableOsc32K ( bool  enable)
inlinestatic
Parameters
enable: true to enable 32k osc clock, false to disable clock
static uint32_t CLOCK_GetWakeClk32KFreq ( void  )
inlinestatic
Returns
Frequency of 32kHz wake clk
static void CLOCK_SetXtalFreq ( uint32_t  freq)
inlinestatic
Parameters
freq: The XTAL input clock frequency in Hz.
static void CLOCK_SetClkinFreq ( uint32_t  freq)
inlinestatic
Parameters
freq: The CLK_IN pin input clock frequency in Hz.
static void CLOCK_SetMclkFreq ( uint32_t  freq)
inlinestatic
Parameters
freq: The MCLK input clock frequency in Hz.
uint32_t CLOCK_GetFlexCommClkFreq ( uint32_t  id)
Parameters
id: flexcomm index to get frequency.
Returns
Frequency of Flexcomm functional Clock
uint32_t CLOCK_GetCtimerClkFreq ( uint32_t  id)
Parameters
id: ctimer index to get frequency.
Returns
Frequency of Ctimer Clock
uint32_t CLOCK_GetClockOutClkFreq ( void  )
Returns
Frequency of ClockOut
uint32_t CLOCK_GetAdcClkFreq ( void  )
Returns
Frequency of Adc Clock.
uint32_t CLOCK_GetFlexspiClkFreq ( void  )
Returns
Frequency of Flexspi.
void CLOCK_EnableFfroClk ( clock_ffro_freq_t  ffroFreq)

brief Enable FFRO 48M/60M clock. param ffroFreq : target fro frequency. return Nothing

void CLOCK_EnableSfroClk ( void  )

brief Enable SFRO clock. param Nothing return Nothing

void CLOCK_InitSysPll ( const clock_sys_pll_config_t config)
Parameters
config: Configuration to set to PLL.
static void CLOCK_DeinitSysPll ( void  )
inlinestatic

param none.

void CLOCK_InitSysPfd ( clock_pfd_t  pfd,
uint8_t  divider 
)
Parameters
pfd: Which PFD clock to enable.
divider: The PFD divider value.
Note
It is recommended that PFD settings are kept between 12-35.
static void CLOCK_DeinitSysPfd ( clock_pfd_t  pfd)
inlinestatic

param pfd : Which PFD clock to disable.

void CLOCK_InitAudioPll ( const clock_audio_pll_config_t config)
Parameters
config: Configuration to set to PLL.
static void CLOCK_DeinitAudioPll ( void  )
inlinestatic

param none.

void CLOCK_InitAudioPfd ( clock_pfd_t  pfd,
uint8_t  divider 
)
Parameters
pfd: Which PFD clock to enable.
divider: The PFD divider value.
Note
It is recommended that PFD settings are kept between 12-35.
static void CLOCK_DeinitAudioPfd ( uint32_t  pfd)
inlinestatic

param pfd : Which PFD clock to disable.

void CLOCK_EnableUsbhsDeviceClock ( void  )

This function enables USB HS device PLL clock.

void CLOCK_EnableUsbhsHostClock ( void  )

This function enables USB HS host PLL clock.

void CLOCK_EnableUsbhsPhyClock ( void  )

This function enables USB HS PHY PLL clock.

Variable Documentation

volatile uint32_t g_xtalFreq

The XTAL (SYSOSC) clock frequency in Hz, when the clock is setup, use the function CLOCK_SetXtalFreq to set the value in to clock driver. For example, if XTAL is 16MHz,

* CLOCK_SetXtalFreq(160000000); // Set the XTALIN value to clock driver.
*
volatile uint32_t g_clkinFreq

The CLK_IN pin (clkin) clock frequency in Hz, when the clock is setup, use the function CLOCK_SetClkinFreq to set the value in to clock driver. For example, if CLK_IN is 16MHz,

* CLOCK_SetClkinFreq(160000000); // Set the CLK_IN value to clock driver.
*
volatile uint32_t g_mclkFreq

The MCLK in (mclk_in) PIN clock frequency in Hz, when the clock is setup, use the function CLOCK_SetMclkInFreq to set the value in to clock driver. For example, if mclk_In is 16MHz,

* CLOCK_SetMclkInFreq(160000000); // Set the MCLK_IN value to clock driver.
*