Data Structures | |
struct | sim_clock_out_config_t |
SIM ClockOut configuration. Implements sim_clock_out_config_t_Class. More... | |
struct | sim_lpo_clock_config_t |
SIM LPO Clocks configuration. Implements sim_lpo_clock_config_t_Class. More... | |
struct | sim_tclk_config_t |
SIM Platform Gate Clock configuration. Implements sim_tclk_config_t_Class. More... | |
struct | sim_plat_gate_config_t |
SIM Platform Gate Clock configuration. Implements sim_plat_gate_config_t_Class. More... | |
struct | sim_qspi_ref_clk_gating_t |
SIM QSPI reference clock gating. Implements sim_qspi_ref_clk_gating_t_Class. More... | |
struct | sim_trace_clock_config_t |
SIM Debug Trace clock configuration. Implements sim_trace_clock_config_t_Class. More... | |
struct | sim_clock_config_t |
SIM configure structure. Implements sim_clock_config_t_Class. More... | |
struct | scg_system_clock_config_t |
SCG system clock configuration. Implements scg_system_clock_config_t_Class. More... | |
struct | scg_sosc_config_t |
SCG system OSC configuration. Implements scg_sosc_config_t_Class. More... | |
struct | scg_sirc_config_t |
SCG slow IRC clock configuration. Implements scg_sirc_config_t_Class. More... | |
struct | scg_firc_config_t |
SCG fast IRC clock configuration. Implements scg_firc_config_t_Class. More... | |
struct | scg_spll_config_t |
SCG system PLL configuration. Implements scg_spll_config_t_Class. More... | |
struct | scg_rtc_config_t |
SCG RTC configuration. Implements scg_rtc_config_t_Class. More... | |
struct | scg_clock_mode_config_t |
SCG Clock Mode Configuration structure. Implements scg_clock_mode_config_t_Class. More... | |
struct | scg_clockout_config_t |
SCG ClockOut Configuration structure. Implements scg_clockout_config_t_Class. More... | |
struct | scg_config_t |
SCG configure structure. Implements scg_config_t_Class. More... | |
struct | peripheral_clock_config_t |
PCC peripheral instance clock configuration. Implements peripheral_clock_config_t_Class. More... | |
struct | pcc_config_t |
PCC configuration. Implements pcc_config_t_Class. More... | |
struct | pmc_lpo_clock_config_t |
PMC LPO configuration. More... | |
struct | pmc_config_t |
PMC configure structure. More... | |
struct | clock_manager_user_config_t |
Clock configuration structure. Implements clock_manager_user_config_t_Class. More... | |
struct | module_clk_config_t |
module clock configuration. Implements module_clk_config_t_Class More... | |
struct | sys_clk_config_t |
System clock configuration. Implements sys_clk_config_t_Class. More... | |
struct | clock_source_config_t |
Clock source configuration. Implements clock_source_config_t_Class. More... | |
Macros | |
#define | NUMBER_OF_TCLK_INPUTS 3U |
TClk clock frequency. More... | |
#define | SYS_CLK_MAX_NO 3U |
The maximum number of system clock dividers and system clock divider indexes. More... | |
#define | CORE_CLK_INDEX 0U |
#define | BUS_CLK_INDEX 1U |
#define | SLOW_CLK_INDEX 2U |
#define | CLK_SRC_OFF 0x00U |
#define | CLK_SRC_SOSC 0x01U |
#define | CLK_SRC_SIRC 0x02U |
#define | CLK_SRC_FIRC 0x03U |
#define | CLK_SRC_SPLL 0x06U |
#define | CLK_SRC_SOSC_DIV1 0x01U |
#define | CLK_SRC_SIRC_DIV1 0x02U |
#define | CLK_SRC_FIRC_DIV1 0x03U |
#define | CLK_SRC_SPLL_DIV1 0x06U |
#define | CLK_SRC_SOSC_DIV2 0x01U |
#define | CLK_SRC_SIRC_DIV2 0x02U |
#define | CLK_SRC_FIRC_DIV2 0x03U |
#define | CLK_SRC_SPLL_DIV2 0x06U |
Typedefs | |
typedef uint8_t | peripheral_clock_source_t |
PCC clock source select Implements peripheral_clock_source_t_Class. More... | |
Functions | |
status_t | CLOCK_DRV_Init (clock_manager_user_config_t const *config) |
Initialize clocking modules. More... | |
status_t | CLOCK_DRV_GetFreq (clock_names_t clockName, uint32_t *frequency) |
Return frequency. More... | |
void | CLOCK_DRV_SetModuleClock (clock_names_t clockName, const module_clk_config_t *moduleClkConfig) |
Configures module clock. More... | |
status_t | CLOCK_DRV_SetSystemClock (const pwr_modes_t *mode, const sys_clk_config_t *sysClkConfig) |
Configures the system clocks. More... | |
void | CLOCK_DRV_GetSystemClockSource (sys_clk_config_t *sysClkConfig) |
Gets the system clock source. More... | |
status_t | CLOCK_DRV_SetClockSource (clock_names_t clockName, const clock_source_config_t *clkSrcConfig) |
This function configures a clock source. More... | |
Variables | |
const uint8_t | peripheralFeaturesList [CLOCK_NAME_COUNT] |
Peripheral features list Constant array storing the mappings between clock names of the peripherals and feature lists. More... | |
uint32_t | g_TClkFreq [3U] |
uint32_t | g_xtal0ClkFreq |
EXTAL0 clock frequency. More... | |
uint32_t | g_RtcClkInFreq |
RTC_CLKIN clock frequency. More... | |
SCG Clockout. | |
enum | scg_clockout_src_t { SCG_CLOCKOUT_SRC_SCG_SLOW = 0U, SCG_CLOCKOUT_SRC_SOSC = 1U, SCG_CLOCKOUT_SRC_SIRC = 2U, SCG_CLOCKOUT_SRC_FIRC = 3U, SCG_CLOCKOUT_SRC_SPLL = 6U } |
SCG ClockOut type. Implements scg_clockout_src_t_Class. More... | |
#define BUS_CLK_INDEX 1U |
Definition at line 72 of file clock_S32K1xx.h.
#define CLK_SRC_FIRC 0x03U |
SCGFIRCLK - Fast IRC Clock
Definition at line 590 of file clock_S32K1xx.h.
#define CLK_SRC_FIRC_DIV1 0x03U |
SCGFIRCLK - Fast IRC Clock
Definition at line 594 of file clock_S32K1xx.h.
#define CLK_SRC_FIRC_DIV2 0x03U |
SCGFIRCLK - Fast IRC Clock
Definition at line 598 of file clock_S32K1xx.h.
#define CLK_SRC_OFF 0x00U |
Clock is off
Definition at line 587 of file clock_S32K1xx.h.
#define CLK_SRC_SIRC 0x02U |
SCGIRCLK - Slow IRC Clock
Definition at line 589 of file clock_S32K1xx.h.
#define CLK_SRC_SIRC_DIV1 0x02U |
SCGIRCLK - Slow IRC Clock
Definition at line 593 of file clock_S32K1xx.h.
#define CLK_SRC_SIRC_DIV2 0x02U |
SCGIRCLK - Slow IRC Clock
Definition at line 597 of file clock_S32K1xx.h.
#define CLK_SRC_SOSC 0x01U |
OSCCLK - System Oscillator Bus Clock
Definition at line 588 of file clock_S32K1xx.h.
#define CLK_SRC_SOSC_DIV1 0x01U |
OSCCLK - System Oscillator Bus Clock
Definition at line 592 of file clock_S32K1xx.h.
#define CLK_SRC_SOSC_DIV2 0x01U |
OSCCLK - System Oscillator Bus Clock
Definition at line 596 of file clock_S32K1xx.h.
#define CLK_SRC_SPLL 0x06U |
SCGPCLK System PLL clock
Definition at line 591 of file clock_S32K1xx.h.
#define CLK_SRC_SPLL_DIV1 0x06U |
SCGPCLK System PLL clock
Definition at line 595 of file clock_S32K1xx.h.
#define CLK_SRC_SPLL_DIV2 0x06U |
SCGPCLK System PLL clock
Definition at line 599 of file clock_S32K1xx.h.
#define CORE_CLK_INDEX 0U |
Definition at line 71 of file clock_S32K1xx.h.
#define NUMBER_OF_TCLK_INPUTS 3U |
TClk clock frequency.
Definition at line 60 of file clock_S32K1xx.h.
#define SLOW_CLK_INDEX 2U |
Definition at line 73 of file clock_S32K1xx.h.
#define SYS_CLK_MAX_NO 3U |
The maximum number of system clock dividers and system clock divider indexes.
Definition at line 70 of file clock_S32K1xx.h.
typedef uint8_t peripheral_clock_source_t |
PCC clock source select Implements peripheral_clock_source_t_Class.
Definition at line 585 of file clock_S32K1xx.h.
enum clock_trace_src_t |
Debug trace clock source select Implements clock_trace_src_t_Class.
Enumerator | |
---|---|
CLOCK_TRACE_SRC_CORE_CLK |
core clock |
Definition at line 203 of file clock_S32K1xx.h.
PCC divider value select Implements peripheral_clock_divider_t_Class.
Definition at line 613 of file clock_S32K1xx.h.
PCC fractional value select Implements peripheral_clock_frac_t_Class.
Enumerator | |
---|---|
MULTIPLY_BY_ONE |
Fractional value is zero |
MULTIPLY_BY_TWO |
Fractional value is one |
Definition at line 604 of file clock_S32K1xx.h.
enum pwr_modes_t |
Power mode. Implements pwr_modes_t_Class.
Enumerator | |
---|---|
NO_MODE | |
RUN_MODE | |
VLPR_MODE | |
HSRUN_MODE | |
STOP_MODE | |
VLPS_MODE | |
ALL_MODES |
Definition at line 685 of file clock_S32K1xx.h.
SCG asynchronous clock divider value.
Definition at line 311 of file clock_S32K1xx.h.
enum scg_clockout_src_t |
SCG ClockOut type. Implements scg_clockout_src_t_Class.
Enumerator | |
---|---|
SCG_CLOCKOUT_SRC_SCG_SLOW |
SCG SLOW. |
SCG_CLOCKOUT_SRC_SOSC |
System OSC. |
SCG_CLOCKOUT_SRC_SIRC |
Slow IRC. |
SCG_CLOCKOUT_SRC_FIRC |
Fast IRC. |
SCG_CLOCKOUT_SRC_SPLL |
System PLL. |
Definition at line 297 of file clock_S32K1xx.h.
enum scg_firc_range_t |
SCG fast IRC clock frequency range. Implements scg_firc_range_t_Class.
Enumerator | |
---|---|
SCG_FIRC_RANGE_48M |
Fast IRC is trimmed to 48MHz. |
Definition at line 422 of file clock_S32K1xx.h.
enum scg_sirc_range_t |
SCG slow IRC clock frequency range. Implements scg_sirc_range_t_Class.
Enumerator | |
---|---|
SCG_SIRC_RANGE_HIGH |
Slow IRC high range clock (8 MHz). |
Definition at line 395 of file clock_S32K1xx.h.
enum scg_sosc_ext_ref_t |
SCG OSC external reference clock select. Implements scg_sosc_ext_ref_t_Class.
Enumerator | |
---|---|
SCG_SOSC_REF_EXT |
External reference clock requested |
SCG_SOSC_REF_OSC |
Internal oscillator of OSC requested. |
Definition at line 359 of file clock_S32K1xx.h.
enum scg_sosc_gain_t |
SCG OSC high gain oscillator select. Implements scg_sosc_gain_t_Class.
Enumerator | |
---|---|
SCG_SOSC_GAIN_LOW |
Configure crystal oscillator for low-power operation |
SCG_SOSC_GAIN_HIGH |
Configure crystal oscillator for high-gain operation |
Definition at line 349 of file clock_S32K1xx.h.
SCG system OSC monitor mode. Implements scg_sosc_monitor_mode_t_Class.
Enumerator | |
---|---|
SCG_SOSC_MONITOR_DISABLE |
Monitor disable. |
SCG_SOSC_MONITOR_INT |
Interrupt when system OSC error detected. |
SCG_SOSC_MONITOR_RESET |
Reset when system OSC error detected. |
Definition at line 328 of file clock_S32K1xx.h.
enum scg_sosc_range_t |
SCG OSC frequency range select Implements scg_sosc_range_t_Class.
Enumerator | |
---|---|
SCG_SOSC_RANGE_MID |
Medium frequency range selected for the crystal OSC (4 Mhz to 8 Mhz). |
SCG_SOSC_RANGE_HIGH |
High frequency range selected for the crystal OSC (8 Mhz to 40 Mhz). |
Definition at line 339 of file clock_S32K1xx.h.
SCG system PLL multiplier.
Definition at line 477 of file clock_S32K1xx.h.
SCG system PLL predivider.
Definition at line 461 of file clock_S32K1xx.h.
SCG system PLL monitor mode. Implements scg_spll_monitor_mode_t_Class.
Enumerator | |
---|---|
SCG_SPLL_MONITOR_DISABLE |
Monitor disable. |
SCG_SPLL_MONITOR_INT |
Interrupt when system PLL error detected. |
SCG_SPLL_MONITOR_RESET |
Reset when system PLL error detected. |
Definition at line 450 of file clock_S32K1xx.h.
SCG system clock divider value. Implements scg_system_clock_div_t_Class.
Definition at line 256 of file clock_S32K1xx.h.
SCG system clock source. Implements scg_system_clock_src_t_Class.
Enumerator | |
---|---|
SCG_SYSTEM_CLOCK_SRC_SYS_OSC |
System OSC. |
SCG_SYSTEM_CLOCK_SRC_SIRC |
Slow IRC. |
SCG_SYSTEM_CLOCK_SRC_FIRC |
Fast IRC. |
SCG_SYSTEM_CLOCK_SRC_NONE |
MAX value. |
Definition at line 241 of file clock_S32K1xx.h.
enum sim_clkout_div_t |
SIM CLKOUT divider.
Definition at line 126 of file clock_S32K1xx.h.
enum sim_clkout_src_t |
SIM CLKOUT select.
Definition at line 102 of file clock_S32K1xx.h.
enum sim_lpoclk_sel_src_t |
SIM LPOCLKSEL clock source select Implements sim_lpoclk_sel_src_t_Class.
Definition at line 91 of file clock_S32K1xx.h.
SIM CLK32KSEL clock source select Implements sim_rtc_clk_sel_src_t_Class.
Enumerator | |
---|---|
SIM_RTCCLK_SEL_SOSCDIV1_CLK |
SOSCDIV1 clock |
SIM_RTCCLK_SEL_LPO_32K |
32 kHz LPO clock |
SIM_RTCCLK_SEL_RTC_CLKIN |
RTC_CLKIN clock |
SIM_RTCCLK_SEL_FIRCDIV1_CLK |
FIRCDIV1 clock |
Definition at line 79 of file clock_S32K1xx.h.
enum xosc_ref_t |
XOSC reference clock select (internal oscillator is bypassed or not) Implements xosc_ref_t_Class.
Enumerator | |
---|---|
XOSC_EXT_REF |
Internal oscillator is bypassed, external reference clock requested. |
XOSC_INT_OSC |
Internal oscillator of XOSC requested. |
Definition at line 702 of file clock_S32K1xx.h.
status_t CLOCK_DRV_GetFreq | ( | clock_names_t | clockName, |
uint32_t * | frequency | ||
) |
Return frequency.
This function returns the frequency according to a provided clock.
[in] | clockName | Clock name of the configured peripheral clock |
[out] | frequency | Pointer to the clock frequency |
Definition at line 3079 of file clock_S32K1xx.c.
void CLOCK_DRV_GetSystemClockSource | ( | sys_clk_config_t * | sysClkConfig | ) |
Gets the system clock source.
This function gets the current system clock source.
Definition at line 3361 of file clock_S32K1xx.c.
status_t CLOCK_DRV_Init | ( | clock_manager_user_config_t const * | config | ) |
Initialize clocking modules.
This function initializes clocking modules according to a provided configuration.
[out] | config | Pointer to the configuration structure |
Definition at line 3066 of file clock_S32K1xx.c.
status_t CLOCK_DRV_SetClockSource | ( | clock_names_t | clockName, |
const clock_source_config_t * | clkSrcConfig | ||
) |
This function configures a clock source.
The clock source is configured based on the provided configuration. All values from the previous configuration of clock source are overwritten. If no configuration is provided, then a default one is used.
[in] | clockName | Clock name of the configured peripheral clock |
[in] | clkSrcConfig | Pointer to the configuration structure |
Definition at line 3416 of file clock_S32K1xx.c.
void CLOCK_DRV_SetModuleClock | ( | clock_names_t | clockName, |
const module_clk_config_t * | moduleClkConfig | ||
) |
Configures module clock.
This function configures a module clock according to the configuration. If no configuration is provided (moduleClkConfig is null), then a default one is used moduleClkConfig must be passed as null when module doesn't support protocol clock.
[in] | clockName | Clock name of the configured module clock |
[in] | moduleClkConfig | Pointer to the configuration structure. |
Definition at line 3091 of file clock_S32K1xx.c.
status_t CLOCK_DRV_SetSystemClock | ( | const pwr_modes_t * | mode, |
const sys_clk_config_t * | sysClkConfig | ||
) |
Configures the system clocks.
This function configures the system clocks (core, bus and flash clocks) in the specified power mode. If no power mode is specified (null parameter) then it is the current power mode.
[in] | mode | Pointer to power mode for which the configured system clocks apply |
[in] | sysClkConfig | Pointer to the system clocks configuration structure. |
< Dividers for SIRC
< Dividers for FIRC
< Dividers for SOSC
< Dividers for SPLL
Definition at line 3214 of file clock_S32K1xx.c.
uint32_t g_RtcClkInFreq |
RTC_CLKIN clock frequency.
Definition at line 76 of file clock_S32K1xx.c.
uint32_t g_TClkFreq[3U] |
TCLKx clocks
Definition at line 73 of file clock_S32K1xx.c.
uint32_t g_xtal0ClkFreq |
EXTAL0 clock frequency.
Definition at line 79 of file clock_S32K1xx.c.
const uint8_t peripheralFeaturesList[CLOCK_NAME_COUNT] |
Peripheral features list Constant array storing the mappings between clock names of the peripherals and feature lists.
Definition at line 384 of file clock_S32K1xx.c.