|
s3c2410 按键EINT0 时IRQ 中断 打印以个X
_start:
ldr pc, vect_reset
ldr pc, vect_undef
ldr pc, vect_swi
ldr pc, vect_iabort
ldr pc, vect_dabort
ldr pc, vect_reset
ldr pc, vect_irq
ldr pc, vect_fiq
vect_reset:
.word _reset
vect_undef:
.word _irq
vect_swi:
.word _irq
vect_iabort:
.word _irq
vect_dabort:
.word _irq
vect_irq:
.word _irq
vect_fiq:
.word _irq
_reset:
...
...
/*enable eint*/
ldr r0, =INTMSK
mov r1, #0x0
str r1, [r0]
ldr r0, =GPFCON
mov r1, #0xaa
str r1, [r0]
...
...
loop:
/*串口打印z*/
mov r0, #'z'
bl put_char
/*等1秒左右*/
bl sleep
b loop
_irq:
subs lr, lr, #0x4
stmfd sp!, {r0-r13, lr}
mov r0, #'x'
bl put_char
ldmfd sp, {r0-r13, pc}^
为什么我这里每次按键后就一直在打印X没有返回?
|
|