📄 irq_timer.s
字号:
;------------------------------------------------------------------------------
;- 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_timer.s
;- Object : Assembler timer Interrupt Handler.
;-
;- 1.0 14/Feb/03 JPP : Creation
;------------------------------------------------------------------------------
;------------------------------------------------------------------------------
;- Area Definition
;------------------------------------------------------------------------------
AREA itHandler, CODE, READONLY
INCLUDE eb40a.inc
; IMPORT OSIntEnter
; IMPORT OSIntExit
;------------------------------------------------------------------------------
;- Function : timer0_asm_irq_handler
;- Treatments : Timer 0 interrupt handler.
;- Called Functions : timer0_c_irq_handler
;- Called Macros : IRQ_ENTRY, IRQ_EXIT
;------------------------------------------------------------------------------
; EXPORT timer0_asm_irq_handler
; IMPORT timer0_c_irq_handler
;timer0_asm_irq_handler
;
;;- Manage Exception Entry
; IRQ_ENTRY
;
;;- Call the timer Interrupt C handler
; ldr r0, =AT91C_BASE_TC0
; ldr r1, =timer0_c_irq_handler
; mov r14, pc
; bx r1
;;- Irq exit
;;- Manage Exception Exit
; b exit_irq
;------------------------------------------------------------------------------
;- Function : timer1_asm_irq_handler
;- Treatments : Timer 1 interrupt handler.
;- Called Functions : timer1_c_irq_handler
;- Called Macros : IRQ_ENTRY, IRQ_EXIT
;------------------------------------------------------------------------------
EXPORT timer1_asm_irq_handler
IMPORT timer1_c_irq_handler
timer1_asm_irq_handler
STMFD SP!,{R0-R3,R12,LR}
ldr r0, =AT91C_BASE_TC1
ldr r12, =timer1_c_irq_handler
mov r14, pc
bx r12
;- Mark the End of Interrupt on the AIC
LDR R0, =AT91C_BASE_AIC ;AIC_BASE
STR R0, [R0, #AIC_EOICR]
LDMFD SP!, {R0-R3,R12,LR}
SUBS PC, LR,#4
;------------------------------------------------------------------------------
;- Function : timer2_asm_irq_handler
;- Treatments : Timer 2 interrupt handler.
;- Called Functions : timer2_c_irq_handler
;- Called Macros : IRQ_ENTRY, IRQ_EXIT
;------------------------------------------------------------------------------
EXPORT timer2_asm_irq_handler
IMPORT timer2_c_irq_handler
timer2_asm_irq_handler
STMFD SP!,{R0-R3,R12,LR}
;- Call the timer Interrupt C handler
ldr r0, =AT91C_BASE_TC2
ldr r1, =timer2_c_irq_handler
mov r14, pc
bx r1
;- Mark the End of Interrupt on the AIC
LDR R0, =AT91C_BASE_AIC ;AIC_BASE
STR R0, [R0, #AIC_EOICR]
LDMFD SP!, {R0-R3,R12,LR}
SUBS PC, LR,#4
END
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -