📄 irq_wd.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_wd.s
- Object : Assembler Watch Dog Interrupt Handler.
- Translator : ARM Software Development Toolkit V2.11a
-
- Imported Resources :
- SaveWDHandler, PtWDBase
- Exported Resources :
- watch_dog_interrupt_handler
-
- 1.0 JCZ 03/12/97 : Creation
- 1.1 JCZ 15/09/98 : See irq.mac 1.1
- 2.0 JCZ 21/10/98 : Clean up and add interworking capabilities
------------------------------------------------------------------------------
Function :
This file allows to branch a C interrupt handler when a Watch Dog interrupt
occurs. The address of the C handler is stored in the variable
<SaveWDHandler> by the execution of the C function <init_watch_dog>.
------------------------------------------------------------------------------
*/
/* AREA AT91Lib, CODE, READONLY, INTERWORK
*/
/* -------------------------- List of Included Files --------------------------- */
.include "../Include/arm.inc"
.INCLUDE "../Include/wd.inc"
.INCLUDE "../Include/aic.inc"
.INCLUDE "../Include/irq.mac"
/* ------------------------ List of constants and types ------------------------ */
/* None */
/* ------------------------ List of Imported resources ------------------------- */
.extern SaveWDHandler
/* ------------------------ List of Internal resources ------------------------- */
PtWDBase:
.long WD_BASE
/*
------------------------ List of Exported resources -------------------------
------------------------------------------------------------------------------
- Function : watch_dog_interrupt_handler
- Treatments : Watch Dog Interrupt Handler.
- Input Parameters : r14=lr= interrupt instruction address + 4
- : SPSR=CPSR when when core interrupted
- Output Parameters : None
- Registers lost : None
- Called Functions : The interrupt handler saved in <SaveWDHandler>.
- Called Macros : IRQ_ENTRY, IRQ_EXIT
------------------------------------------------------------------------------
*/
.global watch_dog_interrupt_handler
watch_dog_interrupt_handler:
/*- Manage interrupt entry */
IRQ_ENTRY
/*- Load the Watch Dog Base Address */
ldr r0, PtWDBase
/*- Branch on C Watch Dog Handler */
ldr r1, =SaveWDHandler
ldr r1, [r1]
mov r14, pc
bx r1
/*- Manage interrupt exit */
IRQ_EXIT
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -