M4521_BSP V3.02.000
The Board Support Package for M4521
system_M4521.h
Go to the documentation of this file.
1/******************************************************************************
2 * @file system_M4521.h
3 * @version V0.10
4 * $Revision: 7 $
5 * $Date: 15/09/02 10:02a $
6 * @brief CMSIS Cortex-M4 Core Peripheral Access Layer Header File for M4521
7 *
8 * @note
9 * SPDX-License-Identifier: Apache-2.0
10 * Copyright (C) 2022 Nuvoton Technology Corp. All rights reserved.
11*****************************************************************************/
12
13#ifndef __SYSTEM_M4521_H__
14#define __SYSTEM_M4521_H__
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19
20#include <stdint.h>
21
22/*---------------------------------------------------------------------------------------------------------*/
23/* Macro Definition */
24/*---------------------------------------------------------------------------------------------------------*/
25#ifndef DEBUG_PORT
26# define DEBUG_PORT UART0
27#endif
28
29
30/*----------------------------------------------------------------------------
31 Define clocks
32 *----------------------------------------------------------------------------*/
33
34#define __HSI (12000000UL)
35#define __HXT (12000000UL)
36#define __LXT (32768UL)
37#define __HIRC (22118400UL)
38#define __LIRC (10000UL)
39#define __SYS_OSC_CLK ( ___HSI) /* Main oscillator frequency */
40
41
42#define __SYSTEM_CLOCK (1*__HXT)
43
44extern uint32_t SystemCoreClock;
45extern uint32_t CyclesPerUs;
46extern uint32_t PllClock;
58extern void SystemInit(void);
59
69extern void SystemCoreClockUpdate(void);
70
71#ifdef __cplusplus
72}
73#endif
74
75#endif /* __SYSTEM_M4521_H__ */
76
uint32_t CyclesPerUs
Definition: system_M4521.c:25
void SystemInit(void)
Setup the microcontroller system. Initialize the System and update the SystemCoreClock variable.
Definition: system_M4521.c:76
uint32_t PllClock
Definition: system_M4521.c:26
uint32_t SystemCoreClock
Definition: system_M4521.c:24
void SystemCoreClockUpdate(void)
Updates the SystemCoreClock with current core Clock retrieved from cpu registers.
Definition: system_M4521.c:32