(一)src文件夹文件结构及主要内容
系统文件结构如下:
- 复位与启动配置:flashrchw.c
- 系统时钟与模式初始化:mode_entry.c
- 中断系统初始化:MPC57xx_Interrupt_Init.c、Vector.c
- 中断服务与向量分发:intc_SW_handlers.S、intc_SW_mode_isr_vectors_MPC5744P.c
- 外设与应用代码:main.c、peripherals/文件夹下的外设驱动
(二)主函数
void peri_clock_gating (void) { MC_ME.RUN_PC[0].R = 0x00000000; /* gate off clock for all RUN modes */ MC_ME.RUN_PC[1].R = 0x000000FE; /* enable peri clock for all RUN modes*/ /* Note: RUN_PC0 is default cfg for PCTLs*/ MC_ME.PCTL126.R = 0X00000001; }