nrf52.h 182 KB

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