ldr r1,=0x0 ;这些宏定义都位于2440addr.inc中。 区分:变量定义&& 宏定义
str r1,[r0]
ldr r0,=INTMSK
ldr r1,=0xffffffff ;all interrupt disable 要理解子中断和中断之间的关系
str r1,[r0]
ldr r0,=INTSUBMSK
ldr r1,=0x7fff ;allsub interrupt disable
str r1,[r0]
[{FALSE}
;rGPFDAT= (rGPFDAT & ~(0xf<<4)) | ((~data & 0xf)<<4);
;Led_Display
ldr r0,=GPBCON
ldr r1,=0x155500
str r1,[r0]
ldr r0,=GPBDAT
ldr r1,=0x0
str r1,[r0]
]
;Toreduce PLL lock time, adjust the LOCKTIME register.
ldr r0,=LOCKTIME
ldr r1,=0xffffff
str r1,[r0]
[PLL_ON_START ;defined inoption.inc {TRUE},选择要不要设置频率值
;Added for confirm clock divide. for 2440.
;Setting value Fclk:Hclk:Pclk
ldr r0,=CLKDIVN
ldr r1,=CLKDIV_VAL ; 0=1:1:1, 1=1:1:2, 2=1:2:2, 3=1:2:4, 4=1:4:4, 5=1:4:8,6=1:3:3, 7=1:3:6.
str r1,[r0]
;programhas not been copied, so use these directly
[CLKDIV_VAL>1 ; meansFclk:Hclk is not 1:1.
mrcp15,0,r0,c1,c0,0
orrr0,r0,#0xc0000000;R1_nF:OR:R1_iA
mcrp15,0,r0,c1,c0,0
|
mrcp15,0,r0,c1,c0,0
bicr0,r0,#0xc0000000;R1_iA:OR:R1_nF
mcrp15,0,r0,c1,c0,0
]
; 在配置UPLLCON和MPLLCON寄存器时,必须先配置UPLLCON,然后再配置MPLLCON,而且两者之间要有7 nop的间隔。(这是2440文档明确要求的)
;ConfigureUPLL
ldr r0,=UPLLCON