nrf52840.h 224 KB

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