nrf52.h 182 KB

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