📄 isr.asm
字号:
//****************************************************************
// Function: Fast Interrupt Service routine Area
// Service for (1)PWM FIQ
// (2)Timer A FIQ
// (3)Timer B FIQ
// User's FIQ must hook on here
// _FIQ: // Fast interrupt entrence
// _IRQ1: // interrupt entrence
// _IRQ2: // interrupt entrence
// _IRQ3: // interrupt entrence
// _IRQ4: // interrupt entrence
// _IRQ5: // interrupt entrence
// _IRQ6: // interrupt entrence
// _IRQ7: // interrupt entrence
//****************************************************************
.TEXT
.INCLUDE hardware.inc // include io information
.INCLUDE a2000.inc // include SACM2000 information
.PUBLIC _BREAK;
.PUBLIC _FIQ;
.PUBLIC _IRQ0;
.PUBLIC _IRQ1;
.PUBLIC _IRQ2;
.PUBLIC _IRQ3;
.PUBLIC _IRQ4;
.PUBLIC _IRQ5;
.PUBLIC _IRQ6;
.PUBLIC _IRQ7;
_FIQ:
push r1,r4 to [sp];
r1 = C_FIQ_TMA; //
test r1,[P_INT_Ctrl]; //
jne L_FIQ_TimerA; // Timer A FIQ entrence
r1 = C_FIQ_TMB; //
test r1,[P_INT_Ctrl]; //
jne L_FIQ_TimerB; // Timer B FIQ entrence
L_FIQ_PWM: // PWM FIQ entrence
//------------------------------------------------------------------
// hook PWM FIQ subroutine here and define it to be external
//------------------------------------------------------------------
r1 = C_FIQ_PWM;
[P_INT_Clear] = r1;
pop r1,r4 from [sp];
reti;
L_FIQ_TimerA:
[P_INT_Clear] = r1;
//------------------------------------------------------------------
// hook Timer A FIQ subroutine here and define it to be external
call F_FIQ_Service_SACM_A2000; // SACM-A2000 Timer A FIQ service
//------------------------------------------------------------------
//r1 = C_FIQ_TimerA;
//[P_INT_Clear] = r1;
pop r1,r4 from [sp];
reti;
L_FIQ_TimerB:
[P_INT_Clear] = r1;
//------------------------------------------------------------------
// hook Timer B FIQ subroutine here and define it to be external
//------------------------------------------------------------------
//r1 = C_FIQ_TimerB;
//[P_INT_Clear] = r1;
pop r1,r4 from [sp];
reti;
/////////////////////////////////////////////////////////////////////////////////////////
// Function: Interrupt Service routine Area
// Service for IRQ1 - IRQ7
// User's IRQ must hook on here
/////////////////////////////////////////////////////////////////////////////////////////
_BREAK:
push r1,r4 to [sp];
pop r1,r4 from [sp];
reti;
_IRQ0:
push r1,r4 to [sp];
pop r1,r4 from [sp];
reti;
_IRQ1:
push r1,r4 to [sp];
pop r1,r4 from [sp];
reti;
_IRQ2:
push r1,r4 to [sp];
pop r1,r4 from [sp];
reti;
_IRQ3:
push r1,r4 to [sp];
pop r1,r4 from [sp];
reti;
_IRQ4:
push r1,r4 to [sp];
pop r1,r4 from [sp];
reti;
_IRQ5:
push r1,r4 to [sp];
pop r1,r4 from [sp];
reti;
_IRQ6:
push r1,r4 to [sp];
pop r1,r4 from [sp];
reti;
_IRQ7:
push r1,r4 to [sp];
pop r1,r4 from [sp];
reti;
//========================================================================================
// End of isr.asm
//========================================================================================
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -