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

Overview

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

The clock driver supports:

Files

file  fsl_clock.h
 

Data Structures

struct  clock_frg_clk_config_t
 PLL configuration for FRG. More...
 
struct  clock_avpll_config_t
 AVPLL configuration. More...
 

Macros

#define FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL   0
 Configure whether driver controls clock. More...
 
#define GPIO_CLOCKS
 Clock ip name array for GPIO. More...
 
#define CACHE64_CLOCKS
 Clock ip name array for CACHE64. More...
 
#define FLEXSPI_CLOCKS
 Clock ip name array for FLEXSPI. 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 SPI_CLOCKS
 Clock ip name array for SPI. More...
 
#define ACOMP_CLOCKS
 Clock ip name array for ACOMP. More...
 
#define ADC_CLOCKS
 Clock ip name array for ADC. More...
 
#define DAC_CLOCKS
 Clock ip name array for DAC. More...
 
#define LCDIC_CLOCKS
 Clock ip name array for LCDIC. More...
 
#define DMA_CLOCKS
 Clock ip name array for DMA. More...
 
#define DMIC_CLOCKS
 Clock ip name array for DMIC. More...
 
#define ENET_CLOCKS
 Clock ip name array for ENET. More...
 
#define ENET_EXTRA_CLOCKS
 Extra clock ip name array for ENET. More...
 
#define POWERQUAD_CLOCKS
 Clock ip name array for Powerquad.
 
#define OSTIMER_CLOCKS
 Clock ip name array for OSTimer.
 
#define CTIMER_CLOCKS
 Clock ip name array for CT32B. More...
 
#define UTICK_CLOCKS
 Clock ip name array for UTICK. 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 TRNG_CLOCKS
 Clock ip name array for TRNG. More...
 
#define USIM_CLOCKS
 Clock ip name array for USIM. More...
 
#define CLK_GATE_REG_OFFSET_SHIFT   8U
 Clock gate name used for CLOCK_EnableClock/CLOCK_DisableClock. More...
 

Enumerations

enum  clock_name_t {
  kCLOCK_CoreSysClk,
  kCLOCK_BusClk,
  kCLOCK_MclkClk
}
 Clock name used to get clock frequency. More...
 
enum  clock_ip_name_t
 Peripheral clock name difinition used for clock gate.
 
enum  clock_attach_id_t
 Peripheral clock source selection definition.
 
enum  clock_div_name_t
 Clock divider definition.
 
enum  clock_tcpu_flexspi_div_t {
  kCLOCK_TcpuFlexspiDiv12 = 0,
  kCLOCK_TcpuFlexspiDiv11,
  kCLOCK_TcpuFlexspiDiv10,
  kCLOCK_TcpuFlexspiDiv9
}
 TCPU PLL divider for tcpu_mci_flexspi_clk. More...
 
enum  clock_tddr_flexspi_div_t {
  kCLOCK_TddrFlexspiDiv11 = 0,
  kCLOCK_TddrFlexspiDiv10,
  kCLOCK_TddrFlexspiDiv9,
  kCLOCK_TddrFlexspiDiv8
}
 TDDR PLL divider for tddr_mci_flexspi_clk. More...
 
enum  clock_t3_mci_irc_config_t {
  kCLOCK_T3MciIrc60m = 0,
  kCLOCK_T3MciIrc48m
}
 T3 PLL IRC configuration. More...
 
enum  clock_avpll_ch_freq_t {
  kCLOCK_AvPllChUnchanged = 0,
  kCLOCK_AvPllChFreq2p048m,
  kCLOCK_AvPllChFreq4p096m,
  kCLOCK_AvPllChFreq6p144m,
  kCLOCK_AvPllChFreq8p192m,
  kCLOCK_AvPllChFreq11p2896m,
  kCLOCK_AvPllChFreq12m,
  kCLOCK_AvPllChFreq12p288m,
  kCLOCK_AvPllChFreq24p576m,
  kCLOCK_AvPllChFreq64m,
  kCLOCK_AvPllChFreq98p304m
}
 AVPLL channel1 frequency configuration. More...
 

Functions

uint32_t CLOCK_GetT3PllMciIrcClkFreq (void)
 Return Frequency of t3pll_mci_48_60m_irc. More...
 
uint32_t CLOCK_GetT3PllMci213mClkFreq (void)
 Return Frequency of t3pll_mci_213p3m. More...
 
uint32_t CLOCK_GetT3PllMci256mClkFreq (void)
 Return Frequency of t3pll_mci_256m. More...
 
uint32_t CLOCK_GetT3PllMciFlexspiClkFreq (void)
 Return Frequency of t3pll_mci_flexspi_clk. More...
 
uint32_t CLOCK_GetTcpuMciClkFreq (void)
 Return Frequency of tcpu_mci_clk. More...
 
uint32_t CLOCK_GetTcpuMciFlexspiClkFreq (void)
 Return Frequency of tcpu_mci_flexspi_clk. More...
 
uint32_t CLOCK_GetTddrMciFlexspiClkFreq (void)
 Return Frequency of tddr_mci_flexspi_clk. More...
 
uint32_t CLOCK_GetTddrMciEnetClkFreq (void)
 Return Frequency of tddr_mci_enet_clk. More...
 
void CLOCK_EnableClock (clock_ip_name_t clk)
 Enable the clock for specific IP. More...
 
void CLOCK_DisableClock (clock_ip_name_t clk)
 Disable the clock for specific IP. More...
 
void CLOCK_AttachClk (clock_attach_id_t connection)
 Configure the clock selection muxes. More...
 
void CLOCK_SetClkDiv (clock_div_name_t name, uint32_t divider)
 Setup 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...
 
uint32_t CLOCK_GetFFroFreq (void)
 Return Frequency of FFRO. More...
 
uint32_t CLOCK_GetSFroFreq (void)
 Return Frequency of SFRO. More...
 
uint32_t CLOCK_GetAvPllCh1Freq (void)
 Return Frequency of AUDIO PLL (AVPLL CH1) More...
 
uint32_t CLOCK_GetAvPllCh2Freq (void)
 Return Frequency of AVPLL CH2. More...
 
uint32_t CLOCK_GetMainClkFreq (void)
 Return Frequency of main clk. More...
 
uint32_t CLOCK_GetCoreSysClkFreq (void)
 Return Frequency of core/bus clk. More...
 
uint32_t CLOCK_GetSystickClkFreq (void)
 Return Frequency of systick clk. More...
 
static uint32_t CLOCK_GetSysOscFreq (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 LPOSC. More...
 
static uint32_t CLOCK_GetClk32KFreq (void)
 Return Frequency of CLK_32K. More...
 
void CLOCK_EnableXtal32K (bool enable)
 Enables and disables 32KHz XTAL. More...
 
void CLOCK_EnableRtc32K (bool enable)
 Enables and disables RTC 32KHz. More...
 
static void CLOCK_SetClkinFreq (uint32_t freq)
 Set the CLKIN (CLKIN pin) frequency based on GPIO4 input. More...
 
static void CLOCK_SetMclkinFreq (uint32_t freq)
 Set the MCLK in (mclk_in) clock frequency based on board setting. More...
 
uint32_t CLOCK_GetDmicClkFreq (void)
 Return Frequency of DMIC clk. More...
 
uint32_t CLOCK_GetLcdClkFreq (void)
 Return Frequency of LCD clk. More...
 
uint32_t CLOCK_GetWdtClkFreq (void)
 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...
 
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_GetUtickClkFreq (void)
 Return Frequency of Utick Clock. More...
 
uint32_t CLOCK_GetFlexspiClkFreq (void)
 Return Frequency of Flexspi Clock. More...
 
uint32_t CLOCK_GetUsimClkFreq (void)
 Return Frequency of USIM Clock. More...
 
uint32_t CLOCK_GetGauClkFreq (void)
 Return Frequency of GAU Clock. More...
 
uint32_t CLOCK_GetOSTimerClkFreq (void)
 Return Frequency of OSTimer Clock. More...
 
uint32_t CLOCK_InitTcpuRefClk (uint32_t targetHz, clock_tcpu_flexspi_div_t div)
 Initialize TCPU FVCO to target frequency. More...
 
void CLOCK_DeinitTcpuRefClk (void)
 Deinit the TCPU reference clock.
 
void CLOCK_InitTddrRefClk (clock_tddr_flexspi_div_t div)
 Initialize the TDDR reference clock. More...
 
void CLOCK_DeinitTddrRefClk (void)
 Deinit the TDDR reference clock.
 
void CLOCK_InitT3RefClk (clock_t3_mci_irc_config_t cnfg)
 Initialize the T3 reference clock. More...
 
void CLOCK_DeinitT3RefClk (void)
 Deinit the T3 reference clock. More...
 
void CLOCK_InitAvPll (const clock_avpll_config_t *cnfg)
 Initialize the AVPLL. More...
 
void CLOCK_DeinitAvPll (void)
 Deinit the AVPLL. More...
 
void CLOCK_ConfigAvPllCh (clock_avpll_ch_freq_t ch1Freq, clock_avpll_ch_freq_t ch2Freq, bool enableCali)
 Update the AVPLL channel configuration. More...
 
void CLOCK_EnableAvPllCh (bool enableCh1, bool enableCh2, bool enableCali)
 Enable the AVPLL channel. More...
 
void CLOCK_DisableAvPllCh (bool disableCh1, bool disableCh2)
 Disable the AVPLL. More...
 
void CLOCK_EnableUsbhsPhyClock (void)
 Enable USB HS PHY PLL clock. More...
 
void CLOCK_DisableUsbhsPhyClock (void)
 Disable USB HS PHY PLL clock. More...
 

Variables

volatile uint32_t g_clkinFreq
 External CLK_IN pin clock frequency (clkin) clock frequency. More...
 
volatile uint32_t g_mclkinFreq
 External MCLK IN clock frequency. More...
 

Driver version

#define FSL_CLOCK_DRIVER_VERSION   (MAKE_VERSION(2, 3, 0))
 CLOCK driver version 2.3.0. More...
 

Data Structure Documentation

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
struct clock_avpll_config_t

Data Fields

clock_avpll_ch_freq_t ch1Freq
 AVPLL channel 1 frequency configuration.
 
clock_avpll_ch_freq_t ch2Freq
 AVPLL channel 2 frequency configuration.
 
bool enableCali
 Enable calibration.
 

Macro Definition Documentation

#define FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL   0

When set to 0, peripheral drivers will enable clock in initialize function and disable clock in de-initialize function. When set to 1, peripheral driver will not control the clock, application could control the clock out of the driver.

Note
All drivers share this feature switcher. If it is set to 1, application should handle clock enable and disable for all drivers.
#define FSL_CLOCK_DRIVER_VERSION   (MAKE_VERSION(2, 3, 0))
#define GPIO_CLOCKS
Value:
{ \
kCLOCK_HsGpio0, kCLOCK_HsGpio1 \
}
#define CACHE64_CLOCKS
Value:
{ \
kCLOCK_Flexspi, kCLOCK_Flexspi \
}
#define FLEXSPI_CLOCKS
Value:
{ \
kCLOCK_Flexspi \
}
#define FLEXCOMM_CLOCKS
Value:
{ \
kCLOCK_Flexcomm0, kCLOCK_Flexcomm1, kCLOCK_Flexcomm2, kCLOCK_Flexcomm3, kCLOCK_Flexcomm14 \
}
#define USART_CLOCKS
Value:
{ \
kCLOCK_Flexcomm0, kCLOCK_Flexcomm1, kCLOCK_Flexcomm2, kCLOCK_Flexcomm3 \
}
#define I2C_CLOCKS
Value:
{ \
kCLOCK_Flexcomm0, kCLOCK_Flexcomm1, kCLOCK_Flexcomm2, kCLOCK_Flexcomm3 \
}
#define SPI_CLOCKS
Value:
{ \
kCLOCK_Flexcomm0, kCLOCK_Flexcomm1, kCLOCK_Flexcomm2, kCLOCK_Flexcomm3, kCLOCK_Flexcomm14 \
}
#define ACOMP_CLOCKS
Value:
{ \
kCLOCK_Gau \
}
#define ADC_CLOCKS
Value:
{ \
kCLOCK_Gau, kCLOCK_Gau \
}
#define DAC_CLOCKS
Value:
{ \
kCLOCK_Gau \
}
#define LCDIC_CLOCKS
Value:
{ \
kCLOCK_Lcdic \
}
#define DMA_CLOCKS
Value:
{ \
kCLOCK_Dma0, kCLOCK_Dma1 \
}
#define DMIC_CLOCKS
Value:
{ \
kCLOCK_Dmic0 \
}
#define ENET_CLOCKS
Value:
{ \
kCLOCK_EnetIpg \
}
#define ENET_EXTRA_CLOCKS
Value:
{ \
kCLOCK_EnetIpgS \
}
#define CTIMER_CLOCKS
Value:
{ \
kCLOCK_Ct32b0, kCLOCK_Ct32b1, kCLOCK_Ct32b2, kCLOCK_Ct32b3, kCLOCK_Ct32b4 \
}
#define UTICK_CLOCKS
Value:
{ \
kCLOCK_Utick \
}
#define MRT_CLOCKS
Value:
{ \
kCLOCK_Mrt, kCLOCK_FreeMrt \
}
#define SCT_CLOCKS
Value:
{ \
kCLOCK_Sct \
}
#define RTC_CLOCKS
Value:
{ \
kCLOCK_Rtc \
}
#define WWDT_CLOCKS
Value:
{ \
kCLOCK_Wwdt0 \
}
#define TRNG_CLOCKS
Value:
{ \
kCLOCK_Trng \
}
#define USIM_CLOCKS
Value:
{ \
kCLOCK_Usim \
}
#define CLK_GATE_REG_OFFSET_SHIFT   8U

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.

Enumerator
kCLOCK_TcpuFlexspiDiv12 

Divided by 12.

kCLOCK_TcpuFlexspiDiv11 

Divided by 11.

kCLOCK_TcpuFlexspiDiv10 

Divided by 10.

kCLOCK_TcpuFlexspiDiv9 

Divided by 9.

Enumerator
kCLOCK_TddrFlexspiDiv11 

Divided by 11.

kCLOCK_TddrFlexspiDiv10 

Divided by 10.

kCLOCK_TddrFlexspiDiv9 

Divided by 9.

kCLOCK_TddrFlexspiDiv8 

Divided by 8.

Enumerator
kCLOCK_T3MciIrc60m 

T3 MCI IRC 59.53MHz.

kCLOCK_T3MciIrc48m 

T3 MCI IRC 48.30MHz.

Enumerator
kCLOCK_AvPllChUnchanged 

AVPLL channel frequency unchanged.

kCLOCK_AvPllChFreq2p048m 

AVPLL channel frequency 2.048MHz.

kCLOCK_AvPllChFreq4p096m 

AVPLL channel frequency 4.096MHz.

kCLOCK_AvPllChFreq6p144m 

AVPLL channel frequency 6.144MHz.

kCLOCK_AvPllChFreq8p192m 

AVPLL channel frequency 8.192MHz.

kCLOCK_AvPllChFreq11p2896m 

AVPLL channel frequency 11.2896MHz.

kCLOCK_AvPllChFreq12m 

AVPLL channel frequency 12MHz.

kCLOCK_AvPllChFreq12p288m 

AVPLL channel frequency 12.288MHz.

kCLOCK_AvPllChFreq24p576m 

AVPLL channel frequency 24.576MHz.

kCLOCK_AvPllChFreq64m 

AVPLL channel frequency 64MHz.

kCLOCK_AvPllChFreq98p304m 

AVPLL channel frequency 98.304MHz.

Function Documentation

uint32_t CLOCK_GetT3PllMciIrcClkFreq ( void  )
Returns
Frequency of t3pll_mci_48_60m_irc
uint32_t CLOCK_GetT3PllMci213mClkFreq ( void  )
Returns
Frequency of t3pll_mci_213p3m
uint32_t CLOCK_GetT3PllMci256mClkFreq ( void  )
Returns
Frequency of t3pll_mci_256m
uint32_t CLOCK_GetT3PllMciFlexspiClkFreq ( void  )
Returns
Frequency of t3pll_mci_flexspi_clk
uint32_t CLOCK_GetTcpuMciClkFreq ( void  )
Returns
Frequency of tcpu_mci_clk
uint32_t CLOCK_GetTcpuMciFlexspiClkFreq ( void  )
Returns
Frequency of tcpu_mci_flexspi_clk
uint32_t CLOCK_GetTddrMciFlexspiClkFreq ( void  )
Returns
Frequency of tddr_mci_flexspi_clk
uint32_t CLOCK_GetTddrMciEnetClkFreq ( void  )
Returns
Frequency of tddr_mci_enet_clk
void CLOCK_EnableClock ( clock_ip_name_t  clk)
Parameters
clkWhich clock to enable, see clock_ip_name_t.
void CLOCK_DisableClock ( clock_ip_name_t  clk)
Parameters
clkWhich clock to disable, see clock_ip_name_t.
void CLOCK_AttachClk ( clock_attach_id_t  connection)
Parameters
connection: Clock to be configured.
void CLOCK_SetClkDiv ( clock_div_name_t  name,
uint32_t  divider 
)
Parameters
name: Clock divider name
divider: Value to be divided.
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.
uint32_t CLOCK_GetFFroFreq ( void  )
Returns
Frequency of FFRO
uint32_t CLOCK_GetSFroFreq ( void  )
Returns
Frequency of SFRO
uint32_t CLOCK_GetAvPllCh1Freq ( void  )
Returns
Frequency of AUDIO PLL
uint32_t CLOCK_GetAvPllCh2Freq ( void  )
Returns
Frequency of AVPLL CH2
uint32_t CLOCK_GetMainClkFreq ( void  )
Returns
Frequency of main clk
uint32_t CLOCK_GetCoreSysClkFreq ( void  )
Returns
Frequency of core/bus clk
uint32_t CLOCK_GetSystickClkFreq ( void  )
Returns
Frequency of systick clk
static uint32_t CLOCK_GetSysOscFreq ( 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_GetClk32KFreq ( void  )
inlinestatic
Returns
Frequency of 32KHz osc
void CLOCK_EnableXtal32K ( bool  enable)
Parameters
enable: true to enable 32k XTAL clock, false to disable clock
void CLOCK_EnableRtc32K ( bool  enable)
Parameters
enable: true to enable 32k RTC clock, false to disable clock
static void CLOCK_SetClkinFreq ( uint32_t  freq)
inlinestatic
Parameters
freq: The CLK_IN pin input clock frequency in Hz.
static void CLOCK_SetMclkinFreq ( uint32_t  freq)
inlinestatic
Parameters
freq: The MCLK input clock frequency in Hz.
uint32_t CLOCK_GetDmicClkFreq ( void  )
Returns
Frequency of DMIC clk
uint32_t CLOCK_GetLcdClkFreq ( void  )
Returns
Frequency of LCD clk
uint32_t CLOCK_GetWdtClkFreq ( void  )
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
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_GetUtickClkFreq ( void  )
Returns
Frequency of Utick Clock
uint32_t CLOCK_GetFlexspiClkFreq ( void  )
Returns
Frequency of Flexspi.
uint32_t CLOCK_GetUsimClkFreq ( void  )
Returns
Frequency of USIM.
uint32_t CLOCK_GetGauClkFreq ( void  )
Returns
Frequency of GAU.
uint32_t CLOCK_GetOSTimerClkFreq ( void  )
Returns
Frequency of OSTimer.
uint32_t CLOCK_InitTcpuRefClk ( uint32_t  targetHz,
clock_tcpu_flexspi_div_t  div 
)
    For 40MHz XTAL, FVCO ranges from 3000MHz to 3840MHz.
    For 38.4MHz XTAL, FVCO ranges from 2995.2MHz to 3840MHz
Parameters
targetHz: Target FVCO frequency in Hz.
div: Divider for tcpu_mci_flexspi_clk.
Returns
Actual FVCO frequency in Hz.
void CLOCK_InitTddrRefClk ( clock_tddr_flexspi_div_t  div)
Parameters
div: Divider for tddr_mci_flexspi_clk.
void CLOCK_InitT3RefClk ( clock_t3_mci_irc_config_t  cnfg)
Parameters
cnfg: t3pll_mci_48_60m_irc clock configuration
void CLOCK_DeinitT3RefClk ( void  )
void CLOCK_InitAvPll ( const clock_avpll_config_t cnfg)

Both channel 1 and 2 are enabled.

Parameters
cnfg: AVPLL clock configuration
void CLOCK_DeinitAvPll ( void  )

All channels are disabled.

void CLOCK_ConfigAvPllCh ( clock_avpll_ch_freq_t  ch1Freq,
clock_avpll_ch_freq_t  ch2Freq,
bool  enableCali 
)

Enable/Disable state keeps unchanged.

Parameters
ch1Freq: Channel 1 frequency to set.
ch2Freq: Channel 2 frequency to set.
enableCali: Enable AVPLL calibration.
void CLOCK_EnableAvPllCh ( bool  enableCh1,
bool  enableCh2,
bool  enableCali 
)
Parameters
enableCh1: Enable AVPLL channel1, channel unchanged on false.
enableCh2: Enable AVPLL channel2, channel unchanged on false.
enableCali: Enable AVPLL calibration.
void CLOCK_DisableAvPllCh ( bool  disableCh1,
bool  disableCh2 
)
Parameters
disableCh1: Disable AVPLL channel1, channel unchanged on false.
disableCh2: Disable AVPLL channel2, channel unchanged on false.
void CLOCK_EnableUsbhsPhyClock ( void  )

This function enables USB HS PHY PLL clock.

void CLOCK_DisableUsbhsPhyClock ( void  )

This function disables USB HS PHY PLL clock.

Variable Documentation

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(16000000);
*
volatile uint32_t g_mclkinFreq

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(16000000);
*