⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 interrupt.c

📁 F2812的串口通信
💻 C
📖 第 1 页 / 共 3 页
字号:
/*********************************************************************
 File: interrupt.c                                                 

*********************************************************************/
#include "device.h"
#include "F2812reg.h"
/*********************************************************************/

interrupt void INT13_ISR(void)			// 0x000D1A  INT13 - XINT13 (or CPU Timer1, reserved for TI)
{
// Work around Compiler v3.03 bug
	asm(" SPM  0");						// Compiler not properly setting SPM 0 in ISRs
	asm(" CLRC AMODE");					// Compiler not properly setting AMODE=1 in ISRs
// End workaround

// Next two lines for debug only - remove after inserting your ISR
	asm (" ESTOP0");					// Emulator Halt instruction
	while(1);
}

/*********************************************************************/
interrupt void INT14_ISR(void)			// 0x000D1C  INT14 - CPU Timer2, reserved for TI
{
// Work around Compiler v3.03 bug
	asm(" SPM  0");						// Compiler not properly setting SPM 0 in ISRs
	asm(" CLRC AMODE");					// Compiler not properly setting AMODE=1 in ISRs
// End workaround

// Next two lines for debug only - remove after inserting your ISR
	asm (" ESTOP0");					// Emulator Halt instruction
	while(1);
}

/*********************************************************************/
interrupt void DATALOG_ISR(void)		// 0x000D1E  DATALOG - CPU data logging interrupt
{
// Work around Compiler v3.03 bug
	asm(" SPM  0");						// Compiler not properly setting SPM 0 in ISRs
	asm(" CLRC AMODE");					// Compiler not properly setting AMODE=1 in ISRs
// End workaround

// Next two lines for debug only - remove after inserting your ISR
	asm (" ESTOP0");					// Emulator Halt instruction
	while(1);
}

/*********************************************************************/
interrupt void RTOSINT_ISR(void)		// 0x000D20  RTOSINT - CPU RTOS interrupt
{
// Work around Compiler v3.03 bug
	asm(" SPM  0");						// Compiler not properly setting SPM 0 in ISRs
	asm(" CLRC AMODE");					// Compiler not properly setting AMODE=1 in ISRs
// End workaround

// Next two lines for debug only - remove after inserting your ISR
	asm (" ESTOP0");					// Emulator Halt instruction
	while(1);
}

/*********************************************************************/
interrupt void EMUINT_ISR(void) 		// 0x000D22  EMUINT - CPU emulation interrupt
{
// Work around Compiler v3.03 bug
	asm(" SPM  0");						// Compiler not properly setting SPM 0 in ISRs
	asm(" CLRC AMODE");					// Compiler not properly setting AMODE=1 in ISRs
// End workaround

// Next two lines for debug only - remove after inserting your ISR
	asm (" ESTOP0");					// Emulator Halt instruction
	while(1);
}

/*********************************************************************/
interrupt void NMI_ISR(void)			// 0x000D24  NMI - XNMI interrupt
{
// Work around Compiler v3.03 bug
	asm(" SPM  0");						// Compiler not properly setting SPM 0 in ISRs
	asm(" CLRC AMODE");					// Compiler not properly setting AMODE=1 in ISRs
// End workaround

// Next two lines for debug only - remove after inserting your ISR
	asm (" ESTOP0");					// Emulator Halt instruction
	while(1);
}

/*********************************************************************/
interrupt void ILLEGAL_ISR(void)		// 0x000D26  ILLEGAL - illegal operation trap
{
// Work around Compiler v3.03 bug
	asm(" SPM  0");						// Compiler not properly setting SPM 0 in ISRs
	asm(" CLRC AMODE");					// Compiler not properly setting AMODE=1 in ISRs
// End workaround

// Next two lines for debug only - remove after inserting your ISR
	asm (" ESTOP0");					// Emulator Halt instruction
	while(1);
}

/*********************************************************************/
interrupt void USER0_ISR(void)			// 0x000D28  USER0 - software interrupt #0
{
// Work around Compiler v3.03 bug
	asm(" SPM  0");						// Compiler not properly setting SPM 0 in ISRs
	asm(" CLRC AMODE");					// Compiler not properly setting AMODE=1 in ISRs
// End workaround

// Next two lines for debug only - remove after inserting your ISR
	asm (" ESTOP0");					// Emulator Halt instruction
	while(1);
}

