mk64f12.pp 101 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045
  1. unit mk64f12;
  2. interface
  3. {$PACKRECORDS 2}
  4. {$GOTO ON}
  5. {$MODESWITCH ADVANCEDRECORDS}
  6. // ** ###################################################################
  7. // ** Processors: MK64FN1M0VDC12
  8. // ** MK64FN1M0VLL12
  9. // ** MK64FN1M0VLQ12
  10. // ** MK64FN1M0VMD12
  11. // **
  12. // ** Compilers: Keil ARM C/C++ Compiler
  13. // ** Freescale C/C++ for Embedded ARM
  14. // ** GNU C Compiler
  15. // ** GNU C Compiler - CodeSourcery Sourcery G++
  16. // ** IAR ANSI C/C++ Compiler for ARM
  17. // **
  18. // ** Reference manual: K64P144M120SF5RM, Rev.2, January 2014
  19. // ** Version: rev. 2.8, 2015-02-19
  20. // ** Build: b150225
  21. // **
  22. // ** Abstract:
  23. // ** CMSIS Peripheral Access Layer for MK64F12
  24. // **
  25. // ** Copyright (c) 1997 - 2015 Freescale Semiconductor, Inc.
  26. // ** All rights reserved.
  27. // **
  28. // ** Redistribution and use in source and binary forms, with or without modification,
  29. // ** are permitted provided that the following conditions are met:
  30. // **
  31. // ** o Redistributions of source code must retain the above copyright notice, this list
  32. // ** of conditions and the following disclaimer.
  33. // **
  34. // ** o Redistributions in binary form must reproduce the above copyright notice, this
  35. // ** list of conditions and the following disclaimer in the documentation and/or
  36. // ** other materials provided with the distribution.
  37. // **
  38. // ** o Neither the name of Freescale Semiconductor, Inc. nor the names of its
  39. // ** contributors may be used to endorse or promote products derived from this
  40. // ** software without specific prior written permission.
  41. // **
  42. // ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
  43. // ** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  44. // ** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  45. // ** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
  46. // ** ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  47. // ** (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  48. // ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
  49. // ** ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  50. // ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  51. // ** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  52. // **
  53. // ** http: www.freescale.com
  54. // ** mail: [email protected]
  55. // **
  56. // ** Revisions:
  57. // ** - rev. 1.0 (2013-08-12)
  58. // ** Initial version.
  59. // ** - rev. 2.0 (2013-10-29)
  60. // ** Register accessor macros added to the memory map.
  61. // ** Symbols for Processor Expert memory map compatibility added to the memory map.
  62. // ** Startup file for gcc has been updated according to CMSIS 3.2.
  63. // ** System initialization updated.
  64. // ** MCG - registers updated.
  65. // ** PORTA, PORTB, PORTC, PORTE - registers for digital filter removed.
  66. // ** - rev. 2.1 (2013-10-30)
  67. // ** Definition of BITBAND macros updated to support peripherals with 32-bit acces disabled.
  68. // ** - rev. 2.2 (2013-12-09)
  69. // ** DMA - EARS register removed.
  70. // ** AIPS0, AIPS1 - MPRA register updated.
  71. // ** - rev. 2.3 (2014-01-24)
  72. // ** Update according to reference manual rev. 2
  73. // ** ENET, MCG, MCM, SIM, USB - registers updated
  74. // ** - rev. 2.4 (2014-02-10)
  75. // ** The declaration of clock configurations has been moved to separate header file system_MK64F12.h
  76. // ** Update of SystemInit() and SystemCoreClockUpdate() functions.
  77. // ** - rev. 2.5 (2014-02-10)
  78. // ** The declaration of clock configurations has been moved to separate header file system_MK64F12.h
  79. // ** Update of SystemInit() and SystemCoreClockUpdate() functions.
  80. // ** Module access macro module_BASES replaced by module_BASE_PTRS.
  81. // ** - rev. 2.6 (2014-08-28)
  82. // ** Update of system files - default clock configuration changed.
  83. // ** Update of startup files - possibility to override DefaultISR added.
  84. // ** - rev. 2.7 (2014-10-14)
  85. // ** Interrupt INT_LPTimer renamed to INT_LPTMR0, interrupt INT_Watchdog renamed to INT_WDOG_EWM.
  86. // ** - rev. 2.8 (2015-02-19)
  87. // ** Renamed interrupt vector LLW to LLWU.
  88. // **
  89. // ** ###################################################################
  90. // !
  91. // * @file MK64F12.h
  92. // * @version 2.8
  93. // * @date 2015-02-19
  94. // CMSIS Peripheral Access Layer for MK64F12
  95. // *
  96. // * CMSIS Peripheral Access Layer for MK64F12
  97. // ----------------------------------------------------------------------------
  98. // -- MCU activation
  99. // ----------------------------------------------------------------------------
  100. // Prevention from multiple including the same memory map
  101. // Check if another memory map has not been also included
  102. // * Memory map major version (memory maps with equal major version number are
  103. // * compatible)
  104. // * Memory map minor version
  105. // Macro to calculate address of an aliased word in the peripheral
  106. // * bitband area for a peripheral register and bit (bit band region 0x40000000 to
  107. // * 0x400FFFFF).
  108. // * @param Reg Register to access.
  109. // * @param Bit Bit number to access.
  110. // * @return Address of the aliased word in the peripheral bitband area.
  111. // Macro to access a single bit of a peripheral register (bit band region
  112. // * 0x40000000 to 0x400FFFFF) using the bit-band alias region access. Can
  113. // * be used for peripherals with 32bit access allowed.
  114. // * @param Reg Register to access.
  115. // * @param Bit Bit number to access.
  116. // * @return Value of the targeted bit in the bit band region.
  117. // Macro to access a single bit of a peripheral register (bit band region
  118. // * 0x40000000 to 0x400FFFFF) using the bit-band alias region access. Can
  119. // * be used for peripherals with 16bit access allowed.
  120. // * @param Reg Register to access.
  121. // * @param Bit Bit number to access.
  122. // * @return Value of the targeted bit in the bit band region.
  123. // Macro to access a single bit of a peripheral register (bit band region
  124. // * 0x40000000 to 0x400FFFFF) using the bit-band alias region access. Can
  125. // * be used for peripherals with 8bit access allowed.
  126. // * @param Reg Register to access.
  127. // * @param Bit Bit number to access.
  128. // * @return Value of the targeted bit in the bit band region.
  129. // ----------------------------------------------------------------------------
  130. // -- Interrupt vector numbers
  131. // ----------------------------------------------------------------------------
  132. // !
  133. // * Interrupt Number Definitions
  134. type
  135. TIRQn_Enum = (
  136. NonMaskableInt_IRQn = -14, // *< Non Maskable Interrupt
  137. HardFault_IRQn = -13, // *< Cortex-M4 SV Hard Fault Interrupt
  138. MemoryManagement_IRQn = -12, // *< Cortex-M4 Memory Management Interrupt
  139. BusFault_IRQn = -11, // *< Cortex-M4 Bus Fault Interrupt
  140. UsageFault_IRQn = -10, // *< Cortex-M4 Usage Fault Interrupt
  141. SVCall_IRQn = -5, // *< Cortex-M4 SV Call Interrupt
  142. DebugMonitor_IRQn = -4, // *< Cortex-M4 Debug Monitor Interrupt
  143. PendSV_IRQn = -2, // *< Cortex-M4 Pend SV Interrupt
  144. SysTick_IRQn = -1, // *< Cortex-M4 System Tick Interrupt
  145. DMA0_IRQn = 0, // *< DMA Channel 0 Transfer Complete
  146. DMA1_IRQn = 1, // *< DMA Channel 1 Transfer Complete
  147. DMA2_IRQn = 2, // *< DMA Channel 2 Transfer Complete
  148. DMA3_IRQn = 3, // *< DMA Channel 3 Transfer Complete
  149. DMA4_IRQn = 4, // *< DMA Channel 4 Transfer Complete
  150. DMA5_IRQn = 5, // *< DMA Channel 5 Transfer Complete
  151. DMA6_IRQn = 6, // *< DMA Channel 6 Transfer Complete
  152. DMA7_IRQn = 7, // *< DMA Channel 7 Transfer Complete
  153. DMA8_IRQn = 8, // *< DMA Channel 8 Transfer Complete
  154. DMA9_IRQn = 9, // *< DMA Channel 9 Transfer Complete
  155. DMA10_IRQn = 10, // *< DMA Channel 10 Transfer Complete
  156. DMA11_IRQn = 11, // *< DMA Channel 11 Transfer Complete
  157. DMA12_IRQn = 12, // *< DMA Channel 12 Transfer Complete
  158. DMA13_IRQn = 13, // *< DMA Channel 13 Transfer Complete
  159. DMA14_IRQn = 14, // *< DMA Channel 14 Transfer Complete
  160. DMA15_IRQn = 15, // *< DMA Channel 15 Transfer Complete
  161. DMA_Error_IRQn = 16, // *< DMA Error Interrupt
  162. MCM_IRQn = 17, // *< Normal Interrupt
  163. FTFE_IRQn = 18, // *< FTFE Command complete interrupt
  164. Read_Collision_IRQn = 19, // *< Read Collision Interrupt
  165. LVD_LVW_IRQn = 20, // *< Low Voltage Detect, Low Voltage Warning
  166. LLWU_IRQn = 21, // *< Low Leakage Wakeup Unit
  167. WDOG_EWM_IRQn = 22, // *< WDOG Interrupt
  168. RNG_IRQn = 23, // *< RNG Interrupt
  169. I2C0_IRQn = 24, // *< I2C0 interrupt
  170. I2C1_IRQn = 25, // *< I2C1 interrupt
  171. SPI0_IRQn = 26, // *< SPI0 Interrupt
  172. SPI1_IRQn = 27, // *< SPI1 Interrupt
  173. I2S0_Tx_IRQn = 28, // *< I2S0 transmit interrupt
  174. I2S0_Rx_IRQn = 29, // *< I2S0 receive interrupt
  175. UART0_LON_IRQn = 30, // *< UART0 LON interrupt
  176. UART0_RX_TX_IRQn = 31, // *< UART0 Receive/Transmit interrupt
  177. UART0_ERR_IRQn = 32, // *< UART0 Error interrupt
  178. UART1_RX_TX_IRQn = 33, // *< UART1 Receive/Transmit interrupt
  179. UART1_ERR_IRQn = 34, // *< UART1 Error interrupt
  180. UART2_RX_TX_IRQn = 35, // *< UART2 Receive/Transmit interrupt
  181. UART2_ERR_IRQn = 36, // *< UART2 Error interrupt
  182. UART3_RX_TX_IRQn = 37, // *< UART3 Receive/Transmit interrupt
  183. UART3_ERR_IRQn = 38, // *< UART3 Error interrupt
  184. ADC0_IRQn = 39, // *< ADC0 interrupt
  185. CMP0_IRQn = 40, // *< CMP0 interrupt
  186. CMP1_IRQn = 41, // *< CMP1 interrupt
  187. FTM0_IRQn = 42, // *< FTM0 fault, overflow and channels interrupt
  188. FTM1_IRQn = 43, // *< FTM1 fault, overflow and channels interrupt
  189. FTM2_IRQn = 44, // *< FTM2 fault, overflow and channels interrupt
  190. CMT_IRQn = 45, // *< CMT interrupt
  191. RTC_IRQn = 46, // *< RTC interrupt
  192. RTC_Seconds_IRQn = 47, // *< RTC seconds interrupt
  193. PIT0_IRQn = 48, // *< PIT timer channel 0 interrupt
  194. PIT1_IRQn = 49, // *< PIT timer channel 1 interrupt
  195. PIT2_IRQn = 50, // *< PIT timer channel 2 interrupt
  196. PIT3_IRQn = 51, // *< PIT timer channel 3 interrupt
  197. PDB0_IRQn = 52, // *< PDB0 Interrupt
  198. USB0_IRQn = 53, // *< USB0 interrupt
  199. USBDCD_IRQn = 54, // *< USBDCD Interrupt
  200. RESERVED71_IRQn = 55, // *< Reserved interrupt 71
  201. DAC0_IRQn = 56, // *< DAC0 interrupt
  202. MCG_IRQn = 57, // *< MCG Interrupt
  203. LPTMR0_IRQn = 58, // *< LPTimer interrupt
  204. PORTA_IRQn = 59, // *< Port A interrupt
  205. PORTB_IRQn = 60, // *< Port B interrupt
  206. PORTC_IRQn = 61, // *< Port C interrupt
  207. PORTD_IRQn = 62, // *< Port D interrupt
  208. PORTE_IRQn = 63, // *< Port E interrupt
  209. SWI_IRQn = 64, // *< Software interrupt
  210. SPI2_IRQn = 65, // *< SPI2 Interrupt
  211. UART4_RX_TX_IRQn = 66, // *< UART4 Receive/Transmit interrupt
  212. UART4_ERR_IRQn = 67, // *< UART4 Error interrupt
  213. UART5_RX_TX_IRQn = 68, // *< UART5 Receive/Transmit interrupt
  214. UART5_ERR_IRQn = 69, // *< UART5 Error interrupt
  215. CMP2_IRQn = 70, // *< CMP2 interrupt
  216. FTM3_IRQn = 71, // *< FTM3 fault, overflow and channels interrupt
  217. DAC1_IRQn = 72, // *< DAC1 interrupt
  218. ADC1_IRQn = 73, // *< ADC1 interrupt
  219. I2C2_IRQn = 74, // *< I2C2 interrupt
  220. CAN0_ORed_Message_buffer_IRQn = 75, // *< CAN0 OR'd message buffers interrupt
  221. CAN0_Bus_Off_IRQn = 76, // *< CAN0 bus off interrupt
  222. CAN0_Error_IRQn = 77, // *< CAN0 error interrupt
  223. CAN0_Tx_Warning_IRQn = 78, // *< CAN0 Tx warning interrupt
  224. CAN0_Rx_Warning_IRQn = 79, // *< CAN0 Rx warning interrupt
  225. CAN0_Wake_Up_IRQn = 80, // *< CAN0 wake up interrupt
  226. SDHC_IRQn = 81, // *< SDHC interrupt
  227. ENET_1588_Timer_IRQn = 82, // *< Ethernet MAC IEEE 1588 Timer Interrupt
  228. ENET_Transmit_IRQn = 83, // *< Ethernet MAC Transmit Interrupt
  229. ENET_Receive_IRQn = 84, // *< Ethernet MAC Receive Interrupt
  230. ENET_Error_IRQn = 85 // *< Ethernet MAC Error and miscelaneous Interrupt
  231. );
  232. TADC_Registers = record
  233. SC1 : array[0..1] of longword; // *< ADC Status and Control Registers 1, array offset: 0x0, array step: 0x4
  234. CFG1 : longword; // *< ADC Configuration Register 1, offset: 0x8
  235. CFG2 : longword; // *< ADC Configuration Register 2, offset: 0xC
  236. R : array[0..1] of longword; // *< ADC Data Result Register, array offset: 0x10, array step: 0x4
  237. CV1 : longword; // *< Compare Value Registers, offset: 0x18
  238. CV2 : longword; // *< Compare Value Registers, offset: 0x1C
  239. SC2 : longword; // *< Status and Control Register 2, offset: 0x20
  240. SC3 : longword; // *< Status and Control Register 3, offset: 0x24
  241. OFS : longword; // *< ADC Offset Correction Register, offset: 0x28
  242. PG : longword; // *< ADC Plus-Side Gain Register, offset: 0x2C
  243. MG : longword; // *< ADC Minus-Side Gain Register, offset: 0x30
  244. CLPD : longword; // *< ADC Plus-Side General Calibration Value Register, offset: 0x34
  245. CLPS : longword; // *< ADC Plus-Side General Calibration Value Register, offset: 0x38
  246. CLP4 : longword; // *< ADC Plus-Side General Calibration Value Register, offset: 0x3C
  247. CLP3 : longword; // *< ADC Plus-Side General Calibration Value Register, offset: 0x40
  248. CLP2 : longword; // *< ADC Plus-Side General Calibration Value Register, offset: 0x44
  249. CLP1 : longword; // *< ADC Plus-Side General Calibration Value Register, offset: 0x48
  250. CLP0 : longword; // *< ADC Plus-Side General Calibration Value Register, offset: 0x4C
  251. RESERVED_0 : array[0..3] of byte;
  252. CLMD : longword; // *< ADC Minus-Side General Calibration Value Register, offset: 0x54
  253. CLMS : longword; // *< ADC Minus-Side General Calibration Value Register, offset: 0x58
  254. CLM4 : longword; // *< ADC Minus-Side General Calibration Value Register, offset: 0x5C
  255. CLM3 : longword; // *< ADC Minus-Side General Calibration Value Register, offset: 0x60
  256. CLM2 : longword; // *< ADC Minus-Side General Calibration Value Register, offset: 0x64
  257. CLM1 : longword; // *< ADC Minus-Side General Calibration Value Register, offset: 0x68
  258. CLM0 : longword; // *< ADC Minus-Side General Calibration Value Register, offset: 0x6C
  259. end;
  260. const
  261. ADC0_BASE = $4003B000;
  262. var
  263. ADC0 : TADC_Registers absolute ADC0_BASE;
  264. const
  265. ADC1_BASE = $400BB000;
  266. var
  267. ADC1 : TADC_Registers absolute ADC1_BASE;
  268. type
  269. TAIPS_Registers = record
  270. MPRA : longword; // *< Master Privilege Register A, offset: 0x0
  271. RESERVED_0 : array[0..27] of byte;
  272. PACRA : longword; // *< Peripheral Access Control Register, offset: 0x20
  273. PACRB : longword; // *< Peripheral Access Control Register, offset: 0x24
  274. PACRC : longword; // *< Peripheral Access Control Register, offset: 0x28
  275. PACRD : longword; // *< Peripheral Access Control Register, offset: 0x2C
  276. RESERVED_1 : array[0..15] of byte;
  277. PACRE : longword; // *< Peripheral Access Control Register, offset: 0x40
  278. PACRF : longword; // *< Peripheral Access Control Register, offset: 0x44
  279. PACRG : longword; // *< Peripheral Access Control Register, offset: 0x48
  280. PACRH : longword; // *< Peripheral Access Control Register, offset: 0x4C
  281. PACRI : longword; // *< Peripheral Access Control Register, offset: 0x50
  282. PACRJ : longword; // *< Peripheral Access Control Register, offset: 0x54
  283. PACRK : longword; // *< Peripheral Access Control Register, offset: 0x58
  284. PACRL : longword; // *< Peripheral Access Control Register, offset: 0x5C
  285. PACRM : longword; // *< Peripheral Access Control Register, offset: 0x60
  286. PACRN : longword; // *< Peripheral Access Control Register, offset: 0x64
  287. PACRO : longword; // *< Peripheral Access Control Register, offset: 0x68
  288. PACRP : longword; // *< Peripheral Access Control Register, offset: 0x6C
  289. RESERVED_2 : array[0..15] of byte;
  290. PACRU : longword; // *< Peripheral Access Control Register, offset: 0x80
  291. end;
  292. const
  293. AIPS0_BASE = $40000000;
  294. var
  295. AIPS0 : TAIPS_Registers absolute AIPS0_BASE;
  296. const
  297. AIPS1_BASE = $40080000;
  298. var
  299. AIPS1 : TAIPS_Registers absolute AIPS1_BASE;
  300. type
  301. TAXBS_SLAVE = record
  302. PRS : longword; // *< Priority Registers Slave, array offset: 0x0, array step: 0x100
  303. RESERVED_0 : array[0..11] of byte;
  304. CRS : longword; // *< Control Register, array offset: 0x10, array step: 0x100
  305. RESERVED_1 : array[0..235] of byte;
  306. end;
  307. TAXBS_Registers = record
  308. SLAVE : array[0..4] of TAXBS_SLAVE;
  309. RESERVED_0 : array[0..767] of byte;
  310. MGPCR0 : longword; // *< Master General Purpose Control Register, offset: 0x800
  311. RESERVED_1 : array[0..251] of byte;
  312. MGPCR1 : longword; // *< Master General Purpose Control Register, offset: 0x900
  313. RESERVED_2 : array[0..251] of byte;
  314. MGPCR2 : longword; // *< Master General Purpose Control Register, offset: 0xA00
  315. RESERVED_3 : array[0..251] of byte;
  316. MGPCR3 : longword; // *< Master General Purpose Control Register, offset: 0xB00
  317. RESERVED_4 : array[0..251] of byte;
  318. MGPCR4 : longword; // *< Master General Purpose Control Register, offset: 0xC00
  319. RESERVED_5 : array[0..251] of byte;
  320. MGPCR5 : longword; // *< Master General Purpose Control Register, offset: 0xD00
  321. end;
  322. const
  323. AXBS_BASE = $40004000;
  324. var
  325. AXBS : TAXBS_Registers absolute AXBS_BASE;
  326. type
  327. TCAN_MB = record
  328. CS : longword; // *< Message Buffer 0 CS Register..Message Buffer 15 CS Register, array offset: 0x80, array step: 0x10
  329. ID : longword; // *< Message Buffer 0 ID Register..Message Buffer 15 ID Register, array offset: 0x84, array step: 0x10
  330. WORD0 : longword; // *< Message Buffer 0 WORD0 Register..Message Buffer 15 WORD0 Register, array offset: 0x88, array step: 0x10
  331. WORD1 : longword; // *< Message Buffer 0 WORD1 Register..Message Buffer 15 WORD1 Register, array offset: 0x8C, array step: 0x10
  332. end;
  333. TCAN_Registers = record
  334. MCR : longword; // *< Module Configuration Register, offset: 0x0
  335. CTRL1 : longword; // *< Control 1 register, offset: 0x4
  336. TIMER : longword; // *< Free Running Timer, offset: 0x8
  337. RESERVED_0 : array[0..3] of byte;
  338. RXMGMASK : longword; // *< Rx Mailboxes Global Mask Register, offset: 0x10
  339. RX14MASK : longword; // *< Rx 14 Mask register, offset: 0x14
  340. RX15MASK : longword; // *< Rx 15 Mask register, offset: 0x18
  341. ECR : longword; // *< Error Counter, offset: 0x1C
  342. ESR1 : longword; // *< Error and Status 1 register, offset: 0x20
  343. RESERVED_1 : array[0..3] of byte;
  344. IMASK1 : longword; // *< Interrupt Masks 1 register, offset: 0x28
  345. RESERVED_2 : array[0..3] of byte;
  346. IFLAG1 : longword; // *< Interrupt Flags 1 register, offset: 0x30
  347. CTRL2 : longword; // *< Control 2 register, offset: 0x34
  348. ESR2 : longword; // *< Error and Status 2 register, offset: 0x38
  349. RESERVED_3 : array[0..7] of byte;
  350. CRCR : longword; // *< CRC Register, offset: 0x44
  351. RXFGMASK : longword; // *< Rx FIFO Global Mask register, offset: 0x48
  352. RXFIR : longword; // *< Rx FIFO Information Register, offset: 0x4C
  353. RESERVED_4 : array[0..47] of byte;
  354. MB : array[0..15] of TCAN_MB;
  355. RESERVED_5 : array[0..1791] of byte;
  356. RXIMR : array[0..15] of longword; // *< Rx Individual Mask Registers, array offset: 0x880, array step: 0x4
  357. end;
  358. const
  359. CAN0_BASE = $40024000;
  360. var
  361. CAN0 : TCAN_Registers absolute CAN0_BASE;
  362. type
  363. TCAU_Registers = record
  364. DIRECT : array[0..15] of longword; // *< Direct access register 0..Direct access register 15, array offset: 0x0, array step: 0x4
  365. RESERVED_0 : array[0..2047] of byte;
  366. LDR_CASR : longword; // *< Status register - Load Register command, offset: 0x840
  367. LDR_CAA : longword; // *< Accumulator register - Load Register command, offset: 0x844
  368. LDR_CA : array[0..8] of longword; // *< General Purpose Register 0 - Load Register command..General Purpose Register 8 - Load Register command, array offset: 0x848, array step: 0x4
  369. RESERVED_1 : array[0..19] of byte;
  370. STR_CASR : longword; // *< Status register - Store Register command, offset: 0x880
  371. STR_CAA : longword; // *< Accumulator register - Store Register command, offset: 0x884
  372. STR_CA : array[0..8] of longword; // *< General Purpose Register 0 - Store Register command..General Purpose Register 8 - Store Register command, array offset: 0x888, array step: 0x4
  373. RESERVED_2 : array[0..19] of byte;
  374. ADR_CASR : longword; // *< Status register - Add Register command, offset: 0x8C0
  375. ADR_CAA : longword; // *< Accumulator register - Add to register command, offset: 0x8C4
  376. ADR_CA : array[0..8] of longword; // *< General Purpose Register 0 - Add to register command..General Purpose Register 8 - Add to register command, array offset: 0x8C8, array step: 0x4
  377. RESERVED_3 : array[0..19] of byte;
  378. RADR_CASR : longword; // *< Status register - Reverse and Add to Register command, offset: 0x900
  379. RADR_CAA : longword; // *< Accumulator register - Reverse and Add to Register command, offset: 0x904
  380. RADR_CA : array[0..8] of longword; // *< General Purpose Register 0 - Reverse and Add to Register command..General Purpose Register 8 - Reverse and Add to Register command, array offset: 0x908, array step: 0x4
  381. RESERVED_4 : array[0..83] of byte;
  382. XOR_CASR : longword; // *< Status register - Exclusive Or command, offset: 0x980
  383. XOR_CAA : longword; // *< Accumulator register - Exclusive Or command, offset: 0x984
  384. XOR_CA : array[0..8] of longword; // *< General Purpose Register 0 - Exclusive Or command..General Purpose Register 8 - Exclusive Or command, array offset: 0x988, array step: 0x4
  385. RESERVED_5 : array[0..19] of byte;
  386. ROTL_CASR : longword; // *< Status register - Rotate Left command, offset: 0x9C0
  387. ROTL_CAA : longword; // *< Accumulator register - Rotate Left command, offset: 0x9C4
  388. ROTL_CA : array[0..8] of longword; // *< General Purpose Register 0 - Rotate Left command..General Purpose Register 8 - Rotate Left command, array offset: 0x9C8, array step: 0x4
  389. RESERVED_6 : array[0..275] of byte;
  390. AESC_CASR : longword; // *< Status register - AES Column Operation command, offset: 0xB00
  391. AESC_CAA : longword; // *< Accumulator register - AES Column Operation command, offset: 0xB04
  392. AESC_CA : array[0..8] of longword; // *< General Purpose Register 0 - AES Column Operation command..General Purpose Register 8 - AES Column Operation command, array offset: 0xB08, array step: 0x4
  393. RESERVED_7 : array[0..19] of byte;
  394. AESIC_CASR : longword; // *< Status register - AES Inverse Column Operation command, offset: 0xB40
  395. AESIC_CAA : longword; // *< Accumulator register - AES Inverse Column Operation command, offset: 0xB44
  396. AESIC_CA : array[0..8] of longword; // *< General Purpose Register 0 - AES Inverse Column Operation command..General Purpose Register 8 - AES Inverse Column Operation command, array offset: 0xB48, array step: 0x4
  397. end;
  398. const
  399. CAU_BASE = $E0081000;
  400. var
  401. CAU : TCAU_Registers absolute CAU_BASE;
  402. type
  403. TCMP_Registers = record
  404. CR0 : byte; // *< CMP Control Register 0, offset: 0x0
  405. CR1 : byte; // *< CMP Control Register 1, offset: 0x1
  406. FPR : byte; // *< CMP Filter Period Register, offset: 0x2
  407. SCR : byte; // *< CMP Status and Control Register, offset: 0x3
  408. DACCR : byte; // *< DAC Control Register, offset: 0x4
  409. MUXCR : byte; // *< MUX Control Register, offset: 0x5
  410. end;
  411. const
  412. CMP0_BASE = $40073000;
  413. var
  414. CMP0 : TCMP_Registers absolute CMP0_BASE;
  415. const
  416. CMP1_BASE = $40073008;
  417. var
  418. CMP1 : TCMP_Registers absolute CMP1_BASE;
  419. const
  420. CMP2_BASE = $40073010;
  421. var
  422. CMP2 : TCMP_Registers absolute CMP2_BASE;
  423. type
  424. TCMT_Registers = record
  425. CGH1 : byte; // *< CMT Carrier Generator High Data Register 1, offset: 0x0
  426. CGL1 : byte; // *< CMT Carrier Generator Low Data Register 1, offset: 0x1
  427. CGH2 : byte; // *< CMT Carrier Generator High Data Register 2, offset: 0x2
  428. CGL2 : byte; // *< CMT Carrier Generator Low Data Register 2, offset: 0x3
  429. OC : byte; // *< CMT Output Control Register, offset: 0x4
  430. MSC : byte; // *< CMT Modulator Status and Control Register, offset: 0x5
  431. CMD1 : byte; // *< CMT Modulator Data Register Mark High, offset: 0x6
  432. CMD2 : byte; // *< CMT Modulator Data Register Mark Low, offset: 0x7
  433. CMD3 : byte; // *< CMT Modulator Data Register Space High, offset: 0x8
  434. CMD4 : byte; // *< CMT Modulator Data Register Space Low, offset: 0x9
  435. PPS : byte; // *< CMT Primary Prescaler Register, offset: 0xA
  436. DMA : byte; // *< CMT Direct Memory Access Register, offset: 0xB
  437. end;
  438. const
  439. CMT_BASE = $40062000;
  440. var
  441. CMT : TCMT_Registers absolute CMT_BASE;
  442. type
  443. TCRC_Registers = record
  444. DATA : longword; // *< CRC Data register, offset: 0x0
  445. GPOLY : longword; // *< CRC Polynomial register, offset: 0x4
  446. CTRL : longword; // *< CRC Control register, offset: 0x8
  447. end;
  448. const
  449. CRC_BASE = $40032000;
  450. var
  451. CRC0 : TCRC_Registers absolute CRC_BASE;
  452. type
  453. TDAC_DAT = record
  454. DATL : byte; // *< DAC Data Low Register, array offset: 0x0, array step: 0x2
  455. DATH : byte; // *< DAC Data High Register, array offset: 0x1, array step: 0x2
  456. end;
  457. TDAC_Registers = record
  458. DAT : array[0..15] of TDAC_DAT;
  459. SR : byte; // *< DAC Status Register, offset: 0x20
  460. C0 : byte; // *< DAC Control Register, offset: 0x21
  461. C1 : byte; // *< DAC Control Register 1, offset: 0x22
  462. C2 : byte; // *< DAC Control Register 2, offset: 0x23
  463. end;
  464. const
  465. DAC0_BASE = $400CC000;
  466. var
  467. DAC0 : TDAC_Registers absolute DAC0_BASE;
  468. const
  469. DAC1_BASE = $400CD000;
  470. var
  471. DAC1 : TDAC_Registers absolute DAC1_BASE;
  472. type
  473. TDMA_TCD = record
  474. SADDR : longword; // *< TCD Source Address, array offset: 0x1000, array step: 0x20
  475. SOFF : word; // *< TCD Signed Source Address Offset, array offset: 0x1004, array step: 0x20
  476. ATTR : word; // *< TCD Transfer Attributes, array offset: 0x1006, array step: 0x20
  477. NBYTES_MLNO : longword; // *< TCD Minor Byte Count (Minor Loop Disabled), array offset: 0x1008, array step: 0x20
  478. SLAST : longword; // *< TCD Last Source Address Adjustment, array offset: 0x100C, array step: 0x20
  479. DADDR : longword; // *< TCD Destination Address, array offset: 0x1010, array step: 0x20
  480. DOFF : word; // *< TCD Signed Destination Address Offset, array offset: 0x1014, array step: 0x20
  481. CITER_ELINKNO : word; // *< TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled), array offset: 0x1016, array step: 0x20
  482. DLAST_SGA : longword; // *< TCD Last Destination Address Adjustment/Scatter Gather Address, array offset: 0x1018, array step: 0x20
  483. CSR : word; // *< TCD Control and Status, array offset: 0x101C, array step: 0x20
  484. BITER_ELINKNO : word; // *< TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled), array offset: 0x101E, array step: 0x20
  485. end;
  486. TDMA_Registers = record
  487. CR : longword; // *< Control Register, offset: 0x0
  488. ES : longword; // *< Error Status Register, offset: 0x4
  489. RESERVED_0 : array[0..3] of byte;
  490. ERQ : longword; // *< Enable Request Register, offset: 0xC
  491. RESERVED_1 : array[0..3] of byte;
  492. EEI : longword; // *< Enable Error Interrupt Register, offset: 0x14
  493. CEEI : byte; // *< Clear Enable Error Interrupt Register, offset: 0x18
  494. SEEI : byte; // *< Set Enable Error Interrupt Register, offset: 0x19
  495. CERQ : byte; // *< Clear Enable Request Register, offset: 0x1A
  496. SERQ : byte; // *< Set Enable Request Register, offset: 0x1B
  497. CDNE : byte; // *< Clear DONE Status Bit Register, offset: 0x1C
  498. SSRT : byte; // *< Set START Bit Register, offset: 0x1D
  499. CERR : byte; // *< Clear Error Register, offset: 0x1E
  500. CINT : byte; // *< Clear Interrupt Request Register, offset: 0x1F
  501. RESERVED_2 : array[0..3] of byte;
  502. INT : longword; // *< Interrupt Request Register, offset: 0x24
  503. RESERVED_3 : array[0..3] of byte;
  504. ERR : longword; // *< Error Register, offset: 0x2C
  505. RESERVED_4 : array[0..3] of byte;
  506. HRS : longword; // *< Hardware Request Status Register, offset: 0x34
  507. RESERVED_5 : array[0..199] of byte;
  508. DCHPRI3 : byte; // *< Channel n Priority Register, offset: 0x100
  509. DCHPRI2 : byte; // *< Channel n Priority Register, offset: 0x101
  510. DCHPRI1 : byte; // *< Channel n Priority Register, offset: 0x102
  511. DCHPRI0 : byte; // *< Channel n Priority Register, offset: 0x103
  512. DCHPRI7 : byte; // *< Channel n Priority Register, offset: 0x104
  513. DCHPRI6 : byte; // *< Channel n Priority Register, offset: 0x105
  514. DCHPRI5 : byte; // *< Channel n Priority Register, offset: 0x106
  515. DCHPRI4 : byte; // *< Channel n Priority Register, offset: 0x107
  516. DCHPRI11 : byte; // *< Channel n Priority Register, offset: 0x108
  517. DCHPRI10 : byte; // *< Channel n Priority Register, offset: 0x109
  518. DCHPRI9 : byte; // *< Channel n Priority Register, offset: 0x10A
  519. DCHPRI8 : byte; // *< Channel n Priority Register, offset: 0x10B
  520. DCHPRI15 : byte; // *< Channel n Priority Register, offset: 0x10C
  521. DCHPRI14 : byte; // *< Channel n Priority Register, offset: 0x10D
  522. DCHPRI13 : byte; // *< Channel n Priority Register, offset: 0x10E
  523. DCHPRI12 : byte; // *< Channel n Priority Register, offset: 0x10F
  524. RESERVED_6 : array[0..3823] of byte;
  525. TCD : array[0..15] of TDMA_TCD;
  526. end;
  527. const
  528. DMA_BASE = $40008000;
  529. var
  530. DMA0 : TDMA_Registers absolute DMA_BASE;
  531. type
  532. TDMAMUX_Registers = record
  533. CHCFG : array[0..15] of byte; // *< Channel Configuration register, array offset: 0x0, array step: 0x1
  534. end;
  535. const
  536. DMAMUX_BASE = $40021000;
  537. var
  538. DMAMUX : TDMAMUX_Registers absolute DMAMUX_BASE;
  539. type
  540. TENET_CHANNEL= record
  541. TCSR : longword; // *< Timer Control Status Register, array offset: 0x608, array step: 0x8
  542. TCCR : longword; // *< Timer Compare Capture Register, array offset: 0x60C, array step: 0x8
  543. end;
  544. TENET_Registers = record
  545. RESERVED_0 : array[0..3] of byte;
  546. EIR : longword; // *< Interrupt Event Register, offset: 0x4
  547. EIMR : longword; // *< Interrupt Mask Register, offset: 0x8
  548. RESERVED_1 : array[0..3] of byte;
  549. RDAR : longword; // *< Receive Descriptor Active Register, offset: 0x10
  550. TDAR : longword; // *< Transmit Descriptor Active Register, offset: 0x14
  551. RESERVED_2 : array[0..11] of byte;
  552. ECR : longword; // *< Ethernet Control Register, offset: 0x24
  553. RESERVED_3 : array[0..23] of byte;
  554. MMFR : longword; // *< MII Management Frame Register, offset: 0x40
  555. MSCR : longword; // *< MII Speed Control Register, offset: 0x44
  556. RESERVED_4 : array[0..27] of byte;
  557. MIBC : longword; // *< MIB Control Register, offset: 0x64
  558. RESERVED_5 : array[0..27] of byte;
  559. RCR : longword; // *< Receive Control Register, offset: 0x84
  560. RESERVED_6 : array[0..59] of byte;
  561. TCR : longword; // *< Transmit Control Register, offset: 0xC4
  562. RESERVED_7 : array[0..27] of byte;
  563. PALR : longword; // *< Physical Address Lower Register, offset: 0xE4
  564. PAUR : longword; // *< Physical Address Upper Register, offset: 0xE8
  565. OPD : longword; // *< Opcode/Pause Duration Register, offset: 0xEC
  566. RESERVED_8 : array[0..39] of byte;
  567. IAUR : longword; // *< Descriptor Individual Upper Address Register, offset: 0x118
  568. IALR : longword; // *< Descriptor Individual Lower Address Register, offset: 0x11C
  569. GAUR : longword; // *< Descriptor Group Upper Address Register, offset: 0x120
  570. GALR : longword; // *< Descriptor Group Lower Address Register, offset: 0x124
  571. RESERVED_9 : array[0..27] of byte;
  572. TFWR : longword; // *< Transmit FIFO Watermark Register, offset: 0x144
  573. RESERVED_10 : array[0..55] of byte;
  574. RDSR : longword; // *< Receive Descriptor Ring Start Register, offset: 0x180
  575. TDSR : longword; // *< Transmit Buffer Descriptor Ring Start Register, offset: 0x184
  576. MRBR : longword; // *< Maximum Receive Buffer Size Register, offset: 0x188
  577. RESERVED_11 : array[0..3] of byte;
  578. RSFL : longword; // *< Receive FIFO Section Full Threshold, offset: 0x190
  579. RSEM : longword; // *< Receive FIFO Section Empty Threshold, offset: 0x194
  580. RAEM : longword; // *< Receive FIFO Almost Empty Threshold, offset: 0x198
  581. RAFL : longword; // *< Receive FIFO Almost Full Threshold, offset: 0x19C
  582. TSEM : longword; // *< Transmit FIFO Section Empty Threshold, offset: 0x1A0
  583. TAEM : longword; // *< Transmit FIFO Almost Empty Threshold, offset: 0x1A4
  584. TAFL : longword; // *< Transmit FIFO Almost Full Threshold, offset: 0x1A8
  585. TIPG : longword; // *< Transmit Inter-Packet Gap, offset: 0x1AC
  586. FTRL : longword; // *< Frame Truncation Length, offset: 0x1B0
  587. RESERVED_12 : array[0..11] of byte;
  588. TACC : longword; // *< Transmit Accelerator Function Configuration, offset: 0x1C0
  589. RACC : longword; // *< Receive Accelerator Function Configuration, offset: 0x1C4
  590. RESERVED_13 : array[0..59] of byte;
  591. RMON_T_PACKETS : longword; // *< Tx Packet Count Statistic Register, offset: 0x204
  592. RMON_T_BC_PKT : longword; // *< Tx Broadcast Packets Statistic Register, offset: 0x208
  593. RMON_T_MC_PKT : longword; // *< Tx Multicast Packets Statistic Register, offset: 0x20C
  594. RMON_T_CRC_ALIGN : longword; // *< Tx Packets with CRC/Align Error Statistic Register, offset: 0x210
  595. RMON_T_UNDERSIZE : longword; // *< Tx Packets Less Than Bytes and Good CRC Statistic Register, offset: 0x214
  596. RMON_T_OVERSIZE : longword; // *< Tx Packets GT MAX_FL bytes and Good CRC Statistic Register, offset: 0x218
  597. RMON_T_FRAG : longword; // *< Tx Packets Less Than 64 Bytes and Bad CRC Statistic Register, offset: 0x21C
  598. RMON_T_JAB : longword; // *< Tx Packets Greater Than MAX_FL bytes and Bad CRC Statistic Register, offset: 0x220
  599. RMON_T_COL : longword; // *< Tx Collision Count Statistic Register, offset: 0x224
  600. RMON_T_P64 : longword; // *< Tx 64-Byte Packets Statistic Register, offset: 0x228
  601. RMON_T_P65TO127 : longword; // *< Tx 65- to 127-byte Packets Statistic Register, offset: 0x22C
  602. RMON_T_P128TO255 : longword; // *< Tx 128- to 255-byte Packets Statistic Register, offset: 0x230
  603. RMON_T_P256TO511 : longword; // *< Tx 256- to 511-byte Packets Statistic Register, offset: 0x234
  604. RMON_T_P512TO1023 : longword; // *< Tx 512- to 1023-byte Packets Statistic Register, offset: 0x238
  605. RMON_T_P1024TO2047 : longword; // *< Tx 1024- to 2047-byte Packets Statistic Register, offset: 0x23C
  606. RMON_T_P_GTE2048 : longword; // *< Tx Packets Greater Than 2048 Bytes Statistic Register, offset: 0x240
  607. RMON_T_OCTETS : longword; // *< Tx Octets Statistic Register, offset: 0x244
  608. RESERVED_14 : array[0..3] of byte;
  609. IEEE_T_FRAME_OK : longword; // *< Frames Transmitted OK Statistic Register, offset: 0x24C
  610. IEEE_T_1COL : longword; // *< Frames Transmitted with Single Collision Statistic Register, offset: 0x250
  611. IEEE_T_MCOL : longword; // *< Frames Transmitted with Multiple Collisions Statistic Register, offset: 0x254
  612. IEEE_T_DEF : longword; // *< Frames Transmitted after Deferral Delay Statistic Register, offset: 0x258
  613. IEEE_T_LCOL : longword; // *< Frames Transmitted with Late Collision Statistic Register, offset: 0x25C
  614. IEEE_T_EXCOL : longword; // *< Frames Transmitted with Excessive Collisions Statistic Register, offset: 0x260
  615. IEEE_T_MACERR : longword; // *< Frames Transmitted with Tx FIFO Underrun Statistic Register, offset: 0x264
  616. IEEE_T_CSERR : longword; // *< Frames Transmitted with Carrier Sense Error Statistic Register, offset: 0x268
  617. RESERVED_15 : array[0..3] of byte;
  618. IEEE_T_FDXFC : longword; // *< Flow Control Pause Frames Transmitted Statistic Register, offset: 0x270
  619. IEEE_T_OCTETS_OK : longword; // *< Octet Count for Frames Transmitted w/o Error Statistic Register, offset: 0x274
  620. RESERVED_16 : array[0..11] of byte;
  621. RMON_R_PACKETS : longword; // *< Rx Packet Count Statistic Register, offset: 0x284
  622. RMON_R_BC_PKT : longword; // *< Rx Broadcast Packets Statistic Register, offset: 0x288
  623. RMON_R_MC_PKT : longword; // *< Rx Multicast Packets Statistic Register, offset: 0x28C
  624. RMON_R_CRC_ALIGN : longword; // *< Rx Packets with CRC/Align Error Statistic Register, offset: 0x290
  625. RMON_R_UNDERSIZE : longword; // *< Rx Packets with Less Than 64 Bytes and Good CRC Statistic Register, offset: 0x294
  626. RMON_R_OVERSIZE : longword; // *< Rx Packets Greater Than MAX_FL and Good CRC Statistic Register, offset: 0x298
  627. RMON_R_FRAG : longword; // *< Rx Packets Less Than 64 Bytes and Bad CRC Statistic Register, offset: 0x29C
  628. RMON_R_JAB : longword; // *< Rx Packets Greater Than MAX_FL Bytes and Bad CRC Statistic Register, offset: 0x2A0
  629. RESERVED_17 : array[0..3] of byte;
  630. RMON_R_P64 : longword; // *< Rx 64-Byte Packets Statistic Register, offset: 0x2A8
  631. RMON_R_P65TO127 : longword; // *< Rx 65- to 127-Byte Packets Statistic Register, offset: 0x2AC
  632. RMON_R_P128TO255 : longword; // *< Rx 128- to 255-Byte Packets Statistic Register, offset: 0x2B0
  633. RMON_R_P256TO511 : longword; // *< Rx 256- to 511-Byte Packets Statistic Register, offset: 0x2B4
  634. RMON_R_P512TO1023 : longword; // *< Rx 512- to 1023-Byte Packets Statistic Register, offset: 0x2B8
  635. RMON_R_P1024TO2047 : longword; // *< Rx 1024- to 2047-Byte Packets Statistic Register, offset: 0x2BC
  636. RMON_R_P_GTE2048 : longword; // *< Rx Packets Greater than 2048 Bytes Statistic Register, offset: 0x2C0
  637. RMON_R_OCTETS : longword; // *< Rx Octets Statistic Register, offset: 0x2C4
  638. IEEE_R_DROP : longword; // *< Frames not Counted Correctly Statistic Register, offset: 0x2C8
  639. IEEE_R_FRAME_OK : longword; // *< Frames Received OK Statistic Register, offset: 0x2CC
  640. IEEE_R_CRC : longword; // *< Frames Received with CRC Error Statistic Register, offset: 0x2D0
  641. IEEE_R_ALIGN : longword; // *< Frames Received with Alignment Error Statistic Register, offset: 0x2D4
  642. IEEE_R_MACERR : longword; // *< Receive FIFO Overflow Count Statistic Register, offset: 0x2D8
  643. IEEE_R_FDXFC : longword; // *< Flow Control Pause Frames Received Statistic Register, offset: 0x2DC
  644. IEEE_R_OCTETS_OK : longword; // *< Octet Count for Frames Received without Error Statistic Register, offset: 0x2E0
  645. RESERVED_18 : array[0..283] of byte;
  646. ATCR : longword; // *< Adjustable Timer Control Register, offset: 0x400
  647. ATVR : longword; // *< Timer Value Register, offset: 0x404
  648. ATOFF : longword; // *< Timer Offset Register, offset: 0x408
  649. ATPER : longword; // *< Timer Period Register, offset: 0x40C
  650. ATCOR : longword; // *< Timer Correction Register, offset: 0x410
  651. ATINC : longword; // *< Time-Stamping Clock Period Register, offset: 0x414
  652. ATSTMP : longword; // *< Timestamp of Last Transmitted Frame, offset: 0x418
  653. RESERVED_19 : array[0..487] of byte;
  654. TGSR : longword; // *< Timer Global Status Register, offset: 0x604
  655. CHANNEL : array[0..3] of TENET_CHANNEL;
  656. end;
  657. const
  658. ENET_BASE = $400C0000;
  659. var
  660. ENET : TENET_Registers absolute ENET_BASE;
  661. type
  662. TEWM_Registers = record
  663. CTRL : byte; // *< Control Register, offset: 0x0
  664. SERV : byte; // *< Service Register, offset: 0x1
  665. CMPL : byte; // *< Compare Low Register, offset: 0x2
  666. CMPH : byte; // *< Compare High Register, offset: 0x3
  667. end;
  668. const
  669. EWM_BASE = $40061000;
  670. var
  671. EWM : TEWM_Registers absolute EWM_BASE;
  672. type
  673. TFB_CS = record
  674. CSAR : longword; // *< Chip Select Address Register, array offset: 0x0, array step: 0xC
  675. CSMR : longword; // *< Chip Select Mask Register, array offset: 0x4, array step: 0xC
  676. CSCR : longword; // *< Chip Select Control Register, array offset: 0x8, array step: 0xC
  677. end;
  678. TFB_Registers = record
  679. CS : array[0..5] of TFB_CS;
  680. RESERVED_0 : array[0..23] of byte;
  681. CSPMCR : longword; // *< Chip Select port Multiplexing Control Register, offset: 0x60
  682. end;
  683. const
  684. FB_BASE = $4000C000;
  685. var
  686. FB : TFB_Registers absolute FB_BASE;
  687. type
  688. TFMC_SET = record
  689. DATA_U : longword; // *< Cache Data Storage (upper word), array offset: 0x200, array step: index*0x20, index2*0x8
  690. DATA_L : longword; // *< Cache Data Storage (lower word), array offset: 0x204, array step: index*0x20, index2*0x8
  691. end;
  692. TFMC_Registers = record
  693. PFAPR : longword; // *< Flash Access Protection Register, offset: 0x0
  694. PFB0CR : longword; // *< Flash Bank 0 Control Register, offset: 0x4
  695. PFB1CR : longword; // *< Flash Bank 1 Control Register, offset: 0x8
  696. RESERVED_0 : array[0..243] of byte;
  697. TAGVDW0S : array[0..3] of longword; // *< Cache Tag Storage, array offset: 0x100, array step: 0x4
  698. TAGVDW1S : array[0..3] of longword; // *< Cache Tag Storage, array offset: 0x110, array step: 0x4
  699. TAGVDW2S : array[0..3] of longword; // *< Cache Tag Storage, array offset: 0x120, array step: 0x4
  700. TAGVDW3S : array[0..3] of longword; // *< Cache Tag Storage, array offset: 0x130, array step: 0x4
  701. RESERVED_1 : array[0..191] of byte;
  702. &SET : array[0..3] of TFMC_SET;
  703. end;
  704. const
  705. FMC_BASE = $4001F000;
  706. var
  707. FMC : TFMC_Registers absolute FMC_BASE;
  708. type
  709. TFTFE_Registers = record
  710. FSTAT : byte; // *< Flash Status Register, offset: 0x0
  711. FCNFG : byte; // *< Flash Configuration Register, offset: 0x1
  712. FSEC : byte; // *< Flash Security Register, offset: 0x2
  713. FOPT : byte; // *< Flash Option Register, offset: 0x3
  714. FCCOB3 : byte; // *< Flash Common Command Object Registers, offset: 0x4
  715. FCCOB2 : byte; // *< Flash Common Command Object Registers, offset: 0x5
  716. FCCOB1 : byte; // *< Flash Common Command Object Registers, offset: 0x6
  717. FCCOB0 : byte; // *< Flash Common Command Object Registers, offset: 0x7
  718. FCCOB7 : byte; // *< Flash Common Command Object Registers, offset: 0x8
  719. FCCOB6 : byte; // *< Flash Common Command Object Registers, offset: 0x9
  720. FCCOB5 : byte; // *< Flash Common Command Object Registers, offset: 0xA
  721. FCCOB4 : byte; // *< Flash Common Command Object Registers, offset: 0xB
  722. FCCOBB : byte; // *< Flash Common Command Object Registers, offset: 0xC
  723. FCCOBA : byte; // *< Flash Common Command Object Registers, offset: 0xD
  724. FCCOB9 : byte; // *< Flash Common Command Object Registers, offset: 0xE
  725. FCCOB8 : byte; // *< Flash Common Command Object Registers, offset: 0xF
  726. FPROT3 : byte; // *< Program Flash Protection Registers, offset: 0x10
  727. FPROT2 : byte; // *< Program Flash Protection Registers, offset: 0x11
  728. FPROT1 : byte; // *< Program Flash Protection Registers, offset: 0x12
  729. FPROT0 : byte; // *< Program Flash Protection Registers, offset: 0x13
  730. RESERVED_0 : array[0..1] of byte;
  731. FEPROT : byte; // *< EEPROM Protection Register, offset: 0x16
  732. FDPROT : byte; // *< Data Flash Protection Register, offset: 0x17
  733. end;
  734. const
  735. FTFE_BASE = $40020000;
  736. var
  737. FTFE : TFTFE_Registers absolute FTFE_BASE;
  738. type
  739. TFTM_CONTROLS= record
  740. CnSC : longword; // *< Channel (n) Status And Control, array offset: 0xC, array step: 0x8
  741. CnV : longword; // *< Channel (n) Value, array offset: 0x10, array step: 0x8
  742. end;
  743. TFTM_Registers = record
  744. SC : longword; // *< Status And Control, offset: 0x0
  745. CNT : longword; // *< Counter, offset: 0x4
  746. &MOD : longword; // *< Modulo, offset: 0x8
  747. CONTROLS : array[0..7] of TFTM_CONTROLS;
  748. CNTIN : longword; // *< Counter Initial Value, offset: 0x4C
  749. STATUS : longword; // *< Capture And Compare Status, offset: 0x50
  750. MODE : longword; // *< Features Mode Selection, offset: 0x54
  751. SYNC : longword; // *< Synchronization, offset: 0x58
  752. OUTINIT : longword; // *< Initial State For Channels Output, offset: 0x5C
  753. OUTMASK : longword; // *< Output Mask, offset: 0x60
  754. COMBINE : longword; // *< Function For Linked Channels, offset: 0x64
  755. DEADTIME : longword; // *< Deadtime Insertion Control, offset: 0x68
  756. EXTTRIG : longword; // *< FTM External Trigger, offset: 0x6C
  757. POL : longword; // *< Channels Polarity, offset: 0x70
  758. FMS : longword; // *< Fault Mode Status, offset: 0x74
  759. FILTER : longword; // *< Input Capture Filter Control, offset: 0x78
  760. FLTCTRL : longword; // *< Fault Control, offset: 0x7C
  761. QDCTRL : longword; // *< Quadrature Decoder Control And Status, offset: 0x80
  762. CONF : longword; // *< Configuration, offset: 0x84
  763. FLTPOL : longword; // *< FTM Fault Input Polarity, offset: 0x88
  764. SYNCONF : longword; // *< Synchronization Configuration, offset: 0x8C
  765. INVCTRL : longword; // *< FTM Inverting Control, offset: 0x90
  766. SWOCTRL : longword; // *< FTM Software Output Control, offset: 0x94
  767. PWMLOAD : longword; // *< FTM PWM Load, offset: 0x98
  768. end;
  769. const
  770. FTM0_BASE = $40038000;
  771. var
  772. FTM0 : TFTM_Registers absolute FTM0_BASE;
  773. const
  774. FTM1_BASE = $40039000;
  775. var
  776. FTM1 : TFTM_Registers absolute FTM1_BASE;
  777. const
  778. FTM2_BASE = $4003A000;
  779. var
  780. FTM2 : TFTM_Registers absolute FTM2_BASE;
  781. const
  782. FTM3_BASE = $400B9000;
  783. var
  784. FTM3 : TFTM_Registers absolute FTM3_BASE;
  785. type
  786. TGPIO_Registers = record
  787. PDOR : longword; // *< Port Data Output Register, offset: 0x0
  788. PSOR : longword; // *< Port Set Output Register, offset: 0x4
  789. PCOR : longword; // *< Port Clear Output Register, offset: 0x8
  790. PTOR : longword; // *< Port Toggle Output Register, offset: 0xC
  791. PDIR : longword; // *< Port Data Input Register, offset: 0x10
  792. PDDR : longword; // *< Port Data Direction Register, offset: 0x14
  793. end;
  794. const
  795. PTA_BASE = $400FF000;
  796. var
  797. PTA : TGPIO_Registers absolute PTA_BASE;
  798. const
  799. PTB_BASE = $400FF040;
  800. var
  801. PTB : TGPIO_Registers absolute PTB_BASE;
  802. const
  803. PTC_BASE = $400FF080;
  804. var
  805. PTC : TGPIO_Registers absolute PTC_BASE;
  806. const
  807. PTD_BASE = $400FF0C0;
  808. var
  809. PTD : TGPIO_Registers absolute PTD_BASE;
  810. const
  811. PTE_BASE = $400FF100;
  812. var
  813. PTE : TGPIO_Registers absolute PTE_BASE;
  814. type
  815. TI2C_Registers = record
  816. A1 : byte; // *< I2C Address Register 1, offset: 0x0
  817. F : byte; // *< I2C Frequency Divider register, offset: 0x1
  818. C1 : byte; // *< I2C Control Register 1, offset: 0x2
  819. S : byte; // *< I2C Status register, offset: 0x3
  820. D : byte; // *< I2C Data I/O register, offset: 0x4
  821. C2 : byte; // *< I2C Control Register 2, offset: 0x5
  822. FLT : byte; // *< I2C Programmable Input Glitch Filter register, offset: 0x6
  823. RA : byte; // *< I2C Range Address register, offset: 0x7
  824. SMB : byte; // *< I2C SMBus Control and Status register, offset: 0x8
  825. A2 : byte; // *< I2C Address Register 2, offset: 0x9
  826. SLTH : byte; // *< I2C SCL Low Timeout Register High, offset: 0xA
  827. SLTL : byte; // *< I2C SCL Low Timeout Register Low, offset: 0xB
  828. end;
  829. const
  830. I2C0_BASE = $40066000;
  831. var
  832. I2C0 : TI2C_Registers absolute I2C0_BASE;
  833. const
  834. I2C1_BASE = $40067000;
  835. var
  836. I2C1 : TI2C_Registers absolute I2C1_BASE;
  837. const
  838. I2C2_BASE = $400E6000;
  839. var
  840. I2C2 : TI2C_Registers absolute I2C2_BASE;
  841. type
  842. TI2S_Registers = record
  843. TCSR : longword; // *< SAI Transmit Control Register, offset: 0x0
  844. TCR1 : longword; // *< SAI Transmit Configuration 1 Register, offset: 0x4
  845. TCR2 : longword; // *< SAI Transmit Configuration 2 Register, offset: 0x8
  846. TCR3 : longword; // *< SAI Transmit Configuration 3 Register, offset: 0xC
  847. TCR4 : longword; // *< SAI Transmit Configuration 4 Register, offset: 0x10
  848. TCR5 : longword; // *< SAI Transmit Configuration 5 Register, offset: 0x14
  849. RESERVED_0 : array[0..7] of byte;
  850. TDR : array[0..1] of longword; // *< SAI Transmit Data Register, array offset: 0x20, array step: 0x4
  851. RESERVED_1 : array[0..23] of byte;
  852. TFR : array[0..1] of longword; // *< SAI Transmit FIFO Register, array offset: 0x40, array step: 0x4
  853. RESERVED_2 : array[0..23] of byte;
  854. TMR : longword; // *< SAI Transmit Mask Register, offset: 0x60
  855. RESERVED_3 : array[0..27] of byte;
  856. RCSR : longword; // *< SAI Receive Control Register, offset: 0x80
  857. RCR1 : longword; // *< SAI Receive Configuration 1 Register, offset: 0x84
  858. RCR2 : longword; // *< SAI Receive Configuration 2 Register, offset: 0x88
  859. RCR3 : longword; // *< SAI Receive Configuration 3 Register, offset: 0x8C
  860. RCR4 : longword; // *< SAI Receive Configuration 4 Register, offset: 0x90
  861. RCR5 : longword; // *< SAI Receive Configuration 5 Register, offset: 0x94
  862. RESERVED_4 : array[0..7] of byte;
  863. RDR : array[0..1] of longword; // *< SAI Receive Data Register, array offset: 0xA0, array step: 0x4
  864. RESERVED_5 : array[0..23] of byte;
  865. RFR : array[0..1] of longword; // *< SAI Receive FIFO Register, array offset: 0xC0, array step: 0x4
  866. RESERVED_6 : array[0..23] of byte;
  867. RMR : longword; // *< SAI Receive Mask Register, offset: 0xE0
  868. RESERVED_7 : array[0..27] of byte;
  869. MCR : longword; // *< SAI MCLK Control Register, offset: 0x100
  870. MDR : longword; // *< SAI MCLK Divide Register, offset: 0x104
  871. end;
  872. const
  873. I2S0_BASE = $4002F000;
  874. var
  875. I2S0 : TI2S_Registers absolute I2S0_BASE;
  876. type
  877. TLLWU_Registers = record
  878. PE1 : byte; // *< LLWU Pin Enable 1 register, offset: 0x0
  879. PE2 : byte; // *< LLWU Pin Enable 2 register, offset: 0x1
  880. PE3 : byte; // *< LLWU Pin Enable 3 register, offset: 0x2
  881. PE4 : byte; // *< LLWU Pin Enable 4 register, offset: 0x3
  882. ME : byte; // *< LLWU Module Enable register, offset: 0x4
  883. F1 : byte; // *< LLWU Flag 1 register, offset: 0x5
  884. F2 : byte; // *< LLWU Flag 2 register, offset: 0x6
  885. F3 : byte; // *< LLWU Flag 3 register, offset: 0x7
  886. FILT1 : byte; // *< LLWU Pin Filter 1 register, offset: 0x8
  887. FILT2 : byte; // *< LLWU Pin Filter 2 register, offset: 0x9
  888. RST : byte; // *< LLWU Reset Enable register, offset: 0xA
  889. end;
  890. const
  891. LLWU_BASE = $4007C000;
  892. var
  893. LLWU : TLLWU_Registers absolute LLWU_BASE;
  894. type
  895. TLPTMR_Registers = record
  896. CSR : longword; // *< Low Power Timer Control Status Register, offset: 0x0
  897. PSR : longword; // *< Low Power Timer Prescale Register, offset: 0x4
  898. CMR : longword; // *< Low Power Timer Compare Register, offset: 0x8
  899. CNR : longword; // *< Low Power Timer Counter Register, offset: 0xC
  900. end;
  901. const
  902. LPTMR0_BASE = $40040000;
  903. var
  904. LPTMR0 : TLPTMR_Registers absolute LPTMR0_BASE;
  905. type
  906. TMCG_Registers = record
  907. C1 : byte; // *< MCG Control 1 Register, offset: 0x0
  908. C2 : byte; // *< MCG Control 2 Register, offset: 0x1
  909. C3 : byte; // *< MCG Control 3 Register, offset: 0x2
  910. C4 : byte; // *< MCG Control 4 Register, offset: 0x3
  911. C5 : byte; // *< MCG Control 5 Register, offset: 0x4
  912. C6 : byte; // *< MCG Control 6 Register, offset: 0x5
  913. S : byte; // *< MCG Status Register, offset: 0x6
  914. RESERVED_0 : array[0..0] of byte;
  915. SC : byte; // *< MCG Status and Control Register, offset: 0x8
  916. RESERVED_1 : array[0..0] of byte;
  917. ATCVH : byte; // *< MCG Auto Trim Compare Value High Register, offset: 0xA
  918. ATCVL : byte; // *< MCG Auto Trim Compare Value Low Register, offset: 0xB
  919. C7 : byte; // *< MCG Control 7 Register, offset: 0xC
  920. C8 : byte; // *< MCG Control 8 Register, offset: 0xD
  921. end;
  922. const
  923. MCG_BASE = $40064000;
  924. var
  925. MCG : TMCG_Registers absolute MCG_BASE;
  926. type
  927. TMCM_Registers = record
  928. RESERVED_0 : array[0..7] of byte;
  929. PLASC : word; // *< Crossbar Switch (AXBS) Slave Configuration, offset: 0x8
  930. PLAMC : word; // *< Crossbar Switch (AXBS) Master Configuration, offset: 0xA
  931. CR : longword; // *< Control Register, offset: 0xC
  932. ISCR : longword; // *< Interrupt Status Register, offset: 0x10
  933. ETBCC : longword; // *< ETB Counter Control register, offset: 0x14
  934. ETBRL : longword; // *< ETB Reload register, offset: 0x18
  935. ETBCNT : longword; // *< ETB Counter Value register, offset: 0x1C
  936. RESERVED_1 : array[0..15] of byte;
  937. PID : longword; // *< Process ID register, offset: 0x30
  938. end;
  939. const
  940. MCM_BASE = $E0080000;
  941. var
  942. MCM : TMCM_Registers absolute MCM_BASE;
  943. type
  944. TMPU_SP = record
  945. EAR : longword; // *< Error Address Register, slave port n, array offset: 0x10, array step: 0x8
  946. EDR : longword; // *< Error Detail Register, slave port n, array offset: 0x14, array step: 0x8
  947. end;
  948. TMPU_Registers = record
  949. CESR : longword; // *< Control/Error Status Register, offset: 0x0
  950. RESERVED_0 : array[0..11] of byte;
  951. SP : array[0..4] of TMPU_SP;
  952. RESERVED_1 : array[0..967] of byte;
  953. WORD : array[0..11] of longword; // *< Region Descriptor n, Word 0..Region Descriptor n, Word 3, array offset: 0x400, array step: index*0x10, index2*0x4
  954. RESERVED_2 : array[0..831] of byte;
  955. RGDAAC : array[0..11] of longword; // *< Region Descriptor Alternate Access Control n, array offset: 0x800, array step: 0x4
  956. end;
  957. const
  958. MPU_BASE = $4000D000;
  959. var
  960. MPU : TMPU_Registers absolute MPU_BASE;
  961. type
  962. TNV_Registers = record
  963. BACKKEY3 : byte; // *< Backdoor Comparison Key 3., offset: 0x0
  964. BACKKEY2 : byte; // *< Backdoor Comparison Key 2., offset: 0x1
  965. BACKKEY1 : byte; // *< Backdoor Comparison Key 1., offset: 0x2
  966. BACKKEY0 : byte; // *< Backdoor Comparison Key 0., offset: 0x3
  967. BACKKEY7 : byte; // *< Backdoor Comparison Key 7., offset: 0x4
  968. BACKKEY6 : byte; // *< Backdoor Comparison Key 6., offset: 0x5
  969. BACKKEY5 : byte; // *< Backdoor Comparison Key 5., offset: 0x6
  970. BACKKEY4 : byte; // *< Backdoor Comparison Key 4., offset: 0x7
  971. FPROT3 : byte; // *< Non-volatile P-Flash Protection 1 - Low Register, offset: 0x8
  972. FPROT2 : byte; // *< Non-volatile P-Flash Protection 1 - High Register, offset: 0x9
  973. FPROT1 : byte; // *< Non-volatile P-Flash Protection 0 - Low Register, offset: 0xA
  974. FPROT0 : byte; // *< Non-volatile P-Flash Protection 0 - High Register, offset: 0xB
  975. FSEC : byte; // *< Non-volatile Flash Security Register, offset: 0xC
  976. FOPT : byte; // *< Non-volatile Flash Option Register, offset: 0xD
  977. FEPROT : byte; // *< Non-volatile EERAM Protection Register, offset: 0xE
  978. FDPROT : byte; // *< Non-volatile D-Flash Protection Register, offset: 0xF
  979. end;
  980. const
  981. FTFE_FlashConfig_BASE = $400;
  982. var
  983. FTFE_FlashConfig : TNV_Registers absolute FTFE_FlashConfig_BASE;
  984. type
  985. TOSC_Registers = record
  986. CR : byte; // *< OSC Control Register, offset: 0x0
  987. end;
  988. const
  989. OSC_BASE = $40065000;
  990. var
  991. OSC : TOSC_Registers absolute OSC_BASE;
  992. type
  993. TPDB_CH = record
  994. C1 : longword; // *< Channel n Control register 1, array offset: 0x10, array step: 0x28
  995. S : longword; // *< Channel n Status register, array offset: 0x14, array step: 0x28
  996. DLY : array[0..1] of longword; // *< Channel n Delay 0 register..Channel n Delay 1 register, array offset: 0x18, array step: index*0x28, index2*0x4
  997. RESERVED_0 : array[0..23] of byte;
  998. end;
  999. TPDB_DAC = record
  1000. INTC : longword; // *< DAC Interval Trigger n Control register, array offset: 0x150, array step: 0x8
  1001. INT : longword; // *< DAC Interval n register, array offset: 0x154, array step: 0x8
  1002. end;
  1003. TPDB_Registers = record
  1004. SC : longword; // *< Status and Control register, offset: 0x0
  1005. &MOD : longword; // *< Modulus register, offset: 0x4
  1006. CNT : longword; // *< Counter register, offset: 0x8
  1007. IDLY : longword; // *< Interrupt Delay register, offset: 0xC
  1008. CH : array[0..1] of TPDB_CH;
  1009. RESERVED_0 : array[0..239] of byte;
  1010. DAC : array[0..1] of TPDB_DAC;
  1011. RESERVED_1 : array[0..47] of byte;
  1012. POEN : longword; // *< Pulse-Out n Enable register, offset: 0x190
  1013. PODLY : array[0..2] of longword; // *< Pulse-Out n Delay register, array offset: 0x194, array step: 0x4
  1014. end;
  1015. const
  1016. PDB0_BASE = $40036000;
  1017. var
  1018. PDB0 : TPDB_Registers absolute PDB0_BASE;
  1019. type
  1020. TPIT_CHANNEL = record
  1021. LDVAL : longword; // *< Timer Load Value Register, array offset: 0x100, array step: 0x10
  1022. CVAL : longword; // *< Current Timer Value Register, array offset: 0x104, array step: 0x10
  1023. TCTRL : longword; // *< Timer Control Register, array offset: 0x108, array step: 0x10
  1024. TFLG : longword; // *< Timer Flag Register, array offset: 0x10C, array step: 0x10
  1025. end;
  1026. TPIT_Registers = record
  1027. MCR : longword; // *< PIT Module Control Register, offset: 0x0
  1028. RESERVED_0 : array[0..251] of byte;
  1029. CHANNEL : array[0..3] of TPIT_CHANNEL;
  1030. end;
  1031. const
  1032. PIT_BASE = $40037000;
  1033. var
  1034. PIT : TPIT_Registers absolute PIT_BASE;
  1035. type
  1036. TPMC_Registers = record
  1037. LVDSC1 : byte; // *< Low Voltage Detect Status And Control 1 register, offset: 0x0
  1038. LVDSC2 : byte; // *< Low Voltage Detect Status And Control 2 register, offset: 0x1
  1039. REGSC : byte; // *< Regulator Status And Control register, offset: 0x2
  1040. end;
  1041. const
  1042. PMC_BASE = $4007D000;
  1043. var
  1044. PMC : TPMC_Registers absolute PMC_BASE;
  1045. type
  1046. TPORT_Registers = record
  1047. PCR : array[0..31] of longword; // *< Pin Control Register n, array offset: 0x0, array step: 0x4
  1048. GPCLR : longword; // *< Global Pin Control Low Register, offset: 0x80
  1049. GPCHR : longword; // *< Global Pin Control High Register, offset: 0x84
  1050. RESERVED_0 : array[0..23] of byte;
  1051. ISFR : longword; // *< Interrupt Status Flag Register, offset: 0xA0
  1052. RESERVED_1 : array[0..27] of byte;
  1053. DFER : longword; // *< Digital Filter Enable Register, offset: 0xC0
  1054. DFCR : longword; // *< Digital Filter Clock Register, offset: 0xC4
  1055. DFWR : longword; // *< Digital Filter Width Register, offset: 0xC8
  1056. end;
  1057. const
  1058. PORTA_BASE = $40049000;
  1059. var
  1060. PORTA : TPORT_Registers absolute PORTA_BASE;
  1061. const
  1062. PORTB_BASE = $4004A000;
  1063. var
  1064. PORTB : TPORT_Registers absolute PORTB_BASE;
  1065. const
  1066. PORTC_BASE = $4004B000;
  1067. var
  1068. PORTC : TPORT_Registers absolute PORTC_BASE;
  1069. const
  1070. PORTD_BASE = $4004C000;
  1071. var
  1072. PORTD : TPORT_Registers absolute PORTD_BASE;
  1073. const
  1074. PORTE_BASE = $4004D000;
  1075. var
  1076. PORTE : TPORT_Registers absolute PORTE_BASE;
  1077. type
  1078. TRCM_Registers = record
  1079. SRS0 : byte; // *< System Reset Status Register 0, offset: 0x0
  1080. SRS1 : byte; // *< System Reset Status Register 1, offset: 0x1
  1081. RESERVED_0 : array[0..1] of byte;
  1082. RPFC : byte; // *< Reset Pin Filter Control register, offset: 0x4
  1083. RPFW : byte; // *< Reset Pin Filter Width register, offset: 0x5
  1084. RESERVED_1 : array[0..0] of byte;
  1085. MR : byte; // *< Mode Register, offset: 0x7
  1086. end;
  1087. const
  1088. RCM_BASE = $4007F000;
  1089. var
  1090. RCM : TRCM_Registers absolute RCM_BASE;
  1091. type
  1092. TRFSYS_Registers = record
  1093. REG : array[0..7] of longword; // *< Register file register, array offset: 0x0, array step: 0x4
  1094. end;
  1095. const
  1096. RFSYS_BASE = $40041000;
  1097. var
  1098. RFSYS : TRFSYS_Registers absolute RFSYS_BASE;
  1099. type
  1100. TRFVBAT_Registers = record
  1101. REG : array[0..7] of longword; // *< VBAT register file register, array offset: 0x0, array step: 0x4
  1102. end;
  1103. const
  1104. RFVBAT_BASE = $4003E000;
  1105. var
  1106. RFVBAT : TRFVBAT_Registers absolute RFVBAT_BASE;
  1107. type
  1108. TRNG_Registers = record
  1109. CR : longword; // *< RNGA Control Register, offset: 0x0
  1110. SR : longword; // *< RNGA Status Register, offset: 0x4
  1111. ER : longword; // *< RNGA Entropy Register, offset: 0x8
  1112. &OR : longword; // *< RNGA Output Register, offset: 0xC
  1113. end;
  1114. const
  1115. RNG_BASE = $40029000;
  1116. var
  1117. RNG : TRNG_Registers absolute RNG_BASE;
  1118. type
  1119. TRTC_Registers = record
  1120. TSR : longword; // *< RTC Time Seconds Register, offset: 0x0
  1121. TPR : longword; // *< RTC Time Prescaler Register, offset: 0x4
  1122. TAR : longword; // *< RTC Time Alarm Register, offset: 0x8
  1123. TCR : longword; // *< RTC Time Compensation Register, offset: 0xC
  1124. CR : longword; // *< RTC Control Register, offset: 0x10
  1125. SR : longword; // *< RTC Status Register, offset: 0x14
  1126. LR : longword; // *< RTC Lock Register, offset: 0x18
  1127. IER : longword; // *< RTC Interrupt Enable Register, offset: 0x1C
  1128. RESERVED_0 : array[0..2015] of byte;
  1129. WAR : longword; // *< RTC Write Access Register, offset: 0x800
  1130. RAR : longword; // *< RTC Read Access Register, offset: 0x804
  1131. end;
  1132. const
  1133. RTC_BASE = $4003D000;
  1134. var
  1135. RTC : TRTC_Registers absolute RTC_BASE;
  1136. type
  1137. TSDHC_Registers = record
  1138. DSADDR : longword; // *< DMA System Address register, offset: 0x0
  1139. BLKATTR : longword; // *< Block Attributes register, offset: 0x4
  1140. CMDARG : longword; // *< Command Argument register, offset: 0x8
  1141. XFERTYP : longword; // *< Transfer Type register, offset: 0xC
  1142. CMDRSP : array[0..3] of longword; // *< Command Response 0..Command Response 3, array offset: 0x10, array step: 0x4
  1143. DATPORT : longword; // *< Buffer Data Port register, offset: 0x20
  1144. PRSSTAT : longword; // *< Present State register, offset: 0x24
  1145. PROCTL : longword; // *< Protocol Control register, offset: 0x28
  1146. SYSCTL : longword; // *< System Control register, offset: 0x2C
  1147. IRQSTAT : longword; // *< Interrupt Status register, offset: 0x30
  1148. IRQSTATEN : longword; // *< Interrupt Status Enable register, offset: 0x34
  1149. IRQSIGEN : longword; // *< Interrupt Signal Enable register, offset: 0x38
  1150. AC12ERR : longword; // *< Auto CMD12 Error Status Register, offset: 0x3C
  1151. HTCAPBLT : longword; // *< Host Controller Capabilities, offset: 0x40
  1152. WML : longword; // *< Watermark Level Register, offset: 0x44
  1153. RESERVED_0 : array[0..7] of byte;
  1154. FEVT : longword; // *< Force Event register, offset: 0x50
  1155. ADMAES : longword; // *< ADMA Error Status register, offset: 0x54
  1156. ADSADDR : longword; // *< ADMA System Addressregister, offset: 0x58
  1157. RESERVED_1 : array[0..99] of byte;
  1158. VENDOR : longword; // *< Vendor Specific register, offset: 0xC0
  1159. MMCBOOT : longword; // *< MMC Boot register, offset: 0xC4
  1160. RESERVED_2 : array[0..51] of byte;
  1161. HOSTVER : longword; // *< Host Controller Version, offset: 0xFC
  1162. end;
  1163. const
  1164. SDHC_BASE = $400B1000;
  1165. var
  1166. SDHC : TSDHC_Registers absolute SDHC_BASE;
  1167. type
  1168. TSIM_Registers = record
  1169. SOPT1 : longword; // *< System Options Register 1, offset: 0x0
  1170. SOPT1CFG : longword; // *< SOPT1 Configuration Register, offset: 0x4
  1171. RESERVED_0 : array[0..4091] of byte;
  1172. SOPT2 : longword; // *< System Options Register 2, offset: 0x1004
  1173. RESERVED_1 : array[0..3] of byte;
  1174. SOPT4 : longword; // *< System Options Register 4, offset: 0x100C
  1175. SOPT5 : longword; // *< System Options Register 5, offset: 0x1010
  1176. RESERVED_2 : array[0..3] of byte;
  1177. SOPT7 : longword; // *< System Options Register 7, offset: 0x1018
  1178. RESERVED_3 : array[0..7] of byte;
  1179. SDID : longword; // *< System Device Identification Register, offset: 0x1024
  1180. SCGC1 : longword; // *< System Clock Gating Control Register 1, offset: 0x1028
  1181. SCGC2 : longword; // *< System Clock Gating Control Register 2, offset: 0x102C
  1182. SCGC3 : longword; // *< System Clock Gating Control Register 3, offset: 0x1030
  1183. SCGC4 : longword; // *< System Clock Gating Control Register 4, offset: 0x1034
  1184. SCGC5 : longword; // *< System Clock Gating Control Register 5, offset: 0x1038
  1185. SCGC6 : longword; // *< System Clock Gating Control Register 6, offset: 0x103C
  1186. SCGC7 : longword; // *< System Clock Gating Control Register 7, offset: 0x1040
  1187. CLKDIV1 : longword; // *< System Clock Divider Register 1, offset: 0x1044
  1188. CLKDIV2 : longword; // *< System Clock Divider Register 2, offset: 0x1048
  1189. FCFG1 : longword; // *< Flash Configuration Register 1, offset: 0x104C
  1190. FCFG2 : longword; // *< Flash Configuration Register 2, offset: 0x1050
  1191. UIDH : longword; // *< Unique Identification Register High, offset: 0x1054
  1192. UIDMH : longword; // *< Unique Identification Register Mid-High, offset: 0x1058
  1193. UIDML : longword; // *< Unique Identification Register Mid Low, offset: 0x105C
  1194. UIDL : longword; // *< Unique Identification Register Low, offset: 0x1060
  1195. end;
  1196. const
  1197. SIM_BASE = $40047000;
  1198. var
  1199. SIM : TSIM_Registers absolute SIM_BASE;
  1200. type
  1201. TSMC_Registers = record
  1202. PMPROT : byte; // *< Power Mode Protection register, offset: 0x0
  1203. PMCTRL : byte; // *< Power Mode Control register, offset: 0x1
  1204. VLLSCTRL : byte; // *< VLLS Control register, offset: 0x2
  1205. PMSTAT : byte; // *< Power Mode Status register, offset: 0x3
  1206. end;
  1207. const
  1208. SMC_BASE = $4007E000;
  1209. var
  1210. SMC : TSMC_Registers absolute SMC_BASE;
  1211. type
  1212. TSPI_Registers = record
  1213. MCR : longword; // *< Module Configuration Register, offset: 0x0
  1214. RESERVED_0 : array[0..3] of byte;
  1215. TCR : longword; // *< Transfer Count Register, offset: 0x8
  1216. CTAR : array[0..1] of longword; // *< Clock and Transfer Attributes Register (In Master Mode), array offset: 0xC, array step: 0x4
  1217. RESERVED_1 : array[0..23] of byte;
  1218. SR : longword; // *< Status Register, offset: 0x2C
  1219. RSER : longword; // *< DMA/Interrupt Request Select and Enable Register, offset: 0x30
  1220. PUSHR : longword; // *< PUSH TX FIFO Register In Master Mode, offset: 0x34
  1221. POPR : longword; // *< POP RX FIFO Register, offset: 0x38
  1222. TXFR0 : longword; // *< Transmit FIFO Registers, offset: 0x3C
  1223. TXFR1 : longword; // *< Transmit FIFO Registers, offset: 0x40
  1224. TXFR2 : longword; // *< Transmit FIFO Registers, offset: 0x44
  1225. TXFR3 : longword; // *< Transmit FIFO Registers, offset: 0x48
  1226. RESERVED_2 : array[0..47] of byte;
  1227. RXFR0 : longword; // *< Receive FIFO Registers, offset: 0x7C
  1228. RXFR1 : longword; // *< Receive FIFO Registers, offset: 0x80
  1229. RXFR2 : longword; // *< Receive FIFO Registers, offset: 0x84
  1230. RXFR3 : longword; // *< Receive FIFO Registers, offset: 0x88
  1231. end;
  1232. const
  1233. SPI0_BASE = $4002C000;
  1234. var
  1235. SPI0 : TSPI_Registers absolute SPI0_BASE;
  1236. const
  1237. SPI1_BASE = $4002D000;
  1238. var
  1239. SPI1 : TSPI_Registers absolute SPI1_BASE;
  1240. const
  1241. SPI2_BASE = $400AC000;
  1242. var
  1243. SPI2 : TSPI_Registers absolute SPI2_BASE;
  1244. type
  1245. TUART_Registers = record
  1246. BDH : byte; // *< UART Baud Rate Registers: High, offset: 0x0
  1247. BDL : byte; // *< UART Baud Rate Registers: Low, offset: 0x1
  1248. C1 : byte; // *< UART Control Register 1, offset: 0x2
  1249. C2 : byte; // *< UART Control Register 2, offset: 0x3
  1250. S1 : byte; // *< UART Status Register 1, offset: 0x4
  1251. S2 : byte; // *< UART Status Register 2, offset: 0x5
  1252. C3 : byte; // *< UART Control Register 3, offset: 0x6
  1253. D : byte; // *< UART Data Register, offset: 0x7
  1254. MA1 : byte; // *< UART Match Address Registers 1, offset: 0x8
  1255. MA2 : byte; // *< UART Match Address Registers 2, offset: 0x9
  1256. C4 : byte; // *< UART Control Register 4, offset: 0xA
  1257. C5 : byte; // *< UART Control Register 5, offset: 0xB
  1258. ED : byte; // *< UART Extended Data Register, offset: 0xC
  1259. MODEM : byte; // *< UART Modem Register, offset: 0xD
  1260. IR : byte; // *< UART Infrared Register, offset: 0xE
  1261. RESERVED_0 : array[0..0] of byte;
  1262. PFIFO : byte; // *< UART FIFO Parameters, offset: 0x10
  1263. CFIFO : byte; // *< UART FIFO Control Register, offset: 0x11
  1264. SFIFO : byte; // *< UART FIFO Status Register, offset: 0x12
  1265. TWFIFO : byte; // *< UART FIFO Transmit Watermark, offset: 0x13
  1266. TCFIFO : byte; // *< UART FIFO Transmit Count, offset: 0x14
  1267. RWFIFO : byte; // *< UART FIFO Receive Watermark, offset: 0x15
  1268. RCFIFO : byte; // *< UART FIFO Receive Count, offset: 0x16
  1269. RESERVED_1 : array[0..0] of byte;
  1270. C7816 : byte; // *< UART 7816 Control Register, offset: 0x18
  1271. IE7816 : byte; // *< UART 7816 Interrupt Enable Register, offset: 0x19
  1272. IS7816 : byte; // *< UART 7816 Interrupt Status Register, offset: 0x1A
  1273. WP7816T0 : byte; // *< UART 7816 Wait Parameter Register, offset: 0x1B
  1274. WN7816 : byte; // *< UART 7816 Wait N Register, offset: 0x1C
  1275. WF7816 : byte; // *< UART 7816 Wait FD Register, offset: 0x1D
  1276. ET7816 : byte; // *< UART 7816 Error Threshold Register, offset: 0x1E
  1277. TL7816 : byte; // *< UART 7816 Transmit Length Register, offset: 0x1F
  1278. end;
  1279. const
  1280. UART0_BASE = $4006A000;
  1281. var
  1282. UART0 : TUART_Registers absolute UART0_BASE;
  1283. const
  1284. UART1_BASE = $4006B000;
  1285. var
  1286. UART1 : TUART_Registers absolute UART1_BASE;
  1287. const
  1288. UART2_BASE = $4006C000;
  1289. var
  1290. UART2 : TUART_Registers absolute UART2_BASE;
  1291. const
  1292. UART3_BASE = $4006D000;
  1293. var
  1294. UART3 : TUART_Registers absolute UART3_BASE;
  1295. const
  1296. UART4_BASE = $400EA000;
  1297. var
  1298. UART4 : TUART_Registers absolute UART4_BASE;
  1299. const
  1300. UART5_BASE = $400EB000;
  1301. var
  1302. UART5 : TUART_Registers absolute UART5_BASE;
  1303. type
  1304. TUSB_ENDPOINT= record
  1305. ENDPT : byte; // *< Endpoint Control register, array offset: 0xC0, array step: 0x4
  1306. RESERVED_0 : array[0..2] of byte;
  1307. end;
  1308. TUSB_Registers = record
  1309. PERID : byte; // *< Peripheral ID register, offset: 0x0
  1310. RESERVED_0 : array[0..2] of byte;
  1311. IDCOMP : byte; // *< Peripheral ID Complement register, offset: 0x4
  1312. RESERVED_1 : array[0..2] of byte;
  1313. REV : byte; // *< Peripheral Revision register, offset: 0x8
  1314. RESERVED_2 : array[0..2] of byte;
  1315. ADDINFO : byte; // *< Peripheral Additional Info register, offset: 0xC
  1316. RESERVED_3 : array[0..2] of byte;
  1317. OTGISTAT : byte; // *< OTG Interrupt Status register, offset: 0x10
  1318. RESERVED_4 : array[0..2] of byte;
  1319. OTGICR : byte; // *< OTG Interrupt Control register, offset: 0x14
  1320. RESERVED_5 : array[0..2] of byte;
  1321. OTGSTAT : byte; // *< OTG Status register, offset: 0x18
  1322. RESERVED_6 : array[0..2] of byte;
  1323. OTGCTL : byte; // *< OTG Control register, offset: 0x1C
  1324. RESERVED_7 : array[0..98] of byte;
  1325. ISTAT : byte; // *< Interrupt Status register, offset: 0x80
  1326. RESERVED_8 : array[0..2] of byte;
  1327. INTEN : byte; // *< Interrupt Enable register, offset: 0x84
  1328. RESERVED_9 : array[0..2] of byte;
  1329. ERRSTAT : byte; // *< Error Interrupt Status register, offset: 0x88
  1330. RESERVED_10 : array[0..2] of byte;
  1331. ERREN : byte; // *< Error Interrupt Enable register, offset: 0x8C
  1332. RESERVED_11 : array[0..2] of byte;
  1333. STAT : byte; // *< Status register, offset: 0x90
  1334. RESERVED_12 : array[0..2] of byte;
  1335. CTL : byte; // *< Control register, offset: 0x94
  1336. RESERVED_13 : array[0..2] of byte;
  1337. ADDR : byte; // *< Address register, offset: 0x98
  1338. RESERVED_14 : array[0..2] of byte;
  1339. BDTPAGE1 : byte; // *< BDT Page register 1, offset: 0x9C
  1340. RESERVED_15 : array[0..2] of byte;
  1341. FRMNUML : byte; // *< Frame Number register Low, offset: 0xA0
  1342. RESERVED_16 : array[0..2] of byte;
  1343. FRMNUMH : byte; // *< Frame Number register High, offset: 0xA4
  1344. RESERVED_17 : array[0..2] of byte;
  1345. TOKEN : byte; // *< Token register, offset: 0xA8
  1346. RESERVED_18 : array[0..2] of byte;
  1347. SOFTHLD : byte; // *< SOF Threshold register, offset: 0xAC
  1348. RESERVED_19 : array[0..2] of byte;
  1349. BDTPAGE2 : byte; // *< BDT Page Register 2, offset: 0xB0
  1350. RESERVED_20 : array[0..2] of byte;
  1351. BDTPAGE3 : byte; // *< BDT Page Register 3, offset: 0xB4
  1352. RESERVED_21 : array[0..10] of byte;
  1353. ENDPOINT : array[0..15] of TUSB_ENDPOINT;
  1354. USBCTRL : byte; // *< USB Control register, offset: 0x100
  1355. RESERVED_22 : array[0..2] of byte;
  1356. OBSERVE : byte; // *< USB OTG Observe register, offset: 0x104
  1357. RESERVED_23 : array[0..2] of byte;
  1358. CONTROL : byte; // *< USB OTG Control register, offset: 0x108
  1359. RESERVED_24 : array[0..2] of byte;
  1360. USBTRC0 : byte; // *< USB Transceiver Control register 0, offset: 0x10C
  1361. RESERVED_25 : array[0..6] of byte;
  1362. USBFRMADJUST : byte; // *< Frame Adjust Register, offset: 0x114
  1363. RESERVED_26 : array[0..42] of byte;
  1364. CLK_RECOVER_CTRL : byte; // *< USB Clock recovery control, offset: 0x140
  1365. RESERVED_27 : array[0..2] of byte;
  1366. CLK_RECOVER_IRC_EN : byte; // *< IRC48M oscillator enable register, offset: 0x144
  1367. RESERVED_28 : array[0..22] of byte;
  1368. CLK_RECOVER_INT_STATUS : byte; // *< Clock recovery separated interrupt status, offset: 0x15C
  1369. end;
  1370. const
  1371. USB0_BASE = $40072000;
  1372. var
  1373. USB0 : TUSB_Registers absolute USB0_BASE;
  1374. type
  1375. TUSBDCD_Registers = record
  1376. CONTROL : longword; // *< Control register, offset: 0x0
  1377. CLOCK : longword; // *< Clock register, offset: 0x4
  1378. STATUS : longword; // *< Status register, offset: 0x8
  1379. RESERVED_0 : array[0..3] of byte;
  1380. TIMER0 : longword; // *< TIMER0 register, offset: 0x10
  1381. TIMER1 : longword; // *< TIMER1 register, offset: 0x14
  1382. TIMER2_BC11: longword; // *< TIMER2_BC11 register, offset: 0x18
  1383. end;
  1384. const
  1385. USBDCD_BASE = $40035000;
  1386. var
  1387. USBDCD : TUSBDCD_Registers absolute USBDCD_BASE;
  1388. type
  1389. TVREF_Registers = record
  1390. TRM : byte; // *< VREF Trim Register, offset: 0x0
  1391. SC : byte; // *< VREF Status and Control Register, offset: 0x1
  1392. end;
  1393. const
  1394. VREF_BASE = $40074000;
  1395. var
  1396. VREF : TVREF_Registers absolute VREF_BASE;
  1397. type
  1398. TWDOG_Registers = record
  1399. STCTRLH : word; // *< Watchdog Status and Control Register High, offset: 0x0
  1400. STCTRLL : word; // *< Watchdog Status and Control Register Low, offset: 0x2
  1401. TOVALH : word; // *< Watchdog Time-out Value Register High, offset: 0x4
  1402. TOVALL : word; // *< Watchdog Time-out Value Register Low, offset: 0x6
  1403. WINH : word; // *< Watchdog Window Register High, offset: 0x8
  1404. WINL : word; // *< Watchdog Window Register Low, offset: 0xA
  1405. REFRESH : word; // *< Watchdog Refresh register, offset: 0xC
  1406. UNLOCK : word; // *< Watchdog Unlock register, offset: 0xE
  1407. TMROUTH : word; // *< Watchdog Timer Output Register High, offset: 0x10
  1408. TMROUTL : word; // *< Watchdog Timer Output Register Low, offset: 0x12
  1409. RSTCNT : word; // *< Watchdog Reset Count register, offset: 0x14
  1410. PRESC : word; // *< Watchdog Prescaler register, offset: 0x16
  1411. end;
  1412. const
  1413. WDOG_BASE = $40052000;
  1414. var
  1415. WDOG : TWDOG_Registers absolute WDOG_BASE;
  1416. implementation
  1417. procedure NonMaskableInt_interrupt; external name 'NonMaskableInt_interrupt';
  1418. procedure HardFault_interrupt; external name 'HardFault_interrupt';
  1419. procedure MemoryManagement_interrupt; external name 'MemoryManagement_interrupt';
  1420. procedure BusFault_interrupt; external name 'BusFault_interrupt';
  1421. procedure UsageFault_interrupt; external name 'UsageFault_interrupt';
  1422. procedure SVCall_interrupt; external name 'SVCall_interrupt';
  1423. procedure DebugMonitor_interrupt; external name 'DebugMonitor_interrupt';
  1424. procedure PendSV_interrupt; external name 'PendSV_interrupt';
  1425. procedure SysTick_interrupt; external name 'SysTick_interrupt';
  1426. procedure DMA0_interrupt; external name 'DMA0_interrupt';
  1427. procedure DMA1_interrupt; external name 'DMA1_interrupt';
  1428. procedure DMA2_interrupt; external name 'DMA2_interrupt';
  1429. procedure DMA3_interrupt; external name 'DMA3_interrupt';
  1430. procedure DMA4_interrupt; external name 'DMA4_interrupt';
  1431. procedure DMA5_interrupt; external name 'DMA5_interrupt';
  1432. procedure DMA6_interrupt; external name 'DMA6_interrupt';
  1433. procedure DMA7_interrupt; external name 'DMA7_interrupt';
  1434. procedure DMA8_interrupt; external name 'DMA8_interrupt';
  1435. procedure DMA9_interrupt; external name 'DMA9_interrupt';
  1436. procedure DMA10_interrupt; external name 'DMA10_interrupt';
  1437. procedure DMA11_interrupt; external name 'DMA11_interrupt';
  1438. procedure DMA12_interrupt; external name 'DMA12_interrupt';
  1439. procedure DMA13_interrupt; external name 'DMA13_interrupt';
  1440. procedure DMA14_interrupt; external name 'DMA14_interrupt';
  1441. procedure DMA15_interrupt; external name 'DMA15_interrupt';
  1442. procedure DMA_Error_interrupt; external name 'DMA_Error_interrupt';
  1443. procedure MCM_interrupt; external name 'MCM_interrupt';
  1444. procedure FTFE_interrupt; external name 'FTFE_interrupt';
  1445. procedure Read_Collision_interrupt; external name 'Read_Collision_interrupt';
  1446. procedure LVD_LVW_interrupt; external name 'LVD_LVW_interrupt';
  1447. procedure LLWU_interrupt; external name 'LLWU_interrupt';
  1448. procedure WDOG_EWM_interrupt; external name 'WDOG_EWM_interrupt';
  1449. procedure RNG_interrupt; external name 'RNG_interrupt';
  1450. procedure I2C0_interrupt; external name 'I2C0_interrupt';
  1451. procedure I2C1_interrupt; external name 'I2C1_interrupt';
  1452. procedure SPI0_interrupt; external name 'SPI0_interrupt';
  1453. procedure SPI1_interrupt; external name 'SPI1_interrupt';
  1454. procedure I2S0_Tx_interrupt; external name 'I2S0_Tx_interrupt';
  1455. procedure I2S0_Rx_interrupt; external name 'I2S0_Rx_interrupt';
  1456. procedure UART0_LON_interrupt; external name 'UART0_LON_interrupt';
  1457. procedure UART0_RX_TX_interrupt; external name 'UART0_RX_TX_interrupt';
  1458. procedure UART0_ERR_interrupt; external name 'UART0_ERR_interrupt';
  1459. procedure UART1_RX_TX_interrupt; external name 'UART1_RX_TX_interrupt';
  1460. procedure UART1_ERR_interrupt; external name 'UART1_ERR_interrupt';
  1461. procedure UART2_RX_TX_interrupt; external name 'UART2_RX_TX_interrupt';
  1462. procedure UART2_ERR_interrupt; external name 'UART2_ERR_interrupt';
  1463. procedure UART3_RX_TX_interrupt; external name 'UART3_RX_TX_interrupt';
  1464. procedure UART3_ERR_interrupt; external name 'UART3_ERR_interrupt';
  1465. procedure ADC0_interrupt; external name 'ADC0_interrupt';
  1466. procedure CMP0_interrupt; external name 'CMP0_interrupt';
  1467. procedure CMP1_interrupt; external name 'CMP1_interrupt';
  1468. procedure FTM0_interrupt; external name 'FTM0_interrupt';
  1469. procedure FTM1_interrupt; external name 'FTM1_interrupt';
  1470. procedure FTM2_interrupt; external name 'FTM2_interrupt';
  1471. procedure CMT_interrupt; external name 'CMT_interrupt';
  1472. procedure RTC_interrupt; external name 'RTC_interrupt';
  1473. procedure RTC_Seconds_interrupt; external name 'RTC_Seconds_interrupt';
  1474. procedure PIT0_interrupt; external name 'PIT0_interrupt';
  1475. procedure PIT1_interrupt; external name 'PIT1_interrupt';
  1476. procedure PIT2_interrupt; external name 'PIT2_interrupt';
  1477. procedure PIT3_interrupt; external name 'PIT3_interrupt';
  1478. procedure PDB0_interrupt; external name 'PDB0_interrupt';
  1479. procedure USB0_interrupt; external name 'USB0_interrupt';
  1480. procedure USBDCD_interrupt; external name 'USBDCD_interrupt';
  1481. procedure RESERVED71_interrupt; external name 'RESERVED71_interrupt';
  1482. procedure DAC0_interrupt; external name 'DAC0_interrupt';
  1483. procedure MCG_interrupt; external name 'MCG_interrupt';
  1484. procedure LPTMR0_interrupt; external name 'LPTMR0_interrupt';
  1485. procedure PORTA_interrupt; external name 'PORTA_interrupt';
  1486. procedure PORTB_interrupt; external name 'PORTB_interrupt';
  1487. procedure PORTC_interrupt; external name 'PORTC_interrupt';
  1488. procedure PORTD_interrupt; external name 'PORTD_interrupt';
  1489. procedure PORTE_interrupt; external name 'PORTE_interrupt';
  1490. procedure SWI_interrupt; external name 'SWI_interrupt';
  1491. procedure SPI2_interrupt; external name 'SPI2_interrupt';
  1492. procedure UART4_RX_TX_interrupt; external name 'UART4_RX_TX_interrupt';
  1493. procedure UART4_ERR_interrupt; external name 'UART4_ERR_interrupt';
  1494. procedure UART5_RX_TX_interrupt; external name 'UART5_RX_TX_interrupt';
  1495. procedure UART5_ERR_interrupt; external name 'UART5_ERR_interrupt';
  1496. procedure CMP2_interrupt; external name 'CMP2_interrupt';
  1497. procedure FTM3_interrupt; external name 'FTM3_interrupt';
  1498. procedure DAC1_interrupt; external name 'DAC1_interrupt';
  1499. procedure ADC1_interrupt; external name 'ADC1_interrupt';
  1500. procedure I2C2_interrupt; external name 'I2C2_interrupt';
  1501. procedure CAN0_ORed_Message_buffer_interrupt; external name 'CAN0_ORed_Message_buffer_interrupt';
  1502. procedure CAN0_Bus_Off_interrupt; external name 'CAN0_Bus_Off_interrupt';
  1503. procedure CAN0_Error_interrupt; external name 'CAN0_Error_interrupt';
  1504. procedure CAN0_Tx_Warning_interrupt; external name 'CAN0_Tx_Warning_interrupt';
  1505. procedure CAN0_Rx_Warning_interrupt; external name 'CAN0_Rx_Warning_interrupt';
  1506. procedure CAN0_Wake_Up_interrupt; external name 'CAN0_Wake_Up_interrupt';
  1507. procedure SDHC_interrupt; external name 'SDHC_interrupt';
  1508. procedure ENET_1588_Timer_interrupt; external name 'ENET_1588_Timer_interrupt';
  1509. procedure ENET_Transmit_interrupt; external name 'ENET_Transmit_interrupt';
  1510. procedure ENET_Receive_interrupt; external name 'ENET_Receive_interrupt';
  1511. procedure ENET_Error_interrupt; external name 'ENET_Error_interrupt';
  1512. {$i cortexm4f_start.inc}
  1513. procedure FlashConfiguration; assembler; nostackframe;
  1514. label flash_conf;
  1515. asm
  1516. .section ".flash_config.flash_conf"
  1517. flash_conf:
  1518. .byte 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xFF, 0xFF, 0xFF
  1519. .text
  1520. end;
  1521. procedure LowLevelStartup; assembler; nostackframe; [public, alias: '_LOWLEVELSTART'];
  1522. asm
  1523. // Unlock watchdog
  1524. ldr r0, .LWDOG_BASE
  1525. movw r1, #50464
  1526. strh r1, [r0, #0xE]
  1527. movw r1, #55592
  1528. strh r1, [r0, #0xE]
  1529. nop
  1530. nop
  1531. // Disable watchdog for now
  1532. movs r1, #0
  1533. strh r1, [r0, #0]
  1534. b Startup
  1535. .LWDOG_BASE:
  1536. .long 0x40052000
  1537. end;
  1538. procedure Vectors; assembler; nostackframe;
  1539. label interrupt_vectors;
  1540. asm
  1541. .section ".init.interrupt_vectors"
  1542. interrupt_vectors:
  1543. .long _stack_top
  1544. .long LowLevelStartup // int -15
  1545. .long NonMaskableInt_interrupt // int -14
  1546. .long HardFault_interrupt // int -13
  1547. .long MemoryManagement_interrupt // int -12
  1548. .long BusFault_interrupt // int -11
  1549. .long UsageFault_interrupt // int -10
  1550. .long 0 // int -9
  1551. .long 0 // int -8
  1552. .long 0 // int -7
  1553. .long 0 // int -6
  1554. .long SVCall_interrupt // int -5
  1555. .long DebugMonitor_interrupt // int -4
  1556. .long 0 // int -3
  1557. .long PendSV_interrupt // int -2
  1558. .long SysTick_interrupt // int -1
  1559. .long DMA0_interrupt // int 0
  1560. .long DMA1_interrupt // int 1
  1561. .long DMA2_interrupt // int 2
  1562. .long DMA3_interrupt // int 3
  1563. .long DMA4_interrupt // int 4
  1564. .long DMA5_interrupt // int 5
  1565. .long DMA6_interrupt // int 6
  1566. .long DMA7_interrupt // int 7
  1567. .long DMA8_interrupt // int 8
  1568. .long DMA9_interrupt // int 9
  1569. .long DMA10_interrupt // int 10
  1570. .long DMA11_interrupt // int 11
  1571. .long DMA12_interrupt // int 12
  1572. .long DMA13_interrupt // int 13
  1573. .long DMA14_interrupt // int 14
  1574. .long DMA15_interrupt // int 15
  1575. .long DMA_Error_interrupt // int 16
  1576. .long MCM_interrupt // int 17
  1577. .long FTFE_interrupt // int 18
  1578. .long Read_Collision_interrupt // int 19
  1579. .long LVD_LVW_interrupt // int 20
  1580. .long LLWU_interrupt // int 21
  1581. .long WDOG_EWM_interrupt // int 22
  1582. .long RNG_interrupt // int 23
  1583. .long I2C0_interrupt // int 24
  1584. .long I2C1_interrupt // int 25
  1585. .long SPI0_interrupt // int 26
  1586. .long SPI1_interrupt // int 27
  1587. .long I2S0_Tx_interrupt // int 28
  1588. .long I2S0_Rx_interrupt // int 29
  1589. .long UART0_LON_interrupt // int 30
  1590. .long UART0_RX_TX_interrupt // int 31
  1591. .long UART0_ERR_interrupt // int 32
  1592. .long UART1_RX_TX_interrupt // int 33
  1593. .long UART1_ERR_interrupt // int 34
  1594. .long UART2_RX_TX_interrupt // int 35
  1595. .long UART2_ERR_interrupt // int 36
  1596. .long UART3_RX_TX_interrupt // int 37
  1597. .long UART3_ERR_interrupt // int 38
  1598. .long ADC0_interrupt // int 39
  1599. .long CMP0_interrupt // int 40
  1600. .long CMP1_interrupt // int 41
  1601. .long FTM0_interrupt // int 42
  1602. .long FTM1_interrupt // int 43
  1603. .long FTM2_interrupt // int 44
  1604. .long CMT_interrupt // int 45
  1605. .long RTC_interrupt // int 46
  1606. .long RTC_Seconds_interrupt // int 47
  1607. .long PIT0_interrupt // int 48
  1608. .long PIT1_interrupt // int 49
  1609. .long PIT2_interrupt // int 50
  1610. .long PIT3_interrupt // int 51
  1611. .long PDB0_interrupt // int 52
  1612. .long USB0_interrupt // int 53
  1613. .long USBDCD_interrupt // int 54
  1614. .long RESERVED71_interrupt // int 55
  1615. .long DAC0_interrupt // int 56
  1616. .long MCG_interrupt // int 57
  1617. .long LPTMR0_interrupt // int 58
  1618. .long PORTA_interrupt // int 59
  1619. .long PORTB_interrupt // int 60
  1620. .long PORTC_interrupt // int 61
  1621. .long PORTD_interrupt // int 62
  1622. .long PORTE_interrupt // int 63
  1623. .long SWI_interrupt // int 64
  1624. .long SPI2_interrupt // int 65
  1625. .long UART4_RX_TX_interrupt // int 66
  1626. .long UART4_ERR_interrupt // int 67
  1627. .long UART5_RX_TX_interrupt // int 68
  1628. .long UART5_ERR_interrupt // int 69
  1629. .long CMP2_interrupt // int 70
  1630. .long FTM3_interrupt // int 71
  1631. .long DAC1_interrupt // int 72
  1632. .long ADC1_interrupt // int 73
  1633. .long I2C2_interrupt // int 74
  1634. .long CAN0_ORed_Message_buffer_interrupt // int 75
  1635. .long CAN0_Bus_Off_interrupt // int 76
  1636. .long CAN0_Error_interrupt // int 77
  1637. .long CAN0_Tx_Warning_interrupt // int 78
  1638. .long CAN0_Rx_Warning_interrupt // int 79
  1639. .long CAN0_Wake_Up_interrupt // int 80
  1640. .long SDHC_interrupt // int 81
  1641. .long ENET_1588_Timer_interrupt // int 82
  1642. .long ENET_Transmit_interrupt // int 83
  1643. .long ENET_Receive_interrupt // int 84
  1644. .long ENET_Error_interrupt // int 85
  1645. .weak NonMaskableInt_interrupt
  1646. .weak HardFault_interrupt
  1647. .weak MemoryManagement_interrupt
  1648. .weak BusFault_interrupt
  1649. .weak UsageFault_interrupt
  1650. .weak SVCall_interrupt
  1651. .weak DebugMonitor_interrupt
  1652. .weak PendSV_interrupt
  1653. .weak SysTick_interrupt
  1654. .weak DMA0_interrupt
  1655. .weak DMA1_interrupt
  1656. .weak DMA2_interrupt
  1657. .weak DMA3_interrupt
  1658. .weak DMA4_interrupt
  1659. .weak DMA5_interrupt
  1660. .weak DMA6_interrupt
  1661. .weak DMA7_interrupt
  1662. .weak DMA8_interrupt
  1663. .weak DMA9_interrupt
  1664. .weak DMA10_interrupt
  1665. .weak DMA11_interrupt
  1666. .weak DMA12_interrupt
  1667. .weak DMA13_interrupt
  1668. .weak DMA14_interrupt
  1669. .weak DMA15_interrupt
  1670. .weak DMA_Error_interrupt
  1671. .weak MCM_interrupt
  1672. .weak FTFE_interrupt
  1673. .weak Read_Collision_interrupt
  1674. .weak LVD_LVW_interrupt
  1675. .weak LLWU_interrupt
  1676. .weak WDOG_EWM_interrupt
  1677. .weak RNG_interrupt
  1678. .weak I2C0_interrupt
  1679. .weak I2C1_interrupt
  1680. .weak SPI0_interrupt
  1681. .weak SPI1_interrupt
  1682. .weak I2S0_Tx_interrupt
  1683. .weak I2S0_Rx_interrupt
  1684. .weak UART0_LON_interrupt
  1685. .weak UART0_RX_TX_interrupt
  1686. .weak UART0_ERR_interrupt
  1687. .weak UART1_RX_TX_interrupt
  1688. .weak UART1_ERR_interrupt
  1689. .weak UART2_RX_TX_interrupt
  1690. .weak UART2_ERR_interrupt
  1691. .weak UART3_RX_TX_interrupt
  1692. .weak UART3_ERR_interrupt
  1693. .weak ADC0_interrupt
  1694. .weak CMP0_interrupt
  1695. .weak CMP1_interrupt
  1696. .weak FTM0_interrupt
  1697. .weak FTM1_interrupt
  1698. .weak FTM2_interrupt
  1699. .weak CMT_interrupt
  1700. .weak RTC_interrupt
  1701. .weak RTC_Seconds_interrupt
  1702. .weak PIT0_interrupt
  1703. .weak PIT1_interrupt
  1704. .weak PIT2_interrupt
  1705. .weak PIT3_interrupt
  1706. .weak PDB0_interrupt
  1707. .weak USB0_interrupt
  1708. .weak USBDCD_interrupt
  1709. .weak RESERVED71_interrupt
  1710. .weak DAC0_interrupt
  1711. .weak MCG_interrupt
  1712. .weak LPTMR0_interrupt
  1713. .weak PORTA_interrupt
  1714. .weak PORTB_interrupt
  1715. .weak PORTC_interrupt
  1716. .weak PORTD_interrupt
  1717. .weak PORTE_interrupt
  1718. .weak SWI_interrupt
  1719. .weak SPI2_interrupt
  1720. .weak UART4_RX_TX_interrupt
  1721. .weak UART4_ERR_interrupt
  1722. .weak UART5_RX_TX_interrupt
  1723. .weak UART5_ERR_interrupt
  1724. .weak CMP2_interrupt
  1725. .weak FTM3_interrupt
  1726. .weak DAC1_interrupt
  1727. .weak ADC1_interrupt
  1728. .weak I2C2_interrupt
  1729. .weak CAN0_ORed_Message_buffer_interrupt
  1730. .weak CAN0_Bus_Off_interrupt
  1731. .weak CAN0_Error_interrupt
  1732. .weak CAN0_Tx_Warning_interrupt
  1733. .weak CAN0_Rx_Warning_interrupt
  1734. .weak CAN0_Wake_Up_interrupt
  1735. .weak SDHC_interrupt
  1736. .weak ENET_1588_Timer_interrupt
  1737. .weak ENET_Transmit_interrupt
  1738. .weak ENET_Receive_interrupt
  1739. .weak ENET_Error_interrupt
  1740. .set NonMaskableInt_interrupt, HaltProc
  1741. .set HardFault_interrupt, HaltProc
  1742. .set MemoryManagement_interrupt, HaltProc
  1743. .set BusFault_interrupt, HaltProc
  1744. .set UsageFault_interrupt, HaltProc
  1745. .set SVCall_interrupt, HaltProc
  1746. .set DebugMonitor_interrupt, HaltProc
  1747. .set PendSV_interrupt, HaltProc
  1748. .set SysTick_interrupt, HaltProc
  1749. .set DMA0_interrupt, HaltProc
  1750. .set DMA1_interrupt, HaltProc
  1751. .set DMA2_interrupt, HaltProc
  1752. .set DMA3_interrupt, HaltProc
  1753. .set DMA4_interrupt, HaltProc
  1754. .set DMA5_interrupt, HaltProc
  1755. .set DMA6_interrupt, HaltProc
  1756. .set DMA7_interrupt, HaltProc
  1757. .set DMA8_interrupt, HaltProc
  1758. .set DMA9_interrupt, HaltProc
  1759. .set DMA10_interrupt, HaltProc
  1760. .set DMA11_interrupt, HaltProc
  1761. .set DMA12_interrupt, HaltProc
  1762. .set DMA13_interrupt, HaltProc
  1763. .set DMA14_interrupt, HaltProc
  1764. .set DMA15_interrupt, HaltProc
  1765. .set DMA_Error_interrupt, HaltProc
  1766. .set MCM_interrupt, HaltProc
  1767. .set FTFE_interrupt, HaltProc
  1768. .set Read_Collision_interrupt, HaltProc
  1769. .set LVD_LVW_interrupt, HaltProc
  1770. .set LLWU_interrupt, HaltProc
  1771. .set WDOG_EWM_interrupt, HaltProc
  1772. .set RNG_interrupt, HaltProc
  1773. .set I2C0_interrupt, HaltProc
  1774. .set I2C1_interrupt, HaltProc
  1775. .set SPI0_interrupt, HaltProc
  1776. .set SPI1_interrupt, HaltProc
  1777. .set I2S0_Tx_interrupt, HaltProc
  1778. .set I2S0_Rx_interrupt, HaltProc
  1779. .set UART0_LON_interrupt, HaltProc
  1780. .set UART0_RX_TX_interrupt, HaltProc
  1781. .set UART0_ERR_interrupt, HaltProc
  1782. .set UART1_RX_TX_interrupt, HaltProc
  1783. .set UART1_ERR_interrupt, HaltProc
  1784. .set UART2_RX_TX_interrupt, HaltProc
  1785. .set UART2_ERR_interrupt, HaltProc
  1786. .set UART3_RX_TX_interrupt, HaltProc
  1787. .set UART3_ERR_interrupt, HaltProc
  1788. .set ADC0_interrupt, HaltProc
  1789. .set CMP0_interrupt, HaltProc
  1790. .set CMP1_interrupt, HaltProc
  1791. .set FTM0_interrupt, HaltProc
  1792. .set FTM1_interrupt, HaltProc
  1793. .set FTM2_interrupt, HaltProc
  1794. .set CMT_interrupt, HaltProc
  1795. .set RTC_interrupt, HaltProc
  1796. .set RTC_Seconds_interrupt, HaltProc
  1797. .set PIT0_interrupt, HaltProc
  1798. .set PIT1_interrupt, HaltProc
  1799. .set PIT2_interrupt, HaltProc
  1800. .set PIT3_interrupt, HaltProc
  1801. .set PDB0_interrupt, HaltProc
  1802. .set USB0_interrupt, HaltProc
  1803. .set USBDCD_interrupt, HaltProc
  1804. .set RESERVED71_interrupt, HaltProc
  1805. .set DAC0_interrupt, HaltProc
  1806. .set MCG_interrupt, HaltProc
  1807. .set LPTMR0_interrupt, HaltProc
  1808. .set PORTA_interrupt, HaltProc
  1809. .set PORTB_interrupt, HaltProc
  1810. .set PORTC_interrupt, HaltProc
  1811. .set PORTD_interrupt, HaltProc
  1812. .set PORTE_interrupt, HaltProc
  1813. .set SWI_interrupt, HaltProc
  1814. .set SPI2_interrupt, HaltProc
  1815. .set UART4_RX_TX_interrupt, HaltProc
  1816. .set UART4_ERR_interrupt, HaltProc
  1817. .set UART5_RX_TX_interrupt, HaltProc
  1818. .set UART5_ERR_interrupt, HaltProc
  1819. .set CMP2_interrupt, HaltProc
  1820. .set FTM3_interrupt, HaltProc
  1821. .set DAC1_interrupt, HaltProc
  1822. .set ADC1_interrupt, HaltProc
  1823. .set I2C2_interrupt, HaltProc
  1824. .set CAN0_ORed_Message_buffer_interrupt, HaltProc
  1825. .set CAN0_Bus_Off_interrupt, HaltProc
  1826. .set CAN0_Error_interrupt, HaltProc
  1827. .set CAN0_Tx_Warning_interrupt, HaltProc
  1828. .set CAN0_Rx_Warning_interrupt, HaltProc
  1829. .set CAN0_Wake_Up_interrupt, HaltProc
  1830. .set SDHC_interrupt, HaltProc
  1831. .set ENET_1588_Timer_interrupt, HaltProc
  1832. .set ENET_Transmit_interrupt, HaltProc
  1833. .set ENET_Receive_interrupt, HaltProc
  1834. .set ENET_Error_interrupt, HaltProc
  1835. .text
  1836. end;
  1837. end.