nrf52805.h 134 KB

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