1 /*============================================================================
\r
3 * Author : $(UserName)
\r
4 * Copyright : Your copyright notice
\r
5 * Description : System Initialization before main
\r
6 * 1 CPU initialization
\r
7 * 2 memory & IO base address initialization
\r
8 * 3 flash size & address initialization
\r
9 * 4 interrupt resource initialization for the soc
\r
10 *============================================================================
\r
12 #include "chip_name.h"
\r
14 * @brief initial CPU based on user config in chip_name.h
\r
16 static void CPUInit(void)
\r
19 * Config CPU's Unit such as MGU, Cache...
\r
26 * @brief entry of whole chip initialization
\r
27 * @Note anyone should not use any global variable in this function since this function is called
\r
28 * at before data section's initialization.
\r
29 * Since here SystemInit is a weak symbol, any vendor can override this symbol on its own wishes.
\r
32 #define CONFIG_SYSTICK_HZ 100
\r
33 #define CONFIG_SYSTEM_FREQ 24000000
\r
35 __attribute__((weak)) void SystemInit(void)
\r
38 * initial CPU based on the config in chip_name.h
\r
43 * TODO: initial IO, memory, flash...
\r
46 drv_coret_config(CONFIG_SYSTEM_FREQ / CONFIG_SYSTICK_HZ, CORET_IRQn); //10ms
\r
47 csi_vic_enable_sirq(CORET_IRQn);
\r