lpc13xx.pp 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691
  1. {$IFNDEF FPC_DOTTEDUNITS}
  2. unit lpc13xx;
  3. {$ENDIF FPC_DOTTEDUNITS}
  4. {$goto on}
  5. {$define lpc13xx}
  6. interface
  7. {$PACKRECORDS 2}
  8. const
  9. //------------------------- Cortex-M3 Processor Exceptions Numbers -------------------------
  10. Reset_IRQn = -15; // 1 Reset Vector, invoked on Power up and warm reset
  11. NonMaskableInt_IRQn = -14; // 2 Non Maskable Interrupt
  12. MemoryManagement_IRQn = -12; // 4 Cortex-M3 Memory Management Interrupt
  13. BusFault_IRQn = -11; // 5 Cortex-M3 Bus Fault Interrupt
  14. UsageFault_IRQn = -10; // 6 Cortex-M3 Usage Fault Interrupt
  15. SVCall_IRQn = -5; // 11 Cortex-M3 SV Call Interrupt
  16. DebugMonitor_IRQn = -4; // 12 Cortex-M3 Debug Monitor Interrupt
  17. PendSV_IRQn = -2; // 14 Cortex-M3 Pend SV Interrupt
  18. SysTick_IRQn = -1; // 15 Cortex-M3 System Tick Interrupt
  19. //------------------------- LPC13xx Specific Interrupt Numbers -------------------------
  20. WAKEUP0_IRQn = 0; // All I/O pins can be used as wakeup source.
  21. WAKEUP1_IRQn = 1; // There are 40 pins in total for LPC17xx
  22. WAKEUP2_IRQn = 2;
  23. WAKEUP3_IRQn = 3;
  24. WAKEUP4_IRQn = 4;
  25. WAKEUP5_IRQn = 5;
  26. WAKEUP6_IRQn = 6;
  27. WAKEUP7_IRQn = 7;
  28. WAKEUP8_IRQn = 8;
  29. WAKEUP9_IRQn = 9;
  30. WAKEUP10_IRQn = 10;
  31. WAKEUP11_IRQn = 11;
  32. WAKEUP12_IRQn = 12;
  33. WAKEUP13_IRQn = 13;
  34. WAKEUP14_IRQn = 14;
  35. WAKEUP15_IRQn = 15;
  36. WAKEUP16_IRQn = 16;
  37. WAKEUP17_IRQn = 17;
  38. WAKEUP18_IRQn = 18;
  39. WAKEUP19_IRQn = 19;
  40. WAKEUP20_IRQn = 20;
  41. WAKEUP21_IRQn = 21;
  42. WAKEUP22_IRQn = 22;
  43. WAKEUP23_IRQn = 23;
  44. WAKEUP24_IRQn = 24;
  45. WAKEUP25_IRQn = 25;
  46. WAKEUP26_IRQn = 26;
  47. WAKEUP27_IRQn = 27;
  48. WAKEUP28_IRQn = 28;
  49. WAKEUP29_IRQn = 29;
  50. WAKEUP30_IRQn = 30;
  51. WAKEUP31_IRQn = 31;
  52. WAKEUP32_IRQn = 32;
  53. WAKEUP33_IRQn = 33;
  54. WAKEUP34_IRQn = 34;
  55. WAKEUP35_IRQn = 35;
  56. WAKEUP36_IRQn = 36;
  57. WAKEUP37_IRQn = 37;
  58. WAKEUP38_IRQn = 38;
  59. WAKEUP39_IRQn = 39;
  60. I2C_IRQn = 40; // I2C Interrupt
  61. TIMER_16_0_IRQn = 41; // 16-bit Timer0 Interrupt
  62. TIMER_16_1_IRQn = 42; // 16-bit Timer1 Interrupt
  63. TIMER_32_0_IRQn = 43; // 32-bit Timer0 Interrupt
  64. TIMER_32_1_IRQn = 44; // 32-bit Timer1 Interrupt
  65. SSP_IRQn = 45; // SSP0 Interrupt - original name
  66. SSP0_IRQn = 45; // SSP0 Interrupt - new name
  67. UART_IRQn = 46; // UART Interrupt
  68. USB_IRQn = 47; // USB Regular Interrupt
  69. USB_FIQn = 48; // USB Fast Interrupt
  70. ADC_IRQn = 49; // A/D Converter Interrupt
  71. WDT_IRQn = 50; // Watchdog timer Interrupt
  72. BOD_IRQn = 51; // Brown Out Detect(BOD) Interrupt
  73. RESERVED_IRQn = 52; // Reserved Interrupt
  74. EINT3_IRQn = 53; // External Interrupt 3 Interrupt
  75. EINT2_IRQn = 54; // External Interrupt 2 Interrupt
  76. EINT1_IRQn = 55; // External Interrupt 1 Interrupt
  77. EINT0_IRQn = 56; // External Interrupt 0 Interrupt
  78. SSP1_IRQn = 57; // SSP1 Interrupt
  79. { ------------- System Control (SYSCON) ------------- }
  80. type
  81. TSYSCON_Registers = record
  82. SYSMEMREMAP : longword;
  83. PRESETCTRL : longword;
  84. SYSPLLCTRL : longword;
  85. SYSPLLSTAT : longword;
  86. USBPLLCTRL : longword;
  87. USBPLLSTAT : longword;
  88. RESERVED0 : array [0 .. 1] of longword;
  89. SYSOSCCTRL : longword;
  90. WDTOSCCTRL : longword;
  91. IRCCTRL : longword;
  92. RESERVED1 : array [0 .. 0] of longword;
  93. SYSRESSTAT : longword;
  94. RESERVED2 : array [0 .. 2] of longword;
  95. SYSPLLCLKSEL : longword;
  96. SYSPLLCLKUEN : longword;
  97. USBPLLCLKSEL : longword;
  98. USBPLLCLKUEN : longword;
  99. RESERVED3 : array [0 .. 7] of longword;
  100. MAINCLKSEL : longword;
  101. MAINCLKUEN : longword;
  102. SYSAHBCLKDIV : longword;
  103. RESERVED4 : array [0 .. 0] of longword;
  104. SYSAHBCLKCTRL: longword;
  105. RESERVED5 : array [0 .. 3] of longword;
  106. SSP0CLKDIV : longword;
  107. UARTCLKDIV : longword;
  108. SSP1CLKDIV : longword;
  109. RESERVED6 : array [0 .. 2] of longword;
  110. TRACECLKDIV : longword;
  111. SYSTICKCLKDIV: longword;
  112. RESERVED7 : array [0 .. 2] of longword;
  113. USBCLKSEL : longword;
  114. USBCLKUEN : longword;
  115. USBCLKDIV : longword;
  116. RESERVED8 : array [0 .. 0] of longword;
  117. WDTCLKSEL : longword;
  118. WDTCLKUEN : longword;
  119. WDTCLKDIV : longword;
  120. RESERVED9 : array [0 .. 0] of longword;
  121. CLKOUTCLKSEL : longword;
  122. CLKOUTUEN : longword;
  123. CLKOUTDIV : longword;
  124. RESERVED10 : array [0 .. 4] of longword;
  125. PIOPORCAP0 : longword;
  126. PIOPORCAP1 : longword;
  127. RESERVED11 : array [0 .. 17] of longword;
  128. BODCTRL : longword;
  129. RESERVED12 : array [0 .. 0] of longword;
  130. SYSTCKCAL : longword;
  131. RESERVED13 : array [0 .. 40] of longword;
  132. STARTAPRP0 : longword;
  133. STARTERP0 : longword;
  134. STARTRSRP0CLR: longword;
  135. STARTSRP0 : longword;
  136. STARTAPRP1 : longword;
  137. STARTERP1 : longword;
  138. STARTRSRP1CLR: longword;
  139. STARTSRP1 : longword;
  140. RESERVED14 : array [0 .. 3] of longword;
  141. PDSLEEPCFG : longword;
  142. PDAWAKECFG : longword;
  143. PDRUNCFG : longword;
  144. RESERVED15 : array [0 .. 109] of longword;
  145. DEVICE_ID : longword;
  146. end;
  147. { ------------- Pin Connect Block (IOCON) ------------- }
  148. TIOCON_Registers = record
  149. PIO2_6 : longword;
  150. RESERVED0 : longword;
  151. PIO2_0 : longword;
  152. RESET_PIO0_0 : longword;
  153. PIO0_1 : longword;
  154. PIO1_8 : longword;
  155. RESERVED1 : longword;
  156. PIO0_2 : longword;
  157. PIO2_7 : longword;
  158. PIO2_8 : longword;
  159. PIO2_1 : longword;
  160. PIO0_3 : longword;
  161. PIO0_4 : longword;
  162. PIO0_5 : longword;
  163. PIO1_9 : longword;
  164. PIO3_4 : longword;
  165. PIO2_4 : longword;
  166. PIO2_5 : longword;
  167. PIO3_5 : longword;
  168. PIO0_6 : longword;
  169. PIO0_7 : longword;
  170. PIO2_9 : longword;
  171. PIO2_10 : longword;
  172. PIO2_2 : longword;
  173. PIO0_8 : longword;
  174. PIO0_9 : longword;
  175. SWCLK_PIO0_10: longword;
  176. PIO1_10 : longword;
  177. PIO2_11 : longword;
  178. R_PIO0_11 : longword;
  179. R_PIO1_0 : longword;
  180. R_PIO1_1 : longword;
  181. R_PIO1_2 : longword;
  182. PIO3_0 : longword;
  183. PIO3_1 : longword;
  184. PIO2_3 : longword;
  185. SWDIO_PIO1_3 : longword;
  186. PIO1_4 : longword;
  187. PIO1_11 : longword;
  188. PIO3_2 : longword;
  189. PIO1_5 : longword;
  190. PIO1_6 : longword;
  191. PIO1_7 : longword;
  192. PIO3_3 : longword;
  193. SCK_LOC : longword;
  194. DSR_LOC : longword;
  195. DCD_LOC : longword;
  196. RI_LOC : longword;
  197. end;
  198. { ------------- Power Management Unit (PMU) ------------- }
  199. TPMU_Registers = record
  200. PCON : longword;
  201. GPREG0: longword;
  202. GPREG1: longword;
  203. GPREG2: longword;
  204. GPREG3: longword;
  205. end;
  206. { ------------- General Purpose Input/Output (GPIO) ------------- }
  207. TGPIO_Registers = record
  208. MASKED_ACCESS: array [0 .. 4095] of longword;
  209. RESERVED1 : array [0 .. 4095] of longword;
  210. DIR : longword;
  211. IS : longword;
  212. IBE : longword;
  213. IEV : longword;
  214. IE : longword;
  215. RIS : longword;
  216. MIS : longword;
  217. IC : longword;
  218. end;
  219. { ------------- Timer (TMR) ------------- }
  220. TTMR_Registers = record
  221. IR : longword;
  222. TCR : longword;
  223. TC : longword;
  224. PR : longword;
  225. PC : longword;
  226. MCR : longword;
  227. MR0 : longword;
  228. MR1 : longword;
  229. MR2 : longword;
  230. MR3 : longword;
  231. CCR : longword;
  232. CR0 : longword;
  233. RESERVED1: array [0 .. 2] of longword;
  234. EMR : longword;
  235. RESERVED2: array [0 .. 11] of longword;
  236. CTCR : longword;
  237. PWMC : longword;
  238. end;
  239. { ------------- Universal Asynchronous Receiver Transmitter (UART) ------------- }
  240. TUART_Registers = record
  241. DLL : longword;
  242. DLM : longword;
  243. FCR : longword;
  244. LCR : longword;
  245. MCR : longword;
  246. LSR : longword;
  247. MSR : longword;
  248. SCR : longword;
  249. ACR : longword;
  250. ICR : longword;
  251. FDR : longword;
  252. RESERVED0: longword;
  253. TER : longword;
  254. RESERVED1: array [0 .. 5] of longword;
  255. RS485CTRL: longword;
  256. ADRMATCH : longword;
  257. RS485DLY : longword;
  258. FIFOLVL : longword;
  259. end;
  260. { ------------- Synchronous Serial Communication (SSP) ------------- }
  261. TSSP_Registers = record
  262. CR0 : longword;
  263. CR1 : longword;
  264. DR : longword;
  265. SR : longword;
  266. CPSR: longword;
  267. IMSC: longword;
  268. RIS : longword;
  269. MIS : longword;
  270. ICR : longword;
  271. end;
  272. { ------------- Inter-Integrated Circuit (I2C) ------------- }
  273. TI2C_Registers = record
  274. CONSET : longword;
  275. STAT : longword;
  276. DAT : longword;
  277. ADR0 : longword;
  278. SCLH : longword;
  279. SCLL : longword;
  280. CONCLR : longword;
  281. MMCTRL : longword;
  282. ADR1 : longword;
  283. ADR2 : longword;
  284. ADR3 : longword;
  285. DATA_BUFFER: longword;
  286. MASK0 : longword;
  287. MASK1 : longword;
  288. MASK2 : longword;
  289. MASK3 : longword;
  290. end;
  291. { ------------- Watchdog Timer (WDT) ------------- }
  292. TWDT_Registers = record
  293. _MOD : longword;
  294. TC : longword;
  295. FEED : longword;
  296. TV : longword;
  297. RESERVED0: longword;
  298. WARNINT : longword;
  299. WINDOW : longword;
  300. end;
  301. { ------------- Analog-to-Digital Converter (ADC) ------------- }
  302. TADC_Registers = record
  303. CR : longword;
  304. GDR : longword;
  305. RESERVED0: longword;
  306. INTEN : longword;
  307. DR : array [0 .. 7] of longword;
  308. STAT : longword;
  309. end;
  310. { ------------- Universal Serial Bus (USB) ------------- }
  311. TUSB_Registers = record
  312. DevIntSt : longword;
  313. DevIntEn : longword;
  314. DevIntClr: longword;
  315. DevIntSet: longword;
  316. CmdCode : longword;
  317. CmdData : longword;
  318. RxData : longword;
  319. TxData : longword;
  320. RxPLen : longword;
  321. TxPLen : longword;
  322. Ctrl : longword;
  323. DevFIQSel: longword;
  324. end;
  325. { **************************************************************************** }
  326. { Peripheral memory map }
  327. { **************************************************************************** }
  328. const
  329. LPC_FLASH_BASE = $00000000;
  330. LPC_RAM_BASE = $10000000;
  331. LPC_APB0_BASE = $40000000;
  332. LPC_AHB_BASE = $50000000;
  333. { APB0 peripherals }
  334. LPC_I2C_BASE = LPC_APB0_BASE + $00000;
  335. LPC_WDT_BASE = LPC_APB0_BASE + $04000;
  336. LPC_UART_BASE = LPC_APB0_BASE + $08000;
  337. LPC_CT16B0_BASE = LPC_APB0_BASE + $0C000;
  338. LPC_CT16B1_BASE = LPC_APB0_BASE + $10000;
  339. LPC_CT32B0_BASE = LPC_APB0_BASE + $14000;
  340. LPC_CT32B1_BASE = LPC_APB0_BASE + $18000;
  341. LPC_ADC_BASE = LPC_APB0_BASE + $1C000;
  342. LPC_USB_BASE = LPC_APB0_BASE + $20000;
  343. LPC_PMU_BASE = LPC_APB0_BASE + $38000;
  344. LPC_SSP0_BASE = LPC_APB0_BASE + $40000;
  345. LPC_IOCON_BASE = LPC_APB0_BASE + $44000;
  346. LPC_SYSCON_BASE = LPC_APB0_BASE + $48000;
  347. LPC_SSP1_BASE = LPC_APB0_BASE + $58000;
  348. { AHB peripherals }
  349. LPC_GPIO0_BASE = LPC_AHB_BASE + $00000;
  350. LPC_GPIO1_BASE = LPC_AHB_BASE + $10000;
  351. LPC_GPIO2_BASE = LPC_AHB_BASE + $20000;
  352. LPC_GPIO3_BASE = LPC_AHB_BASE + $30000;
  353. { **************************************************************************** }
  354. { Peripheral declaration }
  355. { **************************************************************************** }
  356. var
  357. LPC_I2C : TI2C_Registers absolute(LPC_I2C_BASE);
  358. LPC_WDT : TWDT_Registers absolute(LPC_WDT_BASE);
  359. LPC_UART : TUART_Registers absolute(LPC_UART_BASE);
  360. LPC_CT16B0 : TTMR_Registers absolute(LPC_CT16B0_BASE);
  361. LPC_CT16B1 : TTMR_Registers absolute(LPC_CT16B1_BASE);
  362. LPC_CT32B0 : TTMR_Registers absolute(LPC_CT32B0_BASE);
  363. LPC_CT23B1 : TTMR_Registers absolute(LPC_CT32B1_BASE);
  364. LPC_ADC : TADC_Registers absolute(LPC_ADC_BASE);
  365. LPC_USB : TUSB_Registers absolute(LPC_USB_BASE);
  366. LPC_PMU : TPMU_Registers absolute(LPC_PMU_BASE);
  367. LPC_SSP0 : TSSP_Registers absolute(LPC_SSP0_BASE);
  368. LPC_IOCON : TIOCON_Registers absolute(LPC_IOCON_BASE);
  369. LPC_SYSCON : TSYSCON_Registers absolute(LPC_SYSCON_BASE);
  370. LPC_SSP1 : TSSP_Registers absolute(LPC_SSP0_BASE);
  371. LPC_GPIO0 : TGPIO_Registers absolute(LPC_GPIO0_BASE);
  372. LPC_GPIO1 : TGPIO_Registers absolute(LPC_GPIO1_BASE);
  373. LPC_GPIO2 : TGPIO_Registers absolute(LPC_GPIO2_BASE);
  374. LPC_GPIO3 : TGPIO_Registers absolute(LPC_GPIO3_BASE);
  375. implementation
  376. procedure NonMaskableInt_interrupt; external name 'NonMaskableInt_interrupt';
  377. procedure MemoryManagement_interrupt; external name 'MemoryManagement_interrupt';
  378. procedure BusFault_interrupt; external name 'BusFault_interrupt';
  379. procedure UsageFault_interrupt; external name 'UsageFault_interrupt';
  380. procedure Startup_Checksum; external name 'Startup_Checksum';
  381. procedure SVCall_interrupt; external name 'SVCall_interrupt';
  382. procedure DebugMonitor_interrupt; external name 'DebugMonitor_interrupt';
  383. procedure PendSV_interrupt; external name 'PendSV_interrupt';
  384. procedure SysTick_interrupt; external name 'SysTick_interrupt';
  385. procedure WAKEUP0_Interrupt; external name 'WAKEUP0_Interrupt';
  386. procedure WAKEUP1_Interrupt; external name 'WAKEUP1_Interrupt';
  387. procedure WAKEUP2_Interrupt; external name 'WAKEUP2_Interrupt';
  388. procedure WAKEUP3_Interrupt; external name 'WAKEUP3_Interrupt';
  389. procedure WAKEUP4_Interrupt; external name 'WAKEUP4_Interrupt';
  390. procedure WAKEUP5_Interrupt; external name 'WAKEUP5_Interrupt';
  391. procedure WAKEUP6_Interrupt; external name 'WAKEUP6_Interrupt';
  392. procedure WAKEUP7_Interrupt; external name 'WAKEUP7_Interrupt';
  393. procedure WAKEUP8_Interrupt; external name 'WAKEUP8_Interrupt';
  394. procedure WAKEUP9_Interrupt; external name 'WAKEUP9_Interrupt';
  395. procedure WAKEUP10_Interrupt; external name 'WAKEUP10_Interrupt';
  396. procedure WAKEUP11_Interrupt; external name 'WAKEUP11_Interrupt';
  397. procedure WAKEUP12_Interrupt; external name 'WAKEUP12_Interrupt';
  398. procedure WAKEUP13_Interrupt; external name 'WAKEUP13_Interrupt';
  399. procedure WAKEUP14_Interrupt; external name 'WAKEUP14_Interrupt';
  400. procedure WAKEUP15_Interrupt; external name 'WAKEUP15_Interrupt';
  401. procedure WAKEUP16_Interrupt; external name 'WAKEUP16_Interrupt';
  402. procedure WAKEUP17_Interrupt; external name 'WAKEUP17_Interrupt';
  403. procedure WAKEUP18_Interrupt; external name 'WAKEUP18_Interrupt';
  404. procedure WAKEUP19_Interrupt; external name 'WAKEUP19_Interrupt';
  405. procedure WAKEUP20_Interrupt; external name 'WAKEUP20_Interrupt';
  406. procedure WAKEUP21_Interrupt; external name 'WAKEUP21_Interrupt';
  407. procedure WAKEUP22_Interrupt; external name 'WAKEUP22_Interrupt';
  408. procedure WAKEUP23_Interrupt; external name 'WAKEUP23_Interrupt';
  409. procedure WAKEUP24_Interrupt; external name 'WAKEUP24_Interrupt';
  410. procedure WAKEUP25_Interrupt; external name 'WAKEUP25_Interrupt';
  411. procedure WAKEUP26_Interrupt; external name 'WAKEUP26_Interrupt';
  412. procedure WAKEUP27_Interrupt; external name 'WAKEUP27_Interrupt';
  413. procedure WAKEUP28_Interrupt; external name 'WAKEUP28_Interrupt';
  414. procedure WAKEUP29_Interrupt; external name 'WAKEUP29_Interrupt';
  415. procedure WAKEUP30_Interrupt; external name 'WAKEUP30_Interrupt';
  416. procedure WAKEUP31_Interrupt; external name 'WAKEUP31_Interrupt';
  417. procedure WAKEUP32_Interrupt; external name 'WAKEUP32_Interrupt';
  418. procedure WAKEUP33_Interrupt; external name 'WAKEUP33_Interrupt';
  419. procedure WAKEUP34_Interrupt; external name 'WAKEUP34_Interrupt';
  420. procedure WAKEUP35_Interrupt; external name 'WAKEUP35_Interrupt';
  421. procedure WAKEUP36_Interrupt; external name 'WAKEUP36_Interrupt';
  422. procedure WAKEUP37_Interrupt; external name 'WAKEUP37_Interrupt';
  423. procedure WAKEUP38_Interrupt; external name 'WAKEUP38_Interrupt';
  424. procedure WAKEUP39_Interrupt; external name 'WAKEUP39_Interrupt';
  425. procedure I2C_Interrupt; external name 'I2C_Interrupt';
  426. procedure TIMER16_0_Interrupt; external name 'TIMER16_0_Interrupt';
  427. procedure TIMER16_1_Interrupt; external name 'TIMER16_1_Interrupt';
  428. procedure TIMER32_0_Interrupt; external name 'TIMER32_0_Interrupt';
  429. procedure TIMER32_1_Interrupt; external name 'TIMER32_1_Interrupt';
  430. procedure SSP0_Interrupt; external name 'SSP0_Interrupt';
  431. procedure UART_Interrupt; external name 'UART_Interrupt';
  432. procedure USB_Interrupt; external name 'USB_Interrupt';
  433. procedure USB_F_Interrupt; external name 'USB_F_Interrupt';
  434. procedure ADC_Interrupt; external name 'ADC_Interrupt';
  435. procedure WDT_Interrupt; external name 'WDT_Interrupt';
  436. procedure BOD_Interrupt; external name 'BOD_Interrupt';
  437. procedure EINT3_Interrupt; external name 'EINT3_Interrupt';
  438. procedure EINT2_Interrupt; external name 'EINT2_Interrupt';
  439. procedure EINT1_Interrupt; external name 'EINT1_Interrupt';
  440. procedure EINT0_Interrupt; external name 'EINT0_Interrupt';
  441. procedure SSP1_Interrupt; external name 'SSP1_Interrupt';
  442. {$I cortexm3_start.inc}
  443. procedure Vectors; assembler;
  444. nostackframe;
  445. label interrupt_vectors;
  446. asm
  447. .section ".init.interrupt_vectors"
  448. interrupt_vectors:
  449. .long _stack_top
  450. .long Startup
  451. .long NonMaskableInt_interrupt
  452. .long 0
  453. .long MemoryManagement_interrupt
  454. .long BusFault_interrupt
  455. .long UsageFault_interrupt
  456. .long Startup_Checksum
  457. .long 0
  458. .long 0
  459. .long 0
  460. .long SVCall_interrupt
  461. .long DebugMonitor_interrupt
  462. .long 0
  463. .long PendSV_interrupt
  464. .long SysTick_interrupt
  465. .long WAKEUP0_Interrupt
  466. .long WAKEUP1_Interrupt
  467. .long WAKEUP2_Interrupt
  468. .long WAKEUP3_Interrupt
  469. .long WAKEUP4_Interrupt
  470. .long WAKEUP5_Interrupt
  471. .long WAKEUP6_Interrupt
  472. .long WAKEUP7_Interrupt
  473. .long WAKEUP8_Interrupt
  474. .long WAKEUP9_Interrupt
  475. .long WAKEUP10_Interrupt
  476. .long WAKEUP11_Interrupt
  477. .long WAKEUP12_Interrupt
  478. .long WAKEUP13_Interrupt
  479. .long WAKEUP14_Interrupt
  480. .long WAKEUP15_Interrupt
  481. .long WAKEUP16_Interrupt
  482. .long WAKEUP17_Interrupt
  483. .long WAKEUP18_Interrupt
  484. .long WAKEUP19_Interrupt
  485. .long WAKEUP20_Interrupt
  486. .long WAKEUP21_Interrupt
  487. .long WAKEUP22_Interrupt
  488. .long WAKEUP23_Interrupt
  489. .long WAKEUP24_Interrupt
  490. .long WAKEUP25_Interrupt
  491. .long WAKEUP26_Interrupt
  492. .long WAKEUP27_Interrupt
  493. .long WAKEUP28_Interrupt
  494. .long WAKEUP29_Interrupt
  495. .long WAKEUP30_Interrupt
  496. .long WAKEUP31_Interrupt
  497. .long WAKEUP32_Interrupt
  498. .long WAKEUP33_Interrupt
  499. .long WAKEUP34_Interrupt
  500. .long WAKEUP35_Interrupt
  501. .long WAKEUP36_Interrupt
  502. .long WAKEUP37_Interrupt
  503. .long WAKEUP38_Interrupt
  504. .long WAKEUP39_Interrupt
  505. .long I2C_Interrupt
  506. .long TIMER16_0_Interrupt
  507. .long TIMER16_1_Interrupt
  508. .long TIMER32_0_Interrupt
  509. .long TIMER32_1_Interrupt
  510. .long SSP0_Interrupt
  511. .long UART_Interrupt
  512. .long USB_Interrupt
  513. .long USB_F_Interrupt
  514. .long ADC_Interrupt
  515. .long WDT_Interrupt
  516. .long BOD_Interrupt
  517. .long 0
  518. .long EINT3_Interrupt
  519. .long EINT2_Interrupt
  520. .long EINT1_Interrupt
  521. .long EINT0_Interrupt
  522. .long SSP1_Interrupt
  523. .weak NonMaskableInt_interrupt
  524. .weak MemoryManagement_interrupt
  525. .weak BusFault_interrupt
  526. .weak UsageFault_interrupt
  527. .weak Startup_Checksum
  528. .weak SVCall_interrupt
  529. .weak DebugMonitor_interrupt
  530. .weak PendSV_interrupt
  531. .weak SysTick_interrupt
  532. .weak WAKEUP0_Interrupt
  533. .weak WAKEUP1_Interrupt
  534. .weak WAKEUP2_Interrupt
  535. .weak WAKEUP3_Interrupt
  536. .weak WAKEUP4_Interrupt
  537. .weak WAKEUP5_Interrupt
  538. .weak WAKEUP6_Interrupt
  539. .weak WAKEUP7_Interrupt
  540. .weak WAKEUP8_Interrupt
  541. .weak WAKEUP9_Interrupt
  542. .weak WAKEUP10_Interrupt
  543. .weak WAKEUP11_Interrupt
  544. .weak WAKEUP12_Interrupt
  545. .weak WAKEUP13_Interrupt
  546. .weak WAKEUP14_Interrupt
  547. .weak WAKEUP15_Interrupt
  548. .weak WAKEUP16_Interrupt
  549. .weak WAKEUP17_Interrupt
  550. .weak WAKEUP18_Interrupt
  551. .weak WAKEUP19_Interrupt
  552. .weak WAKEUP20_Interrupt
  553. .weak WAKEUP21_Interrupt
  554. .weak WAKEUP22_Interrupt
  555. .weak WAKEUP23_Interrupt
  556. .weak WAKEUP24_Interrupt
  557. .weak WAKEUP25_Interrupt
  558. .weak WAKEUP26_Interrupt
  559. .weak WAKEUP27_Interrupt
  560. .weak WAKEUP28_Interrupt
  561. .weak WAKEUP29_Interrupt
  562. .weak WAKEUP30_Interrupt
  563. .weak WAKEUP31_Interrupt
  564. .weak WAKEUP32_Interrupt
  565. .weak WAKEUP33_Interrupt
  566. .weak WAKEUP34_Interrupt
  567. .weak WAKEUP35_Interrupt
  568. .weak WAKEUP36_Interrupt
  569. .weak WAKEUP37_Interrupt
  570. .weak WAKEUP38_Interrupt
  571. .weak WAKEUP39_Interrupt
  572. .weak I2C_Interrupt
  573. .weak TIMER16_0_Interrupt
  574. .weak TIMER16_1_Interrupt
  575. .weak TIMER32_0_Interrupt
  576. .weak TIMER32_1_Interrupt
  577. .weak SSP0_Interrupt
  578. .weak UART_Interrupt
  579. .weak USB_Interrupt
  580. .weak USB_F_Interrupt
  581. .weak ADC_Interrupt
  582. .weak WDT_Interrupt
  583. .weak BOD_Interrupt
  584. .weak EINT3_Interrupt
  585. .weak EINT2_Interrupt
  586. .weak EINT1_Interrupt
  587. .weak EINT0_Interrupt
  588. .weak SSP1_Interrupt
  589. .set NonMaskableInt_interrupt , Startup
  590. .set MemoryManagement_interrupt, Startup
  591. .set BusFault_interrupt , Startup
  592. .set UsageFault_interrupt , Startup
  593. .set SVCall_interrupt , Startup
  594. .set DebugMonitor_interrupt , Startup
  595. .set PendSV_interrupt , Startup
  596. .set SysTick_interrupt , Startup
  597. .set WAKEUP0_Interrupt , Startup
  598. .set WAKEUP1_Interrupt , Startup
  599. .set WAKEUP2_Interrupt , Startup
  600. .set WAKEUP3_Interrupt , Startup
  601. .set WAKEUP4_Interrupt , Startup
  602. .set WAKEUP5_Interrupt , Startup
  603. .set WAKEUP6_Interrupt , Startup
  604. .set WAKEUP7_Interrupt , Startup
  605. .set WAKEUP8_Interrupt , Startup
  606. .set WAKEUP9_Interrupt , Startup
  607. .set WAKEUP10_Interrupt , Startup
  608. .set WAKEUP11_Interrupt , Startup
  609. .set WAKEUP12_Interrupt , Startup
  610. .set WAKEUP13_Interrupt , Startup
  611. .set WAKEUP14_Interrupt , Startup
  612. .set WAKEUP15_Interrupt , Startup
  613. .set WAKEUP16_Interrupt , Startup
  614. .set WAKEUP17_Interrupt , Startup
  615. .set WAKEUP18_Interrupt , Startup
  616. .set WAKEUP19_Interrupt , Startup
  617. .set WAKEUP20_Interrupt , Startup
  618. .set WAKEUP21_Interrupt , Startup
  619. .set WAKEUP22_Interrupt , Startup
  620. .set WAKEUP23_Interrupt , Startup
  621. .set WAKEUP24_Interrupt , Startup
  622. .set WAKEUP25_Interrupt , Startup
  623. .set WAKEUP26_Interrupt , Startup
  624. .set WAKEUP27_Interrupt , Startup
  625. .set WAKEUP28_Interrupt , Startup
  626. .set WAKEUP29_Interrupt , Startup
  627. .set WAKEUP30_Interrupt , Startup
  628. .set WAKEUP31_Interrupt , Startup
  629. .set WAKEUP32_Interrupt , Startup
  630. .set WAKEUP33_Interrupt , Startup
  631. .set WAKEUP34_Interrupt , Startup
  632. .set WAKEUP35_Interrupt , Startup
  633. .set WAKEUP36_Interrupt , Startup
  634. .set WAKEUP37_Interrupt , Startup
  635. .set WAKEUP38_Interrupt , Startup
  636. .set WAKEUP39_Interrupt , Startup
  637. .set I2C_Interrupt , Startup
  638. .set TIMER16_0_Interrupt, Startup
  639. .set TIMER16_1_Interrupt, Startup
  640. .set TIMER32_0_Interrupt, Startup
  641. .set TIMER32_1_Interrupt, Startup
  642. .set SSP0_Interrupt , Startup
  643. .set UART_Interrupt , Startup
  644. .set USB_Interrupt , Startup
  645. .set USB_F_Interrupt , Startup
  646. .set ADC_Interrupt , Startup
  647. .set WDT_Interrupt , Startup
  648. .set BOD_Interrupt , Startup
  649. .set EINT3_Interrupt , Startup
  650. .set EINT2_Interrupt , Startup
  651. .set EINT1_Interrupt , Startup
  652. .set EINT0_Interrupt , Startup
  653. .set SSP1_Interrupt , Startup
  654. .text
  655. end;
  656. end.