Contiki 3.x
Functions | Variables
system_MK60D10.c File Reference

    Implementation of K60 clock configuration.
More...

#include <stdint.h>
#include "K60.h"
#include "rtc.h"
#include "config-clocks.h"

Go to the source code of this file.

Functions

void SystemInit (void)
 Initialize the system. More...
 
void SystemCoreClockUpdate (void)
 Update internal SystemCoreClock variable. More...
 

Variables

uint32_t SystemCoreClock = DEFAULT_SYSTEM_CLOCK
 Current core clock frequency. More...
 
uint32_t SystemSysClock = DEFAULT_SYSTEM_CLOCK
 Current system clock frequency. More...
 
uint32_t SystemBusClock = DEFAULT_SYSTEM_CLOCK
 Current bus clock frequency. More...
 
uint32_t SystemFlexBusClock = DEFAULT_SYSTEM_CLOCK
 Current FlexBus clock frequency. More...
 
uint32_t SystemFlashClock = DEFAULT_SYSTEM_CLOCK
 Current flash clock frequency. More...
 

Detailed Description

    Implementation of K60 clock configuration.
Author
Joakim Gebart joaki.nosp@m.m.ge.nosp@m.bart@.nosp@m.eist.nosp@m.ec.se

Definition in file system_MK60D10.c.

Function Documentation

void SystemCoreClockUpdate ( void  )

Update internal SystemCoreClock variable.

Updates all of the SystemCoreClock variables.

Parameters
none
Returns
none

Updates the internal SystemCoreClock with current core Clock retrieved from cpu registers.

Definition at line 175 of file system_MK60D10.c.

References CPU_INT_FAST_CLK_HZ, CPU_INT_SLOW_CLK_HZ, CPU_XTAL32k_CLK_HZ, CPU_XTAL_CLK_HZ, MCG, SIM, SystemBusClock, SystemCoreClock, SystemFlashClock, SystemFlexBusClock, and SystemSysClock.

Referenced by main(), and SystemInit().

void SystemInit ( void  )

Initialize the system.

Setup the microcontroller system.

Parameters
none
Returns
none

Setup the microcontroller system. Initialize the System and update the SystemCoreClock variable.

Parameters
none
Returns
none

Setup the microcontroller system. Initialize the System and update the SystemFrequency variable.

Definition at line 67 of file system_MK60D10.c.

References CONFIG_CLOCK_K60_BUS_DIV, CONFIG_CLOCK_K60_FB_DIV, CONFIG_CLOCK_K60_FLASH_DIV, CONFIG_CLOCK_K60_FLL_MCG_C4_DMX32, CONFIG_CLOCK_K60_FLL_MCG_C4_DRST_DRS, CONFIG_CLOCK_K60_SYS_DIV, DEBUGGER_BREAK, MCG, SCB, SCB_CPUID_REVISION_Msk, SIM, and SystemCoreClockUpdate().

Referenced by main().

Variable Documentation

uint32_t SystemBusClock = DEFAULT_SYSTEM_CLOCK

Current bus clock frequency.

MCGOUTCLK divided by OUTDIV2 clocks the bus slaves and peripherals (excluding memories).

Definition at line 50 of file system_MK60D10.c.

Referenced by main(), SystemCoreClockUpdate(), and uart_init().

uint32_t SystemCoreClock = DEFAULT_SYSTEM_CLOCK

Current core clock frequency.

MCGOUTCLK divided by OUTDIV1 clocks the ARM Cortex-M4 core.

Definition at line 48 of file system_MK60D10.c.

Referenced by main(), and SystemCoreClockUpdate().

uint32_t SystemFlashClock = DEFAULT_SYSTEM_CLOCK

Current flash clock frequency.

MCGOUTCLK divided by OUTDIV4 clocks the flash memory.

Definition at line 52 of file system_MK60D10.c.

Referenced by main(), and SystemCoreClockUpdate().

uint32_t SystemFlexBusClock = DEFAULT_SYSTEM_CLOCK

Current FlexBus clock frequency.

MCGOUTCLK divided by OUTDIV3 clocks the external FlexBus interface.

Definition at line 51 of file system_MK60D10.c.

Referenced by main(), and SystemCoreClockUpdate().

uint32_t SystemSysClock = DEFAULT_SYSTEM_CLOCK

Current system clock frequency.

MCGOUTCLK divided by OUTDIV1 clocks the crossbar switch and bus masters directly connected to the crossbar. In addition, this clock is used for UART0 and UART1.

Definition at line 49 of file system_MK60D10.c.

Referenced by main(), SystemCoreClockUpdate(), and uart_init().