; Configure the System Manger to remap the flash<br /><br />; The Memory Bank Control Registers must be set using store multpiles<br />; Set up a stack in internal sram to preserve the original register contents<br /><br /> LDR r2, =remap_temp<br /> MOV r1, pc<br /> LDR r3, =remap_EndSysMapJump<br />remap_temp<br /> MOV lr, #0<br /> CMP r2, r1<br /> LDRGT lr, =ROM_Start;ROM_Start=0x7F000000,remap后,ROM的地址 <br /><br /> SUB r3, r3, r2<br /> ADD r1, r1, r3<br /> ADD lr, lr, r1<br /> <br />; Load in the target values into the control registers<br /> ADRL r0, remap_SystemInitData<br /> LDMIA r0, {r1-r6}<br /> LDR r0, =EBI_Ctrl<br /> <br />; Now run critical jump code<br /> STMIA r0, {r1-r6}<br /> MOV pc, lr<br />remap_EndSysMapJump<br /><br />remap_SystemInitData<br /> ; Default sdram configuration<br /> DCD 0x000530C0 ; EBICON : not need to change.<br /> DCD 0xFE040080 ; ROMCON(Flash) -Unknown type:0xFE000FF0, A29LV800: 0xFE020080, W28J160: 0xFE030080<br /> DCD 0x000090E4 ; SDCONF0(SDRAM) - 8M(2Mx32): 0x000090E3, 4M(1Mx16x2):0x00009062, 16M(4Mx16x2):0x000090E4 <br /> DCD 0x020090E4 ; SDCONF1 - The same as SDCONF0 with proper base address <br /> DCD 0x0000014B ; SDTIME0 - not need to change<br /> DCD 0x0000014B ; SDTIME1 - not need to change<br /> DCB "@SYSTEM_INIT_CFG" ; A key word for future useage<br /> ALIGN |
|