DSP2803x_SWPrioritizedDefaultIsr.c 44 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698
  1. //###########################################################################
  2. //
  3. // FILE: DSP2803x_SWPrioritizedDefaultIsr.c
  4. //
  5. // TITLE: DSP2803x Device Default Software Prioritized Interrupt Service Routines.
  6. //
  7. //###########################################################################
  8. // $TI Release: F2803x C/C++ Header Files and Peripheral Examples V130 $
  9. // $Release Date: May 8, 2015 $
  10. // $Copyright: Copyright (C) 2009-2015 Texas Instruments Incorporated -
  11. // http://www.ti.com/ ALL RIGHTS RESERVED $
  12. //###########################################################################
  13. #include "DSP2803x_Device.h" // DSP2803x Headerfile Include File
  14. #include "DSP2803x_Examples.h" // DSP2803x Examples Include File
  15. #include "DSP2803x_SWPrioritizedIsrLevels.h"
  16. // Connected to INT13 of CPU (use MINT13 mask):
  17. // Note CPU-Timer1 is reserved for TI use, however XINT13
  18. // ISR can be used by the user.
  19. #if (INT13PL != 0)
  20. __interrupt void INT13_ISR(void) // INT13 or CPU-Timer1
  21. {
  22. IER |= MINT13; // Set "global" priority
  23. EINT;
  24. // Insert ISR Code here
  25. // Next two lines for debug only to halt the processor here
  26. // Remove after inserting ISR Code
  27. __asm (" ESTOP0");
  28. for(;;);
  29. }
  30. #endif
  31. // Connected to INT14 of CPU (use MINT14 mask):
  32. #if (INT14PL != 0)
  33. __interrupt void INT14_ISR(void) // CPU-Timer2
  34. {
  35. IER |= MINT14; // Set "global" priority
  36. EINT;
  37. // Insert ISR Code here.......
  38. // Next two lines for debug only to halt the processor here
  39. // Remove after inserting ISR Code
  40. __asm (" ESTOP0");
  41. for(;;);
  42. }
  43. #endif
  44. // Connected to INT15 of CPU (use MINT15 mask):
  45. #if (INT15PL != 0)
  46. __interrupt void DATALOG_ISR(void) // Datalogging interrupt
  47. {
  48. IER |= MINT15; // Set "global" priority
  49. EINT;
  50. // Insert ISR Code here.......
  51. // Next two lines for debug only to halt the processor here
  52. // Remove after inserting ISR Code
  53. __asm (" ESTOP0");
  54. for(;;);
  55. }
  56. #endif
  57. // Connected to INT16 of CPU (use MINT16 mask):
  58. #if (INT16PL != 0)
  59. __interrupt void RTOSINT_ISR(void) // RTOS interrupt
  60. {
  61. IER |= MINT16; // Set "global" priority
  62. EINT;
  63. // Insert ISR Code here.......
  64. // Next two lines for debug only to halt the processor here
  65. // Remove after inserting ISR Code
  66. __asm (" ESTOP0");
  67. for(;;);
  68. }
  69. #endif
  70. // Connected to EMUINT of CPU (non-maskable):
  71. __interrupt void EMUINT_ISR(void) // Emulation interrupt
  72. {
  73. EINT;
  74. // Insert ISR Code here.......
  75. // Next two lines for debug only to halt the processor here
  76. // Remove after inserting ISR Code
  77. __asm (" ESTOP0");
  78. for(;;);
  79. }
  80. // Connected to NMI of CPU (non-maskable):
  81. __interrupt void NMI_ISR(void) // Non-maskable interrupt
  82. {
  83. EINT;
  84. // Insert ISR Code here.......
  85. // Next two lines for debug only to halt the processor here
  86. // Remove after inserting ISR Code
  87. __asm (" ESTOP0");
  88. for(;;);
  89. }
  90. __interrupt void ILLEGAL_ISR(void) // Illegal operation TRAP
  91. {
  92. EINT;
  93. // Insert ISR Code here.......
  94. // Next two lines for debug only to halt the processor here
  95. // Remove after inserting ISR Code
  96. __asm (" ESTOP0");
  97. for(;;);
  98. }
  99. __interrupt void USER1_ISR(void) // User Defined trap 1
  100. {
  101. EINT;
  102. // Insert ISR Code here.......
  103. // Next two lines for debug only to halt the processor here
  104. // Remove after inserting ISR Code
  105. __asm (" ESTOP0");
  106. for(;;);
  107. }
  108. __interrupt void USER2_ISR(void) // User Defined trap 2
  109. {
  110. EINT;
  111. // Insert ISR Code here.......
  112. // Next two lines for debug only to halt the processor here
  113. // Remove after inserting ISR Code
  114. __asm (" ESTOP0");
  115. for(;;);
  116. }
  117. __interrupt void USER3_ISR(void) // User Defined trap 3
  118. {
  119. EINT;
  120. // Insert ISR Code here.......
  121. // Next two lines for debug only to halt the processor here
  122. // Remove after inserting ISR Code
  123. __asm (" ESTOP0");
  124. for(;;);
  125. }
  126. __interrupt void USER4_ISR(void) // User Defined trap 4
  127. {
  128. EINT;
  129. // Insert ISR Code here.......
  130. // Next two lines for debug only to halt the processor here
  131. // Remove after inserting ISR Code
  132. __asm (" ESTOP0");
  133. for(;;);
  134. }
  135. __interrupt void USER5_ISR(void) // User Defined trap 5
  136. {
  137. EINT;
  138. // Insert ISR Code here.......
  139. // Next two lines for debug only to halt the processor here
  140. // Remove after inserting ISR Code
  141. __asm (" ESTOP0");
  142. for(;;);
  143. }
  144. __interrupt void USER6_ISR(void) // User Defined trap 6
  145. {
  146. EINT;
  147. // Insert ISR Code here.......
  148. // Next two lines for debug only to halt the processor here
  149. // Remove after inserting ISR Code
  150. __asm (" ESTOP0");
  151. for(;;);
  152. }
  153. __interrupt void USER7_ISR(void) // User Defined trap 7
  154. {
  155. EINT;
  156. // Insert ISR Code here.......
  157. // Next two lines for debug only to halt the processor here
  158. // Remove after inserting ISR Code
  159. __asm (" ESTOP0");
  160. for(;;);
  161. }
  162. __interrupt void USER8_ISR(void) // User Defined trap 8
  163. {
  164. EINT;
  165. // Insert ISR Code here.......
  166. // Next two lines for debug only to halt the processor here
  167. // Remove after inserting ISR Code
  168. __asm (" ESTOP0");
  169. for(;;);
  170. }
  171. __interrupt void USER9_ISR(void) // User Defined trap 9
  172. {
  173. EINT;
  174. // Insert ISR Code here.......
  175. // Next two lines for debug only to halt the processor here
  176. // Remove after inserting ISR Code
  177. __asm (" ESTOP0");
  178. for(;;);
  179. }
  180. __interrupt void USER10_ISR(void) // User Defined trap 10
  181. {
  182. EINT;
  183. // Insert ISR Code here.......
  184. // Next two lines for debug only to halt the processor here
  185. // Remove after inserting ISR Code
  186. __asm (" ESTOP0");
  187. for(;;);
  188. }
  189. __interrupt void USER11_ISR(void) // User Defined trap 11
  190. {
  191. EINT;
  192. // Insert ISR Code here.......
  193. // Next two lines for debug only to halt the processor here
  194. // Remove after inserting ISR Code
  195. __asm (" ESTOP0");
  196. for(;;);
  197. }
  198. __interrupt void USER12_ISR(void) // User Defined trap 12
  199. {
  200. EINT;
  201. // Insert ISR Code here.......
  202. // Next two lines for debug only to halt the processor here
  203. // Remove after inserting ISR Code
  204. __asm (" ESTOP0");
  205. for(;;);
  206. }
  207. // -----------------------------------------------------------
  208. // PIE Group 1 - MUXed into CPU INT1
  209. // -----------------------------------------------------------
  210. // Connected to PIEIER1_1 (use MINT1 and MG11 masks):
  211. #if (G11PL != 0)
  212. __interrupt void ADCINT1_ISR( void ) // ADC
  213. {
  214. // Set interrupt priority:
  215. volatile Uint16 TempPIEIER = PieCtrlRegs.PIEIER1.all;
  216. IER |= M_INT1;
  217. IER &= MINT1; // Set "global" priority
  218. PieCtrlRegs.PIEIER1.all &= MG11; // Set "group" priority
  219. PieCtrlRegs.PIEACK.all = 0xFFFF; // Enable PIE interrupts
  220. EINT;
  221. // Insert ISR Code here.......
  222. // Restore registers saved:
  223. DINT;
  224. PieCtrlRegs.PIEIER1.all = TempPIEIER;
  225. // Next two lines for debug only to halt the processor here
  226. // Remove after inserting ISR Code
  227. __asm (" ESTOP0");
  228. for(;;);
  229. }
  230. #endif
  231. // Connected to PIEIER1_2 (use MINT1 and MG12 masks):
  232. #if (G12PL != 0)
  233. __interrupt void ADCINT2_ISR( void ) // ADC
  234. {
  235. // Set interrupt priority:
  236. volatile Uint16 TempPIEIER = PieCtrlRegs.PIEIER1.all;
  237. IER |= M_INT1;
  238. IER &= MINT1; // Set "global" priority
  239. PieCtrlRegs.PIEIER1.all &= MG12; // Set "group" priority
  240. PieCtrlRegs.PIEACK.all = 0xFFFF; // Enable PIE interrupts
  241. EINT;
  242. // Insert ISR Code here.......
  243. // Restore registers saved:
  244. DINT;
  245. PieCtrlRegs.PIEIER1.all = TempPIEIER;
  246. // Next two lines for debug only to halt the processor here
  247. // Remove after inserting ISR Code
  248. __asm (" ESTOP0");
  249. for(;;);
  250. }
  251. #endif
  252. // Connected to PIEIER1_4 (use MINT1 and MG14 masks):
  253. #if (G14PL != 0)
  254. __interrupt void XINT1_ISR(void)
  255. {
  256. // Set interrupt priority:
  257. volatile Uint16 TempPIEIER = PieCtrlRegs.PIEIER1.all;
  258. IER |= MINT1; // Set "global" priority
  259. PieCtrlRegs.PIEIER1.all &= MG14; // Set "group" priority
  260. PieCtrlRegs.PIEACK.all = 0xFFFF; // Enable PIE interrupts
  261. EINT;
  262. // Restore registers saved:
  263. DINT;
  264. PieCtrlRegs.PIEIER1.all = TempPIEIER;
  265. // Next two lines for debug only to halt the processor here
  266. // Remove after inserting ISR Code
  267. __asm (" ESTOP0");
  268. for(;;);
  269. }
  270. #endif
  271. // Connected to PIEIER1_5 (use MINT1 and MG15 masks):
  272. #if (G15PL != 0)
  273. __interrupt void XINT2_ISR(void)
  274. {
  275. // Set interrupt priority:
  276. volatile Uint16 TempPIEIER = PieCtrlRegs.PIEIER1.all;
  277. IER |= MINT1; // Set "global" priority
  278. PieCtrlRegs.PIEIER1.all &= MG15; // Set "group" priority
  279. PieCtrlRegs.PIEACK.all = 0xFFFF; // Enable PIE interrupts
  280. EINT;
  281. // Insert ISR Code here.......
  282. // Restore registers saved:
  283. DINT;
  284. PieCtrlRegs.PIEIER1.all = TempPIEIER;
  285. // Next two lines for debug only to halt the processor here
  286. // Remove after inserting ISR Code
  287. __asm (" ESTOP0");
  288. for(;;);
  289. }
  290. #endif
  291. // Connected to PIEIER1_6 (use MINT1 and MG16 masks):
  292. #if (G16PL != 0)
  293. __interrupt void ADCINT9_ISR(void) // ADC
  294. {
  295. // Set interrupt priority:
  296. volatile Uint16 TempPIEIER = PieCtrlRegs.PIEIER1.all;
  297. IER |= M_INT1;
  298. IER &= MINT1; // Set "global" priority
  299. PieCtrlRegs.PIEIER1.all &= MG16; // Set "group" priority
  300. PieCtrlRegs.PIEACK.all = 0xFFFF; // Enable PIE interrupts
  301. EINT;
  302. // Insert ISR Code here.......
  303. // Restore registers saved:
  304. DINT;
  305. PieCtrlRegs.PIEIER1.all = TempPIEIER;
  306. // Next two lines for debug only to halt the processor here
  307. // Remove after inserting ISR Code
  308. __asm (" ESTOP0");
  309. for(;;);
  310. }
  311. #endif
  312. // Connected to PIEIER1_7 (use MINT1 and MG17 masks):
  313. #if (G17PL != 0)
  314. __interrupt void TINT0_ISR(void) // CPU-Timer 0
  315. {
  316. // Set interrupt priority:
  317. volatile Uint16 TempPIEIER = PieCtrlRegs.PIEIER1.all;
  318. IER |= M_INT1;
  319. IER &= MINT1; // Set "global" priority
  320. PieCtrlRegs.PIEIER1.all &= MG17; // Set "group" priority
  321. PieCtrlRegs.PIEACK.all = 0xFFFF; // Enable PIE interrupts
  322. EINT;
  323. // Insert ISR Code here.......
  324. // Restore registers saved:
  325. DINT;
  326. PieCtrlRegs.PIEIER1.all = TempPIEIER;
  327. // Next two lines for debug only to halt the processor here
  328. // Remove after inserting ISR Code
  329. __asm (" ESTOP0");
  330. for(;;);
  331. }
  332. #endif
  333. // Connected to PIEIER1_8 (use MINT1 and MG18 masks):
  334. #if (G18PL != 0)
  335. __interrupt void WAKEINT_ISR(void) // WD/LPM
  336. {
  337. // Set interrupt priority:
  338. volatile Uint16 TempPIEIER = PieCtrlRegs.PIEIER1.all;
  339. IER |= M_INT1;
  340. IER &= MINT1; // Set "global" priority
  341. PieCtrlRegs.PIEIER1.all &= MG18; // Set "group" priority
  342. PieCtrlRegs.PIEACK.all = 0xFFFF; // Enable PIE interrupts
  343. EINT;
  344. // Insert ISR Code here.......
  345. // Restore registers saved:
  346. DINT;
  347. PieCtrlRegs.PIEIER1.all = TempPIEIER;
  348. // Next two lines for debug only to halt the processor here
  349. // Remove after inserting ISR Code
  350. __asm (" ESTOP0");
  351. for(;;);
  352. }
  353. #endif
  354. // -----------------------------------------------------------
  355. // PIE Group 2 - MUXed into CPU INT2
  356. // -----------------------------------------------------------
  357. // Connected to PIEIER2_1 (use MINT2 and MG21 masks):
  358. #if (G21PL != 0)
  359. __interrupt void EPWM1_TZINT_ISR(void) // ePWM1 Trip Zone
  360. {
  361. // Set interrupt priority:
  362. volatile Uint16 TempPIEIER = PieCtrlRegs.PIEIER2.all;
  363. IER |= M_INT2;
  364. IER &= MINT2; // Set "global" priority
  365. PieCtrlRegs.PIEIER2.all &= MG21; // Set "group" priority
  366. PieCtrlRegs.PIEACK.all = 0xFFFF; // Enable PIE interrupts
  367. EINT;
  368. // Insert ISR Code here.......
  369. // Restore registers saved:
  370. DINT;
  371. PieCtrlRegs.PIEIER2.all = TempPIEIER;
  372. // Next two lines for debug only to halt the processor here
  373. // Remove after inserting ISR Code
  374. __asm (" ESTOP0");
  375. for(;;);
  376. }
  377. #endif
  378. // Connected to PIEIER2_2 (use MINT2 and MG22 masks):
  379. #if (G22PL != 0)
  380. __interrupt void EPWM2_TZINT_ISR(void) // ePWM2 Trip Zone
  381. {
  382. // Set interrupt priority:
  383. volatile Uint16 TempPIEIER = PieCtrlRegs.PIEIER2.all;
  384. IER |= M_INT2;
  385. IER &= MINT2; // Set "global" priority
  386. PieCtrlRegs.PIEIER2.all &= MG22; // Set "group" priority
  387. PieCtrlRegs.PIEACK.all = 0xFFFF; // Enable PIE interrupts
  388. EINT;
  389. // Insert ISR Code here.......
  390. // Restore registers saved:
  391. DINT;
  392. PieCtrlRegs.PIEIER2.all = TempPIEIER;
  393. // Next two lines for debug only to halt the processor here
  394. // Remove after inserting ISR Code
  395. __asm (" ESTOP0");
  396. for(;;);
  397. }
  398. #endif
  399. // Connected to PIEIER2_3 (use MINT2 and MG23 masks):
  400. #if (G23PL != 0)
  401. __interrupt void EPWM3_TZINT_ISR(void) // ePWM3 Trip Zone
  402. {
  403. // Set interrupt priority:
  404. volatile Uint16 TempPIEIER = PieCtrlRegs.PIEIER2.all;
  405. IER |= M_INT2;
  406. IER &= MINT2; // Set "global" priority
  407. PieCtrlRegs.PIEIER2.all &= MG23; // Set "group" priority
  408. PieCtrlRegs.PIEACK.all = 0xFFFF; // Enable PIE interrupts
  409. EINT;
  410. // Insert ISR Code here.......
  411. // Restore registers saved:
  412. DINT;
  413. PieCtrlRegs.PIEIER2.all = TempPIEIER;
  414. // Next two lines for debug only to halt the processor here
  415. // Remove after inserting ISR Code
  416. __asm (" ESTOP0");
  417. for(;;);
  418. }
  419. #endif
  420. // Connected to PIEIER2_4 (use MINT2 and MG24 masks):
  421. #if (G24PL != 0)
  422. __interrupt void EPWM4_TZINT_ISR(void) // ePWM4 Trip Zone
  423. {
  424. // Set interrupt priority:
  425. volatile Uint16 TempPIEIER = PieCtrlRegs.PIEIER2.all;
  426. IER |= M_INT2;
  427. IER &= MINT2; // Set "global" priority
  428. PieCtrlRegs.PIEIER2.all &= MG24; // Set "group" priority
  429. PieCtrlRegs.PIEACK.all = 0xFFFF; // Enable PIE interrupts
  430. EINT;
  431. // Insert ISR Code here.......
  432. // Restore registers saved:
  433. DINT;
  434. PieCtrlRegs.PIEIER2.all = TempPIEIER;
  435. // Next two lines for debug only to halt the processor here
  436. // Remove after inserting ISR Code
  437. __asm (" ESTOP0");
  438. for(;;);
  439. }
  440. #endif
  441. // Connected to PIEIER2_5 (use MINT2 and MG25 masks):
  442. #if (G25PL != 0)
  443. __interrupt void EPWM5_TZINT_ISR(void) // ePWM5 Trip Zone
  444. {
  445. // Set interrupt priority:
  446. volatile Uint16 TempPIEIER = PieCtrlRegs.PIEIER2.all;
  447. IER |= M_INT2;
  448. IER &= MINT2; // Set "global" priority
  449. PieCtrlRegs.PIEIER2.all &= MG25; // Set "group" priority
  450. PieCtrlRegs.PIEACK.all = 0xFFFF; // Enable PIE interrupts
  451. EINT;
  452. // Insert ISR Code here.......
  453. // Restore registers saved:
  454. DINT;
  455. PieCtrlRegs.PIEIER2.all = TempPIEIER;
  456. // Next two lines for debug only to halt the processor here
  457. // Remove after inserting ISR Code
  458. __asm (" ESTOP0");
  459. for(;;);
  460. }
  461. #endif
  462. // Connected to PIEIER2_6 (use MINT2 and MG26 masks):
  463. #if (G26PL != 0)
  464. __interrupt void EPWM6_TZINT_ISR(void) // ePWM6 Trip Zone
  465. {
  466. // Set interrupt priority:
  467. volatile Uint16 TempPIEIER = PieCtrlRegs.PIEIER2.all;
  468. IER |= M_INT2;
  469. IER &= MINT2; // Set "global" priority
  470. PieCtrlRegs.PIEIER2.all &= MG26; // Set "group" priority
  471. PieCtrlRegs.PIEACK.all = 0xFFFF; // Enable PIE interrupts
  472. EINT;
  473. // Insert ISR Code here.......
  474. // Restore registers saved:
  475. DINT;
  476. PieCtrlRegs.PIEIER2.all = TempPIEIER;
  477. // Next two lines for debug only to halt the processor here
  478. // Remove after inserting ISR Code
  479. __asm (" ESTOP0");
  480. for(;;);
  481. }
  482. #endif
  483. // Connected to PIEIER2_7 (use MINT2 and MG27 masks):
  484. #if (G27PL != 0)
  485. __interrupt void EPWM7_TZINT_ISR(void) // ePWM7 Trip Zone
  486. {
  487. // Set interrupt priority:
  488. volatile Uint16 TempPIEIER = PieCtrlRegs.PIEIER2.all;
  489. IER |= M_INT2;
  490. IER &= MINT2; // Set "global" priority
  491. PieCtrlRegs.PIEIER2.all &= MG27; // Set "group" priority
  492. PieCtrlRegs.PIEACK.all = 0xFFFF; // Enable PIE interrupts
  493. EINT;
  494. // Insert ISR Code here.......
  495. // Restore registers saved:
  496. DINT;
  497. PieCtrlRegs.PIEIER2.all = TempPIEIER;
  498. // Next two lines for debug only to halt the processor here
  499. // Remove after inserting ISR Code
  500. __asm (" ESTOP0");
  501. for(;;);
  502. }
  503. #endif
  504. // -----------------------------------------------------------
  505. // PIE Group 3 - MUXed into CPU INT3
  506. // -----------------------------------------------------------
  507. // Connected to PIEIER3_1 (use MINT3 and MG31 masks):
  508. #if (G31PL != 0)
  509. __interrupt void EPWM1_INT_ISR(void) // ePWM1 Interrupt
  510. {
  511. // Set interrupt priority:
  512. volatile Uint16 TempPIEIER = PieCtrlRegs.PIEIER3.all;
  513. IER |= M_INT3;
  514. IER &= MINT3; // Set "global" priority
  515. PieCtrlRegs.PIEIER3.all &= MG31; // Set "group" priority
  516. PieCtrlRegs.PIEACK.all = 0xFFFF; // Enable PIE interrupts
  517. EINT;
  518. // Insert ISR Code here.......
  519. // Restore registers saved:
  520. DINT;
  521. PieCtrlRegs.PIEIER3.all = TempPIEIER;
  522. // Next two lines for debug only to halt the processor here
  523. // Remove after inserting ISR Code
  524. __asm (" ESTOP0");
  525. for(;;);
  526. }
  527. #endif
  528. // Connected to PIEIER3_2 (use MINT3 and MG32 masks):
  529. #if (G32PL != 0)
  530. __interrupt void EPWM2_INT_ISR(void) // ePWM2 Interrupt
  531. {
  532. // Set interrupt priority:
  533. volatile Uint16 TempPIEIER = PieCtrlRegs.PIEIER3.all;
  534. IER |= M_INT3;
  535. IER &= MINT3; // Set "global" priority
  536. PieCtrlRegs.PIEIER3.all &= MG32; // Set "group" priority
  537. PieCtrlRegs.PIEACK.all = 0xFFFF; // Enable PIE interrupts
  538. EINT;
  539. // Insert ISR Code here.......
  540. // Restore registers saved:
  541. DINT;
  542. PieCtrlRegs.PIEIER3.all = TempPIEIER;
  543. // Next two lines for debug only to halt the processor here
  544. // Remove after inserting ISR Code
  545. __asm (" ESTOP0");
  546. for(;;);
  547. }
  548. #endif
  549. // Connected to PIEIER3_3 (use MINT3 and MG33 masks):
  550. #if (G33PL != 0)
  551. __interrupt void EPWM3_INT_ISR(void) // ePWM3 Interrupt
  552. {
  553. // Set interrupt priority:
  554. volatile Uint16 TempPIEIER = PieCtrlRegs.PIEIER3.all;
  555. IER |= M_INT3;
  556. IER &= MINT3; // Set "global" priority
  557. PieCtrlRegs.PIEIER3.all &= MG33; // Set "group" priority
  558. PieCtrlRegs.PIEACK.all = 0xFFFF; // Enable PIE interrupts
  559. EINT;
  560. // Insert ISR Code here.......
  561. // Restore registers saved:
  562. DINT;
  563. PieCtrlRegs.PIEIER3.all = TempPIEIER;
  564. // Next two lines for debug only to halt the processor here
  565. // Remove after inserting ISR Code
  566. __asm (" ESTOP0");
  567. for(;;);
  568. }
  569. #endif
  570. // Connected to PIEIER3_4 (use MINT3 and MG34 masks):
  571. #if (G34PL != 0)
  572. __interrupt void EPWM4_INT_ISR(void) // ePWM4 Interrupt
  573. {
  574. // Set interrupt priority:
  575. volatile Uint16 TempPIEIER = PieCtrlRegs.PIEIER3.all;
  576. IER |= M_INT3;
  577. IER &= MINT3; // Set "global" priority
  578. PieCtrlRegs.PIEIER3.all &= MG34; // Set "group" priority
  579. PieCtrlRegs.PIEACK.all = 0xFFFF; // Enable PIE interrupts
  580. EINT;
  581. // Insert ISR Code here.......
  582. // Restore registers saved:
  583. DINT;
  584. PieCtrlRegs.PIEIER3.all = TempPIEIER;
  585. // Next two lines for debug only to halt the processor here
  586. // Remove after inserting ISR Code
  587. __asm (" ESTOP0");
  588. for(;;);
  589. }
  590. #endif
  591. // Connected to PIEIER3_5 (use MINT3 and MG35 masks):
  592. #if (G34PL != 0)
  593. __interrupt void EPWM5_INT_ISR(void) // ePWM5 Interrupt
  594. {
  595. // Set interrupt priority:
  596. volatile Uint16 TempPIEIER = PieCtrlRegs.PIEIER3.all;
  597. IER |= M_INT3;
  598. IER &= MINT3; // Set "global" priority
  599. PieCtrlRegs.PIEIER3.all &= MG35; // Set "group" priority
  600. PieCtrlRegs.PIEACK.all = 0xFFFF; // Enable PIE interrupts
  601. EINT;
  602. // Insert ISR Code here.......
  603. // Restore registers saved:
  604. DINT;
  605. PieCtrlRegs.PIEIER3.all = TempPIEIER;
  606. // Next two lines for debug only to halt the processor here
  607. // Remove after inserting ISR Code
  608. __asm (" ESTOP0");
  609. for(;;);
  610. }
  611. #endif
  612. // Connected to PIEIER3_6 (use MINT3 and MG36 masks):
  613. #if (G36PL != 0)
  614. __interrupt void EPWM6_INT_ISR(void) // ePWM6 Interrupt
  615. {
  616. // Set interrupt priority:
  617. volatile Uint16 TempPIEIER = PieCtrlRegs.PIEIER3.all;
  618. IER |= M_INT3;
  619. IER &= MINT3; // Set "global" priority
  620. PieCtrlRegs.PIEIER3.all &= MG36; // Set "group" priority
  621. PieCtrlRegs.PIEACK.all = 0xFFFF; // Enable PIE interrupts
  622. EINT;
  623. // Insert ISR Code here.......
  624. // Restore registers saved:
  625. DINT;
  626. PieCtrlRegs.PIEIER3.all = TempPIEIER;
  627. // Next two lines for debug only to halt the processor here
  628. // Remove after inserting ISR Code
  629. __asm (" ESTOP0");
  630. for(;;);
  631. }
  632. #endif
  633. // Connected to PIEIER3_7 (use MINT3 and MG37 masks):
  634. #if (G37PL != 0)
  635. __interrupt void EPWM7_INT_ISR(void) // ePWM4 Interrupt
  636. {
  637. // Set interrupt priority:
  638. volatile Uint16 TempPIEIER = PieCtrlRegs.PIEIER3.all;
  639. IER |= M_INT3;
  640. IER &= MINT3; // Set "global" priority
  641. PieCtrlRegs.PIEIER3.all &= MG37; // Set "group" priority
  642. PieCtrlRegs.PIEACK.all = 0xFFFF; // Enable PIE interrupts
  643. EINT;
  644. // Insert ISR Code here.......
  645. // Restore registers saved:
  646. DINT;
  647. PieCtrlRegs.PIEIER3.all = TempPIEIER;
  648. // Next two lines for debug only to halt the processor here
  649. // Remove after inserting ISR Code
  650. __asm (" ESTOP0");
  651. for(;;);
  652. }
  653. #endif
  654. // -----------------------------------------------------------
  655. // PIE Group 4 - MUXed into CPU INT4
  656. // -----------------------------------------------------------
  657. // Connected to PIEIER4_1 (use MINT4 and MG41 masks):
  658. #if (G41PL != 0)
  659. __interrupt void ECAP1_INT_ISR(void) // eCAP1 Interrupt
  660. {
  661. // Set interrupt priority:
  662. volatile Uint16 TempPIEIER = PieCtrlRegs.PIEIER4.all;
  663. IER |= M_INT4;
  664. IER &= MINT4; // Set "global" priority
  665. PieCtrlRegs.PIEIER4.all &= MG41; // Set "group" priority
  666. PieCtrlRegs.PIEACK.all = 0xFFFF; // Enable PIE interrupts
  667. EINT;
  668. // Insert ISR Code here.......
  669. // Restore registers saved:
  670. DINT;
  671. PieCtrlRegs.PIEIER4.all = TempPIEIER;
  672. // Next two lines for debug only to halt the processor here
  673. // Remove after inserting ISR Code
  674. __asm (" ESTOP0");
  675. for(;;);
  676. }
  677. #endif
  678. // -----------------------------------------------------------
  679. // PIE Group 5 - MUXed into CPU INT5
  680. // -----------------------------------------------------------
  681. // Connected to PIEIER5_1 (use MINT5 and MG51 masks):
  682. #if (G51PL != 0)
  683. __interrupt void EQEP1_INT_ISR(void) // eQEP1 Interrupt
  684. {
  685. // Set interrupt priority:
  686. volatile Uint16 TempPIEIER = PieCtrlRegs.PIEIER5.all;
  687. IER |= M_INT5;
  688. IER &= MINT5; // Set "global" priority
  689. PieCtrlRegs.PIEIER5.all &= MG51; // Set "group" priority
  690. PieCtrlRegs.PIEACK.all = 0xFFFF; // Enable PIE interrupts
  691. EINT;
  692. // Insert ISR Code here.......
  693. // Restore registers saved:
  694. DINT;
  695. PieCtrlRegs.PIEIER5.all = TempPIEIER;
  696. // Next two lines for debug only to halt the processor here
  697. // Remove after inserting ISR Code
  698. __asm (" ESTOP0");
  699. for(;;);
  700. }
  701. #endif
  702. // -----------------------------------------------------------
  703. // PIE Group 6 - MUXed into CPU INT6
  704. // -----------------------------------------------------------
  705. // Connected to PIEIER6_1 (use MINT6 and MG61 masks):
  706. #if (G61PL != 0)
  707. __interrupt void SPIRXINTA_ISR(void) // SPI-A
  708. {
  709. // Set interrupt priority:
  710. volatile Uint16 TempPIEIER = PieCtrlRegs.PIEIER6.all;
  711. IER |= M_INT6;
  712. IER &= MINT6; // Set "global" priority
  713. PieCtrlRegs.PIEIER6.all &= MG61; // Set "group" priority
  714. PieCtrlRegs.PIEACK.all = 0xFFFF; // Enable PIE interrupts
  715. EINT;
  716. // Insert ISR Code here.......
  717. // Restore registers saved:
  718. DINT;
  719. PieCtrlRegs.PIEIER6.all = TempPIEIER;
  720. // Next two lines for debug only to halt the processor here
  721. // Remove after inserting ISR Code
  722. __asm (" ESTOP0");
  723. for(;;);
  724. }
  725. #endif
  726. // Connected to PIEIER6_2 (use MINT6 and MG62 masks):
  727. #if (G62PL != 0)
  728. __interrupt void SPITXINTA_ISR(void) // SPI-A
  729. {
  730. // Set interrupt priority:
  731. volatile Uint16 TempPIEIER = PieCtrlRegs.PIEIER6.all;
  732. IER |= M_INT6;
  733. IER &= MINT6; // Set "global" priority
  734. PieCtrlRegs.PIEIER6.all &= MG62; // Set "group" priority
  735. PieCtrlRegs.PIEACK.all = 0xFFFF; // Enable PIE interrupts
  736. EINT;
  737. // Insert ISR Code here.......
  738. // Restore registers saved:
  739. DINT;
  740. PieCtrlRegs.PIEIER6.all = TempPIEIER;
  741. // Next two lines for debug only to halt the processor here
  742. // Remove after inserting ISR Code
  743. __asm (" ESTOP0");
  744. for(;;);
  745. }
  746. #endif
  747. // -----------------------------------------------------------
  748. // PIE Group 7 - MUXed into CPU INT7
  749. // -----------------------------------------------------------
  750. // -----------------------------------------------------------
  751. // PIE Group 8 - MUXed into CPU INT8
  752. // -----------------------------------------------------------
  753. // Connected to PIEIER8_1 (use MINT8 and MG81 masks):
  754. #if (G81PL != 0)
  755. __interrupt void I2CINT1A_ISR(void) // I2C-A
  756. {
  757. // Set interrupt priority:
  758. volatile Uint16 TempPIEIER = PieCtrlRegs.PIEIER8.all;
  759. IER |= M_INT8;
  760. IER &= MINT8; // Set "global" priority
  761. PieCtrlRegs.PIEIER8.all &= MG81; // Set "group" priority
  762. PieCtrlRegs.PIEACK.all = 0xFFFF; // Enable PIE interrupts
  763. EINT;
  764. // Insert ISR Code here.......
  765. // Restore registers saved:
  766. DINT;
  767. PieCtrlRegs.PIEIER8.all = TempPIEIER;
  768. // Next two lines for debug only to halt the processor here
  769. // Remove after inserting ISR Code
  770. __asm (" ESTOP0");
  771. for(;;);
  772. }
  773. #endif
  774. // Connected to PIEIER8_2 (use MINT8 and MG82 masks):
  775. #if (G82PL != 0)
  776. __interrupt void I2CINT2A_ISR(void) // I2C-A
  777. {
  778. // Set interrupt priority:
  779. volatile Uint16 TempPIEIER = PieCtrlRegs.PIEIER8.all;
  780. IER |= M_INT8;
  781. IER &= MINT8; // Set "global" priority
  782. PieCtrlRegs.PIEIER8.all &= MG82; // Set "group" priority
  783. PieCtrlRegs.PIEACK.all = 0xFFFF; // Enable PIE interrupts
  784. EINT;
  785. // Insert ISR Code here.......
  786. // Restore registers saved:
  787. DINT;
  788. PieCtrlRegs.PIEIER8.all = TempPIEIER;
  789. // Next two lines for debug only to halt the processor here
  790. // Remove after inserting ISR Code
  791. __asm (" ESTOP0");
  792. for(;;);
  793. }
  794. #endif
  795. // Connected to PIEIER8_5 (use MINT8 and MG85 masks):
  796. #if (G85PL != 0)
  797. __interrupt void SCIRXINTC_ISR(void) // SCI-C
  798. {
  799. // Set interrupt priority:
  800. volatile Uint16 TempPIEIER = PieCtrlRegs.PIEIER8.all;
  801. IER |= M_INT8;
  802. IER &= MINT8; // Set "global" priority
  803. PieCtrlRegs.PIEIER8.all &= MG85; // Set "group" priority
  804. PieCtrlRegs.PIEACK.all = 0xFFFF; // Enable PIE interrupts
  805. EINT;
  806. // Insert ISR Code here.......
  807. // Restore registers saved:
  808. DINT;
  809. PieCtrlRegs.PIEIER8.all = TempPIEIER;
  810. // Next two lines for debug only to halt the processor here
  811. // Remove after inserting ISR Code
  812. __asm (" ESTOP0");
  813. for(;;);
  814. }
  815. #endif
  816. // Connected to PIEIER8_6 (use MINT8 and MG86 masks):
  817. #if (G86PL != 0)
  818. __interrupt void SCITXINTC_ISR(void) // SCI-C
  819. {
  820. // Set interrupt priority:
  821. volatile Uint16 TempPIEIER = PieCtrlRegs.PIEIER8.all;
  822. IER |= M_INT8;
  823. IER &= MINT8; // Set "global" priority
  824. PieCtrlRegs.PIEIER8.all &= MG86; // Set "group" priority
  825. PieCtrlRegs.PIEACK.all = 0xFFFF; // Enable PIE interrupts
  826. EINT;
  827. // Insert ISR Code here.......
  828. // Restore registers saved:
  829. DINT;
  830. PieCtrlRegs.PIEIER8.all = TempPIEIER;
  831. // Next two lines for debug only to halt the processor here
  832. // Remove after inserting ISR Code
  833. __asm (" ESTOP0");
  834. for(;;);
  835. }
  836. #endif
  837. // -----------------------------------------------------------
  838. // PIE Group 9 - MUXed into CPU INT9
  839. // -----------------------------------------------------------
  840. // Connected to PIEIER9_1 (use MINT9 and MG91 masks):
  841. #if (G91PL != 0)
  842. __interrupt void SCIRXINTA_ISR(void) // SCI-A
  843. {
  844. // Set interrupt priority:
  845. volatile Uint16 TempPIEIER = PieCtrlRegs.PIEIER9.all;
  846. IER |= M_INT9;
  847. IER &= MINT9; // Set "global" priority
  848. PieCtrlRegs.PIEIER9.all &= MG91; // Set "group" priority
  849. PieCtrlRegs.PIEACK.all = 0xFFFF; // Enable PIE interrupts
  850. EINT;
  851. // Insert ISR Code here.......
  852. // Restore registers saved:
  853. DINT;
  854. PieCtrlRegs.PIEIER9.all = TempPIEIER;
  855. // Next two lines for debug only to halt the processor here
  856. // Remove after inserting ISR Code
  857. __asm (" ESTOP0");
  858. for(;;);
  859. }
  860. #endif
  861. // Connected to PIEIER9_2 (use MINT9 and MG92 masks):
  862. #if (G92PL != 0)
  863. __interrupt void SCITXINTA_ISR(void) // SCI-A
  864. {
  865. // Set interrupt priority:
  866. volatile Uint16 TempPIEIER = PieCtrlRegs.PIEIER9.all;
  867. IER |= M_INT9;
  868. IER &= MINT9; // Set "global" priority
  869. PieCtrlRegs.PIEIER9.all &= MG92; // Set "group" priority
  870. PieCtrlRegs.PIEACK.all = 0xFFFF; // Enable PIE interrupts
  871. EINT;
  872. // Insert ISR Code here.......
  873. // Restore registers saved:
  874. DINT;
  875. PieCtrlRegs.PIEIER9.all = TempPIEIER;
  876. // Next two lines for debug only to halt the processor here
  877. // Remove after inserting ISR Code
  878. __asm (" ESTOP0");
  879. for(;;);
  880. }
  881. #endif
  882. // Connected to PIEIER9_3 (use MINT9 and MG93 masks):
  883. #if (G93PL != 0)
  884. __interrupt void SCIRXINTB_ISR(void) // SCI-B
  885. {
  886. // Set interrupt priority:
  887. volatile Uint16 TempPIEIER = PieCtrlRegs.PIEIER9.all;
  888. IER |= M_INT9;
  889. IER &= MINT9; // Set "global" priority
  890. PieCtrlRegs.PIEIER9.all &= MG93; // Set "group" priority
  891. PieCtrlRegs.PIEACK.all = 0xFFFF; // Enable PIE interrupts
  892. EINT;
  893. // Insert ISR Code here.......
  894. // Restore registers saved:
  895. DINT;
  896. PieCtrlRegs.PIEIER9.all = TempPIEIER;
  897. // Next two lines for debug only to halt the processor here
  898. // Remove after inserting ISR Code
  899. __asm (" ESTOP0");
  900. for(;;);
  901. }
  902. #endif
  903. // Connected to PIEIER9_4 (use MINT9 and MG94 masks):
  904. #if (G94PL != 0)
  905. __interrupt void SCITXINTB_ISR(void) // SCI-B
  906. {
  907. // Set interrupt priority:
  908. volatile Uint16 TempPIEIER = PieCtrlRegs.PIEIER9.all;
  909. IER |= M_INT9;
  910. IER &= MINT9; // Set "global" priority
  911. PieCtrlRegs.PIEIER9.all &= MG94; // Set "group" priority
  912. PieCtrlRegs.PIEACK.all = 0xFFFF; // Enable PIE interrupts
  913. EINT;
  914. // Insert ISR Code here.......
  915. // Restore registers saved:
  916. DINT;
  917. PieCtrlRegs.PIEIER9.all = TempPIEIER;
  918. // Next two lines for debug only to halt the processor here
  919. // Remove after inserting ISR Code
  920. __asm (" ESTOP0");
  921. for(;;);
  922. }
  923. #endif
  924. // Connected to PIEIER9_5 (use MINT9 and MG95 masks):
  925. #if (G95PL != 0)
  926. __interrupt void ECAN0INTA_ISR(void) // eCAN-A
  927. {
  928. // Set interrupt priority:
  929. volatile Uint16 TempPIEIER = PieCtrlRegs.PIEIER9.all;
  930. IER |= M_INT9;
  931. IER &= MINT9; // Set "global" priority
  932. PieCtrlRegs.PIEIER9.all &= MG95; // Set "group" priority
  933. PieCtrlRegs.PIEACK.all = 0xFFFF; // Enable PIE interrupts
  934. EINT;
  935. // Insert ISR Code here.......
  936. // Restore registers saved:
  937. DINT;
  938. PieCtrlRegs.PIEIER9.all = TempPIEIER;
  939. // Next two lines for debug only to halt the processor here
  940. // Remove after inserting ISR Code
  941. __asm (" ESTOP0");
  942. for(;;);
  943. }
  944. #endif
  945. // Connected to PIEIER9_6 (use MINT9 and MG96 masks):
  946. #if (G96PL != 0)
  947. __interrupt void ECAN1INTA_ISR(void) // eCAN-A
  948. {
  949. // Set interrupt priority:
  950. volatile Uint16 TempPIEIER = PieCtrlRegs.PIEIER9.all;
  951. IER |= M_INT9;
  952. IER &= MINT9; // Set "global" priority
  953. PieCtrlRegs.PIEIER9.all &= MG96; // Set "group" priority
  954. PieCtrlRegs.PIEACK.all = 0xFFFF; // Enable PIE interrupts
  955. EINT;
  956. // Insert ISR Code here.......
  957. // Restore registers saved:
  958. DINT;
  959. PieCtrlRegs.PIEIER9.all = TempPIEIER;
  960. // Next two lines for debug only to halt the processor here
  961. // Remove after inserting ISR Code
  962. __asm (" ESTOP0");
  963. for(;;);
  964. }
  965. #endif
  966. // -----------------------------------------------------------
  967. // PIE Group 10 - MUXed into CPU INT10
  968. // -----------------------------------------------------------
  969. /* Uncomment the below if ADCINT1 and ADCINT2 in the 10.1 and 10.2
  970. PIE interrupt spaces are enabled. Then comment out the equivalent
  971. 1.1 and 1.2 interrupt service routines. */
  972. /*
  973. // Connected to PIEIER10_1 (use MINT10 and MG101 masks):
  974. #if (G101PL != 0)
  975. __interrupt void ADCINT1_ISR(void) // ADC
  976. {
  977. // Set interrupt priority:
  978. volatile Uint16 TempPIEIER = PieCtrlRegs.PIEIER10.all;
  979. IER |= MINT10; // Set "global" priority
  980. PieCtrlRegs.PIEIER10.all &= MG101; // Set "group" priority
  981. PieCtrlRegs.PIEACK.all = 0xFFFF; // Enable PIE interrupts
  982. EINT;
  983. // Restore registers saved:
  984. DINT;
  985. PieCtrlRegs.PIEIER10.all = TempPIEIER;
  986. // Next two lines for debug only to halt the processor here
  987. // Remove after inserting ISR Code
  988. __asm (" ESTOP0");
  989. for(;;);
  990. }
  991. #endif
  992. // Connected to PIEIER10_2 (use MINT10 and MG102 masks):
  993. #if (G102PL != 0)
  994. __interrupt void ADCINT2_ISR(void) // ADC
  995. {
  996. // Set interrupt priority:
  997. volatile Uint16 TempPIEIER = PieCtrlRegs.PIEIER10.all;
  998. IER |= MINT10; // Set "global" priority
  999. PieCtrlRegs.PIEIER10.all &= MG102; // Set "group" priority
  1000. PieCtrlRegs.PIEACK.all = 0xFFFF; // Enable PIE interrupts
  1001. EINT;
  1002. // Restore registers saved:
  1003. DINT;
  1004. PieCtrlRegs.PIEIER10.all = TempPIEIER;
  1005. // Next two lines for debug only to halt the processor here
  1006. // Remove after inserting ISR Code
  1007. __asm (" ESTOP0");
  1008. for(;;);
  1009. }
  1010. #endif
  1011. */
  1012. // Connected to PIEIER10_3 (use MINT10 and MG103 masks):
  1013. #if (G103PL != 0)
  1014. __interrupt void ADCINT3_ISR(void) // ADC
  1015. {
  1016. // Set interrupt priority:
  1017. volatile Uint16 TempPIEIER = PieCtrlRegs.PIEIER10.all;
  1018. IER |= MINT10; // Set "global" priority
  1019. PieCtrlRegs.PIEIER10.all &= MG103; // Set "group" priority
  1020. PieCtrlRegs.PIEACK.all = 0xFFFF; // Enable PIE interrupts
  1021. EINT;
  1022. // Restore registers saved:
  1023. DINT;
  1024. PieCtrlRegs.PIEIER10.all = TempPIEIER;
  1025. // Next two lines for debug only to halt the processor here
  1026. // Remove after inserting ISR Code
  1027. __asm (" ESTOP0");
  1028. for(;;);
  1029. }
  1030. #endif
  1031. // Connected to PIEIER10_4 (use MINT10 and MG104 masks):
  1032. #if (G104PL != 0)
  1033. __interrupt void ADCINT4_ISR(void) // ADC
  1034. {
  1035. // Set interrupt priority:
  1036. volatile Uint16 TempPIEIER = PieCtrlRegs.PIEIER10.all;
  1037. IER |= MINT10; // Set "global" priority
  1038. PieCtrlRegs.PIEIER10.all &= MG104; // Set "group" priority
  1039. PieCtrlRegs.PIEACK.all = 0xFFFF; // Enable PIE interrupts
  1040. EINT;
  1041. // Restore registers saved:
  1042. DINT;
  1043. PieCtrlRegs.PIEIER10.all = TempPIEIER;
  1044. // Next two lines for debug only to halt the processor here
  1045. // Remove after inserting ISR Code
  1046. __asm (" ESTOP0");
  1047. for(;;);
  1048. }
  1049. #endif
  1050. // Connected to PIEIER10_5 (use MINT10 and MG105 masks):
  1051. #if (G105PL != 0)
  1052. __interrupt void ADCINT5_ISR(void) // ADC
  1053. {
  1054. // Set interrupt priority:
  1055. volatile Uint16 TempPIEIER = PieCtrlRegs.PIEIER10.all;
  1056. IER |= MINT10; // Set "global" priority
  1057. PieCtrlRegs.PIEIER10.all &= MG105; // Set "group" priority
  1058. PieCtrlRegs.PIEACK.all = 0xFFFF; // Enable PIE interrupts
  1059. EINT;
  1060. // Insert ISR Code here.......
  1061. // Restore registers saved:
  1062. DINT;
  1063. PieCtrlRegs.PIEIER10.all = TempPIEIER;
  1064. // Next two lines for debug only to halt the processor here
  1065. // Remove after inserting ISR Code
  1066. __asm (" ESTOP0");
  1067. for(;;);
  1068. }
  1069. #endif
  1070. // Connected to PIEIER10_6 (use MINT10 and MG106 masks):
  1071. #if (G106PL != 0)
  1072. __interrupt void ADCINT6_ISR(void) // ADC
  1073. {
  1074. // Set interrupt priority:
  1075. volatile Uint16 TempPIEIER = PieCtrlRegs.PIEIER10.all;
  1076. IER |= M_INT10;
  1077. IER &= MINT10; // Set "global" priority
  1078. PieCtrlRegs.PIEIER10.all &= MG106; // Set "group" priority
  1079. PieCtrlRegs.PIEACK.all = 0xFFFF; // Enable PIE interrupts
  1080. EINT;
  1081. // Insert ISR Code here.......
  1082. // Restore registers saved:
  1083. DINT;
  1084. PieCtrlRegs.PIEIER10.all = TempPIEIER;
  1085. // Next two lines for debug only to halt the processor here
  1086. // Remove after inserting ISR Code
  1087. __asm (" ESTOP0");
  1088. for(;;);
  1089. }
  1090. #endif
  1091. // Connected to PIEIER10_7 (use MINT10 and MG107 masks):
  1092. #if (G107PL != 0)
  1093. __interrupt void ADCINT7_ISR(void) // ADC
  1094. {
  1095. // Set interrupt priority:
  1096. volatile Uint16 TempPIEIER = PieCtrlRegs.PIEIER10.all;
  1097. IER |= M_INT10;
  1098. IER &= MINT10; // Set "global" priority
  1099. PieCtrlRegs.PIEIER10.all &= MG107; // Set "group" priority
  1100. PieCtrlRegs.PIEACK.all = 0xFFFF; // Enable PIE interrupts
  1101. EINT;
  1102. // Insert ISR Code here.......
  1103. // Restore registers saved:
  1104. DINT;
  1105. PieCtrlRegs.PIEIER10.all = TempPIEIER;
  1106. // Next two lines for debug only to halt the processor here
  1107. // Remove after inserting ISR Code
  1108. __asm (" ESTOP0");
  1109. for(;;);
  1110. }
  1111. #endif
  1112. // Connected to PIEIER10_8 (use MINT10 and MG108 masks):
  1113. #if (G108PL != 0)
  1114. __interrupt void ADCINT8_ISR(void) // ADC
  1115. {
  1116. // Set interrupt priority:
  1117. volatile Uint16 TempPIEIER = PieCtrlRegs.PIEIER10.all;
  1118. IER |= M_INT10;
  1119. IER &= MINT10; // Set "global" priority
  1120. PieCtrlRegs.PIEIER10.all &= MG108; // Set "group" priority
  1121. PieCtrlRegs.PIEACK.all = 0xFFFF; // Enable PIE interrupts
  1122. EINT;
  1123. // Insert ISR Code here.......
  1124. // Restore registers saved:
  1125. DINT;
  1126. PieCtrlRegs.PIEIER10.all = TempPIEIER;
  1127. // Next two lines for debug only to halt the processor here
  1128. // Remove after inserting ISR Code
  1129. __asm (" ESTOP0");
  1130. for(;;);
  1131. }
  1132. #endif
  1133. // -----------------------------------------------------------
  1134. // PIE Group 11 - MUXed into CPU INT11
  1135. // -----------------------------------------------------------
  1136. // Connected to PIEIER11_1 (use MINT11 and MG111 masks):
  1137. #if (G111PL != 0)
  1138. __interrupt void CLA1_INT1_ISR(void) // CLA1
  1139. {
  1140. // Set interrupt priority:
  1141. volatile Uint16 TempPIEIER = PieCtrlRegs.PIEIER11.all;
  1142. IER |= MINT11; // Set "global" priority
  1143. PieCtrlRegs.PIEIER11.all &= MG111; // Set "group" priority
  1144. PieCtrlRegs.PIEACK.all = 0xFFFF; // Enable PIE interrupts
  1145. EINT;
  1146. // Restore registers saved:
  1147. DINT;
  1148. PieCtrlRegs.PIEIER11.all = TempPIEIER;
  1149. // Next two lines for debug only to halt the processor here
  1150. // Remove after inserting ISR Code
  1151. __asm (" ESTOP0");
  1152. for(;;);
  1153. }
  1154. #endif
  1155. // Connected to PIEIER11_2 (use MINT11 and MG112 masks):
  1156. #if (G112PL != 0)
  1157. __interrupt void CLA1_INT2_ISR(void) // CLA1
  1158. {
  1159. // Set interrupt priority:
  1160. volatile Uint16 TempPIEIER = PieCtrlRegs.PIEIER11.all;
  1161. IER |= MINT11; // Set "global" priority
  1162. PieCtrlRegs.PIEIER11.all &= MG112; // Set "group" priority
  1163. PieCtrlRegs.PIEACK.all = 0xFFFF; // Enable PIE interrupts
  1164. EINT;
  1165. // Restore registers saved:
  1166. DINT;
  1167. PieCtrlRegs.PIEIER11.all = TempPIEIER;
  1168. // Next two lines for debug only to halt the processor here
  1169. // Remove after inserting ISR Code
  1170. __asm (" ESTOP0");
  1171. for(;;);
  1172. }
  1173. #endif
  1174. // Connected to PIEIER11_3 (use MINT11 and MG113 masks):
  1175. #if (G113PL != 0)
  1176. __interrupt void CLA1_INT3_ISR(void) // CLA1
  1177. {
  1178. // Set interrupt priority:
  1179. volatile Uint16 TempPIEIER = PieCtrlRegs.PIEIER11.all;
  1180. IER |= MINT11; // Set "global" priority
  1181. PieCtrlRegs.PIEIER11.all &= MG113; // Set "group" priority
  1182. PieCtrlRegs.PIEACK.all = 0xFFFF; // Enable PIE interrupts
  1183. EINT;
  1184. // Restore registers saved:
  1185. DINT;
  1186. PieCtrlRegs.PIEIER11.all = TempPIEIER;
  1187. // Next two lines for debug only to halt the processor here
  1188. // Remove after inserting ISR Code
  1189. __asm (" ESTOP0");
  1190. for(;;);
  1191. }
  1192. #endif
  1193. // Connected to PIEIER11_4 (use MINT11 and MG114 masks):
  1194. #if (G114PL != 0)
  1195. __interrupt void CLA1_INT4_ISR(void) // CLA1
  1196. {
  1197. // Set interrupt priority:
  1198. volatile Uint16 TempPIEIER = PieCtrlRegs.PIEIER11.all;
  1199. IER |= MINT11; // Set "global" priority
  1200. PieCtrlRegs.PIEIER11.all &= MG114; // Set "group" priority
  1201. PieCtrlRegs.PIEACK.all = 0xFFFF; // Enable PIE interrupts
  1202. EINT;
  1203. // Restore registers saved:
  1204. DINT;
  1205. PieCtrlRegs.PIEIER11.all = TempPIEIER;
  1206. // Next two lines for debug only to halt the processor here
  1207. // Remove after inserting ISR Code
  1208. __asm (" ESTOP0");
  1209. for(;;);
  1210. }
  1211. #endif
  1212. // Connected to PIEIER11_5 (use MINT11 and MG115 masks):
  1213. #if (G115PL != 0)
  1214. __interrupt void CLA1_INT5_ISR(void) // CLA1
  1215. {
  1216. // Set interrupt priority:
  1217. volatile Uint16 TempPIEIER = PieCtrlRegs.PIEIER11.all;
  1218. IER |= MINT11; // Set "global" priority
  1219. PieCtrlRegs.PIEIER11.all &= MG115; // Set "group" priority
  1220. PieCtrlRegs.PIEACK.all = 0xFFFF; // Enable PIE interrupts
  1221. EINT;
  1222. // Insert ISR Code here.......
  1223. // Restore registers saved:
  1224. DINT;
  1225. PieCtrlRegs.PIEIER11.all = TempPIEIER;
  1226. // Next two lines for debug only to halt the processor here
  1227. // Remove after inserting ISR Code
  1228. __asm (" ESTOP0");
  1229. for(;;);
  1230. }
  1231. #endif
  1232. // Connected to PIEIER11_6 (use MINT11 and MG116 masks):
  1233. #if (G116PL != 0)
  1234. __interrupt void CLA1_INT6_ISR(void) // CLA1
  1235. {
  1236. // Set interrupt priority:
  1237. volatile Uint16 TempPIEIER = PieCtrlRegs.PIEIER11.all;
  1238. IER |= M_INT11;
  1239. IER &= MINT11; // Set "global" priority
  1240. PieCtrlRegs.PIEIER11.all &= MG116; // Set "group" priority
  1241. PieCtrlRegs.PIEACK.all = 0xFFFF; // Enable PIE interrupts
  1242. EINT;
  1243. // Insert ISR Code here.......
  1244. // Restore registers saved:
  1245. DINT;
  1246. PieCtrlRegs.PIEIER11.all = TempPIEIER;
  1247. // Next two lines for debug only to halt the processor here
  1248. // Remove after inserting ISR Code
  1249. __asm (" ESTOP0");
  1250. for(;;);
  1251. }
  1252. #endif
  1253. // Connected to PIEIER11_7 (use MINT11 and MG117 masks):
  1254. #if (G117PL != 0)
  1255. __interrupt void CLA1_INT7_ISR(void) // CLA1
  1256. {
  1257. // Set interrupt priority:
  1258. volatile Uint16 TempPIEIER = PieCtrlRegs.PIEIER11.all;
  1259. IER |= M_INT11;
  1260. IER &= MINT11; // Set "global" priority
  1261. PieCtrlRegs.PIEIER11.all &= MG117; // Set "group" priority
  1262. PieCtrlRegs.PIEACK.all = 0xFFFF; // Enable PIE interrupts
  1263. EINT;
  1264. // Insert ISR Code here.......
  1265. // Restore registers saved:
  1266. DINT;
  1267. PieCtrlRegs.PIEIER11.all = TempPIEIER;
  1268. // Next two lines for debug only to halt the processor here
  1269. // Remove after inserting ISR Code
  1270. __asm (" ESTOP0");
  1271. for(;;);
  1272. }
  1273. #endif
  1274. // Connected to PIEIER11_8 (use MINT11 and MG118 masks):
  1275. #if (G118PL != 0)
  1276. __interrupt void CLA1_INT8_ISR(void) // CLA1
  1277. {
  1278. // Set interrupt priority:
  1279. volatile Uint16 TempPIEIER = PieCtrlRegs.PIEIER11.all;
  1280. IER |= M_INT11;
  1281. IER &= MINT11; // Set "global" priority
  1282. PieCtrlRegs.PIEIER11.all &= MG118; // Set "group" priority
  1283. PieCtrlRegs.PIEACK.all = 0xFFFF; // Enable PIE interrupts
  1284. EINT;
  1285. // Insert ISR Code here.......
  1286. // Restore registers saved:
  1287. DINT;
  1288. PieCtrlRegs.PIEIER11.all = TempPIEIER;
  1289. // Next two lines for debug only to halt the processor here
  1290. // Remove after inserting ISR Code
  1291. __asm (" ESTOP0");
  1292. for(;;);
  1293. }
  1294. #endif
  1295. // -----------------------------------------------------------
  1296. // PIE Group 12 - MUXed into CPU INT12
  1297. // -----------------------------------------------------------
  1298. // Connected to PIEIER12_1 (use MINT12 and MG121 masks):
  1299. #if (G121PL != 0)
  1300. __interrupt void XINT3_ISR(void) // External interrupt
  1301. {
  1302. // Set interrupt priority:
  1303. volatile Uint16 TempPIEIER = PieCtrlRegs.PIEIER12.all;
  1304. IER |= M_INT12;
  1305. IER &= MINT12; // Set "global" priority
  1306. PieCtrlRegs.PIEIER12.all &= MG121; // Set "group" priority
  1307. PieCtrlRegs.PIEACK.all = 0xFFFF; // Enable PIE interrupts
  1308. EINT;
  1309. // Insert ISR Code here.......
  1310. // Restore registers saved:
  1311. DINT;
  1312. PieCtrlRegs.PIEIER12.all = TempPIEIER;
  1313. // Next two lines for debug only to halt the processor here
  1314. // Remove after inserting ISR Code
  1315. __asm (" ESTOP0");
  1316. for(;;);
  1317. }
  1318. #endif
  1319. // Connected to PIEIER12_7 (use MINT12 and MG127 masks):
  1320. #if (G127PL != 0)
  1321. __interrupt void LVF_ISR(void) // CLA1
  1322. {
  1323. // Set interrupt priority:
  1324. volatile Uint16 TempPIEIER = PieCtrlRegs.PIEIER12.all;
  1325. IER |= M_INT12;
  1326. IER &= MINT12; // Set "global" priority
  1327. PieCtrlRegs.PIEIER12.all &= MG127; // Set "group" priority
  1328. PieCtrlRegs.PIEACK.all = 0xFFFF; // Enable PIE interrupts
  1329. EINT;
  1330. // Insert ISR Code here.......
  1331. // Restore registers saved:
  1332. DINT;
  1333. PieCtrlRegs.PIEIER12.all = TempPIEIER;
  1334. // Next two lines for debug only to halt the processor here
  1335. // Remove after inserting ISR Code
  1336. __asm (" ESTOP0");
  1337. for(;;);
  1338. }
  1339. #endif
  1340. // Connected to PIEIER12_8 (use MINT12 and MG128 masks):
  1341. #if (G128PL != 0)
  1342. __interrupt void LUF_ISR(void) // CLA1
  1343. {
  1344. // Set interrupt priority:
  1345. volatile Uint16 TempPIEIER = PieCtrlRegs.PIEIER12.all;
  1346. IER |= M_INT12;
  1347. IER &= MINT12; // Set "global" priority
  1348. PieCtrlRegs.PIEIER12.all &= MG128; // Set "group" priority
  1349. PieCtrlRegs.PIEACK.all = 0xFFFF; // Enable PIE interrupts
  1350. EINT;
  1351. // Insert ISR Code here.......
  1352. // Restore registers saved:
  1353. DINT;
  1354. PieCtrlRegs.PIEIER12.all = TempPIEIER;
  1355. // Next two lines for debug only to halt the processor here
  1356. // Remove after inserting ISR Code
  1357. __asm (" ESTOP0");
  1358. for(;;);
  1359. }
  1360. #endif
  1361. //---------------------------------------------------------------------------
  1362. // Catch All Default ISRs:
  1363. //
  1364. __interrupt void PIE_RESERVED(void) // Reserved space. For test.
  1365. {
  1366. __asm (" ESTOP0");
  1367. for(;;);
  1368. }
  1369. __interrupt void INT_NOTUSED_ISR(void) // Reserved space. For test.
  1370. {
  1371. __asm (" ESTOP0");
  1372. for(;;);
  1373. }
  1374. __interrupt void rsvd_ISR(void) // For test
  1375. {
  1376. __asm (" ESTOP0");
  1377. for(;;);
  1378. }
  1379. //===========================================================================
  1380. // No more.
  1381. //===========================================================================