Callisto4Bootloader: device/system_MIMXRT1062.c File Reference

Callisto4Bootloader

Functions | Variables
system_MIMXRT1062.c File Reference
`#include <stdint.h>`
`#include "fsl_device_registers.h"`

Go to the source code of this file.

## Functions

void | SystemInit (void)
| Setup the microcontroller system. More...
void | SystemCoreClockUpdate (void)
| Updates the SystemCoreClock variable. More...
| __attribute__ ((weak))

## Variables

uint32_t | SystemCoreClock = DEFAULT_SYSTEM_CLOCK
| System clock frequency (core clock) More...

## Function Documentation

## ◆ __attribute__()

__attribute__ | ( | (weak) |  | ) |

Definition at line 240 of file system_MIMXRT1062.c.

## ◆ SystemCoreClockUpdate()

void SystemCoreClockUpdate | ( | void |  | ) |

Updates the SystemCoreClock variable.

It must be called whenever the core clock is changed during program execution. SystemCoreClockUpdate() evaluates the clock register settings and calculates the current core clock.

Definition at line 134 of file system_MIMXRT1062.c.

References CCM, CCM_ANALOG, CCM_ANALOG_PFD_528_PFD0_FRAC_MASK, CCM_ANALOG_PFD_528_PFD0_FRAC_SHIFT, CCM_ANALOG_PFD_528_PFD2_FRAC_MASK, CCM_ANALOG_PFD_528_PFD2_FRAC_SHIFT, CCM_ANALOG_PLL_ARM_BYPASS_CLK_SRC_MASK, CCM_ANALOG_PLL_ARM_BYPASS_CLK_SRC_SHIFT, CCM_ANALOG_PLL_ARM_BYPASS_MASK, CCM_ANALOG_PLL_ARM_DIV_SELECT_MASK, CCM_ANALOG_PLL_ARM_DIV_SELECT_SHIFT, CCM_ANALOG_PLL_SYS_BYPASS_CLK_SRC_MASK, CCM_ANALOG_PLL_SYS_BYPASS_CLK_SRC_SHIFT, CCM_ANALOG_PLL_SYS_BYPASS_MASK, CCM_ANALOG_PLL_SYS_DIV_SELECT_MASK, CCM_ANALOG_PLL_USB1_BYPASS_CLK_SRC_MASK, CCM_ANALOG_PLL_USB1_BYPASS_CLK_SRC_SHIFT, CCM_ANALOG_PLL_USB1_BYPASS_MASK, CCM_ANALOG_PLL_USB1_DIV_SELECT_MASK, CCM_CACRR_ARM_PODF_MASK, CCM_CACRR_ARM_PODF_SHIFT, CCM_CBCDR_AHB_PODF_MASK, CCM_CBCDR_AHB_PODF_SHIFT, CCM_CBCDR_PERIPH_CLK2_PODF_MASK, CCM_CBCDR_PERIPH_CLK2_PODF_SHIFT, CCM_CBCDR_PERIPH_CLK_SEL_MASK, CCM_CBCMR_PERIPH_CLK2_SEL, CCM_CBCMR_PERIPH_CLK2_SEL_MASK, CCM_CBCMR_PRE_PERIPH_CLK_SEL, CCM_CBCMR_PRE_PERIPH_CLK_SEL_MASK, CPU_CLK1_HZ, CPU_XTAL_CLK_HZ, and SystemCoreClock.

## ◆ SystemInit()

void SystemInit | ( | void |  | ) |

Setup the microcontroller system.

Typically this function configures the oscillator (PLL) that is part of the microcontroller device. For systems with variable clock speed it also updates the variable SystemCoreClock. SystemInit is called from startup_device file.

Definition at line 71 of file system_MIMXRT1062.c.

References RTWDOG, RTWDOG_CS_CMD32EN_MASK, RTWDOG_CS_EN_MASK, RTWDOG_CS_UPDATE_MASK, SCB, SCB_CCR_DC_Msk, SCB_CCR_IC_Msk, SCB_EnableDCache(), SCB_EnableICache(), SystemInitHook(), SysTick, SysTick_CTRL_ENABLE_Msk, WDOG1, WDOG2, WDOG_WCR_WDE_MASK, and WDOG_WMCR_PDE_MASK.

Referenced by __attribute__().

## Variable Documentation

## ◆ SystemCoreClock

uint32_t SystemCoreClock = DEFAULT_SYSTEM_CLOCK

System clock frequency (core clock)

The system clock frequency supplied to the SysTick timer and the processor core clock. This variable can be used by the user application to setup the SysTick timer or configure other parameters. It may also be used by debugger to query the frequency of the debug timer or configure the trace clock speed SystemCoreClock is initialized with a correct predefined value.

Definition at line 65 of file system_MIMXRT1062.c.

Referenced by SystemCoreClockUpdate().