nrf52.h 155 KB

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