📄 dsp28_defaultisr.c
字号:
/************************************************************************************
版权(c) 2003- 北京合众达电子技术有限责任公司 *
* 设计者: 戴展波
*************************************************************************************/
#include "DSP28_Device.h"
extern Uint32 PI_GearOutSpeed;
extern float TravelSpeed;
extern int INTCount;
extern float a1[16];
extern float OilPress;
extern Uint32 Count1,Count2;
//---------------------------------------------------------------------------
// INT13, INT14, NMI, XINT1, XINT2 Default ISRs:
//
interrupt void INT13_ISR(void) // INT13 or CPU-Timer1
{
// Insert ISR Code here
// Next two lines for debug only - remove after inserting
// ISR Code
asm (" ESTOP0");
for(;;);
// Uncomment this line after adding ISR Code
// return;
}
interrupt void INT14_ISR(void) // CPU-Timer2
{
// Insert ISR Code here
// Next two lines for debug only - remove after inserting
// ISR Code
asm (" ESTOP0");
for(;;);
// Uncomment this line after adding ISR Code
// return;
}
interrupt void NMI_ISR(void) // Non-maskable interrupt
{
// Insert ISR Code here
// Next two lines for debug only - remove after inserting
// ISR Code
asm (" ESTOP0");
for(;;);
// Uncomment this line after adding ISR Code
// return;
}
interrupt void XINT1_ISR(void)
{
// Insert ISR Code here
// Next two lines for debug only - remove after inserting
// ISR Code
asm (" ESTOP0");
for(;;);
// Uncomment this line after adding ISR Code
// return;
}
interrupt void XINT2_ISR(void)
{
// Insert ISR Code here
// Next two lines for debug only - remove after inserting
// ISR Code
asm (" ESTOP0");
for(;;);
// Uncomment this line after adding ISR Code
// return;
}
//---------------------------------------------------------------------------
// DATALOG, RTOSINT, EMUINT, RTOS Default ISRs:
//
interrupt void DATALOG_ISR(void) // Datalogging interrupt
{
// Insert ISR Code here
// Next two lines for debug only - remove after inserting
// ISR Code
asm (" ESTOP0");
for(;;);
// Uncomment this line after adding ISR Code
// return;
}
interrupt void RTOSINT_ISR(void) // RTOS interrupt
{
// Insert ISR Code here
// Next two lines for debug only - remove after inserting
// ISR Code
asm (" ESTOP0");
for(;;);
// Uncomment this line after adding ISR Code
// return;
}
interrupt void EMUINT_ISR(void) // Emulation interrupt
{
// Insert ISR Code here
// Next two lines for debug only - remove after inserting
// ISR Code
asm (" ESTOP0");
for(;;);
// Uncomment this line after adding ISR Code
// return;
}
//---------------------------------------------------------------------------
// ILLEGAL Instruction Trap ISR:
//
interrupt void ILLEGAL_ISR(void) // Illegal operation TRAP
{
// Insert ISR Code here
asm(" ESTOP0");
for(;;);
// Uncomment this line after adding ISR Code
// return;
}
//---------------------------------------------------------------------------
// USER Traps Default ISRs:
//
interrupt void USER0_ISR(void) // User Defined trap 0
{
// Insert ISR Code here
// Next two lines for debug only - remove after inserting
// ISR Code
asm (" ESTOP0");
for(;;);
// Uncomment this line after adding ISR Code
// return;
}
interrupt void USER1_ISR(void) // User Defined trap 1
{
// Insert ISR Code here
// Next two lines for debug only - remove after inserting
// ISR Code
asm (" ESTOP0");
for(;;);
// Uncomment this line after adding ISR Code
// return;
}
interrupt void USER2_ISR(void) // User Defined trap 2
{
// Insert ISR Code here
// Next two lines for debug only - remove after inserting
// ISR Code
asm (" ESTOP0");
for(;;);
// Uncomment this line after adding ISR Code
// return;
}
interrupt void USER3_ISR(void) // User Defined trap 3
{
// Insert ISR Code here
// Next two lines for debug only - remove after inserting
// ISR Code
asm (" ESTOP0");
for(;;);
// Uncomment this line after adding ISR Code
// return;
}
interrupt void USER4_ISR(void) // User Defined trap 4
{
// Insert ISR Code here
// Next two lines for debug only - remove after inserting
// ISR Code
asm (" ESTOP0");
for(;;);
// Uncomment this line after adding ISR Code
// return;
}
interrupt void USER5_ISR(void) // User Defined trap 5
{
// Insert ISR Code here
// Next two lines for debug only - remove after inserting
// ISR Code
asm (" ESTOP0");
for(;;);
// Uncomment this line after adding ISR Code
// return;
}
interrupt void USER6_ISR(void) // User Defined trap 6
{
// Insert ISR Code here
// Next two lines for debug only - remove after inserting
// ISR Code
asm (" ESTOP0");
for(;;);
// Uncomment this line after adding ISR Code
// return;
}
interrupt void USER7_ISR(void) // User Defined trap 7
{
// Insert ISR Code here
// Next two lines for debug only - remove after inserting
// ISR Code
asm (" ESTOP0");
for(;;);
// Uncomment this line after adding ISR Code
// return;
}
interrupt void USER8_ISR(void) // User Defined trap 8
{
// Insert ISR Code here
// Next two lines for debug only - remove after inserting
// ISR Code
asm (" ESTOP0");
for(;;);
// Uncomment this line after adding ISR Code
// return;
}
interrupt void USER9_ISR(void) // User Defined trap 9
{
// Insert ISR Code here
// Next two lines for debug only - remove after inserting
// ISR Code
asm (" ESTOP0");
for(;;);
// Uncomment this line after adding ISR Code
// return;
}
interrupt void USER10_ISR(void) // User Defined trap 10
{
// Insert ISR Code here
// Next two lines for debug only - remove after inserting
// ISR Code
asm (" ESTOP0");
for(;;);
// Uncomment this line after adding ISR Code
// return;
}
interrupt void USER11_ISR(void) // User Defined trap 11
{
// Insert ISR Code here
// Next two lines for debug only - remove after inserting
// ISR Code
asm (" ESTOP0");
for(;;);
// Uncomment this line after adding ISR Code
// return;
}
//---------------------------------------------------------------------------
// ADC Default ISR:
//
interrupt void ADCINT_ISR(void) // ADC
{
//float vol,resistance,tmp;
PieCtrl.PIEACK.bit.ACK1 = 1;
PieCtrl.PIEIFR1.bit.INTx6 = 1;
a1[0]=((float)AdcRegs.RESULT0)*3.0/65520.0;
a1[1]=((float)AdcRegs.RESULT1)*3.0/65520.0;
a1[2]=((float)AdcRegs.RESULT2)*3.0/65520.0;
a1[3]=((float)AdcRegs.RESULT3)*3.0/65520.0;
a1[4]=((float)AdcRegs.RESULT4)*3.0/65520.0;
a1[5]=((float)AdcRegs.RESULT5)*3.0/65520.0;
a1[6]=((float)AdcRegs.RESULT6)*3.0/65520.0;
//a1[6] = AdcRegs.ADCRESULT6 >>4;
//a1[6]=((float)AdcRegs.RESULT6)*3.0/4095.0;
a1[7]=((float)AdcRegs.RESULT7)*3.0/65520.0;
a1[8]=((float)AdcRegs.RESULT8)*3.0/65520.0;
a1[9]=((float)AdcRegs.RESULT9)*3.0/65520.0;
a1[10]=((float)AdcRegs.RESULT10)*3.0/65520.0;
a1[11]=((float)AdcRegs.RESULT11)*3.0/65520.0;
a1[12]=((float)AdcRegs.RESULT12)*3.0/65520.0;
a1[13]=((float)AdcRegs.RESULT13)*3.0/65520.0;
a1[14]=((float)AdcRegs.RESULT14)*3.0/65520.0;
a1[15]=((float)AdcRegs.RESULT15)*3.0/65520.0;
OilPress=a1[5]*3.0/65520;
/*vol=a1[5]*3.0/65520;
resistance=(470*vol)/(12-vol);
tmp=(-0.04342+0.00378*resistance+0.0000111*resistance*resistance)*10*10;
if(tmp<0)
OilPress=0;
else
OilPress=tmp; */
AdcRegs.ADC_ST_FLAG.bit.INT_SEQ1_CLR=1;
AdcRegs.ADCTRL2.bit.SOC_SEQ1=1;
// Uncomment this line after adding ISR Code
// return;
}
//---------------------------------------------------------------------------
// CPU Timer 0 Default ISR:
//
interrupt void TINT0_ISR(void) // CPU-Timer 0
{
// Insert ISR Code here
// To recieve more interrupts from this PIE group, acknowledge this interrupt
// PieCtrl.PIEACK.all = PIEACK_GROUP1;
// Next two lines for debug only - remove after inserting
// ISR Code
asm (" ESTOP0");
for(;;);
// Uncomment this line after adding ISR Code
// return;
}
//---------------------------------------------------------------------------
// Watchdog Default ISR:
//
interrupt void WAKEINT_ISR(void) // WD
{
// Insert ISR Code here
// To recieve more interrupts from this PIE group, acknowledge this interrupt
// PieCtrl.PIEACK.all = PIEACK_GROUP1;
// Next two lines for debug only - remove after inserting
// ISR Code
asm (" ESTOP0");
for(;;);
// Uncomment this line after adding ISR Code
// return;
}
//---------------------------------------------------------------------------
// EV-A Default ISRs:
//
interrupt void PDPINTA_ISR( void ) // EV-A
{
// Insert ISR Code here
// To recieve more interrupts from this PIE group, acknowledge this interrupt
// PieCtrl.PIEACK.all = PIEACK_GROUP1;
// Next two lines for debug only - remove after inserting
// ISR Code
asm (" ESTOP0");
for(;;);
// Uncomment this line after adding ISR Code
// return;
}
interrupt void CMP1INT_ISR(void) // EV-A
{
// Insert ISR Code here
// To recieve more interrupts from this PIE group, acknowledge this interrupt
// PieCtrl.PIEACK.all = PIEACK_GROUP2;
// Next two lines for debug only - remove after inserting
// ISR Code
asm (" ESTOP0");
for(;;);
// Uncomment this line after adding ISR Code
// return;
}
interrupt void CMP2INT_ISR(void) // EV-A
{
// Insert ISR Code here
// To recieve more interrupts from this PIE group, acknowledge this interrupt
// PieCtrl.PIEACK.all = PIEACK_GROUP2;
// Next two lines for debug only - remove after inserting
// ISR Code
asm (" ESTOP0");
for(;;);
// Uncomment this line after adding ISR Code
// return;
}
interrupt void CMP3INT_ISR(void) // EV-A
{
// Insert ISR Code here
// To recieve more interrupts from this PIE group, acknowledge this interrupt
// PieCtrl.PIEACK.all = PIEACK_GROUP2;
// Next two lines for debug only - remove after inserting
// ISR Code
asm (" ESTOP0");
for(;;);
// Uncomment this line after adding ISR Code
// return;
}
interrupt void T1PINT_ISR(void) // EV-A
{
// Insert ISR Code here
// To recieve more interrupts from this PIE group, acknowledge this interrupt
// PieCtrl.PIEACK.all = PIEACK_GROUP2;
// Next two lines for debug only - remove after inserting
// ISR Code
asm (" ESTOP0");
for(;;);
// Uncomment this line after adding ISR Code
// return;
}
interrupt void T1CINT_ISR(void) // EV-A
{
// Insert ISR Code here
// To recieve more interrupts from this PIE group, acknowledge this interrupt
// PieCtrl.PIEACK.all = PIEACK_GROUP2;
// Next two lines for debug only - remove after inserting
// ISR Code
asm (" ESTOP0");
for(;;);
// Uncomment this line after adding ISR Code
// return;
}
interrupt void T1UFINT_ISR(void) // EV-A
{
// Insert ISR Code here
// To recieve more interrupts from this PIE group, acknowledge this interrupt
// PieCtrl.PIEACK.all = PIEACK_GROUP2;
// Next two lines for debug only - remove after inserting
// ISR Code
asm (" ESTOP0");
for(;;);
// Uncomment this line after adding ISR Code
// return;
}
interrupt void T1OFINT_ISR(void) // EV-A
{
// Insert ISR Code here
// To recieve more interrupts from this PIE group, acknowledge this interrupt
// PieCtrl.PIEACK.all = PIEACK_GROUP2;
// Next two lines for debug only - remove after inserting
// ISR Code
asm (" ESTOP0");
for(;;);
// Uncomment this line after adding ISR Code
// return;
}
interrupt void T2PINT_ISR(void) // EV-A
{
// Insert ISR Code here
// To recieve more interrupts from this PIE group, acknowledge this interrupt
// PieCtrl.PIEACK.all = PIEACK_GROUP3;
// Next two lines for debug only - remove after inserting
// ISR Code
asm (" ESTOP0");
for(;;);
// Uncomment this line after adding ISR Code
// return;
}
interrupt void T2CINT_ISR(void) // EV-A
{
// Insert ISR Code here
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -