Callisto4Bootloader: device/system_MIMXRT1062.h File Reference

Callisto4Bootloader

Macros | Functions | Variables
system_MIMXRT1062.h File Reference
`#include <stdint.h>`

Go to the source code of this file.

## Macros

#define | _SYSTEM_MIMXRT1062_H_
#define | DISABLE_WDOG 1
#define | CPU_XTAL_CLK_HZ 24000000UL /* Value of the external crystal or oscillator clock frequency in Hz */
#define | CPU_CLK1_HZ 0UL /* Value of the CLK1 (select the CLK1_N/CLK1_P as source) frequency in Hz */
#define | DEFAULT_SYSTEM_CLOCK 528000000UL /* Default System clock value */

## Functions

void | SystemInit (void)
| Setup the microcontroller system. More...
void | SystemCoreClockUpdate (void)
| Updates the SystemCoreClock variable. More...
void | SystemInitHook (void)
| SystemInit function hook. More...

## Variables

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

## Macro Definition Documentation

## ◆ _SYSTEM_MIMXRT1062_H_

#define _SYSTEM_MIMXRT1062_H_

Symbol preventing repeated inclusion

Definition at line 57 of file system_MIMXRT1062.h.

## ◆ CPU_CLK1_HZ

#define CPU_CLK1_HZ 0UL /* Value of the CLK1 (select the CLK1_N/CLK1_P as source) frequency in Hz */

Definition at line 74 of file system_MIMXRT1062.h.

## ◆ CPU_XTAL_CLK_HZ

#define CPU_XTAL_CLK_HZ 24000000UL /* Value of the external crystal or oscillator clock frequency in Hz */

Definition at line 72 of file system_MIMXRT1062.h.

## ◆ DEFAULT_SYSTEM_CLOCK

#define DEFAULT_SYSTEM_CLOCK 528000000UL /* Default System clock value */

Definition at line 77 of file system_MIMXRT1062.h.

## ◆ DISABLE_WDOG

#define DISABLE_WDOG 1

Definition at line 67 of file system_MIMXRT1062.h.

## Function Documentation

## ◆ 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__().

## ◆ SystemInitHook()

void SystemInitHook | ( | void |  | ) |

SystemInit function hook.

This weak function allows to call specific initialization code during the SystemInit() execution.This can be used when an application specific code needs to be called as close to the reset entry as possible (for example the Multicore Manager MCMGR_EarlyInit() function call). NOTE: No global r/w variables can be used in this hook function because the initialization of these variables happens after this function.

Referenced by SystemInit().

## Variable Documentation

## ◆ SystemCoreClock

uint32_t SystemCoreClock

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().