/*********************************************************************/
interrupt void USER1_ISR(void)			// 0x000D2A  USER1 - software interrupt #1
{
// Work around Compiler v3.03 bug
	asm(" SPM  0");						// Compiler not properly setting SPM 0 in ISRs
	asm(" CLRC AMODE");					// Compiler not properly setting AMODE=1 in ISRs
// End workaround

// Next two lines for debug only - remove after inserting your ISR
	asm (" ESTOP0");					// Emulator Halt instruction
	while(1);
}

/*********************************************************************/
interrupt void USER2_ISR(void)			// 0x000D2C  USER2 - software interrupt #3
{
// Work around Compiler v3.03 bug
	asm(" SPM  0");						// Compiler not properly setting SPM 0 in ISRs
	asm(" CLRC AMODE");					// Compiler not properly setting AMODE=1 in ISRs
// End workaround

// Next two lines for debug only - remove after inserting your ISR
	asm (" ESTOP0");					// Emulator Halt instruction
	while(1);
}

/*********************************************************************/
interrupt void USER3_ISR(void)			// 0x000D2E  USER3 - software interrupt #3
{
// Work around Compiler v3.03 bug
	asm(" SPM  0");						// Compiler not properly setting SPM 0 in ISRs
	asm(" CLRC AMODE");					// Compiler not properly setting AMODE=1 in ISRs
// End workaround

// Next two lines for debug only - remove after inserting your ISR
	asm (" ESTOP0");					// Emulator Halt instruction
	while(1);
}

/*********************************************************************/
interrupt void USER4_ISR(void)			// 0x000D30  USER4 - software interrupt #4
{
// Work around Compiler v3.03 bug
	asm(" SPM  0");						// Compiler not properly setting SPM 0 in ISRs
	asm(" CLRC AMODE");					// Compiler not properly setting AMODE=1 in ISRs
// End workaround

// Next two lines for debug only - remove after inserting your ISR
	asm (" ESTOP0");					// Emulator Halt instruction
	while(1);
}

/*********************************************************************/
interrupt void USER5_ISR(void)			// 0x000D32  USER5 - software interrupt #5
{
// Work around Compiler v3.03 bug
	asm(" SPM  0");						// Compiler not properly setting SPM 0 in ISRs
	asm(" CLRC AMODE");					// Compiler not properly setting AMODE=1 in ISRs
// End workaround

// Next two lines for debug only - remove after inserting your ISR
	asm (" ESTOP0");					// Emulator Halt instruction
	while(1);
}

/*********************************************************************/
interrupt void USER6_ISR(void)			// 0x000D34  USER6 - software interrupt #6
{
// Work around Compiler v3.03 bug
	asm(" SPM  0");						// Compiler not properly setting SPM 0 in ISRs
	asm(" CLRC AMODE");					// Compiler not properly setting AMODE=1 in ISRs
// End workaround

// Next two lines for debug only - remove after inserting your ISR
	asm (" ESTOP0");					// Emulator Halt instruction
	while(1);
}

/*********************************************************************/
interrupt void USER7_ISR(void)			// 0x000D36  USER7 - software interrupt #7
{
// Work around Compiler v3.03 bug
	asm(" SPM  0");						// Compiler not properly setting SPM 0 in ISRs
	asm(" CLRC AMODE");					// Compiler not properly setting AMODE=1 in ISRs
// End workaround

// Next two lines for debug only - remove after inserting your ISR
	asm (" ESTOP0");					// Emulator Halt instruction
	while(1);
}

/*********************************************************************/
interrupt void USER8_ISR(void)			// 0x000D38  USER8 - software interrupt #8
{
// Work around Compiler v3.03 bug
	asm(" SPM  0");						// Compiler not properly setting SPM 0 in ISRs
	asm(" CLRC AMODE");					// Compiler not properly setting AMODE=1 in ISRs
// End workaround

// Next two lines for debug only - remove after inserting your ISR
	asm (" ESTOP0");					// Emulator Halt instruction
	while(1);
}

/*********************************************************************/
interrupt void USER9_ISR(void)			// 0x000D3A  USER9 - software interrupt #9
{
// Work around Compiler v3.03 bug
	asm(" SPM  0");						// Compiler not properly setting SPM 0 in ISRs
	asm(" CLRC AMODE");					// Compiler not properly setting AMODE=1 in ISRs
// End workaround

// Next two lines for debug only - remove after inserting your ISR
	asm (" ESTOP0");					// Emulator Halt instruction
	while(1);
}

