MCUXpresso SDK API Reference Manual
Rev. 0
NXP Semiconductors
|
The MCUXpresso SDK provides a peripheral clock driver for the SYSCON module of MCUXpresso SDK devices.
Clock driver provides these functions:
SYSCON clock module provides clocks, such as MCLKCLK, ADCCLK, DMICCLK, MCGFLLCLK, FXCOMCLK,WDTOSC, RTCOSC, USBCLK and SYSPLL. The functions CLOCK_EnableClock() and CLOCK_DisableClock() enables and disables the various clocks. CLOCK_SetupFROClocking() initializes the FRO to 12MHz, 48 MHz or 96 MHz frequency. CLOCK_SetupPLLData(), CLOCK_SetupSystemPLLPrec(), and CLOCK_SetPLLFreq() functions are used to setup the PLL. The SYSCON clock driver provides functions to get the frequency of these clocks, such as CLOCK_GetFreq(), CLOCK_GetFro12MFreq(), CLOCK_GetExtClkFreq(), CLOCK_GetWdtOscFreq(), CLOCK_GetFroHfFreq(), CLOCK_GetPllOutFreq(), CLOCK_GetOsc32KFreq() , CLOCK_GetCoreSysClkFreq(), CLOCK_GetI2SMClkFreq(),CLOCK_GetFlexCommClkFreq and CLOCK_GetAsyncApbClkFreq.
The SYSCON clock driver provides the function to configure the clock selected. The function CLOCK_AttachClk() is implemented for this. The function selects the clock source for a particular peripheral like MAINCLK, DMIC, FLEXCOMM, USB, ADC and PLL.
The SYSCON clock module provides the function to setup the peripheral clock dividers. The function CLOCK_SetClkDiv() configures the CLKDIV registers for various periperals like USB, DMIC, I2S, SYSTICK, AHB, ADC and also for CLKOUT and TRACE functions.
The SYSCON clock driver provides the function CLOCK_SetFLASHAccessCyclesForFreq() that configures FLASHCFG register with a selected FLASHTIM value.
Files | |
file | fsl_clock.h |
Data Structures | |
struct | pll_config_t |
PLL configuration structure. More... | |
struct | pll_setup_t |
PLL 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... | |
struct | usb_pll_setup_t |
PLL setup structure This structure can be used to pre-build a USB PLL setup configuration at run-time and quickly set the usb 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 | CLOCK_FROHF_SETTING_API_ROM_ADDRESS (0x03007933U) |
FROHF clock setting API address in ROM. More... | |
#define | CLOCK_SetupFROClocking (*((void (*)(uint32_t))(CLOCK_FROHF_SETTING_API_ROM_ADDRESS))) |
#define | ADC_CLOCKS |
Clock ip name array for ADC. 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 | EEPROM_CLOCKS |
Clock ip name array for EEPROM. More... | |
#define | SPIFI_CLOCKS |
Clock ip name array for SPIFI. 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 | ADC0_CLOCKS |
Clock ip name array for ADC0. More... | |
#define | MRT_CLOCKS |
Clock ip name array for MRT. More... | |
#define | RIT_CLOCKS |
Clock ip name array for RIT. More... | |
#define | SCT_CLOCKS |
Clock ip name array for SCT0. More... | |
#define | MCAN_CLOCKS |
Clock ip name array for MCAN. 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 | LPSI_CLOCKS |
Clock ip name array for LSPI. More... | |
#define | FLEXI2S_CLOCKS |
Clock ip name array for FLEXI2S. More... | |
#define | DMIC_CLOCKS |
Clock ip name array for DMIC. More... | |
#define | CTIMER_CLOCKS |
Clock ip name array for CT32B. More... | |
#define | LCD_CLOCKS |
Clock ip name array for LCD. More... | |
#define | SDIO_CLOCKS |
Clock ip name array for SDIO. More... | |
#define | USBRAM_CLOCKS |
Clock ip name array for USBRAM. More... | |
#define | EMC_CLOCKS |
Clock ip name array for EMC. More... | |
#define | ETH_CLOCKS |
Clock ip name array for ETH. More... | |
#define | AES_CLOCKS |
Clock ip name array for AES. 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 | SHA0_CLOCKS |
Clock ip name array for SHA0. More... | |
#define | SMARTCARD_CLOCKS |
Clock ip name array for SMARTCARD. 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 | MUX_A(m, choice) (((m) << 0) | ((choice + 1) << 8)) |
Clock Mux Switches The encoding is as follows each connection identified is 64bits wide 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 |
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. | |
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 divided_by_value, bool reset) |
Setup peripheral clock dividers. 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_GetClockOutClkFreq (void) |
Return Frequency of ClockOut. More... | |
uint32_t | CLOCK_GetSpifiClkFreq (void) |
Return Frequency of Spifi Clock. 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_GetLcdClkFreq (void) |
Return Frequency of LCD Clock. More... | |
uint32_t | CLOCK_GetLcdClkIn (void) |
Return Frequency of LCD CLKIN Clock. More... | |
uint32_t | CLOCK_GetExtClkFreq (void) |
Return Frequency of External Clock. More... | |
uint32_t | CLOCK_GetWdtOscFreq (void) |
Return Frequency of Watchdog Oscillator. More... | |
uint32_t | CLOCK_GetFroHfFreq (void) |
Return Frequency of High-Freq output of FRO. More... | |
uint32_t | CLOCK_GetFrgClkFreq (void) |
Return Frequency of frg. More... | |
uint32_t | CLOCK_GetDmicClkFreq (void) |
Return Frequency of dmic. More... | |
uint32_t | CLOCK_GetPllOutFreq (void) |
Return Frequency of PLL. More... | |
uint32_t | CLOCK_GetUsbPllOutFreq (void) |
Return Frequency of USB PLL. More... | |
uint32_t | CLOCK_GetAudioPllOutFreq (void) |
Return Frequency of AUDIO 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_GetFlexCommClkFreq (uint32_t id) |
Return Frequency of Flexcomm functional Clock. More... | |
__STATIC_INLINE async_clock_src_t | CLOCK_GetAsyncApbClkSrc (void) |
Return Asynchronous APB Clock source. More... | |
uint32_t | CLOCK_GetAsyncApbClkFreq (void) |
Return Frequency of Asynchronous APB Clock. More... | |
uint32_t | CLOCK_GetAudioPLLInClockRate (void) |
Return Audio PLL input clock rate. More... | |
uint32_t | CLOCK_GetSystemPLLInClockRate (void) |
Return System PLL input clock rate. More... | |
uint32_t | CLOCK_GetSystemPLLOutClockRate (bool recompute) |
Return System PLL output clock rate. More... | |
uint32_t | CLOCK_GetAudioPLLOutClockRate (bool recompute) |
Return System AUDIO PLL output clock rate. More... | |
uint32_t | CLOCK_GetUSbPLLOutClockRate (bool recompute) |
Return System USB PLL output clock rate. More... | |
__STATIC_INLINE void | CLOCK_SetBypassPLL (bool bypass) |
Enables and disables PLL bypass mode. More... | |
__STATIC_INLINE bool | CLOCK_IsSystemPLLLocked (void) |
Check if PLL is locked or not. More... | |
__STATIC_INLINE bool | CLOCK_IsUsbPLLLocked (void) |
Check if USB PLL is locked or not. More... | |
__STATIC_INLINE bool | CLOCK_IsAudioPLLLocked (void) |
Check if AUDIO PLL is locked or not. More... | |
__STATIC_INLINE void | CLOCK_Enable_SysOsc (bool enable) |
Enables and disables SYS OSC. More... | |
void | CLOCK_SetStoredPLLClockRate (uint32_t rate) |
Store the current PLL rate. More... | |
void | CLOCK_SetStoredAudioPLLClockRate (uint32_t rate) |
Store the current AUDIO PLL rate. More... | |
uint32_t | CLOCK_GetSystemPLLOutFromSetup (pll_setup_t *pSetup) |
Return System PLL output clock rate from setup structure. More... | |
uint32_t | CLOCK_GetAudioPLLOutFromSetup (pll_setup_t *pSetup) |
Return System AUDIO PLL output clock rate from setup structure. More... | |
uint32_t | CLOCK_GetAudioPLLOutFromFractSetup (pll_setup_t *pSetup) |
Return System AUDIO PLL output clock rate from audio fractioanl setup structure. More... | |
uint32_t | CLOCK_GetUsbPLLOutFromSetup (const usb_pll_setup_t *pSetup) |
Return System USB PLL output clock rate from setup structure. More... | |
pll_error_t | CLOCK_SetupPLLData (pll_config_t *pControl, pll_setup_t *pSetup) |
Set PLL output based on the passed PLL setup data. More... | |
pll_error_t | CLOCK_SetupAudioPLLData (pll_config_t *pControl, pll_setup_t *pSetup) |
Set AUDIO PLL output based on the passed AUDIO PLL setup data. More... | |
pll_error_t | CLOCK_SetupSystemPLLPrec (pll_setup_t *pSetup, uint32_t flagcfg) |
Set PLL output from PLL setup structure (precise frequency) More... | |
pll_error_t | CLOCK_SetupAudioPLLPrec (pll_setup_t *pSetup, uint32_t flagcfg) |
Set AUDIO PLL output from AUDIOPLL setup structure (precise frequency) More... | |
pll_error_t | CLOCK_SetupAudioPLLPrecFract (pll_setup_t *pSetup, uint32_t flagcfg) |
Set AUDIO PLL output from AUDIOPLL setup structure using the Audio Fractional divider register(precise frequency) More... | |
pll_error_t | CLOCK_SetPLLFreq (const pll_setup_t *pSetup) |
Set PLL output from PLL setup structure (precise frequency) More... | |
pll_error_t | CLOCK_SetAudioPLLFreq (const pll_setup_t *pSetup) |
Set Audio PLL output from Audio PLL setup structure (precise frequency) More... | |
pll_error_t | CLOCK_SetUsbPLLFreq (const usb_pll_setup_t *pSetup) |
Set USB PLL output from USB PLL setup structure (precise frequency) More... | |
void | CLOCK_SetupSystemPLLMult (uint32_t multiply_by, uint32_t input_freq) |
Set PLL 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_usb_src_t src, uint32_t freq) |
Enable USB Device FS clock. More... | |
bool | CLOCK_EnableUsbfs0HostClock (clock_usb_src_t src, uint32_t freq) |
Enable USB HOST FS clock. More... | |
bool | CLOCK_EnableUsbhs0DeviceClock (clock_usb_src_t src, uint32_t freq) |
Enable USB Device HS clock. More... | |
bool | CLOCK_EnableUsbhs0HostClock (clock_usb_src_t src, uint32_t freq) |
Enable USB HOST HS clock. More... | |
Driver version | |
#define | FSL_CLOCK_DRIVER_VERSION (MAKE_VERSION(2, 0, 0)) |
CLOCK driver version 2.0.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. | |
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 SYSPLLCTRL. | |
uint32_t | pllndec |
PLL NDEC register SYSPLLNDEC. | |
uint32_t | pllpdec |
PLL PDEC register SYSPLLPDEC. | |
uint32_t | pllmdec |
PLL MDEC registers SYSPLLPDEC. | |
uint32_t | pllRate |
Acutal PLL rate. | |
uint32_t | audpllfrac |
only aduio PLL has this function | |
uint32_t | flags |
PLL setup flags, Or'ed value of PLL_SETUPFLAG_* definitions. | |
struct usb_pll_setup_t |
It can be populated with the USB PLL setup function. If powering up or waiting for USB PLL lock, the PLL input clock source should be configured prior to USB PLL setup.
Data Fields | |
uint8_t | msel |
USB PLL control register msel:1U-256U. | |
uint8_t | psel |
USB PLL control register psel:only support inter 1U 2U 4U 8U. | |
uint8_t | nsel |
USB PLL control register nsel:only suppoet inter 1U 2U 3U 4U. | |
bool | direct |
USB PLL CCO output control. | |
bool | bypass |
USB PLL inout clock bypass control. | |
bool | fbsel |
USB PLL ineter mode and non-integer mode control. | |
uint32_t | inputRate |
USB PLL input rate. | |
#define FSL_CLOCK_DRIVER_VERSION (MAKE_VERSION(2, 0, 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 contol 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 CLOCK_FROHF_SETTING_API_ROM_ADDRESS (0x03007933U) |
#define CLOCK_SetupFROClocking (*((void (*)(uint32_t))(CLOCK_FROHF_SETTING_API_ROM_ADDRESS))) |
Initialize the Core clock to given frequency (12, 48 or 96 MHz), this API is implememnt in ROM code. Turns on FRO and uses default CCO, if freq is 12000000, then high speed output is off, else high speed output is enabled. Usage: CLOCK_SetupFROClocking(frequency), (frequency must be one of 12, 48 or 96 MHz) Note: Need to make sure ROM and OTP has power(PDRUNCFG0[17,29]= 0U) before calling this API since this API is implemented in ROM code and the FROHF TRIM value is stored in OTP
#define ADC_CLOCKS |
#define ROM_CLOCKS |
#define SRAM_CLOCKS |
#define FLASH_CLOCKS |
#define FMC_CLOCKS |
#define EEPROM_CLOCKS |
#define SPIFI_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 ADC0_CLOCKS |
#define MRT_CLOCKS |
#define RIT_CLOCKS |
#define SCT_CLOCKS |
#define MCAN_CLOCKS |
#define UTICK_CLOCKS |
#define FLEXCOMM_CLOCKS |
#define LPUART_CLOCKS |
#define BI2C_CLOCKS |
#define LPSI_CLOCKS |
#define FLEXI2S_CLOCKS |
#define DMIC_CLOCKS |
#define CTIMER_CLOCKS |
#define LCD_CLOCKS |
#define SDIO_CLOCKS |
#define USBRAM_CLOCKS |
#define EMC_CLOCKS |
#define ETH_CLOCKS |
#define AES_CLOCKS |
#define OTP_CLOCKS |
#define RNG_CLOCKS |
#define USBHMR0_CLOCKS |
#define USBHSL0_CLOCKS |
#define SHA0_CLOCKS |
#define SMARTCARD_CLOCKS |
#define USBD_CLOCKS |
#define USBH_CLOCKS |
#define CLK_GATE_REG_OFFSET_SHIFT 8U |
#define MUX_A | ( | m, | |
choice | |||
) | (((m) << 0) | ((choice + 1) << 8)) |
[4 bits for choice, where 1 is A, 2 is B, 3 is C and 4 is D, 0 means end of descriptor] [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 async_clock_src_t |
enum pll_error_t |
enum clock_usb_src_t |
enum usb_pll_psel |
void CLOCK_AttachClk | ( | clock_attach_id_t | connection | ) |
connection | : Clock to be configured. |
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. |
uint32_t CLOCK_GetFreq | ( | clock_name_t | clockName | ) |
uint32_t CLOCK_GetFro12MFreq | ( | void | ) |
uint32_t CLOCK_GetClockOutClkFreq | ( | void | ) |
uint32_t CLOCK_GetSpifiClkFreq | ( | 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_GetLcdClkFreq | ( | void | ) |
uint32_t CLOCK_GetLcdClkIn | ( | void | ) |
uint32_t CLOCK_GetExtClkFreq | ( | void | ) |
uint32_t CLOCK_GetWdtOscFreq | ( | void | ) |
uint32_t CLOCK_GetFroHfFreq | ( | void | ) |
uint32_t CLOCK_GetFrgClkFreq | ( | void | ) |
uint32_t CLOCK_GetDmicClkFreq | ( | void | ) |
uint32_t CLOCK_GetPllOutFreq | ( | void | ) |
uint32_t CLOCK_GetUsbPllOutFreq | ( | void | ) |
uint32_t CLOCK_GetAudioPllOutFreq | ( | void | ) |
uint32_t CLOCK_GetOsc32KFreq | ( | void | ) |
uint32_t CLOCK_GetCoreSysClkFreq | ( | void | ) |
uint32_t CLOCK_GetI2SMClkFreq | ( | void | ) |
uint32_t CLOCK_GetFlexCommClkFreq | ( | uint32_t | id | ) |
__STATIC_INLINE async_clock_src_t CLOCK_GetAsyncApbClkSrc | ( | void | ) |
uint32_t CLOCK_GetAsyncApbClkFreq | ( | void | ) |
uint32_t CLOCK_GetAudioPLLInClockRate | ( | void | ) |
uint32_t CLOCK_GetSystemPLLInClockRate | ( | void | ) |
uint32_t CLOCK_GetSystemPLLOutClockRate | ( | bool | recompute | ) |
recompute | : Forces a PLL rate recomputation if true |
uint32_t CLOCK_GetAudioPLLOutClockRate | ( | bool | recompute | ) |
recompute | : Forces a AUDIO PLL rate recomputation if true |
uint32_t CLOCK_GetUSbPLLOutClockRate | ( | bool | recompute | ) |
recompute | : Forces a USB PLL rate recomputation if true |
__STATIC_INLINE void CLOCK_SetBypassPLL | ( | bool | bypass | ) |
bypass : true to bypass PLL (PLL output = PLL input, false to disable bypass
__STATIC_INLINE bool CLOCK_IsSystemPLLLocked | ( | void | ) |
__STATIC_INLINE bool CLOCK_IsUsbPLLLocked | ( | void | ) |
__STATIC_INLINE bool CLOCK_IsAudioPLLLocked | ( | void | ) |
__STATIC_INLINE void CLOCK_Enable_SysOsc | ( | bool | enable | ) |
enable : true to enable SYS OSC, false to disable SYS OSC
void CLOCK_SetStoredPLLClockRate | ( | uint32_t | rate | ) |
rate,: | Current rate of the PLL |
void CLOCK_SetStoredAudioPLLClockRate | ( | uint32_t | rate | ) |
rate,: | Current rate of the PLL |
uint32_t CLOCK_GetSystemPLLOutFromSetup | ( | pll_setup_t * | pSetup | ) |
pSetup | : Pointer to a PLL setup structure |
uint32_t CLOCK_GetAudioPLLOutFromSetup | ( | pll_setup_t * | pSetup | ) |
pSetup | : Pointer to a PLL setup structure |
uint32_t CLOCK_GetAudioPLLOutFromFractSetup | ( | pll_setup_t * | pSetup | ) |
pSetup | : Pointer to a PLL setup structure |
uint32_t CLOCK_GetUsbPLLOutFromSetup | ( | const usb_pll_setup_t * | pSetup | ) |
pSetup | : Pointer to a PLL setup structure |
pll_error_t CLOCK_SetupPLLData | ( | 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_SetupAudioPLLData | ( | 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_SetupSystemPLLPrec | ( | 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_SetupAudioPLLPrec | ( | 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_SetupAudioPLLPrecFract | ( | 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_SetPLLFreq | ( | const pll_setup_t * | pSetup | ) |
pSetup | : Pointer to populated PLL setup structure |
pll_error_t CLOCK_SetAudioPLLFreq | ( | const pll_setup_t * | pSetup | ) |
pSetup | : Pointer to populated PLL setup structure |
pll_error_t CLOCK_SetUsbPLLFreq | ( | const usb_pll_setup_t * | pSetup | ) |
pSetup | : Pointer to populated USB PLL setup structure |
void CLOCK_SetupSystemPLLMult | ( | 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_usb_src_t | src, |
uint32_t | freq | ||
) |
src | : clock source |
freq,: | clock frequency Enable USB Device Full Speed clock. |
bool CLOCK_EnableUsbfs0HostClock | ( | clock_usb_src_t | src, |
uint32_t | freq | ||
) |
src | : clock source |
freq,: | clock frequency Enable USB HOST Full Speed clock. |
bool CLOCK_EnableUsbhs0DeviceClock | ( | clock_usb_src_t | src, |
uint32_t | freq | ||
) |
src | : clock source |
freq,: | clock frequency Enable USB Device High Speed clock. |
bool CLOCK_EnableUsbhs0HostClock | ( | clock_usb_src_t | src, |
uint32_t | freq | ||
) |
src | : clock source |
freq,: | clock frequency Enable USB HOST High Speed clock. |