irq_spu.s

来自「ARM入门的好帮手.包含了从简单到相对较复杂的程序.」· S 代码 · 共 41 行

S
41
字号
;------------------------------------------------------------------------------
;-         ATMEL Microcontroller Software Support  -  ROUSSET  -
;------------------------------------------------------------------------------
; The software is delivered "AS IS" without warranty or condition of any
; kind, either express, implied or statutory. This includes without
; limitation any warranty or condition with respect to merchantability or
; fitness for any particular purpose, or against the infringements of
; intellectual property rights of others.
;------------------------------------------------------------------------------
;- File source          : irq_spu.s
;- Object               : Spurious Interrupt Handler.
;-
;- 1.0 01/04/00 JCZ     : Creation
;- 1.1 02/11/00 JPP     : Green Hills
;------------------------------------------------------------------------------

            AREA        AT91Lib, CODE, READONLY, INTERWORK

            INCLUDE     ../../periph/aic/aic.inc

;------------------------------------------------------------------------------
;- Function             : at91_spurious_handler
;- Treatments           : Simplest and Fastest Spurious Interrupt Handler.
;- Input Parameters     : r14 = lr = interrupt instruction address + 4
;-                      : SPSR = CPSR when core interrupted
;- Output Parameters    : None
;- Registers lost       : None
;- Called Functions     : None
;- Called Macros        : None
;------------------------------------------------------------------------------
            EXPORT      at91_spurious_handler

at91_spurious_handler
            sub         r14, r14, #4                ;- Adjust LR
            stmdb       r13!, {r14}                 ;- Save LR
            ldr         r14, =AIC_BASE              ;- Mark the End of Interrupt
            str         r14, [r14, #AIC_EOICR]
            ldmia       r13!, {pc}^                 ;- Restore adjusted

            END

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?