1 /* FreeEMS - the open source engine management system
3 * Copyright 2010 Fred Cooke
5 * This file is part of the FreeEMS project.
7 * FreeEMS software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
12 * FreeEMS software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with any FreeEMS software. If not, see http://www.gnu.org/licenses/
20 * We ask that if you make any changes to this file you email them upstream to
21 * us at admin(at)diyefi(dot)org or, even better, fork the code on github.com!
23 * Thank you for choosing FreeEMS to run your engine!
30 * @ingroup interruptHandlers
32 * @brief XGATE Interrupt Vector Table
34 * This file contains the definition of the XGATE interrupt vector table.
35 * This table consists only of pointers to xgate code blocks which are by
36 * definition void. These will be called by the hardware when an interrupt
37 * of a certain type occurs.
43 #define XGATEVECTORS_C
44 #include "inc/freeEMS.h"
45 #include "inc/xgateVectors.h"
48 /* Currently this gets copied from wherever it ends up into the XGATE flash pages */
49 const xgateIntVector xgateIntVectorTable
[] PPAGE_E0X
= {
50 /* Channel ID = vector address offset / 4 */
51 /* channel 0x00-0x08 are not used, 0x09-0x1D are reserved first used must match macro XGATE_VECTOR_OFFSET in xgate.h */
52 {XGATE_ERROR_HANDLER
, 0x00}, /* NOT USED */
53 {XGATE_ERROR_HANDLER
, 0x01}, /* NOT USED */
54 {XGATE_ERROR_HANDLER
, 0x02}, /* NOT USED */
55 {XGATE_ERROR_HANDLER
, 0x03}, /* NOT USED */
56 {XGATE_ERROR_HANDLER
, 0x04}, /* NOT USED */
57 {XGATE_ERROR_HANDLER
, 0x05}, /* NOT USED */
58 {XGATE_ERROR_HANDLER
, 0x06}, /* NOT USED */
59 {XGATE_ERROR_HANDLER
, 0x07}, /* NOT USED */
60 {XGATE_ERROR_HANDLER
, 0x08}, /* NOT USED */
61 {XGATE_ERROR_HANDLER
, 0x09}, // RESERVED
62 {XGATE_ERROR_HANDLER
, 0x0A}, // RESERVED
63 {XGATE_ERROR_HANDLER
, 0x0B}, // RESERVED
64 {XGATE_ERROR_HANDLER
, 0x0C}, // RESERVED
65 {XGATE_ERROR_HANDLER
, 0x0D}, // RESERVED
66 {XGATE_ERROR_HANDLER
, 0x0E}, // RESERVED
67 {XGATE_ERROR_HANDLER
, 0x0F}, // RESERVED
68 {XGATE_ERROR_HANDLER
, 0x10}, // RESERVED
69 {XGATE_ERROR_HANDLER
, 0x11}, // RESERVED
70 {XGATE_ERROR_HANDLER
, 0x12}, // RESERVED
71 {XGATE_ERROR_HANDLER
, 0x13}, // RESERVED
72 {XGATE_ERROR_HANDLER
, 0x14}, // RESERVED
73 {XGATE_ERROR_HANDLER
, 0x15}, // RESERVED
74 {XGATE_ERROR_HANDLER
, 0x16}, // RESERVED
75 {XGATE_ERROR_HANDLER
, 0x17}, // RESERVED
76 {XGATE_ERROR_HANDLER
, 0x18}, // RESERVED
77 {XGATE_ERROR_HANDLER
, 0x19}, // RESERVED
78 {XGATE_ERROR_HANDLER
, 0x1A}, // RESERVED
79 {XGATE_ERROR_HANDLER
, 0x1B}, // RESERVED
80 {XGATE_ERROR_HANDLER
, 0x1C}, // RESERVED
81 {XGATE_ERROR_HANDLER
, 0x1D}, // RESERVED
82 {XGATE_ERROR_HANDLER
, 0x1E}, // RESERVED
83 {XGATE_ERROR_HANDLER
, 0x1F}, // RESERVED
84 {XGATE_ERROR_HANDLER
, 0x20}, // RESERVED
85 {XGATE_ERROR_HANDLER
, 0x21}, // RESERVED
86 {XGATE_ERROR_HANDLER
, 0x22}, // RESERVED
87 {XGATE_ERROR_HANDLER
, 0x23}, // RESERVED
88 {XGATE_ERROR_HANDLER
, 0x24}, // RESERVED
89 {XGATE_ERROR_HANDLER
, 0x25}, // RESERVED
90 {XGATE_ERROR_HANDLER
, 0x26}, // RESERVED
91 {XGATE_ERROR_HANDLER
, 0x27}, // RESERVED
92 {XGATE_ERROR_HANDLER
, 0x28}, // RESERVED
93 {XGATE_ERROR_HANDLER
, 0x29}, // RESERVED
94 {XGATE_ERROR_HANDLER
, 0x2A}, // RESERVED
95 {XGATE_ERROR_HANDLER
, 0x2B}, // RESERVED
96 {XGATE_ERROR_HANDLER
, 0x2C}, // RESERVED
97 {XGATE_ERROR_HANDLER
, 0x2D}, // RESERVED
98 {XGATE_ERROR_HANDLER
, 0x2E}, // RESERVED
99 {XGATE_ERROR_HANDLER
, 0x2F}, // RESERVED
100 {XGATE_ERROR_HANDLER
, 0x30}, // special - Reserved S12XCPU RAM access violation
101 {XGATE_ERROR_HANDLER
, 0x31}, // special - Reserved XGATE software error interrupt
102 {XGATE_ERROR_HANDLER
, 0x32}, // Channel 32 - XGATE Software Trigger 7
103 {XGATE_ERROR_HANDLER
, 0x33}, // Channel 33 - XGATE Software Trigger 6
104 {XGATE_ERROR_HANDLER
, 0x34}, // Channel 34 - XGATE Software Trigger 5
105 {XGATE_ERROR_HANDLER
, 0x35}, // Channel 35 - XGATE Software Trigger 4
106 {XGATE_ERROR_HANDLER
, 0x36}, // Channel 36 - XGATE Software Trigger 3
107 {XGATE_ERROR_HANDLER
, 0x37}, // Channel 37 - XGATE Software Trigger 2
108 {XGATE_ERROR_HANDLER
, 0x38}, // Channel 38 - XGATE Software Trigger 1
109 {(unsigned short)xgateSchedule
, (unsigned short)&PORTP
}, // Channel 39 - XGATE Software Trigger 0 address in first field is from xgate linear 64k point of view. The VMA MUST BE CHANGED IN THE COPYOPTS PORTION OF THE MAKEFILE to reflect how xgate see's this section
110 {XGATE_ERROR_HANDLER
, 0x3A}, // Channel 3A - Periodic Interrupt Timer 3
111 {(unsigned short)xgateDelayCounter
, 0x3B}, // Channel 3B - Periodic Interrupt Timer 2
112 {(unsigned short)xgatePITTurnOff
, 0x3C}, // Channel 3C - Periodic Interrupt Timer 1
113 {(unsigned short)xgatePITTurnOn
, 0x3D}, // Channel 3D - Periodic Interrupt Timer 0
114 {XGATE_ERROR_HANDLER
, 0x3E}, // Reserved
115 {XGATE_ERROR_HANDLER
, 0x3F}, // Channel 3F - Autonomous Periodical interrupt API
116 {XGATE_ERROR_HANDLER
, 0x40}, // Channel 40 - Low Voltage interrupt LVI
117 {XGATE_ERROR_HANDLER
, 0x41}, // Channel 41 - IIC1 Bus
118 {XGATE_ERROR_HANDLER
, 0x42}, // Channel 42 - SCI5
119 {XGATE_ERROR_HANDLER
, 0x43}, // Channel 43 - SCI4
120 {XGATE_ERROR_HANDLER
, 0x44}, // Channel 44 - SCI3
121 {XGATE_ERROR_HANDLER
, 0x45}, // Channel 45 - SCI2
122 {XGATE_ERROR_HANDLER
, 0x46}, // Channel 46 - PWM Emergency Shutdown
123 {XGATE_ERROR_HANDLER
, 0x47}, // Channel 47 - Port P Interrupt
124 {XGATE_ERROR_HANDLER
, 0x48}, // Channel 48 - CAN4 transmit
125 {XGATE_ERROR_HANDLER
, 0x49}, // Channel 49 - CAN4 receive
126 {XGATE_ERROR_HANDLER
, 0x4A}, // Channel 4A - CAN4 errors
127 {XGATE_ERROR_HANDLER
, 0x4B}, // Channel 4B - CAN4 wake-up
128 {XGATE_ERROR_HANDLER
, 0x4C}, // Channel 4C - CAN3 transmit
129 {XGATE_ERROR_HANDLER
, 0x4D}, // Channel 4D - CAN3 receive
130 {XGATE_ERROR_HANDLER
, 0x4E}, // Channel 4E - CAN3 errors
131 {XGATE_ERROR_HANDLER
, 0x4F}, // Channel 4F - CAN3 wake-up
132 {XGATE_ERROR_HANDLER
, 0x50}, // Channel 50 - CAN2 transmit
133 {XGATE_ERROR_HANDLER
, 0x51}, // Channel 51 - CAN2 receive
134 {XGATE_ERROR_HANDLER
, 0x52}, // Channel 52 - CAN2 errors
135 {XGATE_ERROR_HANDLER
, 0x53}, // Channel 53 - CAN2 wake-up
136 {XGATE_ERROR_HANDLER
, 0x54}, // Channel 54 - CAN1 transmit
137 {XGATE_ERROR_HANDLER
, 0x55}, // Channel 55 - CAN1 receive
138 {XGATE_ERROR_HANDLER
, 0x56}, // Channel 56 - CAN1 errors
139 {XGATE_ERROR_HANDLER
, 0x57}, // Channel 57 - CAN1 wake-up
140 {XGATE_ERROR_HANDLER
, 0x58}, // Channel 58 - CAN0 transmit
141 {XGATE_ERROR_HANDLER
, 0x59}, // Channel 59 - CAN0 receive
142 {XGATE_ERROR_HANDLER
, 0x5A}, // Channel 5A - CAN0 errors
143 {XGATE_ERROR_HANDLER
, 0x5B}, // Channel 5B - CAN0 wake-up
144 {XGATE_ERROR_HANDLER
, 0x5C}, // Channel 5C - FLASH
145 {XGATE_ERROR_HANDLER
, 0x5D}, // Channel 5D - EEPROM
146 {XGATE_ERROR_HANDLER
, 0x5E}, // Channel 5E - SPI2
147 {XGATE_ERROR_HANDLER
, 0x5F}, // Channel 5F - SPI1
148 {XGATE_ERROR_HANDLER
, 0x60}, // Channel 60 - IIC0 Bus
149 {XGATE_ERROR_HANDLER
, 0x61}, // RESERVED
150 {XGATE_ERROR_HANDLER
, 0x62}, // Channel 62 - CRG Self Clock Mode
151 {XGATE_ERROR_HANDLER
, 0x63}, // Channel 63 - CRG PLL lock
152 {XGATE_ERROR_HANDLER
, 0x64}, // Channel 64 - Pulse Accumulator B Overflow
153 {XGATE_ERROR_HANDLER
, 0x65}, // Channel 65 - Modulus Down Counter underflow
154 {XGATE_ERROR_HANDLER
, 0x66}, // Channel 66 - Port H
155 {XGATE_ERROR_HANDLER
, 0x67}, // Channel 67 - Port J
156 {XGATE_ERROR_HANDLER
, 0x68}, // Channel 68 - ATD1
157 {XGATE_ERROR_HANDLER
, 0x69}, // Channel 69 - ATD0
158 {XGATE_ERROR_HANDLER
, 0x6A}, // Channel 6A - SCI1
159 {XGATE_ERROR_HANDLER
, 0x6B}, // Channel 6B - SCI0
160 {XGATE_ERROR_HANDLER
, 0x6C}, // Channel 6C - SPI0
161 {XGATE_ERROR_HANDLER
, 0x6D}, // Channel 6D - ECT Pulse accumulator input edge
162 {XGATE_ERROR_HANDLER
, 0x6E}, // Channel 6E - ECT Pulse accumulator A overflow
163 {XGATE_ERROR_HANDLER
, 0x6F}, // Channel 6F - Enhanced Capture Timer overflow
164 {XGATE_ERROR_HANDLER
, 0x70}, // Channel 70 - Enhanced Capture Timer channel 7
165 {XGATE_ERROR_HANDLER
, 0x71}, // Channel 71 - Enhanced Capture Timer channel 6
166 {XGATE_ERROR_HANDLER
, 0x72}, // Channel 72 - Enhanced Capture Timer channel 5
167 {XGATE_ERROR_HANDLER
, 0x73}, // Channel 73 - Enhanced Capture Timer channel 4
168 {XGATE_ERROR_HANDLER
, 0x74}, // Channel 74 - Enhanced Capture Timer channel 3
169 {XGATE_ERROR_HANDLER
, 0x75}, // Channel 75 - Enhanced Capture Timer channel 2
170 {XGATE_ERROR_HANDLER
, 0x76}, // Channel 76 - Enhanced Capture Timer channel 1
171 {XGATE_ERROR_HANDLER
, 0x77}, // Channel 77 - Enhanced Capture Timer channel 0
172 {XGATE_ERROR_HANDLER
, 0x78} // Channel 78 - Real Time Interrupt