本帖最后由 stoneman 于 2012-10-1 17:17 编辑
不清楚你的硬件的情况;
例如:按照下面写出ini文件,在KEIL中调用:
FUNC void Setup (void) {
_WDWORD(0xFFFFF804, 0xFFFF0000); // PIOC_PDR: Enable Peripheral Mode
_WDWORD(0xFFFFFF60, 0x00000002); // EBI_CSA: CSA1 support for SDRAM
_WDWORD(0xFFFFFF90, 0x00000002); // Init SDRAM
_WDWORD(0x20000000, 0);
_WDWORD(0xFFFFFF90, 0x00000004);
_WDWORD(0x20000000, 0);
_WDWORD(0x20000000, 0);
_WDWORD(0x20000000, 0);
_WDWORD(0x20000000, 0);
_WDWORD(0x20000000, 0);
_WDWORD(0x20000000, 0);
_WDWORD(0x20000000, 0);
_WDWORD(0x20000000, 0);
_WDWORD(0xFFFFFF90, 0x00000003);
_WDWORD(0x20000080, 0);
_WDWORD(0xFFFFFF94, 0x000002E0);
_WDWORD(0x20000000, 0);
_WDWORD(0xFFFFFF98, 0x2188C155);
_WDWORD(0xFFFFFF90, 0x00000000);
_WDWORD(0x20000000, 0);
_WDWORD(0xFFFFFC20, 0x0000FF01); // PMC PLLB (~60 MHz)
_WDWORD(0xFFFFFC2C, 0x100F3E05);
_WDWORD(0xFFFFFC30, 0x00000003); // Select PLLB as master clock
_WDWORD(0xFFFFF404, 0xC00000); // Open PIO for USART2
_WDWORD(0xFFFFFC10, 0x80100); // Open USART 2 Clock and TC2
}
Setup(); // Setup for Init
LOAD Ext_RAM\GraphicAnimation.axf INCREMENTAL // Download
// <o> Program Entry Point
PC = 0x20000000; // Start of SDRAM
g, main |