nrf52811.h 155 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088
  1. /*
  2. * Copyright (c) 2010 - 2020, 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 nrf52811.h
  40. * @brief CMSIS HeaderFile
  41. * @version 1
  42. * @date 04. March 2020
  43. * @note Generated by SVDConv V3.3.25 on Wednesday, 04.03.2020 14:59:24
  44. * from File 'nrf52811.svd',
  45. * last modified on Wednesday, 04.03.2020 13:59:16
  46. */
  47. /** @addtogroup Nordic Semiconductor
  48. * @{
  49. */
  50. /** @addtogroup nrf52811
  51. * @{
  52. */
  53. #ifndef NRF52811_H
  54. #define NRF52811_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. /* ========================================== nrf52811 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. TWIM0_TWIS0_TWI0_SPIM1_SPIS1_SPI1_IRQn= 3, /*!< 3 TWIM0_TWIS0_TWI0_SPIM1_SPIS1_SPI1 */
  83. SPIM0_SPIS0_SPI0_IRQn = 4, /*!< 4 SPIM0_SPIS0_SPI0 */
  84. GPIOTE_IRQn = 6, /*!< 6 GPIOTE */
  85. SAADC_IRQn = 7, /*!< 7 SAADC */
  86. TIMER0_IRQn = 8, /*!< 8 TIMER0 */
  87. TIMER1_IRQn = 9, /*!< 9 TIMER1 */
  88. TIMER2_IRQn = 10, /*!< 10 TIMER2 */
  89. RTC0_IRQn = 11, /*!< 11 RTC0 */
  90. TEMP_IRQn = 12, /*!< 12 TEMP */
  91. RNG_IRQn = 13, /*!< 13 RNG */
  92. ECB_IRQn = 14, /*!< 14 ECB */
  93. CCM_AAR_IRQn = 15, /*!< 15 CCM_AAR */
  94. WDT_IRQn = 16, /*!< 16 WDT */
  95. RTC1_IRQn = 17, /*!< 17 RTC1 */
  96. QDEC_IRQn = 18, /*!< 18 QDEC */
  97. COMP_IRQn = 19, /*!< 19 COMP */
  98. SWI0_EGU0_IRQn = 20, /*!< 20 SWI0_EGU0 */
  99. SWI1_EGU1_IRQn = 21, /*!< 21 SWI1_EGU1 */
  100. SWI2_IRQn = 22, /*!< 22 SWI2 */
  101. SWI3_IRQn = 23, /*!< 23 SWI3 */
  102. SWI4_IRQn = 24, /*!< 24 SWI4 */
  103. SWI5_IRQn = 25, /*!< 25 SWI5 */
  104. PWM0_IRQn = 28, /*!< 28 PWM0 */
  105. PDM_IRQn = 29 /*!< 29 PDM */
  106. } IRQn_Type;
  107. /* =========================================================================================================================== */
  108. /* ================ Processor and Core Peripheral Section ================ */
  109. /* =========================================================================================================================== */
  110. /* =========================== Configuration of the ARM Cortex-M4 Processor and Core Peripherals =========================== */
  111. #define __CM4_REV 0x0001U /*!< CM4 Core Revision */
  112. #define __DSP_PRESENT 1 /*!< DSP present or not */
  113. #define __VTOR_PRESENT 1 /*!< Set to 1 if CPU supports Vector Table Offset Register */
  114. #define __NVIC_PRIO_BITS 3 /*!< Number of Bits used for Priority Levels */
  115. #define __Vendor_SysTickConfig 0 /*!< Set to 1 if different SysTick Config is used */
  116. #define __MPU_PRESENT 1 /*!< MPU present */
  117. #define __FPU_PRESENT 0 /*!< FPU present */
  118. /** @} */ /* End of group Configuration_of_CMSIS */
  119. #include "core_cm4.h" /*!< ARM Cortex-M4 processor and core peripherals */
  120. #include "system_nrf52811.h" /*!< nrf52811 System */
  121. #ifndef __IM /*!< Fallback for older CMSIS versions */
  122. #define __IM __I
  123. #endif
  124. #ifndef __OM /*!< Fallback for older CMSIS versions */
  125. #define __OM __O
  126. #endif
  127. #ifndef __IOM /*!< Fallback for older CMSIS versions */
  128. #define __IOM __IO
  129. #endif
  130. /* ======================================== Start of section using anonymous unions ======================================== */
  131. #if defined (__CC_ARM)
  132. #pragma push
  133. #pragma anon_unions
  134. #elif defined (__ICCARM__)
  135. #pragma language=extended
  136. #elif defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
  137. #pragma clang diagnostic push
  138. #pragma clang diagnostic ignored "-Wc11-extensions"
  139. #pragma clang diagnostic ignored "-Wreserved-id-macro"
  140. #pragma clang diagnostic ignored "-Wgnu-anonymous-struct"
  141. #pragma clang diagnostic ignored "-Wnested-anon-types"
  142. #elif defined (__GNUC__)
  143. /* anonymous unions are enabled by default */
  144. #elif defined (__TMS470__)
  145. /* anonymous unions are enabled by default */
  146. #elif defined (__TASKING__)
  147. #pragma warning 586
  148. #elif defined (__CSMC__)
  149. /* anonymous unions are enabled by default */
  150. #else
  151. #warning Not supported compiler type
  152. #endif
  153. /* =========================================================================================================================== */
  154. /* ================ Device Specific Cluster Section ================ */
  155. /* =========================================================================================================================== */
  156. /** @addtogroup Device_Peripheral_clusters
  157. * @{
  158. */
  159. /**
  160. * @brief FICR_INFO [INFO] (Device info)
  161. */
  162. typedef struct {
  163. __IM uint32_t PART; /*!< (@ 0x00000000) Part code */
  164. __IM uint32_t VARIANT; /*!< (@ 0x00000004) Part variant, hardware version and production
  165. configuration */
  166. __IM uint32_t PACKAGE; /*!< (@ 0x00000008) Package option */
  167. __IM uint32_t RAM; /*!< (@ 0x0000000C) RAM variant */
  168. __IM uint32_t FLASH; /*!< (@ 0x00000010) Flash variant */
  169. } FICR_INFO_Type; /*!< Size = 20 (0x14) */
  170. /**
  171. * @brief FICR_TEMP [TEMP] (Registers storing factory TEMP module linearization coefficients)
  172. */
  173. typedef struct {
  174. __IM uint32_t A0; /*!< (@ 0x00000000) Slope definition A0 */
  175. __IM uint32_t A1; /*!< (@ 0x00000004) Slope definition A1 */
  176. __IM uint32_t A2; /*!< (@ 0x00000008) Slope definition A2 */
  177. __IM uint32_t A3; /*!< (@ 0x0000000C) Slope definition A3 */
  178. __IM uint32_t A4; /*!< (@ 0x00000010) Slope definition A4 */
  179. __IM uint32_t A5; /*!< (@ 0x00000014) Slope definition A5 */
  180. __IM uint32_t B0; /*!< (@ 0x00000018) Y-intercept B0 */
  181. __IM uint32_t B1; /*!< (@ 0x0000001C) Y-intercept B1 */
  182. __IM uint32_t B2; /*!< (@ 0x00000020) Y-intercept B2 */
  183. __IM uint32_t B3; /*!< (@ 0x00000024) Y-intercept B3 */
  184. __IM uint32_t B4; /*!< (@ 0x00000028) Y-intercept B4 */
  185. __IM uint32_t B5; /*!< (@ 0x0000002C) Y-intercept B5 */
  186. __IM uint32_t T0; /*!< (@ 0x00000030) Segment end T0 */
  187. __IM uint32_t T1; /*!< (@ 0x00000034) Segment end T1 */
  188. __IM uint32_t T2; /*!< (@ 0x00000038) Segment end T2 */
  189. __IM uint32_t T3; /*!< (@ 0x0000003C) Segment end T3 */
  190. __IM uint32_t T4; /*!< (@ 0x00000040) Segment end T4 */
  191. } FICR_TEMP_Type; /*!< Size = 68 (0x44) */
  192. /**
  193. * @brief POWER_RAM [RAM] (Unspecified)
  194. */
  195. typedef struct {
  196. __IOM uint32_t POWER; /*!< (@ 0x00000000) Description cluster: RAMn power control register.
  197. The RAM size will vary depending on product
  198. variant, and the RAMn register will only
  199. be present if the corresponding RAM AHB
  200. slave is present on the device. */
  201. __OM uint32_t POWERSET; /*!< (@ 0x00000004) Description cluster: RAMn power control set register */
  202. __OM uint32_t POWERCLR; /*!< (@ 0x00000008) Description cluster: RAMn power control clear
  203. register */
  204. __IM uint32_t RESERVED;
  205. } POWER_RAM_Type; /*!< Size = 16 (0x10) */
  206. /**
  207. * @brief RADIO_PSEL [PSEL] (Unspecified)
  208. */
  209. typedef struct {
  210. __IOM uint32_t DFEGPIO[8]; /*!< (@ 0x00000000) Description collection: Pin select for DFE pin
  211. n */
  212. } RADIO_PSEL_Type; /*!< Size = 32 (0x20) */
  213. /**
  214. * @brief RADIO_DFEPACKET [DFEPACKET] (DFE packet EasyDMA channel)
  215. */
  216. typedef struct {
  217. __IOM uint32_t PTR; /*!< (@ 0x00000000) Data pointer */
  218. __IOM uint32_t MAXCNT; /*!< (@ 0x00000004) Maximum number of buffer words to transfer */
  219. __IM uint32_t AMOUNT; /*!< (@ 0x00000008) Number of samples transferred in the last transaction */
  220. } RADIO_DFEPACKET_Type; /*!< Size = 12 (0xc) */
  221. /**
  222. * @brief UART_PSEL [PSEL] (Unspecified)
  223. */
  224. typedef struct {
  225. __IOM uint32_t RTS; /*!< (@ 0x00000000) Pin select for RTS */
  226. __IOM uint32_t TXD; /*!< (@ 0x00000004) Pin select for TXD */
  227. __IOM uint32_t CTS; /*!< (@ 0x00000008) Pin select for CTS */
  228. __IOM uint32_t RXD; /*!< (@ 0x0000000C) Pin select for RXD */
  229. } UART_PSEL_Type; /*!< Size = 16 (0x10) */
  230. /**
  231. * @brief UARTE_PSEL [PSEL] (Unspecified)
  232. */
  233. typedef struct {
  234. __IOM uint32_t RTS; /*!< (@ 0x00000000) Pin select for RTS signal */
  235. __IOM uint32_t TXD; /*!< (@ 0x00000004) Pin select for TXD signal */
  236. __IOM uint32_t CTS; /*!< (@ 0x00000008) Pin select for CTS signal */
  237. __IOM uint32_t RXD; /*!< (@ 0x0000000C) Pin select for RXD signal */
  238. } UARTE_PSEL_Type; /*!< Size = 16 (0x10) */
  239. /**
  240. * @brief UARTE_RXD [RXD] (RXD EasyDMA channel)
  241. */
  242. typedef struct {
  243. __IOM uint32_t PTR; /*!< (@ 0x00000000) Data pointer */
  244. __IOM uint32_t MAXCNT; /*!< (@ 0x00000004) Maximum number of bytes in receive buffer */
  245. __IM uint32_t AMOUNT; /*!< (@ 0x00000008) Number of bytes transferred in the last transaction */
  246. } UARTE_RXD_Type; /*!< Size = 12 (0xc) */
  247. /**
  248. * @brief UARTE_TXD [TXD] (TXD EasyDMA channel)
  249. */
  250. typedef struct {
  251. __IOM uint32_t PTR; /*!< (@ 0x00000000) Data pointer */
  252. __IOM uint32_t MAXCNT; /*!< (@ 0x00000004) Maximum number of bytes in transmit buffer */
  253. __IM uint32_t AMOUNT; /*!< (@ 0x00000008) Number of bytes transferred in the last transaction */
  254. } UARTE_TXD_Type; /*!< Size = 12 (0xc) */
  255. /**
  256. * @brief SPI_PSEL [PSEL] (Unspecified)
  257. */
  258. typedef struct {
  259. __IOM uint32_t SCK; /*!< (@ 0x00000000) Pin select for SCK */
  260. __IOM uint32_t MOSI; /*!< (@ 0x00000004) Pin select for MOSI signal */
  261. __IOM uint32_t MISO; /*!< (@ 0x00000008) Pin select for MISO signal */
  262. } SPI_PSEL_Type; /*!< Size = 12 (0xc) */
  263. /**
  264. * @brief SPIM_PSEL [PSEL] (Unspecified)
  265. */
  266. typedef struct {
  267. __IOM uint32_t SCK; /*!< (@ 0x00000000) Pin select for SCK */
  268. __IOM uint32_t MOSI; /*!< (@ 0x00000004) Pin select for MOSI signal */
  269. __IOM uint32_t MISO; /*!< (@ 0x00000008) Pin select for MISO signal */
  270. } SPIM_PSEL_Type; /*!< Size = 12 (0xc) */
  271. /**
  272. * @brief SPIM_RXD [RXD] (RXD 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 receive 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_RXD_Type; /*!< Size = 16 (0x10) */
  280. /**
  281. * @brief SPIM_TXD [TXD] (TXD EasyDMA channel)
  282. */
  283. typedef struct {
  284. __IOM uint32_t PTR; /*!< (@ 0x00000000) Data pointer */
  285. __IOM uint32_t MAXCNT; /*!< (@ 0x00000004) Maximum number of bytes in transmit buffer */
  286. __IM uint32_t AMOUNT; /*!< (@ 0x00000008) Number of bytes transferred in the last transaction */
  287. __IOM uint32_t LIST; /*!< (@ 0x0000000C) EasyDMA list type */
  288. } SPIM_TXD_Type; /*!< Size = 16 (0x10) */
  289. /**
  290. * @brief SPIS_PSEL [PSEL] (Unspecified)
  291. */
  292. typedef struct {
  293. __IOM uint32_t SCK; /*!< (@ 0x00000000) Pin select for SCK */
  294. __IOM uint32_t MISO; /*!< (@ 0x00000004) Pin select for MISO signal */
  295. __IOM uint32_t MOSI; /*!< (@ 0x00000008) Pin select for MOSI signal */
  296. __IOM uint32_t CSN; /*!< (@ 0x0000000C) Pin select for CSN signal */
  297. } SPIS_PSEL_Type; /*!< Size = 16 (0x10) */
  298. /**
  299. * @brief SPIS_RXD [RXD] (Unspecified)
  300. */
  301. typedef struct {
  302. __IOM uint32_t PTR; /*!< (@ 0x00000000) RXD data pointer */
  303. __IOM uint32_t MAXCNT; /*!< (@ 0x00000004) Maximum number of bytes in receive buffer */
  304. __IM uint32_t AMOUNT; /*!< (@ 0x00000008) Number of bytes received in last granted transaction */
  305. __IOM uint32_t LIST; /*!< (@ 0x0000000C) EasyDMA list type */
  306. } SPIS_RXD_Type; /*!< Size = 16 (0x10) */
  307. /**
  308. * @brief SPIS_TXD [TXD] (Unspecified)
  309. */
  310. typedef struct {
  311. __IOM uint32_t PTR; /*!< (@ 0x00000000) TXD data pointer */
  312. __IOM uint32_t MAXCNT; /*!< (@ 0x00000004) Maximum number of bytes in transmit buffer */
  313. __IM uint32_t AMOUNT; /*!< (@ 0x00000008) Number of bytes transmitted in last granted transaction */
  314. __IOM uint32_t LIST; /*!< (@ 0x0000000C) EasyDMA list type */
  315. } SPIS_TXD_Type; /*!< Size = 16 (0x10) */
  316. /**
  317. * @brief TWI_PSEL [PSEL] (Unspecified)
  318. */
  319. typedef struct {
  320. __IOM uint32_t SCL; /*!< (@ 0x00000000) Pin select for SCL */
  321. __IOM uint32_t SDA; /*!< (@ 0x00000004) Pin select for SDA */
  322. } TWI_PSEL_Type; /*!< Size = 8 (0x8) */
  323. /**
  324. * @brief TWIM_PSEL [PSEL] (Unspecified)
  325. */
  326. typedef struct {
  327. __IOM uint32_t SCL; /*!< (@ 0x00000000) Pin select for SCL signal */
  328. __IOM uint32_t SDA; /*!< (@ 0x00000004) Pin select for SDA signal */
  329. } TWIM_PSEL_Type; /*!< Size = 8 (0x8) */
  330. /**
  331. * @brief TWIM_RXD [RXD] (RXD EasyDMA channel)
  332. */
  333. typedef struct {
  334. __IOM uint32_t PTR; /*!< (@ 0x00000000) Data pointer */
  335. __IOM uint32_t MAXCNT; /*!< (@ 0x00000004) Maximum number of bytes in receive buffer */
  336. __IM uint32_t AMOUNT; /*!< (@ 0x00000008) Number of bytes transferred in the last transaction */
  337. __IOM uint32_t LIST; /*!< (@ 0x0000000C) EasyDMA list type */
  338. } TWIM_RXD_Type; /*!< Size = 16 (0x10) */
  339. /**
  340. * @brief TWIM_TXD [TXD] (TXD EasyDMA channel)
  341. */
  342. typedef struct {
  343. __IOM uint32_t PTR; /*!< (@ 0x00000000) Data pointer */
  344. __IOM uint32_t MAXCNT; /*!< (@ 0x00000004) Maximum number of bytes in transmit buffer */
  345. __IM uint32_t AMOUNT; /*!< (@ 0x00000008) Number of bytes transferred in the last transaction */
  346. __IOM uint32_t LIST; /*!< (@ 0x0000000C) EasyDMA list type */
  347. } TWIM_TXD_Type; /*!< Size = 16 (0x10) */
  348. /**
  349. * @brief TWIS_PSEL [PSEL] (Unspecified)
  350. */
  351. typedef struct {
  352. __IOM uint32_t SCL; /*!< (@ 0x00000000) Pin select for SCL signal */
  353. __IOM uint32_t SDA; /*!< (@ 0x00000004) Pin select for SDA signal */
  354. } TWIS_PSEL_Type; /*!< Size = 8 (0x8) */
  355. /**
  356. * @brief TWIS_RXD [RXD] (RXD EasyDMA channel)
  357. */
  358. typedef struct {
  359. __IOM uint32_t PTR; /*!< (@ 0x00000000) RXD Data pointer */
  360. __IOM uint32_t MAXCNT; /*!< (@ 0x00000004) Maximum number of bytes in RXD buffer */
  361. __IM uint32_t AMOUNT; /*!< (@ 0x00000008) Number of bytes transferred in the last RXD transaction */
  362. __IOM uint32_t LIST; /*!< (@ 0x0000000C) EasyDMA list type */
  363. } TWIS_RXD_Type; /*!< Size = 16 (0x10) */
  364. /**
  365. * @brief TWIS_TXD [TXD] (TXD EasyDMA channel)
  366. */
  367. typedef struct {
  368. __IOM uint32_t PTR; /*!< (@ 0x00000000) TXD Data pointer */
  369. __IOM uint32_t MAXCNT; /*!< (@ 0x00000004) Maximum number of bytes in TXD buffer */
  370. __IM uint32_t AMOUNT; /*!< (@ 0x00000008) Number of bytes transferred in the last TXD transaction */
  371. __IOM uint32_t LIST; /*!< (@ 0x0000000C) EasyDMA list type */
  372. } TWIS_TXD_Type; /*!< Size = 16 (0x10) */
  373. /**
  374. * @brief SAADC_EVENTS_CH [EVENTS_CH] (Peripheral events.)
  375. */
  376. typedef struct {
  377. __IOM uint32_t LIMITH; /*!< (@ 0x00000000) Description cluster: Last results is equal or
  378. above CH[n].LIMIT.HIGH */
  379. __IOM uint32_t LIMITL; /*!< (@ 0x00000004) Description cluster: Last results is equal or
  380. below CH[n].LIMIT.LOW */
  381. } SAADC_EVENTS_CH_Type; /*!< Size = 8 (0x8) */
  382. /**
  383. * @brief SAADC_CH [CH] (Unspecified)
  384. */
  385. typedef struct {
  386. __IOM uint32_t PSELP; /*!< (@ 0x00000000) Description cluster: Input positive pin selection
  387. for CH[n] */
  388. __IOM uint32_t PSELN; /*!< (@ 0x00000004) Description cluster: Input negative pin selection
  389. for CH[n] */
  390. __IOM uint32_t CONFIG; /*!< (@ 0x00000008) Description cluster: Input configuration for
  391. CH[n] */
  392. __IOM uint32_t LIMIT; /*!< (@ 0x0000000C) Description cluster: High/low limits for event
  393. monitoring a channel */
  394. } SAADC_CH_Type; /*!< Size = 16 (0x10) */
  395. /**
  396. * @brief SAADC_RESULT [RESULT] (RESULT EasyDMA channel)
  397. */
  398. typedef struct {
  399. __IOM uint32_t PTR; /*!< (@ 0x00000000) Data pointer */
  400. __IOM uint32_t MAXCNT; /*!< (@ 0x00000004) Maximum number of buffer words to transfer */
  401. __IM uint32_t AMOUNT; /*!< (@ 0x00000008) Number of buffer words transferred since last
  402. START */
  403. } SAADC_RESULT_Type; /*!< Size = 12 (0xc) */
  404. /**
  405. * @brief QDEC_PSEL [PSEL] (Unspecified)
  406. */
  407. typedef struct {
  408. __IOM uint32_t LED; /*!< (@ 0x00000000) Pin select for LED signal */
  409. __IOM uint32_t A; /*!< (@ 0x00000004) Pin select for A signal */
  410. __IOM uint32_t B; /*!< (@ 0x00000008) Pin select for B signal */
  411. } QDEC_PSEL_Type; /*!< Size = 12 (0xc) */
  412. /**
  413. * @brief PWM_SEQ [SEQ] (Unspecified)
  414. */
  415. typedef struct {
  416. __IOM uint32_t PTR; /*!< (@ 0x00000000) Description cluster: Beginning address in RAM
  417. of this sequence */
  418. __IOM uint32_t CNT; /*!< (@ 0x00000004) Description cluster: Number of values (duty cycles)
  419. in this sequence */
  420. __IOM uint32_t REFRESH; /*!< (@ 0x00000008) Description cluster: Number of additional PWM
  421. periods between samples loaded into compare
  422. register */
  423. __IOM uint32_t ENDDELAY; /*!< (@ 0x0000000C) Description cluster: Time added after the sequence */
  424. __IM uint32_t RESERVED[4];
  425. } PWM_SEQ_Type; /*!< Size = 32 (0x20) */
  426. /**
  427. * @brief PWM_PSEL [PSEL] (Unspecified)
  428. */
  429. typedef struct {
  430. __IOM uint32_t OUT[4]; /*!< (@ 0x00000000) Description collection: Output pin select for
  431. PWM channel n */
  432. } PWM_PSEL_Type; /*!< Size = 16 (0x10) */
  433. /**
  434. * @brief PDM_PSEL [PSEL] (Unspecified)
  435. */
  436. typedef struct {
  437. __IOM uint32_t CLK; /*!< (@ 0x00000000) Pin number configuration for PDM CLK signal */
  438. __IOM uint32_t DIN; /*!< (@ 0x00000004) Pin number configuration for PDM DIN signal */
  439. } PDM_PSEL_Type; /*!< Size = 8 (0x8) */
  440. /**
  441. * @brief PDM_SAMPLE [SAMPLE] (Unspecified)
  442. */
  443. typedef struct {
  444. __IOM uint32_t PTR; /*!< (@ 0x00000000) RAM address pointer to write samples to with
  445. EasyDMA */
  446. __IOM uint32_t MAXCNT; /*!< (@ 0x00000004) Number of samples to allocate memory for in EasyDMA
  447. mode */
  448. } PDM_SAMPLE_Type; /*!< Size = 8 (0x8) */
  449. /**
  450. * @brief PPI_TASKS_CHG [TASKS_CHG] (Channel group tasks)
  451. */
  452. typedef struct {
  453. __OM uint32_t EN; /*!< (@ 0x00000000) Description cluster: Enable channel group n */
  454. __OM uint32_t DIS; /*!< (@ 0x00000004) Description cluster: Disable channel group n */
  455. } PPI_TASKS_CHG_Type; /*!< Size = 8 (0x8) */
  456. /**
  457. * @brief PPI_CH [CH] (PPI Channel)
  458. */
  459. typedef struct {
  460. __IOM uint32_t EEP; /*!< (@ 0x00000000) Description cluster: Channel n event end-point */
  461. __IOM uint32_t TEP; /*!< (@ 0x00000004) Description cluster: Channel n task end-point */
  462. } PPI_CH_Type; /*!< Size = 8 (0x8) */
  463. /**
  464. * @brief PPI_FORK [FORK] (Fork)
  465. */
  466. typedef struct {
  467. __IOM uint32_t TEP; /*!< (@ 0x00000000) Description cluster: Channel n task end-point */
  468. } PPI_FORK_Type; /*!< Size = 4 (0x4) */
  469. /** @} */ /* End of group Device_Peripheral_clusters */
  470. /* =========================================================================================================================== */
  471. /* ================ Device Specific Peripheral Section ================ */
  472. /* =========================================================================================================================== */
  473. /** @addtogroup Device_Peripheral_peripherals
  474. * @{
  475. */
  476. /* =========================================================================================================================== */
  477. /* ================ FICR ================ */
  478. /* =========================================================================================================================== */
  479. /**
  480. * @brief Factory information configuration registers (FICR)
  481. */
  482. typedef struct { /*!< (@ 0x10000000) FICR Structure */
  483. __IM uint32_t RESERVED[4];
  484. __IM uint32_t CODEPAGESIZE; /*!< (@ 0x00000010) Code memory page size */
  485. __IM uint32_t CODESIZE; /*!< (@ 0x00000014) Code memory size */
  486. __IM uint32_t RESERVED1[18];
  487. __IM uint32_t DEVICEID[2]; /*!< (@ 0x00000060) Description collection: Device identifier */
  488. __IM uint32_t RESERVED2[6];
  489. __IM uint32_t ER[4]; /*!< (@ 0x00000080) Description collection: Encryption root, word
  490. n */
  491. __IM uint32_t IR[4]; /*!< (@ 0x00000090) Description collection: Identity root, word n */
  492. __IM uint32_t DEVICEADDRTYPE; /*!< (@ 0x000000A0) Device address type */
  493. __IM uint32_t DEVICEADDR[2]; /*!< (@ 0x000000A4) Description collection: Device address n */
  494. __IM uint32_t RESERVED3[21];
  495. __IM FICR_INFO_Type INFO; /*!< (@ 0x00000100) Device info */
  496. __IM uint32_t RESERVED4[188];
  497. __IM FICR_TEMP_Type TEMP; /*!< (@ 0x00000404) Registers storing factory TEMP module linearization
  498. coefficients */
  499. } NRF_FICR_Type; /*!< Size = 1096 (0x448) */
  500. /* =========================================================================================================================== */
  501. /* ================ UICR ================ */
  502. /* =========================================================================================================================== */
  503. /**
  504. * @brief User information configuration registers (UICR)
  505. */
  506. typedef struct { /*!< (@ 0x10001000) UICR Structure */
  507. __IM uint32_t RESERVED[5];
  508. __IOM uint32_t NRFFW[13]; /*!< (@ 0x00000014) Description collection: Reserved for Nordic firmware
  509. design */
  510. __IM uint32_t RESERVED1[2];
  511. __IOM uint32_t NRFHW[12]; /*!< (@ 0x00000050) Description collection: Reserved for Nordic hardware
  512. design */
  513. __IOM uint32_t CUSTOMER[32]; /*!< (@ 0x00000080) Description collection: Reserved for customer */
  514. __IM uint32_t RESERVED2[64];
  515. __IOM uint32_t PSELRESET[2]; /*!< (@ 0x00000200) Description collection: Mapping of the nRESET
  516. function (see POWER chapter for details) */
  517. __IOM uint32_t APPROTECT; /*!< (@ 0x00000208) Access port protection */
  518. } NRF_UICR_Type; /*!< Size = 524 (0x20c) */
  519. /* =========================================================================================================================== */
  520. /* ================ BPROT ================ */
  521. /* =========================================================================================================================== */
  522. /**
  523. * @brief Block Protect (BPROT)
  524. */
  525. typedef struct { /*!< (@ 0x40000000) BPROT Structure */
  526. __IM uint32_t RESERVED[384];
  527. __IOM uint32_t CONFIG0; /*!< (@ 0x00000600) Block protect configuration register 0 */
  528. __IOM uint32_t CONFIG1; /*!< (@ 0x00000604) Block protect configuration register 1 */
  529. __IOM uint32_t DISABLEINDEBUG; /*!< (@ 0x00000608) Disable protection mechanism in debug mode */
  530. } NRF_BPROT_Type; /*!< Size = 1548 (0x60c) */
  531. /* =========================================================================================================================== */
  532. /* ================ CLOCK ================ */
  533. /* =========================================================================================================================== */
  534. /**
  535. * @brief Clock control (CLOCK)
  536. */
  537. typedef struct { /*!< (@ 0x40000000) CLOCK Structure */
  538. __OM uint32_t TASKS_HFCLKSTART; /*!< (@ 0x00000000) Start HFCLK crystal oscillator */
  539. __OM uint32_t TASKS_HFCLKSTOP; /*!< (@ 0x00000004) Stop HFCLK crystal oscillator */
  540. __OM uint32_t TASKS_LFCLKSTART; /*!< (@ 0x00000008) Start LFCLK source */
  541. __OM uint32_t TASKS_LFCLKSTOP; /*!< (@ 0x0000000C) Stop LFCLK source */
  542. __OM uint32_t TASKS_CAL; /*!< (@ 0x00000010) Start calibration of LFRC oscillator */
  543. __OM uint32_t TASKS_CTSTART; /*!< (@ 0x00000014) Start calibration timer */
  544. __OM uint32_t TASKS_CTSTOP; /*!< (@ 0x00000018) Stop calibration timer */
  545. __IM uint32_t RESERVED[57];
  546. __IOM uint32_t EVENTS_HFCLKSTARTED; /*!< (@ 0x00000100) HFCLK oscillator started */
  547. __IOM uint32_t EVENTS_LFCLKSTARTED; /*!< (@ 0x00000104) LFCLK started */
  548. __IM uint32_t RESERVED1;
  549. __IOM uint32_t EVENTS_DONE; /*!< (@ 0x0000010C) Calibration of LFCLK RC oscillator complete event */
  550. __IOM uint32_t EVENTS_CTTO; /*!< (@ 0x00000110) Calibration timer timeout */
  551. __IM uint32_t RESERVED2[124];
  552. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  553. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  554. __IM uint32_t RESERVED3[63];
  555. __IM uint32_t HFCLKRUN; /*!< (@ 0x00000408) Status indicating that HFCLKSTART task has been
  556. triggered */
  557. __IM uint32_t HFCLKSTAT; /*!< (@ 0x0000040C) HFCLK status */
  558. __IM uint32_t RESERVED4;
  559. __IM uint32_t LFCLKRUN; /*!< (@ 0x00000414) Status indicating that LFCLKSTART task has been
  560. triggered */
  561. __IM uint32_t LFCLKSTAT; /*!< (@ 0x00000418) LFCLK status */
  562. __IM uint32_t LFCLKSRCCOPY; /*!< (@ 0x0000041C) Copy of LFCLKSRC register, set when LFCLKSTART
  563. task was triggered */
  564. __IM uint32_t RESERVED5[62];
  565. __IOM uint32_t LFCLKSRC; /*!< (@ 0x00000518) Clock source for the LFCLK */
  566. __IM uint32_t RESERVED6[7];
  567. __IOM uint32_t CTIV; /*!< (@ 0x00000538) Calibration timer interval */
  568. } NRF_CLOCK_Type; /*!< Size = 1340 (0x53c) */
  569. /* =========================================================================================================================== */
  570. /* ================ POWER ================ */
  571. /* =========================================================================================================================== */
  572. /**
  573. * @brief Power control (POWER)
  574. */
  575. typedef struct { /*!< (@ 0x40000000) POWER Structure */
  576. __IM uint32_t RESERVED[30];
  577. __OM uint32_t TASKS_CONSTLAT; /*!< (@ 0x00000078) Enable Constant Latency mode */
  578. __OM uint32_t TASKS_LOWPWR; /*!< (@ 0x0000007C) Enable Low-power mode (variable latency) */
  579. __IM uint32_t RESERVED1[34];
  580. __IOM uint32_t EVENTS_POFWARN; /*!< (@ 0x00000108) Power failure warning */
  581. __IM uint32_t RESERVED2[2];
  582. __IOM uint32_t EVENTS_SLEEPENTER; /*!< (@ 0x00000114) CPU entered WFI/WFE sleep */
  583. __IOM uint32_t EVENTS_SLEEPEXIT; /*!< (@ 0x00000118) CPU exited WFI/WFE sleep */
  584. __IM uint32_t RESERVED3[122];
  585. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  586. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  587. __IM uint32_t RESERVED4[61];
  588. __IOM uint32_t RESETREAS; /*!< (@ 0x00000400) Reset reason */
  589. __IM uint32_t RESERVED5[63];
  590. __OM uint32_t SYSTEMOFF; /*!< (@ 0x00000500) System OFF register */
  591. __IM uint32_t RESERVED6[3];
  592. __IOM uint32_t POFCON; /*!< (@ 0x00000510) Power failure comparator configuration */
  593. __IM uint32_t RESERVED7[2];
  594. __IOM uint32_t GPREGRET; /*!< (@ 0x0000051C) General purpose retention register */
  595. __IOM uint32_t GPREGRET2; /*!< (@ 0x00000520) General purpose retention register */
  596. __IM uint32_t RESERVED8[21];
  597. __IOM uint32_t DCDCEN; /*!< (@ 0x00000578) DC/DC enable register */
  598. __IM uint32_t RESERVED9[225];
  599. __IOM POWER_RAM_Type RAM[8]; /*!< (@ 0x00000900) Unspecified */
  600. } NRF_POWER_Type; /*!< Size = 2432 (0x980) */
  601. /* =========================================================================================================================== */
  602. /* ================ P0 ================ */
  603. /* =========================================================================================================================== */
  604. /**
  605. * @brief GPIO Port (P0)
  606. */
  607. typedef struct { /*!< (@ 0x50000000) P0 Structure */
  608. __IM uint32_t RESERVED[321];
  609. __IOM uint32_t OUT; /*!< (@ 0x00000504) Write GPIO port */
  610. __IOM uint32_t OUTSET; /*!< (@ 0x00000508) Set individual bits in GPIO port */
  611. __IOM uint32_t OUTCLR; /*!< (@ 0x0000050C) Clear individual bits in GPIO port */
  612. __IM uint32_t IN; /*!< (@ 0x00000510) Read GPIO port */
  613. __IOM uint32_t DIR; /*!< (@ 0x00000514) Direction of GPIO pins */
  614. __IOM uint32_t DIRSET; /*!< (@ 0x00000518) DIR set register */
  615. __IOM uint32_t DIRCLR; /*!< (@ 0x0000051C) DIR clear register */
  616. __IOM uint32_t LATCH; /*!< (@ 0x00000520) Latch register indicating what GPIO pins that
  617. have met the criteria set in the PIN_CNF[n].SENSE
  618. registers */
  619. __IOM uint32_t DETECTMODE; /*!< (@ 0x00000524) Select between default DETECT signal behaviour
  620. and LDETECT mode */
  621. __IM uint32_t RESERVED1[118];
  622. __IOM uint32_t PIN_CNF[32]; /*!< (@ 0x00000700) Description collection: Configuration of GPIO
  623. pins */
  624. } NRF_GPIO_Type; /*!< Size = 1920 (0x780) */
  625. /* =========================================================================================================================== */
  626. /* ================ RADIO ================ */
  627. /* =========================================================================================================================== */
  628. /**
  629. * @brief 2.4 GHz radio (RADIO)
  630. */
  631. typedef struct { /*!< (@ 0x40001000) RADIO Structure */
  632. __OM uint32_t TASKS_TXEN; /*!< (@ 0x00000000) Enable RADIO in TX mode */
  633. __OM uint32_t TASKS_RXEN; /*!< (@ 0x00000004) Enable RADIO in RX mode */
  634. __OM uint32_t TASKS_START; /*!< (@ 0x00000008) Start RADIO */
  635. __OM uint32_t TASKS_STOP; /*!< (@ 0x0000000C) Stop RADIO */
  636. __OM uint32_t TASKS_DISABLE; /*!< (@ 0x00000010) Disable RADIO */
  637. __OM uint32_t TASKS_RSSISTART; /*!< (@ 0x00000014) Start the RSSI and take one single sample of
  638. the receive signal strength */
  639. __OM uint32_t TASKS_RSSISTOP; /*!< (@ 0x00000018) Stop the RSSI measurement */
  640. __OM uint32_t TASKS_BCSTART; /*!< (@ 0x0000001C) Start the bit counter */
  641. __OM uint32_t TASKS_BCSTOP; /*!< (@ 0x00000020) Stop the bit counter */
  642. __OM uint32_t TASKS_EDSTART; /*!< (@ 0x00000024) Start the energy detect measurement used in IEEE
  643. 802.15.4 mode */
  644. __OM uint32_t TASKS_EDSTOP; /*!< (@ 0x00000028) Stop the energy detect measurement */
  645. __OM uint32_t TASKS_CCASTART; /*!< (@ 0x0000002C) Start the clear channel assessment used in IEEE
  646. 802.15.4 mode */
  647. __OM uint32_t TASKS_CCASTOP; /*!< (@ 0x00000030) Stop the clear channel assessment */
  648. __IM uint32_t RESERVED[51];
  649. __IOM uint32_t EVENTS_READY; /*!< (@ 0x00000100) RADIO has ramped up and is ready to be started */
  650. __IOM uint32_t EVENTS_ADDRESS; /*!< (@ 0x00000104) Address sent or received */
  651. __IOM uint32_t EVENTS_PAYLOAD; /*!< (@ 0x00000108) Packet payload sent or received */
  652. __IOM uint32_t EVENTS_END; /*!< (@ 0x0000010C) Packet sent or received */
  653. __IOM uint32_t EVENTS_DISABLED; /*!< (@ 0x00000110) RADIO has been disabled */
  654. __IOM uint32_t EVENTS_DEVMATCH; /*!< (@ 0x00000114) A device address match occurred on the last received
  655. packet */
  656. __IOM uint32_t EVENTS_DEVMISS; /*!< (@ 0x00000118) No device address match occurred on the last
  657. received packet */
  658. __IOM uint32_t EVENTS_RSSIEND; /*!< (@ 0x0000011C) Sampling of receive signal strength complete */
  659. __IM uint32_t RESERVED1[2];
  660. __IOM uint32_t EVENTS_BCMATCH; /*!< (@ 0x00000128) Bit counter reached bit count value */
  661. __IM uint32_t RESERVED2;
  662. __IOM uint32_t EVENTS_CRCOK; /*!< (@ 0x00000130) Packet received with CRC ok */
  663. __IOM uint32_t EVENTS_CRCERROR; /*!< (@ 0x00000134) Packet received with CRC error */
  664. __IOM uint32_t EVENTS_FRAMESTART; /*!< (@ 0x00000138) IEEE 802.15.4 length field received */
  665. __IOM uint32_t EVENTS_EDEND; /*!< (@ 0x0000013C) Sampling of energy detection complete. A new
  666. ED sample is ready for readout from the
  667. RADIO.EDSAMPLE register */
  668. __IOM uint32_t EVENTS_EDSTOPPED; /*!< (@ 0x00000140) The sampling of energy detection has stopped */
  669. __IOM uint32_t EVENTS_CCAIDLE; /*!< (@ 0x00000144) Wireless medium in idle - clear to send */
  670. __IOM uint32_t EVENTS_CCABUSY; /*!< (@ 0x00000148) Wireless medium busy - do not send */
  671. __IOM uint32_t EVENTS_CCASTOPPED; /*!< (@ 0x0000014C) The CCA has stopped */
  672. __IOM uint32_t EVENTS_RATEBOOST; /*!< (@ 0x00000150) Ble_LR CI field received, receive mode is changed
  673. from Ble_LR125Kbit to Ble_LR500Kbit. */
  674. __IOM uint32_t EVENTS_TXREADY; /*!< (@ 0x00000154) RADIO has ramped up and is ready to be started
  675. TX path */
  676. __IOM uint32_t EVENTS_RXREADY; /*!< (@ 0x00000158) RADIO has ramped up and is ready to be started
  677. RX path */
  678. __IOM uint32_t EVENTS_MHRMATCH; /*!< (@ 0x0000015C) MAC header match found */
  679. __IM uint32_t RESERVED3[3];
  680. __IOM uint32_t EVENTS_PHYEND; /*!< (@ 0x0000016C) Generated when last bit is sent on air */
  681. __IOM uint32_t EVENTS_CTEPRESENT; /*!< (@ 0x00000170) CTE is present (early warning right after receiving
  682. CTEInfo byte) */
  683. __IM uint32_t RESERVED4[35];
  684. __IOM uint32_t SHORTS; /*!< (@ 0x00000200) Shortcuts between local events and tasks */
  685. __IM uint32_t RESERVED5[64];
  686. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  687. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  688. __IM uint32_t RESERVED6[61];
  689. __IM uint32_t CRCSTATUS; /*!< (@ 0x00000400) CRC status */
  690. __IM uint32_t RESERVED7;
  691. __IM uint32_t RXMATCH; /*!< (@ 0x00000408) Received address */
  692. __IM uint32_t RXCRC; /*!< (@ 0x0000040C) CRC field of previously received packet */
  693. __IM uint32_t DAI; /*!< (@ 0x00000410) Device address match index */
  694. __IM uint32_t PDUSTAT; /*!< (@ 0x00000414) Payload status */
  695. __IM uint32_t RESERVED8[13];
  696. __IM uint32_t CTESTATUS; /*!< (@ 0x0000044C) CTEInfo parsed from received packet */
  697. __IM uint32_t RESERVED9[2];
  698. __IM uint32_t DFESTATUS; /*!< (@ 0x00000458) DFE status information */
  699. __IM uint32_t RESERVED10[42];
  700. __IOM uint32_t PACKETPTR; /*!< (@ 0x00000504) Packet pointer */
  701. __IOM uint32_t FREQUENCY; /*!< (@ 0x00000508) Frequency */
  702. __IOM uint32_t TXPOWER; /*!< (@ 0x0000050C) Output power */
  703. __IOM uint32_t MODE; /*!< (@ 0x00000510) Data rate and modulation */
  704. __IOM uint32_t PCNF0; /*!< (@ 0x00000514) Packet configuration register 0 */
  705. __IOM uint32_t PCNF1; /*!< (@ 0x00000518) Packet configuration register 1 */
  706. __IOM uint32_t BASE0; /*!< (@ 0x0000051C) Base address 0 */
  707. __IOM uint32_t BASE1; /*!< (@ 0x00000520) Base address 1 */
  708. __IOM uint32_t PREFIX0; /*!< (@ 0x00000524) Prefixes bytes for logical addresses 0-3 */
  709. __IOM uint32_t PREFIX1; /*!< (@ 0x00000528) Prefixes bytes for logical addresses 4-7 */
  710. __IOM uint32_t TXADDRESS; /*!< (@ 0x0000052C) Transmit address select */
  711. __IOM uint32_t RXADDRESSES; /*!< (@ 0x00000530) Receive address select */
  712. __IOM uint32_t CRCCNF; /*!< (@ 0x00000534) CRC configuration */
  713. __IOM uint32_t CRCPOLY; /*!< (@ 0x00000538) CRC polynomial */
  714. __IOM uint32_t CRCINIT; /*!< (@ 0x0000053C) CRC initial value */
  715. __IM uint32_t RESERVED11;
  716. __IOM uint32_t TIFS; /*!< (@ 0x00000544) Interframe spacing in us */
  717. __IM uint32_t RSSISAMPLE; /*!< (@ 0x00000548) RSSI sample */
  718. __IM uint32_t RESERVED12;
  719. __IM uint32_t STATE; /*!< (@ 0x00000550) Current radio state */
  720. __IOM uint32_t DATAWHITEIV; /*!< (@ 0x00000554) Data whitening initial value */
  721. __IM uint32_t RESERVED13[2];
  722. __IOM uint32_t BCC; /*!< (@ 0x00000560) Bit counter compare */
  723. __IM uint32_t RESERVED14[39];
  724. __IOM uint32_t DAB[8]; /*!< (@ 0x00000600) Description collection: Device address base segment
  725. n */
  726. __IOM uint32_t DAP[8]; /*!< (@ 0x00000620) Description collection: Device address prefix
  727. n */
  728. __IOM uint32_t DACNF; /*!< (@ 0x00000640) Device address match configuration */
  729. __IOM uint32_t MHRMATCHCONF; /*!< (@ 0x00000644) Search pattern configuration */
  730. __IOM uint32_t MHRMATCHMAS; /*!< (@ 0x00000648) Pattern mask */
  731. __IM uint32_t RESERVED15;
  732. __IOM uint32_t MODECNF0; /*!< (@ 0x00000650) Radio mode configuration register 0 */
  733. __IM uint32_t RESERVED16[3];
  734. __IOM uint32_t SFD; /*!< (@ 0x00000660) IEEE 802.15.4 start of frame delimiter */
  735. __IOM uint32_t EDCNT; /*!< (@ 0x00000664) IEEE 802.15.4 energy detect loop count */
  736. __IOM uint32_t EDSAMPLE; /*!< (@ 0x00000668) IEEE 802.15.4 energy detect level */
  737. __IOM uint32_t CCACTRL; /*!< (@ 0x0000066C) IEEE 802.15.4 clear channel assessment control */
  738. __IM uint32_t RESERVED17[164];
  739. __IOM uint32_t DFEMODE; /*!< (@ 0x00000900) Whether to use Angle-of-Arrival (AOA) or Angle-of-Departure
  740. (AOD) */
  741. __IOM uint32_t CTEINLINECONF; /*!< (@ 0x00000904) Configuration for CTE inline mode */
  742. __IM uint32_t RESERVED18[2];
  743. __IOM uint32_t DFECTRL1; /*!< (@ 0x00000910) Various configuration for Direction finding */
  744. __IOM uint32_t DFECTRL2; /*!< (@ 0x00000914) Start offset for Direction finding */
  745. __IM uint32_t RESERVED19[4];
  746. __IOM uint32_t SWITCHPATTERN; /*!< (@ 0x00000928) GPIO patterns to be used for each antenna */
  747. __IOM uint32_t CLEARPATTERN; /*!< (@ 0x0000092C) Clear the GPIO pattern array for antenna control */
  748. __IOM RADIO_PSEL_Type PSEL; /*!< (@ 0x00000930) Unspecified */
  749. __IOM RADIO_DFEPACKET_Type DFEPACKET; /*!< (@ 0x00000950) DFE packet EasyDMA channel */
  750. __IM uint32_t RESERVED20[424];
  751. __IOM uint32_t POWER; /*!< (@ 0x00000FFC) Peripheral power control */
  752. } NRF_RADIO_Type; /*!< Size = 4096 (0x1000) */
  753. /* =========================================================================================================================== */
  754. /* ================ UART0 ================ */
  755. /* =========================================================================================================================== */
  756. /**
  757. * @brief Universal Asynchronous Receiver/Transmitter (UART0)
  758. */
  759. typedef struct { /*!< (@ 0x40002000) UART0 Structure */
  760. __OM uint32_t TASKS_STARTRX; /*!< (@ 0x00000000) Start UART receiver */
  761. __OM uint32_t TASKS_STOPRX; /*!< (@ 0x00000004) Stop UART receiver */
  762. __OM uint32_t TASKS_STARTTX; /*!< (@ 0x00000008) Start UART transmitter */
  763. __OM uint32_t TASKS_STOPTX; /*!< (@ 0x0000000C) Stop UART transmitter */
  764. __IM uint32_t RESERVED[3];
  765. __OM uint32_t TASKS_SUSPEND; /*!< (@ 0x0000001C) Suspend UART */
  766. __IM uint32_t RESERVED1[56];
  767. __IOM uint32_t EVENTS_CTS; /*!< (@ 0x00000100) CTS is activated (set low). Clear To Send. */
  768. __IOM uint32_t EVENTS_NCTS; /*!< (@ 0x00000104) CTS is deactivated (set high). Not Clear To Send. */
  769. __IOM uint32_t EVENTS_RXDRDY; /*!< (@ 0x00000108) Data received in RXD */
  770. __IM uint32_t RESERVED2[4];
  771. __IOM uint32_t EVENTS_TXDRDY; /*!< (@ 0x0000011C) Data sent from TXD */
  772. __IM uint32_t RESERVED3;
  773. __IOM uint32_t EVENTS_ERROR; /*!< (@ 0x00000124) Error detected */
  774. __IM uint32_t RESERVED4[7];
  775. __IOM uint32_t EVENTS_RXTO; /*!< (@ 0x00000144) Receiver timeout */
  776. __IM uint32_t RESERVED5[46];
  777. __IOM uint32_t SHORTS; /*!< (@ 0x00000200) Shortcuts between local events and tasks */
  778. __IM uint32_t RESERVED6[64];
  779. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  780. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  781. __IM uint32_t RESERVED7[93];
  782. __IOM uint32_t ERRORSRC; /*!< (@ 0x00000480) Error source */
  783. __IM uint32_t RESERVED8[31];
  784. __IOM uint32_t ENABLE; /*!< (@ 0x00000500) Enable UART */
  785. __IM uint32_t RESERVED9;
  786. __IOM UART_PSEL_Type PSEL; /*!< (@ 0x00000508) Unspecified */
  787. __IM uint32_t RXD; /*!< (@ 0x00000518) RXD register */
  788. __OM uint32_t TXD; /*!< (@ 0x0000051C) TXD register */
  789. __IM uint32_t RESERVED10;
  790. __IOM uint32_t BAUDRATE; /*!< (@ 0x00000524) Baud rate. Accuracy depends on the HFCLK source
  791. selected. */
  792. __IM uint32_t RESERVED11[17];
  793. __IOM uint32_t CONFIG; /*!< (@ 0x0000056C) Configuration of parity and hardware flow control */
  794. } NRF_UART_Type; /*!< Size = 1392 (0x570) */
  795. /* =========================================================================================================================== */
  796. /* ================ UARTE0 ================ */
  797. /* =========================================================================================================================== */
  798. /**
  799. * @brief UART with EasyDMA (UARTE0)
  800. */
  801. typedef struct { /*!< (@ 0x40002000) UARTE0 Structure */
  802. __OM uint32_t TASKS_STARTRX; /*!< (@ 0x00000000) Start UART receiver */
  803. __OM uint32_t TASKS_STOPRX; /*!< (@ 0x00000004) Stop UART receiver */
  804. __OM uint32_t TASKS_STARTTX; /*!< (@ 0x00000008) Start UART transmitter */
  805. __OM uint32_t TASKS_STOPTX; /*!< (@ 0x0000000C) Stop UART transmitter */
  806. __IM uint32_t RESERVED[7];
  807. __OM uint32_t TASKS_FLUSHRX; /*!< (@ 0x0000002C) Flush RX FIFO into RX buffer */
  808. __IM uint32_t RESERVED1[52];
  809. __IOM uint32_t EVENTS_CTS; /*!< (@ 0x00000100) CTS is activated (set low). Clear To Send. */
  810. __IOM uint32_t EVENTS_NCTS; /*!< (@ 0x00000104) CTS is deactivated (set high). Not Clear To Send. */
  811. __IOM uint32_t EVENTS_RXDRDY; /*!< (@ 0x00000108) Data received in RXD (but potentially not yet
  812. transferred to Data RAM) */
  813. __IM uint32_t RESERVED2;
  814. __IOM uint32_t EVENTS_ENDRX; /*!< (@ 0x00000110) Receive buffer is filled up */
  815. __IM uint32_t RESERVED3[2];
  816. __IOM uint32_t EVENTS_TXDRDY; /*!< (@ 0x0000011C) Data sent from TXD */
  817. __IOM uint32_t EVENTS_ENDTX; /*!< (@ 0x00000120) Last TX byte transmitted */
  818. __IOM uint32_t EVENTS_ERROR; /*!< (@ 0x00000124) Error detected */
  819. __IM uint32_t RESERVED4[7];
  820. __IOM uint32_t EVENTS_RXTO; /*!< (@ 0x00000144) Receiver timeout */
  821. __IM uint32_t RESERVED5;
  822. __IOM uint32_t EVENTS_RXSTARTED; /*!< (@ 0x0000014C) UART receiver has started */
  823. __IOM uint32_t EVENTS_TXSTARTED; /*!< (@ 0x00000150) UART transmitter has started */
  824. __IM uint32_t RESERVED6;
  825. __IOM uint32_t EVENTS_TXSTOPPED; /*!< (@ 0x00000158) Transmitter stopped */
  826. __IM uint32_t RESERVED7[41];
  827. __IOM uint32_t SHORTS; /*!< (@ 0x00000200) Shortcuts between local events and tasks */
  828. __IM uint32_t RESERVED8[63];
  829. __IOM uint32_t INTEN; /*!< (@ 0x00000300) Enable or disable interrupt */
  830. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  831. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  832. __IM uint32_t RESERVED9[93];
  833. __IOM uint32_t ERRORSRC; /*!< (@ 0x00000480) Error source Note : this register is read / write
  834. one to clear. */
  835. __IM uint32_t RESERVED10[31];
  836. __IOM uint32_t ENABLE; /*!< (@ 0x00000500) Enable UART */
  837. __IM uint32_t RESERVED11;
  838. __IOM UARTE_PSEL_Type PSEL; /*!< (@ 0x00000508) Unspecified */
  839. __IM uint32_t RESERVED12[3];
  840. __IOM uint32_t BAUDRATE; /*!< (@ 0x00000524) Baud rate. Accuracy depends on the HFCLK source
  841. selected. */
  842. __IM uint32_t RESERVED13[3];
  843. __IOM UARTE_RXD_Type RXD; /*!< (@ 0x00000534) RXD EasyDMA channel */
  844. __IM uint32_t RESERVED14;
  845. __IOM UARTE_TXD_Type TXD; /*!< (@ 0x00000544) TXD EasyDMA channel */
  846. __IM uint32_t RESERVED15[7];
  847. __IOM uint32_t CONFIG; /*!< (@ 0x0000056C) Configuration of parity and hardware flow control */
  848. } NRF_UARTE_Type; /*!< Size = 1392 (0x570) */
  849. /* =========================================================================================================================== */
  850. /* ================ SPI1 ================ */
  851. /* =========================================================================================================================== */
  852. /**
  853. * @brief Serial Peripheral Interface 0 (SPI1)
  854. */
  855. typedef struct { /*!< (@ 0x40003000) SPI1 Structure */
  856. __IM uint32_t RESERVED[66];
  857. __IOM uint32_t EVENTS_READY; /*!< (@ 0x00000108) TXD byte sent and RXD byte received */
  858. __IM uint32_t RESERVED1[126];
  859. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  860. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  861. __IM uint32_t RESERVED2[125];
  862. __IOM uint32_t ENABLE; /*!< (@ 0x00000500) Enable SPI */
  863. __IM uint32_t RESERVED3;
  864. __IOM SPI_PSEL_Type PSEL; /*!< (@ 0x00000508) Unspecified */
  865. __IM uint32_t RESERVED4;
  866. __IM uint32_t RXD; /*!< (@ 0x00000518) RXD register */
  867. __IOM uint32_t TXD; /*!< (@ 0x0000051C) TXD register */
  868. __IM uint32_t RESERVED5;
  869. __IOM uint32_t FREQUENCY; /*!< (@ 0x00000524) SPI frequency. Accuracy depends on the HFCLK
  870. source selected. */
  871. __IM uint32_t RESERVED6[11];
  872. __IOM uint32_t CONFIG; /*!< (@ 0x00000554) Configuration register */
  873. } NRF_SPI_Type; /*!< Size = 1368 (0x558) */
  874. /* =========================================================================================================================== */
  875. /* ================ SPIM1 ================ */
  876. /* =========================================================================================================================== */
  877. /**
  878. * @brief Serial Peripheral Interface Master with EasyDMA 0 (SPIM1)
  879. */
  880. typedef struct { /*!< (@ 0x40003000) SPIM1 Structure */
  881. __IM uint32_t RESERVED[4];
  882. __OM uint32_t TASKS_START; /*!< (@ 0x00000010) Start SPI transaction */
  883. __OM uint32_t TASKS_STOP; /*!< (@ 0x00000014) Stop SPI transaction */
  884. __IM uint32_t RESERVED1;
  885. __OM uint32_t TASKS_SUSPEND; /*!< (@ 0x0000001C) Suspend SPI transaction */
  886. __OM uint32_t TASKS_RESUME; /*!< (@ 0x00000020) Resume SPI transaction */
  887. __IM uint32_t RESERVED2[56];
  888. __IOM uint32_t EVENTS_STOPPED; /*!< (@ 0x00000104) SPI transaction has stopped */
  889. __IM uint32_t RESERVED3[2];
  890. __IOM uint32_t EVENTS_ENDRX; /*!< (@ 0x00000110) End of RXD buffer reached */
  891. __IM uint32_t RESERVED4;
  892. __IOM uint32_t EVENTS_END; /*!< (@ 0x00000118) End of RXD buffer and TXD buffer reached */
  893. __IM uint32_t RESERVED5;
  894. __IOM uint32_t EVENTS_ENDTX; /*!< (@ 0x00000120) End of TXD buffer reached */
  895. __IM uint32_t RESERVED6[10];
  896. __IOM uint32_t EVENTS_STARTED; /*!< (@ 0x0000014C) Transaction started */
  897. __IM uint32_t RESERVED7[44];
  898. __IOM uint32_t SHORTS; /*!< (@ 0x00000200) Shortcuts between local events and tasks */
  899. __IM uint32_t RESERVED8[64];
  900. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  901. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  902. __IM uint32_t RESERVED9[125];
  903. __IOM uint32_t ENABLE; /*!< (@ 0x00000500) Enable SPIM */
  904. __IM uint32_t RESERVED10;
  905. __IOM SPIM_PSEL_Type PSEL; /*!< (@ 0x00000508) Unspecified */
  906. __IM uint32_t RESERVED11[4];
  907. __IOM uint32_t FREQUENCY; /*!< (@ 0x00000524) SPI frequency. Accuracy depends on the HFCLK
  908. source selected. */
  909. __IM uint32_t RESERVED12[3];
  910. __IOM SPIM_RXD_Type RXD; /*!< (@ 0x00000534) RXD EasyDMA channel */
  911. __IOM SPIM_TXD_Type TXD; /*!< (@ 0x00000544) TXD EasyDMA channel */
  912. __IOM uint32_t CONFIG; /*!< (@ 0x00000554) Configuration register */
  913. __IM uint32_t RESERVED13[26];
  914. __IOM uint32_t ORC; /*!< (@ 0x000005C0) Over-read character. Character clocked out in
  915. case and over-read of the TXD buffer. */
  916. } NRF_SPIM_Type; /*!< Size = 1476 (0x5c4) */
  917. /* =========================================================================================================================== */
  918. /* ================ SPIS1 ================ */
  919. /* =========================================================================================================================== */
  920. /**
  921. * @brief SPI Slave 0 (SPIS1)
  922. */
  923. typedef struct { /*!< (@ 0x40003000) SPIS1 Structure */
  924. __IM uint32_t RESERVED[9];
  925. __OM uint32_t TASKS_ACQUIRE; /*!< (@ 0x00000024) Acquire SPI semaphore */
  926. __OM uint32_t TASKS_RELEASE; /*!< (@ 0x00000028) Release SPI semaphore, enabling the SPI slave
  927. to acquire it */
  928. __IM uint32_t RESERVED1[54];
  929. __IOM uint32_t EVENTS_END; /*!< (@ 0x00000104) Granted transaction completed */
  930. __IM uint32_t RESERVED2[2];
  931. __IOM uint32_t EVENTS_ENDRX; /*!< (@ 0x00000110) End of RXD buffer reached */
  932. __IM uint32_t RESERVED3[5];
  933. __IOM uint32_t EVENTS_ACQUIRED; /*!< (@ 0x00000128) Semaphore acquired */
  934. __IM uint32_t RESERVED4[53];
  935. __IOM uint32_t SHORTS; /*!< (@ 0x00000200) Shortcuts between local events and tasks */
  936. __IM uint32_t RESERVED5[64];
  937. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  938. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  939. __IM uint32_t RESERVED6[61];
  940. __IM uint32_t SEMSTAT; /*!< (@ 0x00000400) Semaphore status register */
  941. __IM uint32_t RESERVED7[15];
  942. __IOM uint32_t STATUS; /*!< (@ 0x00000440) Status from last transaction */
  943. __IM uint32_t RESERVED8[47];
  944. __IOM uint32_t ENABLE; /*!< (@ 0x00000500) Enable SPI slave */
  945. __IM uint32_t RESERVED9;
  946. __IOM SPIS_PSEL_Type PSEL; /*!< (@ 0x00000508) Unspecified */
  947. __IM uint32_t RESERVED10[7];
  948. __IOM SPIS_RXD_Type RXD; /*!< (@ 0x00000534) Unspecified */
  949. __IOM SPIS_TXD_Type TXD; /*!< (@ 0x00000544) Unspecified */
  950. __IOM uint32_t CONFIG; /*!< (@ 0x00000554) Configuration register */
  951. __IM uint32_t RESERVED11;
  952. __IOM uint32_t DEF; /*!< (@ 0x0000055C) Default character. Character clocked out in case
  953. of an ignored transaction. */
  954. __IM uint32_t RESERVED12[24];
  955. __IOM uint32_t ORC; /*!< (@ 0x000005C0) Over-read character */
  956. } NRF_SPIS_Type; /*!< Size = 1476 (0x5c4) */
  957. /* =========================================================================================================================== */
  958. /* ================ TWI0 ================ */
  959. /* =========================================================================================================================== */
  960. /**
  961. * @brief I2C compatible Two-Wire Interface (TWI0)
  962. */
  963. typedef struct { /*!< (@ 0x40003000) TWI0 Structure */
  964. __OM uint32_t TASKS_STARTRX; /*!< (@ 0x00000000) Start TWI receive sequence */
  965. __IM uint32_t RESERVED;
  966. __OM uint32_t TASKS_STARTTX; /*!< (@ 0x00000008) Start TWI transmit sequence */
  967. __IM uint32_t RESERVED1[2];
  968. __OM uint32_t TASKS_STOP; /*!< (@ 0x00000014) Stop TWI transaction */
  969. __IM uint32_t RESERVED2;
  970. __OM uint32_t TASKS_SUSPEND; /*!< (@ 0x0000001C) Suspend TWI transaction */
  971. __OM uint32_t TASKS_RESUME; /*!< (@ 0x00000020) Resume TWI transaction */
  972. __IM uint32_t RESERVED3[56];
  973. __IOM uint32_t EVENTS_STOPPED; /*!< (@ 0x00000104) TWI stopped */
  974. __IOM uint32_t EVENTS_RXDREADY; /*!< (@ 0x00000108) TWI RXD byte received */
  975. __IM uint32_t RESERVED4[4];
  976. __IOM uint32_t EVENTS_TXDSENT; /*!< (@ 0x0000011C) TWI TXD byte sent */
  977. __IM uint32_t RESERVED5;
  978. __IOM uint32_t EVENTS_ERROR; /*!< (@ 0x00000124) TWI error */
  979. __IM uint32_t RESERVED6[4];
  980. __IOM uint32_t EVENTS_BB; /*!< (@ 0x00000138) TWI byte boundary, generated before each byte
  981. that is sent or received */
  982. __IM uint32_t RESERVED7[3];
  983. __IOM uint32_t EVENTS_SUSPENDED; /*!< (@ 0x00000148) TWI entered the suspended state */
  984. __IM uint32_t RESERVED8[45];
  985. __IOM uint32_t SHORTS; /*!< (@ 0x00000200) Shortcuts between local events and tasks */
  986. __IM uint32_t RESERVED9[64];
  987. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  988. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  989. __IM uint32_t RESERVED10[110];
  990. __IOM uint32_t ERRORSRC; /*!< (@ 0x000004C4) Error source */
  991. __IM uint32_t RESERVED11[14];
  992. __IOM uint32_t ENABLE; /*!< (@ 0x00000500) Enable TWI */
  993. __IM uint32_t RESERVED12;
  994. __IOM TWI_PSEL_Type PSEL; /*!< (@ 0x00000508) Unspecified */
  995. __IM uint32_t RESERVED13[2];
  996. __IM uint32_t RXD; /*!< (@ 0x00000518) RXD register */
  997. __IOM uint32_t TXD; /*!< (@ 0x0000051C) TXD register */
  998. __IM uint32_t RESERVED14;
  999. __IOM uint32_t FREQUENCY; /*!< (@ 0x00000524) TWI frequency. Accuracy depends on the HFCLK
  1000. source selected. */
  1001. __IM uint32_t RESERVED15[24];
  1002. __IOM uint32_t ADDRESS; /*!< (@ 0x00000588) Address used in the TWI transfer */
  1003. } NRF_TWI_Type; /*!< Size = 1420 (0x58c) */
  1004. /* =========================================================================================================================== */
  1005. /* ================ TWIM0 ================ */
  1006. /* =========================================================================================================================== */
  1007. /**
  1008. * @brief I2C compatible Two-Wire Master Interface with EasyDMA (TWIM0)
  1009. */
  1010. typedef struct { /*!< (@ 0x40003000) TWIM0 Structure */
  1011. __OM uint32_t TASKS_STARTRX; /*!< (@ 0x00000000) Start TWI receive sequence */
  1012. __IM uint32_t RESERVED;
  1013. __OM uint32_t TASKS_STARTTX; /*!< (@ 0x00000008) Start TWI transmit sequence */
  1014. __IM uint32_t RESERVED1[2];
  1015. __OM uint32_t TASKS_STOP; /*!< (@ 0x00000014) Stop TWI transaction. Must be issued while the
  1016. TWI master is not suspended. */
  1017. __IM uint32_t RESERVED2;
  1018. __OM uint32_t TASKS_SUSPEND; /*!< (@ 0x0000001C) Suspend TWI transaction */
  1019. __OM uint32_t TASKS_RESUME; /*!< (@ 0x00000020) Resume TWI transaction */
  1020. __IM uint32_t RESERVED3[56];
  1021. __IOM uint32_t EVENTS_STOPPED; /*!< (@ 0x00000104) TWI stopped */
  1022. __IM uint32_t RESERVED4[7];
  1023. __IOM uint32_t EVENTS_ERROR; /*!< (@ 0x00000124) TWI error */
  1024. __IM uint32_t RESERVED5[8];
  1025. __IOM uint32_t EVENTS_SUSPENDED; /*!< (@ 0x00000148) Last byte has been sent out after the SUSPEND
  1026. task has been issued, TWI traffic is now
  1027. suspended. */
  1028. __IOM uint32_t EVENTS_RXSTARTED; /*!< (@ 0x0000014C) Receive sequence started */
  1029. __IOM uint32_t EVENTS_TXSTARTED; /*!< (@ 0x00000150) Transmit sequence started */
  1030. __IM uint32_t RESERVED6[2];
  1031. __IOM uint32_t EVENTS_LASTRX; /*!< (@ 0x0000015C) Byte boundary, starting to receive the last byte */
  1032. __IOM uint32_t EVENTS_LASTTX; /*!< (@ 0x00000160) Byte boundary, starting to transmit the last
  1033. byte */
  1034. __IM uint32_t RESERVED7[39];
  1035. __IOM uint32_t SHORTS; /*!< (@ 0x00000200) Shortcuts between local events and tasks */
  1036. __IM uint32_t RESERVED8[63];
  1037. __IOM uint32_t INTEN; /*!< (@ 0x00000300) Enable or disable interrupt */
  1038. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  1039. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  1040. __IM uint32_t RESERVED9[110];
  1041. __IOM uint32_t ERRORSRC; /*!< (@ 0x000004C4) Error source */
  1042. __IM uint32_t RESERVED10[14];
  1043. __IOM uint32_t ENABLE; /*!< (@ 0x00000500) Enable TWIM */
  1044. __IM uint32_t RESERVED11;
  1045. __IOM TWIM_PSEL_Type PSEL; /*!< (@ 0x00000508) Unspecified */
  1046. __IM uint32_t RESERVED12[5];
  1047. __IOM uint32_t FREQUENCY; /*!< (@ 0x00000524) TWI frequency. Accuracy depends on the HFCLK
  1048. source selected. */
  1049. __IM uint32_t RESERVED13[3];
  1050. __IOM TWIM_RXD_Type RXD; /*!< (@ 0x00000534) RXD EasyDMA channel */
  1051. __IOM TWIM_TXD_Type TXD; /*!< (@ 0x00000544) TXD EasyDMA channel */
  1052. __IM uint32_t RESERVED14[13];
  1053. __IOM uint32_t ADDRESS; /*!< (@ 0x00000588) Address used in the TWI transfer */
  1054. } NRF_TWIM_Type; /*!< Size = 1420 (0x58c) */
  1055. /* =========================================================================================================================== */
  1056. /* ================ TWIS0 ================ */
  1057. /* =========================================================================================================================== */
  1058. /**
  1059. * @brief I2C compatible Two-Wire Slave Interface with EasyDMA (TWIS0)
  1060. */
  1061. typedef struct { /*!< (@ 0x40003000) TWIS0 Structure */
  1062. __IM uint32_t RESERVED[5];
  1063. __OM uint32_t TASKS_STOP; /*!< (@ 0x00000014) Stop TWI transaction */
  1064. __IM uint32_t RESERVED1;
  1065. __OM uint32_t TASKS_SUSPEND; /*!< (@ 0x0000001C) Suspend TWI transaction */
  1066. __OM uint32_t TASKS_RESUME; /*!< (@ 0x00000020) Resume TWI transaction */
  1067. __IM uint32_t RESERVED2[3];
  1068. __OM uint32_t TASKS_PREPARERX; /*!< (@ 0x00000030) Prepare the TWI slave to respond to a write command */
  1069. __OM uint32_t TASKS_PREPARETX; /*!< (@ 0x00000034) Prepare the TWI slave to respond to a read command */
  1070. __IM uint32_t RESERVED3[51];
  1071. __IOM uint32_t EVENTS_STOPPED; /*!< (@ 0x00000104) TWI stopped */
  1072. __IM uint32_t RESERVED4[7];
  1073. __IOM uint32_t EVENTS_ERROR; /*!< (@ 0x00000124) TWI error */
  1074. __IM uint32_t RESERVED5[9];
  1075. __IOM uint32_t EVENTS_RXSTARTED; /*!< (@ 0x0000014C) Receive sequence started */
  1076. __IOM uint32_t EVENTS_TXSTARTED; /*!< (@ 0x00000150) Transmit sequence started */
  1077. __IM uint32_t RESERVED6[4];
  1078. __IOM uint32_t EVENTS_WRITE; /*!< (@ 0x00000164) Write command received */
  1079. __IOM uint32_t EVENTS_READ; /*!< (@ 0x00000168) Read command received */
  1080. __IM uint32_t RESERVED7[37];
  1081. __IOM uint32_t SHORTS; /*!< (@ 0x00000200) Shortcuts between local events and tasks */
  1082. __IM uint32_t RESERVED8[63];
  1083. __IOM uint32_t INTEN; /*!< (@ 0x00000300) Enable or disable interrupt */
  1084. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  1085. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  1086. __IM uint32_t RESERVED9[113];
  1087. __IOM uint32_t ERRORSRC; /*!< (@ 0x000004D0) Error source */
  1088. __IM uint32_t MATCH; /*!< (@ 0x000004D4) Status register indicating which address had
  1089. a match */
  1090. __IM uint32_t RESERVED10[10];
  1091. __IOM uint32_t ENABLE; /*!< (@ 0x00000500) Enable TWIS */
  1092. __IM uint32_t RESERVED11;
  1093. __IOM TWIS_PSEL_Type PSEL; /*!< (@ 0x00000508) Unspecified */
  1094. __IM uint32_t RESERVED12[9];
  1095. __IOM TWIS_RXD_Type RXD; /*!< (@ 0x00000534) RXD EasyDMA channel */
  1096. __IOM TWIS_TXD_Type TXD; /*!< (@ 0x00000544) TXD EasyDMA channel */
  1097. __IM uint32_t RESERVED13[13];
  1098. __IOM uint32_t ADDRESS[2]; /*!< (@ 0x00000588) Description collection: TWI slave address n */
  1099. __IM uint32_t RESERVED14;
  1100. __IOM uint32_t CONFIG; /*!< (@ 0x00000594) Configuration register for the address match
  1101. mechanism */
  1102. __IM uint32_t RESERVED15[10];
  1103. __IOM uint32_t ORC; /*!< (@ 0x000005C0) Over-read character. Character sent out in case
  1104. of an over-read of the transmit buffer. */
  1105. } NRF_TWIS_Type; /*!< Size = 1476 (0x5c4) */
  1106. /* =========================================================================================================================== */
  1107. /* ================ GPIOTE ================ */
  1108. /* =========================================================================================================================== */
  1109. /**
  1110. * @brief GPIO Tasks and Events (GPIOTE)
  1111. */
  1112. typedef struct { /*!< (@ 0x40006000) GPIOTE Structure */
  1113. __OM uint32_t TASKS_OUT[8]; /*!< (@ 0x00000000) Description collection: Task for writing to pin
  1114. specified in CONFIG[n].PSEL. Action on pin
  1115. is configured in CONFIG[n].POLARITY. */
  1116. __IM uint32_t RESERVED[4];
  1117. __OM uint32_t TASKS_SET[8]; /*!< (@ 0x00000030) Description collection: Task for writing to pin
  1118. specified in CONFIG[n].PSEL. Action on pin
  1119. is to set it high. */
  1120. __IM uint32_t RESERVED1[4];
  1121. __OM uint32_t TASKS_CLR[8]; /*!< (@ 0x00000060) Description collection: Task for writing to pin
  1122. specified in CONFIG[n].PSEL. Action on pin
  1123. is to set it low. */
  1124. __IM uint32_t RESERVED2[32];
  1125. __IOM uint32_t EVENTS_IN[8]; /*!< (@ 0x00000100) Description collection: Event generated from
  1126. pin specified in CONFIG[n].PSEL */
  1127. __IM uint32_t RESERVED3[23];
  1128. __IOM uint32_t EVENTS_PORT; /*!< (@ 0x0000017C) Event generated from multiple input GPIO pins
  1129. with SENSE mechanism enabled */
  1130. __IM uint32_t RESERVED4[97];
  1131. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  1132. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  1133. __IM uint32_t RESERVED5[129];
  1134. __IOM uint32_t CONFIG[8]; /*!< (@ 0x00000510) Description collection: Configuration for OUT[n],
  1135. SET[n] and CLR[n] tasks and IN[n] event */
  1136. } NRF_GPIOTE_Type; /*!< Size = 1328 (0x530) */
  1137. /* =========================================================================================================================== */
  1138. /* ================ SAADC ================ */
  1139. /* =========================================================================================================================== */
  1140. /**
  1141. * @brief Analog to Digital Converter (SAADC)
  1142. */
  1143. typedef struct { /*!< (@ 0x40007000) SAADC Structure */
  1144. __OM uint32_t TASKS_START; /*!< (@ 0x00000000) Start the ADC and prepare the result buffer in
  1145. RAM */
  1146. __OM uint32_t TASKS_SAMPLE; /*!< (@ 0x00000004) Take one ADC sample, if scan is enabled all channels
  1147. are sampled */
  1148. __OM uint32_t TASKS_STOP; /*!< (@ 0x00000008) Stop the ADC and terminate any on-going conversion */
  1149. __OM uint32_t TASKS_CALIBRATEOFFSET; /*!< (@ 0x0000000C) Starts offset auto-calibration */
  1150. __IM uint32_t RESERVED[60];
  1151. __IOM uint32_t EVENTS_STARTED; /*!< (@ 0x00000100) The ADC has started */
  1152. __IOM uint32_t EVENTS_END; /*!< (@ 0x00000104) The ADC has filled up the Result buffer */
  1153. __IOM uint32_t EVENTS_DONE; /*!< (@ 0x00000108) A conversion task has been completed. Depending
  1154. on the mode, multiple conversions might
  1155. be needed for a result to be transferred
  1156. to RAM. */
  1157. __IOM uint32_t EVENTS_RESULTDONE; /*!< (@ 0x0000010C) A result is ready to get transferred to RAM. */
  1158. __IOM uint32_t EVENTS_CALIBRATEDONE; /*!< (@ 0x00000110) Calibration is complete */
  1159. __IOM uint32_t EVENTS_STOPPED; /*!< (@ 0x00000114) The ADC has stopped */
  1160. __IOM SAADC_EVENTS_CH_Type EVENTS_CH[8]; /*!< (@ 0x00000118) Peripheral events. */
  1161. __IM uint32_t RESERVED1[106];
  1162. __IOM uint32_t INTEN; /*!< (@ 0x00000300) Enable or disable interrupt */
  1163. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  1164. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  1165. __IM uint32_t RESERVED2[61];
  1166. __IM uint32_t STATUS; /*!< (@ 0x00000400) Status */
  1167. __IM uint32_t RESERVED3[63];
  1168. __IOM uint32_t ENABLE; /*!< (@ 0x00000500) Enable or disable ADC */
  1169. __IM uint32_t RESERVED4[3];
  1170. __IOM SAADC_CH_Type CH[8]; /*!< (@ 0x00000510) Unspecified */
  1171. __IM uint32_t RESERVED5[24];
  1172. __IOM uint32_t RESOLUTION; /*!< (@ 0x000005F0) Resolution configuration */
  1173. __IOM uint32_t OVERSAMPLE; /*!< (@ 0x000005F4) Oversampling configuration. OVERSAMPLE should
  1174. not be combined with SCAN. The RESOLUTION
  1175. is applied before averaging, thus for high
  1176. OVERSAMPLE a higher RESOLUTION should be
  1177. used. */
  1178. __IOM uint32_t SAMPLERATE; /*!< (@ 0x000005F8) Controls normal or continuous sample rate */
  1179. __IM uint32_t RESERVED6[12];
  1180. __IOM SAADC_RESULT_Type RESULT; /*!< (@ 0x0000062C) RESULT EasyDMA channel */
  1181. } NRF_SAADC_Type; /*!< Size = 1592 (0x638) */
  1182. /* =========================================================================================================================== */
  1183. /* ================ TIMER0 ================ */
  1184. /* =========================================================================================================================== */
  1185. /**
  1186. * @brief Timer/Counter 0 (TIMER0)
  1187. */
  1188. typedef struct { /*!< (@ 0x40008000) TIMER0 Structure */
  1189. __OM uint32_t TASKS_START; /*!< (@ 0x00000000) Start Timer */
  1190. __OM uint32_t TASKS_STOP; /*!< (@ 0x00000004) Stop Timer */
  1191. __OM uint32_t TASKS_COUNT; /*!< (@ 0x00000008) Increment Timer (Counter mode only) */
  1192. __OM uint32_t TASKS_CLEAR; /*!< (@ 0x0000000C) Clear time */
  1193. __OM uint32_t TASKS_SHUTDOWN; /*!< (@ 0x00000010) Deprecated register - Shut down timer */
  1194. __IM uint32_t RESERVED[11];
  1195. __OM uint32_t TASKS_CAPTURE[6]; /*!< (@ 0x00000040) Description collection: Capture Timer value to
  1196. CC[n] register */
  1197. __IM uint32_t RESERVED1[58];
  1198. __IOM uint32_t EVENTS_COMPARE[6]; /*!< (@ 0x00000140) Description collection: Compare event on CC[n]
  1199. match */
  1200. __IM uint32_t RESERVED2[42];
  1201. __IOM uint32_t SHORTS; /*!< (@ 0x00000200) Shortcuts between local events and tasks */
  1202. __IM uint32_t RESERVED3[64];
  1203. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  1204. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  1205. __IM uint32_t RESERVED4[126];
  1206. __IOM uint32_t MODE; /*!< (@ 0x00000504) Timer mode selection */
  1207. __IOM uint32_t BITMODE; /*!< (@ 0x00000508) Configure the number of bits used by the TIMER */
  1208. __IM uint32_t RESERVED5;
  1209. __IOM uint32_t PRESCALER; /*!< (@ 0x00000510) Timer prescaler register */
  1210. __IM uint32_t RESERVED6[11];
  1211. __IOM uint32_t CC[6]; /*!< (@ 0x00000540) Description collection: Capture/Compare register
  1212. n */
  1213. } NRF_TIMER_Type; /*!< Size = 1368 (0x558) */
  1214. /* =========================================================================================================================== */
  1215. /* ================ RTC0 ================ */
  1216. /* =========================================================================================================================== */
  1217. /**
  1218. * @brief Real time counter 0 (RTC0)
  1219. */
  1220. typedef struct { /*!< (@ 0x4000B000) RTC0 Structure */
  1221. __OM uint32_t TASKS_START; /*!< (@ 0x00000000) Start RTC COUNTER */
  1222. __OM uint32_t TASKS_STOP; /*!< (@ 0x00000004) Stop RTC COUNTER */
  1223. __OM uint32_t TASKS_CLEAR; /*!< (@ 0x00000008) Clear RTC COUNTER */
  1224. __OM uint32_t TASKS_TRIGOVRFLW; /*!< (@ 0x0000000C) Set COUNTER to 0xFFFFF0 */
  1225. __IM uint32_t RESERVED[60];
  1226. __IOM uint32_t EVENTS_TICK; /*!< (@ 0x00000100) Event on COUNTER increment */
  1227. __IOM uint32_t EVENTS_OVRFLW; /*!< (@ 0x00000104) Event on COUNTER overflow */
  1228. __IM uint32_t RESERVED1[14];
  1229. __IOM uint32_t EVENTS_COMPARE[4]; /*!< (@ 0x00000140) Description collection: Compare event on CC[n]
  1230. match */
  1231. __IM uint32_t RESERVED2[109];
  1232. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  1233. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  1234. __IM uint32_t RESERVED3[13];
  1235. __IOM uint32_t EVTEN; /*!< (@ 0x00000340) Enable or disable event routing */
  1236. __IOM uint32_t EVTENSET; /*!< (@ 0x00000344) Enable event routing */
  1237. __IOM uint32_t EVTENCLR; /*!< (@ 0x00000348) Disable event routing */
  1238. __IM uint32_t RESERVED4[110];
  1239. __IM uint32_t COUNTER; /*!< (@ 0x00000504) Current COUNTER value */
  1240. __IOM uint32_t PRESCALER; /*!< (@ 0x00000508) 12 bit prescaler for COUNTER frequency (32768/(PRESCALER+1)).Mu
  1241. t be written when RTC is stopped */
  1242. __IM uint32_t RESERVED5[13];
  1243. __IOM uint32_t CC[4]; /*!< (@ 0x00000540) Description collection: Compare register n */
  1244. } NRF_RTC_Type; /*!< Size = 1360 (0x550) */
  1245. /* =========================================================================================================================== */
  1246. /* ================ TEMP ================ */
  1247. /* =========================================================================================================================== */
  1248. /**
  1249. * @brief Temperature Sensor (TEMP)
  1250. */
  1251. typedef struct { /*!< (@ 0x4000C000) TEMP Structure */
  1252. __OM uint32_t TASKS_START; /*!< (@ 0x00000000) Start temperature measurement */
  1253. __OM uint32_t TASKS_STOP; /*!< (@ 0x00000004) Stop temperature measurement */
  1254. __IM uint32_t RESERVED[62];
  1255. __IOM uint32_t EVENTS_DATARDY; /*!< (@ 0x00000100) Temperature measurement complete, data ready */
  1256. __IM uint32_t RESERVED1[128];
  1257. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  1258. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  1259. __IM uint32_t RESERVED2[127];
  1260. __IM int32_t TEMP; /*!< (@ 0x00000508) Temperature in degC (0.25deg steps) */
  1261. __IM uint32_t RESERVED3[5];
  1262. __IOM uint32_t A0; /*!< (@ 0x00000520) Slope of 1st piece wise linear function */
  1263. __IOM uint32_t A1; /*!< (@ 0x00000524) Slope of 2nd piece wise linear function */
  1264. __IOM uint32_t A2; /*!< (@ 0x00000528) Slope of 3rd piece wise linear function */
  1265. __IOM uint32_t A3; /*!< (@ 0x0000052C) Slope of 4th piece wise linear function */
  1266. __IOM uint32_t A4; /*!< (@ 0x00000530) Slope of 5th piece wise linear function */
  1267. __IOM uint32_t A5; /*!< (@ 0x00000534) Slope of 6th piece wise linear function */
  1268. __IM uint32_t RESERVED4[2];
  1269. __IOM uint32_t B0; /*!< (@ 0x00000540) y-intercept of 1st piece wise linear function */
  1270. __IOM uint32_t B1; /*!< (@ 0x00000544) y-intercept of 2nd piece wise linear function */
  1271. __IOM uint32_t B2; /*!< (@ 0x00000548) y-intercept of 3rd piece wise linear function */
  1272. __IOM uint32_t B3; /*!< (@ 0x0000054C) y-intercept of 4th piece wise linear function */
  1273. __IOM uint32_t B4; /*!< (@ 0x00000550) y-intercept of 5th piece wise linear function */
  1274. __IOM uint32_t B5; /*!< (@ 0x00000554) y-intercept of 6th piece wise linear function */
  1275. __IM uint32_t RESERVED5[2];
  1276. __IOM uint32_t T0; /*!< (@ 0x00000560) End point of 1st piece wise linear function */
  1277. __IOM uint32_t T1; /*!< (@ 0x00000564) End point of 2nd piece wise linear function */
  1278. __IOM uint32_t T2; /*!< (@ 0x00000568) End point of 3rd piece wise linear function */
  1279. __IOM uint32_t T3; /*!< (@ 0x0000056C) End point of 4th piece wise linear function */
  1280. __IOM uint32_t T4; /*!< (@ 0x00000570) End point of 5th piece wise linear function */
  1281. } NRF_TEMP_Type; /*!< Size = 1396 (0x574) */
  1282. /* =========================================================================================================================== */
  1283. /* ================ RNG ================ */
  1284. /* =========================================================================================================================== */
  1285. /**
  1286. * @brief Random Number Generator (RNG)
  1287. */
  1288. typedef struct { /*!< (@ 0x4000D000) RNG Structure */
  1289. __OM uint32_t TASKS_START; /*!< (@ 0x00000000) Task starting the random number generator */
  1290. __OM uint32_t TASKS_STOP; /*!< (@ 0x00000004) Task stopping the random number generator */
  1291. __IM uint32_t RESERVED[62];
  1292. __IOM uint32_t EVENTS_VALRDY; /*!< (@ 0x00000100) Event being generated for every new random number
  1293. written to the VALUE register */
  1294. __IM uint32_t RESERVED1[63];
  1295. __IOM uint32_t SHORTS; /*!< (@ 0x00000200) Shortcuts between local events and tasks */
  1296. __IM uint32_t RESERVED2[64];
  1297. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  1298. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  1299. __IM uint32_t RESERVED3[126];
  1300. __IOM uint32_t CONFIG; /*!< (@ 0x00000504) Configuration register */
  1301. __IM uint32_t VALUE; /*!< (@ 0x00000508) Output random number */
  1302. } NRF_RNG_Type; /*!< Size = 1292 (0x50c) */
  1303. /* =========================================================================================================================== */
  1304. /* ================ ECB ================ */
  1305. /* =========================================================================================================================== */
  1306. /**
  1307. * @brief AES ECB Mode Encryption (ECB)
  1308. */
  1309. typedef struct { /*!< (@ 0x4000E000) ECB Structure */
  1310. __OM uint32_t TASKS_STARTECB; /*!< (@ 0x00000000) Start ECB block encrypt */
  1311. __OM uint32_t TASKS_STOPECB; /*!< (@ 0x00000004) Abort a possible executing ECB operation */
  1312. __IM uint32_t RESERVED[62];
  1313. __IOM uint32_t EVENTS_ENDECB; /*!< (@ 0x00000100) ECB block encrypt complete */
  1314. __IOM uint32_t EVENTS_ERRORECB; /*!< (@ 0x00000104) ECB block encrypt aborted because of a STOPECB
  1315. task or due to an error */
  1316. __IM uint32_t RESERVED1[127];
  1317. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  1318. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  1319. __IM uint32_t RESERVED2[126];
  1320. __IOM uint32_t ECBDATAPTR; /*!< (@ 0x00000504) ECB block encrypt memory pointers */
  1321. } NRF_ECB_Type; /*!< Size = 1288 (0x508) */
  1322. /* =========================================================================================================================== */
  1323. /* ================ AAR ================ */
  1324. /* =========================================================================================================================== */
  1325. /**
  1326. * @brief Accelerated Address Resolver (AAR)
  1327. */
  1328. typedef struct { /*!< (@ 0x4000F000) AAR Structure */
  1329. __OM uint32_t TASKS_START; /*!< (@ 0x00000000) Start resolving addresses based on IRKs specified
  1330. in the IRK data structure */
  1331. __IM uint32_t RESERVED;
  1332. __OM uint32_t TASKS_STOP; /*!< (@ 0x00000008) Stop resolving addresses */
  1333. __IM uint32_t RESERVED1[61];
  1334. __IOM uint32_t EVENTS_END; /*!< (@ 0x00000100) Address resolution procedure complete */
  1335. __IOM uint32_t EVENTS_RESOLVED; /*!< (@ 0x00000104) Address resolved */
  1336. __IOM uint32_t EVENTS_NOTRESOLVED; /*!< (@ 0x00000108) Address not resolved */
  1337. __IM uint32_t RESERVED2[126];
  1338. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  1339. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  1340. __IM uint32_t RESERVED3[61];
  1341. __IM uint32_t STATUS; /*!< (@ 0x00000400) Resolution status */
  1342. __IM uint32_t RESERVED4[63];
  1343. __IOM uint32_t ENABLE; /*!< (@ 0x00000500) Enable AAR */
  1344. __IOM uint32_t NIRK; /*!< (@ 0x00000504) Number of IRKs */
  1345. __IOM uint32_t IRKPTR; /*!< (@ 0x00000508) Pointer to IRK data structure */
  1346. __IM uint32_t RESERVED5;
  1347. __IOM uint32_t ADDRPTR; /*!< (@ 0x00000510) Pointer to the resolvable address */
  1348. __IOM uint32_t SCRATCHPTR; /*!< (@ 0x00000514) Pointer to data area used for temporary storage */
  1349. } NRF_AAR_Type; /*!< Size = 1304 (0x518) */
  1350. /* =========================================================================================================================== */
  1351. /* ================ CCM ================ */
  1352. /* =========================================================================================================================== */
  1353. /**
  1354. * @brief AES CCM Mode Encryption (CCM)
  1355. */
  1356. typedef struct { /*!< (@ 0x4000F000) CCM Structure */
  1357. __OM uint32_t TASKS_KSGEN; /*!< (@ 0x00000000) Start generation of key-stream. This operation
  1358. will stop by itself when completed. */
  1359. __OM uint32_t TASKS_CRYPT; /*!< (@ 0x00000004) Start encryption/decryption. This operation will
  1360. stop by itself when completed. */
  1361. __OM uint32_t TASKS_STOP; /*!< (@ 0x00000008) Stop encryption/decryption */
  1362. __OM uint32_t TASKS_RATEOVERRIDE; /*!< (@ 0x0000000C) Override DATARATE setting in MODE register with
  1363. the contents of the RATEOVERRIDE register
  1364. for any ongoing encryption/decryption */
  1365. __IM uint32_t RESERVED[60];
  1366. __IOM uint32_t EVENTS_ENDKSGEN; /*!< (@ 0x00000100) Key-stream generation complete */
  1367. __IOM uint32_t EVENTS_ENDCRYPT; /*!< (@ 0x00000104) Encrypt/decrypt complete */
  1368. __IOM uint32_t EVENTS_ERROR; /*!< (@ 0x00000108) Deprecated register - CCM error event */
  1369. __IM uint32_t RESERVED1[61];
  1370. __IOM uint32_t SHORTS; /*!< (@ 0x00000200) Shortcuts between local events and tasks */
  1371. __IM uint32_t RESERVED2[64];
  1372. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  1373. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  1374. __IM uint32_t RESERVED3[61];
  1375. __IM uint32_t MICSTATUS; /*!< (@ 0x00000400) MIC check result */
  1376. __IM uint32_t RESERVED4[63];
  1377. __IOM uint32_t ENABLE; /*!< (@ 0x00000500) Enable */
  1378. __IOM uint32_t MODE; /*!< (@ 0x00000504) Operation mode */
  1379. __IOM uint32_t CNFPTR; /*!< (@ 0x00000508) Pointer to data structure holding AES key and
  1380. NONCE vector */
  1381. __IOM uint32_t INPTR; /*!< (@ 0x0000050C) Input pointer */
  1382. __IOM uint32_t OUTPTR; /*!< (@ 0x00000510) Output pointer */
  1383. __IOM uint32_t SCRATCHPTR; /*!< (@ 0x00000514) Pointer to data area used for temporary storage */
  1384. __IOM uint32_t MAXPACKETSIZE; /*!< (@ 0x00000518) Length of key-stream generated when MODE.LENGTH
  1385. = Extended. */
  1386. __IOM uint32_t RATEOVERRIDE; /*!< (@ 0x0000051C) Data rate override setting. */
  1387. } NRF_CCM_Type; /*!< Size = 1312 (0x520) */
  1388. /* =========================================================================================================================== */
  1389. /* ================ WDT ================ */
  1390. /* =========================================================================================================================== */
  1391. /**
  1392. * @brief Watchdog Timer (WDT)
  1393. */
  1394. typedef struct { /*!< (@ 0x40010000) WDT Structure */
  1395. __OM uint32_t TASKS_START; /*!< (@ 0x00000000) Start the watchdog */
  1396. __IM uint32_t RESERVED[63];
  1397. __IOM uint32_t EVENTS_TIMEOUT; /*!< (@ 0x00000100) Watchdog timeout */
  1398. __IM uint32_t RESERVED1[128];
  1399. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  1400. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  1401. __IM uint32_t RESERVED2[61];
  1402. __IM uint32_t RUNSTATUS; /*!< (@ 0x00000400) Run status */
  1403. __IM uint32_t REQSTATUS; /*!< (@ 0x00000404) Request status */
  1404. __IM uint32_t RESERVED3[63];
  1405. __IOM uint32_t CRV; /*!< (@ 0x00000504) Counter reload value */
  1406. __IOM uint32_t RREN; /*!< (@ 0x00000508) Enable register for reload request registers */
  1407. __IOM uint32_t CONFIG; /*!< (@ 0x0000050C) Configuration register */
  1408. __IM uint32_t RESERVED4[60];
  1409. __OM uint32_t RR[8]; /*!< (@ 0x00000600) Description collection: Reload request n */
  1410. } NRF_WDT_Type; /*!< Size = 1568 (0x620) */
  1411. /* =========================================================================================================================== */
  1412. /* ================ QDEC ================ */
  1413. /* =========================================================================================================================== */
  1414. /**
  1415. * @brief Quadrature Decoder (QDEC)
  1416. */
  1417. typedef struct { /*!< (@ 0x40012000) QDEC Structure */
  1418. __OM uint32_t TASKS_START; /*!< (@ 0x00000000) Task starting the quadrature decoder */
  1419. __OM uint32_t TASKS_STOP; /*!< (@ 0x00000004) Task stopping the quadrature decoder */
  1420. __OM uint32_t TASKS_READCLRACC; /*!< (@ 0x00000008) Read and clear ACC and ACCDBL */
  1421. __OM uint32_t TASKS_RDCLRACC; /*!< (@ 0x0000000C) Read and clear ACC */
  1422. __OM uint32_t TASKS_RDCLRDBL; /*!< (@ 0x00000010) Read and clear ACCDBL */
  1423. __IM uint32_t RESERVED[59];
  1424. __IOM uint32_t EVENTS_SAMPLERDY; /*!< (@ 0x00000100) Event being generated for every new sample value
  1425. written to the SAMPLE register */
  1426. __IOM uint32_t EVENTS_REPORTRDY; /*!< (@ 0x00000104) Non-null report ready */
  1427. __IOM uint32_t EVENTS_ACCOF; /*!< (@ 0x00000108) ACC or ACCDBL register overflow */
  1428. __IOM uint32_t EVENTS_DBLRDY; /*!< (@ 0x0000010C) Double displacement(s) detected */
  1429. __IOM uint32_t EVENTS_STOPPED; /*!< (@ 0x00000110) QDEC has been stopped */
  1430. __IM uint32_t RESERVED1[59];
  1431. __IOM uint32_t SHORTS; /*!< (@ 0x00000200) Shortcuts between local events and tasks */
  1432. __IM uint32_t RESERVED2[64];
  1433. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  1434. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  1435. __IM uint32_t RESERVED3[125];
  1436. __IOM uint32_t ENABLE; /*!< (@ 0x00000500) Enable the quadrature decoder */
  1437. __IOM uint32_t LEDPOL; /*!< (@ 0x00000504) LED output pin polarity */
  1438. __IOM uint32_t SAMPLEPER; /*!< (@ 0x00000508) Sample period */
  1439. __IM int32_t SAMPLE; /*!< (@ 0x0000050C) Motion sample value */
  1440. __IOM uint32_t REPORTPER; /*!< (@ 0x00000510) Number of samples to be taken before REPORTRDY
  1441. and DBLRDY events can be generated */
  1442. __IM int32_t ACC; /*!< (@ 0x00000514) Register accumulating the valid transitions */
  1443. __IM int32_t ACCREAD; /*!< (@ 0x00000518) Snapshot of the ACC register, updated by the
  1444. READCLRACC or RDCLRACC task */
  1445. __IOM QDEC_PSEL_Type PSEL; /*!< (@ 0x0000051C) Unspecified */
  1446. __IOM uint32_t DBFEN; /*!< (@ 0x00000528) Enable input debounce filters */
  1447. __IM uint32_t RESERVED4[5];
  1448. __IOM uint32_t LEDPRE; /*!< (@ 0x00000540) Time period the LED is switched ON prior to sampling */
  1449. __IM uint32_t ACCDBL; /*!< (@ 0x00000544) Register accumulating the number of detected
  1450. double transitions */
  1451. __IM uint32_t ACCDBLREAD; /*!< (@ 0x00000548) Snapshot of the ACCDBL, updated by the READCLRACC
  1452. or RDCLRDBL task */
  1453. } NRF_QDEC_Type; /*!< Size = 1356 (0x54c) */
  1454. /* =========================================================================================================================== */
  1455. /* ================ COMP ================ */
  1456. /* =========================================================================================================================== */
  1457. /**
  1458. * @brief Comparator (COMP)
  1459. */
  1460. typedef struct { /*!< (@ 0x40013000) COMP Structure */
  1461. __OM uint32_t TASKS_START; /*!< (@ 0x00000000) Start comparator */
  1462. __OM uint32_t TASKS_STOP; /*!< (@ 0x00000004) Stop comparator */
  1463. __OM uint32_t TASKS_SAMPLE; /*!< (@ 0x00000008) Sample comparator value */
  1464. __IM uint32_t RESERVED[61];
  1465. __IOM uint32_t EVENTS_READY; /*!< (@ 0x00000100) COMP is ready and output is valid */
  1466. __IOM uint32_t EVENTS_DOWN; /*!< (@ 0x00000104) Downward crossing */
  1467. __IOM uint32_t EVENTS_UP; /*!< (@ 0x00000108) Upward crossing */
  1468. __IOM uint32_t EVENTS_CROSS; /*!< (@ 0x0000010C) Downward or upward crossing */
  1469. __IM uint32_t RESERVED1[60];
  1470. __IOM uint32_t SHORTS; /*!< (@ 0x00000200) Shortcuts between local events and tasks */
  1471. __IM uint32_t RESERVED2[63];
  1472. __IOM uint32_t INTEN; /*!< (@ 0x00000300) Enable or disable interrupt */
  1473. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  1474. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  1475. __IM uint32_t RESERVED3[61];
  1476. __IM uint32_t RESULT; /*!< (@ 0x00000400) Compare result */
  1477. __IM uint32_t RESERVED4[63];
  1478. __IOM uint32_t ENABLE; /*!< (@ 0x00000500) COMP enable */
  1479. __IOM uint32_t PSEL; /*!< (@ 0x00000504) Pin select */
  1480. __IOM uint32_t REFSEL; /*!< (@ 0x00000508) Reference source select for single-ended mode */
  1481. __IOM uint32_t EXTREFSEL; /*!< (@ 0x0000050C) External reference select */
  1482. __IM uint32_t RESERVED5[8];
  1483. __IOM uint32_t TH; /*!< (@ 0x00000530) Threshold configuration for hysteresis unit */
  1484. __IOM uint32_t MODE; /*!< (@ 0x00000534) Mode configuration */
  1485. __IOM uint32_t HYST; /*!< (@ 0x00000538) Comparator hysteresis enable */
  1486. } NRF_COMP_Type; /*!< Size = 1340 (0x53c) */
  1487. /* =========================================================================================================================== */
  1488. /* ================ EGU0 ================ */
  1489. /* =========================================================================================================================== */
  1490. /**
  1491. * @brief Event Generator Unit 0 (EGU0)
  1492. */
  1493. typedef struct { /*!< (@ 0x40014000) EGU0 Structure */
  1494. __OM uint32_t TASKS_TRIGGER[16]; /*!< (@ 0x00000000) Description collection: Trigger n for triggering
  1495. the corresponding TRIGGERED[n] event */
  1496. __IM uint32_t RESERVED[48];
  1497. __IOM uint32_t EVENTS_TRIGGERED[16]; /*!< (@ 0x00000100) Description collection: Event number n generated
  1498. by triggering the corresponding TRIGGER[n]
  1499. task */
  1500. __IM uint32_t RESERVED1[112];
  1501. __IOM uint32_t INTEN; /*!< (@ 0x00000300) Enable or disable interrupt */
  1502. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  1503. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  1504. } NRF_EGU_Type; /*!< Size = 780 (0x30c) */
  1505. /* =========================================================================================================================== */
  1506. /* ================ SWI0 ================ */
  1507. /* =========================================================================================================================== */
  1508. /**
  1509. * @brief Software interrupt 0 (SWI0)
  1510. */
  1511. typedef struct { /*!< (@ 0x40014000) SWI0 Structure */
  1512. __IM uint32_t UNUSED; /*!< (@ 0x00000000) Unused. */
  1513. } NRF_SWI_Type; /*!< Size = 4 (0x4) */
  1514. /* =========================================================================================================================== */
  1515. /* ================ PWM0 ================ */
  1516. /* =========================================================================================================================== */
  1517. /**
  1518. * @brief Pulse width modulation unit (PWM0)
  1519. */
  1520. typedef struct { /*!< (@ 0x4001C000) PWM0 Structure */
  1521. __IM uint32_t RESERVED;
  1522. __OM uint32_t TASKS_STOP; /*!< (@ 0x00000004) Stops PWM pulse generation on all channels at
  1523. the end of current PWM period, and stops
  1524. sequence playback */
  1525. __OM uint32_t TASKS_SEQSTART[2]; /*!< (@ 0x00000008) Description collection: Loads the first PWM value
  1526. on all enabled channels from sequence n,
  1527. and starts playing that sequence at the
  1528. rate defined in SEQ[n]REFRESH and/or DECODER.MODE.
  1529. Causes PWM generation to start if not running. */
  1530. __OM uint32_t TASKS_NEXTSTEP; /*!< (@ 0x00000010) Steps by one value in the current sequence on
  1531. all enabled channels if DECODER.MODE=NextStep.
  1532. Does not cause PWM generation to start if
  1533. not running. */
  1534. __IM uint32_t RESERVED1[60];
  1535. __IOM uint32_t EVENTS_STOPPED; /*!< (@ 0x00000104) Response to STOP task, emitted when PWM pulses
  1536. are no longer generated */
  1537. __IOM uint32_t EVENTS_SEQSTARTED[2]; /*!< (@ 0x00000108) Description collection: First PWM period started
  1538. on sequence n */
  1539. __IOM uint32_t EVENTS_SEQEND[2]; /*!< (@ 0x00000110) Description collection: Emitted at end of every
  1540. sequence n, when last value from RAM has
  1541. been applied to wave counter */
  1542. __IOM uint32_t EVENTS_PWMPERIODEND; /*!< (@ 0x00000118) Emitted at the end of each PWM period */
  1543. __IOM uint32_t EVENTS_LOOPSDONE; /*!< (@ 0x0000011C) Concatenated sequences have been played the amount
  1544. of times defined in LOOP.CNT */
  1545. __IM uint32_t RESERVED2[56];
  1546. __IOM uint32_t SHORTS; /*!< (@ 0x00000200) Shortcuts between local events and tasks */
  1547. __IM uint32_t RESERVED3[63];
  1548. __IOM uint32_t INTEN; /*!< (@ 0x00000300) Enable or disable interrupt */
  1549. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  1550. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  1551. __IM uint32_t RESERVED4[125];
  1552. __IOM uint32_t ENABLE; /*!< (@ 0x00000500) PWM module enable register */
  1553. __IOM uint32_t MODE; /*!< (@ 0x00000504) Selects operating mode of the wave counter */
  1554. __IOM uint32_t COUNTERTOP; /*!< (@ 0x00000508) Value up to which the pulse generator counter
  1555. counts */
  1556. __IOM uint32_t PRESCALER; /*!< (@ 0x0000050C) Configuration for PWM_CLK */
  1557. __IOM uint32_t DECODER; /*!< (@ 0x00000510) Configuration of the decoder */
  1558. __IOM uint32_t LOOP; /*!< (@ 0x00000514) Number of playbacks of a loop */
  1559. __IM uint32_t RESERVED5[2];
  1560. __IOM PWM_SEQ_Type SEQ[2]; /*!< (@ 0x00000520) Unspecified */
  1561. __IOM PWM_PSEL_Type PSEL; /*!< (@ 0x00000560) Unspecified */
  1562. } NRF_PWM_Type; /*!< Size = 1392 (0x570) */
  1563. /* =========================================================================================================================== */
  1564. /* ================ PDM ================ */
  1565. /* =========================================================================================================================== */
  1566. /**
  1567. * @brief Pulse Density Modulation (Digital Microphone) Interface (PDM)
  1568. */
  1569. typedef struct { /*!< (@ 0x4001D000) PDM Structure */
  1570. __OM uint32_t TASKS_START; /*!< (@ 0x00000000) Starts continuous PDM transfer */
  1571. __OM uint32_t TASKS_STOP; /*!< (@ 0x00000004) Stops PDM transfer */
  1572. __IM uint32_t RESERVED[62];
  1573. __IOM uint32_t EVENTS_STARTED; /*!< (@ 0x00000100) PDM transfer has started */
  1574. __IOM uint32_t EVENTS_STOPPED; /*!< (@ 0x00000104) PDM transfer has finished */
  1575. __IOM uint32_t EVENTS_END; /*!< (@ 0x00000108) The PDM has written the last sample specified
  1576. by SAMPLE.MAXCNT (or the last sample after
  1577. a STOP task has been received) to Data RAM */
  1578. __IM uint32_t RESERVED1[125];
  1579. __IOM uint32_t INTEN; /*!< (@ 0x00000300) Enable or disable interrupt */
  1580. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  1581. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  1582. __IM uint32_t RESERVED2[125];
  1583. __IOM uint32_t ENABLE; /*!< (@ 0x00000500) PDM module enable register */
  1584. __IOM uint32_t PDMCLKCTRL; /*!< (@ 0x00000504) PDM clock generator control */
  1585. __IOM uint32_t MODE; /*!< (@ 0x00000508) Defines the routing of the connected PDM microphones'
  1586. signals */
  1587. __IM uint32_t RESERVED3[3];
  1588. __IOM uint32_t GAINL; /*!< (@ 0x00000518) Left output gain adjustment */
  1589. __IOM uint32_t GAINR; /*!< (@ 0x0000051C) Right output gain adjustment */
  1590. __IM uint32_t RESERVED4[8];
  1591. __IOM PDM_PSEL_Type PSEL; /*!< (@ 0x00000540) Unspecified */
  1592. __IM uint32_t RESERVED5[6];
  1593. __IOM PDM_SAMPLE_Type SAMPLE; /*!< (@ 0x00000560) Unspecified */
  1594. } NRF_PDM_Type; /*!< Size = 1384 (0x568) */
  1595. /* =========================================================================================================================== */
  1596. /* ================ NVMC ================ */
  1597. /* =========================================================================================================================== */
  1598. /**
  1599. * @brief Non-volatile memory controller (NVMC)
  1600. */
  1601. typedef struct { /*!< (@ 0x4001E000) NVMC Structure */
  1602. __IM uint32_t RESERVED[256];
  1603. __IM uint32_t READY; /*!< (@ 0x00000400) Ready flag */
  1604. __IM uint32_t RESERVED1[64];
  1605. __IOM uint32_t CONFIG; /*!< (@ 0x00000504) Configuration register */
  1606. union {
  1607. __IOM uint32_t ERASEPAGE; /*!< (@ 0x00000508) Register for erasing a page in code area */
  1608. __IOM uint32_t ERASEPCR1; /*!< (@ 0x00000508) Deprecated register - Register for erasing a
  1609. page in code area. Equivalent to ERASEPAGE. */
  1610. };
  1611. __IOM uint32_t ERASEALL; /*!< (@ 0x0000050C) Register for erasing all non-volatile user memory */
  1612. __IOM uint32_t ERASEPCR0; /*!< (@ 0x00000510) Deprecated register - Register for erasing a
  1613. page in code area. Equivalent to ERASEPAGE. */
  1614. __IOM uint32_t ERASEUICR; /*!< (@ 0x00000514) Register for erasing user information configuration
  1615. registers */
  1616. __IOM uint32_t ERASEPAGEPARTIAL; /*!< (@ 0x00000518) Register for partial erase of a page in code
  1617. area */
  1618. __IOM uint32_t ERASEPAGEPARTIALCFG; /*!< (@ 0x0000051C) Register for partial erase configuration */
  1619. } NRF_NVMC_Type; /*!< Size = 1312 (0x520) */
  1620. /* =========================================================================================================================== */
  1621. /* ================ PPI ================ */
  1622. /* =========================================================================================================================== */
  1623. /**
  1624. * @brief Programmable Peripheral Interconnect (PPI)
  1625. */
  1626. typedef struct { /*!< (@ 0x4001F000) PPI Structure */
  1627. __OM PPI_TASKS_CHG_Type TASKS_CHG[6]; /*!< (@ 0x00000000) Channel group tasks */
  1628. __IM uint32_t RESERVED[308];
  1629. __IOM uint32_t CHEN; /*!< (@ 0x00000500) Channel enable register */
  1630. __IOM uint32_t CHENSET; /*!< (@ 0x00000504) Channel enable set register */
  1631. __IOM uint32_t CHENCLR; /*!< (@ 0x00000508) Channel enable clear register */
  1632. __IM uint32_t RESERVED1;
  1633. __IOM PPI_CH_Type CH[20]; /*!< (@ 0x00000510) PPI Channel */
  1634. __IM uint32_t RESERVED2[148];
  1635. __IOM uint32_t CHG[6]; /*!< (@ 0x00000800) Description collection: Channel group n */
  1636. __IM uint32_t RESERVED3[62];
  1637. __IOM PPI_FORK_Type FORK[32]; /*!< (@ 0x00000910) Fork */
  1638. } NRF_PPI_Type; /*!< Size = 2448 (0x990) */
  1639. /** @} */ /* End of group Device_Peripheral_peripherals */
  1640. /* =========================================================================================================================== */
  1641. /* ================ Device Specific Peripheral Address Map ================ */
  1642. /* =========================================================================================================================== */
  1643. /** @addtogroup Device_Peripheral_peripheralAddr
  1644. * @{
  1645. */
  1646. #define NRF_FICR_BASE 0x10000000UL
  1647. #define NRF_UICR_BASE 0x10001000UL
  1648. #define NRF_BPROT_BASE 0x40000000UL
  1649. #define NRF_CLOCK_BASE 0x40000000UL
  1650. #define NRF_POWER_BASE 0x40000000UL
  1651. #define NRF_P0_BASE 0x50000000UL
  1652. #define NRF_RADIO_BASE 0x40001000UL
  1653. #define NRF_UART0_BASE 0x40002000UL
  1654. #define NRF_UARTE0_BASE 0x40002000UL
  1655. #define NRF_SPI1_BASE 0x40003000UL
  1656. #define NRF_SPIM1_BASE 0x40003000UL
  1657. #define NRF_SPIS1_BASE 0x40003000UL
  1658. #define NRF_TWI0_BASE 0x40003000UL
  1659. #define NRF_TWIM0_BASE 0x40003000UL
  1660. #define NRF_TWIS0_BASE 0x40003000UL
  1661. #define NRF_SPI0_BASE 0x40004000UL
  1662. #define NRF_SPIM0_BASE 0x40004000UL
  1663. #define NRF_SPIS0_BASE 0x40004000UL
  1664. #define NRF_GPIOTE_BASE 0x40006000UL
  1665. #define NRF_SAADC_BASE 0x40007000UL
  1666. #define NRF_TIMER0_BASE 0x40008000UL
  1667. #define NRF_TIMER1_BASE 0x40009000UL
  1668. #define NRF_TIMER2_BASE 0x4000A000UL
  1669. #define NRF_RTC0_BASE 0x4000B000UL
  1670. #define NRF_TEMP_BASE 0x4000C000UL
  1671. #define NRF_RNG_BASE 0x4000D000UL
  1672. #define NRF_ECB_BASE 0x4000E000UL
  1673. #define NRF_AAR_BASE 0x4000F000UL
  1674. #define NRF_CCM_BASE 0x4000F000UL
  1675. #define NRF_WDT_BASE 0x40010000UL
  1676. #define NRF_RTC1_BASE 0x40011000UL
  1677. #define NRF_QDEC_BASE 0x40012000UL
  1678. #define NRF_COMP_BASE 0x40013000UL
  1679. #define NRF_EGU0_BASE 0x40014000UL
  1680. #define NRF_SWI0_BASE 0x40014000UL
  1681. #define NRF_EGU1_BASE 0x40015000UL
  1682. #define NRF_SWI1_BASE 0x40015000UL
  1683. #define NRF_SWI2_BASE 0x40016000UL
  1684. #define NRF_SWI3_BASE 0x40017000UL
  1685. #define NRF_SWI4_BASE 0x40018000UL
  1686. #define NRF_SWI5_BASE 0x40019000UL
  1687. #define NRF_PWM0_BASE 0x4001C000UL
  1688. #define NRF_PDM_BASE 0x4001D000UL
  1689. #define NRF_NVMC_BASE 0x4001E000UL
  1690. #define NRF_PPI_BASE 0x4001F000UL
  1691. /** @} */ /* End of group Device_Peripheral_peripheralAddr */
  1692. /* =========================================================================================================================== */
  1693. /* ================ Peripheral declaration ================ */
  1694. /* =========================================================================================================================== */
  1695. /** @addtogroup Device_Peripheral_declaration
  1696. * @{
  1697. */
  1698. #define NRF_FICR ((NRF_FICR_Type*) NRF_FICR_BASE)
  1699. #define NRF_UICR ((NRF_UICR_Type*) NRF_UICR_BASE)
  1700. #define NRF_BPROT ((NRF_BPROT_Type*) NRF_BPROT_BASE)
  1701. #define NRF_CLOCK ((NRF_CLOCK_Type*) NRF_CLOCK_BASE)
  1702. #define NRF_POWER ((NRF_POWER_Type*) NRF_POWER_BASE)
  1703. #define NRF_P0 ((NRF_GPIO_Type*) NRF_P0_BASE)
  1704. #define NRF_RADIO ((NRF_RADIO_Type*) NRF_RADIO_BASE)
  1705. #define NRF_UART0 ((NRF_UART_Type*) NRF_UART0_BASE)
  1706. #define NRF_UARTE0 ((NRF_UARTE_Type*) NRF_UARTE0_BASE)
  1707. #define NRF_SPI1 ((NRF_SPI_Type*) NRF_SPI1_BASE)
  1708. #define NRF_SPIM1 ((NRF_SPIM_Type*) NRF_SPIM1_BASE)
  1709. #define NRF_SPIS1 ((NRF_SPIS_Type*) NRF_SPIS1_BASE)
  1710. #define NRF_TWI0 ((NRF_TWI_Type*) NRF_TWI0_BASE)
  1711. #define NRF_TWIM0 ((NRF_TWIM_Type*) NRF_TWIM0_BASE)
  1712. #define NRF_TWIS0 ((NRF_TWIS_Type*) NRF_TWIS0_BASE)
  1713. #define NRF_SPI0 ((NRF_SPI_Type*) NRF_SPI0_BASE)
  1714. #define NRF_SPIM0 ((NRF_SPIM_Type*) NRF_SPIM0_BASE)
  1715. #define NRF_SPIS0 ((NRF_SPIS_Type*) NRF_SPIS0_BASE)
  1716. #define NRF_GPIOTE ((NRF_GPIOTE_Type*) NRF_GPIOTE_BASE)
  1717. #define NRF_SAADC ((NRF_SAADC_Type*) NRF_SAADC_BASE)
  1718. #define NRF_TIMER0 ((NRF_TIMER_Type*) NRF_TIMER0_BASE)
  1719. #define NRF_TIMER1 ((NRF_TIMER_Type*) NRF_TIMER1_BASE)
  1720. #define NRF_TIMER2 ((NRF_TIMER_Type*) NRF_TIMER2_BASE)
  1721. #define NRF_RTC0 ((NRF_RTC_Type*) NRF_RTC0_BASE)
  1722. #define NRF_TEMP ((NRF_TEMP_Type*) NRF_TEMP_BASE)
  1723. #define NRF_RNG ((NRF_RNG_Type*) NRF_RNG_BASE)
  1724. #define NRF_ECB ((NRF_ECB_Type*) NRF_ECB_BASE)
  1725. #define NRF_AAR ((NRF_AAR_Type*) NRF_AAR_BASE)
  1726. #define NRF_CCM ((NRF_CCM_Type*) NRF_CCM_BASE)
  1727. #define NRF_WDT ((NRF_WDT_Type*) NRF_WDT_BASE)
  1728. #define NRF_RTC1 ((NRF_RTC_Type*) NRF_RTC1_BASE)
  1729. #define NRF_QDEC ((NRF_QDEC_Type*) NRF_QDEC_BASE)
  1730. #define NRF_COMP ((NRF_COMP_Type*) NRF_COMP_BASE)
  1731. #define NRF_EGU0 ((NRF_EGU_Type*) NRF_EGU0_BASE)
  1732. #define NRF_SWI0 ((NRF_SWI_Type*) NRF_SWI0_BASE)
  1733. #define NRF_EGU1 ((NRF_EGU_Type*) NRF_EGU1_BASE)
  1734. #define NRF_SWI1 ((NRF_SWI_Type*) NRF_SWI1_BASE)
  1735. #define NRF_SWI2 ((NRF_SWI_Type*) NRF_SWI2_BASE)
  1736. #define NRF_SWI3 ((NRF_SWI_Type*) NRF_SWI3_BASE)
  1737. #define NRF_SWI4 ((NRF_SWI_Type*) NRF_SWI4_BASE)
  1738. #define NRF_SWI5 ((NRF_SWI_Type*) NRF_SWI5_BASE)
  1739. #define NRF_PWM0 ((NRF_PWM_Type*) NRF_PWM0_BASE)
  1740. #define NRF_PDM ((NRF_PDM_Type*) NRF_PDM_BASE)
  1741. #define NRF_NVMC ((NRF_NVMC_Type*) NRF_NVMC_BASE)
  1742. #define NRF_PPI ((NRF_PPI_Type*) NRF_PPI_BASE)
  1743. /** @} */ /* End of group Device_Peripheral_declaration */
  1744. /* ========================================= End of section using anonymous unions ========================================= */
  1745. #if defined (__CC_ARM)
  1746. #pragma pop
  1747. #elif defined (__ICCARM__)
  1748. /* leave anonymous unions enabled */
  1749. #elif defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
  1750. #pragma clang diagnostic pop
  1751. #elif defined (__GNUC__)
  1752. /* anonymous unions are enabled by default */
  1753. #elif defined (__TMS470__)
  1754. /* anonymous unions are enabled by default */
  1755. #elif defined (__TASKING__)
  1756. #pragma warning restore
  1757. #elif defined (__CSMC__)
  1758. /* anonymous unions are enabled by default */
  1759. #endif
  1760. #ifdef __cplusplus
  1761. }
  1762. #endif
  1763. #endif /* NRF52811_H */
  1764. /** @} */ /* End of group nrf52811 */
  1765. /** @} */ /* End of group Nordic Semiconductor */