I am getting the following error: *** ERROR L125: INTERRUPT NUMBER NOT DEFINED SYMBOL: XP0INT I am not sure why because the symbol is a standard interrupt vector for CAN. Here is my code:
void CAN_vIsr(void) interrupt XP0INT { if (XP0IR) { if (CAN_OBJ[1].MCR & 0x0300 == 0x0200) { if(CAN_OBJ[1].MCR & 0x0c00 == 0x0800) { for(i=0;i=7;i++) { CAN_OBJ[0].Data[i] = CAN_OBJ[1].Data[i]; can_data[i] = CAN_OBJ[1].Data[i]; } } CAN_OBJ[1].MCR = 0xF5FD; } } XP0IR = 0; RTCvalue = (can_data[0]*3600) + (can_data[1]*60); currentRT(); }
The DAVE code (a GUI tool by Keil to develop files the user can then modify) uses the same interrupt vector.
Chris, appreciate your response. I still get the following errors: CAN_2.C(104): error C25: syntax error near ';' CAN_2.C(107): error C103: 'XP0IR': illegal function definition (missing ';' ?) Bit XP0IR has been defined in a .h file. Even if i try to include that file I continue getting the same error.