/*********************************************************************/
interrupt void USER10_ISR(void)			// 0x000D3C  USER10 - software interrupt #10
{
// Work around Compiler v3.03 bug
	asm(" SPM  0");						// Compiler not properly setting SPM 0 in ISRs
	asm(" CLRC AMODE");					// Compiler not properly setting AMODE=1 in ISRs
// End workaround

// Next two lines for debug only - remove after inserting your ISR
	asm (" ESTOP0");					// Emulator Halt instruction
	while(1);
}

/*********************************************************************/
interrupt void USER11_ISR(void)			// 0x000D3E  USER11 - software interrupt #11
{
// Work around Compiler v3.03 bug
	asm(" SPM  0");						// Compiler not properly setting SPM 0 in ISRs
	asm(" CLRC AMODE");					// Compiler not properly setting AMODE=1 in ISRs
// End workaround


// Next two lines for debug only - remove after inserting your ISR
	asm (" ESTOP0");					// Emulator Halt instruction
	while(1);
}

/*********************************************************************/
interrupt void PDPINTA_ISR(void)		// 0x000D40  PDPINTA (EV-A)
{
// Work around Compiler v3.03 bug
	asm(" SPM  0");						// Compiler not properly setting SPM 0 in ISRs
	asm(" CLRC AMODE");					// Compiler not properly setting AMODE=1 in ISRs
// End workaround

//	PieCtrlRegs.PIEACK.all = PIEACK_GROUP1;	// Must acknowledge the PIE group

// Next two lines for debug only - remove after inserting your ISR
	asm (" ESTOP0");					// Emulator Halt instruction
	while(1);
}

/*********************************************************************/
interrupt void PDPINTB_ISR(void)		// 0x000D42  PDPINTB (EV-B)
{
// Work around Compiler v3.03 bug
	asm(" SPM  0");						// Compiler not properly setting SPM 0 in ISRs
	asm(" CLRC AMODE");					// Compiler not properly setting AMODE=1 in ISRs
// End workaround

//	PieCtrlRegs.PIEACK.all = PIEACK_GROUP1;	// Must acknowledge the PIE group

// Next two lines for debug only - remove after inserting your ISR
	asm (" ESTOP0");					// Emulator Halt instruction
	while(1);
}

/*********************************************************************/
interrupt void XINT1_ISR(void)			// 0x000D46  XINT1
{   
    
       
     
     
}     

/*********************************************************************/
interrupt void XINT2_ISR(void)			// 0x000D48  XINT2
{
// Work around Compiler v3.03 bug
	asm(" SPM  0");						// Compiler not properly setting SPM 0 in ISRs
	asm(" CLRC AMODE");					// Compiler not properly setting AMODE=1 in ISRs
// End workaround

//	PieCtrlRegs.PIEACK.all = PIEACK_GROUP1;	// Must acknowledge the PIE group

// Next two lines for debug only - remove after inserting your ISR
	asm (" ESTOP0");					// Emulator Halt instruction
	while(1);
}

/*********************************************************************/
interrupt void ADCINT_ISR(void)		// 0x000D4A  ADCINT (ADC)
{

//int16 u;							// fixed pt. control input

// Work around Compiler v3.03 bug
	asm(" SPM  0");						// Compiler not properly setting SPM 0 in ISRs
	asm(" CLRC AMODE");					// Compiler not properly setting AMODE=1 in ISRs
// End workaround

/*** Manage the interrupt registers ***/
//	PieCtrlRegs.PIEACK.all = PIEACK_GROUP1;		// Must acknowledge the PIE group

/*** Manage the ADC registers ***/
//	AdcRegs.ADCTRL2.bit.RST_SEQ1 = 1;	// reset SEQ1 to CONV00 state
//	AdcRegs.ADCST.bit.INT_SEQ1_CLR = 1;	// clear ADC SEQ1 interrupt flag

/*** Read the thermistor ***/
//	TEC1.y = AdcRegs.ADCRESULT0 >> 1;	// read ADC result, I1Q15

/*** Filter the thermistor reading ***/
	#if FILTER != 0						// low-pass filter in use
	//	FirFilter(&TEC1, aLP, NLP);		// call the FIR filter function
	#else                               // low-pass filter not in use

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -