MCUXpresso SDK API Reference Manual  Rev. 0
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.

Files

file  fsl_clock.h
 

Macros

#define SRAM_CLOCKS
 Clock ip name array for SRAM. More...
 
#define FLASH_CLOCKS
 Clock ip name array for FLASH. More...
 
#define IOCON_CLOCKS
 Clock ip name array for IOCON. More...
 
#define GPIO_CLOCKS
 Clock ip name array for GPIO. More...
 
#define WDT_CLOCKS
 Clock ip name array for WDT. More...
 
#define I2C_CLOCKS
 Clock ip name array for I2C. More...
 
#define SPISSP_CLOCKS
 Clock ip name array for SPISSP. More...
 
#define CTIMER_CLOCKS
 Clock ip name array for CTIMER. More...
 
#define TSEN_CLOCKS
 Clock ip name array for TSEN. More...
 
#define EEPROM_CLOCKS
 Clock ip name array for EEPROM. More...
 
#define CLK_GATE_DEFINE(reg, value)   ((((reg)&0xFFU) << 24U) | ((value)&0xFFFFFFU))
 Internal used Clock definition only. More...
 

Enumerations

enum  clock_ip_name_t
 Clock gate name used for CLOCK_EnableClock/CLOCK_DisableClock. More...
 
enum  clock_name_t {
  kCLOCK_SysClk,
  kCLOCK_Sfro,
  kCLOCK_Tfro
}
 Clock name used to get clock frequency. More...
 
enum  clock_select_t
 Clock Mux Switches CLK_MUX_DEFINE(reg, mux) reg is used to define the mux register mux is used to define the mux value. More...
 
enum  clock_divider_t
 Clock divider.
 
enum  clock_SysClkfrequency_t
 System clock frequency.
 

Driver version

#define FSL_CLOCK_DRIVER_VERSION   (MAKE_VERSION(2, 0, 4))
 CLOCK driver version 2.0.4. More...
 

Clock gate, mux, and divider.

static void CLOCKOUT_Enable (bool value)
 
static void CLOCK_EnableClock (clock_ip_name_t clk)
 
static void CLOCK_DisableClock (clock_ip_name_t clk)
 
static void CLOCK_UpdateWdtClk (void)
 
static void CLOCK_Select (clock_select_t sel)
 
static void CLOCK_SetClkDivider (clock_divider_t name, uint32_t value)
 
static uint32_t CLOCK_GetClkDivider (clock_divider_t name)
 
static void CLOCK_SetSysClkDiv (clock_SysClkfrequency_t name)
 

Get frequency

static uint32_t CLOCK_GetSysClkFreq (void)
 Return Frequency of system clock. More...
 
uint32_t CLOCK_GetClockOutClkFreq (void)
 Return Frequency of ClockOut. More...
 
uint32_t CLOCK_GetFreq (clock_name_t clockName)
 Return Frequency of selected clock. More...
 
void CLOCK_WdtClkSelect (bool sel)
 enable wdt clock Update More...
 
static uint32_t CLOCK_GetSysclktrim (void)
 
static uint32_t CLOCK_GetTmrclktrim (void)
 

Macro Definition Documentation

#define FSL_CLOCK_DRIVER_VERSION   (MAKE_VERSION(2, 0, 4))
#define SRAM_CLOCKS
Value:
{ \
kCLOCK_Ram \
}
#define FLASH_CLOCKS
Value:
{ \
kCLOCK_Flashreg_Flasharray \
}
#define IOCON_CLOCKS
Value:
{ \
kCLOCK_Iocon \
}
#define GPIO_CLOCKS
Value:
{ \
kCLOCK_Gpio \
}
#define WDT_CLOCKS
Value:
{ \
kCLOCK_Wdt \
}
#define I2C_CLOCKS
Value:
{ \
kCLOCK_I2c \
}
#define SPISSP_CLOCKS
Value:
{ \
kCLOCK_Spissp \
}
#define CTIMER_CLOCKS
Value:
{ \
kCLOCK_Ct16b, kCLOCK_Ct32b \
}
#define TSEN_CLOCKS
Value:
{ \
kCLOCK_Tsen \
}
#define EEPROM_CLOCKS
Value:
{ \
kCLOCK_Eepeg_Eearray \
}
#define CLK_GATE_DEFINE (   reg,
  value 
)    ((((reg)&0xFFU) << 24U) | ((value)&0xFFFFFFU))

Enumeration Type Documentation

Enumerator
kCLOCK_SysClk 

Cpu/AHB/AHB matrix/Memories,etc.

kCLOCK_Sfro 

System FRO.

kCLOCK_Tfro 

Timer FRO.

Function Documentation

static uint32_t CLOCK_GetSysClkFreq ( void  )
inlinestatic
Returns
Frequency of system clock.
uint32_t CLOCK_GetClockOutClkFreq ( void  )
Returns
Frequency of ClockOut
uint32_t CLOCK_GetFreq ( clock_name_t  clockName)
Returns
Frequency of selected clock
void CLOCK_WdtClkSelect ( bool  sel)
Parameters
sel,:1=update 0=no update
Returns
Nothing