|
1. PXA270 是個複雜的 SOC, 就算要當成 Single Chip 來用, 也要把該設的設好.
2. 這程式把 GPCR 的改掉, 應該會動才是.
xlli_GPIOREGS_PA_BASE EQU 0x40e00000
xlli_GAFR0_L_offset EQU 0x00000054
xlli_GPDR0_offset EQU 0x0000000c
xlli_GPSR0_offset EQU 0x00000018
xlli_GPCR0_offset EQU 0x00000024
EXPORT LEDTEST
AREA LEDTESTASM,CODE,READONLY
LEDTEST
ldr r0, =xlli_GPIOREGS_PA_BASE ;
ldr r1, =0x0 ;
str r1, [r0, #xlli_GAFR0_L_offset] ;
ldr r1, =0xcfe307e4
str r1, [r0, #xlli_GPDR0_offset] ;
ledloop1
ldr r2, =((1 :SHL: 9) :OR: (1 :SHL: 10))
str r2, [r0,#xlli_GPSR0_offset]
bl delay1
ledloop2
ldr r2, =((1 :SHL: 9) :OR: (1 :SHL: 10))
str r2, [r0, #xlli_GPCR0_offset]
bl delay2
b ledloop1
delay1
ldr r3,=0x1ff
delay3
subs r3,r3,#1
bne delay3
mov pc,lr
delay2
ldr r3,=0x2ff
delay4
subs r3,r3,#1
bne delay4
mov pc,lr
END
Paul, Chao @ Techware |
|