clock_S32K1xx.c File Reference
#include "device_registers.h"
#include "sim_hw_access.h"
#include "scg_hw_access.h"
#include "pcc_hw_access.h"
#include "pmc_hw_access.h"
#include "smc_hw_access.h"
#include "clock_manager.h"
#include <stddef.h>

Go to the source code of this file.

Macros

#define LPO_128K_FREQUENCY   128000UL
 
#define LPO_32K_FREQUENCY   32000UL
 
#define LPO_1K_FREQUENCY   1000UL
 
#define HIGH_SPEED_RUNNING_MODE   (1UL << 7U)
 
#define RUN_SPEED_RUNNING_MODE   (1UL << 0U)
 
#define VLPR_SPEED_RUNNING_MODE   (1UL << 2U)
 
#define MODES_MAX_NO   7U
 
#define CLOCK_MAX_FREQUENCIES_VLPR_MODE
 
#define CLOCK_MAX_FREQUENCIES_RUN_MODE
 
#define TMP_FTFC   1U
 
#define TMP_DMAMUX   1U
 
#define TMP_FlexCAN0   1U
 
#define TMP_FlexCAN1   0U
 
#define TMP_FTM3   0U
 
#define TMP_ADC1   0U
 
#define TMP_FlexCAN2   0U
 
#define TMP_LPSPI0   1U
 
#define TMP_LPSPI1   1U
 
#define TMP_LPSPI2   0U
 
#define TMP_PDB1   0U
 
#define TMP_CRC   1U
 
#define TMP_PDB0   1U
 
#define TMP_LPIT   1U
 
#define TMP_FTM0   1U
 
#define TMP_FTM1   1U
 
#define TMP_FTM2   0U
 
#define TMP_ADC0   1U
 
#define TMP_RTC   1U
 
#define TMP_LPTMR0   1U
 
#define TMP_PORTA   1U
 
#define TMP_PORTB   1U
 
#define TMP_PORTC   1U
 
#define TMP_PORTD   1U
 
#define TMP_PORTE   1U
 
#define TMP_SAI0   0U
 
#define TMP_SAI1   0U
 
#define TMP_FlexIO   1U
 
#define TMP_EWM   0U
 
#define TMP_LPI2C0   1U
 
#define TMP_LPI2C1   0U
 
#define TMP_LPUART0   1U
 
#define TMP_LPUART1   1U
 
#define TMP_LPUART2   0U
 
#define TMP_FTM4   0U
 
#define TMP_FTM5   0U
 
#define TMP_FTM6   0U
 
#define TMP_FTM7   0U
 
#define TMP_CMP0   1U
 
#define TMP_QSPI   0U
 
#define TMP_ENET   0U
 
#define CLOCK_PERIPHERALS_COUNT   (TMP_FTFC + TMP_DMAMUX + TMP_FlexCAN0 + TMP_FlexCAN1 + TMP_FTM3 + TMP_ADC1 + TMP_FlexCAN2 + TMP_LPSPI0 + TMP_LPSPI1 + TMP_LPSPI2 + TMP_PDB1 + TMP_CRC + TMP_PDB0 + TMP_LPIT + TMP_FTM0 + TMP_FTM1 + TMP_FTM2 + TMP_ADC0 + TMP_RTC + TMP_LPTMR0 + TMP_PORTA + TMP_PORTB + TMP_PORTC + TMP_PORTD + TMP_PORTE + TMP_SAI0 + TMP_SAI1 + TMP_FlexIO + TMP_EWM + TMP_LPI2C0 + TMP_LPI2C1 + TMP_LPUART0 + TMP_LPUART1 + TMP_LPUART2 + TMP_FTM4 + TMP_FTM5 + TMP_FTM6 + TMP_FTM7 + TMP_CMP0 + TMP_QSPI + TMP_ENET)
 

Enumerations

enum  scg_system_clock_type_t { SCG_SYSTEM_CLOCK_CORE, SCG_SYSTEM_CLOCK_BUS, SCG_SYSTEM_CLOCK_SLOW, SCG_SYSTEM_CLOCK_MAX }
 SCG system clock type. Implements scg_system_clock_type_t_Class. More...
 
enum  scg_async_clock_type_t { SCG_ASYNC_CLOCK_DIV1 = 0U, SCG_ASYNC_CLOCK_DIV2 = 1U, SCG_ASYNC_CLOCK_MAX = 2U }
 SCG asynchronous clock type. Implements scg_async_clock_type_t_Class. More...
 
enum  scg_system_clock_mode_t {
  SCG_SYSTEM_CLOCK_MODE_CURRENT = 0U, SCG_SYSTEM_CLOCK_MODE_RUN = 1U, SCG_SYSTEM_CLOCK_MODE_VLPR = 2U, SCG_SYSTEM_CLOCK_MODE_HSRUN = 3U,
  SCG_SYSTEM_CLOCK_MODE_NONE
}
 SCG system clock modes. Implements scg_system_clock_mode_t_Class. More...
 

Functions

static void CLOCK_SYS_GetDefaultConfiguration (clock_manager_user_config_t *config)
 
static status_t CLOCK_SYS_GetScgClockFreq (clock_names_t clockName, uint32_t *frequency)
 
static status_t CLOCK_SYS_GetSimClockFreq (clock_names_t clockName, uint32_t *frequency)
 
static status_t CLOCK_SYS_GetPccClockFreq (clock_names_t clockName, uint32_t *frequency)
 
static uint32_t CLOCK_SYS_GetPeripheralClock (clock_names_t clockName, scg_async_clock_type_t divider)
 
static scg_system_clock_mode_t CLOCK_SYS_GetCurrentRunMode (void)
 
static status_t CLOCK_SYS_TransitionSystemClock (const scg_system_clock_config_t *to_clk)
 
static uint32_t CLOCK_SYS_GetSimClkOutFreq (void)
 
static uint32_t CLOCK_SYS_GetScgClkOutFreq (void)
 
static uint32_t CLOCK_SYS_GetSimRtcClkFreq (void)
 
static status_t CLOCK_SYS_ConfigureTemporarySystemClock (void)
 
static status_t CLOCK_SYS_ConfigureModulesFromScg (const scg_config_t *scgConfig)
 
static status_t CLOCK_SYS_ConfigureSIRC (bool enable, const scg_sirc_config_t *sircConfig)
 
static status_t CLOCK_SYS_ConfigureFIRC (bool enable, const scg_firc_config_t *fircConfig)
 
static status_t CLOCK_SYS_ConfigureSOSC (bool enable, const scg_sosc_config_t *soscConfig)
 
static uint32_t CLOCK_SYS_GetSystemClockFreq (scg_system_clock_type_t type)
 
static status_t CLOCK_SYS_SetSystemClockConfig (scg_system_clock_mode_t mode, scg_system_clock_config_t const *config)
 
static uint32_t CLOCK_SYS_GetSysAsyncFreq (clock_names_t clockSource, scg_async_clock_type_t type)
 
static uint32_t CLOCK_SYS_GetSircFreq (void)
 
static uint32_t CLOCK_SYS_GetFircFreq (void)
 
static uint32_t CLOCK_SYS_GetSysOscFreq (void)
 
static uint32_t CLOCK_SYS_GetLpoFreq (void)
 
static status_t CLOCK_SYS_TransitionToTmpSysClk (scg_system_clock_src_t currentSysClkSrc)
 
static void CLOCK_SYS_GetCurrentSysClkConfig (scg_system_clock_config_t *sysClockConfig)
 
static status_t CLOCK_SYS_SetScgConfiguration (const scg_config_t *scgConfig)
 
static void CLOCK_SYS_SetPccConfiguration (const pcc_config_t *peripheralClockConfig)
 
static void CLOCK_SYS_SetSimConfiguration (const sim_clock_config_t *simClockConfig)
 
static void CLOCK_SYS_SetPmcConfiguration (const pmc_config_t *pmcConfig)
 
static scg_async_clock_div_t CLOCK_SYS_ConvertAsyncDividerValue (uint16_t divider)
 
status_t CLOCK_SYS_SetConfiguration (clock_manager_user_config_t const *config)
 Set system clock configuration. More...
 
status_t CLOCK_SYS_GetFreq (clock_names_t clockName, uint32_t *frequency)
 Gets the clock frequency for a specific clock name. More...
 
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

uint32_t g_TClkFreq [NUMBER_OF_TCLK_INPUTS]
 
uint32_t g_RtcClkInFreq
 RTC_CLKIN clock frequency. More...
 
uint32_t g_xtal0ClkFreq
 EXTAL0 clock frequency. More...
 
const uint16_t clockNameMappings [] = { 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 115 , 50 , 33 , 73 , 74 , 75 , 76 , 77 , 61 , 0 , 36 , 54 , 0 , 32 , 0 , 56 , 57 , 0 , 59 , 90 , 102 , 55 , 44 , 45 , 64 , 106 , 107 , 0 , 0 , }
 Clock name mappings Constant array storing the mappings between clock names and peripheral clock control indexes. If there is no peripheral clock control index for a clock name, then the corresponding value is PCC_INVALID_INDEX. More...
 
const uint8_t peripheralFeaturesList [] = { ( (0U) ), ( (0U) ), ( (0U) ), ( (0U) ), ( (0U) ), ( (0U) ), ( (0U) ), ( (0U) ), ( (0U) ), ( (0U) ), ( (0U) ), ( (0U) ), ( (0U) ), ( (0U) ), ( (0U) ), ( (0U) ), ( (0U) ), ( (0U) ), ( (0U) ), ( (0U) ), ( (0U) ), ( (0U) ), ( (0U) ), ( (0U) ), ( (0U) ), ( (0U) ), ( (0U) ), ( (0U) ), ( (0U) ), ( (1U << 0U) | (1U << 6U) ), ( (1U << 0U) | (1U << 6U) ), ( (1U << 0U) | (1U << 6U) ), ( (1U << 0U) | (1U << 6U) ), ( (1U << 0U) | (1U << 6U) ), ( (0U) ), ( (0U) ), ( (0U) ), ( (0U) ), ( (0U) ), ( (0U) ), ( (0U) ), ( (1U << 5U) ), ( (1U << 5U) ), ( (1U << 5U) ), ( (1U << 5U) ), ( (1U << 5U) ), ( (1U << 5U) ), ( (1U << 5U) ), ( (1U << 5U) ), ( (1U << 5U) ), ( (0U) ), ( (1U << 6U) ), ( (1U << 6U) ), ( (0U) ), ( (1U << 7U) ), ( (0U) ), ( (1U << 3U) | (1U << 6U) ), ( (1U << 3U) | (1U << 6U) ), ( (0U) ), ( (1U << 4U) | (1U << 5U) ), ( (1U << 4U) | (1U << 5U) ), ( (1U << 4U) | (1U << 5U) ), ( (1U << 4U) | (1U << 5U) ), ( (1U << 4U) | (1U << 5U) ), ( (1U << 4U) | (1U << 5U) ), ( (1U << 1U) | (1U << 2U) | (1U << 4U) | (1U << 5U) ), ( (1U << 4U) | (1U << 5U) ), ( (1U << 4U) | (1U << 5U) ), ( (0U) ), ( (0U) ), }
 Peripheral features list Constant array storing the mappings between clock names of the peripherals and feature lists. More...
 

Macro Definition Documentation

#define CLOCK_MAX_FREQUENCIES_RUN_MODE
Value:
{/* SYS_CLK BUS_CLK SLOW_CLK */ \
{ 0UL, 0UL, 0UL}, \
{80000000UL, 48000000UL, 26670000UL}, \
{80000000UL, 48000000UL, 26670000UL}, \
{80000000UL, 48000000UL, 26670000UL}, \
{ 0UL, 0UL, 0UL}, \
{ 0UL, 0UL, 0UL}, \
{80000000UL, 40000000UL, 26670000UL}, \
}

Definition at line 139 of file clock_S32K1xx.c.

#define CLOCK_MAX_FREQUENCIES_VLPR_MODE
Value:
{/* SYS_CLK BUS_CLK SLOW_CLK */ \
{ 0UL, 0UL, 0UL}, \
{ 4000000UL, 4000000UL, 1000000UL}, \
{ 4000000UL, 4000000UL, 1000000UL}, \
{ 4000000UL, 4000000UL, 1000000UL}, \
{ 0UL, 0UL, 0UL}, \
{ 0UL, 0UL, 0UL}, \
{ 4000000UL, 4000000UL, 1000000UL}, \
}

Definition at line 129 of file clock_S32K1xx.c.

#define HIGH_SPEED_RUNNING_MODE   (1UL << 7U)

Definition at line 123 of file clock_S32K1xx.c.

#define LPO_128K_FREQUENCY   128000UL

Definition at line 108 of file clock_S32K1xx.c.

#define LPO_1K_FREQUENCY   1000UL

Definition at line 118 of file clock_S32K1xx.c.

#define LPO_32K_FREQUENCY   32000UL

Definition at line 113 of file clock_S32K1xx.c.

#define MODES_MAX_NO   7U

Definition at line 128 of file clock_S32K1xx.c.

#define RUN_SPEED_RUNNING_MODE   (1UL << 0U)

Definition at line 124 of file clock_S32K1xx.c.

#define TMP_ADC0   1U

Definition at line 251 of file clock_S32K1xx.c.

#define TMP_ADC1   0U

Definition at line 193 of file clock_S32K1xx.c.

#define TMP_CMP0   1U

Definition at line 356 of file clock_S32K1xx.c.

#define TMP_CRC   1U

Definition at line 221 of file clock_S32K1xx.c.

#define TMP_DMAMUX   1U

Definition at line 171 of file clock_S32K1xx.c.

#define TMP_ENET   0U

Definition at line 368 of file clock_S32K1xx.c.

#define TMP_EWM   0U

Definition at line 308 of file clock_S32K1xx.c.

#define TMP_FlexCAN0   1U

Definition at line 176 of file clock_S32K1xx.c.

#define TMP_FlexCAN1   0U

Definition at line 183 of file clock_S32K1xx.c.

#define TMP_FlexCAN2   0U

Definition at line 198 of file clock_S32K1xx.c.

#define TMP_FlexIO   1U

Definition at line 301 of file clock_S32K1xx.c.

#define TMP_FTFC   1U

Definition at line 166 of file clock_S32K1xx.c.

#define TMP_FTM0   1U

Definition at line 236 of file clock_S32K1xx.c.

#define TMP_FTM1   1U

Definition at line 241 of file clock_S32K1xx.c.

#define TMP_FTM2   0U

Definition at line 248 of file clock_S32K1xx.c.

#define TMP_FTM3   0U

Definition at line 188 of file clock_S32K1xx.c.

#define TMP_FTM4   0U

Definition at line 338 of file clock_S32K1xx.c.

#define TMP_FTM5   0U

Definition at line 343 of file clock_S32K1xx.c.

#define TMP_FTM6   0U

Definition at line 348 of file clock_S32K1xx.c.

#define TMP_FTM7   0U

Definition at line 353 of file clock_S32K1xx.c.

#define TMP_LPI2C0   1U

Definition at line 311 of file clock_S32K1xx.c.

#define TMP_LPI2C1   0U

Definition at line 318 of file clock_S32K1xx.c.

#define TMP_LPIT   1U

Definition at line 231 of file clock_S32K1xx.c.

#define TMP_LPSPI0   1U

Definition at line 201 of file clock_S32K1xx.c.

#define TMP_LPSPI1   1U

Definition at line 206 of file clock_S32K1xx.c.

#define TMP_LPSPI2   0U

Definition at line 213 of file clock_S32K1xx.c.

#define TMP_LPTMR0   1U

Definition at line 261 of file clock_S32K1xx.c.

#define TMP_LPUART0   1U

Definition at line 321 of file clock_S32K1xx.c.

#define TMP_LPUART1   1U

Definition at line 326 of file clock_S32K1xx.c.

#define TMP_LPUART2   0U

Definition at line 333 of file clock_S32K1xx.c.

#define TMP_PDB0   1U

Definition at line 226 of file clock_S32K1xx.c.

#define TMP_PDB1   0U

Definition at line 218 of file clock_S32K1xx.c.

#define TMP_PORTA   1U

Definition at line 266 of file clock_S32K1xx.c.

#define TMP_PORTB   1U

Definition at line 271 of file clock_S32K1xx.c.

#define TMP_PORTC   1U

Definition at line 276 of file clock_S32K1xx.c.

#define TMP_PORTD   1U

Definition at line 281 of file clock_S32K1xx.c.

#define TMP_PORTE   1U

Definition at line 286 of file clock_S32K1xx.c.

#define TMP_QSPI   0U

Definition at line 363 of file clock_S32K1xx.c.

#define TMP_RTC   1U

Definition at line 256 of file clock_S32K1xx.c.

#define TMP_SAI0   0U

Definition at line 293 of file clock_S32K1xx.c.

#define TMP_SAI1   0U

Definition at line 298 of file clock_S32K1xx.c.

#define VLPR_SPEED_RUNNING_MODE   (1UL << 2U)

Definition at line 125 of file clock_S32K1xx.c.

Enumeration Type Documentation

SCG asynchronous clock type. Implements scg_async_clock_type_t_Class.

Enumerator
SCG_ASYNC_CLOCK_DIV1 

Clock divider 1

SCG_ASYNC_CLOCK_DIV2 

Clock divider 2

SCG_ASYNC_CLOCK_MAX 

Max value.

Definition at line 402 of file clock_S32K1xx.c.

SCG system clock modes. Implements scg_system_clock_mode_t_Class.

Enumerator
SCG_SYSTEM_CLOCK_MODE_CURRENT 

Current mode.

SCG_SYSTEM_CLOCK_MODE_RUN 

Run mode.

SCG_SYSTEM_CLOCK_MODE_VLPR 

Very Low Power Run mode.

SCG_SYSTEM_CLOCK_MODE_HSRUN 

High Speed Run mode.

SCG_SYSTEM_CLOCK_MODE_NONE 

MAX value.

Definition at line 413 of file clock_S32K1xx.c.

SCG system clock type. Implements scg_system_clock_type_t_Class.

Enumerator
SCG_SYSTEM_CLOCK_CORE 

Core clock.

SCG_SYSTEM_CLOCK_BUS 

BUS clock.

SCG_SYSTEM_CLOCK_SLOW 

System slow clock.

SCG_SYSTEM_CLOCK_MAX 

Max value.

Definition at line 390 of file clock_S32K1xx.c.

Function Documentation

static status_t CLOCK_SYS_ConfigureFIRC ( bool  enable,
const scg_firc_config_t fircConfig 
)
static

Definition at line 2077 of file clock_S32K1xx.c.

static status_t CLOCK_SYS_ConfigureModulesFromScg ( const scg_config_t scgConfig)
static

< Dividers for SIRC

< Dividers for FIRC

< Dividers for SOSC

< Dividers for SPLL

Definition at line 2389 of file clock_S32K1xx.c.

static status_t CLOCK_SYS_ConfigureSIRC ( bool  enable,
const scg_sirc_config_t sircConfig 
)
static

Definition at line 2004 of file clock_S32K1xx.c.

static status_t CLOCK_SYS_ConfigureSOSC ( bool  enable,
const scg_sosc_config_t soscConfig 
)
static

Definition at line 2149 of file clock_S32K1xx.c.

static status_t CLOCK_SYS_ConfigureTemporarySystemClock ( void  )
static

< Dividers for SIRC

< Dividers for FIRC

< Dividers for SOSC

< Dividers for SPLL

Definition at line 2352 of file clock_S32K1xx.c.

static scg_async_clock_div_t CLOCK_SYS_ConvertAsyncDividerValue ( uint16_t  divider)
static

Definition at line 3022 of file clock_S32K1xx.c.

static scg_system_clock_mode_t CLOCK_SYS_GetCurrentRunMode ( void  )
static

Definition at line 1780 of file clock_S32K1xx.c.

static void CLOCK_SYS_GetCurrentSysClkConfig ( scg_system_clock_config_t sysClockConfig)
static

Definition at line 2969 of file clock_S32K1xx.c.

static void CLOCK_SYS_GetDefaultConfiguration ( clock_manager_user_config_t config)
static

< Initialize

< SIRCSTEN

< SIRCLPEN

< LK

< RANGE - High range (8 MHz)

< SIRCDIV1

< SIRCDIV2

< Initialize

< FIRCREGOFF

< LK

< RANGE

< FIRCDIV1

< FIRCDIV2

< Initialize

< RTC_CLKIN

< Initialize

< Frequency

< SOSCCM

< LK

< EREFS

< HGO

< RANGE

< SOSCDIV1

< SOSCDIV2

< Initialize

< SPLLCM

< LK

< PREDIV

< MULT

< SOURCE

< SPLLDIV1

< SPLLDIV2

< Initialize

< SCG CLKOUTSEL

< Initialize

< RCCR - Run Clock Control Register

< SCS

< DIVCORE

< DIVBUS

< DIVSLOW

< VCCR - VLPR Clock Control Register

< SCS

< DIVCORE

< DIVBUS

< DIVSLOW

< Peripheral clock control configurations

< Number of the peripheral clock control configurations

< Clock Out configuration.

< Initialize

< CLKOUTEN

< CLKOUTSEL

< CLKOUTDIV

< Low Power Clock configuration.

< Initialize

< LPO1KCLKEN

< LPO32KCLKEN

< LPOCLKSEL

< RTCCLKSEL

< Platform Gate Clock configuration.

< Initialize

< CGCMSCM

< CGCMPU

< CGCDMA

< CGCERM

< CGCMEIM

< Quad Spi Internal Reference Clock Gating.

< Qspi reference clock gating

< TCLK CLOCK configuration.

< Initialize

< TCLK0

< TCLK0

< TCLK0

< Debug trace Clock Configuration.

< Initialize

< TRACEDIVEN

< TRACECLK_SEL

< TRACEDIV

< TRACEFRAC

< Low Power Clock configuration.

< Initialize

< Enable/disable LPO

< Trimming value for LPO

Definition at line 751 of file clock_S32K1xx.c.

static uint32_t CLOCK_SYS_GetFircFreq ( void  )
static

Definition at line 2825 of file clock_S32K1xx.c.

static uint32_t CLOCK_SYS_GetLpoFreq ( void  )
static

Definition at line 2881 of file clock_S32K1xx.c.

static status_t CLOCK_SYS_GetPccClockFreq ( clock_names_t  clockName,
uint32_t *  frequency 
)
static

Definition at line 1611 of file clock_S32K1xx.c.

static uint32_t CLOCK_SYS_GetPeripheralClock ( clock_names_t  clockName,
scg_async_clock_type_t  divider 
)
static

Definition at line 1733 of file clock_S32K1xx.c.

static uint32_t CLOCK_SYS_GetScgClkOutFreq ( void  )
static

Definition at line 1936 of file clock_S32K1xx.c.

static status_t CLOCK_SYS_GetScgClockFreq ( clock_names_t  clockName,
uint32_t *  frequency 
)
static

Definition at line 1248 of file clock_S32K1xx.c.

static uint32_t CLOCK_SYS_GetSimClkOutFreq ( void  )
static

Definition at line 1860 of file clock_S32K1xx.c.

static status_t CLOCK_SYS_GetSimClockFreq ( clock_names_t  clockName,
uint32_t *  frequency 
)
static

Definition at line 1416 of file clock_S32K1xx.c.

static uint32_t CLOCK_SYS_GetSimRtcClkFreq ( void  )
static

Definition at line 1972 of file clock_S32K1xx.c.

static uint32_t CLOCK_SYS_GetSircFreq ( void  )
static

Definition at line 2806 of file clock_S32K1xx.c.

static uint32_t CLOCK_SYS_GetSysAsyncFreq ( clock_names_t  clockSource,
scg_async_clock_type_t  type 
)
static

Definition at line 2676 of file clock_S32K1xx.c.

static uint32_t CLOCK_SYS_GetSysOscFreq ( void  )
static

Definition at line 2787 of file clock_S32K1xx.c.

static uint32_t CLOCK_SYS_GetSystemClockFreq ( scg_system_clock_type_t  type)
static

Definition at line 2521 of file clock_S32K1xx.c.

static void CLOCK_SYS_SetPccConfiguration ( const pcc_config_t peripheralClockConfig)
static

Definition at line 625 of file clock_S32K1xx.c.

static void CLOCK_SYS_SetPmcConfiguration ( const pmc_config_t pmcConfig)
static

Definition at line 727 of file clock_S32K1xx.c.

static status_t CLOCK_SYS_SetScgConfiguration ( const scg_config_t scgConfig)
static

Definition at line 563 of file clock_S32K1xx.c.

static void CLOCK_SYS_SetSimConfiguration ( const sim_clock_config_t simClockConfig)
static

Definition at line 656 of file clock_S32K1xx.c.

static status_t CLOCK_SYS_SetSystemClockConfig ( scg_system_clock_mode_t  mode,
scg_system_clock_config_t const *  config 
)
static

< Invalid entry

< Maximum frequencies when system clock is SOSC

< Maximum frequencies when system clock is SIRC

< Maximum frequencies when system clock is FIRC

< Invalid entry

< Invalid entry

< Maximum frequencies when system clock is SPLL

< Invalid entry

< Maximum frequencies when system clock is SOSC

< Maximum frequencies when system clock is SIRC

< Maximum frequencies when system clock is FIRC

< Invalid entry

< Invalid entry

< Maximum frequencies when system clock is SPLL

< Run mode.

< Very Low Power Run mode.

Definition at line 2575 of file clock_S32K1xx.c.

static status_t CLOCK_SYS_TransitionSystemClock ( const scg_system_clock_config_t to_clk)
static

Definition at line 1813 of file clock_S32K1xx.c.

static status_t CLOCK_SYS_TransitionToTmpSysClk ( scg_system_clock_src_t  currentSysClkSrc)
static

< Dividers for SIRC

< Dividers for FIRC

< Dividers for SOSC

< Dividers for SPLL

Definition at line 2912 of file clock_S32K1xx.c.

Variable Documentation

const uint16_t clockNameMappings[] = { 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 115 , 50 , 33 , 73 , 74 , 75 , 76 , 77 , 61 , 0 , 36 , 54 , 0 , 32 , 0 , 56 , 57 , 0 , 59 , 90 , 102 , 55 , 44 , 45 , 64 , 106 , 107 , 0 , 0 , }

Clock name mappings Constant array storing the mappings between clock names and peripheral clock control indexes. If there is no peripheral clock control index for a clock name, then the corresponding value is PCC_INVALID_INDEX.

Definition at line 379 of file clock_S32K1xx.c.