nrf52840.h 223 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935
  1. /*
  2. * Copyright (c) 2010 - 2018, Nordic Semiconductor ASA
  3. *
  4. * All rights reserved.
  5. *
  6. * Redistribution and use in source and binary forms, with or without modification,
  7. * are permitted provided that the following conditions are met:
  8. *
  9. * 1. Redistributions of source code must retain the above copyright notice, this
  10. * list of conditions and the following disclaimer.
  11. *
  12. * 2. Redistributions in binary form, except as embedded into a Nordic
  13. * Semiconductor ASA integrated circuit in a product or a software update for
  14. * such product, must reproduce the above copyright notice, this list of
  15. * conditions and the following disclaimer in the documentation and/or other
  16. * materials provided with the distribution.
  17. *
  18. * 3. Neither the name of Nordic Semiconductor ASA nor the names of its
  19. * contributors may be used to endorse or promote products derived from this
  20. * software without specific prior written permission.
  21. *
  22. * 4. This software, with or without modification, must only be used with a
  23. * Nordic Semiconductor ASA integrated circuit.
  24. *
  25. * 5. Any software provided in binary form under this license must not be reverse
  26. * engineered, decompiled, modified and/or disassembled.
  27. *
  28. * THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS
  29. * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  30. * OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE
  31. * DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE
  32. * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  33. * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
  34. * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  35. * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  36. * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  37. * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  38. *
  39. * @file nrf52840.h
  40. * @brief CMSIS HeaderFile
  41. * @version 1
  42. * @date 08. February 2019
  43. * @note Generated by SVDConv V3.3.18 on Friday, 08.02.2019 16:48:12
  44. * from File 'nrf52840.svd',
  45. * last modified on Friday, 08.02.2019 15:48:07
  46. */
  47. /** @addtogroup Nordic Semiconductor
  48. * @{
  49. */
  50. /** @addtogroup nrf52840
  51. * @{
  52. */
  53. #ifndef NRF52840_H
  54. #define NRF52840_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. /* ========================================== nrf52840 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. USBD_IRQn = 39, /*!< 39 USBD */
  117. UARTE1_IRQn = 40, /*!< 40 UARTE1 */
  118. QSPI_IRQn = 41, /*!< 41 QSPI */
  119. CRYPTOCELL_IRQn = 42, /*!< 42 CRYPTOCELL */
  120. PWM3_IRQn = 45, /*!< 45 PWM3 */
  121. SPIM3_IRQn = 47 /*!< 47 SPIM3 */
  122. } IRQn_Type;
  123. /* =========================================================================================================================== */
  124. /* ================ Processor and Core Peripheral Section ================ */
  125. /* =========================================================================================================================== */
  126. /* =========================== Configuration of the ARM Cortex-M4 Processor and Core Peripherals =========================== */
  127. #define __CM4_REV 0x0001U /*!< CM4 Core Revision */
  128. #define __DSP_PRESENT 0 /*!< DSP present or not */
  129. #define __VTOR_PRESENT 1 /*!< Set to 1 if CPU supports Vector Table Offset Register */
  130. #define __NVIC_PRIO_BITS 3 /*!< Number of Bits used for Priority Levels */
  131. #define __Vendor_SysTickConfig 0 /*!< Set to 1 if different SysTick Config is used */
  132. #define __MPU_PRESENT 1 /*!< MPU present or not */
  133. #define __FPU_PRESENT 1 /*!< FPU present or not */
  134. /** @} */ /* End of group Configuration_of_CMSIS */
  135. #include "core_cm4.h" /*!< ARM Cortex-M4 processor and core peripherals */
  136. #include "system_nrf52840.h" /*!< nrf52840 System */
  137. #ifndef __IM /*!< Fallback for older CMSIS versions */
  138. #define __IM __I
  139. #endif
  140. #ifndef __OM /*!< Fallback for older CMSIS versions */
  141. #define __OM __O
  142. #endif
  143. #ifndef __IOM /*!< Fallback for older CMSIS versions */
  144. #define __IOM __IO
  145. #endif
  146. /* ======================================== Start of section using anonymous unions ======================================== */
  147. #if defined (__CC_ARM)
  148. #pragma push
  149. #pragma anon_unions
  150. #elif defined (__ICCARM__)
  151. #pragma language=extended
  152. #elif defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
  153. #pragma clang diagnostic push
  154. #pragma clang diagnostic ignored "-Wc11-extensions"
  155. #pragma clang diagnostic ignored "-Wreserved-id-macro"
  156. #pragma clang diagnostic ignored "-Wgnu-anonymous-struct"
  157. #pragma clang diagnostic ignored "-Wnested-anon-types"
  158. #elif defined (__GNUC__)
  159. /* anonymous unions are enabled by default */
  160. #elif defined (__TMS470__)
  161. /* anonymous unions are enabled by default */
  162. #elif defined (__TASKING__)
  163. #pragma warning 586
  164. #elif defined (__CSMC__)
  165. /* anonymous unions are enabled by default */
  166. #else
  167. #warning Not supported compiler type
  168. #endif
  169. /* =========================================================================================================================== */
  170. /* ================ Device Specific Cluster Section ================ */
  171. /* =========================================================================================================================== */
  172. /** @addtogroup Device_Peripheral_clusters
  173. * @{
  174. */
  175. /**
  176. * @brief FICR_INFO [INFO] (Device info)
  177. */
  178. typedef struct {
  179. __IM uint32_t PART; /*!< (@ 0x00000000) Part code */
  180. __IM uint32_t VARIANT; /*!< (@ 0x00000004) Build code (hardware version and production configuration) */
  181. __IM uint32_t PACKAGE; /*!< (@ 0x00000008) Package option */
  182. __IM uint32_t RAM; /*!< (@ 0x0000000C) RAM variant */
  183. __IM uint32_t FLASH; /*!< (@ 0x00000010) Flash variant */
  184. } FICR_INFO_Type; /*!< Size = 20 (0x14) */
  185. /**
  186. * @brief FICR_TEMP [TEMP] (Registers storing factory TEMP module linearization coefficients)
  187. */
  188. typedef struct {
  189. __IM uint32_t A0; /*!< (@ 0x00000000) Slope definition A0 */
  190. __IM uint32_t A1; /*!< (@ 0x00000004) Slope definition A1 */
  191. __IM uint32_t A2; /*!< (@ 0x00000008) Slope definition A2 */
  192. __IM uint32_t A3; /*!< (@ 0x0000000C) Slope definition A3 */
  193. __IM uint32_t A4; /*!< (@ 0x00000010) Slope definition A4 */
  194. __IM uint32_t A5; /*!< (@ 0x00000014) Slope definition A5 */
  195. __IM uint32_t B0; /*!< (@ 0x00000018) Y-intercept B0 */
  196. __IM uint32_t B1; /*!< (@ 0x0000001C) Y-intercept B1 */
  197. __IM uint32_t B2; /*!< (@ 0x00000020) Y-intercept B2 */
  198. __IM uint32_t B3; /*!< (@ 0x00000024) Y-intercept B3 */
  199. __IM uint32_t B4; /*!< (@ 0x00000028) Y-intercept B4 */
  200. __IM uint32_t B5; /*!< (@ 0x0000002C) Y-intercept B5 */
  201. __IM uint32_t T0; /*!< (@ 0x00000030) Segment end T0 */
  202. __IM uint32_t T1; /*!< (@ 0x00000034) Segment end T1 */
  203. __IM uint32_t T2; /*!< (@ 0x00000038) Segment end T2 */
  204. __IM uint32_t T3; /*!< (@ 0x0000003C) Segment end T3 */
  205. __IM uint32_t T4; /*!< (@ 0x00000040) Segment end T4 */
  206. } FICR_TEMP_Type; /*!< Size = 68 (0x44) */
  207. /**
  208. * @brief FICR_NFC [NFC] (Unspecified)
  209. */
  210. typedef struct {
  211. __IM uint32_t TAGHEADER0; /*!< (@ 0x00000000) Default header for NFC tag. Software can read
  212. these values to populate NFCID1_3RD_LAST,
  213. NFCID1_2ND_LAST and NFCID1_LAST. */
  214. __IM uint32_t TAGHEADER1; /*!< (@ 0x00000004) Default header for NFC tag. Software can read
  215. these values to populate NFCID1_3RD_LAST,
  216. NFCID1_2ND_LAST and NFCID1_LAST. */
  217. __IM uint32_t TAGHEADER2; /*!< (@ 0x00000008) Default header for NFC tag. Software can read
  218. these values to populate NFCID1_3RD_LAST,
  219. NFCID1_2ND_LAST and NFCID1_LAST. */
  220. __IM uint32_t TAGHEADER3; /*!< (@ 0x0000000C) Default header for NFC tag. Software can read
  221. these values to populate NFCID1_3RD_LAST,
  222. NFCID1_2ND_LAST and NFCID1_LAST. */
  223. } FICR_NFC_Type; /*!< Size = 16 (0x10) */
  224. /**
  225. * @brief FICR_TRNG90B [TRNG90B] (NIST800-90B RNG calibration data)
  226. */
  227. typedef struct {
  228. __IM uint32_t BYTES; /*!< (@ 0x00000000) Amount of bytes for the required entropy bits */
  229. __IM uint32_t RCCUTOFF; /*!< (@ 0x00000004) Repetition counter cutoff */
  230. __IM uint32_t APCUTOFF; /*!< (@ 0x00000008) Adaptive proportion cutoff */
  231. __IM uint32_t STARTUP; /*!< (@ 0x0000000C) Amount of bytes for the startup tests */
  232. __IM uint32_t ROSC1; /*!< (@ 0x00000010) Sample count for ring oscillator 1 */
  233. __IM uint32_t ROSC2; /*!< (@ 0x00000014) Sample count for ring oscillator 2 */
  234. __IM uint32_t ROSC3; /*!< (@ 0x00000018) Sample count for ring oscillator 3 */
  235. __IM uint32_t ROSC4; /*!< (@ 0x0000001C) Sample count for ring oscillator 4 */
  236. } FICR_TRNG90B_Type; /*!< Size = 32 (0x20) */
  237. /**
  238. * @brief POWER_RAM [RAM] (Unspecified)
  239. */
  240. typedef struct {
  241. __IOM uint32_t POWER; /*!< (@ 0x00000000) Description cluster: RAMn power control register */
  242. __OM uint32_t POWERSET; /*!< (@ 0x00000004) Description cluster: RAMn power control set register */
  243. __OM uint32_t POWERCLR; /*!< (@ 0x00000008) Description cluster: RAMn power control clear
  244. register */
  245. __IM uint32_t RESERVED;
  246. } POWER_RAM_Type; /*!< Size = 16 (0x10) */
  247. /**
  248. * @brief UART_PSEL [PSEL] (Unspecified)
  249. */
  250. typedef struct {
  251. __IOM uint32_t RTS; /*!< (@ 0x00000000) Pin select for RTS */
  252. __IOM uint32_t TXD; /*!< (@ 0x00000004) Pin select for TXD */
  253. __IOM uint32_t CTS; /*!< (@ 0x00000008) Pin select for CTS */
  254. __IOM uint32_t RXD; /*!< (@ 0x0000000C) Pin select for RXD */
  255. } UART_PSEL_Type; /*!< Size = 16 (0x10) */
  256. /**
  257. * @brief UARTE_PSEL [PSEL] (Unspecified)
  258. */
  259. typedef struct {
  260. __IOM uint32_t RTS; /*!< (@ 0x00000000) Pin select for RTS signal */
  261. __IOM uint32_t TXD; /*!< (@ 0x00000004) Pin select for TXD signal */
  262. __IOM uint32_t CTS; /*!< (@ 0x00000008) Pin select for CTS signal */
  263. __IOM uint32_t RXD; /*!< (@ 0x0000000C) Pin select for RXD signal */
  264. } UARTE_PSEL_Type; /*!< Size = 16 (0x10) */
  265. /**
  266. * @brief UARTE_RXD [RXD] (RXD EasyDMA channel)
  267. */
  268. typedef struct {
  269. __IOM uint32_t PTR; /*!< (@ 0x00000000) Data pointer */
  270. __IOM uint32_t MAXCNT; /*!< (@ 0x00000004) Maximum number of bytes in receive buffer */
  271. __IM uint32_t AMOUNT; /*!< (@ 0x00000008) Number of bytes transferred in the last transaction */
  272. } UARTE_RXD_Type; /*!< Size = 12 (0xc) */
  273. /**
  274. * @brief UARTE_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. } UARTE_TXD_Type; /*!< Size = 12 (0xc) */
  281. /**
  282. * @brief SPI_PSEL [PSEL] (Unspecified)
  283. */
  284. typedef struct {
  285. __IOM uint32_t SCK; /*!< (@ 0x00000000) Pin select for SCK */
  286. __IOM uint32_t MOSI; /*!< (@ 0x00000004) Pin select for MOSI signal */
  287. __IOM uint32_t MISO; /*!< (@ 0x00000008) Pin select for MISO signal */
  288. } SPI_PSEL_Type; /*!< Size = 12 (0xc) */
  289. /**
  290. * @brief SPIM_PSEL [PSEL] (Unspecified)
  291. */
  292. typedef struct {
  293. __IOM uint32_t SCK; /*!< (@ 0x00000000) Pin select for SCK */
  294. __IOM uint32_t MOSI; /*!< (@ 0x00000004) Pin select for MOSI signal */
  295. __IOM uint32_t MISO; /*!< (@ 0x00000008) Pin select for MISO signal */
  296. __IOM uint32_t CSN; /*!< (@ 0x0000000C) Pin select for CSN */
  297. } SPIM_PSEL_Type; /*!< Size = 16 (0x10) */
  298. /**
  299. * @brief SPIM_RXD [RXD] (RXD EasyDMA channel)
  300. */
  301. typedef struct {
  302. __IOM uint32_t PTR; /*!< (@ 0x00000000) Data pointer */
  303. __IOM uint32_t MAXCNT; /*!< (@ 0x00000004) Maximum number of bytes in receive buffer */
  304. __IM uint32_t AMOUNT; /*!< (@ 0x00000008) Number of bytes transferred in the last transaction */
  305. __IOM uint32_t LIST; /*!< (@ 0x0000000C) EasyDMA list type */
  306. } SPIM_RXD_Type; /*!< Size = 16 (0x10) */
  307. /**
  308. * @brief SPIM_TXD [TXD] (TXD EasyDMA channel)
  309. */
  310. typedef struct {
  311. __IOM uint32_t PTR; /*!< (@ 0x00000000) Data pointer */
  312. __IOM uint32_t MAXCNT; /*!< (@ 0x00000004) Number of bytes in transmit buffer */
  313. __IM uint32_t AMOUNT; /*!< (@ 0x00000008) Number of bytes transferred in the last transaction */
  314. __IOM uint32_t LIST; /*!< (@ 0x0000000C) EasyDMA list type */
  315. } SPIM_TXD_Type; /*!< Size = 16 (0x10) */
  316. /**
  317. * @brief SPIM_IFTIMING [IFTIMING] (Unspecified)
  318. */
  319. typedef struct {
  320. __IOM uint32_t RXDELAY; /*!< (@ 0x00000000) Sample delay for input serial data on MISO */
  321. __IOM uint32_t CSNDUR; /*!< (@ 0x00000004) Minimum duration between edge of CSN and edge
  322. of SCK and minimum duration CSN must stay
  323. high between transactions */
  324. } SPIM_IFTIMING_Type; /*!< Size = 8 (0x8) */
  325. /**
  326. * @brief SPIS_PSEL [PSEL] (Unspecified)
  327. */
  328. typedef struct {
  329. __IOM uint32_t SCK; /*!< (@ 0x00000000) Pin select for SCK */
  330. __IOM uint32_t MISO; /*!< (@ 0x00000004) Pin select for MISO signal */
  331. __IOM uint32_t MOSI; /*!< (@ 0x00000008) Pin select for MOSI signal */
  332. __IOM uint32_t CSN; /*!< (@ 0x0000000C) Pin select for CSN signal */
  333. } SPIS_PSEL_Type; /*!< Size = 16 (0x10) */
  334. /**
  335. * @brief SPIS_RXD [RXD] (Unspecified)
  336. */
  337. typedef struct {
  338. __IOM uint32_t PTR; /*!< (@ 0x00000000) RXD data pointer */
  339. __IOM uint32_t MAXCNT; /*!< (@ 0x00000004) Maximum number of bytes in receive buffer */
  340. __IM uint32_t AMOUNT; /*!< (@ 0x00000008) Number of bytes received in last granted transaction */
  341. __IOM uint32_t LIST; /*!< (@ 0x0000000C) EasyDMA list type */
  342. } SPIS_RXD_Type; /*!< Size = 16 (0x10) */
  343. /**
  344. * @brief SPIS_TXD [TXD] (Unspecified)
  345. */
  346. typedef struct {
  347. __IOM uint32_t PTR; /*!< (@ 0x00000000) TXD data pointer */
  348. __IOM uint32_t MAXCNT; /*!< (@ 0x00000004) Maximum number of bytes in transmit buffer */
  349. __IM uint32_t AMOUNT; /*!< (@ 0x00000008) Number of bytes transmitted in last granted transaction */
  350. __IOM uint32_t LIST; /*!< (@ 0x0000000C) EasyDMA list type */
  351. } SPIS_TXD_Type; /*!< Size = 16 (0x10) */
  352. /**
  353. * @brief TWI_PSEL [PSEL] (Unspecified)
  354. */
  355. typedef struct {
  356. __IOM uint32_t SCL; /*!< (@ 0x00000000) Pin select for SCL */
  357. __IOM uint32_t SDA; /*!< (@ 0x00000004) Pin select for SDA */
  358. } TWI_PSEL_Type; /*!< Size = 8 (0x8) */
  359. /**
  360. * @brief TWIM_PSEL [PSEL] (Unspecified)
  361. */
  362. typedef struct {
  363. __IOM uint32_t SCL; /*!< (@ 0x00000000) Pin select for SCL signal */
  364. __IOM uint32_t SDA; /*!< (@ 0x00000004) Pin select for SDA signal */
  365. } TWIM_PSEL_Type; /*!< Size = 8 (0x8) */
  366. /**
  367. * @brief TWIM_RXD [RXD] (RXD EasyDMA channel)
  368. */
  369. typedef struct {
  370. __IOM uint32_t PTR; /*!< (@ 0x00000000) Data pointer */
  371. __IOM uint32_t MAXCNT; /*!< (@ 0x00000004) Maximum number of bytes in receive buffer */
  372. __IM uint32_t AMOUNT; /*!< (@ 0x00000008) Number of bytes transferred in the last transaction */
  373. __IOM uint32_t LIST; /*!< (@ 0x0000000C) EasyDMA list type */
  374. } TWIM_RXD_Type; /*!< Size = 16 (0x10) */
  375. /**
  376. * @brief TWIM_TXD [TXD] (TXD EasyDMA channel)
  377. */
  378. typedef struct {
  379. __IOM uint32_t PTR; /*!< (@ 0x00000000) Data pointer */
  380. __IOM uint32_t MAXCNT; /*!< (@ 0x00000004) Maximum number of bytes in transmit buffer */
  381. __IM uint32_t AMOUNT; /*!< (@ 0x00000008) Number of bytes transferred in the last transaction */
  382. __IOM uint32_t LIST; /*!< (@ 0x0000000C) EasyDMA list type */
  383. } TWIM_TXD_Type; /*!< Size = 16 (0x10) */
  384. /**
  385. * @brief TWIS_PSEL [PSEL] (Unspecified)
  386. */
  387. typedef struct {
  388. __IOM uint32_t SCL; /*!< (@ 0x00000000) Pin select for SCL signal */
  389. __IOM uint32_t SDA; /*!< (@ 0x00000004) Pin select for SDA signal */
  390. } TWIS_PSEL_Type; /*!< Size = 8 (0x8) */
  391. /**
  392. * @brief TWIS_RXD [RXD] (RXD EasyDMA channel)
  393. */
  394. typedef struct {
  395. __IOM uint32_t PTR; /*!< (@ 0x00000000) RXD Data pointer */
  396. __IOM uint32_t MAXCNT; /*!< (@ 0x00000004) Maximum number of bytes in RXD buffer */
  397. __IM uint32_t AMOUNT; /*!< (@ 0x00000008) Number of bytes transferred in the last RXD transaction */
  398. __IOM uint32_t LIST; /*!< (@ 0x0000000C) EasyDMA list type */
  399. } TWIS_RXD_Type; /*!< Size = 16 (0x10) */
  400. /**
  401. * @brief TWIS_TXD [TXD] (TXD EasyDMA channel)
  402. */
  403. typedef struct {
  404. __IOM uint32_t PTR; /*!< (@ 0x00000000) TXD Data pointer */
  405. __IOM uint32_t MAXCNT; /*!< (@ 0x00000004) Maximum number of bytes in TXD buffer */
  406. __IM uint32_t AMOUNT; /*!< (@ 0x00000008) Number of bytes transferred in the last TXD transaction */
  407. __IOM uint32_t LIST; /*!< (@ 0x0000000C) EasyDMA list type */
  408. } TWIS_TXD_Type; /*!< Size = 16 (0x10) */
  409. /**
  410. * @brief NFCT_FRAMESTATUS [FRAMESTATUS] (Unspecified)
  411. */
  412. typedef struct {
  413. __IOM uint32_t RX; /*!< (@ 0x00000000) Result of last incoming frame */
  414. } NFCT_FRAMESTATUS_Type; /*!< Size = 4 (0x4) */
  415. /**
  416. * @brief NFCT_TXD [TXD] (Unspecified)
  417. */
  418. typedef struct {
  419. __IOM uint32_t FRAMECONFIG; /*!< (@ 0x00000000) Configuration of outgoing frames */
  420. __IOM uint32_t AMOUNT; /*!< (@ 0x00000004) Size of outgoing frame */
  421. } NFCT_TXD_Type; /*!< Size = 8 (0x8) */
  422. /**
  423. * @brief NFCT_RXD [RXD] (Unspecified)
  424. */
  425. typedef struct {
  426. __IOM uint32_t FRAMECONFIG; /*!< (@ 0x00000000) Configuration of incoming frames */
  427. __IM uint32_t AMOUNT; /*!< (@ 0x00000004) Size of last incoming frame */
  428. } NFCT_RXD_Type; /*!< Size = 8 (0x8) */
  429. /**
  430. * @brief SAADC_EVENTS_CH [EVENTS_CH] (Peripheral events.)
  431. */
  432. typedef struct {
  433. __IOM uint32_t LIMITH; /*!< (@ 0x00000000) Description cluster: Last result is equal or
  434. above CH[n].LIMIT.HIGH */
  435. __IOM uint32_t LIMITL; /*!< (@ 0x00000004) Description cluster: Last result is equal or
  436. below CH[n].LIMIT.LOW */
  437. } SAADC_EVENTS_CH_Type; /*!< Size = 8 (0x8) */
  438. /**
  439. * @brief SAADC_CH [CH] (Unspecified)
  440. */
  441. typedef struct {
  442. __IOM uint32_t PSELP; /*!< (@ 0x00000000) Description cluster: Input positive pin selection
  443. for CH[n] */
  444. __IOM uint32_t PSELN; /*!< (@ 0x00000004) Description cluster: Input negative pin selection
  445. for CH[n] */
  446. __IOM uint32_t CONFIG; /*!< (@ 0x00000008) Description cluster: Input configuration for
  447. CH[n] */
  448. __IOM uint32_t LIMIT; /*!< (@ 0x0000000C) Description cluster: High/low limits for event
  449. monitoring of a channel */
  450. } SAADC_CH_Type; /*!< Size = 16 (0x10) */
  451. /**
  452. * @brief SAADC_RESULT [RESULT] (RESULT EasyDMA channel)
  453. */
  454. typedef struct {
  455. __IOM uint32_t PTR; /*!< (@ 0x00000000) Data pointer */
  456. __IOM uint32_t MAXCNT; /*!< (@ 0x00000004) Maximum number of 16-bit samples to be written
  457. to output RAM buffer */
  458. __IM uint32_t AMOUNT; /*!< (@ 0x00000008) Number of 16-bit samples written to output RAM
  459. buffer since the previous START task */
  460. } SAADC_RESULT_Type; /*!< Size = 12 (0xc) */
  461. /**
  462. * @brief QDEC_PSEL [PSEL] (Unspecified)
  463. */
  464. typedef struct {
  465. __IOM uint32_t LED; /*!< (@ 0x00000000) Pin select for LED signal */
  466. __IOM uint32_t A; /*!< (@ 0x00000004) Pin select for A signal */
  467. __IOM uint32_t B; /*!< (@ 0x00000008) Pin select for B signal */
  468. } QDEC_PSEL_Type; /*!< Size = 12 (0xc) */
  469. /**
  470. * @brief PWM_SEQ [SEQ] (Unspecified)
  471. */
  472. typedef struct {
  473. __IOM uint32_t PTR; /*!< (@ 0x00000000) Description cluster: Beginning address in RAM
  474. of this sequence */
  475. __IOM uint32_t CNT; /*!< (@ 0x00000004) Description cluster: Number of values (duty cycles)
  476. in this sequence */
  477. __IOM uint32_t REFRESH; /*!< (@ 0x00000008) Description cluster: Number of additional PWM
  478. periods between samples loaded into compare
  479. register */
  480. __IOM uint32_t ENDDELAY; /*!< (@ 0x0000000C) Description cluster: Time added after the sequence */
  481. __IM uint32_t RESERVED[4];
  482. } PWM_SEQ_Type; /*!< Size = 32 (0x20) */
  483. /**
  484. * @brief PWM_PSEL [PSEL] (Unspecified)
  485. */
  486. typedef struct {
  487. __IOM uint32_t OUT[4]; /*!< (@ 0x00000000) Description collection: Output pin select for
  488. PWM channel n */
  489. } PWM_PSEL_Type; /*!< Size = 16 (0x10) */
  490. /**
  491. * @brief PDM_PSEL [PSEL] (Unspecified)
  492. */
  493. typedef struct {
  494. __IOM uint32_t CLK; /*!< (@ 0x00000000) Pin number configuration for PDM CLK signal */
  495. __IOM uint32_t DIN; /*!< (@ 0x00000004) Pin number configuration for PDM DIN signal */
  496. } PDM_PSEL_Type; /*!< Size = 8 (0x8) */
  497. /**
  498. * @brief PDM_SAMPLE [SAMPLE] (Unspecified)
  499. */
  500. typedef struct {
  501. __IOM uint32_t PTR; /*!< (@ 0x00000000) RAM address pointer to write samples to with
  502. EasyDMA */
  503. __IOM uint32_t MAXCNT; /*!< (@ 0x00000004) Number of samples to allocate memory for in EasyDMA
  504. mode */
  505. } PDM_SAMPLE_Type; /*!< Size = 8 (0x8) */
  506. /**
  507. * @brief ACL_ACL [ACL] (Unspecified)
  508. */
  509. typedef struct {
  510. __IOM uint32_t ADDR; /*!< (@ 0x00000000) Description cluster: Configure the word-aligned
  511. start address of region n to protect */
  512. __IOM uint32_t SIZE; /*!< (@ 0x00000004) Description cluster: Size of region to protect
  513. counting from address ACL[n].ADDR. Write
  514. '0' as no effect. */
  515. __IOM uint32_t PERM; /*!< (@ 0x00000008) Description cluster: Access permissions for region
  516. n as defined by start address ACL[n].ADDR
  517. and size ACL[n].SIZE */
  518. __IM uint32_t RESERVED;
  519. } ACL_ACL_Type; /*!< Size = 16 (0x10) */
  520. /**
  521. * @brief PPI_TASKS_CHG [TASKS_CHG] (Channel group tasks)
  522. */
  523. typedef struct {
  524. __OM uint32_t EN; /*!< (@ 0x00000000) Description cluster: Enable channel group n */
  525. __OM uint32_t DIS; /*!< (@ 0x00000004) Description cluster: Disable channel group n */
  526. } PPI_TASKS_CHG_Type; /*!< Size = 8 (0x8) */
  527. /**
  528. * @brief PPI_CH [CH] (PPI Channel)
  529. */
  530. typedef struct {
  531. __IOM uint32_t EEP; /*!< (@ 0x00000000) Description cluster: Channel n event end-point */
  532. __IOM uint32_t TEP; /*!< (@ 0x00000004) Description cluster: Channel n task end-point */
  533. } PPI_CH_Type; /*!< Size = 8 (0x8) */
  534. /**
  535. * @brief PPI_FORK [FORK] (Fork)
  536. */
  537. typedef struct {
  538. __IOM uint32_t TEP; /*!< (@ 0x00000000) Description cluster: Channel n task end-point */
  539. } PPI_FORK_Type; /*!< Size = 4 (0x4) */
  540. /**
  541. * @brief MWU_EVENTS_REGION [EVENTS_REGION] (Peripheral events.)
  542. */
  543. typedef struct {
  544. __IOM uint32_t WA; /*!< (@ 0x00000000) Description cluster: Write access to region n
  545. detected */
  546. __IOM uint32_t RA; /*!< (@ 0x00000004) Description cluster: Read access to region n
  547. detected */
  548. } MWU_EVENTS_REGION_Type; /*!< Size = 8 (0x8) */
  549. /**
  550. * @brief MWU_EVENTS_PREGION [EVENTS_PREGION] (Peripheral events.)
  551. */
  552. typedef struct {
  553. __IOM uint32_t WA; /*!< (@ 0x00000000) Description cluster: Write access to peripheral
  554. region n detected */
  555. __IOM uint32_t RA; /*!< (@ 0x00000004) Description cluster: Read access to peripheral
  556. region n detected */
  557. } MWU_EVENTS_PREGION_Type; /*!< Size = 8 (0x8) */
  558. /**
  559. * @brief MWU_PERREGION [PERREGION] (Unspecified)
  560. */
  561. typedef struct {
  562. __IOM uint32_t SUBSTATWA; /*!< (@ 0x00000000) Description cluster: Source of event/interrupt
  563. in region n, write access detected while
  564. corresponding subregion was enabled for
  565. watching */
  566. __IOM uint32_t SUBSTATRA; /*!< (@ 0x00000004) Description cluster: Source of event/interrupt
  567. in region n, read access detected while
  568. corresponding subregion was enabled for
  569. watching */
  570. } MWU_PERREGION_Type; /*!< Size = 8 (0x8) */
  571. /**
  572. * @brief MWU_REGION [REGION] (Unspecified)
  573. */
  574. typedef struct {
  575. __IOM uint32_t START; /*!< (@ 0x00000000) Description cluster: Start address for region
  576. n */
  577. __IOM uint32_t END; /*!< (@ 0x00000004) Description cluster: End address of region n */
  578. __IM uint32_t RESERVED[2];
  579. } MWU_REGION_Type; /*!< Size = 16 (0x10) */
  580. /**
  581. * @brief MWU_PREGION [PREGION] (Unspecified)
  582. */
  583. typedef struct {
  584. __IM uint32_t START; /*!< (@ 0x00000000) Description cluster: Reserved for future use */
  585. __IM uint32_t END; /*!< (@ 0x00000004) Description cluster: Reserved for future use */
  586. __IOM uint32_t SUBS; /*!< (@ 0x00000008) Description cluster: Subregions of region n */
  587. __IM uint32_t RESERVED;
  588. } MWU_PREGION_Type; /*!< Size = 16 (0x10) */
  589. /**
  590. * @brief I2S_CONFIG [CONFIG] (Unspecified)
  591. */
  592. typedef struct {
  593. __IOM uint32_t MODE; /*!< (@ 0x00000000) I2S mode. */
  594. __IOM uint32_t RXEN; /*!< (@ 0x00000004) Reception (RX) enable. */
  595. __IOM uint32_t TXEN; /*!< (@ 0x00000008) Transmission (TX) enable. */
  596. __IOM uint32_t MCKEN; /*!< (@ 0x0000000C) Master clock generator enable. */
  597. __IOM uint32_t MCKFREQ; /*!< (@ 0x00000010) Master clock generator frequency. */
  598. __IOM uint32_t RATIO; /*!< (@ 0x00000014) MCK / LRCK ratio. */
  599. __IOM uint32_t SWIDTH; /*!< (@ 0x00000018) Sample width. */
  600. __IOM uint32_t ALIGN; /*!< (@ 0x0000001C) Alignment of sample within a frame. */
  601. __IOM uint32_t FORMAT; /*!< (@ 0x00000020) Frame format. */
  602. __IOM uint32_t CHANNELS; /*!< (@ 0x00000024) Enable channels. */
  603. } I2S_CONFIG_Type; /*!< Size = 40 (0x28) */
  604. /**
  605. * @brief I2S_RXD [RXD] (Unspecified)
  606. */
  607. typedef struct {
  608. __IOM uint32_t PTR; /*!< (@ 0x00000000) Receive buffer RAM start address. */
  609. } I2S_RXD_Type; /*!< Size = 4 (0x4) */
  610. /**
  611. * @brief I2S_TXD [TXD] (Unspecified)
  612. */
  613. typedef struct {
  614. __IOM uint32_t PTR; /*!< (@ 0x00000000) Transmit buffer RAM start address. */
  615. } I2S_TXD_Type; /*!< Size = 4 (0x4) */
  616. /**
  617. * @brief I2S_RXTXD [RXTXD] (Unspecified)
  618. */
  619. typedef struct {
  620. __IOM uint32_t MAXCNT; /*!< (@ 0x00000000) Size of RXD and TXD buffers. */
  621. } I2S_RXTXD_Type; /*!< Size = 4 (0x4) */
  622. /**
  623. * @brief I2S_PSEL [PSEL] (Unspecified)
  624. */
  625. typedef struct {
  626. __IOM uint32_t MCK; /*!< (@ 0x00000000) Pin select for MCK signal. */
  627. __IOM uint32_t SCK; /*!< (@ 0x00000004) Pin select for SCK signal. */
  628. __IOM uint32_t LRCK; /*!< (@ 0x00000008) Pin select for LRCK signal. */
  629. __IOM uint32_t SDIN; /*!< (@ 0x0000000C) Pin select for SDIN signal. */
  630. __IOM uint32_t SDOUT; /*!< (@ 0x00000010) Pin select for SDOUT signal. */
  631. } I2S_PSEL_Type; /*!< Size = 20 (0x14) */
  632. /**
  633. * @brief USBD_HALTED [HALTED] (Unspecified)
  634. */
  635. typedef struct {
  636. __IM uint32_t EPIN[8]; /*!< (@ 0x00000000) Description collection: IN endpoint halted status.
  637. Can be used as is as response to a GetStatus()
  638. request to endpoint. */
  639. __IM uint32_t RESERVED;
  640. __IM uint32_t EPOUT[8]; /*!< (@ 0x00000024) Description collection: OUT endpoint halted status.
  641. Can be used as is as response to a GetStatus()
  642. request to endpoint. */
  643. } USBD_HALTED_Type; /*!< Size = 68 (0x44) */
  644. /**
  645. * @brief USBD_SIZE [SIZE] (Unspecified)
  646. */
  647. typedef struct {
  648. __IOM uint32_t EPOUT[8]; /*!< (@ 0x00000000) Description collection: Number of bytes received
  649. last in the data stage of this OUT endpoint */
  650. __IM uint32_t ISOOUT; /*!< (@ 0x00000020) Number of bytes received last on this ISO OUT
  651. data endpoint */
  652. } USBD_SIZE_Type; /*!< Size = 36 (0x24) */
  653. /**
  654. * @brief USBD_EPIN [EPIN] (Unspecified)
  655. */
  656. typedef struct {
  657. __IOM uint32_t PTR; /*!< (@ 0x00000000) Description cluster: Data pointer */
  658. __IOM uint32_t MAXCNT; /*!< (@ 0x00000004) Description cluster: Maximum number of bytes
  659. to transfer */
  660. __IM uint32_t AMOUNT; /*!< (@ 0x00000008) Description cluster: Number of bytes transferred
  661. in the last transaction */
  662. __IM uint32_t RESERVED[2];
  663. } USBD_EPIN_Type; /*!< Size = 20 (0x14) */
  664. /**
  665. * @brief USBD_ISOIN [ISOIN] (Unspecified)
  666. */
  667. typedef struct {
  668. __IOM uint32_t PTR; /*!< (@ 0x00000000) Data pointer */
  669. __IOM uint32_t MAXCNT; /*!< (@ 0x00000004) Maximum number of bytes to transfer */
  670. __IM uint32_t AMOUNT; /*!< (@ 0x00000008) Number of bytes transferred in the last transaction */
  671. } USBD_ISOIN_Type; /*!< Size = 12 (0xc) */
  672. /**
  673. * @brief USBD_EPOUT [EPOUT] (Unspecified)
  674. */
  675. typedef struct {
  676. __IOM uint32_t PTR; /*!< (@ 0x00000000) Description cluster: Data pointer */
  677. __IOM uint32_t MAXCNT; /*!< (@ 0x00000004) Description cluster: Maximum number of bytes
  678. to transfer */
  679. __IM uint32_t AMOUNT; /*!< (@ 0x00000008) Description cluster: Number of bytes transferred
  680. in the last transaction */
  681. __IM uint32_t RESERVED[2];
  682. } USBD_EPOUT_Type; /*!< Size = 20 (0x14) */
  683. /**
  684. * @brief USBD_ISOOUT [ISOOUT] (Unspecified)
  685. */
  686. typedef struct {
  687. __IOM uint32_t PTR; /*!< (@ 0x00000000) Data pointer */
  688. __IOM uint32_t MAXCNT; /*!< (@ 0x00000004) Maximum number of bytes to transfer */
  689. __IM uint32_t AMOUNT; /*!< (@ 0x00000008) Number of bytes transferred in the last transaction */
  690. } USBD_ISOOUT_Type; /*!< Size = 12 (0xc) */
  691. /**
  692. * @brief QSPI_READ [READ] (Unspecified)
  693. */
  694. typedef struct {
  695. __IOM uint32_t SRC; /*!< (@ 0x00000000) Flash memory source address */
  696. __IOM uint32_t DST; /*!< (@ 0x00000004) RAM destination address */
  697. __IOM uint32_t CNT; /*!< (@ 0x00000008) Read transfer length */
  698. } QSPI_READ_Type; /*!< Size = 12 (0xc) */
  699. /**
  700. * @brief QSPI_WRITE [WRITE] (Unspecified)
  701. */
  702. typedef struct {
  703. __IOM uint32_t DST; /*!< (@ 0x00000000) Flash destination address */
  704. __IOM uint32_t SRC; /*!< (@ 0x00000004) RAM source address */
  705. __IOM uint32_t CNT; /*!< (@ 0x00000008) Write transfer length */
  706. } QSPI_WRITE_Type; /*!< Size = 12 (0xc) */
  707. /**
  708. * @brief QSPI_ERASE [ERASE] (Unspecified)
  709. */
  710. typedef struct {
  711. __IOM uint32_t PTR; /*!< (@ 0x00000000) Start address of flash block to be erased */
  712. __IOM uint32_t LEN; /*!< (@ 0x00000004) Size of block to be erased. */
  713. } QSPI_ERASE_Type; /*!< Size = 8 (0x8) */
  714. /**
  715. * @brief QSPI_PSEL [PSEL] (Unspecified)
  716. */
  717. typedef struct {
  718. __IOM uint32_t SCK; /*!< (@ 0x00000000) Pin select for serial clock SCK */
  719. __IOM uint32_t CSN; /*!< (@ 0x00000004) Pin select for chip select signal CSN. */
  720. __IM uint32_t RESERVED;
  721. __IOM uint32_t IO0; /*!< (@ 0x0000000C) Pin select for serial data MOSI/IO0. */
  722. __IOM uint32_t IO1; /*!< (@ 0x00000010) Pin select for serial data MISO/IO1. */
  723. __IOM uint32_t IO2; /*!< (@ 0x00000014) Pin select for serial data IO2. */
  724. __IOM uint32_t IO3; /*!< (@ 0x00000018) Pin select for serial data IO3. */
  725. } QSPI_PSEL_Type; /*!< Size = 28 (0x1c) */
  726. /** @} */ /* End of group Device_Peripheral_clusters */
  727. /* =========================================================================================================================== */
  728. /* ================ Device Specific Peripheral Section ================ */
  729. /* =========================================================================================================================== */
  730. /** @addtogroup Device_Peripheral_peripherals
  731. * @{
  732. */
  733. /* =========================================================================================================================== */
  734. /* ================ FICR ================ */
  735. /* =========================================================================================================================== */
  736. /**
  737. * @brief Factory information configuration registers (FICR)
  738. */
  739. typedef struct { /*!< (@ 0x10000000) FICR Structure */
  740. __IM uint32_t RESERVED[4];
  741. __IM uint32_t CODEPAGESIZE; /*!< (@ 0x00000010) Code memory page size */
  742. __IM uint32_t CODESIZE; /*!< (@ 0x00000014) Code memory size */
  743. __IM uint32_t RESERVED1[18];
  744. __IM uint32_t DEVICEID[2]; /*!< (@ 0x00000060) Description collection: Device identifier */
  745. __IM uint32_t RESERVED2[6];
  746. __IM uint32_t ER[4]; /*!< (@ 0x00000080) Description collection: Encryption root, word
  747. n */
  748. __IM uint32_t IR[4]; /*!< (@ 0x00000090) Description collection: Identity Root, word n */
  749. __IM uint32_t DEVICEADDRTYPE; /*!< (@ 0x000000A0) Device address type */
  750. __IM uint32_t DEVICEADDR[2]; /*!< (@ 0x000000A4) Description collection: Device address n */
  751. __IM uint32_t RESERVED3[21];
  752. __IM FICR_INFO_Type INFO; /*!< (@ 0x00000100) Device info */
  753. __IM uint32_t RESERVED4[143];
  754. __IM uint32_t PRODTEST[3]; /*!< (@ 0x00000350) Description collection: Production test signature
  755. n */
  756. __IM uint32_t RESERVED5[42];
  757. __IM FICR_TEMP_Type TEMP; /*!< (@ 0x00000404) Registers storing factory TEMP module linearization
  758. coefficients */
  759. __IM uint32_t RESERVED6[2];
  760. __IOM FICR_NFC_Type NFC; /*!< (@ 0x00000450) Unspecified */
  761. __IM uint32_t RESERVED7[488];
  762. __IOM FICR_TRNG90B_Type TRNG90B; /*!< (@ 0x00000C00) NIST800-90B RNG calibration data */
  763. } NRF_FICR_Type; /*!< Size = 3104 (0xc20) */
  764. /* =========================================================================================================================== */
  765. /* ================ UICR ================ */
  766. /* =========================================================================================================================== */
  767. /**
  768. * @brief User information configuration registers (UICR)
  769. */
  770. typedef struct { /*!< (@ 0x10001000) UICR Structure */
  771. __IM uint32_t RESERVED[5];
  772. __IOM uint32_t NRFFW[15]; /*!< (@ 0x00000014) Description collection: Reserved for Nordic firmware
  773. design */
  774. __IOM uint32_t NRFHW[12]; /*!< (@ 0x00000050) Description collection: Reserved for Nordic hardware
  775. design */
  776. __IOM uint32_t CUSTOMER[32]; /*!< (@ 0x00000080) Description collection: Reserved for customer */
  777. __IM uint32_t RESERVED1[64];
  778. __IOM uint32_t PSELRESET[2]; /*!< (@ 0x00000200) Description collection: Mapping of the nRESET
  779. function (see POWER chapter for details) */
  780. __IOM uint32_t APPROTECT; /*!< (@ 0x00000208) Access port protection */
  781. __IOM uint32_t NFCPINS; /*!< (@ 0x0000020C) Setting of pins dedicated to NFC functionality:
  782. NFC antenna or GPIO */
  783. __IOM uint32_t DEBUGCTRL; /*!< (@ 0x00000210) Processor debug control */
  784. __IM uint32_t RESERVED2[60];
  785. __IOM uint32_t REGOUT0; /*!< (@ 0x00000304) GPIO reference voltage / external output supply
  786. voltage in high voltage mode */
  787. } NRF_UICR_Type; /*!< Size = 776 (0x308) */
  788. /* =========================================================================================================================== */
  789. /* ================ CLOCK ================ */
  790. /* =========================================================================================================================== */
  791. /**
  792. * @brief Clock control (CLOCK)
  793. */
  794. typedef struct { /*!< (@ 0x40000000) CLOCK Structure */
  795. __OM uint32_t TASKS_HFCLKSTART; /*!< (@ 0x00000000) Start HFXO crystal oscillator */
  796. __OM uint32_t TASKS_HFCLKSTOP; /*!< (@ 0x00000004) Stop HFXO crystal oscillator */
  797. __OM uint32_t TASKS_LFCLKSTART; /*!< (@ 0x00000008) Start LFCLK */
  798. __OM uint32_t TASKS_LFCLKSTOP; /*!< (@ 0x0000000C) Stop LFCLK */
  799. __OM uint32_t TASKS_CAL; /*!< (@ 0x00000010) Start calibration of LFRC */
  800. __OM uint32_t TASKS_CTSTART; /*!< (@ 0x00000014) Start calibration timer */
  801. __OM uint32_t TASKS_CTSTOP; /*!< (@ 0x00000018) Stop calibration timer */
  802. __IM uint32_t RESERVED[57];
  803. __IOM uint32_t EVENTS_HFCLKSTARTED; /*!< (@ 0x00000100) HFXO crystal oscillator started */
  804. __IOM uint32_t EVENTS_LFCLKSTARTED; /*!< (@ 0x00000104) LFCLK started */
  805. __IM uint32_t RESERVED1;
  806. __IOM uint32_t EVENTS_DONE; /*!< (@ 0x0000010C) Calibration of LFRC completed */
  807. __IOM uint32_t EVENTS_CTTO; /*!< (@ 0x00000110) Calibration timer timeout */
  808. __IM uint32_t RESERVED2[5];
  809. __IOM uint32_t EVENTS_CTSTARTED; /*!< (@ 0x00000128) Calibration timer has been started and is ready
  810. to process new tasks */
  811. __IOM uint32_t EVENTS_CTSTOPPED; /*!< (@ 0x0000012C) Calibration timer has been stopped and is ready
  812. to process new tasks */
  813. __IM uint32_t RESERVED3[117];
  814. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  815. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  816. __IM uint32_t RESERVED4[63];
  817. __IM uint32_t HFCLKRUN; /*!< (@ 0x00000408) Status indicating that HFCLKSTART task has been
  818. triggered */
  819. __IM uint32_t HFCLKSTAT; /*!< (@ 0x0000040C) HFCLK status */
  820. __IM uint32_t RESERVED5;
  821. __IM uint32_t LFCLKRUN; /*!< (@ 0x00000414) Status indicating that LFCLKSTART task has been
  822. triggered */
  823. __IM uint32_t LFCLKSTAT; /*!< (@ 0x00000418) LFCLK status */
  824. __IM uint32_t LFCLKSRCCOPY; /*!< (@ 0x0000041C) Copy of LFCLKSRC register, set when LFCLKSTART
  825. task was triggered */
  826. __IM uint32_t RESERVED6[62];
  827. __IOM uint32_t LFCLKSRC; /*!< (@ 0x00000518) Clock source for the LFCLK */
  828. __IM uint32_t RESERVED7[3];
  829. __IOM uint32_t HFXODEBOUNCE; /*!< (@ 0x00000528) HFXO debounce time. The HFXO is started by triggering
  830. the TASKS_HFCLKSTART task. */
  831. __IM uint32_t RESERVED8[3];
  832. __IOM uint32_t CTIV; /*!< (@ 0x00000538) Calibration timer interval */
  833. __IM uint32_t RESERVED9[8];
  834. __IOM uint32_t TRACECONFIG; /*!< (@ 0x0000055C) Clocking options for the trace port debug interface */
  835. __IM uint32_t RESERVED10[21];
  836. __IOM uint32_t LFRCMODE; /*!< (@ 0x000005B4) LFRC mode configuration */
  837. } NRF_CLOCK_Type; /*!< Size = 1464 (0x5b8) */
  838. /* =========================================================================================================================== */
  839. /* ================ POWER ================ */
  840. /* =========================================================================================================================== */
  841. /**
  842. * @brief Power control (POWER)
  843. */
  844. typedef struct { /*!< (@ 0x40000000) POWER Structure */
  845. __IM uint32_t RESERVED[30];
  846. __OM uint32_t TASKS_CONSTLAT; /*!< (@ 0x00000078) Enable constant latency mode */
  847. __OM uint32_t TASKS_LOWPWR; /*!< (@ 0x0000007C) Enable low power mode (variable latency) */
  848. __IM uint32_t RESERVED1[34];
  849. __IOM uint32_t EVENTS_POFWARN; /*!< (@ 0x00000108) Power failure warning */
  850. __IM uint32_t RESERVED2[2];
  851. __IOM uint32_t EVENTS_SLEEPENTER; /*!< (@ 0x00000114) CPU entered WFI/WFE sleep */
  852. __IOM uint32_t EVENTS_SLEEPEXIT; /*!< (@ 0x00000118) CPU exited WFI/WFE sleep */
  853. __IOM uint32_t EVENTS_USBDETECTED; /*!< (@ 0x0000011C) Voltage supply detected on VBUS */
  854. __IOM uint32_t EVENTS_USBREMOVED; /*!< (@ 0x00000120) Voltage supply removed from VBUS */
  855. __IOM uint32_t EVENTS_USBPWRRDY; /*!< (@ 0x00000124) USB 3.3 V supply ready */
  856. __IM uint32_t RESERVED3[119];
  857. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  858. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  859. __IM uint32_t RESERVED4[61];
  860. __IOM uint32_t RESETREAS; /*!< (@ 0x00000400) Reset reason */
  861. __IM uint32_t RESERVED5[9];
  862. __IM uint32_t RAMSTATUS; /*!< (@ 0x00000428) Deprecated register - RAM status register */
  863. __IM uint32_t RESERVED6[3];
  864. __IM uint32_t USBREGSTATUS; /*!< (@ 0x00000438) USB supply status */
  865. __IM uint32_t RESERVED7[49];
  866. __OM uint32_t SYSTEMOFF; /*!< (@ 0x00000500) System OFF register */
  867. __IM uint32_t RESERVED8[3];
  868. __IOM uint32_t POFCON; /*!< (@ 0x00000510) Power-fail comparator configuration */
  869. __IM uint32_t RESERVED9[2];
  870. __IOM uint32_t GPREGRET; /*!< (@ 0x0000051C) General purpose retention register */
  871. __IOM uint32_t GPREGRET2; /*!< (@ 0x00000520) General purpose retention register */
  872. __IM uint32_t RESERVED10[21];
  873. __IOM uint32_t DCDCEN; /*!< (@ 0x00000578) Enable DC/DC converter for REG1 stage. */
  874. __IM uint32_t RESERVED11;
  875. __IOM uint32_t DCDCEN0; /*!< (@ 0x00000580) Enable DC/DC converter for REG0 stage. */
  876. __IM uint32_t RESERVED12[47];
  877. __IM uint32_t MAINREGSTATUS; /*!< (@ 0x00000640) Main supply status */
  878. __IM uint32_t RESERVED13[175];
  879. __IOM POWER_RAM_Type RAM[9]; /*!< (@ 0x00000900) Unspecified */
  880. } NRF_POWER_Type; /*!< Size = 2448 (0x990) */
  881. /* =========================================================================================================================== */
  882. /* ================ P0 ================ */
  883. /* =========================================================================================================================== */
  884. /**
  885. * @brief GPIO Port 1 (P0)
  886. */
  887. typedef struct { /*!< (@ 0x50000000) P0 Structure */
  888. __IM uint32_t RESERVED[321];
  889. __IOM uint32_t OUT; /*!< (@ 0x00000504) Write GPIO port */
  890. __IOM uint32_t OUTSET; /*!< (@ 0x00000508) Set individual bits in GPIO port */
  891. __IOM uint32_t OUTCLR; /*!< (@ 0x0000050C) Clear individual bits in GPIO port */
  892. __IM uint32_t IN; /*!< (@ 0x00000510) Read GPIO port */
  893. __IOM uint32_t DIR; /*!< (@ 0x00000514) Direction of GPIO pins */
  894. __IOM uint32_t DIRSET; /*!< (@ 0x00000518) DIR set register */
  895. __IOM uint32_t DIRCLR; /*!< (@ 0x0000051C) DIR clear register */
  896. __IOM uint32_t LATCH; /*!< (@ 0x00000520) Latch register indicating what GPIO pins that
  897. have met the criteria set in the PIN_CNF[n].SENSE
  898. registers */
  899. __IOM uint32_t DETECTMODE; /*!< (@ 0x00000524) Select between default DETECT signal behaviour
  900. and LDETECT mode */
  901. __IM uint32_t RESERVED1[118];
  902. __IOM uint32_t PIN_CNF[32]; /*!< (@ 0x00000700) Description collection: Configuration of GPIO
  903. pins */
  904. } NRF_GPIO_Type; /*!< Size = 1920 (0x780) */
  905. /* =========================================================================================================================== */
  906. /* ================ RADIO ================ */
  907. /* =========================================================================================================================== */
  908. /**
  909. * @brief 2.4 GHz radio (RADIO)
  910. */
  911. typedef struct { /*!< (@ 0x40001000) RADIO Structure */
  912. __OM uint32_t TASKS_TXEN; /*!< (@ 0x00000000) Enable RADIO in TX mode */
  913. __OM uint32_t TASKS_RXEN; /*!< (@ 0x00000004) Enable RADIO in RX mode */
  914. __OM uint32_t TASKS_START; /*!< (@ 0x00000008) Start RADIO */
  915. __OM uint32_t TASKS_STOP; /*!< (@ 0x0000000C) Stop RADIO */
  916. __OM uint32_t TASKS_DISABLE; /*!< (@ 0x00000010) Disable RADIO */
  917. __OM uint32_t TASKS_RSSISTART; /*!< (@ 0x00000014) Start the RSSI and take one single sample of
  918. the receive signal strength */
  919. __OM uint32_t TASKS_RSSISTOP; /*!< (@ 0x00000018) Stop the RSSI measurement */
  920. __OM uint32_t TASKS_BCSTART; /*!< (@ 0x0000001C) Start the bit counter */
  921. __OM uint32_t TASKS_BCSTOP; /*!< (@ 0x00000020) Stop the bit counter */
  922. __OM uint32_t TASKS_EDSTART; /*!< (@ 0x00000024) Start the energy detect measurement used in IEEE
  923. 802.15.4 mode */
  924. __OM uint32_t TASKS_EDSTOP; /*!< (@ 0x00000028) Stop the energy detect measurement */
  925. __OM uint32_t TASKS_CCASTART; /*!< (@ 0x0000002C) Start the clear channel assessment used in IEEE
  926. 802.15.4 mode */
  927. __OM uint32_t TASKS_CCASTOP; /*!< (@ 0x00000030) Stop the clear channel assessment */
  928. __IM uint32_t RESERVED[51];
  929. __IOM uint32_t EVENTS_READY; /*!< (@ 0x00000100) RADIO has ramped up and is ready to be started */
  930. __IOM uint32_t EVENTS_ADDRESS; /*!< (@ 0x00000104) Address sent or received */
  931. __IOM uint32_t EVENTS_PAYLOAD; /*!< (@ 0x00000108) Packet payload sent or received */
  932. __IOM uint32_t EVENTS_END; /*!< (@ 0x0000010C) Packet sent or received */
  933. __IOM uint32_t EVENTS_DISABLED; /*!< (@ 0x00000110) RADIO has been disabled */
  934. __IOM uint32_t EVENTS_DEVMATCH; /*!< (@ 0x00000114) A device address match occurred on the last received
  935. packet */
  936. __IOM uint32_t EVENTS_DEVMISS; /*!< (@ 0x00000118) No device address match occurred on the last
  937. received packet */
  938. __IOM uint32_t EVENTS_RSSIEND; /*!< (@ 0x0000011C) Sampling of receive signal strength complete */
  939. __IM uint32_t RESERVED1[2];
  940. __IOM uint32_t EVENTS_BCMATCH; /*!< (@ 0x00000128) Bit counter reached bit count value */
  941. __IM uint32_t RESERVED2;
  942. __IOM uint32_t EVENTS_CRCOK; /*!< (@ 0x00000130) Packet received with CRC ok */
  943. __IOM uint32_t EVENTS_CRCERROR; /*!< (@ 0x00000134) Packet received with CRC error */
  944. __IOM uint32_t EVENTS_FRAMESTART; /*!< (@ 0x00000138) IEEE 802.15.4 length field received */
  945. __IOM uint32_t EVENTS_EDEND; /*!< (@ 0x0000013C) Sampling of energy detection complete. A new
  946. ED sample is ready for readout from the
  947. RADIO.EDSAMPLE register. */
  948. __IOM uint32_t EVENTS_EDSTOPPED; /*!< (@ 0x00000140) The sampling of energy detection has stopped */
  949. __IOM uint32_t EVENTS_CCAIDLE; /*!< (@ 0x00000144) Wireless medium in idle - clear to send */
  950. __IOM uint32_t EVENTS_CCABUSY; /*!< (@ 0x00000148) Wireless medium busy - do not send */
  951. __IOM uint32_t EVENTS_CCASTOPPED; /*!< (@ 0x0000014C) The CCA has stopped */
  952. __IOM uint32_t EVENTS_RATEBOOST; /*!< (@ 0x00000150) Ble_LR CI field received, receive mode is changed
  953. from Ble_LR125Kbit to Ble_LR500Kbit. */
  954. __IOM uint32_t EVENTS_TXREADY; /*!< (@ 0x00000154) RADIO has ramped up and is ready to be started
  955. TX path */
  956. __IOM uint32_t EVENTS_RXREADY; /*!< (@ 0x00000158) RADIO has ramped up and is ready to be started
  957. RX path */
  958. __IOM uint32_t EVENTS_MHRMATCH; /*!< (@ 0x0000015C) MAC header match found */
  959. __IM uint32_t RESERVED3[3];
  960. __IOM uint32_t EVENTS_PHYEND; /*!< (@ 0x0000016C) Generated in Ble_LR125Kbit, Ble_LR500Kbit and
  961. Ieee802154_250Kbit modes when last bit is
  962. sent on air. */
  963. __IM uint32_t RESERVED4[36];
  964. __IOM uint32_t SHORTS; /*!< (@ 0x00000200) Shortcuts between local events and tasks */
  965. __IM uint32_t RESERVED5[64];
  966. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  967. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  968. __IM uint32_t RESERVED6[61];
  969. __IM uint32_t CRCSTATUS; /*!< (@ 0x00000400) CRC status */
  970. __IM uint32_t RESERVED7;
  971. __IM uint32_t RXMATCH; /*!< (@ 0x00000408) Received address */
  972. __IM uint32_t RXCRC; /*!< (@ 0x0000040C) CRC field of previously received packet */
  973. __IM uint32_t DAI; /*!< (@ 0x00000410) Device address match index */
  974. __IM uint32_t PDUSTAT; /*!< (@ 0x00000414) Payload status */
  975. __IM uint32_t RESERVED8[59];
  976. __IOM uint32_t PACKETPTR; /*!< (@ 0x00000504) Packet pointer */
  977. __IOM uint32_t FREQUENCY; /*!< (@ 0x00000508) Frequency */
  978. __IOM uint32_t TXPOWER; /*!< (@ 0x0000050C) Output power */
  979. __IOM uint32_t MODE; /*!< (@ 0x00000510) Data rate and modulation */
  980. __IOM uint32_t PCNF0; /*!< (@ 0x00000514) Packet configuration register 0 */
  981. __IOM uint32_t PCNF1; /*!< (@ 0x00000518) Packet configuration register 1 */
  982. __IOM uint32_t BASE0; /*!< (@ 0x0000051C) Base address 0 */
  983. __IOM uint32_t BASE1; /*!< (@ 0x00000520) Base address 1 */
  984. __IOM uint32_t PREFIX0; /*!< (@ 0x00000524) Prefixes bytes for logical addresses 0-3 */
  985. __IOM uint32_t PREFIX1; /*!< (@ 0x00000528) Prefixes bytes for logical addresses 4-7 */
  986. __IOM uint32_t TXADDRESS; /*!< (@ 0x0000052C) Transmit address select */
  987. __IOM uint32_t RXADDRESSES; /*!< (@ 0x00000530) Receive address select */
  988. __IOM uint32_t CRCCNF; /*!< (@ 0x00000534) CRC configuration */
  989. __IOM uint32_t CRCPOLY; /*!< (@ 0x00000538) CRC polynomial */
  990. __IOM uint32_t CRCINIT; /*!< (@ 0x0000053C) CRC initial value */
  991. __IM uint32_t RESERVED9;
  992. __IOM uint32_t TIFS; /*!< (@ 0x00000544) Interframe spacing in us */
  993. __IM uint32_t RSSISAMPLE; /*!< (@ 0x00000548) RSSI sample */
  994. __IM uint32_t RESERVED10;
  995. __IM uint32_t STATE; /*!< (@ 0x00000550) Current radio state */
  996. __IOM uint32_t DATAWHITEIV; /*!< (@ 0x00000554) Data whitening initial value */
  997. __IM uint32_t RESERVED11[2];
  998. __IOM uint32_t BCC; /*!< (@ 0x00000560) Bit counter compare */
  999. __IM uint32_t RESERVED12[39];
  1000. __IOM uint32_t DAB[8]; /*!< (@ 0x00000600) Description collection: Device address base segment
  1001. n */
  1002. __IOM uint32_t DAP[8]; /*!< (@ 0x00000620) Description collection: Device address prefix
  1003. n */
  1004. __IOM uint32_t DACNF; /*!< (@ 0x00000640) Device address match configuration */
  1005. __IOM uint32_t MHRMATCHCONF; /*!< (@ 0x00000644) Search pattern configuration */
  1006. __IOM uint32_t MHRMATCHMAS; /*!< (@ 0x00000648) Pattern mask */
  1007. __IM uint32_t RESERVED13;
  1008. __IOM uint32_t MODECNF0; /*!< (@ 0x00000650) Radio mode configuration register 0 */
  1009. __IM uint32_t RESERVED14[3];
  1010. __IOM uint32_t SFD; /*!< (@ 0x00000660) IEEE 802.15.4 start of frame delimiter */
  1011. __IOM uint32_t EDCNT; /*!< (@ 0x00000664) IEEE 802.15.4 energy detect loop count */
  1012. __IOM uint32_t EDSAMPLE; /*!< (@ 0x00000668) IEEE 802.15.4 energy detect level */
  1013. __IOM uint32_t CCACTRL; /*!< (@ 0x0000066C) IEEE 802.15.4 clear channel assessment control */
  1014. __IM uint32_t RESERVED15[611];
  1015. __IOM uint32_t POWER; /*!< (@ 0x00000FFC) Peripheral power control */
  1016. } NRF_RADIO_Type; /*!< Size = 4096 (0x1000) */
  1017. /* =========================================================================================================================== */
  1018. /* ================ UART0 ================ */
  1019. /* =========================================================================================================================== */
  1020. /**
  1021. * @brief Universal Asynchronous Receiver/Transmitter (UART0)
  1022. */
  1023. typedef struct { /*!< (@ 0x40002000) UART0 Structure */
  1024. __OM uint32_t TASKS_STARTRX; /*!< (@ 0x00000000) Start UART receiver */
  1025. __OM uint32_t TASKS_STOPRX; /*!< (@ 0x00000004) Stop UART receiver */
  1026. __OM uint32_t TASKS_STARTTX; /*!< (@ 0x00000008) Start UART transmitter */
  1027. __OM uint32_t TASKS_STOPTX; /*!< (@ 0x0000000C) Stop UART transmitter */
  1028. __IM uint32_t RESERVED[3];
  1029. __OM uint32_t TASKS_SUSPEND; /*!< (@ 0x0000001C) Suspend UART */
  1030. __IM uint32_t RESERVED1[56];
  1031. __IOM uint32_t EVENTS_CTS; /*!< (@ 0x00000100) CTS is activated (set low). Clear To Send. */
  1032. __IOM uint32_t EVENTS_NCTS; /*!< (@ 0x00000104) CTS is deactivated (set high). Not Clear To Send. */
  1033. __IOM uint32_t EVENTS_RXDRDY; /*!< (@ 0x00000108) Data received in RXD */
  1034. __IM uint32_t RESERVED2[4];
  1035. __IOM uint32_t EVENTS_TXDRDY; /*!< (@ 0x0000011C) Data sent from TXD */
  1036. __IM uint32_t RESERVED3;
  1037. __IOM uint32_t EVENTS_ERROR; /*!< (@ 0x00000124) Error detected */
  1038. __IM uint32_t RESERVED4[7];
  1039. __IOM uint32_t EVENTS_RXTO; /*!< (@ 0x00000144) Receiver timeout */
  1040. __IM uint32_t RESERVED5[46];
  1041. __IOM uint32_t SHORTS; /*!< (@ 0x00000200) Shortcuts between local events and tasks */
  1042. __IM uint32_t RESERVED6[64];
  1043. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  1044. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  1045. __IM uint32_t RESERVED7[93];
  1046. __IOM uint32_t ERRORSRC; /*!< (@ 0x00000480) Error source */
  1047. __IM uint32_t RESERVED8[31];
  1048. __IOM uint32_t ENABLE; /*!< (@ 0x00000500) Enable UART */
  1049. __IM uint32_t RESERVED9;
  1050. __IOM UART_PSEL_Type PSEL; /*!< (@ 0x00000508) Unspecified */
  1051. __IM uint32_t RXD; /*!< (@ 0x00000518) RXD register */
  1052. __OM uint32_t TXD; /*!< (@ 0x0000051C) TXD register */
  1053. __IM uint32_t RESERVED10;
  1054. __IOM uint32_t BAUDRATE; /*!< (@ 0x00000524) Baud rate. Accuracy depends on the HFCLK source
  1055. selected. */
  1056. __IM uint32_t RESERVED11[17];
  1057. __IOM uint32_t CONFIG; /*!< (@ 0x0000056C) Configuration of parity and hardware flow control */
  1058. } NRF_UART_Type; /*!< Size = 1392 (0x570) */
  1059. /* =========================================================================================================================== */
  1060. /* ================ UARTE0 ================ */
  1061. /* =========================================================================================================================== */
  1062. /**
  1063. * @brief UART with EasyDMA 0 (UARTE0)
  1064. */
  1065. typedef struct { /*!< (@ 0x40002000) UARTE0 Structure */
  1066. __OM uint32_t TASKS_STARTRX; /*!< (@ 0x00000000) Start UART receiver */
  1067. __OM uint32_t TASKS_STOPRX; /*!< (@ 0x00000004) Stop UART receiver */
  1068. __OM uint32_t TASKS_STARTTX; /*!< (@ 0x00000008) Start UART transmitter */
  1069. __OM uint32_t TASKS_STOPTX; /*!< (@ 0x0000000C) Stop UART transmitter */
  1070. __IM uint32_t RESERVED[7];
  1071. __OM uint32_t TASKS_FLUSHRX; /*!< (@ 0x0000002C) Flush RX FIFO into RX buffer */
  1072. __IM uint32_t RESERVED1[52];
  1073. __IOM uint32_t EVENTS_CTS; /*!< (@ 0x00000100) CTS is activated (set low). Clear To Send. */
  1074. __IOM uint32_t EVENTS_NCTS; /*!< (@ 0x00000104) CTS is deactivated (set high). Not Clear To Send. */
  1075. __IOM uint32_t EVENTS_RXDRDY; /*!< (@ 0x00000108) Data received in RXD (but potentially not yet
  1076. transferred to Data RAM) */
  1077. __IM uint32_t RESERVED2;
  1078. __IOM uint32_t EVENTS_ENDRX; /*!< (@ 0x00000110) Receive buffer is filled up */
  1079. __IM uint32_t RESERVED3[2];
  1080. __IOM uint32_t EVENTS_TXDRDY; /*!< (@ 0x0000011C) Data sent from TXD */
  1081. __IOM uint32_t EVENTS_ENDTX; /*!< (@ 0x00000120) Last TX byte transmitted */
  1082. __IOM uint32_t EVENTS_ERROR; /*!< (@ 0x00000124) Error detected */
  1083. __IM uint32_t RESERVED4[7];
  1084. __IOM uint32_t EVENTS_RXTO; /*!< (@ 0x00000144) Receiver timeout */
  1085. __IM uint32_t RESERVED5;
  1086. __IOM uint32_t EVENTS_RXSTARTED; /*!< (@ 0x0000014C) UART receiver has started */
  1087. __IOM uint32_t EVENTS_TXSTARTED; /*!< (@ 0x00000150) UART transmitter has started */
  1088. __IM uint32_t RESERVED6;
  1089. __IOM uint32_t EVENTS_TXSTOPPED; /*!< (@ 0x00000158) Transmitter stopped */
  1090. __IM uint32_t RESERVED7[41];
  1091. __IOM uint32_t SHORTS; /*!< (@ 0x00000200) Shortcuts between local events and tasks */
  1092. __IM uint32_t RESERVED8[63];
  1093. __IOM uint32_t INTEN; /*!< (@ 0x00000300) Enable or disable interrupt */
  1094. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  1095. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  1096. __IM uint32_t RESERVED9[93];
  1097. __IOM uint32_t ERRORSRC; /*!< (@ 0x00000480) Error source Note : this register is read / write
  1098. one to clear. */
  1099. __IM uint32_t RESERVED10[31];
  1100. __IOM uint32_t ENABLE; /*!< (@ 0x00000500) Enable UART */
  1101. __IM uint32_t RESERVED11;
  1102. __IOM UARTE_PSEL_Type PSEL; /*!< (@ 0x00000508) Unspecified */
  1103. __IM uint32_t RESERVED12[3];
  1104. __IOM uint32_t BAUDRATE; /*!< (@ 0x00000524) Baud rate. Accuracy depends on the HFCLK source
  1105. selected. */
  1106. __IM uint32_t RESERVED13[3];
  1107. __IOM UARTE_RXD_Type RXD; /*!< (@ 0x00000534) RXD EasyDMA channel */
  1108. __IM uint32_t RESERVED14;
  1109. __IOM UARTE_TXD_Type TXD; /*!< (@ 0x00000544) TXD EasyDMA channel */
  1110. __IM uint32_t RESERVED15[7];
  1111. __IOM uint32_t CONFIG; /*!< (@ 0x0000056C) Configuration of parity and hardware flow control */
  1112. } NRF_UARTE_Type; /*!< Size = 1392 (0x570) */
  1113. /* =========================================================================================================================== */
  1114. /* ================ SPI0 ================ */
  1115. /* =========================================================================================================================== */
  1116. /**
  1117. * @brief Serial Peripheral Interface 0 (SPI0)
  1118. */
  1119. typedef struct { /*!< (@ 0x40003000) SPI0 Structure */
  1120. __IM uint32_t RESERVED[66];
  1121. __IOM uint32_t EVENTS_READY; /*!< (@ 0x00000108) TXD byte sent and RXD byte received */
  1122. __IM uint32_t RESERVED1[126];
  1123. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  1124. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  1125. __IM uint32_t RESERVED2[125];
  1126. __IOM uint32_t ENABLE; /*!< (@ 0x00000500) Enable SPI */
  1127. __IM uint32_t RESERVED3;
  1128. __IOM SPI_PSEL_Type PSEL; /*!< (@ 0x00000508) Unspecified */
  1129. __IM uint32_t RESERVED4;
  1130. __IM uint32_t RXD; /*!< (@ 0x00000518) RXD register */
  1131. __IOM uint32_t TXD; /*!< (@ 0x0000051C) TXD register */
  1132. __IM uint32_t RESERVED5;
  1133. __IOM uint32_t FREQUENCY; /*!< (@ 0x00000524) SPI frequency. Accuracy depends on the HFCLK
  1134. source selected. */
  1135. __IM uint32_t RESERVED6[11];
  1136. __IOM uint32_t CONFIG; /*!< (@ 0x00000554) Configuration register */
  1137. } NRF_SPI_Type; /*!< Size = 1368 (0x558) */
  1138. /* =========================================================================================================================== */
  1139. /* ================ SPIM0 ================ */
  1140. /* =========================================================================================================================== */
  1141. /**
  1142. * @brief Serial Peripheral Interface Master with EasyDMA 0 (SPIM0)
  1143. */
  1144. typedef struct { /*!< (@ 0x40003000) SPIM0 Structure */
  1145. __IM uint32_t RESERVED[4];
  1146. __OM uint32_t TASKS_START; /*!< (@ 0x00000010) Start SPI transaction */
  1147. __OM uint32_t TASKS_STOP; /*!< (@ 0x00000014) Stop SPI transaction */
  1148. __IM uint32_t RESERVED1;
  1149. __OM uint32_t TASKS_SUSPEND; /*!< (@ 0x0000001C) Suspend SPI transaction */
  1150. __OM uint32_t TASKS_RESUME; /*!< (@ 0x00000020) Resume SPI transaction */
  1151. __IM uint32_t RESERVED2[56];
  1152. __IOM uint32_t EVENTS_STOPPED; /*!< (@ 0x00000104) SPI transaction has stopped */
  1153. __IM uint32_t RESERVED3[2];
  1154. __IOM uint32_t EVENTS_ENDRX; /*!< (@ 0x00000110) End of RXD buffer reached */
  1155. __IM uint32_t RESERVED4;
  1156. __IOM uint32_t EVENTS_END; /*!< (@ 0x00000118) End of RXD buffer and TXD buffer reached */
  1157. __IM uint32_t RESERVED5;
  1158. __IOM uint32_t EVENTS_ENDTX; /*!< (@ 0x00000120) End of TXD buffer reached */
  1159. __IM uint32_t RESERVED6[10];
  1160. __IOM uint32_t EVENTS_STARTED; /*!< (@ 0x0000014C) Transaction started */
  1161. __IM uint32_t RESERVED7[44];
  1162. __IOM uint32_t SHORTS; /*!< (@ 0x00000200) Shortcuts between local events and tasks */
  1163. __IM uint32_t RESERVED8[64];
  1164. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  1165. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  1166. __IM uint32_t RESERVED9[61];
  1167. __IOM uint32_t STALLSTAT; /*!< (@ 0x00000400) Stall status for EasyDMA RAM accesses. The fields
  1168. in this register is set to STALL by hardware
  1169. whenever a stall occurres and can be cleared
  1170. (set to NOSTALL) by the CPU. */
  1171. __IM uint32_t RESERVED10[63];
  1172. __IOM uint32_t ENABLE; /*!< (@ 0x00000500) Enable SPIM */
  1173. __IM uint32_t RESERVED11;
  1174. __IOM SPIM_PSEL_Type PSEL; /*!< (@ 0x00000508) Unspecified */
  1175. __IM uint32_t RESERVED12[3];
  1176. __IOM uint32_t FREQUENCY; /*!< (@ 0x00000524) SPI frequency. Accuracy depends on the HFCLK
  1177. source selected. */
  1178. __IM uint32_t RESERVED13[3];
  1179. __IOM SPIM_RXD_Type RXD; /*!< (@ 0x00000534) RXD EasyDMA channel */
  1180. __IOM SPIM_TXD_Type TXD; /*!< (@ 0x00000544) TXD EasyDMA channel */
  1181. __IOM uint32_t CONFIG; /*!< (@ 0x00000554) Configuration register */
  1182. __IM uint32_t RESERVED14[2];
  1183. __IOM SPIM_IFTIMING_Type IFTIMING; /*!< (@ 0x00000560) Unspecified */
  1184. __IOM uint32_t CSNPOL; /*!< (@ 0x00000568) Polarity of CSN output */
  1185. __IOM uint32_t PSELDCX; /*!< (@ 0x0000056C) Pin select for DCX signal */
  1186. __IOM uint32_t DCXCNT; /*!< (@ 0x00000570) DCX configuration */
  1187. __IM uint32_t RESERVED15[19];
  1188. __IOM uint32_t ORC; /*!< (@ 0x000005C0) Byte transmitted after TXD.MAXCNT bytes have
  1189. been transmitted in the case when RXD.MAXCNT
  1190. is greater than TXD.MAXCNT */
  1191. } NRF_SPIM_Type; /*!< Size = 1476 (0x5c4) */
  1192. /* =========================================================================================================================== */
  1193. /* ================ SPIS0 ================ */
  1194. /* =========================================================================================================================== */
  1195. /**
  1196. * @brief SPI Slave 0 (SPIS0)
  1197. */
  1198. typedef struct { /*!< (@ 0x40003000) SPIS0 Structure */
  1199. __IM uint32_t RESERVED[9];
  1200. __OM uint32_t TASKS_ACQUIRE; /*!< (@ 0x00000024) Acquire SPI semaphore */
  1201. __OM uint32_t TASKS_RELEASE; /*!< (@ 0x00000028) Release SPI semaphore, enabling the SPI slave
  1202. to acquire it */
  1203. __IM uint32_t RESERVED1[54];
  1204. __IOM uint32_t EVENTS_END; /*!< (@ 0x00000104) Granted transaction completed */
  1205. __IM uint32_t RESERVED2[2];
  1206. __IOM uint32_t EVENTS_ENDRX; /*!< (@ 0x00000110) End of RXD buffer reached */
  1207. __IM uint32_t RESERVED3[5];
  1208. __IOM uint32_t EVENTS_ACQUIRED; /*!< (@ 0x00000128) Semaphore acquired */
  1209. __IM uint32_t RESERVED4[53];
  1210. __IOM uint32_t SHORTS; /*!< (@ 0x00000200) Shortcuts between local events and tasks */
  1211. __IM uint32_t RESERVED5[64];
  1212. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  1213. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  1214. __IM uint32_t RESERVED6[61];
  1215. __IM uint32_t SEMSTAT; /*!< (@ 0x00000400) Semaphore status register */
  1216. __IM uint32_t RESERVED7[15];
  1217. __IOM uint32_t STATUS; /*!< (@ 0x00000440) Status from last transaction */
  1218. __IM uint32_t RESERVED8[47];
  1219. __IOM uint32_t ENABLE; /*!< (@ 0x00000500) Enable SPI slave */
  1220. __IM uint32_t RESERVED9;
  1221. __IOM SPIS_PSEL_Type PSEL; /*!< (@ 0x00000508) Unspecified */
  1222. __IM uint32_t RESERVED10[7];
  1223. __IOM SPIS_RXD_Type RXD; /*!< (@ 0x00000534) Unspecified */
  1224. __IOM SPIS_TXD_Type TXD; /*!< (@ 0x00000544) Unspecified */
  1225. __IOM uint32_t CONFIG; /*!< (@ 0x00000554) Configuration register */
  1226. __IM uint32_t RESERVED11;
  1227. __IOM uint32_t DEF; /*!< (@ 0x0000055C) Default character. Character clocked out in case
  1228. of an ignored transaction. */
  1229. __IM uint32_t RESERVED12[24];
  1230. __IOM uint32_t ORC; /*!< (@ 0x000005C0) Over-read character */
  1231. } NRF_SPIS_Type; /*!< Size = 1476 (0x5c4) */
  1232. /* =========================================================================================================================== */
  1233. /* ================ TWI0 ================ */
  1234. /* =========================================================================================================================== */
  1235. /**
  1236. * @brief I2C compatible Two-Wire Interface 0 (TWI0)
  1237. */
  1238. typedef struct { /*!< (@ 0x40003000) TWI0 Structure */
  1239. __OM uint32_t TASKS_STARTRX; /*!< (@ 0x00000000) Start TWI receive sequence */
  1240. __IM uint32_t RESERVED;
  1241. __OM uint32_t TASKS_STARTTX; /*!< (@ 0x00000008) Start TWI transmit sequence */
  1242. __IM uint32_t RESERVED1[2];
  1243. __OM uint32_t TASKS_STOP; /*!< (@ 0x00000014) Stop TWI transaction */
  1244. __IM uint32_t RESERVED2;
  1245. __OM uint32_t TASKS_SUSPEND; /*!< (@ 0x0000001C) Suspend TWI transaction */
  1246. __OM uint32_t TASKS_RESUME; /*!< (@ 0x00000020) Resume TWI transaction */
  1247. __IM uint32_t RESERVED3[56];
  1248. __IOM uint32_t EVENTS_STOPPED; /*!< (@ 0x00000104) TWI stopped */
  1249. __IOM uint32_t EVENTS_RXDREADY; /*!< (@ 0x00000108) TWI RXD byte received */
  1250. __IM uint32_t RESERVED4[4];
  1251. __IOM uint32_t EVENTS_TXDSENT; /*!< (@ 0x0000011C) TWI TXD byte sent */
  1252. __IM uint32_t RESERVED5;
  1253. __IOM uint32_t EVENTS_ERROR; /*!< (@ 0x00000124) TWI error */
  1254. __IM uint32_t RESERVED6[4];
  1255. __IOM uint32_t EVENTS_BB; /*!< (@ 0x00000138) TWI byte boundary, generated before each byte
  1256. that is sent or received */
  1257. __IM uint32_t RESERVED7[3];
  1258. __IOM uint32_t EVENTS_SUSPENDED; /*!< (@ 0x00000148) TWI entered the suspended state */
  1259. __IM uint32_t RESERVED8[45];
  1260. __IOM uint32_t SHORTS; /*!< (@ 0x00000200) Shortcuts between local events and tasks */
  1261. __IM uint32_t RESERVED9[64];
  1262. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  1263. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  1264. __IM uint32_t RESERVED10[110];
  1265. __IOM uint32_t ERRORSRC; /*!< (@ 0x000004C4) Error source */
  1266. __IM uint32_t RESERVED11[14];
  1267. __IOM uint32_t ENABLE; /*!< (@ 0x00000500) Enable TWI */
  1268. __IM uint32_t RESERVED12;
  1269. __IOM TWI_PSEL_Type PSEL; /*!< (@ 0x00000508) Unspecified */
  1270. __IM uint32_t RESERVED13[2];
  1271. __IM uint32_t RXD; /*!< (@ 0x00000518) RXD register */
  1272. __IOM uint32_t TXD; /*!< (@ 0x0000051C) TXD register */
  1273. __IM uint32_t RESERVED14;
  1274. __IOM uint32_t FREQUENCY; /*!< (@ 0x00000524) TWI frequency. Accuracy depends on the HFCLK
  1275. source selected. */
  1276. __IM uint32_t RESERVED15[24];
  1277. __IOM uint32_t ADDRESS; /*!< (@ 0x00000588) Address used in the TWI transfer */
  1278. } NRF_TWI_Type; /*!< Size = 1420 (0x58c) */
  1279. /* =========================================================================================================================== */
  1280. /* ================ TWIM0 ================ */
  1281. /* =========================================================================================================================== */
  1282. /**
  1283. * @brief I2C compatible Two-Wire Master Interface with EasyDMA 0 (TWIM0)
  1284. */
  1285. typedef struct { /*!< (@ 0x40003000) TWIM0 Structure */
  1286. __OM uint32_t TASKS_STARTRX; /*!< (@ 0x00000000) Start TWI receive sequence */
  1287. __IM uint32_t RESERVED;
  1288. __OM uint32_t TASKS_STARTTX; /*!< (@ 0x00000008) Start TWI transmit sequence */
  1289. __IM uint32_t RESERVED1[2];
  1290. __OM uint32_t TASKS_STOP; /*!< (@ 0x00000014) Stop TWI transaction. Must be issued while the
  1291. TWI master is not suspended. */
  1292. __IM uint32_t RESERVED2;
  1293. __OM uint32_t TASKS_SUSPEND; /*!< (@ 0x0000001C) Suspend TWI transaction */
  1294. __OM uint32_t TASKS_RESUME; /*!< (@ 0x00000020) Resume TWI transaction */
  1295. __IM uint32_t RESERVED3[56];
  1296. __IOM uint32_t EVENTS_STOPPED; /*!< (@ 0x00000104) TWI stopped */
  1297. __IM uint32_t RESERVED4[7];
  1298. __IOM uint32_t EVENTS_ERROR; /*!< (@ 0x00000124) TWI error */
  1299. __IM uint32_t RESERVED5[8];
  1300. __IOM uint32_t EVENTS_SUSPENDED; /*!< (@ 0x00000148) Last byte has been sent out after the SUSPEND
  1301. task has been issued, TWI traffic is now
  1302. suspended. */
  1303. __IOM uint32_t EVENTS_RXSTARTED; /*!< (@ 0x0000014C) Receive sequence started */
  1304. __IOM uint32_t EVENTS_TXSTARTED; /*!< (@ 0x00000150) Transmit sequence started */
  1305. __IM uint32_t RESERVED6[2];
  1306. __IOM uint32_t EVENTS_LASTRX; /*!< (@ 0x0000015C) Byte boundary, starting to receive the last byte */
  1307. __IOM uint32_t EVENTS_LASTTX; /*!< (@ 0x00000160) Byte boundary, starting to transmit the last
  1308. byte */
  1309. __IM uint32_t RESERVED7[39];
  1310. __IOM uint32_t SHORTS; /*!< (@ 0x00000200) Shortcuts between local events and tasks */
  1311. __IM uint32_t RESERVED8[63];
  1312. __IOM uint32_t INTEN; /*!< (@ 0x00000300) Enable or disable interrupt */
  1313. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  1314. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  1315. __IM uint32_t RESERVED9[110];
  1316. __IOM uint32_t ERRORSRC; /*!< (@ 0x000004C4) Error source */
  1317. __IM uint32_t RESERVED10[14];
  1318. __IOM uint32_t ENABLE; /*!< (@ 0x00000500) Enable TWIM */
  1319. __IM uint32_t RESERVED11;
  1320. __IOM TWIM_PSEL_Type PSEL; /*!< (@ 0x00000508) Unspecified */
  1321. __IM uint32_t RESERVED12[5];
  1322. __IOM uint32_t FREQUENCY; /*!< (@ 0x00000524) TWI frequency. Accuracy depends on the HFCLK
  1323. source selected. */
  1324. __IM uint32_t RESERVED13[3];
  1325. __IOM TWIM_RXD_Type RXD; /*!< (@ 0x00000534) RXD EasyDMA channel */
  1326. __IOM TWIM_TXD_Type TXD; /*!< (@ 0x00000544) TXD EasyDMA channel */
  1327. __IM uint32_t RESERVED14[13];
  1328. __IOM uint32_t ADDRESS; /*!< (@ 0x00000588) Address used in the TWI transfer */
  1329. } NRF_TWIM_Type; /*!< Size = 1420 (0x58c) */
  1330. /* =========================================================================================================================== */
  1331. /* ================ TWIS0 ================ */
  1332. /* =========================================================================================================================== */
  1333. /**
  1334. * @brief I2C compatible Two-Wire Slave Interface with EasyDMA 0 (TWIS0)
  1335. */
  1336. typedef struct { /*!< (@ 0x40003000) TWIS0 Structure */
  1337. __IM uint32_t RESERVED[5];
  1338. __OM uint32_t TASKS_STOP; /*!< (@ 0x00000014) Stop TWI transaction */
  1339. __IM uint32_t RESERVED1;
  1340. __OM uint32_t TASKS_SUSPEND; /*!< (@ 0x0000001C) Suspend TWI transaction */
  1341. __OM uint32_t TASKS_RESUME; /*!< (@ 0x00000020) Resume TWI transaction */
  1342. __IM uint32_t RESERVED2[3];
  1343. __OM uint32_t TASKS_PREPARERX; /*!< (@ 0x00000030) Prepare the TWI slave to respond to a write command */
  1344. __OM uint32_t TASKS_PREPARETX; /*!< (@ 0x00000034) Prepare the TWI slave to respond to a read command */
  1345. __IM uint32_t RESERVED3[51];
  1346. __IOM uint32_t EVENTS_STOPPED; /*!< (@ 0x00000104) TWI stopped */
  1347. __IM uint32_t RESERVED4[7];
  1348. __IOM uint32_t EVENTS_ERROR; /*!< (@ 0x00000124) TWI error */
  1349. __IM uint32_t RESERVED5[9];
  1350. __IOM uint32_t EVENTS_RXSTARTED; /*!< (@ 0x0000014C) Receive sequence started */
  1351. __IOM uint32_t EVENTS_TXSTARTED; /*!< (@ 0x00000150) Transmit sequence started */
  1352. __IM uint32_t RESERVED6[4];
  1353. __IOM uint32_t EVENTS_WRITE; /*!< (@ 0x00000164) Write command received */
  1354. __IOM uint32_t EVENTS_READ; /*!< (@ 0x00000168) Read command received */
  1355. __IM uint32_t RESERVED7[37];
  1356. __IOM uint32_t SHORTS; /*!< (@ 0x00000200) Shortcuts between local events and tasks */
  1357. __IM uint32_t RESERVED8[63];
  1358. __IOM uint32_t INTEN; /*!< (@ 0x00000300) Enable or disable interrupt */
  1359. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  1360. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  1361. __IM uint32_t RESERVED9[113];
  1362. __IOM uint32_t ERRORSRC; /*!< (@ 0x000004D0) Error source */
  1363. __IM uint32_t MATCH; /*!< (@ 0x000004D4) Status register indicating which address had
  1364. a match */
  1365. __IM uint32_t RESERVED10[10];
  1366. __IOM uint32_t ENABLE; /*!< (@ 0x00000500) Enable TWIS */
  1367. __IM uint32_t RESERVED11;
  1368. __IOM TWIS_PSEL_Type PSEL; /*!< (@ 0x00000508) Unspecified */
  1369. __IM uint32_t RESERVED12[9];
  1370. __IOM TWIS_RXD_Type RXD; /*!< (@ 0x00000534) RXD EasyDMA channel */
  1371. __IOM TWIS_TXD_Type TXD; /*!< (@ 0x00000544) TXD EasyDMA channel */
  1372. __IM uint32_t RESERVED13[13];
  1373. __IOM uint32_t ADDRESS[2]; /*!< (@ 0x00000588) Description collection: TWI slave address n */
  1374. __IM uint32_t RESERVED14;
  1375. __IOM uint32_t CONFIG; /*!< (@ 0x00000594) Configuration register for the address match
  1376. mechanism */
  1377. __IM uint32_t RESERVED15[10];
  1378. __IOM uint32_t ORC; /*!< (@ 0x000005C0) Over-read character. Character sent out in case
  1379. of an over-read of the transmit buffer. */
  1380. } NRF_TWIS_Type; /*!< Size = 1476 (0x5c4) */
  1381. /* =========================================================================================================================== */
  1382. /* ================ NFCT ================ */
  1383. /* =========================================================================================================================== */
  1384. /**
  1385. * @brief NFC-A compatible radio (NFCT)
  1386. */
  1387. typedef struct { /*!< (@ 0x40005000) NFCT Structure */
  1388. __OM uint32_t TASKS_ACTIVATE; /*!< (@ 0x00000000) Activate NFCT peripheral for incoming and outgoing
  1389. frames, change state to activated */
  1390. __OM uint32_t TASKS_DISABLE; /*!< (@ 0x00000004) Disable NFCT peripheral */
  1391. __OM uint32_t TASKS_SENSE; /*!< (@ 0x00000008) Enable NFC sense field mode, change state to
  1392. sense mode */
  1393. __OM uint32_t TASKS_STARTTX; /*!< (@ 0x0000000C) Start transmission of an outgoing frame, change
  1394. state to transmit */
  1395. __IM uint32_t RESERVED[3];
  1396. __OM uint32_t TASKS_ENABLERXDATA; /*!< (@ 0x0000001C) Initializes the EasyDMA for receive. */
  1397. __IM uint32_t RESERVED1;
  1398. __OM uint32_t TASKS_GOIDLE; /*!< (@ 0x00000024) Force state machine to IDLE state */
  1399. __OM uint32_t TASKS_GOSLEEP; /*!< (@ 0x00000028) Force state machine to SLEEP_A state */
  1400. __IM uint32_t RESERVED2[53];
  1401. __IOM uint32_t EVENTS_READY; /*!< (@ 0x00000100) The NFCT peripheral is ready to receive and send
  1402. frames */
  1403. __IOM uint32_t EVENTS_FIELDDETECTED; /*!< (@ 0x00000104) Remote NFC field detected */
  1404. __IOM uint32_t EVENTS_FIELDLOST; /*!< (@ 0x00000108) Remote NFC field lost */
  1405. __IOM uint32_t EVENTS_TXFRAMESTART; /*!< (@ 0x0000010C) Marks the start of the first symbol of a transmitted
  1406. frame */
  1407. __IOM uint32_t EVENTS_TXFRAMEEND; /*!< (@ 0x00000110) Marks the end of the last transmitted on-air
  1408. symbol of a frame */
  1409. __IOM uint32_t EVENTS_RXFRAMESTART; /*!< (@ 0x00000114) Marks the end of the first symbol of a received
  1410. frame */
  1411. __IOM uint32_t EVENTS_RXFRAMEEND; /*!< (@ 0x00000118) Received data has been checked (CRC, parity)
  1412. and transferred to RAM, and EasyDMA has
  1413. ended accessing the RX buffer */
  1414. __IOM uint32_t EVENTS_ERROR; /*!< (@ 0x0000011C) NFC error reported. The ERRORSTATUS register
  1415. contains details on the source of the error. */
  1416. __IM uint32_t RESERVED3[2];
  1417. __IOM uint32_t EVENTS_RXERROR; /*!< (@ 0x00000128) NFC RX frame error reported. The FRAMESTATUS.RX
  1418. register contains details on the source
  1419. of the error. */
  1420. __IOM uint32_t EVENTS_ENDRX; /*!< (@ 0x0000012C) RX buffer (as defined by PACKETPTR and MAXLEN)
  1421. in Data RAM full. */
  1422. __IOM uint32_t EVENTS_ENDTX; /*!< (@ 0x00000130) Transmission of data in RAM has ended, and EasyDMA
  1423. has ended accessing the TX buffer */
  1424. __IM uint32_t RESERVED4;
  1425. __IOM uint32_t EVENTS_AUTOCOLRESSTARTED; /*!< (@ 0x00000138) Auto collision resolution process has started */
  1426. __IM uint32_t RESERVED5[3];
  1427. __IOM uint32_t EVENTS_COLLISION; /*!< (@ 0x00000148) NFC auto collision resolution error reported. */
  1428. __IOM uint32_t EVENTS_SELECTED; /*!< (@ 0x0000014C) NFC auto collision resolution successfully completed */
  1429. __IOM uint32_t EVENTS_STARTED; /*!< (@ 0x00000150) EasyDMA is ready to receive or send frames. */
  1430. __IM uint32_t RESERVED6[43];
  1431. __IOM uint32_t SHORTS; /*!< (@ 0x00000200) Shortcuts between local events and tasks */
  1432. __IM uint32_t RESERVED7[63];
  1433. __IOM uint32_t INTEN; /*!< (@ 0x00000300) Enable or disable interrupt */
  1434. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  1435. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  1436. __IM uint32_t RESERVED8[62];
  1437. __IOM uint32_t ERRORSTATUS; /*!< (@ 0x00000404) NFC Error Status register */
  1438. __IM uint32_t RESERVED9;
  1439. __IOM NFCT_FRAMESTATUS_Type FRAMESTATUS; /*!< (@ 0x0000040C) Unspecified */
  1440. __IM uint32_t NFCTAGSTATE; /*!< (@ 0x00000410) NfcTag state register */
  1441. __IM uint32_t RESERVED10[3];
  1442. __IM uint32_t SLEEPSTATE; /*!< (@ 0x00000420) Sleep state during automatic collision resolution */
  1443. __IM uint32_t RESERVED11[6];
  1444. __IM uint32_t FIELDPRESENT; /*!< (@ 0x0000043C) Indicates the presence or not of a valid field */
  1445. __IM uint32_t RESERVED12[49];
  1446. __IOM uint32_t FRAMEDELAYMIN; /*!< (@ 0x00000504) Minimum frame delay */
  1447. __IOM uint32_t FRAMEDELAYMAX; /*!< (@ 0x00000508) Maximum frame delay */
  1448. __IOM uint32_t FRAMEDELAYMODE; /*!< (@ 0x0000050C) Configuration register for the Frame Delay Timer */
  1449. __IOM uint32_t PACKETPTR; /*!< (@ 0x00000510) Packet pointer for TXD and RXD data storage in
  1450. Data RAM */
  1451. __IOM uint32_t MAXLEN; /*!< (@ 0x00000514) Size of the RAM buffer allocated to TXD and RXD
  1452. data storage each */
  1453. __IOM NFCT_TXD_Type TXD; /*!< (@ 0x00000518) Unspecified */
  1454. __IOM NFCT_RXD_Type RXD; /*!< (@ 0x00000520) Unspecified */
  1455. __IM uint32_t RESERVED13[26];
  1456. __IOM uint32_t NFCID1_LAST; /*!< (@ 0x00000590) Last NFCID1 part (4, 7 or 10 bytes ID) */
  1457. __IOM uint32_t NFCID1_2ND_LAST; /*!< (@ 0x00000594) Second last NFCID1 part (7 or 10 bytes ID) */
  1458. __IOM uint32_t NFCID1_3RD_LAST; /*!< (@ 0x00000598) Third last NFCID1 part (10 bytes ID) */
  1459. __IOM uint32_t AUTOCOLRESCONFIG; /*!< (@ 0x0000059C) Controls the auto collision resolution function.
  1460. This setting must be done before the NFCT
  1461. peripheral is enabled. */
  1462. __IOM uint32_t SENSRES; /*!< (@ 0x000005A0) NFC-A SENS_RES auto-response settings */
  1463. __IOM uint32_t SELRES; /*!< (@ 0x000005A4) NFC-A SEL_RES auto-response settings */
  1464. } NRF_NFCT_Type; /*!< Size = 1448 (0x5a8) */
  1465. /* =========================================================================================================================== */
  1466. /* ================ GPIOTE ================ */
  1467. /* =========================================================================================================================== */
  1468. /**
  1469. * @brief GPIO Tasks and Events (GPIOTE)
  1470. */
  1471. typedef struct { /*!< (@ 0x40006000) GPIOTE Structure */
  1472. __OM uint32_t TASKS_OUT[8]; /*!< (@ 0x00000000) Description collection: Task for writing to pin
  1473. specified in CONFIG[n].PSEL. Action on pin
  1474. is configured in CONFIG[n].POLARITY. */
  1475. __IM uint32_t RESERVED[4];
  1476. __OM uint32_t TASKS_SET[8]; /*!< (@ 0x00000030) Description collection: Task for writing to pin
  1477. specified in CONFIG[n].PSEL. Action on pin
  1478. is to set it high. */
  1479. __IM uint32_t RESERVED1[4];
  1480. __OM uint32_t TASKS_CLR[8]; /*!< (@ 0x00000060) Description collection: Task for writing to pin
  1481. specified in CONFIG[n].PSEL. Action on pin
  1482. is to set it low. */
  1483. __IM uint32_t RESERVED2[32];
  1484. __IOM uint32_t EVENTS_IN[8]; /*!< (@ 0x00000100) Description collection: Event generated from
  1485. pin specified in CONFIG[n].PSEL */
  1486. __IM uint32_t RESERVED3[23];
  1487. __IOM uint32_t EVENTS_PORT; /*!< (@ 0x0000017C) Event generated from multiple input GPIO pins
  1488. with SENSE mechanism enabled */
  1489. __IM uint32_t RESERVED4[97];
  1490. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  1491. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  1492. __IM uint32_t RESERVED5[129];
  1493. __IOM uint32_t CONFIG[8]; /*!< (@ 0x00000510) Description collection: Configuration for OUT[n],
  1494. SET[n] and CLR[n] tasks and IN[n] event */
  1495. } NRF_GPIOTE_Type; /*!< Size = 1328 (0x530) */
  1496. /* =========================================================================================================================== */
  1497. /* ================ SAADC ================ */
  1498. /* =========================================================================================================================== */
  1499. /**
  1500. * @brief Successive approximation register (SAR) analog-to-digital converter (SAADC)
  1501. */
  1502. typedef struct { /*!< (@ 0x40007000) SAADC Structure */
  1503. __OM uint32_t TASKS_START; /*!< (@ 0x00000000) Starts the SAADC and prepares the result buffer
  1504. in RAM */
  1505. __OM uint32_t TASKS_SAMPLE; /*!< (@ 0x00000004) Takes one SAADC sample */
  1506. __OM uint32_t TASKS_STOP; /*!< (@ 0x00000008) Stops the SAADC and terminates all on-going conversions */
  1507. __OM uint32_t TASKS_CALIBRATEOFFSET; /*!< (@ 0x0000000C) Starts offset auto-calibration */
  1508. __IM uint32_t RESERVED[60];
  1509. __IOM uint32_t EVENTS_STARTED; /*!< (@ 0x00000100) The SAADC has started */
  1510. __IOM uint32_t EVENTS_END; /*!< (@ 0x00000104) The SAADC has filled up the result buffer */
  1511. __IOM uint32_t EVENTS_DONE; /*!< (@ 0x00000108) A conversion task has been completed. Depending
  1512. on the configuration, multiple conversions
  1513. might be needed for a result to be transferred
  1514. to RAM. */
  1515. __IOM uint32_t EVENTS_RESULTDONE; /*!< (@ 0x0000010C) Result ready for transfer to RAM */
  1516. __IOM uint32_t EVENTS_CALIBRATEDONE; /*!< (@ 0x00000110) Calibration is complete */
  1517. __IOM uint32_t EVENTS_STOPPED; /*!< (@ 0x00000114) The SAADC has stopped */
  1518. __IOM SAADC_EVENTS_CH_Type EVENTS_CH[8]; /*!< (@ 0x00000118) Peripheral events. */
  1519. __IM uint32_t RESERVED1[106];
  1520. __IOM uint32_t INTEN; /*!< (@ 0x00000300) Enable or disable interrupt */
  1521. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  1522. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  1523. __IM uint32_t RESERVED2[61];
  1524. __IM uint32_t STATUS; /*!< (@ 0x00000400) Status */
  1525. __IM uint32_t RESERVED3[63];
  1526. __IOM uint32_t ENABLE; /*!< (@ 0x00000500) Enable or disable SAADC */
  1527. __IM uint32_t RESERVED4[3];
  1528. __IOM SAADC_CH_Type CH[8]; /*!< (@ 0x00000510) Unspecified */
  1529. __IM uint32_t RESERVED5[24];
  1530. __IOM uint32_t RESOLUTION; /*!< (@ 0x000005F0) Resolution configuration */
  1531. __IOM uint32_t OVERSAMPLE; /*!< (@ 0x000005F4) Oversampling configuration. The RESOLUTION is
  1532. applied before averaging, thus for high
  1533. OVERSAMPLE a higher RESOLUTION should be
  1534. used. */
  1535. __IOM uint32_t SAMPLERATE; /*!< (@ 0x000005F8) Controls normal or continuous sample rate */
  1536. __IM uint32_t RESERVED6[12];
  1537. __IOM SAADC_RESULT_Type RESULT; /*!< (@ 0x0000062C) RESULT EasyDMA channel */
  1538. } NRF_SAADC_Type; /*!< Size = 1592 (0x638) */
  1539. /* =========================================================================================================================== */
  1540. /* ================ TIMER0 ================ */
  1541. /* =========================================================================================================================== */
  1542. /**
  1543. * @brief Timer/Counter 0 (TIMER0)
  1544. */
  1545. typedef struct { /*!< (@ 0x40008000) TIMER0 Structure */
  1546. __OM uint32_t TASKS_START; /*!< (@ 0x00000000) Start Timer */
  1547. __OM uint32_t TASKS_STOP; /*!< (@ 0x00000004) Stop Timer */
  1548. __OM uint32_t TASKS_COUNT; /*!< (@ 0x00000008) Increment Timer (Counter mode only) */
  1549. __OM uint32_t TASKS_CLEAR; /*!< (@ 0x0000000C) Clear time */
  1550. __OM uint32_t TASKS_SHUTDOWN; /*!< (@ 0x00000010) Deprecated register - Shut down timer */
  1551. __IM uint32_t RESERVED[11];
  1552. __OM uint32_t TASKS_CAPTURE[6]; /*!< (@ 0x00000040) Description collection: Capture Timer value to
  1553. CC[n] register */
  1554. __IM uint32_t RESERVED1[58];
  1555. __IOM uint32_t EVENTS_COMPARE[6]; /*!< (@ 0x00000140) Description collection: Compare event on CC[n]
  1556. match */
  1557. __IM uint32_t RESERVED2[42];
  1558. __IOM uint32_t SHORTS; /*!< (@ 0x00000200) Shortcuts between local events and tasks */
  1559. __IM uint32_t RESERVED3[64];
  1560. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  1561. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  1562. __IM uint32_t RESERVED4[126];
  1563. __IOM uint32_t MODE; /*!< (@ 0x00000504) Timer mode selection */
  1564. __IOM uint32_t BITMODE; /*!< (@ 0x00000508) Configure the number of bits used by the TIMER */
  1565. __IM uint32_t RESERVED5;
  1566. __IOM uint32_t PRESCALER; /*!< (@ 0x00000510) Timer prescaler register */
  1567. __IM uint32_t RESERVED6[11];
  1568. __IOM uint32_t CC[6]; /*!< (@ 0x00000540) Description collection: Capture/Compare register
  1569. n */
  1570. } NRF_TIMER_Type; /*!< Size = 1368 (0x558) */
  1571. /* =========================================================================================================================== */
  1572. /* ================ RTC0 ================ */
  1573. /* =========================================================================================================================== */
  1574. /**
  1575. * @brief Real time counter 0 (RTC0)
  1576. */
  1577. typedef struct { /*!< (@ 0x4000B000) RTC0 Structure */
  1578. __OM uint32_t TASKS_START; /*!< (@ 0x00000000) Start RTC COUNTER */
  1579. __OM uint32_t TASKS_STOP; /*!< (@ 0x00000004) Stop RTC COUNTER */
  1580. __OM uint32_t TASKS_CLEAR; /*!< (@ 0x00000008) Clear RTC COUNTER */
  1581. __OM uint32_t TASKS_TRIGOVRFLW; /*!< (@ 0x0000000C) Set COUNTER to 0xFFFFF0 */
  1582. __IM uint32_t RESERVED[60];
  1583. __IOM uint32_t EVENTS_TICK; /*!< (@ 0x00000100) Event on COUNTER increment */
  1584. __IOM uint32_t EVENTS_OVRFLW; /*!< (@ 0x00000104) Event on COUNTER overflow */
  1585. __IM uint32_t RESERVED1[14];
  1586. __IOM uint32_t EVENTS_COMPARE[4]; /*!< (@ 0x00000140) Description collection: Compare event on CC[n]
  1587. match */
  1588. __IM uint32_t RESERVED2[109];
  1589. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  1590. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  1591. __IM uint32_t RESERVED3[13];
  1592. __IOM uint32_t EVTEN; /*!< (@ 0x00000340) Enable or disable event routing */
  1593. __IOM uint32_t EVTENSET; /*!< (@ 0x00000344) Enable event routing */
  1594. __IOM uint32_t EVTENCLR; /*!< (@ 0x00000348) Disable event routing */
  1595. __IM uint32_t RESERVED4[110];
  1596. __IM uint32_t COUNTER; /*!< (@ 0x00000504) Current COUNTER value */
  1597. __IOM uint32_t PRESCALER; /*!< (@ 0x00000508) 12 bit prescaler for COUNTER frequency (32768/(PRESCALER+1)).Mu
  1598. t be written when RTC is stopped */
  1599. __IM uint32_t RESERVED5[13];
  1600. __IOM uint32_t CC[4]; /*!< (@ 0x00000540) Description collection: Compare register n */
  1601. } NRF_RTC_Type; /*!< Size = 1360 (0x550) */
  1602. /* =========================================================================================================================== */
  1603. /* ================ TEMP ================ */
  1604. /* =========================================================================================================================== */
  1605. /**
  1606. * @brief Temperature Sensor (TEMP)
  1607. */
  1608. typedef struct { /*!< (@ 0x4000C000) TEMP Structure */
  1609. __OM uint32_t TASKS_START; /*!< (@ 0x00000000) Start temperature measurement */
  1610. __OM uint32_t TASKS_STOP; /*!< (@ 0x00000004) Stop temperature measurement */
  1611. __IM uint32_t RESERVED[62];
  1612. __IOM uint32_t EVENTS_DATARDY; /*!< (@ 0x00000100) Temperature measurement complete, data ready */
  1613. __IM uint32_t RESERVED1[128];
  1614. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  1615. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  1616. __IM uint32_t RESERVED2[127];
  1617. __IM int32_t TEMP; /*!< (@ 0x00000508) Temperature in degC (0.25deg steps) */
  1618. __IM uint32_t RESERVED3[5];
  1619. __IOM uint32_t A0; /*!< (@ 0x00000520) Slope of 1st piece wise linear function */
  1620. __IOM uint32_t A1; /*!< (@ 0x00000524) Slope of 2nd piece wise linear function */
  1621. __IOM uint32_t A2; /*!< (@ 0x00000528) Slope of 3rd piece wise linear function */
  1622. __IOM uint32_t A3; /*!< (@ 0x0000052C) Slope of 4th piece wise linear function */
  1623. __IOM uint32_t A4; /*!< (@ 0x00000530) Slope of 5th piece wise linear function */
  1624. __IOM uint32_t A5; /*!< (@ 0x00000534) Slope of 6th piece wise linear function */
  1625. __IM uint32_t RESERVED4[2];
  1626. __IOM uint32_t B0; /*!< (@ 0x00000540) y-intercept of 1st piece wise linear function */
  1627. __IOM uint32_t B1; /*!< (@ 0x00000544) y-intercept of 2nd piece wise linear function */
  1628. __IOM uint32_t B2; /*!< (@ 0x00000548) y-intercept of 3rd piece wise linear function */
  1629. __IOM uint32_t B3; /*!< (@ 0x0000054C) y-intercept of 4th piece wise linear function */
  1630. __IOM uint32_t B4; /*!< (@ 0x00000550) y-intercept of 5th piece wise linear function */
  1631. __IOM uint32_t B5; /*!< (@ 0x00000554) y-intercept of 6th piece wise linear function */
  1632. __IM uint32_t RESERVED5[2];
  1633. __IOM uint32_t T0; /*!< (@ 0x00000560) End point of 1st piece wise linear function */
  1634. __IOM uint32_t T1; /*!< (@ 0x00000564) End point of 2nd piece wise linear function */
  1635. __IOM uint32_t T2; /*!< (@ 0x00000568) End point of 3rd piece wise linear function */
  1636. __IOM uint32_t T3; /*!< (@ 0x0000056C) End point of 4th piece wise linear function */
  1637. __IOM uint32_t T4; /*!< (@ 0x00000570) End point of 5th piece wise linear function */
  1638. } NRF_TEMP_Type; /*!< Size = 1396 (0x574) */
  1639. /* =========================================================================================================================== */
  1640. /* ================ RNG ================ */
  1641. /* =========================================================================================================================== */
  1642. /**
  1643. * @brief Random Number Generator (RNG)
  1644. */
  1645. typedef struct { /*!< (@ 0x4000D000) RNG Structure */
  1646. __OM uint32_t TASKS_START; /*!< (@ 0x00000000) Task starting the random number generator */
  1647. __OM uint32_t TASKS_STOP; /*!< (@ 0x00000004) Task stopping the random number generator */
  1648. __IM uint32_t RESERVED[62];
  1649. __IOM uint32_t EVENTS_VALRDY; /*!< (@ 0x00000100) Event being generated for every new random number
  1650. written to the VALUE register */
  1651. __IM uint32_t RESERVED1[63];
  1652. __IOM uint32_t SHORTS; /*!< (@ 0x00000200) Shortcuts between local events and tasks */
  1653. __IM uint32_t RESERVED2[64];
  1654. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  1655. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  1656. __IM uint32_t RESERVED3[126];
  1657. __IOM uint32_t CONFIG; /*!< (@ 0x00000504) Configuration register */
  1658. __IM uint32_t VALUE; /*!< (@ 0x00000508) Output random number */
  1659. } NRF_RNG_Type; /*!< Size = 1292 (0x50c) */
  1660. /* =========================================================================================================================== */
  1661. /* ================ ECB ================ */
  1662. /* =========================================================================================================================== */
  1663. /**
  1664. * @brief AES ECB Mode Encryption (ECB)
  1665. */
  1666. typedef struct { /*!< (@ 0x4000E000) ECB Structure */
  1667. __OM uint32_t TASKS_STARTECB; /*!< (@ 0x00000000) Start ECB block encrypt */
  1668. __OM uint32_t TASKS_STOPECB; /*!< (@ 0x00000004) Abort a possible executing ECB operation */
  1669. __IM uint32_t RESERVED[62];
  1670. __IOM uint32_t EVENTS_ENDECB; /*!< (@ 0x00000100) ECB block encrypt complete */
  1671. __IOM uint32_t EVENTS_ERRORECB; /*!< (@ 0x00000104) ECB block encrypt aborted because of a STOPECB
  1672. task or due to an error */
  1673. __IM uint32_t RESERVED1[127];
  1674. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  1675. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  1676. __IM uint32_t RESERVED2[126];
  1677. __IOM uint32_t ECBDATAPTR; /*!< (@ 0x00000504) ECB block encrypt memory pointers */
  1678. } NRF_ECB_Type; /*!< Size = 1288 (0x508) */
  1679. /* =========================================================================================================================== */
  1680. /* ================ AAR ================ */
  1681. /* =========================================================================================================================== */
  1682. /**
  1683. * @brief Accelerated Address Resolver (AAR)
  1684. */
  1685. typedef struct { /*!< (@ 0x4000F000) AAR Structure */
  1686. __OM uint32_t TASKS_START; /*!< (@ 0x00000000) Start resolving addresses based on IRKs specified
  1687. in the IRK data structure */
  1688. __IM uint32_t RESERVED;
  1689. __OM uint32_t TASKS_STOP; /*!< (@ 0x00000008) Stop resolving addresses */
  1690. __IM uint32_t RESERVED1[61];
  1691. __IOM uint32_t EVENTS_END; /*!< (@ 0x00000100) Address resolution procedure complete */
  1692. __IOM uint32_t EVENTS_RESOLVED; /*!< (@ 0x00000104) Address resolved */
  1693. __IOM uint32_t EVENTS_NOTRESOLVED; /*!< (@ 0x00000108) Address not resolved */
  1694. __IM uint32_t RESERVED2[126];
  1695. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  1696. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  1697. __IM uint32_t RESERVED3[61];
  1698. __IM uint32_t STATUS; /*!< (@ 0x00000400) Resolution status */
  1699. __IM uint32_t RESERVED4[63];
  1700. __IOM uint32_t ENABLE; /*!< (@ 0x00000500) Enable AAR */
  1701. __IOM uint32_t NIRK; /*!< (@ 0x00000504) Number of IRKs */
  1702. __IOM uint32_t IRKPTR; /*!< (@ 0x00000508) Pointer to IRK data structure */
  1703. __IM uint32_t RESERVED5;
  1704. __IOM uint32_t ADDRPTR; /*!< (@ 0x00000510) Pointer to the resolvable address */
  1705. __IOM uint32_t SCRATCHPTR; /*!< (@ 0x00000514) Pointer to data area used for temporary storage */
  1706. } NRF_AAR_Type; /*!< Size = 1304 (0x518) */
  1707. /* =========================================================================================================================== */
  1708. /* ================ CCM ================ */
  1709. /* =========================================================================================================================== */
  1710. /**
  1711. * @brief AES CCM Mode Encryption (CCM)
  1712. */
  1713. typedef struct { /*!< (@ 0x4000F000) CCM Structure */
  1714. __OM uint32_t TASKS_KSGEN; /*!< (@ 0x00000000) Start generation of key-stream. This operation
  1715. will stop by itself when completed. */
  1716. __OM uint32_t TASKS_CRYPT; /*!< (@ 0x00000004) Start encryption/decryption. This operation will
  1717. stop by itself when completed. */
  1718. __OM uint32_t TASKS_STOP; /*!< (@ 0x00000008) Stop encryption/decryption */
  1719. __OM uint32_t TASKS_RATEOVERRIDE; /*!< (@ 0x0000000C) Override DATARATE setting in MODE register with
  1720. the contents of the RATEOVERRIDE register
  1721. for any ongoing encryption/decryption */
  1722. __IM uint32_t RESERVED[60];
  1723. __IOM uint32_t EVENTS_ENDKSGEN; /*!< (@ 0x00000100) Key-stream generation complete */
  1724. __IOM uint32_t EVENTS_ENDCRYPT; /*!< (@ 0x00000104) Encrypt/decrypt complete */
  1725. __IOM uint32_t EVENTS_ERROR; /*!< (@ 0x00000108) Deprecated register - CCM error event */
  1726. __IM uint32_t RESERVED1[61];
  1727. __IOM uint32_t SHORTS; /*!< (@ 0x00000200) Shortcuts between local events and tasks */
  1728. __IM uint32_t RESERVED2[64];
  1729. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  1730. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  1731. __IM uint32_t RESERVED3[61];
  1732. __IM uint32_t MICSTATUS; /*!< (@ 0x00000400) MIC check result */
  1733. __IM uint32_t RESERVED4[63];
  1734. __IOM uint32_t ENABLE; /*!< (@ 0x00000500) Enable */
  1735. __IOM uint32_t MODE; /*!< (@ 0x00000504) Operation mode */
  1736. __IOM uint32_t CNFPTR; /*!< (@ 0x00000508) Pointer to data structure holding AES key and
  1737. NONCE vector */
  1738. __IOM uint32_t INPTR; /*!< (@ 0x0000050C) Input pointer */
  1739. __IOM uint32_t OUTPTR; /*!< (@ 0x00000510) Output pointer */
  1740. __IOM uint32_t SCRATCHPTR; /*!< (@ 0x00000514) Pointer to data area used for temporary storage */
  1741. __IOM uint32_t MAXPACKETSIZE; /*!< (@ 0x00000518) Length of key-stream generated when MODE.LENGTH
  1742. = Extended. */
  1743. __IOM uint32_t RATEOVERRIDE; /*!< (@ 0x0000051C) Data rate override setting. */
  1744. } NRF_CCM_Type; /*!< Size = 1312 (0x520) */
  1745. /* =========================================================================================================================== */
  1746. /* ================ WDT ================ */
  1747. /* =========================================================================================================================== */
  1748. /**
  1749. * @brief Watchdog Timer (WDT)
  1750. */
  1751. typedef struct { /*!< (@ 0x40010000) WDT Structure */
  1752. __OM uint32_t TASKS_START; /*!< (@ 0x00000000) Start the watchdog */
  1753. __IM uint32_t RESERVED[63];
  1754. __IOM uint32_t EVENTS_TIMEOUT; /*!< (@ 0x00000100) Watchdog timeout */
  1755. __IM uint32_t RESERVED1[128];
  1756. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  1757. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  1758. __IM uint32_t RESERVED2[61];
  1759. __IM uint32_t RUNSTATUS; /*!< (@ 0x00000400) Run status */
  1760. __IM uint32_t REQSTATUS; /*!< (@ 0x00000404) Request status */
  1761. __IM uint32_t RESERVED3[63];
  1762. __IOM uint32_t CRV; /*!< (@ 0x00000504) Counter reload value */
  1763. __IOM uint32_t RREN; /*!< (@ 0x00000508) Enable register for reload request registers */
  1764. __IOM uint32_t CONFIG; /*!< (@ 0x0000050C) Configuration register */
  1765. __IM uint32_t RESERVED4[60];
  1766. __OM uint32_t RR[8]; /*!< (@ 0x00000600) Description collection: Reload request n */
  1767. } NRF_WDT_Type; /*!< Size = 1568 (0x620) */
  1768. /* =========================================================================================================================== */
  1769. /* ================ QDEC ================ */
  1770. /* =========================================================================================================================== */
  1771. /**
  1772. * @brief Quadrature Decoder (QDEC)
  1773. */
  1774. typedef struct { /*!< (@ 0x40012000) QDEC Structure */
  1775. __OM uint32_t TASKS_START; /*!< (@ 0x00000000) Task starting the quadrature decoder */
  1776. __OM uint32_t TASKS_STOP; /*!< (@ 0x00000004) Task stopping the quadrature decoder */
  1777. __OM uint32_t TASKS_READCLRACC; /*!< (@ 0x00000008) Read and clear ACC and ACCDBL */
  1778. __OM uint32_t TASKS_RDCLRACC; /*!< (@ 0x0000000C) Read and clear ACC */
  1779. __OM uint32_t TASKS_RDCLRDBL; /*!< (@ 0x00000010) Read and clear ACCDBL */
  1780. __IM uint32_t RESERVED[59];
  1781. __IOM uint32_t EVENTS_SAMPLERDY; /*!< (@ 0x00000100) Event being generated for every new sample value
  1782. written to the SAMPLE register */
  1783. __IOM uint32_t EVENTS_REPORTRDY; /*!< (@ 0x00000104) Non-null report ready */
  1784. __IOM uint32_t EVENTS_ACCOF; /*!< (@ 0x00000108) ACC or ACCDBL register overflow */
  1785. __IOM uint32_t EVENTS_DBLRDY; /*!< (@ 0x0000010C) Double displacement(s) detected */
  1786. __IOM uint32_t EVENTS_STOPPED; /*!< (@ 0x00000110) QDEC has been stopped */
  1787. __IM uint32_t RESERVED1[59];
  1788. __IOM uint32_t SHORTS; /*!< (@ 0x00000200) Shortcuts between local events and tasks */
  1789. __IM uint32_t RESERVED2[64];
  1790. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  1791. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  1792. __IM uint32_t RESERVED3[125];
  1793. __IOM uint32_t ENABLE; /*!< (@ 0x00000500) Enable the quadrature decoder */
  1794. __IOM uint32_t LEDPOL; /*!< (@ 0x00000504) LED output pin polarity */
  1795. __IOM uint32_t SAMPLEPER; /*!< (@ 0x00000508) Sample period */
  1796. __IM int32_t SAMPLE; /*!< (@ 0x0000050C) Motion sample value */
  1797. __IOM uint32_t REPORTPER; /*!< (@ 0x00000510) Number of samples to be taken before REPORTRDY
  1798. and DBLRDY events can be generated */
  1799. __IM int32_t ACC; /*!< (@ 0x00000514) Register accumulating the valid transitions */
  1800. __IM int32_t ACCREAD; /*!< (@ 0x00000518) Snapshot of the ACC register, updated by the
  1801. READCLRACC or RDCLRACC task */
  1802. __IOM QDEC_PSEL_Type PSEL; /*!< (@ 0x0000051C) Unspecified */
  1803. __IOM uint32_t DBFEN; /*!< (@ 0x00000528) Enable input debounce filters */
  1804. __IM uint32_t RESERVED4[5];
  1805. __IOM uint32_t LEDPRE; /*!< (@ 0x00000540) Time period the LED is switched ON prior to sampling */
  1806. __IM uint32_t ACCDBL; /*!< (@ 0x00000544) Register accumulating the number of detected
  1807. double transitions */
  1808. __IM uint32_t ACCDBLREAD; /*!< (@ 0x00000548) Snapshot of the ACCDBL, updated by the READCLRACC
  1809. or RDCLRDBL task */
  1810. } NRF_QDEC_Type; /*!< Size = 1356 (0x54c) */
  1811. /* =========================================================================================================================== */
  1812. /* ================ COMP ================ */
  1813. /* =========================================================================================================================== */
  1814. /**
  1815. * @brief Comparator (COMP)
  1816. */
  1817. typedef struct { /*!< (@ 0x40013000) COMP Structure */
  1818. __OM uint32_t TASKS_START; /*!< (@ 0x00000000) Start comparator */
  1819. __OM uint32_t TASKS_STOP; /*!< (@ 0x00000004) Stop comparator */
  1820. __OM uint32_t TASKS_SAMPLE; /*!< (@ 0x00000008) Sample comparator value */
  1821. __IM uint32_t RESERVED[61];
  1822. __IOM uint32_t EVENTS_READY; /*!< (@ 0x00000100) COMP is ready and output is valid */
  1823. __IOM uint32_t EVENTS_DOWN; /*!< (@ 0x00000104) Downward crossing */
  1824. __IOM uint32_t EVENTS_UP; /*!< (@ 0x00000108) Upward crossing */
  1825. __IOM uint32_t EVENTS_CROSS; /*!< (@ 0x0000010C) Downward or upward crossing */
  1826. __IM uint32_t RESERVED1[60];
  1827. __IOM uint32_t SHORTS; /*!< (@ 0x00000200) Shortcuts between local events and tasks */
  1828. __IM uint32_t RESERVED2[63];
  1829. __IOM uint32_t INTEN; /*!< (@ 0x00000300) Enable or disable interrupt */
  1830. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  1831. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  1832. __IM uint32_t RESERVED3[61];
  1833. __IM uint32_t RESULT; /*!< (@ 0x00000400) Compare result */
  1834. __IM uint32_t RESERVED4[63];
  1835. __IOM uint32_t ENABLE; /*!< (@ 0x00000500) COMP enable */
  1836. __IOM uint32_t PSEL; /*!< (@ 0x00000504) Pin select */
  1837. __IOM uint32_t REFSEL; /*!< (@ 0x00000508) Reference source select for single-ended mode */
  1838. __IOM uint32_t EXTREFSEL; /*!< (@ 0x0000050C) External reference select */
  1839. __IM uint32_t RESERVED5[8];
  1840. __IOM uint32_t TH; /*!< (@ 0x00000530) Threshold configuration for hysteresis unit */
  1841. __IOM uint32_t MODE; /*!< (@ 0x00000534) Mode configuration */
  1842. __IOM uint32_t HYST; /*!< (@ 0x00000538) Comparator hysteresis enable */
  1843. } NRF_COMP_Type; /*!< Size = 1340 (0x53c) */
  1844. /* =========================================================================================================================== */
  1845. /* ================ LPCOMP ================ */
  1846. /* =========================================================================================================================== */
  1847. /**
  1848. * @brief Low Power Comparator (LPCOMP)
  1849. */
  1850. typedef struct { /*!< (@ 0x40013000) LPCOMP Structure */
  1851. __OM uint32_t TASKS_START; /*!< (@ 0x00000000) Start comparator */
  1852. __OM uint32_t TASKS_STOP; /*!< (@ 0x00000004) Stop comparator */
  1853. __OM uint32_t TASKS_SAMPLE; /*!< (@ 0x00000008) Sample comparator value */
  1854. __IM uint32_t RESERVED[61];
  1855. __IOM uint32_t EVENTS_READY; /*!< (@ 0x00000100) LPCOMP is ready and output is valid */
  1856. __IOM uint32_t EVENTS_DOWN; /*!< (@ 0x00000104) Downward crossing */
  1857. __IOM uint32_t EVENTS_UP; /*!< (@ 0x00000108) Upward crossing */
  1858. __IOM uint32_t EVENTS_CROSS; /*!< (@ 0x0000010C) Downward or upward crossing */
  1859. __IM uint32_t RESERVED1[60];
  1860. __IOM uint32_t SHORTS; /*!< (@ 0x00000200) Shortcuts between local events and tasks */
  1861. __IM uint32_t RESERVED2[64];
  1862. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  1863. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  1864. __IM uint32_t RESERVED3[61];
  1865. __IM uint32_t RESULT; /*!< (@ 0x00000400) Compare result */
  1866. __IM uint32_t RESERVED4[63];
  1867. __IOM uint32_t ENABLE; /*!< (@ 0x00000500) Enable LPCOMP */
  1868. __IOM uint32_t PSEL; /*!< (@ 0x00000504) Input pin select */
  1869. __IOM uint32_t REFSEL; /*!< (@ 0x00000508) Reference select */
  1870. __IOM uint32_t EXTREFSEL; /*!< (@ 0x0000050C) External reference select */
  1871. __IM uint32_t RESERVED5[4];
  1872. __IOM uint32_t ANADETECT; /*!< (@ 0x00000520) Analog detect configuration */
  1873. __IM uint32_t RESERVED6[5];
  1874. __IOM uint32_t HYST; /*!< (@ 0x00000538) Comparator hysteresis enable */
  1875. } NRF_LPCOMP_Type; /*!< Size = 1340 (0x53c) */
  1876. /* =========================================================================================================================== */
  1877. /* ================ EGU0 ================ */
  1878. /* =========================================================================================================================== */
  1879. /**
  1880. * @brief Event Generator Unit 0 (EGU0)
  1881. */
  1882. typedef struct { /*!< (@ 0x40014000) EGU0 Structure */
  1883. __OM uint32_t TASKS_TRIGGER[16]; /*!< (@ 0x00000000) Description collection: Trigger n for triggering
  1884. the corresponding TRIGGERED[n] event */
  1885. __IM uint32_t RESERVED[48];
  1886. __IOM uint32_t EVENTS_TRIGGERED[16]; /*!< (@ 0x00000100) Description collection: Event number n generated
  1887. by triggering the corresponding TRIGGER[n]
  1888. task */
  1889. __IM uint32_t RESERVED1[112];
  1890. __IOM uint32_t INTEN; /*!< (@ 0x00000300) Enable or disable interrupt */
  1891. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  1892. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  1893. } NRF_EGU_Type; /*!< Size = 780 (0x30c) */
  1894. /* =========================================================================================================================== */
  1895. /* ================ SWI0 ================ */
  1896. /* =========================================================================================================================== */
  1897. /**
  1898. * @brief Software interrupt 0 (SWI0)
  1899. */
  1900. typedef struct { /*!< (@ 0x40014000) SWI0 Structure */
  1901. __IM uint32_t UNUSED; /*!< (@ 0x00000000) Unused. */
  1902. } NRF_SWI_Type; /*!< Size = 4 (0x4) */
  1903. /* =========================================================================================================================== */
  1904. /* ================ PWM0 ================ */
  1905. /* =========================================================================================================================== */
  1906. /**
  1907. * @brief Pulse width modulation unit 0 (PWM0)
  1908. */
  1909. typedef struct { /*!< (@ 0x4001C000) PWM0 Structure */
  1910. __IM uint32_t RESERVED;
  1911. __OM uint32_t TASKS_STOP; /*!< (@ 0x00000004) Stops PWM pulse generation on all channels at
  1912. the end of current PWM period, and stops
  1913. sequence playback */
  1914. __OM uint32_t TASKS_SEQSTART[2]; /*!< (@ 0x00000008) Description collection: Loads the first PWM value
  1915. on all enabled channels from sequence n,
  1916. and starts playing that sequence at the
  1917. rate defined in SEQ[n]REFRESH and/or DECODER.MODE.
  1918. Causes PWM generation to start if not running. */
  1919. __OM uint32_t TASKS_NEXTSTEP; /*!< (@ 0x00000010) Steps by one value in the current sequence on
  1920. all enabled channels if DECODER.MODE=NextStep.
  1921. Does not cause PWM generation to start if
  1922. not running. */
  1923. __IM uint32_t RESERVED1[60];
  1924. __IOM uint32_t EVENTS_STOPPED; /*!< (@ 0x00000104) Response to STOP task, emitted when PWM pulses
  1925. are no longer generated */
  1926. __IOM uint32_t EVENTS_SEQSTARTED[2]; /*!< (@ 0x00000108) Description collection: First PWM period started
  1927. on sequence n */
  1928. __IOM uint32_t EVENTS_SEQEND[2]; /*!< (@ 0x00000110) Description collection: Emitted at end of every
  1929. sequence n, when last value from RAM has
  1930. been applied to wave counter */
  1931. __IOM uint32_t EVENTS_PWMPERIODEND; /*!< (@ 0x00000118) Emitted at the end of each PWM period */
  1932. __IOM uint32_t EVENTS_LOOPSDONE; /*!< (@ 0x0000011C) Concatenated sequences have been played the amount
  1933. of times defined in LOOP.CNT */
  1934. __IM uint32_t RESERVED2[56];
  1935. __IOM uint32_t SHORTS; /*!< (@ 0x00000200) Shortcuts between local events and tasks */
  1936. __IM uint32_t RESERVED3[63];
  1937. __IOM uint32_t INTEN; /*!< (@ 0x00000300) Enable or disable interrupt */
  1938. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  1939. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  1940. __IM uint32_t RESERVED4[125];
  1941. __IOM uint32_t ENABLE; /*!< (@ 0x00000500) PWM module enable register */
  1942. __IOM uint32_t MODE; /*!< (@ 0x00000504) Selects operating mode of the wave counter */
  1943. __IOM uint32_t COUNTERTOP; /*!< (@ 0x00000508) Value up to which the pulse generator counter
  1944. counts */
  1945. __IOM uint32_t PRESCALER; /*!< (@ 0x0000050C) Configuration for PWM_CLK */
  1946. __IOM uint32_t DECODER; /*!< (@ 0x00000510) Configuration of the decoder */
  1947. __IOM uint32_t LOOP; /*!< (@ 0x00000514) Number of playbacks of a loop */
  1948. __IM uint32_t RESERVED5[2];
  1949. __IOM PWM_SEQ_Type SEQ[2]; /*!< (@ 0x00000520) Unspecified */
  1950. __IOM PWM_PSEL_Type PSEL; /*!< (@ 0x00000560) Unspecified */
  1951. } NRF_PWM_Type; /*!< Size = 1392 (0x570) */
  1952. /* =========================================================================================================================== */
  1953. /* ================ PDM ================ */
  1954. /* =========================================================================================================================== */
  1955. /**
  1956. * @brief Pulse Density Modulation (Digital Microphone) Interface (PDM)
  1957. */
  1958. typedef struct { /*!< (@ 0x4001D000) PDM Structure */
  1959. __OM uint32_t TASKS_START; /*!< (@ 0x00000000) Starts continuous PDM transfer */
  1960. __OM uint32_t TASKS_STOP; /*!< (@ 0x00000004) Stops PDM transfer */
  1961. __IM uint32_t RESERVED[62];
  1962. __IOM uint32_t EVENTS_STARTED; /*!< (@ 0x00000100) PDM transfer has started */
  1963. __IOM uint32_t EVENTS_STOPPED; /*!< (@ 0x00000104) PDM transfer has finished */
  1964. __IOM uint32_t EVENTS_END; /*!< (@ 0x00000108) The PDM has written the last sample specified
  1965. by SAMPLE.MAXCNT (or the last sample after
  1966. a STOP task has been received) to Data RAM */
  1967. __IM uint32_t RESERVED1[125];
  1968. __IOM uint32_t INTEN; /*!< (@ 0x00000300) Enable or disable interrupt */
  1969. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  1970. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  1971. __IM uint32_t RESERVED2[125];
  1972. __IOM uint32_t ENABLE; /*!< (@ 0x00000500) PDM module enable register */
  1973. __IOM uint32_t PDMCLKCTRL; /*!< (@ 0x00000504) PDM clock generator control */
  1974. __IOM uint32_t MODE; /*!< (@ 0x00000508) Defines the routing of the connected PDM microphones'
  1975. signals */
  1976. __IM uint32_t RESERVED3[3];
  1977. __IOM uint32_t GAINL; /*!< (@ 0x00000518) Left output gain adjustment */
  1978. __IOM uint32_t GAINR; /*!< (@ 0x0000051C) Right output gain adjustment */
  1979. __IOM uint32_t RATIO; /*!< (@ 0x00000520) Selects the ratio between PDM_CLK and output
  1980. sample rate. Change PDMCLKCTRL accordingly. */
  1981. __IM uint32_t RESERVED4[7];
  1982. __IOM PDM_PSEL_Type PSEL; /*!< (@ 0x00000540) Unspecified */
  1983. __IM uint32_t RESERVED5[6];
  1984. __IOM PDM_SAMPLE_Type SAMPLE; /*!< (@ 0x00000560) Unspecified */
  1985. } NRF_PDM_Type; /*!< Size = 1384 (0x568) */
  1986. /* =========================================================================================================================== */
  1987. /* ================ ACL ================ */
  1988. /* =========================================================================================================================== */
  1989. /**
  1990. * @brief Access control lists (ACL)
  1991. */
  1992. typedef struct { /*!< (@ 0x4001E000) ACL Structure */
  1993. __IM uint32_t RESERVED[512];
  1994. __IOM ACL_ACL_Type ACL[8]; /*!< (@ 0x00000800) Unspecified */
  1995. } NRF_ACL_Type; /*!< Size = 2176 (0x880) */
  1996. /* =========================================================================================================================== */
  1997. /* ================ NVMC ================ */
  1998. /* =========================================================================================================================== */
  1999. /**
  2000. * @brief Non Volatile Memory Controller (NVMC)
  2001. */
  2002. typedef struct { /*!< (@ 0x4001E000) NVMC Structure */
  2003. __IM uint32_t RESERVED[256];
  2004. __IM uint32_t READY; /*!< (@ 0x00000400) Ready flag */
  2005. __IM uint32_t RESERVED1;
  2006. __IM uint32_t READYNEXT; /*!< (@ 0x00000408) Ready flag */
  2007. __IM uint32_t RESERVED2[62];
  2008. __IOM uint32_t CONFIG; /*!< (@ 0x00000504) Configuration register */
  2009. union {
  2010. __IOM uint32_t ERASEPAGE; /*!< (@ 0x00000508) Register for erasing a page in code area */
  2011. __IOM uint32_t ERASEPCR1; /*!< (@ 0x00000508) Deprecated register - Register for erasing a
  2012. page in code area. Equivalent to ERASEPAGE. */
  2013. };
  2014. __IOM uint32_t ERASEALL; /*!< (@ 0x0000050C) Register for erasing all non-volatile user memory */
  2015. __IOM uint32_t ERASEPCR0; /*!< (@ 0x00000510) Deprecated register - Register for erasing a
  2016. page in code area. Equivalent to ERASEPAGE. */
  2017. __IOM uint32_t ERASEUICR; /*!< (@ 0x00000514) Register for erasing user information configuration
  2018. registers */
  2019. __IOM uint32_t ERASEPAGEPARTIAL; /*!< (@ 0x00000518) Register for partial erase of a page in code
  2020. area */
  2021. __IOM uint32_t ERASEPAGEPARTIALCFG; /*!< (@ 0x0000051C) Register for partial erase configuration */
  2022. __IM uint32_t RESERVED3[8];
  2023. __IOM uint32_t ICACHECNF; /*!< (@ 0x00000540) I-code cache configuration register. */
  2024. __IM uint32_t RESERVED4;
  2025. __IOM uint32_t IHIT; /*!< (@ 0x00000548) I-code cache hit counter. */
  2026. __IOM uint32_t IMISS; /*!< (@ 0x0000054C) I-code cache miss counter. */
  2027. } NRF_NVMC_Type; /*!< Size = 1360 (0x550) */
  2028. /* =========================================================================================================================== */
  2029. /* ================ PPI ================ */
  2030. /* =========================================================================================================================== */
  2031. /**
  2032. * @brief Programmable Peripheral Interconnect (PPI)
  2033. */
  2034. typedef struct { /*!< (@ 0x4001F000) PPI Structure */
  2035. __OM PPI_TASKS_CHG_Type TASKS_CHG[6]; /*!< (@ 0x00000000) Channel group tasks */
  2036. __IM uint32_t RESERVED[308];
  2037. __IOM uint32_t CHEN; /*!< (@ 0x00000500) Channel enable register */
  2038. __IOM uint32_t CHENSET; /*!< (@ 0x00000504) Channel enable set register */
  2039. __IOM uint32_t CHENCLR; /*!< (@ 0x00000508) Channel enable clear register */
  2040. __IM uint32_t RESERVED1;
  2041. __IOM PPI_CH_Type CH[20]; /*!< (@ 0x00000510) PPI Channel */
  2042. __IM uint32_t RESERVED2[148];
  2043. __IOM uint32_t CHG[6]; /*!< (@ 0x00000800) Description collection: Channel group n */
  2044. __IM uint32_t RESERVED3[62];
  2045. __IOM PPI_FORK_Type FORK[32]; /*!< (@ 0x00000910) Fork */
  2046. } NRF_PPI_Type; /*!< Size = 2448 (0x990) */
  2047. /* =========================================================================================================================== */
  2048. /* ================ MWU ================ */
  2049. /* =========================================================================================================================== */
  2050. /**
  2051. * @brief Memory Watch Unit (MWU)
  2052. */
  2053. typedef struct { /*!< (@ 0x40020000) MWU Structure */
  2054. __IM uint32_t RESERVED[64];
  2055. __IOM MWU_EVENTS_REGION_Type EVENTS_REGION[4];/*!< (@ 0x00000100) Peripheral events. */
  2056. __IM uint32_t RESERVED1[16];
  2057. __IOM MWU_EVENTS_PREGION_Type EVENTS_PREGION[2];/*!< (@ 0x00000160) Peripheral events. */
  2058. __IM uint32_t RESERVED2[100];
  2059. __IOM uint32_t INTEN; /*!< (@ 0x00000300) Enable or disable interrupt */
  2060. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  2061. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  2062. __IM uint32_t RESERVED3[5];
  2063. __IOM uint32_t NMIEN; /*!< (@ 0x00000320) Enable or disable interrupt */
  2064. __IOM uint32_t NMIENSET; /*!< (@ 0x00000324) Enable interrupt */
  2065. __IOM uint32_t NMIENCLR; /*!< (@ 0x00000328) Disable interrupt */
  2066. __IM uint32_t RESERVED4[53];
  2067. __IOM MWU_PERREGION_Type PERREGION[2]; /*!< (@ 0x00000400) Unspecified */
  2068. __IM uint32_t RESERVED5[64];
  2069. __IOM uint32_t REGIONEN; /*!< (@ 0x00000510) Enable/disable regions watch */
  2070. __IOM uint32_t REGIONENSET; /*!< (@ 0x00000514) Enable regions watch */
  2071. __IOM uint32_t REGIONENCLR; /*!< (@ 0x00000518) Disable regions watch */
  2072. __IM uint32_t RESERVED6[57];
  2073. __IOM MWU_REGION_Type REGION[4]; /*!< (@ 0x00000600) Unspecified */
  2074. __IM uint32_t RESERVED7[32];
  2075. __IOM MWU_PREGION_Type PREGION[2]; /*!< (@ 0x000006C0) Unspecified */
  2076. } NRF_MWU_Type; /*!< Size = 1760 (0x6e0) */
  2077. /* =========================================================================================================================== */
  2078. /* ================ I2S ================ */
  2079. /* =========================================================================================================================== */
  2080. /**
  2081. * @brief Inter-IC Sound (I2S)
  2082. */
  2083. typedef struct { /*!< (@ 0x40025000) I2S Structure */
  2084. __OM uint32_t TASKS_START; /*!< (@ 0x00000000) Starts continuous I2S transfer. Also starts MCK
  2085. generator when this is enabled. */
  2086. __OM uint32_t TASKS_STOP; /*!< (@ 0x00000004) Stops I2S transfer. Also stops MCK generator.
  2087. Triggering this task will cause the STOPPED
  2088. event to be generated. */
  2089. __IM uint32_t RESERVED[63];
  2090. __IOM uint32_t EVENTS_RXPTRUPD; /*!< (@ 0x00000104) The RXD.PTR register has been copied to internal
  2091. double-buffers. When the I2S module is started
  2092. and RX is enabled, this event will be generated
  2093. for every RXTXD.MAXCNT words that are received
  2094. on the SDIN pin. */
  2095. __IOM uint32_t EVENTS_STOPPED; /*!< (@ 0x00000108) I2S transfer stopped. */
  2096. __IM uint32_t RESERVED1[2];
  2097. __IOM uint32_t EVENTS_TXPTRUPD; /*!< (@ 0x00000114) The TDX.PTR register has been copied to internal
  2098. double-buffers. When the I2S module is started
  2099. and TX is enabled, this event will be generated
  2100. for every RXTXD.MAXCNT words that are sent
  2101. on the SDOUT pin. */
  2102. __IM uint32_t RESERVED2[122];
  2103. __IOM uint32_t INTEN; /*!< (@ 0x00000300) Enable or disable interrupt */
  2104. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  2105. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  2106. __IM uint32_t RESERVED3[125];
  2107. __IOM uint32_t ENABLE; /*!< (@ 0x00000500) Enable I2S module. */
  2108. __IOM I2S_CONFIG_Type CONFIG; /*!< (@ 0x00000504) Unspecified */
  2109. __IM uint32_t RESERVED4[3];
  2110. __IOM I2S_RXD_Type RXD; /*!< (@ 0x00000538) Unspecified */
  2111. __IM uint32_t RESERVED5;
  2112. __IOM I2S_TXD_Type TXD; /*!< (@ 0x00000540) Unspecified */
  2113. __IM uint32_t RESERVED6[3];
  2114. __IOM I2S_RXTXD_Type RXTXD; /*!< (@ 0x00000550) Unspecified */
  2115. __IM uint32_t RESERVED7[3];
  2116. __IOM I2S_PSEL_Type PSEL; /*!< (@ 0x00000560) Unspecified */
  2117. } NRF_I2S_Type; /*!< Size = 1396 (0x574) */
  2118. /* =========================================================================================================================== */
  2119. /* ================ FPU ================ */
  2120. /* =========================================================================================================================== */
  2121. /**
  2122. * @brief FPU (FPU)
  2123. */
  2124. typedef struct { /*!< (@ 0x40026000) FPU Structure */
  2125. __IM uint32_t UNUSED; /*!< (@ 0x00000000) Unused. */
  2126. } NRF_FPU_Type; /*!< Size = 4 (0x4) */
  2127. /* =========================================================================================================================== */
  2128. /* ================ USBD ================ */
  2129. /* =========================================================================================================================== */
  2130. /**
  2131. * @brief Universal serial bus device (USBD)
  2132. */
  2133. typedef struct { /*!< (@ 0x40027000) USBD Structure */
  2134. __IM uint32_t RESERVED;
  2135. __OM uint32_t TASKS_STARTEPIN[8]; /*!< (@ 0x00000004) Description collection: Captures the EPIN[n].PTR
  2136. and EPIN[n].MAXCNT registers values, and
  2137. enables endpoint IN n to respond to traffic
  2138. from host */
  2139. __OM uint32_t TASKS_STARTISOIN; /*!< (@ 0x00000024) Captures the ISOIN.PTR and ISOIN.MAXCNT registers
  2140. values, and enables sending data on ISO
  2141. endpoint */
  2142. __OM uint32_t TASKS_STARTEPOUT[8]; /*!< (@ 0x00000028) Description collection: Captures the EPOUT[n].PTR
  2143. and EPOUT[n].MAXCNT registers values, and
  2144. enables endpoint n to respond to traffic
  2145. from host */
  2146. __OM uint32_t TASKS_STARTISOOUT; /*!< (@ 0x00000048) Captures the ISOOUT.PTR and ISOOUT.MAXCNT registers
  2147. values, and enables receiving of data on
  2148. ISO endpoint */
  2149. __OM uint32_t TASKS_EP0RCVOUT; /*!< (@ 0x0000004C) Allows OUT data stage on control endpoint 0 */
  2150. __OM uint32_t TASKS_EP0STATUS; /*!< (@ 0x00000050) Allows status stage on control endpoint 0 */
  2151. __OM uint32_t TASKS_EP0STALL; /*!< (@ 0x00000054) Stalls data and status stage on control endpoint
  2152. 0 */
  2153. __OM uint32_t TASKS_DPDMDRIVE; /*!< (@ 0x00000058) Forces D+ and D- lines into the state defined
  2154. in the DPDMVALUE register */
  2155. __OM uint32_t TASKS_DPDMNODRIVE; /*!< (@ 0x0000005C) Stops forcing D+ and D- lines into any state
  2156. (USB engine takes control) */
  2157. __IM uint32_t RESERVED1[40];
  2158. __IOM uint32_t EVENTS_USBRESET; /*!< (@ 0x00000100) Signals that a USB reset condition has been detected
  2159. on USB lines */
  2160. __IOM uint32_t EVENTS_STARTED; /*!< (@ 0x00000104) Confirms that the EPIN[n].PTR and EPIN[n].MAXCNT,
  2161. or EPOUT[n].PTR and EPOUT[n].MAXCNT registers
  2162. have been captured on all endpoints reported
  2163. in the EPSTATUS register */
  2164. __IOM uint32_t EVENTS_ENDEPIN[8]; /*!< (@ 0x00000108) Description collection: The whole EPIN[n] buffer
  2165. has been consumed. The RAM buffer can be
  2166. accessed safely by software. */
  2167. __IOM uint32_t EVENTS_EP0DATADONE; /*!< (@ 0x00000128) An acknowledged data transfer has taken place
  2168. on the control endpoint */
  2169. __IOM uint32_t EVENTS_ENDISOIN; /*!< (@ 0x0000012C) The whole ISOIN buffer has been consumed. The
  2170. RAM buffer can be accessed safely by software. */
  2171. __IOM uint32_t EVENTS_ENDEPOUT[8]; /*!< (@ 0x00000130) Description collection: The whole EPOUT[n] buffer
  2172. has been consumed. The RAM buffer can be
  2173. accessed safely by software. */
  2174. __IOM uint32_t EVENTS_ENDISOOUT; /*!< (@ 0x00000150) The whole ISOOUT buffer has been consumed. The
  2175. RAM buffer can be accessed safely by software. */
  2176. __IOM uint32_t EVENTS_SOF; /*!< (@ 0x00000154) Signals that a SOF (start of frame) condition
  2177. has been detected on USB lines */
  2178. __IOM uint32_t EVENTS_USBEVENT; /*!< (@ 0x00000158) An event or an error not covered by specific
  2179. events has occurred. Check EVENTCAUSE register
  2180. to find the cause. */
  2181. __IOM uint32_t EVENTS_EP0SETUP; /*!< (@ 0x0000015C) A valid SETUP token has been received (and acknowledged)
  2182. on the control endpoint */
  2183. __IOM uint32_t EVENTS_EPDATA; /*!< (@ 0x00000160) A data transfer has occurred on a data endpoint,
  2184. indicated by the EPDATASTATUS register */
  2185. __IM uint32_t RESERVED2[39];
  2186. __IOM uint32_t SHORTS; /*!< (@ 0x00000200) Shortcuts between local events and tasks */
  2187. __IM uint32_t RESERVED3[63];
  2188. __IOM uint32_t INTEN; /*!< (@ 0x00000300) Enable or disable interrupt */
  2189. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  2190. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  2191. __IM uint32_t RESERVED4[61];
  2192. __IOM uint32_t EVENTCAUSE; /*!< (@ 0x00000400) Details on what caused the USBEVENT event */
  2193. __IM uint32_t RESERVED5[7];
  2194. __IOM USBD_HALTED_Type HALTED; /*!< (@ 0x00000420) Unspecified */
  2195. __IM uint32_t RESERVED6;
  2196. __IOM uint32_t EPSTATUS; /*!< (@ 0x00000468) Provides information on which endpoint's EasyDMA
  2197. registers have been captured */
  2198. __IOM uint32_t EPDATASTATUS; /*!< (@ 0x0000046C) Provides information on which endpoint(s) an
  2199. acknowledged data transfer has occurred
  2200. (EPDATA event) */
  2201. __IM uint32_t USBADDR; /*!< (@ 0x00000470) Device USB address */
  2202. __IM uint32_t RESERVED7[3];
  2203. __IM uint32_t BMREQUESTTYPE; /*!< (@ 0x00000480) SETUP data, byte 0, bmRequestType */
  2204. __IM uint32_t BREQUEST; /*!< (@ 0x00000484) SETUP data, byte 1, bRequest */
  2205. __IM uint32_t WVALUEL; /*!< (@ 0x00000488) SETUP data, byte 2, LSB of wValue */
  2206. __IM uint32_t WVALUEH; /*!< (@ 0x0000048C) SETUP data, byte 3, MSB of wValue */
  2207. __IM uint32_t WINDEXL; /*!< (@ 0x00000490) SETUP data, byte 4, LSB of wIndex */
  2208. __IM uint32_t WINDEXH; /*!< (@ 0x00000494) SETUP data, byte 5, MSB of wIndex */
  2209. __IM uint32_t WLENGTHL; /*!< (@ 0x00000498) SETUP data, byte 6, LSB of wLength */
  2210. __IM uint32_t WLENGTHH; /*!< (@ 0x0000049C) SETUP data, byte 7, MSB of wLength */
  2211. __IOM USBD_SIZE_Type SIZE; /*!< (@ 0x000004A0) Unspecified */
  2212. __IM uint32_t RESERVED8[15];
  2213. __IOM uint32_t ENABLE; /*!< (@ 0x00000500) Enable USB */
  2214. __IOM uint32_t USBPULLUP; /*!< (@ 0x00000504) Control of the USB pull-up */
  2215. __IOM uint32_t DPDMVALUE; /*!< (@ 0x00000508) State D+ and D- lines will be forced into by
  2216. the DPDMDRIVE task. The DPDMNODRIVE task
  2217. reverts the control of the lines to MAC
  2218. IP (no forcing). */
  2219. __IOM uint32_t DTOGGLE; /*!< (@ 0x0000050C) Data toggle control and status */
  2220. __IOM uint32_t EPINEN; /*!< (@ 0x00000510) Endpoint IN enable */
  2221. __IOM uint32_t EPOUTEN; /*!< (@ 0x00000514) Endpoint OUT enable */
  2222. __OM uint32_t EPSTALL; /*!< (@ 0x00000518) STALL endpoints */
  2223. __IOM uint32_t ISOSPLIT; /*!< (@ 0x0000051C) Controls the split of ISO buffers */
  2224. __IM uint32_t FRAMECNTR; /*!< (@ 0x00000520) Returns the current value of the start of frame
  2225. counter */
  2226. __IM uint32_t RESERVED9[2];
  2227. __IOM uint32_t LOWPOWER; /*!< (@ 0x0000052C) Controls USBD peripheral low power mode during
  2228. USB suspend */
  2229. __IOM uint32_t ISOINCONFIG; /*!< (@ 0x00000530) Controls the response of the ISO IN endpoint
  2230. to an IN token when no data is ready to
  2231. be sent */
  2232. __IM uint32_t RESERVED10[51];
  2233. __IOM USBD_EPIN_Type EPIN[8]; /*!< (@ 0x00000600) Unspecified */
  2234. __IOM USBD_ISOIN_Type ISOIN; /*!< (@ 0x000006A0) Unspecified */
  2235. __IM uint32_t RESERVED11[21];
  2236. __IOM USBD_EPOUT_Type EPOUT[8]; /*!< (@ 0x00000700) Unspecified */
  2237. __IOM USBD_ISOOUT_Type ISOOUT; /*!< (@ 0x000007A0) Unspecified */
  2238. } NRF_USBD_Type; /*!< Size = 1964 (0x7ac) */
  2239. /* =========================================================================================================================== */
  2240. /* ================ QSPI ================ */
  2241. /* =========================================================================================================================== */
  2242. /**
  2243. * @brief External flash interface (QSPI)
  2244. */
  2245. typedef struct { /*!< (@ 0x40029000) QSPI Structure */
  2246. __OM uint32_t TASKS_ACTIVATE; /*!< (@ 0x00000000) Activate QSPI interface */
  2247. __OM uint32_t TASKS_READSTART; /*!< (@ 0x00000004) Start transfer from external flash memory to
  2248. internal RAM */
  2249. __OM uint32_t TASKS_WRITESTART; /*!< (@ 0x00000008) Start transfer from internal RAM to external
  2250. flash memory */
  2251. __OM uint32_t TASKS_ERASESTART; /*!< (@ 0x0000000C) Start external flash memory erase operation */
  2252. __OM uint32_t TASKS_DEACTIVATE; /*!< (@ 0x00000010) Deactivate QSPI interface */
  2253. __IM uint32_t RESERVED[59];
  2254. __IOM uint32_t EVENTS_READY; /*!< (@ 0x00000100) QSPI peripheral is ready. This event will be
  2255. generated as a response to any QSPI task. */
  2256. __IM uint32_t RESERVED1[127];
  2257. __IOM uint32_t INTEN; /*!< (@ 0x00000300) Enable or disable interrupt */
  2258. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  2259. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  2260. __IM uint32_t RESERVED2[125];
  2261. __IOM uint32_t ENABLE; /*!< (@ 0x00000500) Enable QSPI peripheral and acquire the pins selected
  2262. in PSELn registers */
  2263. __IOM QSPI_READ_Type READ; /*!< (@ 0x00000504) Unspecified */
  2264. __IOM QSPI_WRITE_Type WRITE; /*!< (@ 0x00000510) Unspecified */
  2265. __IOM QSPI_ERASE_Type ERASE; /*!< (@ 0x0000051C) Unspecified */
  2266. __IOM QSPI_PSEL_Type PSEL; /*!< (@ 0x00000524) Unspecified */
  2267. __IOM uint32_t XIPOFFSET; /*!< (@ 0x00000540) Address offset into the external memory for Execute
  2268. in Place operation. */
  2269. __IOM uint32_t IFCONFIG0; /*!< (@ 0x00000544) Interface configuration. */
  2270. __IM uint32_t RESERVED3[46];
  2271. __IOM uint32_t IFCONFIG1; /*!< (@ 0x00000600) Interface configuration. */
  2272. __IM uint32_t STATUS; /*!< (@ 0x00000604) Status register. */
  2273. __IM uint32_t RESERVED4[3];
  2274. __IOM uint32_t DPMDUR; /*!< (@ 0x00000614) Set the duration required to enter/exit deep
  2275. power-down mode (DPM). */
  2276. __IM uint32_t RESERVED5[3];
  2277. __IOM uint32_t ADDRCONF; /*!< (@ 0x00000624) Extended address configuration. */
  2278. __IM uint32_t RESERVED6[3];
  2279. __IOM uint32_t CINSTRCONF; /*!< (@ 0x00000634) Custom instruction configuration register. */
  2280. __IOM uint32_t CINSTRDAT0; /*!< (@ 0x00000638) Custom instruction data register 0. */
  2281. __IOM uint32_t CINSTRDAT1; /*!< (@ 0x0000063C) Custom instruction data register 1. */
  2282. __IOM uint32_t IFTIMING; /*!< (@ 0x00000640) SPI interface timing. */
  2283. } NRF_QSPI_Type; /*!< Size = 1604 (0x644) */
  2284. /* =========================================================================================================================== */
  2285. /* ================ CC_HOST_RGF ================ */
  2286. /* =========================================================================================================================== */
  2287. /**
  2288. * @brief CRYPTOCELL HOST_RGF interface (CC_HOST_RGF)
  2289. */
  2290. typedef struct { /*!< (@ 0x5002A000) CC_HOST_RGF Structure */
  2291. __IM uint32_t RESERVED[1678];
  2292. __IOM uint32_t HOST_CRYPTOKEY_SEL; /*!< (@ 0x00001A38) AES hardware key select */
  2293. __IM uint32_t RESERVED1[4];
  2294. __IOM uint32_t HOST_IOT_KPRTL_LOCK; /*!< (@ 0x00001A4C) This write-once register is the K_PRTL lock register.
  2295. When this register is set, K_PRTL can not
  2296. be used and a zeroed key will be used instead.
  2297. The value of this register is saved in the
  2298. CRYPTOCELL AO power domain. */
  2299. __IOM uint32_t HOST_IOT_KDR0; /*!< (@ 0x00001A50) This register holds bits 31:0 of K_DR. The value
  2300. of this register is saved in the CRYPTOCELL
  2301. AO power domain. Reading from this address
  2302. returns the K_DR valid status indicating
  2303. if K_DR is successfully retained. */
  2304. __OM uint32_t HOST_IOT_KDR1; /*!< (@ 0x00001A54) This register holds bits 63:32 of K_DR. The value
  2305. of this register is saved in the CRYPTOCELL
  2306. AO power domain. */
  2307. __OM uint32_t HOST_IOT_KDR2; /*!< (@ 0x00001A58) This register holds bits 95:64 of K_DR. The value
  2308. of this register is saved in the CRYPTOCELL
  2309. AO power domain. */
  2310. __OM uint32_t HOST_IOT_KDR3; /*!< (@ 0x00001A5C) This register holds bits 127:96 of K_DR. The
  2311. value of this register is saved in the CRYPTOCELL
  2312. AO power domain. */
  2313. __IOM uint32_t HOST_IOT_LCS; /*!< (@ 0x00001A60) Controls lifecycle state (LCS) for CRYPTOCELL
  2314. subsystem */
  2315. } NRF_CC_HOST_RGF_Type; /*!< Size = 6756 (0x1a64) */
  2316. /* =========================================================================================================================== */
  2317. /* ================ CRYPTOCELL ================ */
  2318. /* =========================================================================================================================== */
  2319. /**
  2320. * @brief ARM TrustZone CryptoCell register interface (CRYPTOCELL)
  2321. */
  2322. typedef struct { /*!< (@ 0x5002A000) CRYPTOCELL Structure */
  2323. __IM uint32_t RESERVED[320];
  2324. __IOM uint32_t ENABLE; /*!< (@ 0x00000500) Enable CRYPTOCELL subsystem */
  2325. } NRF_CRYPTOCELL_Type; /*!< Size = 1284 (0x504) */
  2326. /** @} */ /* End of group Device_Peripheral_peripherals */
  2327. /* =========================================================================================================================== */
  2328. /* ================ Device Specific Peripheral Address Map ================ */
  2329. /* =========================================================================================================================== */
  2330. /** @addtogroup Device_Peripheral_peripheralAddr
  2331. * @{
  2332. */
  2333. #define NRF_FICR_BASE 0x10000000UL
  2334. #define NRF_UICR_BASE 0x10001000UL
  2335. #define NRF_CLOCK_BASE 0x40000000UL
  2336. #define NRF_POWER_BASE 0x40000000UL
  2337. #define NRF_P0_BASE 0x50000000UL
  2338. #define NRF_P1_BASE 0x50000300UL
  2339. #define NRF_RADIO_BASE 0x40001000UL
  2340. #define NRF_UART0_BASE 0x40002000UL
  2341. #define NRF_UARTE0_BASE 0x40002000UL
  2342. #define NRF_SPI0_BASE 0x40003000UL
  2343. #define NRF_SPIM0_BASE 0x40003000UL
  2344. #define NRF_SPIS0_BASE 0x40003000UL
  2345. #define NRF_TWI0_BASE 0x40003000UL
  2346. #define NRF_TWIM0_BASE 0x40003000UL
  2347. #define NRF_TWIS0_BASE 0x40003000UL
  2348. #define NRF_SPI1_BASE 0x40004000UL
  2349. #define NRF_SPIM1_BASE 0x40004000UL
  2350. #define NRF_SPIS1_BASE 0x40004000UL
  2351. #define NRF_TWI1_BASE 0x40004000UL
  2352. #define NRF_TWIM1_BASE 0x40004000UL
  2353. #define NRF_TWIS1_BASE 0x40004000UL
  2354. #define NRF_NFCT_BASE 0x40005000UL
  2355. #define NRF_GPIOTE_BASE 0x40006000UL
  2356. #define NRF_SAADC_BASE 0x40007000UL
  2357. #define NRF_TIMER0_BASE 0x40008000UL
  2358. #define NRF_TIMER1_BASE 0x40009000UL
  2359. #define NRF_TIMER2_BASE 0x4000A000UL
  2360. #define NRF_RTC0_BASE 0x4000B000UL
  2361. #define NRF_TEMP_BASE 0x4000C000UL
  2362. #define NRF_RNG_BASE 0x4000D000UL
  2363. #define NRF_ECB_BASE 0x4000E000UL
  2364. #define NRF_AAR_BASE 0x4000F000UL
  2365. #define NRF_CCM_BASE 0x4000F000UL
  2366. #define NRF_WDT_BASE 0x40010000UL
  2367. #define NRF_RTC1_BASE 0x40011000UL
  2368. #define NRF_QDEC_BASE 0x40012000UL
  2369. #define NRF_COMP_BASE 0x40013000UL
  2370. #define NRF_LPCOMP_BASE 0x40013000UL
  2371. #define NRF_EGU0_BASE 0x40014000UL
  2372. #define NRF_SWI0_BASE 0x40014000UL
  2373. #define NRF_EGU1_BASE 0x40015000UL
  2374. #define NRF_SWI1_BASE 0x40015000UL
  2375. #define NRF_EGU2_BASE 0x40016000UL
  2376. #define NRF_SWI2_BASE 0x40016000UL
  2377. #define NRF_EGU3_BASE 0x40017000UL
  2378. #define NRF_SWI3_BASE 0x40017000UL
  2379. #define NRF_EGU4_BASE 0x40018000UL
  2380. #define NRF_SWI4_BASE 0x40018000UL
  2381. #define NRF_EGU5_BASE 0x40019000UL
  2382. #define NRF_SWI5_BASE 0x40019000UL
  2383. #define NRF_TIMER3_BASE 0x4001A000UL
  2384. #define NRF_TIMER4_BASE 0x4001B000UL
  2385. #define NRF_PWM0_BASE 0x4001C000UL
  2386. #define NRF_PDM_BASE 0x4001D000UL
  2387. #define NRF_ACL_BASE 0x4001E000UL
  2388. #define NRF_NVMC_BASE 0x4001E000UL
  2389. #define NRF_PPI_BASE 0x4001F000UL
  2390. #define NRF_MWU_BASE 0x40020000UL
  2391. #define NRF_PWM1_BASE 0x40021000UL
  2392. #define NRF_PWM2_BASE 0x40022000UL
  2393. #define NRF_SPI2_BASE 0x40023000UL
  2394. #define NRF_SPIM2_BASE 0x40023000UL
  2395. #define NRF_SPIS2_BASE 0x40023000UL
  2396. #define NRF_RTC2_BASE 0x40024000UL
  2397. #define NRF_I2S_BASE 0x40025000UL
  2398. #define NRF_FPU_BASE 0x40026000UL
  2399. #define NRF_USBD_BASE 0x40027000UL
  2400. #define NRF_UARTE1_BASE 0x40028000UL
  2401. #define NRF_QSPI_BASE 0x40029000UL
  2402. #define NRF_CC_HOST_RGF_BASE 0x5002A000UL
  2403. #define NRF_CRYPTOCELL_BASE 0x5002A000UL
  2404. #define NRF_PWM3_BASE 0x4002D000UL
  2405. #define NRF_SPIM3_BASE 0x4002F000UL
  2406. /** @} */ /* End of group Device_Peripheral_peripheralAddr */
  2407. /* =========================================================================================================================== */
  2408. /* ================ Peripheral declaration ================ */
  2409. /* =========================================================================================================================== */
  2410. /** @addtogroup Device_Peripheral_declaration
  2411. * @{
  2412. */
  2413. #define NRF_FICR ((NRF_FICR_Type*) NRF_FICR_BASE)
  2414. #define NRF_UICR ((NRF_UICR_Type*) NRF_UICR_BASE)
  2415. #define NRF_CLOCK ((NRF_CLOCK_Type*) NRF_CLOCK_BASE)
  2416. #define NRF_POWER ((NRF_POWER_Type*) NRF_POWER_BASE)
  2417. #define NRF_P0 ((NRF_GPIO_Type*) NRF_P0_BASE)
  2418. #define NRF_P1 ((NRF_GPIO_Type*) NRF_P1_BASE)
  2419. #define NRF_RADIO ((NRF_RADIO_Type*) NRF_RADIO_BASE)
  2420. #define NRF_UART0 ((NRF_UART_Type*) NRF_UART0_BASE)
  2421. #define NRF_UARTE0 ((NRF_UARTE_Type*) NRF_UARTE0_BASE)
  2422. #define NRF_SPI0 ((NRF_SPI_Type*) NRF_SPI0_BASE)
  2423. #define NRF_SPIM0 ((NRF_SPIM_Type*) NRF_SPIM0_BASE)
  2424. #define NRF_SPIS0 ((NRF_SPIS_Type*) NRF_SPIS0_BASE)
  2425. #define NRF_TWI0 ((NRF_TWI_Type*) NRF_TWI0_BASE)
  2426. #define NRF_TWIM0 ((NRF_TWIM_Type*) NRF_TWIM0_BASE)
  2427. #define NRF_TWIS0 ((NRF_TWIS_Type*) NRF_TWIS0_BASE)
  2428. #define NRF_SPI1 ((NRF_SPI_Type*) NRF_SPI1_BASE)
  2429. #define NRF_SPIM1 ((NRF_SPIM_Type*) NRF_SPIM1_BASE)
  2430. #define NRF_SPIS1 ((NRF_SPIS_Type*) NRF_SPIS1_BASE)
  2431. #define NRF_TWI1 ((NRF_TWI_Type*) NRF_TWI1_BASE)
  2432. #define NRF_TWIM1 ((NRF_TWIM_Type*) NRF_TWIM1_BASE)
  2433. #define NRF_TWIS1 ((NRF_TWIS_Type*) NRF_TWIS1_BASE)
  2434. #define NRF_NFCT ((NRF_NFCT_Type*) NRF_NFCT_BASE)
  2435. #define NRF_GPIOTE ((NRF_GPIOTE_Type*) NRF_GPIOTE_BASE)
  2436. #define NRF_SAADC ((NRF_SAADC_Type*) NRF_SAADC_BASE)
  2437. #define NRF_TIMER0 ((NRF_TIMER_Type*) NRF_TIMER0_BASE)
  2438. #define NRF_TIMER1 ((NRF_TIMER_Type*) NRF_TIMER1_BASE)
  2439. #define NRF_TIMER2 ((NRF_TIMER_Type*) NRF_TIMER2_BASE)
  2440. #define NRF_RTC0 ((NRF_RTC_Type*) NRF_RTC0_BASE)
  2441. #define NRF_TEMP ((NRF_TEMP_Type*) NRF_TEMP_BASE)
  2442. #define NRF_RNG ((NRF_RNG_Type*) NRF_RNG_BASE)
  2443. #define NRF_ECB ((NRF_ECB_Type*) NRF_ECB_BASE)
  2444. #define NRF_AAR ((NRF_AAR_Type*) NRF_AAR_BASE)
  2445. #define NRF_CCM ((NRF_CCM_Type*) NRF_CCM_BASE)
  2446. #define NRF_WDT ((NRF_WDT_Type*) NRF_WDT_BASE)
  2447. #define NRF_RTC1 ((NRF_RTC_Type*) NRF_RTC1_BASE)
  2448. #define NRF_QDEC ((NRF_QDEC_Type*) NRF_QDEC_BASE)
  2449. #define NRF_COMP ((NRF_COMP_Type*) NRF_COMP_BASE)
  2450. #define NRF_LPCOMP ((NRF_LPCOMP_Type*) NRF_LPCOMP_BASE)
  2451. #define NRF_EGU0 ((NRF_EGU_Type*) NRF_EGU0_BASE)
  2452. #define NRF_SWI0 ((NRF_SWI_Type*) NRF_SWI0_BASE)
  2453. #define NRF_EGU1 ((NRF_EGU_Type*) NRF_EGU1_BASE)
  2454. #define NRF_SWI1 ((NRF_SWI_Type*) NRF_SWI1_BASE)
  2455. #define NRF_EGU2 ((NRF_EGU_Type*) NRF_EGU2_BASE)
  2456. #define NRF_SWI2 ((NRF_SWI_Type*) NRF_SWI2_BASE)
  2457. #define NRF_EGU3 ((NRF_EGU_Type*) NRF_EGU3_BASE)
  2458. #define NRF_SWI3 ((NRF_SWI_Type*) NRF_SWI3_BASE)
  2459. #define NRF_EGU4 ((NRF_EGU_Type*) NRF_EGU4_BASE)
  2460. #define NRF_SWI4 ((NRF_SWI_Type*) NRF_SWI4_BASE)
  2461. #define NRF_EGU5 ((NRF_EGU_Type*) NRF_EGU5_BASE)
  2462. #define NRF_SWI5 ((NRF_SWI_Type*) NRF_SWI5_BASE)
  2463. #define NRF_TIMER3 ((NRF_TIMER_Type*) NRF_TIMER3_BASE)
  2464. #define NRF_TIMER4 ((NRF_TIMER_Type*) NRF_TIMER4_BASE)
  2465. #define NRF_PWM0 ((NRF_PWM_Type*) NRF_PWM0_BASE)
  2466. #define NRF_PDM ((NRF_PDM_Type*) NRF_PDM_BASE)
  2467. #define NRF_ACL ((NRF_ACL_Type*) NRF_ACL_BASE)
  2468. #define NRF_NVMC ((NRF_NVMC_Type*) NRF_NVMC_BASE)
  2469. #define NRF_PPI ((NRF_PPI_Type*) NRF_PPI_BASE)
  2470. #define NRF_MWU ((NRF_MWU_Type*) NRF_MWU_BASE)
  2471. #define NRF_PWM1 ((NRF_PWM_Type*) NRF_PWM1_BASE)
  2472. #define NRF_PWM2 ((NRF_PWM_Type*) NRF_PWM2_BASE)
  2473. #define NRF_SPI2 ((NRF_SPI_Type*) NRF_SPI2_BASE)
  2474. #define NRF_SPIM2 ((NRF_SPIM_Type*) NRF_SPIM2_BASE)
  2475. #define NRF_SPIS2 ((NRF_SPIS_Type*) NRF_SPIS2_BASE)
  2476. #define NRF_RTC2 ((NRF_RTC_Type*) NRF_RTC2_BASE)
  2477. #define NRF_I2S ((NRF_I2S_Type*) NRF_I2S_BASE)
  2478. #define NRF_FPU ((NRF_FPU_Type*) NRF_FPU_BASE)
  2479. #define NRF_USBD ((NRF_USBD_Type*) NRF_USBD_BASE)
  2480. #define NRF_UARTE1 ((NRF_UARTE_Type*) NRF_UARTE1_BASE)
  2481. #define NRF_QSPI ((NRF_QSPI_Type*) NRF_QSPI_BASE)
  2482. #define NRF_CC_HOST_RGF ((NRF_CC_HOST_RGF_Type*) NRF_CC_HOST_RGF_BASE)
  2483. #define NRF_CRYPTOCELL ((NRF_CRYPTOCELL_Type*) NRF_CRYPTOCELL_BASE)
  2484. #define NRF_PWM3 ((NRF_PWM_Type*) NRF_PWM3_BASE)
  2485. #define NRF_SPIM3 ((NRF_SPIM_Type*) NRF_SPIM3_BASE)
  2486. /** @} */ /* End of group Device_Peripheral_declaration */
  2487. /* ========================================= End of section using anonymous unions ========================================= */
  2488. #if defined (__CC_ARM)
  2489. #pragma pop
  2490. #elif defined (__ICCARM__)
  2491. /* leave anonymous unions enabled */
  2492. #elif (__ARMCC_VERSION >= 6010050)
  2493. #pragma clang diagnostic pop
  2494. #elif defined (__GNUC__)
  2495. /* anonymous unions are enabled by default */
  2496. #elif defined (__TMS470__)
  2497. /* anonymous unions are enabled by default */
  2498. #elif defined (__TASKING__)
  2499. #pragma warning restore
  2500. #elif defined (__CSMC__)
  2501. /* anonymous unions are enabled by default */
  2502. #endif
  2503. #ifdef __cplusplus
  2504. }
  2505. #endif
  2506. #endif /* NRF52840_H */
  2507. /** @} */ /* End of group nrf52840 */
  2508. /** @} */ /* End of group Nordic Semiconductor */