||
上一篇里转载了一个版本的系统控制寄存器初始化函数,这里转载另一个版本的,发现两个版本的差异。
void InitSysCtrl(void)
{
// On F2812/F2810 TMX samples prior to rev C this initialization was
// required. For Rev C and after this is no longer required
/*
//宏定义EALLOW来设置状态寄存器1的C6位
EALLOW;
// On TMX samples, to get the best performance of on chip RAM blocks M0/M1/L0/L1/H0 internal
// control registers bit have to be enabled. The bits are in Device emulation registers.
DevEmuRegs.M0RAMDFT = 0x0300;
DevEmuRegs.M1RAMDFT = 0x0300;
DevEmuRegs.L0RAMDFT = 0x0300;
DevEmuRegs.L1RAMDFT = 0x0300;
DevEmuRegs.H0RAMDFT = 0x0300;
//宏定义EDIS来清除状态寄存器1的C6位
EDIS;
*/
// Disable the watchdog
DisableDog();
// Initialize the PLLCR to 0xA
InitPll(0xA);
// Initialize the peripheral clocks
InitPeripheralClocks();
}
转自C2000手册
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2024-4-25 12:19
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社