MCUXpresso SDK API Reference Manual
Rev. 0
NXP Semiconductors
|
The MCUXpresso SDK provides a peripheral driver for the MCG_Lite module of MCUXpresso SDK devices.
The MCG_Lite driver provides three kinds of APIs:
The CLOCK_GetOutClkFreq(), CLOCK_GetInternalRefClkFreq() and CLOCK_GetPeriphClkFreq() functions are used to get the frequency of MCGOUTCLK, MCGIRCLK, and MCGPCLK based on the current hardware setting.
The function CLOCK_GetMode() gets the current MCG_Lite mode.
The function CLOCK_SetMcgliteConfig() sets the MCG_Lite to a desired configuration. The MCG_Lite can't switch between the LIRC2M and LIRC8M. Instead, the function switches to the HIRC mode first and then switches to the target mode.
To enable the OSC clock, the MCG_Lite is needed together with the OSC module. The function CLOCK_InitOsc0() uses the MCG_Lite and the OSC to initialize the OSC. The OSC should be configured based on the board design.