![]() |
MCUXpresso SDK API Reference Manual
Rev 2.12.1
NXP Semiconductors
|
Macros | |
| #define | FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL 0 |
| Configure whether driver controls clock. More... | |
| #define | FSL_CLOCK_DRIVER_VERSION (MAKE_VERSION(2, 0, 1)) |
| CLOCK driver version. More... | |
| #define | SPI_CLOCKS |
| Clock ip name array for SPI. More... | |
| #define | I2C_CLOCKS |
| Clock ip name array for I2C. More... | |
| #define | GPDMA_CLOCKS |
| Clock ip name array for GPDMA. More... | |
| #define | LPUART_CLOCKS |
| Clock ip name array for LPUART. More... | |
| #define | SCT_CLOCKS |
| Clock ip name array for SCTimer. | |
Enumerations | |
| enum | clock_name_t { kCLOCK_CoreSysClk } |
| Clock name used to get clock frequency. More... | |
| enum | clock_ip_name_t { kCLOCK_Timer = E_PN76_PCRM_TIMERS_CLK, kCLOCK_Hostif = E_PN76_PCRM_HOSTIF_CLK, kCLOCK_Usb = E_PN76_PCRM_USB_CLK, kCLOCK_Spi = E_PN76_PCRM_SPIM_CLK, kCLOCK_I2c = E_PN76_PCRM_I2CM_CLK, kCLOCK_Ct = E_PN76_PCRM_CT_CLK, kCLOCK_Gpdma = E_PN76_PCRM_DMA_CLK, kCLOCK_Sct = E_PN76_PCRM_PWM_CLK, kCLOCK_SctSrc45M = E_PN76_PCRM_PWM_45M_CLK, kCLOCK_IpInvalid = 127 } |
| Peripheral clock name difinition used for clock gate. More... | |
| enum | clock_usb_pll_src_t { kCLOCK_UsbPllSrcXtal = 0, kCLOCK_UsbPllSrcClifPll } |
| Enum for selection of the USB PLL reference clock. More... | |
| enum | clock_lpuart_src_t { kCLOCK_LpuartSrcHfo = E_PN76_PCRM_LP_UART_CLK, kCLOCK_LpuartSrcXtal = E_PN76_PCRM_LP_UART_XTAL_CLK } |
| LPUART clock source. More... | |
Functions | |
| static void | CLOCK_InitClockGeneration (void) |
| Performs Clock Module Initialization. More... | |
| uint32_t | CLOCK_GetFreq (clock_name_t clockName) |
| Gets the clock frequency for a specific clock name. More... | |
| uint32_t | CLOCK_GetCoreSysClkFreq (void) |
| Get the core clock or system clock frequency. More... | |
| uint32_t | CLOCK_GetLpuartClkFreq (uint8_t instance) |
| Get the LPUART clock frequency. More... | |
| uint32_t | CLOCK_GetSpiClkFreq (uint8_t instance) |
| Get the SPIM clock frequency. More... | |
| uint32_t | CLOCK_GetI2cClkFreq (uint8_t instance) |
| Get the I2CM clock frequency. More... | |
| uint32_t | CLOCK_GetSctClkFreq (uint8_t instance) |
| Get the SCTimer clock frequency. More... | |
| uint32_t | CLOCK_GetGptClkFreq (uint8_t instance) |
| Get the TIMERS(GPT) clock frequency. More... | |
| uint32_t | CLOCK_GetGpadcClkFreq (uint8_t instance) |
| Get the GPADC clock frequency. More... | |
| uint32_t | CLOCK_GetCtClkFreq (uint8_t instance) |
| Get the CT clock frequency. More... | |
| uint32_t | CLOCK_GetClifClkFreq (uint8_t instance) |
| Get the CLIF clock frequency. More... | |
| void | CLOCK_SetLpuartClk (uint8_t instance, clock_lpuart_src_t src) |
| Set the LPUART clock source. More... | |
| static void | CLOCK_EnableClock (clock_ip_name_t name) |
| Enable the clock for specific IP. More... | |
| static void | CLOCK_DisableClock (clock_ip_name_t name) |
| Disable the clock for specific IP. More... | |
| static status_t | CLOCK_SetUsbPllSource (clock_usb_pll_src_t source) |
| Select the USB PLL Reference Clock Source. More... | |
| static status_t | CLOCK_StartUsbPll (void) |
| This function enables the USB PLL and returns after the PLL is Locked. More... | |
| status_t | CLOCK_InitOsc (void) |
| Start the Crystal oscillator (XTAL). More... | |
| static void | CLOCK_SwitchSystemClockToHfo (void) |
| Switch system clock and CLIF clock to HFO. More... | |
| status_t | CLOCK_InitUsbPll (void) |
| Initialize the USB PLL. More... | |
| #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.
| #define FSL_CLOCK_DRIVER_VERSION (MAKE_VERSION(2, 0, 1)) |
| #define SPI_CLOCKS |
| #define I2C_CLOCKS |
| #define GPDMA_CLOCKS |
| #define LPUART_CLOCKS |
The clock is already enabled by calling CLOCK_SetLpuartClk.
| enum clock_name_t |
| enum clock_ip_name_t |
| enum clock_usb_pll_src_t |
| enum clock_lpuart_src_t |
|
inlinestatic |
This function initialize XTAL, SYSTEM CLK (HFO) and also configures the clock to the CLIF Module as SYSTEM Clock till PLL is available/locked.
| uint32_t CLOCK_GetFreq | ( | clock_name_t | clockName | ) |
This function checks the current clock configurations and then calculates the clock frequency for a specific clock name defined in clock_name_t. The MCG must be properly configured before using this function.
| clockName | Clock names defined in clock_name_t |
| uint32_t CLOCK_GetCoreSysClkFreq | ( | void | ) |
| uint32_t CLOCK_GetLpuartClkFreq | ( | uint8_t | instance | ) |
| instance | The LPUART instance. |
| uint32_t CLOCK_GetSpiClkFreq | ( | uint8_t | instance | ) |
| instance | The SPIM instance. |
| uint32_t CLOCK_GetI2cClkFreq | ( | uint8_t | instance | ) |
| instance | The I2CM instance. |
| uint32_t CLOCK_GetSctClkFreq | ( | uint8_t | instance | ) |
| instance | The SCTimer instance. |
| uint32_t CLOCK_GetGptClkFreq | ( | uint8_t | instance | ) |
| instance | The peripheral instance. |
| uint32_t CLOCK_GetGpadcClkFreq | ( | uint8_t | instance | ) |
| instance | The peripheral instance. |
| uint32_t CLOCK_GetCtClkFreq | ( | uint8_t | instance | ) |
| instance | The peripheral instance. |
| uint32_t CLOCK_GetClifClkFreq | ( | uint8_t | instance | ) |
| instance | The peripheral instance. |
| void CLOCK_SetLpuartClk | ( | uint8_t | instance, |
| clock_lpuart_src_t | src | ||
| ) |
| instance | The LPUART instance. |
| src | The LPUART clock source. |
|
inlinestatic |
| name | Which clock to enable, see clock_ip_name_t. |
|
inlinestatic |
| name | Which clock to disable, see clock_ip_name_t. |
|
inlinestatic |
| source | Clock source for the USB PLL Reference Clock clock_usb_pll_src_t. |
| kStatus_Success | Operation Successful |
| kStatus_InvalidArgument | Invalid parameter |
|
inlinestatic |
| kStatus_Success | Operation Successful |
| kStatus_Timeout | Operation failed. |
| status_t CLOCK_InitOsc | ( | void | ) |
|
inlinestatic |
This function is used to initialize the System clock to HFO and revert the CLIF Clock from XTAL/PLL to HFO before entering Standby/ULP Standby.
| status_t CLOCK_InitUsbPll | ( | void | ) |
This function initializes the USB PLL to work, it tries to use XTAL clock as reference clock of USB PLL, if the XTAL is not available, then tries to use CLIF PLL as reference clock.