|
我现在在EBOOT中要实现一个中断,我是按照USB中断来做的,可以进中断,但是中断执行完后,不能返回到原来进中断的地方执行程序,不知道什么原因??高手帮忙看下
中断初始化程序:
pISR_iic =(unsigned)(0xEA000000)+(((unsigned)Isr_IIC_Handler - (0x80000000 + 0x18 + 0x10) )>>2);
if (pI2C_eboot->pINTReg->SRCPND & BIT_IIC) pI2C_eboot->pINTReg->SRCPND = BIT_IIC;
if (pI2C_eboot->pINTReg->INTPND & BIT_IIC) pI2C_eboot->pINTReg->INTPND = BIT_IIC;
pI2C_eboot->pINTReg->INTMSK &= ~BIT_IIC; // USB Interrupt enable.
中断程序:
; Module Name: IIC_Eboot.s
OPT 2 ; disable listing
INCLUDE kxarm.h
OPT 1 ; reenable listing
OPT 128 ; disable listing of macro expansions
TEXTAREA
IMPORT Isr_IIC_Int
; ---------------------------------------------------------------------
; ---------------------------------------------------------------------
LEAF_ENTRY Isr_IIC_Handler
; sub sp,sp,#4 ;decrement sp(to store jump address)
sub lr, lr, #4
stmfd sp!, {r0-r12,lr}
mov r0, lr
bl Isr_IIC_Int
ldmfd sp!, {r0-r12,lr}
movs pc, lr
ENDP ; |Isr_IIC_Handler|
END
不知道是不是中断程序有问题。
|
|