nrf52832.pp 159 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431
  1. unit nrf52832;
  2. {$goto on}
  3. interface
  4. {************************************************************************************************** } {*
  5. * @file nrf52.h
  6. *
  7. * @brief CMSIS Cortex-M4 Peripheral Access Layer Header File for
  8. * nrf52 from Nordic Semiconductor.
  9. *
  10. * @version V1
  11. * @date 23. February 2016
  12. *
  13. * @note Generated with SVDConv V2.81d
  14. * from CMSIS SVD File 'nrf52.xml' Version 1,
  15. *
  16. * The Contents of this file are made available subject to the terms of
  17. * the BSD license.
  18. *
  19. * @par Copyright (c) 2015, Nordic Semiconductor ASA
  20. * All rights reserved.
  21. *
  22. * Redistribution and use in source and binary forms, with or without
  23. * modification, are permitted provided that the following conditions are met:
  24. *
  25. * * Redistributions of source code must retain the above copyright notice, this
  26. * list of conditions and the following disclaimer.
  27. *
  28. * * Redistributions in binary form must reproduce the above copyright notice,
  29. * this list of conditions and the following disclaimer in the documentation
  30. * and/or other materials provided with the distribution.
  31. *
  32. * * Neither the name of Nordic Semiconductor ASA nor the names of its
  33. * contributors may be used to endorse or promote products derived from
  34. * this software without specific prior written permission.
  35. *
  36. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  37. * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  38. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  39. * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
  40. * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  41. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  42. * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  43. * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  44. * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  45. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  46. *
  47. *
  48. ****************************************************************************************************** }
  49. { ------------------------- Interrupt Number Definition ------------------------ }
  50. type
  51. TIRQn_Enum = (
  52. { ------------------- Cortex-M4 Processor Exceptions Numbers ------------------- }
  53. Reset_IRQn = -15, { 1 Reset Vector, invoked on Power up and warm reset }
  54. NonMaskableInt_IRQn = -14, { 2 Non maskable Interrupt, cannot be stopped or preempted }
  55. HardFault_IRQn = -13, { 3 Hard Fault, all classes of Fault }
  56. MemoryManagement_IRQn = -12, { 4 Memory Management, MPU mismatch, including Access Violation
  57. and No Match }
  58. BusFault_IRQn = -11, { 5 Bus Fault, Pre-Fetch-, Memory Access Fault, other address/memory
  59. related Fault }
  60. UsageFault_IRQn = -10, { 6 Usage Fault, i.e. Undef Instruction, Illegal State Transition }
  61. SVCall_IRQn = -5, { 11 System Service Call via SVC instruction }
  62. DebugMonitor_IRQn = -4, { 12 Debug Monitor }
  63. PendSV_IRQn = -2, { 14 Pendable request for system service }
  64. SysTick_IRQn = -1, { 15 System Tick Timer }
  65. { ---------------------- nrf52 Specific Interrupt Numbers ---------------------- }
  66. POWER_CLOCK_IRQn = 0, { 0 POWER_CLOCK }
  67. RADIO_IRQn = 1, { 1 RADIO }
  68. UARTE0_UART0_IRQn = 2, { 2 UARTE0_UART0 }
  69. SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQn= 3, { 3 SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0 }
  70. SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQn= 4, { 4 SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1 }
  71. NFCT_IRQn = 5, { 5 NFCT }
  72. GPIOTE_IRQn = 6, { 6 GPIOTE }
  73. SAADC_IRQn = 7, { 7 SAADC }
  74. TIMER0_IRQn = 8, { 8 TIMER0 }
  75. TIMER1_IRQn = 9, { 9 TIMER1 }
  76. TIMER2_IRQn = 10, { 10 TIMER2 }
  77. RTC0_IRQn = 11, { 11 RTC0 }
  78. TEMP_IRQn = 12, { 12 TEMP }
  79. RNG_IRQn = 13, { 13 RNG }
  80. ECB_IRQn = 14, { 14 ECB }
  81. CCM_AAR_IRQn = 15, { 15 CCM_AAR }
  82. WDT_IRQn = 16, { 16 WDT }
  83. RTC1_IRQn = 17, { 17 RTC1 }
  84. QDEC_IRQn = 18, { 18 QDEC }
  85. COMP_LPCOMP_IRQn = 19, { 19 COMP_LPCOMP }
  86. SWI0_EGU0_IRQn = 20, { 20 SWI0_EGU0 }
  87. SWI1_EGU1_IRQn = 21, { 21 SWI1_EGU1 }
  88. SWI2_EGU2_IRQn = 22, { 22 SWI2_EGU2 }
  89. SWI3_EGU3_IRQn = 23, { 23 SWI3_EGU3 }
  90. SWI4_EGU4_IRQn = 24, { 24 SWI4_EGU4 }
  91. SWI5_EGU5_IRQn = 25, { 25 SWI5_EGU5 }
  92. TIMER3_IRQn = 26, { 26 TIMER3 }
  93. TIMER4_IRQn = 27, { 27 TIMER4 }
  94. PWM0_IRQn = 28, { 28 PWM0 }
  95. PDM_IRQn = 29, { 29 PDM }
  96. MWU_IRQn = 32, { 32 MWU }
  97. PWM1_IRQn = 33, { 33 PWM1 }
  98. PWM2_IRQn = 34, { 34 PWM2 }
  99. SPIM2_SPIS2_SPI2_IRQn = 35, { 35 SPIM2_SPIS2_SPI2 }
  100. RTC2_IRQn = 36, { 36 RTC2 }
  101. I2S_IRQn = 37, { 37 I2S }
  102. FPU_IRQn = 38 { 38 FPU }
  103. );
  104. { ================================================================================ }
  105. { ================ Processor and Core Peripheral Section ================ }
  106. { ================================================================================ }
  107. { ----------------Configuration of the Cortex-M4 Processor and Core Peripherals---------------- }
  108. const
  109. __CM4_REV = $0001; { Cortex-M4 Core Revision }
  110. __MPU_PRESENT = 1; { MPU present or not }
  111. __NVIC_PRIO_BITS = 3; { Number of Bits used for Priority Levels }
  112. __Vendor_SysTickConfig = 0; { Set to 1 if different SysTick Config is used }
  113. __FPU_PRESENT = 1; { FPU present or not }
  114. { ================================================================================ }
  115. { ================ Device Specific Peripheral Section ================ }
  116. { ================================================================================ }
  117. type
  118. FICR_INFO_Type = record
  119. PART, { Part code }
  120. VARIANT_, { Part Variant, Hardware version and Production configuration }
  121. PACKAGE, { Package option }
  122. RAM, { RAM variant }
  123. FLASH: longword; { Flash variant }
  124. UNUSED0: array [0..2] of longword; { Description collection[0]: Unspecified }
  125. end;
  126. FICR_TEMP_Type = record
  127. A0, { Slope definition A0. }
  128. A1, { Slope definition A1. }
  129. A2, { Slope definition A2. }
  130. A3, { Slope definition A3. }
  131. A4, { Slope definition A4. }
  132. A5, { Slope definition A5. }
  133. B0, { y-intercept B0. }
  134. B1, { y-intercept B1. }
  135. B2, { y-intercept B2. }
  136. B3, { y-intercept B3. }
  137. B4, { y-intercept B4. }
  138. B5, { y-intercept B5. }
  139. T0, { Segment end T0. }
  140. T1, { Segment end T1. }
  141. T2, { Segment end T2. }
  142. T3, { Segment end T3. }
  143. T4: longword; { Segment end T4. }
  144. end;
  145. FICR_NFC_Type = record
  146. TAGHEADER0, { Default header for NFC Tag. Software can read these values to
  147. populate NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST. }
  148. TAGHEADER1, { Default header for NFC Tag. Software can read these values to
  149. populate NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST. }
  150. TAGHEADER2, { Default header for NFC Tag. Software can read these values to
  151. populate NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST. }
  152. TAGHEADER3: longword; { Default header for NFC Tag. Software can read these values to
  153. populate NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST. }
  154. end;
  155. POWER_RAM_Type = record
  156. POWER, { Description cluster[0]: RAM0 power control register }
  157. POWERSET, { Description cluster[0]: RAM0 power control set register }
  158. POWERCLR, { Description cluster[0]: RAM0 power control clear register }
  159. RESERVED0: longword;
  160. end;
  161. AMLI_RAMPRI_Type = record
  162. CPU0, { AHB bus master priority register for CPU0 }
  163. SPIS1, { AHB bus master priority register for SPIM1, SPIS1, TWIM1 and
  164. TWIS1 }
  165. RADIO, { AHB bus master priority register for RADIO }
  166. ECB, { AHB bus master priority register for ECB }
  167. CCM, { AHB bus master priority register for CCM }
  168. AAR, { AHB bus master priority register for AAR }
  169. SAADC, { AHB bus master priority register for SAADC }
  170. UARTE, { AHB bus master priority register for UARTE }
  171. SERIAL0, { AHB bus master priority register for SPIM0, SPIS0, TWIM0 and
  172. TWIS0 }
  173. SERIAL2, { AHB bus master priority register for SPIM2 and SPIS2 }
  174. NFCT, { AHB bus master priority register for NFCT }
  175. I2S, { AHB bus master priority register for I2S }
  176. PDM, { AHB bus master priority register for PDM }
  177. PWM: longword; { AHB bus master priority register for PWM0, PWM1 and PWM2 }
  178. end;
  179. UARTE_PSEL_Type = record
  180. RTS, { Pin select for RTS signal }
  181. TXD, { Pin select for TXD signal }
  182. CTS, { Pin select for CTS signal }
  183. RXD: longword; { Pin select for RXD signal }
  184. end;
  185. UARTE_RXD_Type = record
  186. PTR, { Data pointer }
  187. MAXCNT, { Maximum number of bytes in receive buffer }
  188. AMOUNT: longword; { Number of bytes transferred in the last transaction }
  189. end;
  190. UARTE_TXD_Type = record
  191. PTR, { Data pointer }
  192. MAXCNT, { Maximum number of bytes in transmit buffer }
  193. AMOUNT: longword; { Number of bytes transferred in the last transaction }
  194. end;
  195. SPIM_PSEL_Type = record
  196. SCK, { Pin select for SCK }
  197. MOSI, { Pin select for MOSI signal }
  198. MISO: longword; { Pin select for MISO signal }
  199. end;
  200. SPIM_RXD_Type = record
  201. PTR, { Data pointer }
  202. MAXCNT, { Maximum number of bytes in receive buffer }
  203. AMOUNT, { Number of bytes transferred in the last transaction }
  204. LIST: longword; { EasyDMA list type }
  205. end;
  206. SPIM_TXD_Type = record
  207. PTR, { Data pointer }
  208. MAXCNT, { Maximum number of bytes in transmit buffer }
  209. AMOUNT, { Number of bytes transferred in the last transaction }
  210. LIST: longword; { EasyDMA list type }
  211. end;
  212. SPIS_PSEL_Type = record
  213. SCK, { Pin select for SCK }
  214. MISO, { Pin select for MISO signal }
  215. MOSI, { Pin select for MOSI signal }
  216. CSN: longword; { Pin select for CSN signal }
  217. end;
  218. SPIS_RXD_Type = record
  219. PTR, { RXD data pointer }
  220. MAXCNT, { Maximum number of bytes in receive buffer }
  221. AMOUNT: longword; { Number of bytes received in last granted transaction }
  222. end;
  223. SPIS_TXD_Type = record
  224. PTR, { TXD data pointer }
  225. MAXCNT, { Maximum number of bytes in transmit buffer }
  226. AMOUNT: longword; { Number of bytes transmitted in last granted transaction }
  227. end;
  228. TWIM_PSEL_Type = record
  229. SCL, { Pin select for SCL signal }
  230. SDA: longword; { Pin select for SDA signal }
  231. end;
  232. TWIM_RXD_Type = record
  233. PTR, { Data pointer }
  234. MAXCNT, { Maximum number of bytes in receive buffer }
  235. AMOUNT, { Number of bytes transferred in the last transaction }
  236. LIST: longword; { EasyDMA list type }
  237. end;
  238. TWIM_TXD_Type = record
  239. PTR, { Data pointer }
  240. MAXCNT, { Maximum number of bytes in transmit buffer }
  241. AMOUNT, { Number of bytes transferred in the last transaction }
  242. LIST: longword; { EasyDMA list type }
  243. end;
  244. TWIS_PSEL_Type = record
  245. SCL, { Pin select for SCL signal }
  246. SDA: longword; { Pin select for SDA signal }
  247. end;
  248. TWIS_RXD_Type = record
  249. PTR, { RXD Data pointer }
  250. MAXCNT, { Maximum number of bytes in RXD buffer }
  251. AMOUNT: longword; { Number of bytes transferred in the last RXD transaction }
  252. end;
  253. TWIS_TXD_Type = record
  254. PTR, { TXD Data pointer }
  255. MAXCNT, { Maximum number of bytes in TXD buffer }
  256. AMOUNT: longword; { Number of bytes transferred in the last TXD transaction }
  257. end;
  258. SPI_PSEL_Type = record
  259. SCK, { Pin select for SCK }
  260. MOSI, { Pin select for MOSI }
  261. MISO: longword; { Pin select for MISO }
  262. end;
  263. NFCT_FRAMESTATUS_Type = record
  264. RX: longword; { Result of last incoming frames }
  265. end;
  266. NFCT_TXD_Type = record
  267. FRAMECONFIG, { Configuration of outgoing frames }
  268. AMOUNT: longword; { Size of outgoing frame }
  269. end;
  270. NFCT_RXD_Type = record
  271. FRAMECONFIG, { Configuration of incoming frames }
  272. AMOUNT: longword; { Size of last incoming frame }
  273. end;
  274. SAADC_EVENTS_CH_Type = record
  275. LIMITH, { Description cluster[0]: Last results is equal or above CH[0].LIMIT.HIGH }
  276. LIMITL: longword; { Description cluster[0]: Last results is equal or below CH[0].LIMIT.LOW }
  277. end;
  278. SAADC_CH_Type = record
  279. PSELP, { Description cluster[0]: Input positive pin selection for CH[0] }
  280. PSELN, { Description cluster[0]: Input negative pin selection for CH[0] }
  281. CONFIG, { Description cluster[0]: Input configuration for CH[0] }
  282. LIMIT: longword; { Description cluster[0]: High/low limits for event monitoring
  283. a channel }
  284. end;
  285. SAADC_RESULT_Type = record
  286. PTR, { Data pointer }
  287. MAXCNT, { Maximum number of buffer words to transfer }
  288. AMOUNT: longword; { Number of buffer words transferred since last START }
  289. end;
  290. QDEC_PSEL_Type = record
  291. LED, { Pin select for LED signal }
  292. A, { Pin select for A signal }
  293. B: longword; { Pin select for B signal }
  294. end;
  295. PWM_SEQ_Type = record
  296. PTR, { Description cluster[0]: Beginning address in Data RAM of sequence
  297. A }
  298. CNT, { Description cluster[0]: Amount of values (duty cycles) in sequence
  299. A }
  300. REFRESH, { Description cluster[0]: Amount of additional PWM periods between
  301. samples loaded to compare register (load every CNT+1 PWM periods) }
  302. ENDDELAY: longword; { Description cluster[0]: Time added after the sequence }
  303. RESERVED1: array [0..3] of longword;
  304. end;
  305. PWM_PSEL_Type = record
  306. OUT: array [0..3] of longword; { Description collection[0]: Output pin select for PWM channel
  307. 0 }
  308. end;
  309. PDM_PSEL_Type = record
  310. CLK, { Pin number configuration for PDM CLK signal }
  311. DIN: longword; { Pin number configuration for PDM DIN signal }
  312. end;
  313. PDM_SAMPLE_Type = record
  314. PTR, { RAM address pointer to write samples to with EasyDMA }
  315. MAXCNT: longword; { Number of samples to allocate memory for in EasyDMA mode }
  316. end;
  317. PPI_TASKS_CHG_Type = record
  318. EN, { Description cluster[0]: Enable channel group 0 }
  319. DIS: longword; { Description cluster[0]: Disable channel group 0 }
  320. end;
  321. PPI_CH_Type = record
  322. EEP, { Description cluster[0]: Channel 0 event end-point }
  323. TEP: longword; { Description cluster[0]: Channel 0 task end-point }
  324. end;
  325. PPI_FORK_Type = record
  326. TEP: longword; { Description cluster[0]: Channel 0 task end-point }
  327. end;
  328. MWU_EVENTS_REGION_Type = record
  329. WA, { Description cluster[0]: Write access to region 0 detected }
  330. RA: longword; { Description cluster[0]: Read access to region 0 detected }
  331. end;
  332. MWU_EVENTS_PREGION_Type = record
  333. WA, { Description cluster[0]: Write access to peripheral region 0
  334. detected }
  335. RA: longword; { Description cluster[0]: Read access to peripheral region 0 detected }
  336. end;
  337. MWU_PERREGION_Type = record
  338. SUBSTATWA, { Description cluster[0]: Source of event/interrupt in region 0,
  339. write access detected while corresponding subregion was enabled
  340. for watching }
  341. SUBSTATRA: longword; { Description cluster[0]: Source of event/interrupt in region 0,
  342. read access detected while corresponding subregion was enabled
  343. for watching }
  344. end;
  345. MWU_REGION_Type = record
  346. START, { Description cluster[0]: Start address for region 0 }
  347. END_, { Description cluster[0]: End address of region 0 }
  348. RESERVED2: array [0..1] of longword;
  349. end;
  350. MWU_PREGION_Type = record
  351. START, { Description cluster[0]: Reserved for future use }
  352. END_, { Description cluster[0]: Reserved for future use }
  353. SUBS, { Description cluster[0]: Subregions of region 0 }
  354. RESERVED3: longword;
  355. end;
  356. I2S_CONFIG_Type = record
  357. MODE, { I<sup>2</sup>S mode. }
  358. RXEN, { Reception (RX) enable. }
  359. TXEN, { Transmission (TX) enable. }
  360. MCKEN, { Master clock generator enable. }
  361. MCKFREQ, { Master clock generator frequency. }
  362. RATIO, { MCK / LRCK ratio. }
  363. SWIDTH, { Sample width. }
  364. ALIGN, { Alignment of sample within a frame. }
  365. FORMAT, { Frame format. }
  366. CHANNELS: longword; { Enable channels. }
  367. end;
  368. I2S_RXD_Type = record
  369. PTR: longword; { Receive buffer RAM start address. }
  370. end;
  371. I2S_TXD_Type = record
  372. PTR: longword; { Transmit buffer RAM start address. }
  373. end;
  374. I2S_RXTXD_Type = record
  375. MAXCNT: longword; { Size of RXD and TXD buffers. }
  376. end;
  377. I2S_PSEL_Type = record
  378. MCK, { Pin select for MCK signal. }
  379. SCK, { Pin select for SCK signal. }
  380. LRCK, { Pin select for LRCK signal. }
  381. SDIN, { Pin select for SDIN signal. }
  382. SDOUT: longword; { Pin select for SDOUT signal. }
  383. end;
  384. { ================================================================================ }
  385. { ================ FICR ================ }
  386. { ================================================================================ }
  387. {
  388. Factory Information Configuration Registers (FICR)
  389. }
  390. NRF_FICR_Type = record { FICR Structure }
  391. RESERVED0: array [0..3] of longword;
  392. CODEPAGESIZE, { Code memory page size }
  393. CODESIZE: longword; { Code memory size }
  394. RESERVED1: array [0..17] of longword;
  395. DEVICEID: array [0..1] of longword; { Description collection[0]: Device identifier }
  396. RESERVED2: array [0..5] of longword;
  397. ER: array [0..3] of longword; { Description collection[0]: Encryption Root, word 0 }
  398. IR: array [0..3] of longword; { Description collection[0]: Identity Root, word 0 }
  399. DEVICEADDRTYPE: longword; { Device address type }
  400. DEVICEADDR: array [0..1] of longword; { Description collection[0]: Device address 0 }
  401. RESERVED3: array [0..20] of longword;
  402. INFO: FICR_INFO_Type; { Device info }
  403. RESERVED4: array [0..184] of longword;
  404. TEMP: FICR_TEMP_Type; { Registers storing factory TEMP module linearization coefficients }
  405. RESERVED5: array [0..1] of longword;
  406. NFC: FICR_NFC_Type; { Unspecified }
  407. end;
  408. { ================================================================================ }
  409. { ================ UICR ================ }
  410. { ================================================================================ }
  411. {
  412. User Information Configuration Registers (UICR)
  413. }
  414. NRF_UICR_Type = record { UICR Structure }
  415. UNUSED0, { Unspecified }
  416. UNUSED1, { Unspecified }
  417. UNUSED2, { Unspecified }
  418. RESERVED0,
  419. UNUSED3: longword; { Unspecified }
  420. NRFFW: array [0..14] of longword; { Description collection[0]: Reserved for Nordic firmware design }
  421. NRFHW: array [0..11] of longword; { Description collection[0]: Reserved for Nordic hardware design }
  422. CUSTOMER: array [0..31] of longword; { Description collection[0]: Reserved for customer }
  423. RESERVED1: array [0..63] of longword;
  424. PSELRESET: array [0..1] of longword; { Description collection[0]: Mapping of the nRESET function (see
  425. POWER chapter for details) }
  426. APPROTECT, { Access Port protection }
  427. NFCPINS: longword; { Setting of pins dedicated to NFC functionality: NFC antenna
  428. or GPIO }
  429. end;
  430. { ================================================================================ }
  431. { ================ BPROT ================ }
  432. { ================================================================================ }
  433. {
  434. Block Protect (BPROT)
  435. }
  436. NRF_BPROT_Type = record { BPROT Structure }
  437. RESERVED0: array [0..383] of longword;
  438. CONFIG0, { Block protect configuration register 0 }
  439. CONFIG1, { Block protect configuration register 1 }
  440. DISABLEINDEBUG, { Disable protection mechanism in debug interface mode }
  441. UNUSED0, { Unspecified }
  442. CONFIG2, { Block protect configuration register 2 }
  443. CONFIG3: longword; { Block protect configuration register 3 }
  444. end;
  445. { ================================================================================ }
  446. { ================ POWER ================ }
  447. { ================================================================================ }
  448. {
  449. Power control (POWER)
  450. }
  451. NRF_POWER_Type = record { POWER Structure }
  452. RESERVED0: array [0..29] of longword;
  453. TASKS_CONSTLAT, { Enable constant latency mode }
  454. TASKS_LOWPWR: longword; { Enable low power mode (variable latency) }
  455. RESERVED1: array [0..33] of longword;
  456. EVENTS_POFWARN: longword; { Power failure warning }
  457. RESERVED2: array [0..1] of longword;
  458. EVENTS_SLEEPENTER, { CPU entered WFI/WFE sleep }
  459. EVENTS_SLEEPEXIT: longword; { CPU exited WFI/WFE sleep }
  460. RESERVED3: array [0..121] of longword;
  461. INTENSET, { Enable interrupt }
  462. INTENCLR: longword; { Disable interrupt }
  463. RESERVED4: array [0..60] of longword;
  464. RESETREAS: longword; { Reset reason }
  465. RESERVED5: array [0..8] of longword;
  466. RAMSTATUS: longword; { Deprecated register - RAM status register }
  467. RESERVED6: array [0..52] of longword;
  468. SYSTEMOFF: longword; { System OFF register }
  469. RESERVED7: array [0..2] of longword;
  470. POFCON: longword; { Power failure comparator configuration }
  471. RESERVED8: array [0..1] of longword;
  472. GPREGRET, { General purpose retention register }
  473. GPREGRET2, { General purpose retention register }
  474. RAMON: longword; { Deprecated register - RAM on/off register (this register is
  475. retained) }
  476. RESERVED9: array [0..10] of longword;
  477. RAMONB: longword; { Deprecated register - RAM on/off register (this register is
  478. retained) }
  479. RESERVED10: array [0..7] of longword;
  480. DCDCEN: longword; { DC/DC enable register }
  481. RESERVED11: array [0..224] of longword;
  482. RAM: array [0..7] of POWER_RAM_Type; { Unspecified }
  483. end;
  484. { ================================================================================ }
  485. { ================ CLOCK ================ }
  486. { ================================================================================ }
  487. {
  488. Clock control (CLOCK)
  489. }
  490. NRF_CLOCK_Type = record { CLOCK Structure }
  491. TASKS_HFCLKSTART, { Start HFCLK crystal oscillator }
  492. TASKS_HFCLKSTOP, { Stop HFCLK crystal oscillator }
  493. TASKS_LFCLKSTART, { Start LFCLK source }
  494. TASKS_LFCLKSTOP, { Stop LFCLK source }
  495. TASKS_CAL, { Start calibration of LFRC oscillator }
  496. TASKS_CTSTART, { Start calibration timer }
  497. TASKS_CTSTOP: longword; { Stop calibration timer }
  498. RESERVED0: array [0..56] of longword;
  499. EVENTS_HFCLKSTARTED, { HFCLK oscillator started }
  500. EVENTS_LFCLKSTARTED, { LFCLK started }
  501. RESERVED1,
  502. EVENTS_DONE, { Calibration of LFCLK RC oscillator complete event }
  503. EVENTS_CTTO: longword; { Calibration timer timeout }
  504. RESERVED2: array [0..123] of longword;
  505. INTENSET, { Enable interrupt }
  506. INTENCLR: longword; { Disable interrupt }
  507. RESERVED3: array [0..62] of longword;
  508. HFCLKRUN, { Status indicating that HFCLKSTART task has been triggered }
  509. HFCLKSTAT, { HFCLK status }
  510. RESERVED4,
  511. LFCLKRUN, { Status indicating that LFCLKSTART task has been triggered }
  512. LFCLKSTAT, { LFCLK status }
  513. LFCLKSRCCOPY: longword; { Copy of LFCLKSRC register, set when LFCLKSTART task was triggered }
  514. RESERVED5: array [0..61] of longword;
  515. LFCLKSRC: longword; { Clock source for the LFCLK }
  516. RESERVED6: array [0..6] of longword;
  517. CTIV: longword; { Calibration timer interval (retained register, same reset behaviour
  518. as RESETREAS) }
  519. RESERVED7: array [0..7] of longword;
  520. TRACECONFIG: longword; { Clocking options for the Trace Port debug interface }
  521. end;
  522. { ================================================================================ }
  523. { ================ AMLI ================ }
  524. { ================================================================================ }
  525. {
  526. AHB Multi-Layer Interface (AMLI)
  527. }
  528. NRF_AMLI_Type = record { AMLI Structure }
  529. RESERVED0: array [0..895] of longword;
  530. RAMPRI: AMLI_RAMPRI_Type; { RAM configurable priority configuration structure }
  531. end;
  532. { ================================================================================ }
  533. { ================ RADIO ================ }
  534. { ================================================================================ }
  535. {
  536. 2.4 GHz Radio (RADIO)
  537. }
  538. NRF_RADIO_Type = record { RADIO Structure }
  539. TASKS_TXEN, { Enable RADIO in TX mode }
  540. TASKS_RXEN, { Enable RADIO in RX mode }
  541. TASKS_START, { Start RADIO }
  542. TASKS_STOP, { Stop RADIO }
  543. TASKS_DISABLE, { Disable RADIO }
  544. TASKS_RSSISTART, { Start the RSSI and take one single sample of the receive signal
  545. strength. }
  546. TASKS_RSSISTOP, { Stop the RSSI measurement }
  547. TASKS_BCSTART, { Start the bit counter }
  548. TASKS_BCSTOP: longword; { Stop the bit counter }
  549. RESERVED0: array [0..54] of longword;
  550. EVENTS_READY, { RADIO has ramped up and is ready to be started }
  551. EVENTS_ADDRESS, { Address sent or received }
  552. EVENTS_PAYLOAD, { Packet payload sent or received }
  553. EVENTS_END, { Packet sent or received }
  554. EVENTS_DISABLED, { RADIO has been disabled }
  555. EVENTS_DEVMATCH, { A device address match occurred on the last received packet }
  556. EVENTS_DEVMISS, { No device address match occurred on the last received packet }
  557. EVENTS_RSSIEND: longword; { Sampling of receive signal strength complete. }
  558. RESERVED1: array [0..1] of longword;
  559. EVENTS_BCMATCH, { Bit counter reached bit count value. }
  560. RESERVED2,
  561. EVENTS_CRCOK, { Packet received with CRC ok }
  562. EVENTS_CRCERROR: longword; { Packet received with CRC error }
  563. RESERVED3: array [0..49] of longword;
  564. SHORTS: longword; { Shortcut register }
  565. RESERVED4: array [0..63] of longword;
  566. INTENSET, { Enable interrupt }
  567. INTENCLR: longword; { Disable interrupt }
  568. RESERVED5: array [0..60] of longword;
  569. CRCSTATUS, { CRC status }
  570. RESERVED6,
  571. RXMATCH, { Received address }
  572. RXCRC, { CRC field of previously received packet }
  573. DAI: longword; { Device address match index }
  574. RESERVED7: array [0..59] of longword;
  575. PACKETPTR, { Packet pointer }
  576. FREQUENCY, { Frequency }
  577. TXPOWER, { Output power }
  578. MODE, { Data rate and modulation }
  579. PCNF0, { Packet configuration register 0 }
  580. PCNF1, { Packet configuration register 1 }
  581. BASE0, { Base address 0 }
  582. BASE1, { Base address 1 }
  583. PREFIX0, { Prefixes bytes for logical addresses 0-3 }
  584. PREFIX1, { Prefixes bytes for logical addresses 4-7 }
  585. TXADDRESS, { Transmit address select }
  586. RXADDRESSES, { Receive address select }
  587. CRCCNF, { CRC configuration }
  588. CRCPOLY, { CRC polynomial }
  589. CRCINIT, { CRC initial value }
  590. UNUSED0, { Unspecified }
  591. TIFS, { Inter Frame Spacing in us }
  592. RSSISAMPLE, { RSSI sample }
  593. RESERVED8,
  594. STATE, { Current radio state }
  595. DATAWHITEIV: longword; { Data whitening initial value }
  596. RESERVED9: array [0..1] of longword;
  597. BCC: longword; { Bit counter compare }
  598. RESERVED10: array [0..38] of longword;
  599. DAB: array [0..7] of longword; { Description collection[0]: Device address base segment 0 }
  600. DAP: array [0..7] of longword; { Description collection[0]: Device address prefix 0 }
  601. DACNF: longword; { Device address match configuration }
  602. RESERVED11: array [0..2] of longword;
  603. MODECNF0: longword; { Radio mode configuration register 0 }
  604. RESERVED12: array [0..617] of longword;
  605. POWER: longword; { Peripheral power control }
  606. end;
  607. { ================================================================================ }
  608. { ================ UARTE ================ }
  609. { ================================================================================ }
  610. {
  611. UART with EasyDMA (UARTE)
  612. }
  613. NRF_UARTE_Type = record { UARTE Structure }
  614. TASKS_STARTRX, { Start UART receiver }
  615. TASKS_STOPRX, { Stop UART receiver }
  616. TASKS_STARTTX, { Start UART transmitter }
  617. TASKS_STOPTX: longword; { Stop UART transmitter }
  618. RESERVED0: array [0..6] of longword;
  619. TASKS_FLUSHRX: longword; { Flush RX FIFO into RX buffer }
  620. RESERVED1: array [0..51] of longword;
  621. EVENTS_CTS, { CTS is activated (set low). Clear To Send. }
  622. EVENTS_NCTS: longword; { CTS is deactivated (set high). Not Clear To Send. }
  623. RESERVED2: array [0..1] of longword;
  624. EVENTS_ENDRX: longword; { Receive buffer is filled up }
  625. RESERVED3: array [0..2] of longword;
  626. EVENTS_ENDTX, { Last TX byte transmitted }
  627. EVENTS_ERROR: longword; { Error detected }
  628. RESERVED4: array [0..6] of longword;
  629. EVENTS_RXTO, { Receiver timeout }
  630. RESERVED5,
  631. EVENTS_RXSTARTED, { UART receiver has started }
  632. EVENTS_TXSTARTED, { UART transmitter has started }
  633. RESERVED6,
  634. EVENTS_TXSTOPPED: longword; { Transmitter stopped }
  635. RESERVED7: array [0..40] of longword;
  636. SHORTS: longword; { Shortcut register }
  637. RESERVED8: array [0..62] of longword;
  638. INTEN, { Enable or disable interrupt }
  639. INTENSET, { Enable interrupt }
  640. INTENCLR: longword; { Disable interrupt }
  641. RESERVED9: array [0..92] of longword;
  642. ERRORSRC: longword; { Error source }
  643. RESERVED10: array [0..30] of longword;
  644. ENABLE, { Enable UART }
  645. RESERVED11,
  646. PSEL: UARTE_PSEL_Type; { Unspecified }
  647. RESERVED12: array [0..2] of longword;
  648. BAUDRATE: longword; { Baud rate }
  649. RESERVED13: array [0..2] of longword;
  650. RXD: UARTE_RXD_Type; { RXD EasyDMA channel }
  651. RESERVED14,
  652. TXD: UARTE_TXD_Type; { TXD EasyDMA channel }
  653. RESERVED15: array [0..6] of longword;
  654. CONFIG: longword; { Configuration of parity and hardware flow control }
  655. end;
  656. { ================================================================================ }
  657. { ================ UART ================ }
  658. { ================================================================================ }
  659. {
  660. Universal Asynchronous Receiver/Transmitter (UART)
  661. }
  662. NRF_UART_Type = record { UART Structure }
  663. TASKS_STARTRX, { Start UART receiver }
  664. TASKS_STOPRX, { Stop UART receiver }
  665. TASKS_STARTTX, { Start UART transmitter }
  666. TASKS_STOPTX: longword; { Stop UART transmitter }
  667. RESERVED0: array [0..2] of longword;
  668. TASKS_SUSPEND: longword; { Suspend UART }
  669. RESERVED1: array [0..55] of longword;
  670. EVENTS_CTS, { CTS is activated (set low). Clear To Send. }
  671. EVENTS_NCTS, { CTS is deactivated (set high). Not Clear To Send. }
  672. EVENTS_RXDRDY: longword; { Data received in RXD }
  673. RESERVED2: array [0..3] of longword;
  674. EVENTS_TXDRDY, { Data sent from TXD }
  675. RESERVED3,
  676. EVENTS_ERROR: longword; { Error detected }
  677. RESERVED4: array [0..6] of longword;
  678. EVENTS_RXTO: longword; { Receiver timeout }
  679. RESERVED5: array [0..45] of longword;
  680. SHORTS: longword; { Shortcut register }
  681. RESERVED6: array [0..63] of longword;
  682. INTENSET, { Enable interrupt }
  683. INTENCLR: longword; { Disable interrupt }
  684. RESERVED7: array [0..92] of longword;
  685. ERRORSRC: longword; { Error source }
  686. RESERVED8: array [0..30] of longword;
  687. ENABLE, { Enable UART }
  688. RESERVED9,
  689. PSELRTS, { Pin select for RTS }
  690. PSELTXD, { Pin select for TXD }
  691. PSELCTS, { Pin select for CTS }
  692. PSELRXD, { Pin select for RXD }
  693. RXD, { RXD register }
  694. TXD, { TXD register }
  695. RESERVED10,
  696. BAUDRATE: longword; { Baud rate }
  697. RESERVED11: array [0..16] of longword;
  698. CONFIG: longword; { Configuration of parity and hardware flow control }
  699. end;
  700. { ================================================================================ }
  701. { ================ SPIM ================ }
  702. { ================================================================================ }
  703. {
  704. Serial Peripheral Interface Master with EasyDMA 0 (SPIM)
  705. }
  706. NRF_SPIM_Type = record { SPIM Structure }
  707. RESERVED0: array [0..3] of longword;
  708. TASKS_START, { Start SPI transaction }
  709. TASKS_STOP, { Stop SPI transaction }
  710. RESERVED1,
  711. TASKS_SUSPEND, { Suspend SPI transaction }
  712. TASKS_RESUME: longword; { Resume SPI transaction }
  713. RESERVED2: array [0..55] of longword;
  714. EVENTS_STOPPED: longword; { SPI transaction has stopped }
  715. RESERVED3: array [0..1] of longword;
  716. EVENTS_ENDRX, { End of RXD buffer reached }
  717. RESERVED4,
  718. EVENTS_END, { End of RXD buffer and TXD buffer reached }
  719. RESERVED5,
  720. EVENTS_ENDTX: longword; { End of TXD buffer reached }
  721. RESERVED6: array [0..9] of longword;
  722. EVENTS_STARTED: longword; { Transaction started }
  723. RESERVED7: array [0..43] of longword;
  724. SHORTS: longword; { Shortcut register }
  725. RESERVED8: array [0..63] of longword;
  726. INTENSET, { Enable interrupt }
  727. INTENCLR: longword; { Disable interrupt }
  728. RESERVED9: array [0..124] of longword;
  729. ENABLE, { Enable SPIM }
  730. RESERVED10,
  731. PSEL: SPIM_PSEL_Type; { Unspecified }
  732. RESERVED11: array [0..3] of longword;
  733. FREQUENCY: longword; { SPI frequency }
  734. RESERVED12: array [0..2] of longword;
  735. RXD: SPIM_RXD_Type; { RXD EasyDMA channel }
  736. TXD: SPIM_TXD_Type; { TXD EasyDMA channel }
  737. CONFIG: longword; { Configuration register }
  738. RESERVED13: array [0..25] of longword;
  739. ORC: longword; { Over-read character. Character clocked out in case and over-read
  740. of the TXD buffer. }
  741. end;
  742. { ================================================================================ }
  743. { ================ SPIS ================ }
  744. { ================================================================================ }
  745. {
  746. SPI Slave 0 (SPIS)
  747. }
  748. NRF_SPIS_Type = record { SPIS Structure }
  749. RESERVED0: array [0..8] of longword;
  750. TASKS_ACQUIRE, { Acquire SPI semaphore }
  751. TASKS_RELEASE: longword; { Release SPI semaphore, enabling the SPI slave to acquire it }
  752. RESERVED1: array [0..53] of longword;
  753. EVENTS_END: longword; { Granted transaction completed }
  754. RESERVED2: array [0..1] of longword;
  755. EVENTS_ENDRX: longword; { End of RXD buffer reached }
  756. RESERVED3: array [0..4] of longword;
  757. EVENTS_ACQUIRED: longword; { Semaphore acquired }
  758. RESERVED4: array [0..52] of longword;
  759. SHORTS: longword; { Shortcut register }
  760. RESERVED5: array [0..63] of longword;
  761. INTENSET, { Enable interrupt }
  762. INTENCLR: longword; { Disable interrupt }
  763. RESERVED6: array [0..60] of longword;
  764. SEMSTAT: longword; { Semaphore status register }
  765. RESERVED7: array [0..14] of longword;
  766. STATUS: longword; { Status from last transaction }
  767. RESERVED8: array [0..46] of longword;
  768. ENABLE, { Enable SPI slave }
  769. RESERVED9: longword;
  770. PSEL: SPIS_PSEL_Type; { Unspecified }
  771. RESERVED10: array [0..6] of longword;
  772. RXD: SPIS_RXD_Type; { Unspecified }
  773. RESERVED11,
  774. TXD: SPIS_TXD_Type; { Unspecified }
  775. RESERVED12,
  776. CONFIG, { Configuration register }
  777. RESERVED13,
  778. DEF: longword; { Default character. Character clocked out in case of an ignored
  779. transaction. }
  780. RESERVED14: array [0..23] of longword;
  781. ORC: longword; { Over-read character }
  782. end;
  783. { ================================================================================ }
  784. { ================ TWIM ================ }
  785. { ================================================================================ }
  786. {
  787. I2C compatible Two-Wire Master Interface with EasyDMA 0 (TWIM)
  788. }
  789. NRF_TWIM_Type = record { TWIM Structure }
  790. TASKS_STARTRX, { Start TWI receive sequence }
  791. RESERVED0,
  792. TASKS_STARTTX: longword; { Start TWI transmit sequence }
  793. RESERVED1: array [0..1] of longword;
  794. TASKS_STOP, { Stop TWI transaction. Must be issued while the TWI master is
  795. not suspended. }
  796. RESERVED2,
  797. TASKS_SUSPEND, { Suspend TWI transaction }
  798. TASKS_RESUME: longword; { Resume TWI transaction }
  799. RESERVED3: array [0..55] of longword;
  800. EVENTS_STOPPED: longword; { TWI stopped }
  801. RESERVED4: array [0..6] of longword;
  802. EVENTS_ERROR: longword; { TWI error }
  803. RESERVED5: array [0..7] of longword;
  804. EVENTS_SUSPENDED, { Last byte has been sent out after the SUSPEND task has been
  805. issued, TWI traffic is now suspended. }
  806. EVENTS_RXSTARTED, { Receive sequence started }
  807. EVENTS_TXSTARTED: longword; { Transmit sequence started }
  808. RESERVED6: array [0..1] of longword;
  809. EVENTS_LASTRX, { Byte boundary, starting to receive the last byte }
  810. EVENTS_LASTTX: longword; { Byte boundary, starting to transmit the last byte }
  811. RESERVED7: array [0..38] of longword;
  812. SHORTS: longword; { Shortcut register }
  813. RESERVED8: array [0..62] of longword;
  814. INTEN, { Enable or disable interrupt }
  815. INTENSET, { Enable interrupt }
  816. INTENCLR: longword; { Disable interrupt }
  817. RESERVED9: array [0..109] of longword;
  818. ERRORSRC: longword; { Error source }
  819. RESERVED10: array [0..13] of longword;
  820. ENABLE, { Enable TWIM }
  821. RESERVED11: longword;
  822. PSEL: TWIM_PSEL_Type; { Unspecified }
  823. RESERVED12: array [0..4] of longword;
  824. FREQUENCY: longword; { TWI frequency }
  825. RESERVED13: array [0..2] of longword;
  826. RXD: TWIM_RXD_Type; { RXD EasyDMA channel }
  827. TXD: TWIM_TXD_Type; { TXD EasyDMA channel }
  828. RESERVED14: array [0..12] of longword;
  829. ADDRESS: longword; { Address used in the TWI transfer }
  830. end;
  831. { ================================================================================ }
  832. { ================ TWIS ================ }
  833. { ================================================================================ }
  834. {
  835. I2C compatible Two-Wire Slave Interface with EasyDMA 0 (TWIS)
  836. }
  837. NRF_TWIS_Type = record { TWIS Structure }
  838. RESERVED0: array [0..4] of longword;
  839. TASKS_STOP, { Stop TWI transaction }
  840. RESERVED1,
  841. TASKS_SUSPEND, { Suspend TWI transaction }
  842. TASKS_RESUME: longword; { Resume TWI transaction }
  843. RESERVED2: array [0..2] of longword;
  844. TASKS_PREPARERX, { Prepare the TWI slave to respond to a write command }
  845. TASKS_PREPARETX: longword; { Prepare the TWI slave to respond to a read command }
  846. RESERVED3: array [0..50] of longword;
  847. EVENTS_STOPPED: longword; { TWI stopped }
  848. RESERVED4: array [0..6] of longword;
  849. EVENTS_ERROR: longword; { TWI error }
  850. RESERVED5: array [0..8] of longword;
  851. EVENTS_RXSTARTED, { Receive sequence started }
  852. EVENTS_TXSTARTED: longword; { Transmit sequence started }
  853. RESERVED6: array [0..3] of longword;
  854. EVENTS_WRITE, { Write command received }
  855. EVENTS_READ: longword; { Read command received }
  856. RESERVED7: array [0..36] of longword;
  857. SHORTS: longword; { Shortcut register }
  858. RESERVED8: array [0..62] of longword;
  859. INTEN, { Enable or disable interrupt }
  860. INTENSET, { Enable interrupt }
  861. INTENCLR: longword; { Disable interrupt }
  862. RESERVED9: array [0..112] of longword;
  863. ERRORSRC, { Error source }
  864. MATCH: longword; { Status register indicating which address had a match }
  865. RESERVED10: array [0..9] of longword;
  866. ENABLE, { Enable TWIS }
  867. RESERVED11: longword;
  868. PSEL: TWIS_PSEL_Type; { Unspecified }
  869. RESERVED12: array [0..8] of longword;
  870. RXD: TWIS_RXD_Type; { RXD EasyDMA channel }
  871. RESERVED13,
  872. TXD: TWIS_TXD_Type; { TXD EasyDMA channel }
  873. RESERVED14: array [0..13] of longword;
  874. ADDRESS: array [0..1] of longword; { Description collection[0]: TWI slave address 0 }
  875. RESERVED15,
  876. CONFIG: longword; { Configuration register for the address match mechanism }
  877. RESERVED16: array [0..9] of longword;
  878. ORC: longword; { Over-read character. Character sent out in case of an over-read
  879. of the transmit buffer. }
  880. end;
  881. { ================================================================================ }
  882. { ================ SPI ================ }
  883. { ================================================================================ }
  884. {
  885. Serial Peripheral Interface 0 (SPI)
  886. }
  887. NRF_SPI_Type = record { SPI Structure }
  888. RESERVED0: array [0..65] of longword;
  889. EVENTS_READY: longword; { TXD byte sent and RXD byte received }
  890. RESERVED1: array [0..125] of longword;
  891. INTENSET, { Enable interrupt }
  892. INTENCLR: longword; { Disable interrupt }
  893. RESERVED2: array [0..124] of longword;
  894. ENABLE, { Enable SPI }
  895. RESERVED3: longword;
  896. PSEL: SPI_PSEL_Type; { Unspecified }
  897. RESERVED4,
  898. RXD, { RXD register }
  899. TXD, { TXD register }
  900. RESERVED5,
  901. FREQUENCY: longword; { SPI frequency }
  902. RESERVED6: array [0..10] of longword;
  903. CONFIG: longword; { Configuration register }
  904. end;
  905. { ================================================================================ }
  906. { ================ TWI ================ }
  907. { ================================================================================ }
  908. {
  909. I2C compatible Two-Wire Interface 0 (TWI)
  910. }
  911. NRF_TWI_Type = record { TWI Structure }
  912. TASKS_STARTRX, { Start TWI receive sequence }
  913. RESERVED0,
  914. TASKS_STARTTX: longword; { Start TWI transmit sequence }
  915. RESERVED1: array [0..1] of longword;
  916. TASKS_STOP, { Stop TWI transaction }
  917. RESERVED2,
  918. TASKS_SUSPEND, { Suspend TWI transaction }
  919. TASKS_RESUME: longword; { Resume TWI transaction }
  920. RESERVED3: array [0..55] of longword;
  921. EVENTS_STOPPED, { TWI stopped }
  922. EVENTS_RXDREADY: longword; { TWI RXD byte received }
  923. RESERVED4: array [0..3] of longword;
  924. EVENTS_TXDSENT, { TWI TXD byte sent }
  925. RESERVED5,
  926. EVENTS_ERROR: longword; { TWI error }
  927. RESERVED6: array [0..3] of longword;
  928. EVENTS_BB: longword; { TWI byte boundary, generated before each byte that is sent or
  929. received }
  930. RESERVED7: array [0..2] of longword;
  931. EVENTS_SUSPENDED: longword; { TWI entered the suspended state }
  932. RESERVED8: array [0..44] of longword;
  933. SHORTS: longword; { Shortcut register }
  934. RESERVED9: array [0..63] of longword;
  935. INTENSET, { Enable interrupt }
  936. INTENCLR: longword; { Disable interrupt }
  937. RESERVED10: array [0..109] of longword;
  938. ERRORSRC: longword; { Error source }
  939. RESERVED11: array [0..13] of longword;
  940. ENABLE, { Enable TWI }
  941. RESERVED12,
  942. PSELSCL, { Pin select for SCL }
  943. PSELSDA: longword; { Pin select for SDA }
  944. RESERVED13: array [0..1] of longword;
  945. RXD, { RXD register }
  946. TXD, { TXD register }
  947. RESERVED14,
  948. FREQUENCY: longword; { TWI frequency }
  949. RESERVED15: array [0..23] of longword;
  950. ADDRESS: longword; { Address used in the TWI transfer }
  951. end;
  952. { ================================================================================ }
  953. { ================ NFCT ================ }
  954. { ================================================================================ }
  955. {
  956. NFC-A compatible radio (NFCT)
  957. }
  958. NRF_NFCT_Type = record { NFCT Structure }
  959. TASKS_ACTIVATE, { Activate NFC peripheral for incoming and outgoing frames, change
  960. state to activated }
  961. TASKS_DISABLE, { Disable NFC peripheral }
  962. TASKS_SENSE, { Enable NFC sense field mode, change state to sense mode }
  963. TASKS_STARTTX: longword; { Start transmission of a outgoing frame, change state to transmit }
  964. RESERVED0: array [0..2] of longword;
  965. TASKS_ENABLERXDATA, { Initializes the EasyDMA for receive. }
  966. RESERVED1,
  967. TASKS_GOIDLE, { Force state machine to IDLE state }
  968. TASKS_GOSLEEP: longword; { Force state machine to SLEEP_A state }
  969. RESERVED2: array [0..52] of longword;
  970. EVENTS_READY, { The NFC peripheral is ready to receive and send frames }
  971. EVENTS_FIELDDETECTED, { Remote NFC field detected }
  972. EVENTS_FIELDLOST, { Remote NFC field lost }
  973. EVENTS_TXFRAMESTART, { Marks the start of the first symbol of a transmitted frame }
  974. EVENTS_TXFRAMEEND, { Marks the end of the last transmitted on-air symbol of a frame }
  975. EVENTS_RXFRAMESTART, { Marks the end of the first symbol of a received frame }
  976. EVENTS_RXFRAMEEND, { Received data have been checked (CRC, parity) and transferred
  977. to RAM, and EasyDMA has ended accessing the RX buffer }
  978. EVENTS_ERROR: longword; { NFC error reported. The ERRORSTATUS register contains details
  979. on the source of the error. }
  980. RESERVED3: array [0..1] of longword;
  981. EVENTS_RXERROR, { NFC RX frame error reported. The FRAMESTATUS.RX register contains
  982. details on the source of the error. }
  983. EVENTS_ENDRX, { RX buffer (as defined by PACKETPTR and MAXLEN) in Data RAM full. }
  984. EVENTS_ENDTX, { Transmission of data in RAM has ended, and EasyDMA has ended
  985. accessing the TX buffer }
  986. RESERVED4,
  987. EVENTS_AUTOCOLRESSTARTED: longword; { Auto collision resolution process has started }
  988. RESERVED5: array [0..2] of longword;
  989. EVENTS_COLLISION, { NFC Auto collision resolution error reported. }
  990. EVENTS_SELECTED, { NFC Auto collision resolution successfully completed }
  991. EVENTS_STARTED: longword; { EasyDMA is ready to receive or send frames. }
  992. RESERVED6: array [0..42] of longword;
  993. SHORTS: longword; { Shortcut register }
  994. RESERVED7: array [0..62] of longword;
  995. INTEN, { Enable or disable interrupt }
  996. INTENSET, { Enable interrupt }
  997. INTENCLR: longword; { Disable interrupt }
  998. RESERVED8: array [0..61] of longword;
  999. ERRORSTATUS, { NFC Error Status register }
  1000. RESERVED9: longword;
  1001. FRAMESTATUS: NFCT_FRAMESTATUS_Type; { Unspecified }
  1002. RESERVED10: array [0..7] of longword;
  1003. CURRENTLOADCTRL: longword; { Current value driven to the NFC Load Control }
  1004. RESERVED11: array [0..1] of longword;
  1005. FIELDPRESENT: longword; { Indicates the presence or not of a valid field }
  1006. RESERVED12: array [0..48] of longword;
  1007. FRAMEDELAYMIN, { Minimum frame delay }
  1008. FRAMEDELAYMAX, { Maximum frame delay }
  1009. FRAMEDELAYMODE, { Configuration register for the Frame Delay Timer }
  1010. PACKETPTR, { Packet pointer for TXD and RXD data storage in Data RAM }
  1011. MAXLEN: longword; { Size of allocated for TXD and RXD data storage buffer in Data
  1012. RAM }
  1013. TXD: NFCT_TXD_Type; { Unspecified }
  1014. RXD: NFCT_RXD_Type; { Unspecified }
  1015. RESERVED13: array [0..25] of longword;
  1016. NFCID1_LAST, { Last NFCID1 part (4, 7 or 10 bytes ID) }
  1017. NFCID1_2ND_LAST, { Second last NFCID1 part (7 or 10 bytes ID) }
  1018. NFCID1_3RD_LAST, { Third last NFCID1 part (10 bytes ID) }
  1019. RESERVED14,
  1020. SENSRES, { NFC-A SENS_RES auto-response settings }
  1021. SELRES: longword; { NFC-A SEL_RES auto-response settings }
  1022. end;
  1023. { ================================================================================ }
  1024. { ================ GPIOTE ================ }
  1025. { ================================================================================ }
  1026. {
  1027. GPIO Tasks and Events (GPIOTE)
  1028. }
  1029. NRF_GPIOTE_Type = record { GPIOTE Structure }
  1030. TASKS_OUT: array [0..7] of longword; { Description collection[0]: Task for writing to pin specified
  1031. in CONFIG[0].PSEL. Action on pin is configured in CONFIG[0].POLARITY. }
  1032. RESERVED0: array [0..3] of longword;
  1033. TASKS_SET: array [0..7] of longword; { Description collection[0]: Task for writing to pin specified
  1034. in CONFIG[0].PSEL. Action on pin is to set it high. }
  1035. RESERVED1: array [0..3] of longword;
  1036. TASKS_CLR: array [0..7] of longword; { Description collection[0]: Task for writing to pin specified
  1037. in CONFIG[0].PSEL. Action on pin is to set it low. }
  1038. RESERVED2: array [0..31] of longword;
  1039. EVENTS_IN: array [0..7] of longword; { Description collection[0]: Event generated from pin specified
  1040. in CONFIG[0].PSEL }
  1041. RESERVED3: array [0..22] of longword;
  1042. EVENTS_PORT: longword; { Event generated from multiple input GPIO pins with SENSE mechanism
  1043. enabled }
  1044. RESERVED4: array [0..96] of longword;
  1045. INTENSET, { Enable interrupt }
  1046. INTENCLR: longword; { Disable interrupt }
  1047. RESERVED5: array [0..128] of longword;
  1048. CONFIG: array [0..7] of longword; { Description collection[0]: Configuration for OUT[n], SET[n]
  1049. and CLR[n] tasks and IN[n] event }
  1050. end;
  1051. { ================================================================================ }
  1052. { ================ SAADC ================ }
  1053. { ================================================================================ }
  1054. {
  1055. Analog to Digital Converter (SAADC)
  1056. }
  1057. NRF_SAADC_Type = record { SAADC Structure }
  1058. TASKS_START, { Start the ADC and prepare the result buffer in RAM }
  1059. TASKS_SAMPLE, { Take one ADC sample, if scan is enabled all channels are sampled }
  1060. TASKS_STOP, { Stop the ADC and terminate any on-going conversion }
  1061. TASKS_CALIBRATEOFFSET: longword; { Starts offset auto-calibration }
  1062. RESERVED0: array [0..59] of longword;
  1063. EVENTS_STARTED, { The ADC has started }
  1064. EVENTS_END, { The ADC has filled up the Result buffer }
  1065. EVENTS_DONE, { A conversion task has been completed. Depending on the mode,
  1066. multiple conversions might be needed for a result to be transferred
  1067. to RAM. }
  1068. EVENTS_RESULTDONE, { A result is ready to get transferred to RAM. }
  1069. EVENTS_CALIBRATEDONE, { Calibration is complete }
  1070. EVENTS_STOPPED: longword; { The ADC has stopped }
  1071. EVENTS_CH: array [0..7] of SAADC_EVENTS_CH_Type; { Unspecified }
  1072. RESERVED1: array [0..105] of longword;
  1073. INTEN, { Enable or disable interrupt }
  1074. INTENSET, { Enable interrupt }
  1075. INTENCLR: longword; { Disable interrupt }
  1076. RESERVED2: array [0..60] of longword;
  1077. STATUS: longword; { Status }
  1078. RESERVED3: array [0..62] of longword;
  1079. ENABLE: longword; { Enable or disable ADC }
  1080. RESERVED4: array [0..2] of longword;
  1081. CH: array [0..7] of SAADC_CH_Type; { Unspecified }
  1082. RESERVED5: array [0..23] of longword;
  1083. RESOLUTION, { Resolution configuration }
  1084. OVERSAMPLE, { Oversampling configuration. OVERSAMPLE should not be combined
  1085. with SCAN. The RESOLUTION is applied before averaging, thus
  1086. for high OVERSAMPLE a higher RESOLUTION should be used. }
  1087. SAMPLERATE: longword; { Controls normal or continuous sample rate }
  1088. RESERVED6: array [0..11] of longword;
  1089. RESULT: SAADC_RESULT_Type; { RESULT EasyDMA channel }
  1090. end;
  1091. { ================================================================================ }
  1092. { ================ TIMER ================ }
  1093. { ================================================================================ }
  1094. {
  1095. Timer/Counter 0 (TIMER)
  1096. }
  1097. NRF_TIMER_Type = record { TIMER Structure }
  1098. TASKS_START, { Start Timer }
  1099. TASKS_STOP, { Stop Timer }
  1100. TASKS_COUNT, { Increment Timer (Counter mode only) }
  1101. TASKS_CLEAR, { Clear time }
  1102. TASKS_SHUTDOWN: longword; { Deprecated register - Shut down timer }
  1103. RESERVED0: array [0..10] of longword;
  1104. TASKS_CAPTURE: array [0..5] of longword; { Description collection[0]: Capture Timer value to CC[0] register }
  1105. RESERVED1: array [0..57] of longword;
  1106. EVENTS_COMPARE: array [0..5] of longword; { Description collection[0]: Compare event on CC[0] match }
  1107. RESERVED2: array [0..41] of longword;
  1108. SHORTS: longword; { Shortcut register }
  1109. RESERVED3: array [0..63] of longword;
  1110. INTENSET, { Enable interrupt }
  1111. INTENCLR: longword; { Disable interrupt }
  1112. RESERVED4: array [0..125] of longword;
  1113. MODE, { Timer mode selection }
  1114. BITMODE, { Configure the number of bits used by the TIMER }
  1115. RESERVED5,
  1116. PRESCALER: longword; { Timer prescaler register }
  1117. RESERVED6: array [0..10] of longword;
  1118. CC: array [0..5] of longword; { Description collection[0]: Capture/Compare register 0 }
  1119. end;
  1120. { ================================================================================ }
  1121. { ================ RTC ================ }
  1122. { ================================================================================ }
  1123. {
  1124. Real time counter 0 (RTC)
  1125. }
  1126. NRF_RTC_Type = record { RTC Structure }
  1127. TASKS_START, { Start RTC COUNTER }
  1128. TASKS_STOP, { Stop RTC COUNTER }
  1129. TASKS_CLEAR, { Clear RTC COUNTER }
  1130. TASKS_TRIGOVRFLW: longword; { Set COUNTER to 0xFFFFF0 }
  1131. RESERVED0: array [0..59] of longword;
  1132. EVENTS_TICK, { Event on COUNTER increment }
  1133. EVENTS_OVRFLW: longword; { Event on COUNTER overflow }
  1134. RESERVED1: array [0..13] of longword;
  1135. EVENTS_COMPARE: array [0..3] of longword; { Description collection[0]: Compare event on CC[0] match }
  1136. RESERVED2: array [0..108] of longword;
  1137. INTENSET, { Enable interrupt }
  1138. INTENCLR: longword; { Disable interrupt }
  1139. RESERVED3: array [0..12] of longword;
  1140. EVTEN, { Enable or disable event routing }
  1141. EVTENSET, { Enable event routing }
  1142. EVTENCLR: longword; { Disable event routing }
  1143. RESERVED4: array [0..109] of longword;
  1144. COUNTER, { Current COUNTER value }
  1145. PRESCALER: longword; { 12 bit prescaler for COUNTER frequency (32768/(PRESCALER+1)).Must
  1146. be written when RTC is stopped }
  1147. RESERVED5: array [0..12] of longword;
  1148. CC: array [0..3] of longword; { Description collection[0]: Compare register 0 }
  1149. end;
  1150. { ================================================================================ }
  1151. { ================ TEMP ================ }
  1152. { ================================================================================ }
  1153. {
  1154. Temperature Sensor (TEMP)
  1155. }
  1156. NRF_TEMP_Type = record { TEMP Structure }
  1157. TASKS_START, { Start temperature measurement }
  1158. TASKS_STOP: longword; { Stop temperature measurement }
  1159. RESERVED0: array [0..61] of longword;
  1160. EVENTS_DATARDY: longword; { Temperature measurement complete, data ready }
  1161. RESERVED1: array [0..127] of longword;
  1162. INTENSET, { Enable interrupt }
  1163. INTENCLR: longword; { Disable interrupt }
  1164. RESERVED2: array [0..126] of longword;
  1165. TEMP: longint; { Temperature in degC (0.25deg steps) }
  1166. RESERVED3: array [0..4] of longword;
  1167. A0, { Slope of 1st piece wise linear function }
  1168. A1, { Slope of 2nd piece wise linear function }
  1169. A2, { Slope of 3rd piece wise linear function }
  1170. A3, { Slope of 4th piece wise linear function }
  1171. A4, { Slope of 5th piece wise linear function }
  1172. A5: longword; { Slope of 6th piece wise linear function }
  1173. RESERVED4: array [0..1] of longword;
  1174. B0, { y-intercept of 1st piece wise linear function }
  1175. B1, { y-intercept of 2nd piece wise linear function }
  1176. B2, { y-intercept of 3rd piece wise linear function }
  1177. B3, { y-intercept of 4th piece wise linear function }
  1178. B4, { y-intercept of 5th piece wise linear function }
  1179. B5: longword; { y-intercept of 6th piece wise linear function }
  1180. RESERVED5: array [0..1] of longword;
  1181. T0, { End point of 1st piece wise linear function }
  1182. T1, { End point of 2nd piece wise linear function }
  1183. T2, { End point of 3rd piece wise linear function }
  1184. T3, { End point of 4th piece wise linear function }
  1185. T4: longword; { End point of 5th piece wise linear function }
  1186. end;
  1187. { ================================================================================ }
  1188. { ================ RNG ================ }
  1189. { ================================================================================ }
  1190. {
  1191. Random Number Generator (RNG)
  1192. }
  1193. NRF_RNG_Type = record { RNG Structure }
  1194. TASKS_START, { Task starting the random number generator }
  1195. TASKS_STOP: longword; { Task stopping the random number generator }
  1196. RESERVED0: array [0..61] of longword;
  1197. EVENTS_VALRDY: longword; { Event being generated for every new random number written to
  1198. the VALUE register }
  1199. RESERVED1: array [0..62] of longword;
  1200. SHORTS: longword; { Shortcut register }
  1201. RESERVED2: array [0..63] of longword;
  1202. INTENSET, { Enable interrupt }
  1203. INTENCLR: longword; { Disable interrupt }
  1204. RESERVED3: array [0..125] of longword;
  1205. CONFIG, { Configuration register }
  1206. VALUE: longword; { Output random number }
  1207. end;
  1208. { ================================================================================ }
  1209. { ================ ECB ================ }
  1210. { ================================================================================ }
  1211. {
  1212. AES ECB Mode Encryption (ECB)
  1213. }
  1214. NRF_ECB_Type = record { ECB Structure }
  1215. TASKS_STARTECB, { Start ECB block encrypt }
  1216. TASKS_STOPECB: longword; { Abort a possible executing ECB operation }
  1217. RESERVED0: array [0..61] of longword;
  1218. EVENTS_ENDECB, { ECB block encrypt complete }
  1219. EVENTS_ERRORECB: longword; { ECB block encrypt aborted because of a STOPECB task or due to
  1220. an error }
  1221. RESERVED1: array [0..126] of longword;
  1222. INTENSET, { Enable interrupt }
  1223. INTENCLR: longword; { Disable interrupt }
  1224. RESERVED2: array [0..125] of longword;
  1225. ECBDATAPTR: longword; { ECB block encrypt memory pointers }
  1226. end;
  1227. { ================================================================================ }
  1228. { ================ CCM ================ }
  1229. { ================================================================================ }
  1230. {
  1231. AES CCM Mode Encryption (CCM)
  1232. }
  1233. NRF_CCM_Type = record { CCM Structure }
  1234. TASKS_KSGEN, { Start generation of key-stream. This operation will stop by
  1235. itself when completed. }
  1236. TASKS_CRYPT, { Start encryption/decryption. This operation will stop by itself
  1237. when completed. }
  1238. TASKS_STOP: longword; { Stop encryption/decryption }
  1239. RESERVED0: array [0..60] of longword;
  1240. EVENTS_ENDKSGEN, { Key-stream generation complete }
  1241. EVENTS_ENDCRYPT, { Encrypt/decrypt complete }
  1242. EVENTS_ERROR: longword; { CCM error event }
  1243. RESERVED1: array [0..60] of longword;
  1244. SHORTS: longword; { Shortcut register }
  1245. RESERVED2: array [0..63] of longword;
  1246. INTENSET, { Enable interrupt }
  1247. INTENCLR: longword; { Disable interrupt }
  1248. RESERVED3: array [0..60] of longword;
  1249. MICSTATUS: longword; { MIC check result }
  1250. RESERVED4: array [0..62] of longword;
  1251. ENABLE, { Enable }
  1252. MODE, { Operation mode }
  1253. CNFPTR, { Pointer to data structure holding AES key and NONCE vector }
  1254. INPTR, { Input pointer }
  1255. OUTPTR, { Output pointer }
  1256. SCRATCHPTR: longword; { Pointer to data area used for temporary storage }
  1257. end;
  1258. { ================================================================================ }
  1259. { ================ AAR ================ }
  1260. { ================================================================================ }
  1261. {
  1262. Accelerated Address Resolver (AAR)
  1263. }
  1264. NRF_AAR_Type = record { AAR Structure }
  1265. TASKS_START, { Start resolving addresses based on IRKs specified in the IRK
  1266. data structure }
  1267. RESERVED0,
  1268. TASKS_STOP: longword; { Stop resolving addresses }
  1269. RESERVED1: array [0..60] of longword;
  1270. EVENTS_END, { Address resolution procedure complete }
  1271. EVENTS_RESOLVED, { Address resolved }
  1272. EVENTS_NOTRESOLVED: longword; { Address not resolved }
  1273. RESERVED2: array [0..125] of longword;
  1274. INTENSET, { Enable interrupt }
  1275. INTENCLR: longword; { Disable interrupt }
  1276. RESERVED3: array [0..60] of longword;
  1277. STATUS: longword; { Resolution status }
  1278. RESERVED4: array [0..62] of longword;
  1279. ENABLE, { Enable AAR }
  1280. NIRK, { Number of IRKs }
  1281. IRKPTR, { Pointer to IRK data structure }
  1282. RESERVED5,
  1283. ADDRPTR, { Pointer to the resolvable address }
  1284. SCRATCHPTR: longword; { Pointer to data area used for temporary storage }
  1285. end;
  1286. { ================================================================================ }
  1287. { ================ WDT ================ }
  1288. { ================================================================================ }
  1289. {
  1290. Watchdog Timer (WDT)
  1291. }
  1292. NRF_WDT_Type = record { WDT Structure }
  1293. TASKS_START: longword; { Start the watchdog }
  1294. RESERVED0: array [0..62] of longword;
  1295. EVENTS_TIMEOUT: longword; { Watchdog timeout }
  1296. RESERVED1: array [0..127] of longword;
  1297. INTENSET, { Enable interrupt }
  1298. INTENCLR: longword; { Disable interrupt }
  1299. RESERVED2: array [0..60] of longword;
  1300. RUNSTATUS, { Run status }
  1301. REQSTATUS: longword; { Request status }
  1302. RESERVED3: array [0..62] of longword;
  1303. CRV, { Counter reload value }
  1304. RREN, { Enable register for reload request registers }
  1305. CONFIG: longword; { Configuration register }
  1306. RESERVED4: array [0..59] of longword;
  1307. RR: array [0..7] of longword; { Description collection[0]: Reload request 0 }
  1308. end;
  1309. { ================================================================================ }
  1310. { ================ QDEC ================ }
  1311. { ================================================================================ }
  1312. {
  1313. Quadrature Decoder (QDEC)
  1314. }
  1315. NRF_QDEC_Type = record { QDEC Structure }
  1316. TASKS_START, { Task starting the quadrature decoder }
  1317. TASKS_STOP, { Task stopping the quadrature decoder }
  1318. TASKS_READCLRACC, { Read and clear ACC and ACCDBL }
  1319. TASKS_RDCLRACC, { Read and clear ACC }
  1320. TASKS_RDCLRDBL: longword; { Read and clear ACCDBL }
  1321. RESERVED0: array [0..58] of longword;
  1322. EVENTS_SAMPLERDY, { Event being generated for every new sample value written to
  1323. the SAMPLE register }
  1324. EVENTS_REPORTRDY, { Non-null report ready }
  1325. EVENTS_ACCOF, { ACC or ACCDBL register overflow }
  1326. EVENTS_DBLRDY, { Double displacement(s) detected }
  1327. EVENTS_STOPPED: longword; { QDEC has been stopped }
  1328. RESERVED1: array [0..58] of longword;
  1329. SHORTS: longword; { Shortcut register }
  1330. RESERVED2: array [0..63] of longword;
  1331. INTENSET, { Enable interrupt }
  1332. INTENCLR: longword; { Disable interrupt }
  1333. RESERVED3: array [0..124] of longword;
  1334. ENABLE, { Enable the quadrature decoder }
  1335. LEDPOL, { LED output pin polarity }
  1336. SAMPLEPER: longword; { Sample period }
  1337. SAMPLE: longint; { Motion sample value }
  1338. REPORTPER: longword; { Number of samples to be taken before REPORTRDY and DBLRDY events
  1339. can be generated }
  1340. ACC, { Register accumulating the valid transitions }
  1341. ACCREAD: longint; { Snapshot of the ACC register, updated by the READCLRACC or RDCLRACC
  1342. task }
  1343. PSEL: QDEC_PSEL_Type; { Unspecified }
  1344. DBFEN: longword; { Enable input debounce filters }
  1345. RESERVED4: array [0..4] of longword;
  1346. LEDPRE, { Time period the LED is switched ON prior to sampling }
  1347. ACCDBL, { Register accumulating the number of detected double transitions }
  1348. ACCDBLREAD: longword; { Snapshot of the ACCDBL, updated by the READCLRACC or RDCLRDBL
  1349. task }
  1350. end;
  1351. { ================================================================================ }
  1352. { ================ COMP ================ }
  1353. { ================================================================================ }
  1354. {
  1355. Comparator (COMP)
  1356. }
  1357. NRF_COMP_Type = record { COMP Structure }
  1358. TASKS_START, { Start comparator }
  1359. TASKS_STOP, { Stop comparator }
  1360. TASKS_SAMPLE: longword; { Sample comparator value }
  1361. RESERVED0: array [0..60] of longword;
  1362. EVENTS_READY, { COMP is ready and output is valid }
  1363. EVENTS_DOWN, { Downward crossing }
  1364. EVENTS_UP, { Upward crossing }
  1365. EVENTS_CROSS: longword; { Downward or upward crossing }
  1366. RESERVED1: array [0..59] of longword;
  1367. SHORTS: longword; { Shortcut register }
  1368. RESERVED2: array [0..62] of longword;
  1369. INTEN, { Enable or disable interrupt }
  1370. INTENSET, { Enable interrupt }
  1371. INTENCLR: longword; { Disable interrupt }
  1372. RESERVED3: array [0..60] of longword;
  1373. RESULT: longword; { Compare result }
  1374. RESERVED4: array [0..62] of longword;
  1375. ENABLE, { COMP enable }
  1376. PSEL, { Pin select }
  1377. REFSEL, { Reference source select }
  1378. EXTREFSEL: longword; { External reference select }
  1379. RESERVED5: array [0..7] of longword;
  1380. TH, { Threshold configuration for hysteresis unit }
  1381. MODE, { Mode configuration }
  1382. HYST, { Comparator hysteresis enable }
  1383. ISOURCE: longword; { Current source select on analog input }
  1384. end;
  1385. { ================================================================================ }
  1386. { ================ LPCOMP ================ }
  1387. { ================================================================================ }
  1388. {
  1389. Low Power Comparator (LPCOMP)
  1390. }
  1391. NRF_LPCOMP_Type = record { LPCOMP Structure }
  1392. TASKS_START, { Start comparator }
  1393. TASKS_STOP, { Stop comparator }
  1394. TASKS_SAMPLE: longword; { Sample comparator value }
  1395. RESERVED0: array [0..60] of longword;
  1396. EVENTS_READY, { LPCOMP is ready and output is valid }
  1397. EVENTS_DOWN, { Downward crossing }
  1398. EVENTS_UP, { Upward crossing }
  1399. EVENTS_CROSS: longword; { Downward or upward crossing }
  1400. RESERVED1: array [0..59] of longword;
  1401. SHORTS: longword; { Shortcut register }
  1402. RESERVED2: array [0..63] of longword;
  1403. INTENSET, { Enable interrupt }
  1404. INTENCLR: longword; { Disable interrupt }
  1405. RESERVED3: array [0..60] of longword;
  1406. RESULT: longword; { Compare result }
  1407. RESERVED4: array [0..62] of longword;
  1408. ENABLE, { Enable LPCOMP }
  1409. PSEL, { Input pin select }
  1410. REFSEL, { Reference select }
  1411. EXTREFSEL: longword; { External reference select }
  1412. RESERVED5: array [0..3] of longword;
  1413. ANADETECT: longword; { Analog detect configuration }
  1414. RESERVED6: array [0..4] of longword;
  1415. HYST: longword; { Comparator hysteresis enable }
  1416. end;
  1417. { ================================================================================ }
  1418. { ================ SWI ================ }
  1419. { ================================================================================ }
  1420. {
  1421. Software interrupt 0 (SWI)
  1422. }
  1423. NRF_SWI_Type = record { SWI Structure }
  1424. UNUSED: longword; { Unused. }
  1425. end;
  1426. { ================================================================================ }
  1427. { ================ EGU ================ }
  1428. { ================================================================================ }
  1429. {
  1430. Event Generator Unit 0 (EGU)
  1431. }
  1432. NRF_EGU_Type = record { EGU Structure }
  1433. TASKS_TRIGGER: array [0..15] of longword; { Description collection[0]: Trigger 0 for triggering the corresponding
  1434. TRIGGERED[0] event }
  1435. RESERVED0: array [0..47] of longword;
  1436. EVENTS_TRIGGERED: array [0..15] of longword; { Description collection[0]: Event number 0 generated by triggering
  1437. the corresponding TRIGGER[0] task }
  1438. RESERVED1: array [0..111] of longword;
  1439. INTEN, { Enable or disable interrupt }
  1440. INTENSET, { Enable interrupt }
  1441. INTENCLR: longword; { Disable interrupt }
  1442. end;
  1443. { ================================================================================ }
  1444. { ================ PWM ================ }
  1445. { ================================================================================ }
  1446. {
  1447. Pulse Width Modulation Unit 0 (PWM)
  1448. }
  1449. NRF_PWM_Type = record { PWM Structure }
  1450. RESERVED0,
  1451. TASKS_STOP: longword; { Stops PWM pulse generation on all channels at the end of current
  1452. PWM period, and stops sequence playback }
  1453. TASKS_SEQSTART: array [0..1] of longword; { Description collection[0]: Loads the first PWM value on all
  1454. enabled channels from sequence 0, and starts playing that sequence
  1455. at the rate defined in SEQ[0]REFRESH and/or DECODER.MODE. Causes
  1456. PWM generation to start it was not running. }
  1457. TASKS_NEXTSTEP: longword; { Steps by one value in the current sequence on all enabled channels
  1458. if DECODER.MODE=NextStep. Does not cause PWM generation to start
  1459. it was not running. }
  1460. RESERVED1: array [0..59] of longword;
  1461. EVENTS_STOPPED: longword; { Response to STOP task, emitted when PWM pulses are no longer
  1462. generated }
  1463. EVENTS_SEQSTARTED: array [0..1] of longword; { Description collection[0]: First PWM period started on sequence
  1464. 0 }
  1465. EVENTS_SEQEND: array [0..1] of longword; { Description collection[0]: Emitted at end of every sequence
  1466. 0, when last value from RAM has been applied to wave counter }
  1467. EVENTS_PWMPERIODEND, { Emitted at the end of each PWM period }
  1468. EVENTS_LOOPSDONE: longword; { Concatenated sequences have been played the amount of times
  1469. defined in LOOP.CNT }
  1470. RESERVED2: array [0..55] of longword;
  1471. SHORTS: longword; { Shortcut register }
  1472. RESERVED3: array [0..62] of longword;
  1473. INTEN, { Enable or disable interrupt }
  1474. INTENSET, { Enable interrupt }
  1475. INTENCLR: longword; { Disable interrupt }
  1476. RESERVED4: array [0..124] of longword;
  1477. ENABLE, { PWM module enable register }
  1478. MODE, { Selects operating mode of the wave counter }
  1479. COUNTERTOP, { Value up to which the pulse generator counter counts }
  1480. PRESCALER, { Configuration for PWM_CLK }
  1481. DECODER, { Configuration of the decoder }
  1482. LOOP: longword; { Amount of playback of a loop }
  1483. RESERVED5: array [0..1] of longword;
  1484. SEQ: array [0..1] of PWM_SEQ_Type; { Unspecified }
  1485. PSEL: PWM_PSEL_Type; { Unspecified }
  1486. end;
  1487. { ================================================================================ }
  1488. { ================ PDM ================ }
  1489. { ================================================================================ }
  1490. {
  1491. Pulse Density Modulation (Digital Microphone) Interface (PDM)
  1492. }
  1493. NRF_PDM_Type = record { PDM Structure }
  1494. TASKS_START, { Starts continuous PDM transfer }
  1495. TASKS_STOP: longword; { Stops PDM transfer }
  1496. RESERVED0: array [0..61] of longword;
  1497. EVENTS_STARTED, { PDM transfer has started }
  1498. EVENTS_STOPPED, { PDM transfer has finished }
  1499. EVENTS_END: longword; { The PDM has written the last sample specified by SAMPLE.MAXCNT
  1500. (or the last sample after a STOP task has been received) to
  1501. Data RAM }
  1502. RESERVED1: array [0..124] of longword;
  1503. INTEN, { Enable or disable interrupt }
  1504. INTENSET, { Enable interrupt }
  1505. INTENCLR: longword; { Disable interrupt }
  1506. RESERVED2: array [0..124] of longword;
  1507. ENABLE, { PDM module enable register }
  1508. PDMCLKCTRL, { PDM clock generator control }
  1509. MODE: longword; { Defines the routing of the connected PDM microphones' signals }
  1510. RESERVED3: array [0..2] of longword;
  1511. GAINL, { Left output gain adjustment }
  1512. GAINR: longword; { Right output gain adjustment }
  1513. RESERVED4: array [0..7] of longword;
  1514. PSEL: PDM_PSEL_Type; { Unspecified }
  1515. RESERVED5: array [0..5] of longword;
  1516. SAMPLE: PDM_SAMPLE_Type; { Unspecified }
  1517. end;
  1518. { ================================================================================ }
  1519. { ================ NVMC ================ }
  1520. { ================================================================================ }
  1521. {
  1522. Non Volatile Memory Controller (NVMC)
  1523. }
  1524. NRF_NVMC_Type = record { NVMC Structure }
  1525. RESERVED0: array [0..255] of longword;
  1526. READY: longword; { Ready flag }
  1527. RESERVED1: array [0..63] of longword;
  1528. CONFIG: longword; { Configuration register }
  1529. ERASEPAGE: longword; { Register for erasing a page in Code area }
  1530. ERASEALL, { Register for erasing all non-volatile user memory }
  1531. ERASEPCR0, { Deprecated register - Register for erasing a page in Code area.
  1532. Equivalent to ERASEPAGE. }
  1533. ERASEUICR: longword; { Register for erasing User Information Configuration Registers }
  1534. RESERVED2: array [0..9] of longword;
  1535. ICACHECNF, { I-Code cache configuration register. }
  1536. RESERVED3,
  1537. IHIT, { I-Code cache hit counter. }
  1538. IMISS: longword; { I-Code cache miss counter. }
  1539. end;
  1540. { ================================================================================ }
  1541. { ================ PPI ================ }
  1542. { ================================================================================ }
  1543. {
  1544. Programmable Peripheral Interconnect (PPI)
  1545. }
  1546. NRF_PPI_Type = record { PPI Structure }
  1547. TASKS_CHG: array [0..5] of PPI_TASKS_CHG_Type; { Channel group tasks }
  1548. RESERVED0: array [0..307] of longword;
  1549. CHEN, { Channel enable register }
  1550. CHENSET, { Channel enable set register }
  1551. CHENCLR, { Channel enable clear register }
  1552. RESERVED1: longint;
  1553. CH: array [0..19] of PPI_CH_Type; { PPI Channel }
  1554. RESERVED2: array [0..147] of longword;
  1555. CHG: array [0..5] of longword; { Description collection[0]: Channel group 0 }
  1556. RESERVED3: array [0..61] of longword;
  1557. FORK: array [0..31] of PPI_FORK_Type; { Fork }
  1558. end;
  1559. { ================================================================================ }
  1560. { ================ MWU ================ }
  1561. { ================================================================================ }
  1562. {
  1563. Memory Watch Unit (MWU)
  1564. }
  1565. NRF_MWU_Type = record { MWU Structure }
  1566. RESERVED0: array [0..63] of longword;
  1567. EVENTS_REGION: array [0..3] of MWU_EVENTS_REGION_Type; { Unspecified }
  1568. RESERVED1: array [0..15] of longword;
  1569. EVENTS_PREGION: array [0..1] of MWU_EVENTS_PREGION_Type; { Unspecified }
  1570. RESERVED2: array [0..99] of longword;
  1571. INTEN, { Enable or disable interrupt }
  1572. INTENSET, { Enable interrupt }
  1573. INTENCLR: longword; { Disable interrupt }
  1574. RESERVED3: array [0..4] of longword;
  1575. NMIEN, { Enable or disable non-maskable interrupt }
  1576. NMIENSET, { Enable non-maskable interrupt }
  1577. NMIENCLR: longword; { Disable non-maskable interrupt }
  1578. RESERVED4: array [0..52] of longword;
  1579. PERREGION: array [0..1] of MWU_PERREGION_Type; { Unspecified }
  1580. RESERVED5: array [0..63] of longword;
  1581. REGIONEN, { Enable/disable regions watch }
  1582. REGIONENSET, { Enable regions watch }
  1583. REGIONENCLR: longword; { Disable regions watch }
  1584. RESERVED6: array [0..56] of longword;
  1585. REGION: array [0..3] of MWU_REGION_Type; { Unspecified }
  1586. RESERVED7: array [0..31] of longword;
  1587. PREGION: array [0..1] of MWU_PREGION_Type; { Unspecified }
  1588. end;
  1589. { ================================================================================ }
  1590. { ================ I2S ================ }
  1591. { ================================================================================ }
  1592. {
  1593. Inter-IC Sound (I2S)
  1594. }
  1595. NRF_I2S_Type = record { I2S Structure }
  1596. TASKS_START, { Starts continuous I<sup>2</sup>S transfer. Also starts MCK generator
  1597. when this is enabled. }
  1598. TASKS_STOP: longword; { Stops I<sup>2</sup>S transfer. Also stops MCK generator. Triggering
  1599. this task will cause the STOPPED event to be generated. }
  1600. RESERVED0: array [0..62] of longword;
  1601. EVENTS_RXPTRUPD, { The RXD.PTR register has been copied to internal double-buffers.
  1602. When the I2S module is started and RX is enabled, this event
  1603. will be generated for every RXTXD.MAXCNT words that are received
  1604. on the SDIN pin. }
  1605. EVENTS_STOPPED: longword; { I<sup>2</sup>S transfer stopped. }
  1606. RESERVED1: array [0..1] of longword;
  1607. EVENTS_TXPTRUPD: longword; { The TDX.PTR register has been copied to internal double-buffers.
  1608. When the I2S module is started and TX is enabled, this event
  1609. will be generated for every RXTXD.MAXCNT words that are sent
  1610. on the SDOUT pin. }
  1611. RESERVED2: array [0..121] of longword;
  1612. INTEN, { Enable or disable interrupt }
  1613. INTENSET, { Enable interrupt }
  1614. INTENCLR: longword; { Disable interrupt }
  1615. RESERVED3: array [0..124] of longword;
  1616. ENABLE: longword; { Enable I<sup>2</sup>S module. }
  1617. CONFIG: I2S_CONFIG_Type; { Unspecified }
  1618. RESERVED4: array [0..2] of longword;
  1619. RXD: I2S_RXD_Type; { Unspecified }
  1620. RESERVED5,
  1621. TXD: I2S_TXD_Type; { Unspecified }
  1622. RESERVED6: array [0..2] of longword;
  1623. RXTXD: I2S_RXTXD_Type; { Unspecified }
  1624. RESERVED7: array [0..2] of longword;
  1625. PSEL: I2S_PSEL_Type; { Unspecified }
  1626. end;
  1627. { ================================================================================ }
  1628. { ================ FPU ================ }
  1629. { ================================================================================ }
  1630. {
  1631. FPU (FPU)
  1632. }
  1633. NRF_FPU_Type = record { FPU Structure }
  1634. UNUSED: longword; { Unused. }
  1635. end;
  1636. { ================================================================================ }
  1637. { ================ GPIO ================ }
  1638. { ================================================================================ }
  1639. {
  1640. GPIO Port 1 (GPIO)
  1641. }
  1642. NRF_GPIO_Type = record { GPIO Structure }
  1643. RESERVED0: array [0..320] of longword;
  1644. OUT, { Write GPIO port }
  1645. OUTSET, { Set individual bits in GPIO port }
  1646. OUTCLR, { Clear individual bits in GPIO port }
  1647. IN_, { Read GPIO port }
  1648. DIR, { Direction of GPIO pins }
  1649. DIRSET, { DIR set register }
  1650. DIRCLR, { DIR clear register }
  1651. LATCH, { Latch register indicating what GPIO pins that have met the criteria
  1652. set in the PIN_CNF[n].SENSE registers }
  1653. DETECTMODE: longword; { Select between default DETECT signal behaviour and LDETECT mode }
  1654. RESERVED1: array [0..117] of longword;
  1655. PIN_CNF: array [0..31] of longword; { Description collection[0]: Configuration of GPIO pins }
  1656. end;
  1657. { ================================================================================ }
  1658. { ================ Peripheral memory map ================ }
  1659. { ================================================================================ }
  1660. const
  1661. NRF_FICR_BASE = $10000000;
  1662. NRF_UICR_BASE = $10001000;
  1663. NRF_BPROT_BASE = $40000000;
  1664. NRF_POWER_BASE = $40000000;
  1665. NRF_CLOCK_BASE = $40000000;
  1666. NRF_AMLI_BASE = $40000000;
  1667. NRF_RADIO_BASE = $40001000;
  1668. NRF_UARTE0_BASE = $40002000;
  1669. NRF_UART0_BASE = $40002000;
  1670. NRF_SPIM0_BASE = $40003000;
  1671. NRF_SPIS0_BASE = $40003000;
  1672. NRF_TWIM0_BASE = $40003000;
  1673. NRF_TWIS0_BASE = $40003000;
  1674. NRF_SPI0_BASE = $40003000;
  1675. NRF_TWI0_BASE = $40003000;
  1676. NRF_SPIM1_BASE = $40004000;
  1677. NRF_SPIS1_BASE = $40004000;
  1678. NRF_TWIM1_BASE = $40004000;
  1679. NRF_TWIS1_BASE = $40004000;
  1680. NRF_SPI1_BASE = $40004000;
  1681. NRF_TWI1_BASE = $40004000;
  1682. NRF_NFCT_BASE = $40005000;
  1683. NRF_GPIOTE_BASE = $40006000;
  1684. NRF_SAADC_BASE = $40007000;
  1685. NRF_TIMER0_BASE = $40008000;
  1686. NRF_TIMER1_BASE = $40009000;
  1687. NRF_TIMER2_BASE = $4000A000;
  1688. NRF_RTC0_BASE = $4000B000;
  1689. NRF_TEMP_BASE = $4000C000;
  1690. NRF_RNG_BASE = $4000D000;
  1691. NRF_ECB_BASE = $4000E000;
  1692. NRF_CCM_BASE = $4000F000;
  1693. NRF_AAR_BASE = $4000F000;
  1694. NRF_WDT_BASE = $40010000;
  1695. NRF_RTC1_BASE = $40011000;
  1696. NRF_QDEC_BASE = $40012000;
  1697. NRF_COMP_BASE = $40013000;
  1698. NRF_LPCOMP_BASE = $40013000;
  1699. NRF_SWI0_BASE = $40014000;
  1700. NRF_EGU0_BASE = $40014000;
  1701. NRF_SWI1_BASE = $40015000;
  1702. NRF_EGU1_BASE = $40015000;
  1703. NRF_SWI2_BASE = $40016000;
  1704. NRF_EGU2_BASE = $40016000;
  1705. NRF_SWI3_BASE = $40017000;
  1706. NRF_EGU3_BASE = $40017000;
  1707. NRF_SWI4_BASE = $40018000;
  1708. NRF_EGU4_BASE = $40018000;
  1709. NRF_SWI5_BASE = $40019000;
  1710. NRF_EGU5_BASE = $40019000;
  1711. NRF_TIMER3_BASE = $4001A000;
  1712. NRF_TIMER4_BASE = $4001B000;
  1713. NRF_PWM0_BASE = $4001C000;
  1714. NRF_PDM_BASE = $4001D000;
  1715. NRF_NVMC_BASE = $4001E000;
  1716. NRF_PPI_BASE = $4001F000;
  1717. NRF_MWU_BASE = $40020000;
  1718. NRF_PWM1_BASE = $40021000;
  1719. NRF_PWM2_BASE = $40022000;
  1720. NRF_SPIM2_BASE = $40023000;
  1721. NRF_SPIS2_BASE = $40023000;
  1722. NRF_SPI2_BASE = $40023000;
  1723. NRF_RTC2_BASE = $40024000;
  1724. NRF_I2S_BASE = $40025000;
  1725. NRF_FPU_BASE = $40026000;
  1726. NRF_P0_BASE = $50000000;
  1727. { ================================================================================ }
  1728. { ================ Peripheral declaration ================ }
  1729. { ================================================================================ }
  1730. var
  1731. NRF_FICR : NRF_FICR_Type absolute NRF_FICR_BASE;
  1732. NRF_UICR : NRF_UICR_Type absolute NRF_UICR_BASE;
  1733. NRF_BPROT : NRF_BPROT_Type absolute NRF_BPROT_BASE;
  1734. NRF_POWER : NRF_POWER_Type absolute NRF_POWER_BASE;
  1735. NRF_CLOCK : NRF_CLOCK_Type absolute NRF_CLOCK_BASE;
  1736. NRF_AMLI : NRF_AMLI_Type absolute NRF_AMLI_BASE;
  1737. NRF_RADIO : NRF_RADIO_Type absolute NRF_RADIO_BASE;
  1738. NRF_UARTE0: NRF_UARTE_Type absolute NRF_UARTE0_BASE;
  1739. NRF_UART0 : NRF_UART_Type absolute NRF_UART0_BASE;
  1740. NRF_SPIM0 : NRF_SPIM_Type absolute NRF_SPIM0_BASE;
  1741. NRF_SPIS0 : NRF_SPIS_Type absolute NRF_SPIS0_BASE;
  1742. NRF_TWIM0 : NRF_TWIM_Type absolute NRF_TWIM0_BASE;
  1743. NRF_TWIS0 : NRF_TWIS_Type absolute NRF_TWIS0_BASE;
  1744. NRF_SPI0 : NRF_SPI_Type absolute NRF_SPI0_BASE;
  1745. NRF_TWI0 : NRF_TWI_Type absolute NRF_TWI0_BASE;
  1746. NRF_SPIM1 : NRF_SPIM_Type absolute NRF_SPIM1_BASE;
  1747. NRF_SPIS1 : NRF_SPIS_Type absolute NRF_SPIS1_BASE;
  1748. NRF_TWIM1 : NRF_TWIM_Type absolute NRF_TWIM1_BASE;
  1749. NRF_TWIS1 : NRF_TWIS_Type absolute NRF_TWIS1_BASE;
  1750. NRF_SPI1 : NRF_SPI_Type absolute NRF_SPI1_BASE;
  1751. NRF_TWI1 : NRF_TWI_Type absolute NRF_TWI1_BASE;
  1752. NRF_NFCT : NRF_NFCT_Type absolute NRF_NFCT_BASE;
  1753. NRF_GPIOTE: NRF_GPIOTE_Type absolute NRF_GPIOTE_BASE;
  1754. NRF_SAADC : NRF_SAADC_Type absolute NRF_SAADC_BASE;
  1755. NRF_TIMER0: NRF_TIMER_Type absolute NRF_TIMER0_BASE;
  1756. NRF_TIMER1: NRF_TIMER_Type absolute NRF_TIMER1_BASE;
  1757. NRF_TIMER2: NRF_TIMER_Type absolute NRF_TIMER2_BASE;
  1758. NRF_RTC0 : NRF_RTC_Type absolute NRF_RTC0_BASE;
  1759. NRF_TEMP : NRF_TEMP_Type absolute NRF_TEMP_BASE;
  1760. NRF_RNG : NRF_RNG_Type absolute NRF_RNG_BASE;
  1761. NRF_ECB : NRF_ECB_Type absolute NRF_ECB_BASE;
  1762. NRF_CCM : NRF_CCM_Type absolute NRF_CCM_BASE;
  1763. NRF_AAR : NRF_AAR_Type absolute NRF_AAR_BASE;
  1764. NRF_WDT : NRF_WDT_Type absolute NRF_WDT_BASE;
  1765. NRF_RTC1 : NRF_RTC_Type absolute NRF_RTC1_BASE;
  1766. NRF_QDEC : NRF_QDEC_Type absolute NRF_QDEC_BASE;
  1767. NRF_COMP : NRF_COMP_Type absolute NRF_COMP_BASE;
  1768. NRF_LPCOMP: NRF_LPCOMP_Type absolute NRF_LPCOMP_BASE;
  1769. NRF_SWI0 : NRF_SWI_Type absolute NRF_SWI0_BASE;
  1770. NRF_EGU0 : NRF_EGU_Type absolute NRF_EGU0_BASE;
  1771. NRF_SWI1 : NRF_SWI_Type absolute NRF_SWI1_BASE;
  1772. NRF_EGU1 : NRF_EGU_Type absolute NRF_EGU1_BASE;
  1773. NRF_SWI2 : NRF_SWI_Type absolute NRF_SWI2_BASE;
  1774. NRF_EGU2 : NRF_EGU_Type absolute NRF_EGU2_BASE;
  1775. NRF_SWI3 : NRF_SWI_Type absolute NRF_SWI3_BASE;
  1776. NRF_EGU3 : NRF_EGU_Type absolute NRF_EGU3_BASE;
  1777. NRF_SWI4 : NRF_SWI_Type absolute NRF_SWI4_BASE;
  1778. NRF_EGU4 : NRF_EGU_Type absolute NRF_EGU4_BASE;
  1779. NRF_SWI5 : NRF_SWI_Type absolute NRF_SWI5_BASE;
  1780. NRF_EGU5 : NRF_EGU_Type absolute NRF_EGU5_BASE;
  1781. NRF_TIMER3: NRF_TIMER_Type absolute NRF_TIMER3_BASE;
  1782. NRF_TIMER4: NRF_TIMER_Type absolute NRF_TIMER4_BASE;
  1783. NRF_PWM0 : NRF_PWM_Type absolute NRF_PWM0_BASE;
  1784. NRF_PDM : NRF_PDM_Type absolute NRF_PDM_BASE;
  1785. NRF_NVMC : NRF_NVMC_Type absolute NRF_NVMC_BASE;
  1786. NRF_PPI : NRF_PPI_Type absolute NRF_PPI_BASE;
  1787. NRF_MWU : NRF_MWU_Type absolute NRF_MWU_BASE;
  1788. NRF_PWM1 : NRF_PWM_Type absolute NRF_PWM1_BASE;
  1789. NRF_PWM2 : NRF_PWM_Type absolute NRF_PWM2_BASE;
  1790. NRF_SPIM2 : NRF_SPIM_Type absolute NRF_SPIM2_BASE;
  1791. NRF_SPIS2 : NRF_SPIS_Type absolute NRF_SPIS2_BASE;
  1792. NRF_SPI2 : NRF_SPI_Type absolute NRF_SPI2_BASE;
  1793. NRF_RTC2 : NRF_RTC_Type absolute NRF_RTC2_BASE;
  1794. NRF_I2S : NRF_I2S_Type absolute NRF_I2S_BASE;
  1795. NRF_FPU : NRF_FPU_Type absolute NRF_FPU_BASE;
  1796. NRF_P0 : NRF_GPIO_Type absolute NRF_P0_BASE;
  1797. implementation
  1798. procedure NMI_Handler; external name 'NMI_Handler';
  1799. procedure HardFault_Handler; external name 'HardFault_Handler';
  1800. procedure MemoryManagement_Handler; external name 'MemoryManagement_Handler';
  1801. procedure BusFault_Handler; external name 'BusFault_Handler';
  1802. procedure UsageFault_Handler; external name 'UsageFault_Handler';
  1803. procedure SVC_Handler; external name 'SVC_Handler';
  1804. procedure DebugMonitor_Handler; external name 'DebugMonitor_Handler';
  1805. procedure PendSV_Handler; external name 'PendSV_Handler';
  1806. procedure SysTick_Handler; external name 'SysTick_Handler';
  1807. procedure POWER_CLOCK_IRQHandler; external name 'POWER_CLOCK_IRQHandler';
  1808. procedure RADIO_IRQHandler; external name 'RADIO_IRQHandler';
  1809. procedure UARTE0_UART0_IRQHandler; external name 'UARTE0_UART0_IRQHandler';
  1810. procedure SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler; external name 'SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler';
  1811. procedure SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler; external name 'SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler';
  1812. procedure NFCT_IRQHandler; external name 'NFCT_IRQHandler';
  1813. procedure GPIOTE_IRQHandler; external name 'GPIOTE_IRQHandler';
  1814. procedure SAADC_IRQHandler; external name 'SAADC_IRQHandler';
  1815. procedure TIMER0_IRQHandler; external name 'TIMER0_IRQHandler';
  1816. procedure TIMER1_IRQHandler; external name 'TIMER1_IRQHandler';
  1817. procedure TIMER2_IRQHandler; external name 'TIMER2_IRQHandler';
  1818. procedure RTC0_IRQHandler; external name 'RTC0_IRQHandler';
  1819. procedure TEMP_IRQHandler; external name 'TEMP_IRQHandler';
  1820. procedure RNG_IRQHandler; external name 'RNG_IRQHandler';
  1821. procedure ECB_IRQHandler; external name 'ECB_IRQHandler';
  1822. procedure CCM_AAR_IRQHandler; external name 'CCM_AAR_IRQHandler';
  1823. procedure WDT_IRQHandler; external name 'WDT_IRQHandler';
  1824. procedure RTC1_IRQHandler; external name 'RTC1_IRQHandler';
  1825. procedure QDEC_IRQHandler; external name 'QDEC_IRQHandler';
  1826. procedure COMP_LPCOMP_IRQHandler; external name 'COMP_LPCOMP_IRQHandler';
  1827. procedure SWI0_EGU0_IRQHandler; external name 'SWI0_EGU0_IRQHandler';
  1828. procedure SWI1_EGU1_IRQHandler; external name 'SWI1_EGU1_IRQHandler';
  1829. procedure SWI2_EGU2_IRQHandler; external name 'SWI2_EGU2_IRQHandler';
  1830. procedure SWI3_EGU3_IRQHandler; external name 'SWI3_EGU3_IRQHandler';
  1831. procedure SWI4_EGU4_IRQHandler; external name 'SWI4_EGU4_IRQHandler';
  1832. procedure SWI5_EGU5_IRQHandler; external name 'SWI5_EGU5_IRQHandler';
  1833. procedure TIMER3_IRQHandler; external name 'TIMER3_IRQHandler';
  1834. procedure TIMER4_IRQHandler; external name 'TIMER4_IRQHandler';
  1835. procedure PWM0_IRQHandler; external name 'PWM0_IRQHandler';
  1836. procedure PDM_IRQHandler; external name 'PDM_IRQHandler';
  1837. procedure MWU_IRQHandler; external name 'MWU_IRQHandler';
  1838. procedure PWM1_IRQHandler; external name 'PWM1_IRQHandler';
  1839. procedure PWM2_IRQHandler; external name 'PWM2_IRQHandler';
  1840. procedure SPIM2_SPIS2_SPI2_IRQHandler; external name 'SPIM2_SPIS2_SPI2_IRQHandler';
  1841. procedure RTC2_IRQHandler; external name 'RTC2_IRQHandler';
  1842. procedure I2S_IRQHandler; external name 'I2S_IRQHandler';
  1843. {$i cortexm4f_start.inc}
  1844. procedure Vectors; assembler; nostackframe;
  1845. label interrupt_vectors;
  1846. asm
  1847. .section ".init.interrupt_vectors"
  1848. interrupt_vectors:
  1849. .long _stack_top
  1850. .long Startup
  1851. .long NMI_Handler
  1852. .long HardFault_Handler
  1853. .long MemoryManagement_Handler
  1854. .long BusFault_Handler
  1855. .long UsageFault_Handler
  1856. .long 0
  1857. .long 0
  1858. .long 0
  1859. .long 0
  1860. .long SVC_Handler
  1861. .long DebugMonitor_Handler
  1862. .long 0
  1863. .long PendSV_Handler
  1864. .long SysTick_Handler
  1865. .long POWER_CLOCK_IRQHandler
  1866. .long RADIO_IRQHandler
  1867. .long UARTE0_UART0_IRQHandler
  1868. .long SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler
  1869. .long SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler
  1870. .long NFCT_IRQHandler
  1871. .long GPIOTE_IRQHandler
  1872. .long SAADC_IRQHandler
  1873. .long TIMER0_IRQHandler
  1874. .long TIMER1_IRQHandler
  1875. .long TIMER2_IRQHandler
  1876. .long RTC0_IRQHandler
  1877. .long TEMP_IRQHandler
  1878. .long RNG_IRQHandler
  1879. .long ECB_IRQHandler
  1880. .long CCM_AAR_IRQHandler
  1881. .long WDT_IRQHandler
  1882. .long RTC1_IRQHandler
  1883. .long QDEC_IRQHandler
  1884. .long COMP_LPCOMP_IRQHandler
  1885. .long SWI0_EGU0_IRQHandler
  1886. .long SWI1_EGU1_IRQHandler
  1887. .long SWI2_EGU2_IRQHandler
  1888. .long SWI3_EGU3_IRQHandler
  1889. .long SWI4_EGU4_IRQHandler
  1890. .long SWI5_EGU5_IRQHandler
  1891. .long TIMER3_IRQHandler
  1892. .long TIMER4_IRQHandler
  1893. .long PWM0_IRQHandler
  1894. .long PDM_IRQHandler
  1895. .long 0
  1896. .long 0
  1897. .long MWU_IRQHandler
  1898. .long PWM1_IRQHandler
  1899. .long PWM2_IRQHandler
  1900. .long SPIM2_SPIS2_SPI2_IRQHandler
  1901. .long RTC2_IRQHandler
  1902. .long I2S_IRQHandler
  1903. .long 0
  1904. .long 0
  1905. .long 0
  1906. .long 0
  1907. .long 0
  1908. .long 0
  1909. .long 0
  1910. .long 0
  1911. .long 0
  1912. .long 0
  1913. .long 0
  1914. .long 0
  1915. .long 0
  1916. .long 0
  1917. .long 0
  1918. .long 0
  1919. .long 0
  1920. .long 0
  1921. .long 0
  1922. .long 0
  1923. .long 0
  1924. .long 0
  1925. .long 0
  1926. .long 0
  1927. .long 0
  1928. .long 0
  1929. .long 0
  1930. .long 0
  1931. .long 0
  1932. .long 0
  1933. .long 0
  1934. .long 0
  1935. .long 0
  1936. .long 0
  1937. .long 0
  1938. .long 0
  1939. .long 0
  1940. .long 0
  1941. .long 0
  1942. .long 0
  1943. .long 0
  1944. .long 0
  1945. .long 0
  1946. .long 0
  1947. .long 0
  1948. .long 0
  1949. .long 0
  1950. .long 0
  1951. .long 0
  1952. .long 0
  1953. .long 0
  1954. .long 0
  1955. .long 0
  1956. .long 0
  1957. .long 0
  1958. .long 0
  1959. .long 0
  1960. .long 0
  1961. .long 0
  1962. .long 0
  1963. .long 0
  1964. .long 0
  1965. .long 0
  1966. .long 0
  1967. .long 0
  1968. .long 0
  1969. .long 0
  1970. .long 0
  1971. .long 0
  1972. .long 0
  1973. .long 0
  1974. .long 0
  1975. .long 0
  1976. .long 0
  1977. .long 0
  1978. .long 0
  1979. .long 0
  1980. .long 0
  1981. .long 0
  1982. .long 0
  1983. .long 0
  1984. .long 0
  1985. .long 0
  1986. .long 0
  1987. .long 0
  1988. .long 0
  1989. .long 0
  1990. .long 0
  1991. .long 0
  1992. .long 0
  1993. .long 0
  1994. .long 0
  1995. .long 0
  1996. .long 0
  1997. .long 0
  1998. .long 0
  1999. .long 0
  2000. .long 0
  2001. .long 0
  2002. .long 0
  2003. .long 0
  2004. .long 0
  2005. .long 0
  2006. .long 0
  2007. .long 0
  2008. .long 0
  2009. .long 0
  2010. .long 0
  2011. .long 0
  2012. .long 0
  2013. .long 0
  2014. .long 0
  2015. .long 0
  2016. .long 0
  2017. .long 0
  2018. .long 0
  2019. .long 0
  2020. .long 0
  2021. .long 0
  2022. .long 0
  2023. .long 0
  2024. .long 0
  2025. .long 0
  2026. .long 0
  2027. .long 0
  2028. .long 0
  2029. .long 0
  2030. .long 0
  2031. .long 0
  2032. .long 0
  2033. .long 0
  2034. .long 0
  2035. .long 0
  2036. .long 0
  2037. .long 0
  2038. .long 0
  2039. .long 0
  2040. .long 0
  2041. .long 0
  2042. .long 0
  2043. .long 0
  2044. .long 0
  2045. .long 0
  2046. .long 0
  2047. .long 0
  2048. .long 0
  2049. .long 0
  2050. .long 0
  2051. .long 0
  2052. .long 0
  2053. .long 0
  2054. .long 0
  2055. .long 0
  2056. .long 0
  2057. .long 0
  2058. .long 0
  2059. .long 0
  2060. .long 0
  2061. .long 0
  2062. .long 0
  2063. .long 0
  2064. .long 0
  2065. .long 0
  2066. .long 0
  2067. .long 0
  2068. .long 0
  2069. .long 0
  2070. .long 0
  2071. .long 0
  2072. .long 0
  2073. .long 0
  2074. .long 0
  2075. .long 0
  2076. .long 0
  2077. .long 0
  2078. .long 0
  2079. .long 0
  2080. .long 0
  2081. .long 0
  2082. .long 0
  2083. .long 0
  2084. .long 0
  2085. .long 0
  2086. .long 0
  2087. .long 0
  2088. .long 0
  2089. .long 0
  2090. .long 0
  2091. .long 0
  2092. .long 0
  2093. .long 0
  2094. .long 0
  2095. .long 0
  2096. .long 0
  2097. .long 0
  2098. .long 0
  2099. .long 0
  2100. .long 0
  2101. .long 0
  2102. .long 0
  2103. .long 0
  2104. .long 0
  2105. .weak NMI_Handler
  2106. .weak HardFault_Handler
  2107. .weak MemoryManagement_Handler
  2108. .weak BusFault_Handler
  2109. .weak UsageFault_Handler
  2110. .weak SVC_Handler
  2111. .weak DebugMonitor_Handler
  2112. .weak PendSV_Handler
  2113. .weak SysTick_Handler
  2114. .weak POWER_CLOCK_IRQHandler
  2115. .weak RADIO_IRQHandler
  2116. .weak UARTE0_UART0_IRQHandler
  2117. .weak SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler
  2118. .weak SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler
  2119. .weak NFCT_IRQHandler
  2120. .weak GPIOTE_IRQHandler
  2121. .weak SAADC_IRQHandler
  2122. .weak TIMER0_IRQHandler
  2123. .weak TIMER1_IRQHandler
  2124. .weak TIMER2_IRQHandler
  2125. .weak RTC0_IRQHandler
  2126. .weak TEMP_IRQHandler
  2127. .weak RNG_IRQHandler
  2128. .weak ECB_IRQHandler
  2129. .weak CCM_AAR_IRQHandler
  2130. .weak WDT_IRQHandler
  2131. .weak RTC1_IRQHandler
  2132. .weak QDEC_IRQHandler
  2133. .weak COMP_LPCOMP_IRQHandler
  2134. .weak SWI0_EGU0_IRQHandler
  2135. .weak SWI1_EGU1_IRQHandler
  2136. .weak SWI2_EGU2_IRQHandler
  2137. .weak SWI3_EGU3_IRQHandler
  2138. .weak SWI4_EGU4_IRQHandler
  2139. .weak SWI5_EGU5_IRQHandler
  2140. .weak TIMER3_IRQHandler
  2141. .weak TIMER4_IRQHandler
  2142. .weak PWM0_IRQHandler
  2143. .weak PDM_IRQHandler
  2144. .weak MWU_IRQHandler
  2145. .weak PWM1_IRQHandler
  2146. .weak PWM2_IRQHandler
  2147. .weak SPIM2_SPIS2_SPI2_IRQHandler
  2148. .weak RTC2_IRQHandler
  2149. .weak I2S_IRQHandler
  2150. .set NMI_Handler, HaltProc
  2151. .set HardFault_Handler, HaltProc
  2152. .set MemoryManagement_Handler, HaltProc
  2153. .set BusFault_Handler, HaltProc
  2154. .set UsageFault_Handler, HaltProc
  2155. .set SVC_Handler, HaltProc
  2156. .set DebugMonitor_Handler, HaltProc
  2157. .set PendSV_Handler, HaltProc
  2158. .set SysTick_Handler, HaltProc
  2159. .set POWER_CLOCK_IRQHandler, HaltProc
  2160. .set RADIO_IRQHandler, HaltProc
  2161. .set UARTE0_UART0_IRQHandler, HaltProc
  2162. .set SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler, HaltProc
  2163. .set SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler, HaltProc
  2164. .set NFCT_IRQHandler, HaltProc
  2165. .set GPIOTE_IRQHandler, HaltProc
  2166. .set SAADC_IRQHandler, HaltProc
  2167. .set TIMER0_IRQHandler, HaltProc
  2168. .set TIMER1_IRQHandler, HaltProc
  2169. .set TIMER2_IRQHandler, HaltProc
  2170. .set RTC0_IRQHandler, HaltProc
  2171. .set TEMP_IRQHandler, HaltProc
  2172. .set RNG_IRQHandler, HaltProc
  2173. .set ECB_IRQHandler, HaltProc
  2174. .set CCM_AAR_IRQHandler, HaltProc
  2175. .set WDT_IRQHandler, HaltProc
  2176. .set RTC1_IRQHandler, HaltProc
  2177. .set QDEC_IRQHandler, HaltProc
  2178. .set COMP_LPCOMP_IRQHandler, HaltProc
  2179. .set SWI0_EGU0_IRQHandler, HaltProc
  2180. .set SWI1_EGU1_IRQHandler, HaltProc
  2181. .set SWI2_EGU2_IRQHandler, HaltProc
  2182. .set SWI3_EGU3_IRQHandler, HaltProc
  2183. .set SWI4_EGU4_IRQHandler, HaltProc
  2184. .set SWI5_EGU5_IRQHandler, HaltProc
  2185. .set TIMER3_IRQHandler, HaltProc
  2186. .set TIMER4_IRQHandler, HaltProc
  2187. .set PWM0_IRQHandler, HaltProc
  2188. .set PDM_IRQHandler, HaltProc
  2189. .set MWU_IRQHandler, HaltProc
  2190. .set PWM1_IRQHandler, HaltProc
  2191. .set PWM2_IRQHandler, HaltProc
  2192. .set SPIM2_SPIS2_SPI2_IRQHandler, HaltProc
  2193. .set RTC2_IRQHandler, HaltProc
  2194. .set I2S_IRQHandler, HaltProc
  2195. .text
  2196. end;
  2197. end.