.align5 not_used: get_bad_stack bad_save_user_regs bl do_not_used .align5 irq: /* add by www.100ask.net to use IRQ for USB and DMA */ sub lr, lr, #4@ the return address ldr sp, IRQ_STACK_START @ the stack for irq stmdb sp!, r0-r12,lr@ save registers ldr lr, =int_return@ set the return addr ldr pc, =IRQ_Handle@ call the isr int_return: ldmia sp!, r0-r12,pc ^ @ return from interrupt
.align5 fiq: get_fiq_stack /* someone ought to write a more effiction fiq_save_user_regs */ irq_save_user_regs bl do_fiq irq_restore_user_regs
Nor Flash的地址范围为0x00000000—0x08000000,片内SRAM地址被置为0x40000000—0x4000DFFF,由于Nor Flash可以直接运行代码,因此中断向量表存放在0x00000000开始的8×4大小的空间中。中断产生时,PC被置为相对应的向量地址。如上电或者按Reset键时,PC直接置为0x00,从NOR FLASH的0x00处开始执行。