參數(shù)資料
型號: MPC505
廠商: MOTOROLA INC
元件分類: 微控制器/微處理器
英文描述: Highly Integrated, Low-Power, 32-Bit Microcontroller
中文描述: 32-BIT, RISC MICROCONTROLLER, PQFP16
文件頁數(shù): 9/12頁
文件大小: 68K
代理商: MPC505
Application Note
Example Interrupt Handler
AN1281
MOTOROLA
9
Save Previous
State
Since a non-maskable exception (like RESET) can occur just after an
interrupt takes place, the previous state of the machine (SRR0 and
SRR1) must be stored on the stack as a first step.
Only general-purpose registers (GPR) can be written to memory, so a
GPR is needed for temporary storage of SRR0 and SRR1.
Asynchronous exceptions, like interrupts, must treat all registers as non-
volatile — the contents must be preserved so they can be restored at the
end of the interrupt routine. Synchronous exceptions, like system call
instructions, can treat registers as in function or subroutine calls.
After initial stack functions, like creating a stack frame, the contents of
the GPR used for temporary storage must be saved on the stack. After
that, the code to save SRR0 and SRR1 on the stack using GPR4 as
temporary storage and a predefined GPR as a stack pointer (SP) could
look like:
mfspr
gpr4, SRR0
# move spr SRR0 to gpr4
stw
spr4, 12 (SP)
# store SRR0 value 12 bytes above SP
mfspr
gpr4, SRR1
# move spr SRR1 to gpr4
stw
gpr4, 16 (SP)
# store SRR1 value 16 bytes above SP
Table 4. Interrupt Handler
Step
Action
Registers Used
1
Save previous state
SRR0, SRR1, one GPR
2
Set the recoverable interrupt bit
EID
3
Identify interrupt source
IRQAND, one GPR
4
Branch to handler
None
5
Perform handler functions
Varies
6
Housekeeping
PQEDGDAT, NRI,
SRR0, SRR1, GPR(s)
相關(guān)PDF資料
PDF描述
MPC509 Highly Integrated, Low-Power, 32-Bit Microcontroller
MPC5200BV400 MPC5200 Hardware Specifications
MPC5200CBV266 MPC5200 Hardware Specifications
MPC5200CBV400 MPC5200 Hardware Specifications
MPC5200ID MPC5200 Hardware Specifications
相關(guān)代理商/技術(shù)參數(shù)
參數(shù)描述
MPC506 制造商:BB 制造商全稱:BB 功能描述:Single-Ended 16-Channel/Differential 8-Channel CMOS ANALOG MULTIPLEXERS
MPC506A 制造商:BB 制造商全稱:BB 功能描述:Single-Ended 16-Channel/Differential 8-Channel CMOS ANALOG MULTIPLEXERS
MPC506AP 功能描述:多路器開關(guān) IC 16Ch Sgl-Ended Input Ana Multipl RoHS:否 制造商:Texas Instruments 通道數(shù)量:1 開關(guān)數(shù)量:4 開啟電阻(最大值):7 Ohms 開啟時間(最大值): 關(guān)閉時間(最大值): 傳播延遲時間:0.25 ns 工作電源電壓:2.3 V to 3.6 V 工作電源電流: 最大工作溫度:+ 85 C 安裝風(fēng)格:SMD/SMT 封裝 / 箱體:UQFN-16
MPC506AP 制造商:BURR-BROWN 功能描述:IC MUX 16CH SP DIP28 506 制造商:Texas Instruments 功能描述:Multiplexer IC
MPC506AP 制造商:Texas Instruments 功能描述:IC MUX 16CH SP DIP28 506 制造商:Texas Instruments 功能描述:IC, MUX 16CH SP, DIP28, 506