MCUXpresso SDK API Reference Manual
Rev. 0
NXP Semiconductors
|
The MCUXpresso SDK provides APIs for MCUXpresso SDK devices' clock operation.
Files | |
file | fsl_clock.h |
Data Structures | |
struct | pll_config_t |
PLL configuration structure. More... | |
struct | pll_setup_t |
PLL0 setup structure This structure can be used to pre-build a PLL setup configuration at run-time and quickly set the PLL to the configuration. More... | |
Macros | |
#define | FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL 0 |
Configure whether driver controls clock. More... | |
#define | CLOCK_USR_CFG_PLL_CONFIG_CACHE_COUNT 2U |
User-defined the size of cache for CLOCK_PllGetConfig() function. More... | |
#define | ROM_CLOCKS |
Clock ip name array for ROM. More... | |
#define | SRAM_CLOCKS |
Clock ip name array for SRAM. More... | |
#define | FLASH_CLOCKS |
Clock ip name array for FLASH. More... | |
#define | FMC_CLOCKS |
Clock ip name array for FMC. More... | |
#define | INPUTMUX_CLOCKS |
Clock ip name array for INPUTMUX. More... | |
#define | IOCON_CLOCKS |
Clock ip name array for IOCON. More... | |
#define | GPIO_CLOCKS |
Clock ip name array for GPIO. More... | |
#define | PINT_CLOCKS |
Clock ip name array for PINT. More... | |
#define | GINT_CLOCKS |
Clock ip name array for GINT. More... | |
#define | DMA_CLOCKS |
Clock ip name array for DMA. More... | |
#define | CRC_CLOCKS |
Clock ip name array for CRC. More... | |
#define | WWDT_CLOCKS |
Clock ip name array for WWDT. More... | |
#define | RTC_CLOCKS |
Clock ip name array for RTC. More... | |
#define | MAILBOX_CLOCKS |
Clock ip name array for Mailbox. More... | |
#define | LPADC_CLOCKS |
Clock ip name array for LPADC. More... | |
#define | MRT_CLOCKS |
Clock ip name array for MRT. More... | |
#define | OSTIMER_CLOCKS |
Clock ip name array for OSTIMER. More... | |
#define | SCT_CLOCKS |
Clock ip name array for SCT0. More... | |
#define | SCTIPU_CLOCKS |
Clock ip name array for SCTIPU. More... | |
#define | UTICK_CLOCKS |
Clock ip name array for UTICK. More... | |
#define | FLEXCOMM_CLOCKS |
Clock ip name array for FLEXCOMM. More... | |
#define | LPUART_CLOCKS |
Clock ip name array for LPUART. More... | |
#define | BI2C_CLOCKS |
Clock ip name array for BI2C. More... | |
#define | LPSPI_CLOCKS |
Clock ip name array for LSPI. More... | |
#define | FLEXI2S_CLOCKS |
Clock ip name array for FLEXI2S. More... | |
#define | USBTYPC_CLOCKS |
Clock ip name array for USBTYPC. More... | |
#define | CTIMER_CLOCKS |
Clock ip name array for CTIMER. More... | |
#define | PVT_CLOCKS |
Clock ip name array for PVT. | |
#define | EZHA_CLOCKS |
Clock ip name array for EZHA. | |
#define | EZHB_CLOCKS |
Clock ip name array for EZHB. | |
#define | COMP_CLOCKS |
Clock ip name array for COMP. | |
#define | SDIO_CLOCKS |
Clock ip name array for SDIO. More... | |
#define | USB1CLK_CLOCKS |
Clock ip name array for USB1CLK. More... | |
#define | FREQME_CLOCKS |
Clock ip name array for FREQME. More... | |
#define | USBRAM_CLOCKS |
Clock ip name array for USBRAM. More... | |
#define | OTP_CLOCKS |
Clock ip name array for OTP. More... | |
#define | RNG_CLOCKS |
Clock ip name array for RNG. More... | |
#define | USBHMR0_CLOCKS |
Clock ip name array for USBHMR0. More... | |
#define | USBHSL0_CLOCKS |
Clock ip name array for USBHSL0. More... | |
#define | HASHCRYPT_CLOCKS |
Clock ip name array for HashCrypt. More... | |
#define | POWERQUAD_CLOCKS |
Clock ip name array for PowerQuad. More... | |
#define | PLULUT_CLOCKS |
Clock ip name array for PLULUT. More... | |
#define | PUF_CLOCKS |
Clock ip name array for PUF. More... | |
#define | CASPER_CLOCKS |
Clock ip name array for CASPER. More... | |
#define | ANALOGCTRL_CLOCKS |
Clock ip name array for ANALOGCTRL. More... | |
#define | HS_LSPI_CLOCKS |
Clock ip name array for HS_LSPI. More... | |
#define | GPIO_SEC_CLOCKS |
Clock ip name array for GPIO_SEC. More... | |
#define | GPIO_SEC_INT_CLOCKS |
Clock ip name array for GPIO_SEC_INT. More... | |
#define | USBD_CLOCKS |
Clock ip name array for USBD. More... | |
#define | USBH_CLOCKS |
Clock ip name array for USBH. More... | |
#define | CLK_GATE_REG_OFFSET_SHIFT 8U |
Clock gate name used for CLOCK_EnableClock/CLOCK_DisableClock. More... | |
#define | BUS_CLK kCLOCK_BusClk |
Peripherals clock source definition. More... | |
#define | CLK_ATTACH_ID(mux, sel, pos) (((mux << 0U) | ((sel + 1) & 0xFU) << 8U) << (pos * 12U)) |
Clock Mux Switches The encoding is as follows each connection identified is 32bits wide while 24bits are valuable starting from LSB upwards. More... | |
#define | PLL_CONFIGFLAG_USEINRATE (1 << 0) |
PLL configuration structure flags for 'flags' field These flags control how the PLL configuration function sets up the PLL setup structure. More... | |
#define | PLL_CONFIGFLAG_FORCENOFRACT (1 << 2) |
Force non-fractional output mode, PLL output will not use the fractional, automatic bandwidth, or SS hardware. | |
#define | PLL_SETUPFLAG_POWERUP (1 << 0) |
PLL setup structure flags for 'flags' field These flags control how the PLL setup function sets up the PLL. More... | |
#define | PLL_SETUPFLAG_WAITLOCK (1 << 1) |
Setup will wait for PLL lock, implies the PLL will be pwoered on. | |
#define | PLL_SETUPFLAG_ADGVOLT (1 << 2) |
Optimize system voltage for the new PLL rate. | |
#define | PLL_SETUPFLAG_USEFEEDBACKDIV2 (1 << 3) |
Use feedback divider by 2 in divider path. | |
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_ClockOut, kCLOCK_FroHf, kCLOCK_Adc, kCLOCK_Usb0, kCLOCK_Usb1, kCLOCK_Pll1Out, kCLOCK_Mclk, kCLOCK_Sct, kCLOCK_SDio, kCLOCK_Fro12M, kCLOCK_ExtClk, kCLOCK_Pll0Out, kCLOCK_WdtClk, kCLOCK_FlexI2S, kCLOCK_Flexcomm0, kCLOCK_Flexcomm1, kCLOCK_Flexcomm2, kCLOCK_Flexcomm3, kCLOCK_Flexcomm4, kCLOCK_Flexcomm5, kCLOCK_Flexcomm6, kCLOCK_Flexcomm7, kCLOCK_HsLspi, kCLOCK_CTmier0, kCLOCK_CTmier1, kCLOCK_CTmier2, kCLOCK_CTmier3, kCLOCK_CTmier4, kCLOCK_Systick0, kCLOCK_Systick1 } |
Clock name used to get clock frequency. More... | |
enum | ss_progmodfm_t { kSS_MF_512 = (0 << 20), kSS_MF_384 = (1 << 20), kSS_MF_256 = (2 << 20), kSS_MF_128 = (3 << 20), kSS_MF_64 = (4 << 20), kSS_MF_32 = (5 << 20), kSS_MF_24 = (6 << 20), kSS_MF_16 = (7 << 20) } |
PLL Spread Spectrum (SS) Programmable modulation frequency See (MF) field in the PLL0SSCG1 register in the UM. More... | |
enum | ss_progmoddp_t { kSS_MR_K0 = (0 << 23), kSS_MR_K1 = (1 << 23), kSS_MR_K1_5 = (2 << 23), kSS_MR_K2 = (3 << 23), kSS_MR_K3 = (4 << 23), kSS_MR_K4 = (5 << 23), kSS_MR_K6 = (6 << 23), kSS_MR_K8 = (7 << 23) } |
PLL Spread Spectrum (SS) Programmable frequency modulation depth See (MR) field in the PLL0SSCG1 register in the UM. More... | |
enum | ss_modwvctrl_t { kSS_MC_NOC = (0 << 26), kSS_MC_RECC = (2 << 26), kSS_MC_MAXC = (3 << 26) } |
PLL Spread Spectrum (SS) Modulation waveform control See (MC) field in the PLL0SSCG1 register in the UM. More... | |
enum | pll_error_t { kStatus_PLL_Success = MAKE_STATUS(kStatusGroup_Generic, 0), kStatus_PLL_OutputTooLow = MAKE_STATUS(kStatusGroup_Generic, 1), kStatus_PLL_OutputTooHigh = MAKE_STATUS(kStatusGroup_Generic, 2), kStatus_PLL_InputTooLow = MAKE_STATUS(kStatusGroup_Generic, 3), kStatus_PLL_InputTooHigh = MAKE_STATUS(kStatusGroup_Generic, 4), kStatus_PLL_OutsideIntLimit = MAKE_STATUS(kStatusGroup_Generic, 5), kStatus_PLL_CCOTooLow = MAKE_STATUS(kStatusGroup_Generic, 6), kStatus_PLL_CCOTooHigh = MAKE_STATUS(kStatusGroup_Generic, 7) } |
PLL status definitions. More... | |
enum | clock_usbfs_src_t { kCLOCK_UsbfsSrcFro = (uint32_t)kCLOCK_FroHf, kCLOCK_UsbfsSrcPll0 = (uint32_t)kCLOCK_Pll0Out, kCLOCK_UsbfsSrcMainClock = (uint32_t)kCLOCK_CoreSysClk, kCLOCK_UsbfsSrcPll1 = (uint32_t)kCLOCK_Pll1Out, kCLOCK_UsbfsSrcNone } |
USB FS clock source definition. More... | |
enum | clock_usbhs_src_t { kCLOCK_UsbSrcUnused = 0xFFFFFFFFU } |
USBhs clock source definition. More... | |
enum | clock_usb_phy_src_t { kCLOCK_UsbPhySrcExt = 0U } |
Source of the USB HS PHY. More... | |
Functions | |
static void | CLOCK_EnableClock (clock_ip_name_t clk) |
Enable the clock for specific IP. More... | |
static void | CLOCK_DisableClock (clock_ip_name_t clk) |
Disable the clock for specific IP. More... | |
status_t | CLOCK_SetupFROClocking (uint32_t iFreq) |
Initialize the Core clock to given frequency (12, 48 or 96 MHz). Turns on FRO and uses default CCO, if freq is 12000000, then high speed output is off, else high speed output is enabled. More... | |
void | CLOCK_SetFLASHAccessCyclesForFreq (uint32_t iFreq) |
Set the flash wait states for the input freuqency. More... | |
status_t | CLOCK_SetupExtClocking (uint32_t iFreq) |
Initialize the external osc clock to given frequency. More... | |
status_t | CLOCK_SetupI2SMClkClocking (uint32_t iFreq) |
Initialize the I2S MCLK clock to given frequency. More... | |
void | CLOCK_AttachClk (clock_attach_id_t connection) |
Configure the clock selection muxes. More... | |
clock_attach_id_t | CLOCK_GetClockAttachId (clock_attach_id_t attachId) |
Get the actual clock attach id. This fuction uses the offset in input attach id, then it reads the actual source value in the register and combine the offset to obtain an actual attach id. More... | |
void | CLOCK_SetClkDiv (clock_div_name_t div_name, uint32_t divided_by_value, bool reset) |
Setup peripheral clock dividers. More... | |
void | CLOCK_SetRtc1khzClkDiv (uint32_t divided_by_value) |
Setup rtc 1khz clock divider. More... | |
void | CLOCK_SetRtc1hzClkDiv (uint32_t divided_by_value) |
Setup rtc 1hz clock divider. More... | |
uint32_t | CLOCK_SetFlexCommClock (uint32_t id, uint32_t freq) |
Set the flexcomm output frequency. More... | |
uint32_t | CLOCK_GetFlexCommInputClock (uint32_t id) |
Return Frequency of flexcomm input clock. More... | |
uint32_t | CLOCK_GetFreq (clock_name_t clockName) |
Return Frequency of selected clock. More... | |
uint32_t | CLOCK_GetFro12MFreq (void) |
Return Frequency of FRO 12MHz. More... | |
uint32_t | CLOCK_GetFro1MFreq (void) |
Return Frequency of FRO 1MHz. 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_GetUsb0ClkFreq (void) |
Return Frequency of Usb0 Clock. More... | |
uint32_t | CLOCK_GetUsb1ClkFreq (void) |
Return Frequency of Usb1 Clock. More... | |
uint32_t | CLOCK_GetMclkClkFreq (void) |
Return Frequency of MClk Clock. More... | |
uint32_t | CLOCK_GetSctClkFreq (void) |
Return Frequency of SCTimer Clock. More... | |
uint32_t | CLOCK_GetSdioClkFreq (void) |
Return Frequency of SDIO Clock. More... | |
uint32_t | CLOCK_GetExtClkFreq (void) |
Return Frequency of External Clock. More... | |
uint32_t | CLOCK_GetWdtClkFreq (void) |
Return Frequency of Watchdog. More... | |
uint32_t | CLOCK_GetFroHfFreq (void) |
Return Frequency of High-Freq output of FRO. More... | |
uint32_t | CLOCK_GetPll0OutFreq (void) |
Return Frequency of PLL. More... | |
uint32_t | CLOCK_GetPll1OutFreq (void) |
Return Frequency of USB PLL. More... | |
uint32_t | CLOCK_GetOsc32KFreq (void) |
Return Frequency of 32kHz osc. More... | |
uint32_t | CLOCK_GetCoreSysClkFreq (void) |
Return Frequency of Core System. More... | |
uint32_t | CLOCK_GetI2SMClkFreq (void) |
Return Frequency of I2S MCLK Clock. More... | |
uint32_t | CLOCK_GetCTimerClkFreq (uint32_t id) |
Return Frequency of CTimer functional Clock. More... | |
uint32_t | CLOCK_GetSystickClkFreq (uint32_t id) |
Return Frequency of SystickClock. More... | |
uint32_t | CLOCK_GetPLL0InClockRate (void) |
Return PLL0 input clock rate. More... | |
uint32_t | CLOCK_GetPLL1InClockRate (void) |
Return PLL1 input clock rate. More... | |
uint32_t | CLOCK_GetPLL0OutClockRate (bool recompute) |
Return PLL0 output clock rate. More... | |
uint32_t | CLOCK_GetPLL1OutClockRate (bool recompute) |
Return PLL1 output clock rate. More... | |
__STATIC_INLINE void | CLOCK_SetBypassPLL0 (bool bypass) |
Enables and disables PLL0 bypass mode. More... | |
__STATIC_INLINE void | CLOCK_SetBypassPLL1 (bool bypass) |
Enables and disables PLL1 bypass mode. More... | |
__STATIC_INLINE bool | CLOCK_IsPLL0Locked (void) |
Check if PLL is locked or not. More... | |
__STATIC_INLINE bool | CLOCK_IsPLL1Locked (void) |
Check if PLL1 is locked or not. More... | |
void | CLOCK_SetStoredPLL0ClockRate (uint32_t rate) |
Store the current PLL0 rate. More... | |
uint32_t | CLOCK_GetPLL0OutFromSetup (pll_setup_t *pSetup) |
Return PLL0 output clock rate from setup structure. More... | |
pll_error_t | CLOCK_SetupPLL0Data (pll_config_t *pControl, pll_setup_t *pSetup) |
Set PLL0 output based on the passed PLL setup data. More... | |
pll_error_t | CLOCK_SetupPLL0Prec (pll_setup_t *pSetup, uint32_t flagcfg) |
Set PLL output from PLL setup structure (precise frequency) More... | |
pll_error_t | CLOCK_SetPLL0Freq (const pll_setup_t *pSetup) |
Set PLL output from PLL setup structure (precise frequency) More... | |
pll_error_t | CLOCK_SetPLL1Freq (const pll_setup_t *pSetup) |
Set PLL output from PLL setup structure (precise frequency) More... | |
void | CLOCK_SetupPLL0Mult (uint32_t multiply_by, uint32_t input_freq) |
Set PLL0 output based on the multiplier and input frequency. More... | |
static void | CLOCK_DisableUsbDevicefs0Clock (clock_ip_name_t clk) |
Disable USB clock. More... | |
bool | CLOCK_EnableUsbfs0DeviceClock (clock_usbfs_src_t src, uint32_t freq) |
Enable USB Device FS clock. More... | |
bool | CLOCK_EnableUsbfs0HostClock (clock_usbfs_src_t src, uint32_t freq) |
Enable USB HOST FS clock. More... | |
bool | CLOCK_EnableUsbhs0PhyPllClock (clock_usb_phy_src_t src, uint32_t freq) |
Enable USB phy clock. More... | |
bool | CLOCK_EnableUsbhs0DeviceClock (clock_usbhs_src_t src, uint32_t freq) |
Enable USB Device HS clock. More... | |
bool | CLOCK_EnableUsbhs0HostClock (clock_usbhs_src_t src, uint32_t freq) |
Enable USB HOST HS clock. More... | |
void | SDK_DelayAtLeastUs (uint32_t delay_us) |
Use DWT to delay at least for some time. More... | |
Driver version | |
#define | FSL_CLOCK_DRIVER_VERSION (MAKE_VERSION(2, 1, 0)) |
CLOCK driver version 2.1.0. More... | |
struct pll_config_t |
This structure can be used to configure the settings for a PLL setup structure. Fill in the desired configuration for the PLL and call the PLL setup function to fill in a PLL setup structure.
Data Fields | |
uint32_t | desiredRate |
Desired PLL rate in Hz. | |
uint32_t | inputRate |
PLL input clock in Hz, only used if PLL_CONFIGFLAG_USEINRATE flag is set. | |
uint32_t | flags |
PLL configuration flags, Or'ed value of PLL_CONFIGFLAG_* definitions. | |
ss_progmodfm_t | ss_mf |
SS Programmable modulation frequency, only applicable when not using PLL_CONFIGFLAG_FORCENOFRACT flag. | |
ss_progmoddp_t | ss_mr |
SS Programmable frequency modulation depth, only applicable when not using PLL_CONFIGFLAG_FORCENOFRACT flag. | |
ss_modwvctrl_t | ss_mc |
SS Modulation waveform control, only applicable when not using PLL_CONFIGFLAG_FORCENOFRACT flag. | |
bool | mfDither |
false for fixed modulation frequency or true for dithering, only applicable when not using PLL_CONFIGFLAG_FORCENOFRACT flag | |
struct pll_setup_t |
It can be populated with the PLL setup function. If powering up or waiting for PLL lock, the PLL input clock source should be configured prior to PLL setup.
Data Fields | |
uint32_t | pllctrl |
PLL control register PLL0CTRL. | |
uint32_t | pllndec |
PLL NDEC register PLL0NDEC. | |
uint32_t | pllpdec |
PLL PDEC register PLL0PDEC. | |
uint32_t | pllmdec |
PLL MDEC registers PLL0PDEC. | |
uint32_t | pllsscg [2] |
PLL SSCTL registers PLL0SSCG. | |
uint32_t | pllRate |
Acutal PLL rate. | |
uint32_t | flags |
PLL setup flags, Or'ed value of PLL_SETUPFLAG_* definitions. | |
#define FSL_CLOCK_DRIVER_VERSION (MAKE_VERSION(2, 1, 0)) |
#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 CLOCK_USR_CFG_PLL_CONFIG_CACHE_COUNT 2U |
Once define this MACRO to be non-zero value, CLOCK_PllGetConfig() function would cache the recent calulation and accelerate the execution to get the right settings.
#define ROM_CLOCKS |
#define SRAM_CLOCKS |
#define FLASH_CLOCKS |
#define FMC_CLOCKS |
#define INPUTMUX_CLOCKS |
#define IOCON_CLOCKS |
#define GPIO_CLOCKS |
#define PINT_CLOCKS |
#define GINT_CLOCKS |
#define DMA_CLOCKS |
#define CRC_CLOCKS |
#define WWDT_CLOCKS |
#define RTC_CLOCKS |
#define MAILBOX_CLOCKS |
#define LPADC_CLOCKS |
#define MRT_CLOCKS |
#define OSTIMER_CLOCKS |
#define SCT_CLOCKS |
#define SCTIPU_CLOCKS |
#define UTICK_CLOCKS |
#define FLEXCOMM_CLOCKS |
#define LPUART_CLOCKS |
#define BI2C_CLOCKS |
#define LPSPI_CLOCKS |
#define FLEXI2S_CLOCKS |
#define USBTYPC_CLOCKS |
#define CTIMER_CLOCKS |
#define SDIO_CLOCKS |
#define USB1CLK_CLOCKS |
#define FREQME_CLOCKS |
#define USBRAM_CLOCKS |
#define OTP_CLOCKS |
#define RNG_CLOCKS |
#define USBHMR0_CLOCKS |
#define USBHSL0_CLOCKS |
#define HASHCRYPT_CLOCKS |
#define POWERQUAD_CLOCKS |
#define PLULUT_CLOCKS |
#define PUF_CLOCKS |
#define CASPER_CLOCKS |
#define ANALOGCTRL_CLOCKS |
#define HS_LSPI_CLOCKS |
#define GPIO_SEC_CLOCKS |
#define GPIO_SEC_INT_CLOCKS |
#define USBD_CLOCKS |
#define USBH_CLOCKS |
#define CLK_GATE_REG_OFFSET_SHIFT 8U |
#define BUS_CLK kCLOCK_BusClk |
#define CLK_ATTACH_ID | ( | mux, | |
sel, | |||
pos | |||
) | (((mux << 0U) | ((sel + 1) & 0xFU) << 8U) << (pos * 12U)) |
[4 bits for choice, 0 means invalid choice] [8 bits mux ID]*
#define PLL_CONFIGFLAG_USEINRATE (1 << 0) |
When the PLL_CONFIGFLAG_USEINRATE flag is selected, the 'InputRate' field in the configuration structure must be assigned with the expected PLL frequency. If the PLL_CONFIGFLAG_USEINRATE is not used, 'InputRate' is ignored in the configuration function and the driver will determine the PLL rate from the currently selected PLL source. This flag might be used to configure the PLL input clock more accurately when using the WDT oscillator or a more dyanmic CLKIN source.
When the PLL_CONFIGFLAG_FORCENOFRACT flag is selected, the PLL hardware for the automatic bandwidth selection, Spread Spectrum (SS) support, and fractional M-divider are not used.
Flag to use InputRate in PLL configuration structure for setup
#define PLL_SETUPFLAG_POWERUP (1 << 0) |
Setup will power on the PLL after setup
enum clock_ip_name_t |
enum clock_name_t |
enum ss_progmodfm_t |
enum ss_progmoddp_t |
enum ss_modwvctrl_t |
enum pll_error_t |
enum clock_usbfs_src_t |
enum clock_usbhs_src_t |
enum clock_usb_phy_src_t |
|
inlinestatic |
name | : Clock to be enabled. |
|
inlinestatic |
name | : Clock to be Disabled. |
status_t CLOCK_SetupFROClocking | ( | uint32_t | iFreq | ) |
iFreq | : Desired frequency (must be one of #CLK_FRO_12MHZ or #CLK_FRO_48MHZ or #CLK_FRO_96MHZ) |
void CLOCK_SetFLASHAccessCyclesForFreq | ( | uint32_t | iFreq | ) |
iFreq | : Input frequency |
status_t CLOCK_SetupExtClocking | ( | uint32_t | iFreq | ) |
iFreq | : Desired frequency (must be equal to exact rate in Hz) |
status_t CLOCK_SetupI2SMClkClocking | ( | uint32_t | iFreq | ) |
iFreq | : Desired frequency (must be equal to exact rate in Hz) |
void CLOCK_AttachClk | ( | clock_attach_id_t | connection | ) |
connection | : Clock to be configured. |
clock_attach_id_t CLOCK_GetClockAttachId | ( | clock_attach_id_t | attachId | ) |
attachId | : Clock attach id to get. |
void CLOCK_SetClkDiv | ( | clock_div_name_t | div_name, |
uint32_t | divided_by_value, | ||
bool | reset | ||
) |
div_name | : Clock divider name |
divided_by_value,: | Value to be divided |
reset | : Whether to reset the divider counter. |
void CLOCK_SetRtc1khzClkDiv | ( | uint32_t | divided_by_value | ) |
divided_by_value,: | Value to be divided |
void CLOCK_SetRtc1hzClkDiv | ( | uint32_t | divided_by_value | ) |
divided_by_value,: | Value to be divided |
uint32_t CLOCK_SetFlexCommClock | ( | uint32_t | id, |
uint32_t | freq | ||
) |
id | : flexcomm instance id freq : output frequency |
uint32_t CLOCK_GetFlexCommInputClock | ( | uint32_t | id | ) |
id | : flexcomm instance id |
uint32_t CLOCK_GetFreq | ( | clock_name_t | clockName | ) |
uint32_t CLOCK_GetFro12MFreq | ( | void | ) |
uint32_t CLOCK_GetFro1MFreq | ( | void | ) |
uint32_t CLOCK_GetClockOutClkFreq | ( | void | ) |
uint32_t CLOCK_GetAdcClkFreq | ( | void | ) |
uint32_t CLOCK_GetUsb0ClkFreq | ( | void | ) |
uint32_t CLOCK_GetUsb1ClkFreq | ( | void | ) |
uint32_t CLOCK_GetMclkClkFreq | ( | void | ) |
uint32_t CLOCK_GetSctClkFreq | ( | void | ) |
uint32_t CLOCK_GetSdioClkFreq | ( | void | ) |
uint32_t CLOCK_GetExtClkFreq | ( | void | ) |
uint32_t CLOCK_GetWdtClkFreq | ( | void | ) |
uint32_t CLOCK_GetFroHfFreq | ( | void | ) |
uint32_t CLOCK_GetPll0OutFreq | ( | void | ) |
uint32_t CLOCK_GetPll1OutFreq | ( | void | ) |
uint32_t CLOCK_GetOsc32KFreq | ( | void | ) |
uint32_t CLOCK_GetCoreSysClkFreq | ( | void | ) |
uint32_t CLOCK_GetI2SMClkFreq | ( | void | ) |
uint32_t CLOCK_GetCTimerClkFreq | ( | uint32_t | id | ) |
uint32_t CLOCK_GetSystickClkFreq | ( | uint32_t | id | ) |
uint32_t CLOCK_GetPLL0InClockRate | ( | void | ) |
uint32_t CLOCK_GetPLL1InClockRate | ( | void | ) |
uint32_t CLOCK_GetPLL0OutClockRate | ( | bool | recompute | ) |
recompute | : Forces a PLL rate recomputation if true |
uint32_t CLOCK_GetPLL1OutClockRate | ( | bool | recompute | ) |
recompute | : Forces a PLL rate recomputation if true |
__STATIC_INLINE void CLOCK_SetBypassPLL0 | ( | bool | bypass | ) |
bypass : true to bypass PLL0 (PLL0 output = PLL0 input, false to disable bypass
__STATIC_INLINE void CLOCK_SetBypassPLL1 | ( | bool | bypass | ) |
bypass : true to bypass PLL1 (PLL1 output = PLL1 input, false to disable bypass
__STATIC_INLINE bool CLOCK_IsPLL0Locked | ( | void | ) |
__STATIC_INLINE bool CLOCK_IsPLL1Locked | ( | void | ) |
void CLOCK_SetStoredPLL0ClockRate | ( | uint32_t | rate | ) |
rate,: | Current rate of the PLL0 |
uint32_t CLOCK_GetPLL0OutFromSetup | ( | pll_setup_t * | pSetup | ) |
pSetup | : Pointer to a PLL setup structure |
pll_error_t CLOCK_SetupPLL0Data | ( | pll_config_t * | pControl, |
pll_setup_t * | pSetup | ||
) |
pControl | : Pointer to populated PLL control structure to generate setup with |
pSetup | : Pointer to PLL setup structure to be filled |
pll_error_t CLOCK_SetupPLL0Prec | ( | pll_setup_t * | pSetup, |
uint32_t | flagcfg | ||
) |
pSetup | : Pointer to populated PLL setup structure |
flagcfg | : Flag configuration for PLL config structure |
pll_error_t CLOCK_SetPLL0Freq | ( | const pll_setup_t * | pSetup | ) |
pSetup | : Pointer to populated PLL setup structure |
pll_error_t CLOCK_SetPLL1Freq | ( | const pll_setup_t * | pSetup | ) |
pSetup | : Pointer to populated PLL setup structure |
void CLOCK_SetupPLL0Mult | ( | uint32_t | multiply_by, |
uint32_t | input_freq | ||
) |
multiply_by | : multiplier |
input_freq | : Clock input frequency of the PLL |
|
inlinestatic |
Disable USB clock.
bool CLOCK_EnableUsbfs0DeviceClock | ( | clock_usbfs_src_t | src, |
uint32_t | freq | ||
) |
src | : clock source |
freq,: | clock frequency Enable USB Device Full Speed clock. |
bool CLOCK_EnableUsbfs0HostClock | ( | clock_usbfs_src_t | src, |
uint32_t | freq | ||
) |
src | : clock source |
freq,: | clock frequency Enable USB HOST Full Speed clock. |
bool CLOCK_EnableUsbhs0PhyPllClock | ( | clock_usb_phy_src_t | src, |
uint32_t | freq | ||
) |
Enable USB phy clock.
bool CLOCK_EnableUsbhs0DeviceClock | ( | clock_usbhs_src_t | src, |
uint32_t | freq | ||
) |
Enable USB Device High Speed clock.
bool CLOCK_EnableUsbhs0HostClock | ( | clock_usbhs_src_t | src, |
uint32_t | freq | ||
) |
Enable USB HOST High Speed clock.
void SDK_DelayAtLeastUs | ( | uint32_t | delay_us | ) |
Please note that, this API will calculate the microsecond period with the maximum devices supported CPU frequency, so this API will only delay for at least the given microseconds, if precise delay count was needed, please implement a new timer count to achieve this function.
delay_us | Delay time in unit of microsecond. |