nrf52820.h 158 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105
  1. /*
  2. * Copyright (c) 2010 - 2020, Nordic Semiconductor ASA
  3. *
  4. * All rights reserved.
  5. *
  6. * Redistribution and use in source and binary forms, with or without modification,
  7. * are permitted provided that the following conditions are met:
  8. *
  9. * 1. Redistributions of source code must retain the above copyright notice, this
  10. * list of conditions and the following disclaimer.
  11. *
  12. * 2. Redistributions in binary form, except as embedded into a Nordic
  13. * Semiconductor ASA integrated circuit in a product or a software update for
  14. * such product, must reproduce the above copyright notice, this list of
  15. * conditions and the following disclaimer in the documentation and/or other
  16. * materials provided with the distribution.
  17. *
  18. * 3. Neither the name of Nordic Semiconductor ASA nor the names of its
  19. * contributors may be used to endorse or promote products derived from this
  20. * software without specific prior written permission.
  21. *
  22. * 4. This software, with or without modification, must only be used with a
  23. * Nordic Semiconductor ASA integrated circuit.
  24. *
  25. * 5. Any software provided in binary form under this license must not be reverse
  26. * engineered, decompiled, modified and/or disassembled.
  27. *
  28. * THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS
  29. * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  30. * OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE
  31. * DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE
  32. * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  33. * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
  34. * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  35. * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  36. * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  37. * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  38. *
  39. * @file nrf52820.h
  40. * @brief CMSIS HeaderFile
  41. * @version 1
  42. * @date 14. August 2020
  43. * @note Generated by SVDConv V3.3.35 on Friday, 14.08.2020 15:04:39
  44. * from File 'nrf52820.svd',
  45. * last modified on Friday, 14.08.2020 13:04:32
  46. */
  47. /** @addtogroup Nordic Semiconductor
  48. * @{
  49. */
  50. /** @addtogroup nrf52820
  51. * @{
  52. */
  53. #ifndef NRF52820_H
  54. #define NRF52820_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. /* ========================================== nrf52820 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. GPIOTE_IRQn = 6, /*!< 6 GPIOTE */
  85. TIMER0_IRQn = 8, /*!< 8 TIMER0 */
  86. TIMER1_IRQn = 9, /*!< 9 TIMER1 */
  87. TIMER2_IRQn = 10, /*!< 10 TIMER2 */
  88. RTC0_IRQn = 11, /*!< 11 RTC0 */
  89. TEMP_IRQn = 12, /*!< 12 TEMP */
  90. RNG_IRQn = 13, /*!< 13 RNG */
  91. ECB_IRQn = 14, /*!< 14 ECB */
  92. CCM_AAR_IRQn = 15, /*!< 15 CCM_AAR */
  93. WDT_IRQn = 16, /*!< 16 WDT */
  94. RTC1_IRQn = 17, /*!< 17 RTC1 */
  95. QDEC_IRQn = 18, /*!< 18 QDEC */
  96. COMP_IRQn = 19, /*!< 19 COMP */
  97. SWI0_EGU0_IRQn = 20, /*!< 20 SWI0_EGU0 */
  98. SWI1_EGU1_IRQn = 21, /*!< 21 SWI1_EGU1 */
  99. SWI2_EGU2_IRQn = 22, /*!< 22 SWI2_EGU2 */
  100. SWI3_EGU3_IRQn = 23, /*!< 23 SWI3_EGU3 */
  101. SWI4_EGU4_IRQn = 24, /*!< 24 SWI4_EGU4 */
  102. SWI5_EGU5_IRQn = 25, /*!< 25 SWI5_EGU5 */
  103. TIMER3_IRQn = 26, /*!< 26 TIMER3 */
  104. USBD_IRQn = 39 /*!< 39 USBD */
  105. } IRQn_Type;
  106. /* =========================================================================================================================== */
  107. /* ================ Processor and Core Peripheral Section ================ */
  108. /* =========================================================================================================================== */
  109. /* =========================== Configuration of the ARM Cortex-M4 Processor and Core Peripherals =========================== */
  110. #define __CM4_REV 0x0001U /*!< CM4 Core Revision */
  111. #define __DSP_PRESENT 1 /*!< DSP present or not */
  112. #define __VTOR_PRESENT 1 /*!< Set to 1 if CPU supports Vector Table Offset Register */
  113. #define __NVIC_PRIO_BITS 3 /*!< Number of Bits used for Priority Levels */
  114. #define __Vendor_SysTickConfig 0 /*!< Set to 1 if different SysTick Config is used */
  115. #define __MPU_PRESENT 1 /*!< MPU present */
  116. #define __FPU_PRESENT 0 /*!< FPU present */
  117. /** @} */ /* End of group Configuration_of_CMSIS */
  118. #include "core_cm4.h" /*!< ARM Cortex-M4 processor and core peripherals */
  119. #include "system_nrf52820.h" /*!< nrf52820 System */
  120. #ifndef __IM /*!< Fallback for older CMSIS versions */
  121. #define __IM __I
  122. #endif
  123. #ifndef __OM /*!< Fallback for older CMSIS versions */
  124. #define __OM __O
  125. #endif
  126. #ifndef __IOM /*!< Fallback for older CMSIS versions */
  127. #define __IOM __IO
  128. #endif
  129. /* ======================================== Start of section using anonymous unions ======================================== */
  130. #if defined (__CC_ARM)
  131. #pragma push
  132. #pragma anon_unions
  133. #elif defined (__ICCARM__)
  134. #pragma language=extended
  135. #elif defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
  136. #pragma clang diagnostic push
  137. #pragma clang diagnostic ignored "-Wc11-extensions"
  138. #pragma clang diagnostic ignored "-Wreserved-id-macro"
  139. #pragma clang diagnostic ignored "-Wgnu-anonymous-struct"
  140. #pragma clang diagnostic ignored "-Wnested-anon-types"
  141. #elif defined (__GNUC__)
  142. /* anonymous unions are enabled by default */
  143. #elif defined (__TMS470__)
  144. /* anonymous unions are enabled by default */
  145. #elif defined (__TASKING__)
  146. #pragma warning 586
  147. #elif defined (__CSMC__)
  148. /* anonymous unions are enabled by default */
  149. #else
  150. #warning Not supported compiler type
  151. #endif
  152. /* =========================================================================================================================== */
  153. /* ================ Device Specific Cluster Section ================ */
  154. /* =========================================================================================================================== */
  155. /** @addtogroup Device_Peripheral_clusters
  156. * @{
  157. */
  158. /**
  159. * @brief FICR_INFO [INFO] (Device info)
  160. */
  161. typedef struct {
  162. __IM uint32_t PART; /*!< (@ 0x00000000) Part code */
  163. __IM uint32_t VARIANT; /*!< (@ 0x00000004) Build code (hardware version and production configuration) */
  164. __IM uint32_t PACKAGE; /*!< (@ 0x00000008) Package option */
  165. __IM uint32_t RAM; /*!< (@ 0x0000000C) RAM variant */
  166. __IM uint32_t FLASH; /*!< (@ 0x00000010) Flash variant */
  167. } FICR_INFO_Type; /*!< Size = 20 (0x14) */
  168. /**
  169. * @brief FICR_TEMP [TEMP] (Registers storing factory TEMP module linearization coefficients)
  170. */
  171. typedef struct {
  172. __IM uint32_t A0; /*!< (@ 0x00000000) Slope definition A0 */
  173. __IM uint32_t A1; /*!< (@ 0x00000004) Slope definition A1 */
  174. __IM uint32_t A2; /*!< (@ 0x00000008) Slope definition A2 */
  175. __IM uint32_t A3; /*!< (@ 0x0000000C) Slope definition A3 */
  176. __IM uint32_t A4; /*!< (@ 0x00000010) Slope definition A4 */
  177. __IM uint32_t A5; /*!< (@ 0x00000014) Slope definition A5 */
  178. __IM uint32_t B0; /*!< (@ 0x00000018) Y-intercept B0 */
  179. __IM uint32_t B1; /*!< (@ 0x0000001C) Y-intercept B1 */
  180. __IM uint32_t B2; /*!< (@ 0x00000020) Y-intercept B2 */
  181. __IM uint32_t B3; /*!< (@ 0x00000024) Y-intercept B3 */
  182. __IM uint32_t B4; /*!< (@ 0x00000028) Y-intercept B4 */
  183. __IM uint32_t B5; /*!< (@ 0x0000002C) Y-intercept B5 */
  184. __IM uint32_t T0; /*!< (@ 0x00000030) Segment end T0 */
  185. __IM uint32_t T1; /*!< (@ 0x00000034) Segment end T1 */
  186. __IM uint32_t T2; /*!< (@ 0x00000038) Segment end T2 */
  187. __IM uint32_t T3; /*!< (@ 0x0000003C) Segment end T3 */
  188. __IM uint32_t T4; /*!< (@ 0x00000040) Segment end T4 */
  189. } FICR_TEMP_Type; /*!< Size = 68 (0x44) */
  190. /**
  191. * @brief POWER_RAM [RAM] (Unspecified)
  192. */
  193. typedef struct {
  194. __IOM uint32_t POWER; /*!< (@ 0x00000000) Description cluster: RAMn power control register */
  195. __OM uint32_t POWERSET; /*!< (@ 0x00000004) Description cluster: RAMn power control set register */
  196. __OM uint32_t POWERCLR; /*!< (@ 0x00000008) Description cluster: RAMn power control clear
  197. register */
  198. __IM uint32_t RESERVED;
  199. } POWER_RAM_Type; /*!< Size = 16 (0x10) */
  200. /**
  201. * @brief RADIO_PSEL [PSEL] (Unspecified)
  202. */
  203. typedef struct {
  204. __IOM uint32_t DFEGPIO[8]; /*!< (@ 0x00000000) Description collection: Pin select for DFE pin
  205. n */
  206. } RADIO_PSEL_Type; /*!< Size = 32 (0x20) */
  207. /**
  208. * @brief RADIO_DFEPACKET [DFEPACKET] (DFE packet EasyDMA channel)
  209. */
  210. typedef struct {
  211. __IOM uint32_t PTR; /*!< (@ 0x00000000) Data pointer */
  212. __IOM uint32_t MAXCNT; /*!< (@ 0x00000004) Maximum number of buffer words to transfer */
  213. __IM uint32_t AMOUNT; /*!< (@ 0x00000008) Number of samples transferred in the last transaction */
  214. } RADIO_DFEPACKET_Type; /*!< Size = 12 (0xc) */
  215. /**
  216. * @brief UART_PSEL [PSEL] (Unspecified)
  217. */
  218. typedef struct {
  219. __IOM uint32_t RTS; /*!< (@ 0x00000000) Pin select for RTS */
  220. __IOM uint32_t TXD; /*!< (@ 0x00000004) Pin select for TXD */
  221. __IOM uint32_t CTS; /*!< (@ 0x00000008) Pin select for CTS */
  222. __IOM uint32_t RXD; /*!< (@ 0x0000000C) Pin select for RXD */
  223. } UART_PSEL_Type; /*!< Size = 16 (0x10) */
  224. /**
  225. * @brief UARTE_PSEL [PSEL] (Unspecified)
  226. */
  227. typedef struct {
  228. __IOM uint32_t RTS; /*!< (@ 0x00000000) Pin select for RTS signal */
  229. __IOM uint32_t TXD; /*!< (@ 0x00000004) Pin select for TXD signal */
  230. __IOM uint32_t CTS; /*!< (@ 0x00000008) Pin select for CTS signal */
  231. __IOM uint32_t RXD; /*!< (@ 0x0000000C) Pin select for RXD signal */
  232. } UARTE_PSEL_Type; /*!< Size = 16 (0x10) */
  233. /**
  234. * @brief UARTE_RXD [RXD] (RXD EasyDMA channel)
  235. */
  236. typedef struct {
  237. __IOM uint32_t PTR; /*!< (@ 0x00000000) Data pointer */
  238. __IOM uint32_t MAXCNT; /*!< (@ 0x00000004) Maximum number of bytes in receive buffer */
  239. __IM uint32_t AMOUNT; /*!< (@ 0x00000008) Number of bytes transferred in the last transaction */
  240. } UARTE_RXD_Type; /*!< Size = 12 (0xc) */
  241. /**
  242. * @brief UARTE_TXD [TXD] (TXD EasyDMA channel)
  243. */
  244. typedef struct {
  245. __IOM uint32_t PTR; /*!< (@ 0x00000000) Data pointer */
  246. __IOM uint32_t MAXCNT; /*!< (@ 0x00000004) Maximum number of bytes in transmit buffer */
  247. __IM uint32_t AMOUNT; /*!< (@ 0x00000008) Number of bytes transferred in the last transaction */
  248. } UARTE_TXD_Type; /*!< Size = 12 (0xc) */
  249. /**
  250. * @brief SPI_PSEL [PSEL] (Unspecified)
  251. */
  252. typedef struct {
  253. __IOM uint32_t SCK; /*!< (@ 0x00000000) Pin select for SCK */
  254. __IOM uint32_t MOSI; /*!< (@ 0x00000004) Pin select for MOSI signal */
  255. __IOM uint32_t MISO; /*!< (@ 0x00000008) Pin select for MISO signal */
  256. } SPI_PSEL_Type; /*!< Size = 12 (0xc) */
  257. /**
  258. * @brief SPIM_PSEL [PSEL] (Unspecified)
  259. */
  260. typedef struct {
  261. __IOM uint32_t SCK; /*!< (@ 0x00000000) Pin select for SCK */
  262. __IOM uint32_t MOSI; /*!< (@ 0x00000004) Pin select for MOSI signal */
  263. __IOM uint32_t MISO; /*!< (@ 0x00000008) Pin select for MISO signal */
  264. } SPIM_PSEL_Type; /*!< Size = 12 (0xc) */
  265. /**
  266. * @brief SPIM_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. __IOM uint32_t LIST; /*!< (@ 0x0000000C) EasyDMA list type */
  273. } SPIM_RXD_Type; /*!< Size = 16 (0x10) */
  274. /**
  275. * @brief SPIM_TXD [TXD] (TXD EasyDMA channel)
  276. */
  277. typedef struct {
  278. __IOM uint32_t PTR; /*!< (@ 0x00000000) Data pointer */
  279. __IOM uint32_t MAXCNT; /*!< (@ 0x00000004) Number of bytes in transmit buffer */
  280. __IM uint32_t AMOUNT; /*!< (@ 0x00000008) Number of bytes transferred in the last transaction */
  281. __IOM uint32_t LIST; /*!< (@ 0x0000000C) EasyDMA list type */
  282. } SPIM_TXD_Type; /*!< Size = 16 (0x10) */
  283. /**
  284. * @brief SPIS_PSEL [PSEL] (Unspecified)
  285. */
  286. typedef struct {
  287. __IOM uint32_t SCK; /*!< (@ 0x00000000) Pin select for SCK */
  288. __IOM uint32_t MISO; /*!< (@ 0x00000004) Pin select for MISO signal */
  289. __IOM uint32_t MOSI; /*!< (@ 0x00000008) Pin select for MOSI signal */
  290. __IOM uint32_t CSN; /*!< (@ 0x0000000C) Pin select for CSN signal */
  291. } SPIS_PSEL_Type; /*!< Size = 16 (0x10) */
  292. /**
  293. * @brief SPIS_RXD [RXD] (Unspecified)
  294. */
  295. typedef struct {
  296. __IOM uint32_t PTR; /*!< (@ 0x00000000) RXD data pointer */
  297. __IOM uint32_t MAXCNT; /*!< (@ 0x00000004) Maximum number of bytes in receive buffer */
  298. __IM uint32_t AMOUNT; /*!< (@ 0x00000008) Number of bytes received in last granted transaction */
  299. __IOM uint32_t LIST; /*!< (@ 0x0000000C) EasyDMA list type */
  300. } SPIS_RXD_Type; /*!< Size = 16 (0x10) */
  301. /**
  302. * @brief SPIS_TXD [TXD] (Unspecified)
  303. */
  304. typedef struct {
  305. __IOM uint32_t PTR; /*!< (@ 0x00000000) TXD data pointer */
  306. __IOM uint32_t MAXCNT; /*!< (@ 0x00000004) Maximum number of bytes in transmit buffer */
  307. __IM uint32_t AMOUNT; /*!< (@ 0x00000008) Number of bytes transmitted in last granted transaction */
  308. __IOM uint32_t LIST; /*!< (@ 0x0000000C) EasyDMA list type */
  309. } SPIS_TXD_Type; /*!< Size = 16 (0x10) */
  310. /**
  311. * @brief TWI_PSEL [PSEL] (Unspecified)
  312. */
  313. typedef struct {
  314. __IOM uint32_t SCL; /*!< (@ 0x00000000) Pin select for SCL */
  315. __IOM uint32_t SDA; /*!< (@ 0x00000004) Pin select for SDA */
  316. } TWI_PSEL_Type; /*!< Size = 8 (0x8) */
  317. /**
  318. * @brief TWIM_PSEL [PSEL] (Unspecified)
  319. */
  320. typedef struct {
  321. __IOM uint32_t SCL; /*!< (@ 0x00000000) Pin select for SCL signal */
  322. __IOM uint32_t SDA; /*!< (@ 0x00000004) Pin select for SDA signal */
  323. } TWIM_PSEL_Type; /*!< Size = 8 (0x8) */
  324. /**
  325. * @brief TWIM_RXD [RXD] (RXD EasyDMA channel)
  326. */
  327. typedef struct {
  328. __IOM uint32_t PTR; /*!< (@ 0x00000000) Data pointer */
  329. __IOM uint32_t MAXCNT; /*!< (@ 0x00000004) Maximum number of bytes in receive buffer */
  330. __IM uint32_t AMOUNT; /*!< (@ 0x00000008) Number of bytes transferred in the last transaction */
  331. __IOM uint32_t LIST; /*!< (@ 0x0000000C) EasyDMA list type */
  332. } TWIM_RXD_Type; /*!< Size = 16 (0x10) */
  333. /**
  334. * @brief TWIM_TXD [TXD] (TXD EasyDMA channel)
  335. */
  336. typedef struct {
  337. __IOM uint32_t PTR; /*!< (@ 0x00000000) Data pointer */
  338. __IOM uint32_t MAXCNT; /*!< (@ 0x00000004) Maximum number of bytes in transmit buffer */
  339. __IM uint32_t AMOUNT; /*!< (@ 0x00000008) Number of bytes transferred in the last transaction */
  340. __IOM uint32_t LIST; /*!< (@ 0x0000000C) EasyDMA list type */
  341. } TWIM_TXD_Type; /*!< Size = 16 (0x10) */
  342. /**
  343. * @brief TWIS_PSEL [PSEL] (Unspecified)
  344. */
  345. typedef struct {
  346. __IOM uint32_t SCL; /*!< (@ 0x00000000) Pin select for SCL signal */
  347. __IOM uint32_t SDA; /*!< (@ 0x00000004) Pin select for SDA signal */
  348. } TWIS_PSEL_Type; /*!< Size = 8 (0x8) */
  349. /**
  350. * @brief TWIS_RXD [RXD] (RXD EasyDMA channel)
  351. */
  352. typedef struct {
  353. __IOM uint32_t PTR; /*!< (@ 0x00000000) RXD Data pointer */
  354. __IOM uint32_t MAXCNT; /*!< (@ 0x00000004) Maximum number of bytes in RXD buffer */
  355. __IM uint32_t AMOUNT; /*!< (@ 0x00000008) Number of bytes transferred in the last RXD transaction */
  356. __IOM uint32_t LIST; /*!< (@ 0x0000000C) EasyDMA list type */
  357. } TWIS_RXD_Type; /*!< Size = 16 (0x10) */
  358. /**
  359. * @brief TWIS_TXD [TXD] (TXD EasyDMA channel)
  360. */
  361. typedef struct {
  362. __IOM uint32_t PTR; /*!< (@ 0x00000000) TXD Data pointer */
  363. __IOM uint32_t MAXCNT; /*!< (@ 0x00000004) Maximum number of bytes in TXD buffer */
  364. __IM uint32_t AMOUNT; /*!< (@ 0x00000008) Number of bytes transferred in the last TXD transaction */
  365. __IOM uint32_t LIST; /*!< (@ 0x0000000C) EasyDMA list type */
  366. } TWIS_TXD_Type; /*!< Size = 16 (0x10) */
  367. /**
  368. * @brief QDEC_PSEL [PSEL] (Unspecified)
  369. */
  370. typedef struct {
  371. __IOM uint32_t LED; /*!< (@ 0x00000000) Pin select for LED signal */
  372. __IOM uint32_t A; /*!< (@ 0x00000004) Pin select for A signal */
  373. __IOM uint32_t B; /*!< (@ 0x00000008) Pin select for B signal */
  374. } QDEC_PSEL_Type; /*!< Size = 12 (0xc) */
  375. /**
  376. * @brief ACL_ACL [ACL] (Unspecified)
  377. */
  378. typedef struct {
  379. __IOM uint32_t ADDR; /*!< (@ 0x00000000) Description cluster: Start address of region
  380. to protect. The start address must be word-aligned. */
  381. __IOM uint32_t SIZE; /*!< (@ 0x00000004) Description cluster: Size of region to protect
  382. counting from address ACL[n].ADDR. Write
  383. '0' as no effect. */
  384. __IOM uint32_t PERM; /*!< (@ 0x00000008) Description cluster: Access permissions for region
  385. n as defined by start address ACL[n].ADDR
  386. and size ACL[n].SIZE */
  387. __IM uint32_t RESERVED;
  388. } ACL_ACL_Type; /*!< Size = 16 (0x10) */
  389. /**
  390. * @brief PPI_TASKS_CHG [TASKS_CHG] (Channel group tasks)
  391. */
  392. typedef struct {
  393. __OM uint32_t EN; /*!< (@ 0x00000000) Description cluster: Enable channel group n */
  394. __OM uint32_t DIS; /*!< (@ 0x00000004) Description cluster: Disable channel group n */
  395. } PPI_TASKS_CHG_Type; /*!< Size = 8 (0x8) */
  396. /**
  397. * @brief PPI_CH [CH] (PPI Channel)
  398. */
  399. typedef struct {
  400. __IOM uint32_t EEP; /*!< (@ 0x00000000) Description cluster: Channel n event end-point */
  401. __IOM uint32_t TEP; /*!< (@ 0x00000004) Description cluster: Channel n task end-point */
  402. } PPI_CH_Type; /*!< Size = 8 (0x8) */
  403. /**
  404. * @brief PPI_FORK [FORK] (Fork)
  405. */
  406. typedef struct {
  407. __IOM uint32_t TEP; /*!< (@ 0x00000000) Description cluster: Channel n task end-point */
  408. } PPI_FORK_Type; /*!< Size = 4 (0x4) */
  409. /**
  410. * @brief USBD_HALTED [HALTED] (Unspecified)
  411. */
  412. typedef struct {
  413. __IM uint32_t EPIN[8]; /*!< (@ 0x00000000) Description collection: IN endpoint halted status.
  414. Can be used as is as response to a GetStatus()
  415. request to endpoint. */
  416. __IM uint32_t RESERVED;
  417. __IM uint32_t EPOUT[8]; /*!< (@ 0x00000024) Description collection: OUT endpoint halted status.
  418. Can be used as is as response to a GetStatus()
  419. request to endpoint. */
  420. } USBD_HALTED_Type; /*!< Size = 68 (0x44) */
  421. /**
  422. * @brief USBD_SIZE [SIZE] (Unspecified)
  423. */
  424. typedef struct {
  425. __IOM uint32_t EPOUT[8]; /*!< (@ 0x00000000) Description collection: Number of bytes received
  426. last in the data stage of this OUT endpoint */
  427. __IM uint32_t ISOOUT; /*!< (@ 0x00000020) Number of bytes received last on this ISO OUT
  428. data endpoint */
  429. } USBD_SIZE_Type; /*!< Size = 36 (0x24) */
  430. /**
  431. * @brief USBD_EPIN [EPIN] (Unspecified)
  432. */
  433. typedef struct {
  434. __IOM uint32_t PTR; /*!< (@ 0x00000000) Description cluster: Data pointer */
  435. __IOM uint32_t MAXCNT; /*!< (@ 0x00000004) Description cluster: Maximum number of bytes
  436. to transfer */
  437. __IM uint32_t AMOUNT; /*!< (@ 0x00000008) Description cluster: Number of bytes transferred
  438. in the last transaction */
  439. __IM uint32_t RESERVED[2];
  440. } USBD_EPIN_Type; /*!< Size = 20 (0x14) */
  441. /**
  442. * @brief USBD_ISOIN [ISOIN] (Unspecified)
  443. */
  444. typedef struct {
  445. __IOM uint32_t PTR; /*!< (@ 0x00000000) Data pointer */
  446. __IOM uint32_t MAXCNT; /*!< (@ 0x00000004) Maximum number of bytes to transfer */
  447. __IM uint32_t AMOUNT; /*!< (@ 0x00000008) Number of bytes transferred in the last transaction */
  448. } USBD_ISOIN_Type; /*!< Size = 12 (0xc) */
  449. /**
  450. * @brief USBD_EPOUT [EPOUT] (Unspecified)
  451. */
  452. typedef struct {
  453. __IOM uint32_t PTR; /*!< (@ 0x00000000) Description cluster: Data pointer */
  454. __IOM uint32_t MAXCNT; /*!< (@ 0x00000004) Description cluster: Maximum number of bytes
  455. to transfer */
  456. __IM uint32_t AMOUNT; /*!< (@ 0x00000008) Description cluster: Number of bytes transferred
  457. in the last transaction */
  458. __IM uint32_t RESERVED[2];
  459. } USBD_EPOUT_Type; /*!< Size = 20 (0x14) */
  460. /**
  461. * @brief USBD_ISOOUT [ISOOUT] (Unspecified)
  462. */
  463. typedef struct {
  464. __IOM uint32_t PTR; /*!< (@ 0x00000000) Data pointer */
  465. __IOM uint32_t MAXCNT; /*!< (@ 0x00000004) Maximum number of bytes to transfer */
  466. __IM uint32_t AMOUNT; /*!< (@ 0x00000008) Number of bytes transferred in the last transaction */
  467. } USBD_ISOOUT_Type; /*!< Size = 12 (0xc) */
  468. /** @} */ /* End of group Device_Peripheral_clusters */
  469. /* =========================================================================================================================== */
  470. /* ================ Device Specific Peripheral Section ================ */
  471. /* =========================================================================================================================== */
  472. /** @addtogroup Device_Peripheral_peripherals
  473. * @{
  474. */
  475. /* =========================================================================================================================== */
  476. /* ================ FICR ================ */
  477. /* =========================================================================================================================== */
  478. /**
  479. * @brief Factory information configuration registers (FICR)
  480. */
  481. typedef struct { /*!< (@ 0x10000000) FICR Structure */
  482. __IM uint32_t RESERVED[4];
  483. __IM uint32_t CODEPAGESIZE; /*!< (@ 0x00000010) Code memory page size */
  484. __IM uint32_t CODESIZE; /*!< (@ 0x00000014) Code memory size */
  485. __IM uint32_t RESERVED1[18];
  486. __IM uint32_t DEVICEID[2]; /*!< (@ 0x00000060) Description collection: Device identifier */
  487. __IM uint32_t RESERVED2[6];
  488. __IM uint32_t ER[4]; /*!< (@ 0x00000080) Description collection: Encryption root, word
  489. n */
  490. __IM uint32_t IR[4]; /*!< (@ 0x00000090) Description collection: Identity Root, word n */
  491. __IM uint32_t DEVICEADDRTYPE; /*!< (@ 0x000000A0) Device address type */
  492. __IM uint32_t DEVICEADDR[2]; /*!< (@ 0x000000A4) Description collection: Device address n */
  493. __IM uint32_t RESERVED3[21];
  494. __IM FICR_INFO_Type INFO; /*!< (@ 0x00000100) Device info */
  495. __IM uint32_t RESERVED4[143];
  496. __IM uint32_t PRODTEST[3]; /*!< (@ 0x00000350) Description collection: Production test signature
  497. n */
  498. __IM uint32_t RESERVED5[42];
  499. __IM FICR_TEMP_Type TEMP; /*!< (@ 0x00000404) Registers storing factory TEMP module linearization
  500. coefficients */
  501. } NRF_FICR_Type; /*!< Size = 1096 (0x448) */
  502. /* =========================================================================================================================== */
  503. /* ================ UICR ================ */
  504. /* =========================================================================================================================== */
  505. /**
  506. * @brief User information configuration registers (UICR)
  507. */
  508. typedef struct { /*!< (@ 0x10001000) UICR Structure */
  509. __IM uint32_t RESERVED[5];
  510. __IOM uint32_t NRFFW[13]; /*!< (@ 0x00000014) Description collection: Reserved for Nordic firmware
  511. design */
  512. __IM uint32_t RESERVED1[2];
  513. __IOM uint32_t NRFHW[12]; /*!< (@ 0x00000050) Description collection: Reserved for Nordic hardware
  514. design */
  515. __IOM uint32_t CUSTOMER[32]; /*!< (@ 0x00000080) Description collection: Reserved for customer */
  516. __IM uint32_t RESERVED2[64];
  517. __IOM uint32_t PSELRESET[2]; /*!< (@ 0x00000200) Description collection: Mapping of the nRESET
  518. function (see POWER chapter for details) */
  519. __IOM uint32_t APPROTECT; /*!< (@ 0x00000208) Access port protection */
  520. __IM uint32_t RESERVED3;
  521. __IOM uint32_t DEBUGCTRL; /*!< (@ 0x00000210) Processor debug control */
  522. __IM uint32_t RESERVED4[60];
  523. __IOM uint32_t REGOUT0; /*!< (@ 0x00000304) Output voltage from REG0 regulator stage. The
  524. maximum output voltage from this stage is
  525. given as VDDH - VREG0DROP. */
  526. } NRF_UICR_Type; /*!< Size = 776 (0x308) */
  527. /* =========================================================================================================================== */
  528. /* ================ CLOCK ================ */
  529. /* =========================================================================================================================== */
  530. /**
  531. * @brief Clock control (CLOCK)
  532. */
  533. typedef struct { /*!< (@ 0x40000000) CLOCK Structure */
  534. __OM uint32_t TASKS_HFCLKSTART; /*!< (@ 0x00000000) Start HFXO crystal oscillator */
  535. __OM uint32_t TASKS_HFCLKSTOP; /*!< (@ 0x00000004) Stop HFXO crystal oscillator */
  536. __OM uint32_t TASKS_LFCLKSTART; /*!< (@ 0x00000008) Start LFCLK */
  537. __OM uint32_t TASKS_LFCLKSTOP; /*!< (@ 0x0000000C) Stop LFCLK */
  538. __OM uint32_t TASKS_CAL; /*!< (@ 0x00000010) Start calibration of LFRC */
  539. __OM uint32_t TASKS_CTSTART; /*!< (@ 0x00000014) Start calibration timer */
  540. __OM uint32_t TASKS_CTSTOP; /*!< (@ 0x00000018) Stop calibration timer */
  541. __IM uint32_t RESERVED[57];
  542. __IOM uint32_t EVENTS_HFCLKSTARTED; /*!< (@ 0x00000100) HFXO crystal oscillator started */
  543. __IOM uint32_t EVENTS_LFCLKSTARTED; /*!< (@ 0x00000104) LFCLK started */
  544. __IM uint32_t RESERVED1;
  545. __IOM uint32_t EVENTS_DONE; /*!< (@ 0x0000010C) Calibration of LFRC completed */
  546. __IOM uint32_t EVENTS_CTTO; /*!< (@ 0x00000110) Calibration timer timeout */
  547. __IM uint32_t RESERVED2[5];
  548. __IOM uint32_t EVENTS_CTSTARTED; /*!< (@ 0x00000128) Calibration timer has been started and is ready
  549. to process new tasks */
  550. __IOM uint32_t EVENTS_CTSTOPPED; /*!< (@ 0x0000012C) Calibration timer has been stopped and is ready
  551. to process new tasks */
  552. __IM uint32_t RESERVED3[117];
  553. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  554. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  555. __IM uint32_t RESERVED4[63];
  556. __IM uint32_t HFCLKRUN; /*!< (@ 0x00000408) Status indicating that HFCLKSTART task has been
  557. triggered */
  558. __IM uint32_t HFCLKSTAT; /*!< (@ 0x0000040C) HFCLK status */
  559. __IM uint32_t RESERVED5;
  560. __IM uint32_t LFCLKRUN; /*!< (@ 0x00000414) Status indicating that LFCLKSTART task has been
  561. triggered */
  562. __IM uint32_t LFCLKSTAT; /*!< (@ 0x00000418) LFCLK status */
  563. __IM uint32_t LFCLKSRCCOPY; /*!< (@ 0x0000041C) Copy of LFCLKSRC register, set when LFCLKSTART
  564. task was triggered */
  565. __IM uint32_t RESERVED6[62];
  566. __IOM uint32_t LFCLKSRC; /*!< (@ 0x00000518) Clock source for the LFCLK */
  567. __IM uint32_t RESERVED7[3];
  568. __IOM uint32_t HFXODEBOUNCE; /*!< (@ 0x00000528) HFXO debounce time. The HFXO is started by triggering
  569. the TASKS_HFCLKSTART task. */
  570. __IOM uint32_t LFXODEBOUNCE; /*!< (@ 0x0000052C) LFXO debounce time. The LFXO is started by triggering
  571. the TASKS_LFCLKSTART task when the LFCLKSRC
  572. register is configured for Xtal. */
  573. __IM uint32_t RESERVED8[2];
  574. __IOM uint32_t CTIV; /*!< (@ 0x00000538) Calibration timer interval */
  575. } NRF_CLOCK_Type; /*!< Size = 1340 (0x53c) */
  576. /* =========================================================================================================================== */
  577. /* ================ POWER ================ */
  578. /* =========================================================================================================================== */
  579. /**
  580. * @brief Power control (POWER)
  581. */
  582. typedef struct { /*!< (@ 0x40000000) POWER Structure */
  583. __IM uint32_t RESERVED[30];
  584. __OM uint32_t TASKS_CONSTLAT; /*!< (@ 0x00000078) Enable Constant Latency mode */
  585. __OM uint32_t TASKS_LOWPWR; /*!< (@ 0x0000007C) Enable Low-power mode (variable latency) */
  586. __IM uint32_t RESERVED1[34];
  587. __IOM uint32_t EVENTS_POFWARN; /*!< (@ 0x00000108) Power failure warning */
  588. __IM uint32_t RESERVED2[2];
  589. __IOM uint32_t EVENTS_SLEEPENTER; /*!< (@ 0x00000114) CPU entered WFI/WFE sleep */
  590. __IOM uint32_t EVENTS_SLEEPEXIT; /*!< (@ 0x00000118) CPU exited WFI/WFE sleep */
  591. __IOM uint32_t EVENTS_USBDETECTED; /*!< (@ 0x0000011C) Voltage supply detected on VBUS */
  592. __IOM uint32_t EVENTS_USBREMOVED; /*!< (@ 0x00000120) Voltage supply removed from VBUS */
  593. __IOM uint32_t EVENTS_USBPWRRDY; /*!< (@ 0x00000124) USB 3.3 V supply ready */
  594. __IM uint32_t RESERVED3[119];
  595. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  596. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  597. __IM uint32_t RESERVED4[61];
  598. __IOM uint32_t RESETREAS; /*!< (@ 0x00000400) Reset reason */
  599. __IM uint32_t RESERVED5[9];
  600. __IM uint32_t RAMSTATUS; /*!< (@ 0x00000428) Deprecated register - RAM status register */
  601. __IM uint32_t RESERVED6[3];
  602. __IM uint32_t USBREGSTATUS; /*!< (@ 0x00000438) USB supply status */
  603. __IM uint32_t RESERVED7[49];
  604. __OM uint32_t SYSTEMOFF; /*!< (@ 0x00000500) System OFF register */
  605. __IM uint32_t RESERVED8[3];
  606. __IOM uint32_t POFCON; /*!< (@ 0x00000510) Power-fail comparator configuration */
  607. __IM uint32_t RESERVED9[2];
  608. __IOM uint32_t GPREGRET; /*!< (@ 0x0000051C) General purpose retention register */
  609. __IOM uint32_t GPREGRET2; /*!< (@ 0x00000520) General purpose retention register */
  610. __IM uint32_t RESERVED10[21];
  611. __IOM uint32_t DCDCEN; /*!< (@ 0x00000578) Enable DC/DC converter for REG1 stage */
  612. __IM uint32_t RESERVED11[49];
  613. __IM uint32_t MAINREGSTATUS; /*!< (@ 0x00000640) Main supply status */
  614. __IM uint32_t RESERVED12[175];
  615. __IOM POWER_RAM_Type RAM[4]; /*!< (@ 0x00000900) Unspecified */
  616. } NRF_POWER_Type; /*!< Size = 2368 (0x940) */
  617. /* =========================================================================================================================== */
  618. /* ================ P0 ================ */
  619. /* =========================================================================================================================== */
  620. /**
  621. * @brief GPIO Port 1 (P0)
  622. */
  623. typedef struct { /*!< (@ 0x50000000) P0 Structure */
  624. __IM uint32_t RESERVED[321];
  625. __IOM uint32_t OUT; /*!< (@ 0x00000504) Write GPIO port */
  626. __IOM uint32_t OUTSET; /*!< (@ 0x00000508) Set individual bits in GPIO port */
  627. __IOM uint32_t OUTCLR; /*!< (@ 0x0000050C) Clear individual bits in GPIO port */
  628. __IM uint32_t IN; /*!< (@ 0x00000510) Read GPIO port */
  629. __IOM uint32_t DIR; /*!< (@ 0x00000514) Direction of GPIO pins */
  630. __IOM uint32_t DIRSET; /*!< (@ 0x00000518) DIR set register */
  631. __IOM uint32_t DIRCLR; /*!< (@ 0x0000051C) DIR clear register */
  632. __IOM uint32_t LATCH; /*!< (@ 0x00000520) Latch register indicating what GPIO pins that
  633. have met the criteria set in the PIN_CNF[n].SENSE
  634. registers */
  635. __IOM uint32_t DETECTMODE; /*!< (@ 0x00000524) Select between default DETECT signal behaviour
  636. and LDETECT mode */
  637. __IM uint32_t RESERVED1[118];
  638. __IOM uint32_t PIN_CNF[32]; /*!< (@ 0x00000700) Description collection: Configuration of GPIO
  639. pins */
  640. } NRF_GPIO_Type; /*!< Size = 1920 (0x780) */
  641. /* =========================================================================================================================== */
  642. /* ================ RADIO ================ */
  643. /* =========================================================================================================================== */
  644. /**
  645. * @brief 2.4 GHz radio (RADIO)
  646. */
  647. typedef struct { /*!< (@ 0x40001000) RADIO Structure */
  648. __OM uint32_t TASKS_TXEN; /*!< (@ 0x00000000) Enable RADIO in TX mode */
  649. __OM uint32_t TASKS_RXEN; /*!< (@ 0x00000004) Enable RADIO in RX mode */
  650. __OM uint32_t TASKS_START; /*!< (@ 0x00000008) Start RADIO */
  651. __OM uint32_t TASKS_STOP; /*!< (@ 0x0000000C) Stop RADIO */
  652. __OM uint32_t TASKS_DISABLE; /*!< (@ 0x00000010) Disable RADIO */
  653. __OM uint32_t TASKS_RSSISTART; /*!< (@ 0x00000014) Start the RSSI and take one single sample of
  654. the receive signal strength */
  655. __OM uint32_t TASKS_RSSISTOP; /*!< (@ 0x00000018) Stop the RSSI measurement */
  656. __OM uint32_t TASKS_BCSTART; /*!< (@ 0x0000001C) Start the bit counter */
  657. __OM uint32_t TASKS_BCSTOP; /*!< (@ 0x00000020) Stop the bit counter */
  658. __OM uint32_t TASKS_EDSTART; /*!< (@ 0x00000024) Start the energy detect measurement used in IEEE
  659. 802.15.4 mode */
  660. __OM uint32_t TASKS_EDSTOP; /*!< (@ 0x00000028) Stop the energy detect measurement */
  661. __OM uint32_t TASKS_CCASTART; /*!< (@ 0x0000002C) Start the clear channel assessment used in IEEE
  662. 802.15.4 mode */
  663. __OM uint32_t TASKS_CCASTOP; /*!< (@ 0x00000030) Stop the clear channel assessment */
  664. __IM uint32_t RESERVED[51];
  665. __IOM uint32_t EVENTS_READY; /*!< (@ 0x00000100) RADIO has ramped up and is ready to be started */
  666. __IOM uint32_t EVENTS_ADDRESS; /*!< (@ 0x00000104) Address sent or received */
  667. __IOM uint32_t EVENTS_PAYLOAD; /*!< (@ 0x00000108) Packet payload sent or received */
  668. __IOM uint32_t EVENTS_END; /*!< (@ 0x0000010C) Packet sent or received */
  669. __IOM uint32_t EVENTS_DISABLED; /*!< (@ 0x00000110) RADIO has been disabled */
  670. __IOM uint32_t EVENTS_DEVMATCH; /*!< (@ 0x00000114) A device address match occurred on the last received
  671. packet */
  672. __IOM uint32_t EVENTS_DEVMISS; /*!< (@ 0x00000118) No device address match occurred on the last
  673. received packet */
  674. __IOM uint32_t EVENTS_RSSIEND; /*!< (@ 0x0000011C) Sampling of receive signal strength complete */
  675. __IM uint32_t RESERVED1[2];
  676. __IOM uint32_t EVENTS_BCMATCH; /*!< (@ 0x00000128) Bit counter reached bit count value */
  677. __IM uint32_t RESERVED2;
  678. __IOM uint32_t EVENTS_CRCOK; /*!< (@ 0x00000130) Packet received with CRC ok */
  679. __IOM uint32_t EVENTS_CRCERROR; /*!< (@ 0x00000134) Packet received with CRC error */
  680. __IOM uint32_t EVENTS_FRAMESTART; /*!< (@ 0x00000138) IEEE 802.15.4 length field received */
  681. __IOM uint32_t EVENTS_EDEND; /*!< (@ 0x0000013C) Sampling of energy detection complete. A new
  682. ED sample is ready for readout from the
  683. RADIO.EDSAMPLE register */
  684. __IOM uint32_t EVENTS_EDSTOPPED; /*!< (@ 0x00000140) The sampling of energy detection has stopped */
  685. __IOM uint32_t EVENTS_CCAIDLE; /*!< (@ 0x00000144) Wireless medium in idle - clear to send */
  686. __IOM uint32_t EVENTS_CCABUSY; /*!< (@ 0x00000148) Wireless medium busy - do not send */
  687. __IOM uint32_t EVENTS_CCASTOPPED; /*!< (@ 0x0000014C) The CCA has stopped */
  688. __IOM uint32_t EVENTS_RATEBOOST; /*!< (@ 0x00000150) Ble_LR CI field received, receive mode is changed
  689. from Ble_LR125Kbit to Ble_LR500Kbit. */
  690. __IOM uint32_t EVENTS_TXREADY; /*!< (@ 0x00000154) RADIO has ramped up and is ready to be started
  691. TX path */
  692. __IOM uint32_t EVENTS_RXREADY; /*!< (@ 0x00000158) RADIO has ramped up and is ready to be started
  693. RX path */
  694. __IOM uint32_t EVENTS_MHRMATCH; /*!< (@ 0x0000015C) MAC header match found */
  695. __IM uint32_t RESERVED3[2];
  696. __IOM uint32_t EVENTS_SYNC; /*!< (@ 0x00000168) Preamble indicator */
  697. __IOM uint32_t EVENTS_PHYEND; /*!< (@ 0x0000016C) Generated when last bit is sent on air, or received
  698. from air */
  699. __IOM uint32_t EVENTS_CTEPRESENT; /*!< (@ 0x00000170) CTE is present (early warning right after receiving
  700. CTEInfo byte) */
  701. __IM uint32_t RESERVED4[35];
  702. __IOM uint32_t SHORTS; /*!< (@ 0x00000200) Shortcuts between local events and tasks */
  703. __IM uint32_t RESERVED5[64];
  704. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  705. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  706. __IM uint32_t RESERVED6[61];
  707. __IM uint32_t CRCSTATUS; /*!< (@ 0x00000400) CRC status */
  708. __IM uint32_t RESERVED7;
  709. __IM uint32_t RXMATCH; /*!< (@ 0x00000408) Received address */
  710. __IM uint32_t RXCRC; /*!< (@ 0x0000040C) CRC field of previously received packet */
  711. __IM uint32_t DAI; /*!< (@ 0x00000410) Device address match index */
  712. __IM uint32_t PDUSTAT; /*!< (@ 0x00000414) Payload status */
  713. __IM uint32_t RESERVED8[13];
  714. __IM uint32_t CTESTATUS; /*!< (@ 0x0000044C) CTEInfo parsed from received packet */
  715. __IM uint32_t RESERVED9[2];
  716. __IM uint32_t DFESTATUS; /*!< (@ 0x00000458) DFE status information */
  717. __IM uint32_t RESERVED10[42];
  718. __IOM uint32_t PACKETPTR; /*!< (@ 0x00000504) Packet pointer */
  719. __IOM uint32_t FREQUENCY; /*!< (@ 0x00000508) Frequency */
  720. __IOM uint32_t TXPOWER; /*!< (@ 0x0000050C) Output power */
  721. __IOM uint32_t MODE; /*!< (@ 0x00000510) Data rate and modulation */
  722. __IOM uint32_t PCNF0; /*!< (@ 0x00000514) Packet configuration register 0 */
  723. __IOM uint32_t PCNF1; /*!< (@ 0x00000518) Packet configuration register 1 */
  724. __IOM uint32_t BASE0; /*!< (@ 0x0000051C) Base address 0 */
  725. __IOM uint32_t BASE1; /*!< (@ 0x00000520) Base address 1 */
  726. __IOM uint32_t PREFIX0; /*!< (@ 0x00000524) Prefixes bytes for logical addresses 0-3 */
  727. __IOM uint32_t PREFIX1; /*!< (@ 0x00000528) Prefixes bytes for logical addresses 4-7 */
  728. __IOM uint32_t TXADDRESS; /*!< (@ 0x0000052C) Transmit address select */
  729. __IOM uint32_t RXADDRESSES; /*!< (@ 0x00000530) Receive address select */
  730. __IOM uint32_t CRCCNF; /*!< (@ 0x00000534) CRC configuration */
  731. __IOM uint32_t CRCPOLY; /*!< (@ 0x00000538) CRC polynomial */
  732. __IOM uint32_t CRCINIT; /*!< (@ 0x0000053C) CRC initial value */
  733. __IM uint32_t RESERVED11;
  734. __IOM uint32_t TIFS; /*!< (@ 0x00000544) Interframe spacing in us */
  735. __IM uint32_t RSSISAMPLE; /*!< (@ 0x00000548) RSSI sample */
  736. __IM uint32_t RESERVED12;
  737. __IM uint32_t STATE; /*!< (@ 0x00000550) Current radio state */
  738. __IOM uint32_t DATAWHITEIV; /*!< (@ 0x00000554) Data whitening initial value */
  739. __IM uint32_t RESERVED13[2];
  740. __IOM uint32_t BCC; /*!< (@ 0x00000560) Bit counter compare */
  741. __IM uint32_t RESERVED14[39];
  742. __IOM uint32_t DAB[8]; /*!< (@ 0x00000600) Description collection: Device address base segment
  743. n */
  744. __IOM uint32_t DAP[8]; /*!< (@ 0x00000620) Description collection: Device address prefix
  745. n */
  746. __IOM uint32_t DACNF; /*!< (@ 0x00000640) Device address match configuration */
  747. __IOM uint32_t MHRMATCHCONF; /*!< (@ 0x00000644) Search pattern configuration */
  748. __IOM uint32_t MHRMATCHMAS; /*!< (@ 0x00000648) Pattern mask */
  749. __IM uint32_t RESERVED15;
  750. __IOM uint32_t MODECNF0; /*!< (@ 0x00000650) Radio mode configuration register 0 */
  751. __IM uint32_t RESERVED16[3];
  752. __IOM uint32_t SFD; /*!< (@ 0x00000660) IEEE 802.15.4 start of frame delimiter */
  753. __IOM uint32_t EDCNT; /*!< (@ 0x00000664) IEEE 802.15.4 energy detect loop count */
  754. __IM uint32_t EDSAMPLE; /*!< (@ 0x00000668) IEEE 802.15.4 energy detect level */
  755. __IOM uint32_t CCACTRL; /*!< (@ 0x0000066C) IEEE 802.15.4 clear channel assessment control */
  756. __IM uint32_t RESERVED17[164];
  757. __IOM uint32_t DFEMODE; /*!< (@ 0x00000900) Whether to use Angle-of-Arrival (AOA) or Angle-of-Departure
  758. (AOD) */
  759. __IOM uint32_t CTEINLINECONF; /*!< (@ 0x00000904) Configuration for CTE inline mode */
  760. __IM uint32_t RESERVED18[2];
  761. __IOM uint32_t DFECTRL1; /*!< (@ 0x00000910) Various configuration for Direction finding */
  762. __IOM uint32_t DFECTRL2; /*!< (@ 0x00000914) Start offset for Direction finding */
  763. __IM uint32_t RESERVED19[4];
  764. __IOM uint32_t SWITCHPATTERN; /*!< (@ 0x00000928) GPIO patterns to be used for each antenna */
  765. __IOM uint32_t CLEARPATTERN; /*!< (@ 0x0000092C) Clear the GPIO pattern array for antenna control */
  766. __IOM RADIO_PSEL_Type PSEL; /*!< (@ 0x00000930) Unspecified */
  767. __IOM RADIO_DFEPACKET_Type DFEPACKET; /*!< (@ 0x00000950) DFE packet EasyDMA channel */
  768. __IM uint32_t RESERVED20[424];
  769. __IOM uint32_t POWER; /*!< (@ 0x00000FFC) Peripheral power control */
  770. } NRF_RADIO_Type; /*!< Size = 4096 (0x1000) */
  771. /* =========================================================================================================================== */
  772. /* ================ UART0 ================ */
  773. /* =========================================================================================================================== */
  774. /**
  775. * @brief Universal Asynchronous Receiver/Transmitter (UART0)
  776. */
  777. typedef struct { /*!< (@ 0x40002000) UART0 Structure */
  778. __OM uint32_t TASKS_STARTRX; /*!< (@ 0x00000000) Start UART receiver */
  779. __OM uint32_t TASKS_STOPRX; /*!< (@ 0x00000004) Stop UART receiver */
  780. __OM uint32_t TASKS_STARTTX; /*!< (@ 0x00000008) Start UART transmitter */
  781. __OM uint32_t TASKS_STOPTX; /*!< (@ 0x0000000C) Stop UART transmitter */
  782. __IM uint32_t RESERVED[3];
  783. __OM uint32_t TASKS_SUSPEND; /*!< (@ 0x0000001C) Suspend UART */
  784. __IM uint32_t RESERVED1[56];
  785. __IOM uint32_t EVENTS_CTS; /*!< (@ 0x00000100) CTS is activated (set low). Clear To Send. */
  786. __IOM uint32_t EVENTS_NCTS; /*!< (@ 0x00000104) CTS is deactivated (set high). Not Clear To Send. */
  787. __IOM uint32_t EVENTS_RXDRDY; /*!< (@ 0x00000108) Data received in RXD */
  788. __IM uint32_t RESERVED2[4];
  789. __IOM uint32_t EVENTS_TXDRDY; /*!< (@ 0x0000011C) Data sent from TXD */
  790. __IM uint32_t RESERVED3;
  791. __IOM uint32_t EVENTS_ERROR; /*!< (@ 0x00000124) Error detected */
  792. __IM uint32_t RESERVED4[7];
  793. __IOM uint32_t EVENTS_RXTO; /*!< (@ 0x00000144) Receiver timeout */
  794. __IM uint32_t RESERVED5[46];
  795. __IOM uint32_t SHORTS; /*!< (@ 0x00000200) Shortcuts between local events and tasks */
  796. __IM uint32_t RESERVED6[64];
  797. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  798. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  799. __IM uint32_t RESERVED7[93];
  800. __IOM uint32_t ERRORSRC; /*!< (@ 0x00000480) Error source */
  801. __IM uint32_t RESERVED8[31];
  802. __IOM uint32_t ENABLE; /*!< (@ 0x00000500) Enable UART */
  803. __IM uint32_t RESERVED9;
  804. __IOM UART_PSEL_Type PSEL; /*!< (@ 0x00000508) Unspecified */
  805. __IM uint32_t RXD; /*!< (@ 0x00000518) RXD register */
  806. __OM uint32_t TXD; /*!< (@ 0x0000051C) TXD register */
  807. __IM uint32_t RESERVED10;
  808. __IOM uint32_t BAUDRATE; /*!< (@ 0x00000524) Baud rate. Accuracy depends on the HFCLK source
  809. selected. */
  810. __IM uint32_t RESERVED11[17];
  811. __IOM uint32_t CONFIG; /*!< (@ 0x0000056C) Configuration of parity and hardware flow control */
  812. } NRF_UART_Type; /*!< Size = 1392 (0x570) */
  813. /* =========================================================================================================================== */
  814. /* ================ UARTE0 ================ */
  815. /* =========================================================================================================================== */
  816. /**
  817. * @brief UART with EasyDMA (UARTE0)
  818. */
  819. typedef struct { /*!< (@ 0x40002000) UARTE0 Structure */
  820. __OM uint32_t TASKS_STARTRX; /*!< (@ 0x00000000) Start UART receiver */
  821. __OM uint32_t TASKS_STOPRX; /*!< (@ 0x00000004) Stop UART receiver */
  822. __OM uint32_t TASKS_STARTTX; /*!< (@ 0x00000008) Start UART transmitter */
  823. __OM uint32_t TASKS_STOPTX; /*!< (@ 0x0000000C) Stop UART transmitter */
  824. __IM uint32_t RESERVED[7];
  825. __OM uint32_t TASKS_FLUSHRX; /*!< (@ 0x0000002C) Flush RX FIFO into RX buffer */
  826. __IM uint32_t RESERVED1[52];
  827. __IOM uint32_t EVENTS_CTS; /*!< (@ 0x00000100) CTS is activated (set low). Clear To Send. */
  828. __IOM uint32_t EVENTS_NCTS; /*!< (@ 0x00000104) CTS is deactivated (set high). Not Clear To Send. */
  829. __IOM uint32_t EVENTS_RXDRDY; /*!< (@ 0x00000108) Data received in RXD (but potentially not yet
  830. transferred to Data RAM) */
  831. __IM uint32_t RESERVED2;
  832. __IOM uint32_t EVENTS_ENDRX; /*!< (@ 0x00000110) Receive buffer is filled up */
  833. __IM uint32_t RESERVED3[2];
  834. __IOM uint32_t EVENTS_TXDRDY; /*!< (@ 0x0000011C) Data sent from TXD */
  835. __IOM uint32_t EVENTS_ENDTX; /*!< (@ 0x00000120) Last TX byte transmitted */
  836. __IOM uint32_t EVENTS_ERROR; /*!< (@ 0x00000124) Error detected */
  837. __IM uint32_t RESERVED4[7];
  838. __IOM uint32_t EVENTS_RXTO; /*!< (@ 0x00000144) Receiver timeout */
  839. __IM uint32_t RESERVED5;
  840. __IOM uint32_t EVENTS_RXSTARTED; /*!< (@ 0x0000014C) UART receiver has started */
  841. __IOM uint32_t EVENTS_TXSTARTED; /*!< (@ 0x00000150) UART transmitter has started */
  842. __IM uint32_t RESERVED6;
  843. __IOM uint32_t EVENTS_TXSTOPPED; /*!< (@ 0x00000158) Transmitter stopped */
  844. __IM uint32_t RESERVED7[41];
  845. __IOM uint32_t SHORTS; /*!< (@ 0x00000200) Shortcuts between local events and tasks */
  846. __IM uint32_t RESERVED8[63];
  847. __IOM uint32_t INTEN; /*!< (@ 0x00000300) Enable or disable interrupt */
  848. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  849. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  850. __IM uint32_t RESERVED9[93];
  851. __IOM uint32_t ERRORSRC; /*!< (@ 0x00000480) Error source Note : this register is read / write
  852. one to clear. */
  853. __IM uint32_t RESERVED10[31];
  854. __IOM uint32_t ENABLE; /*!< (@ 0x00000500) Enable UART */
  855. __IM uint32_t RESERVED11;
  856. __IOM UARTE_PSEL_Type PSEL; /*!< (@ 0x00000508) Unspecified */
  857. __IM uint32_t RESERVED12[3];
  858. __IOM uint32_t BAUDRATE; /*!< (@ 0x00000524) Baud rate. Accuracy depends on the HFCLK source
  859. selected. */
  860. __IM uint32_t RESERVED13[3];
  861. __IOM UARTE_RXD_Type RXD; /*!< (@ 0x00000534) RXD EasyDMA channel */
  862. __IM uint32_t RESERVED14;
  863. __IOM UARTE_TXD_Type TXD; /*!< (@ 0x00000544) TXD EasyDMA channel */
  864. __IM uint32_t RESERVED15[7];
  865. __IOM uint32_t CONFIG; /*!< (@ 0x0000056C) Configuration of parity and hardware flow control */
  866. } NRF_UARTE_Type; /*!< Size = 1392 (0x570) */
  867. /* =========================================================================================================================== */
  868. /* ================ SPI0 ================ */
  869. /* =========================================================================================================================== */
  870. /**
  871. * @brief Serial Peripheral Interface 0 (SPI0)
  872. */
  873. typedef struct { /*!< (@ 0x40003000) SPI0 Structure */
  874. __IM uint32_t RESERVED[66];
  875. __IOM uint32_t EVENTS_READY; /*!< (@ 0x00000108) TXD byte sent and RXD byte received */
  876. __IM uint32_t RESERVED1[126];
  877. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  878. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  879. __IM uint32_t RESERVED2[125];
  880. __IOM uint32_t ENABLE; /*!< (@ 0x00000500) Enable SPI */
  881. __IM uint32_t RESERVED3;
  882. __IOM SPI_PSEL_Type PSEL; /*!< (@ 0x00000508) Unspecified */
  883. __IM uint32_t RESERVED4;
  884. __IM uint32_t RXD; /*!< (@ 0x00000518) RXD register */
  885. __IOM uint32_t TXD; /*!< (@ 0x0000051C) TXD register */
  886. __IM uint32_t RESERVED5;
  887. __IOM uint32_t FREQUENCY; /*!< (@ 0x00000524) SPI frequency. Accuracy depends on the HFCLK
  888. source selected. */
  889. __IM uint32_t RESERVED6[11];
  890. __IOM uint32_t CONFIG; /*!< (@ 0x00000554) Configuration register */
  891. } NRF_SPI_Type; /*!< Size = 1368 (0x558) */
  892. /* =========================================================================================================================== */
  893. /* ================ SPIM0 ================ */
  894. /* =========================================================================================================================== */
  895. /**
  896. * @brief Serial Peripheral Interface Master with EasyDMA 0 (SPIM0)
  897. */
  898. typedef struct { /*!< (@ 0x40003000) SPIM0 Structure */
  899. __IM uint32_t RESERVED[4];
  900. __OM uint32_t TASKS_START; /*!< (@ 0x00000010) Start SPI transaction */
  901. __OM uint32_t TASKS_STOP; /*!< (@ 0x00000014) Stop SPI transaction */
  902. __IM uint32_t RESERVED1;
  903. __OM uint32_t TASKS_SUSPEND; /*!< (@ 0x0000001C) Suspend SPI transaction */
  904. __OM uint32_t TASKS_RESUME; /*!< (@ 0x00000020) Resume SPI transaction */
  905. __IM uint32_t RESERVED2[56];
  906. __IOM uint32_t EVENTS_STOPPED; /*!< (@ 0x00000104) SPI transaction has stopped */
  907. __IM uint32_t RESERVED3[2];
  908. __IOM uint32_t EVENTS_ENDRX; /*!< (@ 0x00000110) End of RXD buffer reached */
  909. __IM uint32_t RESERVED4;
  910. __IOM uint32_t EVENTS_END; /*!< (@ 0x00000118) End of RXD buffer and TXD buffer reached */
  911. __IM uint32_t RESERVED5;
  912. __IOM uint32_t EVENTS_ENDTX; /*!< (@ 0x00000120) End of TXD buffer reached */
  913. __IM uint32_t RESERVED6[10];
  914. __IOM uint32_t EVENTS_STARTED; /*!< (@ 0x0000014C) Transaction started */
  915. __IM uint32_t RESERVED7[44];
  916. __IOM uint32_t SHORTS; /*!< (@ 0x00000200) Shortcuts between local events and tasks */
  917. __IM uint32_t RESERVED8[64];
  918. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  919. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  920. __IM uint32_t RESERVED9[125];
  921. __IOM uint32_t ENABLE; /*!< (@ 0x00000500) Enable SPIM */
  922. __IM uint32_t RESERVED10;
  923. __IOM SPIM_PSEL_Type PSEL; /*!< (@ 0x00000508) Unspecified */
  924. __IM uint32_t RESERVED11[4];
  925. __IOM uint32_t FREQUENCY; /*!< (@ 0x00000524) SPI frequency. Accuracy depends on the HFCLK
  926. source selected. */
  927. __IM uint32_t RESERVED12[3];
  928. __IOM SPIM_RXD_Type RXD; /*!< (@ 0x00000534) RXD EasyDMA channel */
  929. __IOM SPIM_TXD_Type TXD; /*!< (@ 0x00000544) TXD EasyDMA channel */
  930. __IOM uint32_t CONFIG; /*!< (@ 0x00000554) Configuration register */
  931. __IM uint32_t RESERVED13[26];
  932. __IOM uint32_t ORC; /*!< (@ 0x000005C0) Byte transmitted after TXD.MAXCNT bytes have
  933. been transmitted in the case when RXD.MAXCNT
  934. is greater than TXD.MAXCNT */
  935. } NRF_SPIM_Type; /*!< Size = 1476 (0x5c4) */
  936. /* =========================================================================================================================== */
  937. /* ================ SPIS0 ================ */
  938. /* =========================================================================================================================== */
  939. /**
  940. * @brief SPI Slave 0 (SPIS0)
  941. */
  942. typedef struct { /*!< (@ 0x40003000) SPIS0 Structure */
  943. __IM uint32_t RESERVED[9];
  944. __OM uint32_t TASKS_ACQUIRE; /*!< (@ 0x00000024) Acquire SPI semaphore */
  945. __OM uint32_t TASKS_RELEASE; /*!< (@ 0x00000028) Release SPI semaphore, enabling the SPI slave
  946. to acquire it */
  947. __IM uint32_t RESERVED1[54];
  948. __IOM uint32_t EVENTS_END; /*!< (@ 0x00000104) Granted transaction completed */
  949. __IM uint32_t RESERVED2[2];
  950. __IOM uint32_t EVENTS_ENDRX; /*!< (@ 0x00000110) End of RXD buffer reached */
  951. __IM uint32_t RESERVED3[5];
  952. __IOM uint32_t EVENTS_ACQUIRED; /*!< (@ 0x00000128) Semaphore acquired */
  953. __IM uint32_t RESERVED4[53];
  954. __IOM uint32_t SHORTS; /*!< (@ 0x00000200) Shortcuts between local events and tasks */
  955. __IM uint32_t RESERVED5[64];
  956. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  957. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  958. __IM uint32_t RESERVED6[61];
  959. __IM uint32_t SEMSTAT; /*!< (@ 0x00000400) Semaphore status register */
  960. __IM uint32_t RESERVED7[15];
  961. __IOM uint32_t STATUS; /*!< (@ 0x00000440) Status from last transaction */
  962. __IM uint32_t RESERVED8[47];
  963. __IOM uint32_t ENABLE; /*!< (@ 0x00000500) Enable SPI slave */
  964. __IM uint32_t RESERVED9;
  965. __IOM SPIS_PSEL_Type PSEL; /*!< (@ 0x00000508) Unspecified */
  966. __IM uint32_t RESERVED10[7];
  967. __IOM SPIS_RXD_Type RXD; /*!< (@ 0x00000534) Unspecified */
  968. __IOM SPIS_TXD_Type TXD; /*!< (@ 0x00000544) Unspecified */
  969. __IOM uint32_t CONFIG; /*!< (@ 0x00000554) Configuration register */
  970. __IM uint32_t RESERVED11;
  971. __IOM uint32_t DEF; /*!< (@ 0x0000055C) Default character. Character clocked out in case
  972. of an ignored transaction. */
  973. __IM uint32_t RESERVED12[24];
  974. __IOM uint32_t ORC; /*!< (@ 0x000005C0) Over-read character */
  975. } NRF_SPIS_Type; /*!< Size = 1476 (0x5c4) */
  976. /* =========================================================================================================================== */
  977. /* ================ TWI0 ================ */
  978. /* =========================================================================================================================== */
  979. /**
  980. * @brief I2C compatible Two-Wire Interface 0 (TWI0)
  981. */
  982. typedef struct { /*!< (@ 0x40003000) TWI0 Structure */
  983. __OM uint32_t TASKS_STARTRX; /*!< (@ 0x00000000) Start TWI receive sequence */
  984. __IM uint32_t RESERVED;
  985. __OM uint32_t TASKS_STARTTX; /*!< (@ 0x00000008) Start TWI transmit sequence */
  986. __IM uint32_t RESERVED1[2];
  987. __OM uint32_t TASKS_STOP; /*!< (@ 0x00000014) Stop TWI transaction */
  988. __IM uint32_t RESERVED2;
  989. __OM uint32_t TASKS_SUSPEND; /*!< (@ 0x0000001C) Suspend TWI transaction */
  990. __OM uint32_t TASKS_RESUME; /*!< (@ 0x00000020) Resume TWI transaction */
  991. __IM uint32_t RESERVED3[56];
  992. __IOM uint32_t EVENTS_STOPPED; /*!< (@ 0x00000104) TWI stopped */
  993. __IOM uint32_t EVENTS_RXDREADY; /*!< (@ 0x00000108) TWI RXD byte received */
  994. __IM uint32_t RESERVED4[4];
  995. __IOM uint32_t EVENTS_TXDSENT; /*!< (@ 0x0000011C) TWI TXD byte sent */
  996. __IM uint32_t RESERVED5;
  997. __IOM uint32_t EVENTS_ERROR; /*!< (@ 0x00000124) TWI error */
  998. __IM uint32_t RESERVED6[4];
  999. __IOM uint32_t EVENTS_BB; /*!< (@ 0x00000138) TWI byte boundary, generated before each byte
  1000. that is sent or received */
  1001. __IM uint32_t RESERVED7[3];
  1002. __IOM uint32_t EVENTS_SUSPENDED; /*!< (@ 0x00000148) TWI entered the suspended state */
  1003. __IM uint32_t RESERVED8[45];
  1004. __IOM uint32_t SHORTS; /*!< (@ 0x00000200) Shortcuts between local events and tasks */
  1005. __IM uint32_t RESERVED9[64];
  1006. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  1007. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  1008. __IM uint32_t RESERVED10[110];
  1009. __IOM uint32_t ERRORSRC; /*!< (@ 0x000004C4) Error source */
  1010. __IM uint32_t RESERVED11[14];
  1011. __IOM uint32_t ENABLE; /*!< (@ 0x00000500) Enable TWI */
  1012. __IM uint32_t RESERVED12;
  1013. __IOM TWI_PSEL_Type PSEL; /*!< (@ 0x00000508) Unspecified */
  1014. __IM uint32_t RESERVED13[2];
  1015. __IM uint32_t RXD; /*!< (@ 0x00000518) RXD register */
  1016. __IOM uint32_t TXD; /*!< (@ 0x0000051C) TXD register */
  1017. __IM uint32_t RESERVED14;
  1018. __IOM uint32_t FREQUENCY; /*!< (@ 0x00000524) TWI frequency. Accuracy depends on the HFCLK
  1019. source selected. */
  1020. __IM uint32_t RESERVED15[24];
  1021. __IOM uint32_t ADDRESS; /*!< (@ 0x00000588) Address used in the TWI transfer */
  1022. } NRF_TWI_Type; /*!< Size = 1420 (0x58c) */
  1023. /* =========================================================================================================================== */
  1024. /* ================ TWIM0 ================ */
  1025. /* =========================================================================================================================== */
  1026. /**
  1027. * @brief I2C compatible Two-Wire Master Interface with EasyDMA 0 (TWIM0)
  1028. */
  1029. typedef struct { /*!< (@ 0x40003000) TWIM0 Structure */
  1030. __OM uint32_t TASKS_STARTRX; /*!< (@ 0x00000000) Start TWI receive sequence */
  1031. __IM uint32_t RESERVED;
  1032. __OM uint32_t TASKS_STARTTX; /*!< (@ 0x00000008) Start TWI transmit sequence */
  1033. __IM uint32_t RESERVED1[2];
  1034. __OM uint32_t TASKS_STOP; /*!< (@ 0x00000014) Stop TWI transaction. Must be issued while the
  1035. TWI master is not suspended. */
  1036. __IM uint32_t RESERVED2;
  1037. __OM uint32_t TASKS_SUSPEND; /*!< (@ 0x0000001C) Suspend TWI transaction */
  1038. __OM uint32_t TASKS_RESUME; /*!< (@ 0x00000020) Resume TWI transaction */
  1039. __IM uint32_t RESERVED3[56];
  1040. __IOM uint32_t EVENTS_STOPPED; /*!< (@ 0x00000104) TWI stopped */
  1041. __IM uint32_t RESERVED4[7];
  1042. __IOM uint32_t EVENTS_ERROR; /*!< (@ 0x00000124) TWI error */
  1043. __IM uint32_t RESERVED5[8];
  1044. __IOM uint32_t EVENTS_SUSPENDED; /*!< (@ 0x00000148) Last byte has been sent out after the SUSPEND
  1045. task has been issued, TWI traffic is now
  1046. suspended. */
  1047. __IOM uint32_t EVENTS_RXSTARTED; /*!< (@ 0x0000014C) Receive sequence started */
  1048. __IOM uint32_t EVENTS_TXSTARTED; /*!< (@ 0x00000150) Transmit sequence started */
  1049. __IM uint32_t RESERVED6[2];
  1050. __IOM uint32_t EVENTS_LASTRX; /*!< (@ 0x0000015C) Byte boundary, starting to receive the last byte */
  1051. __IOM uint32_t EVENTS_LASTTX; /*!< (@ 0x00000160) Byte boundary, starting to transmit the last
  1052. byte */
  1053. __IM uint32_t RESERVED7[39];
  1054. __IOM uint32_t SHORTS; /*!< (@ 0x00000200) Shortcuts between local events and tasks */
  1055. __IM uint32_t RESERVED8[63];
  1056. __IOM uint32_t INTEN; /*!< (@ 0x00000300) Enable or disable interrupt */
  1057. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  1058. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  1059. __IM uint32_t RESERVED9[110];
  1060. __IOM uint32_t ERRORSRC; /*!< (@ 0x000004C4) Error source */
  1061. __IM uint32_t RESERVED10[14];
  1062. __IOM uint32_t ENABLE; /*!< (@ 0x00000500) Enable TWIM */
  1063. __IM uint32_t RESERVED11;
  1064. __IOM TWIM_PSEL_Type PSEL; /*!< (@ 0x00000508) Unspecified */
  1065. __IM uint32_t RESERVED12[5];
  1066. __IOM uint32_t FREQUENCY; /*!< (@ 0x00000524) TWI frequency. Accuracy depends on the HFCLK
  1067. source selected. */
  1068. __IM uint32_t RESERVED13[3];
  1069. __IOM TWIM_RXD_Type RXD; /*!< (@ 0x00000534) RXD EasyDMA channel */
  1070. __IOM TWIM_TXD_Type TXD; /*!< (@ 0x00000544) TXD EasyDMA channel */
  1071. __IM uint32_t RESERVED14[13];
  1072. __IOM uint32_t ADDRESS; /*!< (@ 0x00000588) Address used in the TWI transfer */
  1073. } NRF_TWIM_Type; /*!< Size = 1420 (0x58c) */
  1074. /* =========================================================================================================================== */
  1075. /* ================ TWIS0 ================ */
  1076. /* =========================================================================================================================== */
  1077. /**
  1078. * @brief I2C compatible Two-Wire Slave Interface with EasyDMA 0 (TWIS0)
  1079. */
  1080. typedef struct { /*!< (@ 0x40003000) TWIS0 Structure */
  1081. __IM uint32_t RESERVED[5];
  1082. __OM uint32_t TASKS_STOP; /*!< (@ 0x00000014) Stop TWI transaction */
  1083. __IM uint32_t RESERVED1;
  1084. __OM uint32_t TASKS_SUSPEND; /*!< (@ 0x0000001C) Suspend TWI transaction */
  1085. __OM uint32_t TASKS_RESUME; /*!< (@ 0x00000020) Resume TWI transaction */
  1086. __IM uint32_t RESERVED2[3];
  1087. __OM uint32_t TASKS_PREPARERX; /*!< (@ 0x00000030) Prepare the TWI slave to respond to a write command */
  1088. __OM uint32_t TASKS_PREPARETX; /*!< (@ 0x00000034) Prepare the TWI slave to respond to a read command */
  1089. __IM uint32_t RESERVED3[51];
  1090. __IOM uint32_t EVENTS_STOPPED; /*!< (@ 0x00000104) TWI stopped */
  1091. __IM uint32_t RESERVED4[7];
  1092. __IOM uint32_t EVENTS_ERROR; /*!< (@ 0x00000124) TWI error */
  1093. __IM uint32_t RESERVED5[9];
  1094. __IOM uint32_t EVENTS_RXSTARTED; /*!< (@ 0x0000014C) Receive sequence started */
  1095. __IOM uint32_t EVENTS_TXSTARTED; /*!< (@ 0x00000150) Transmit sequence started */
  1096. __IM uint32_t RESERVED6[4];
  1097. __IOM uint32_t EVENTS_WRITE; /*!< (@ 0x00000164) Write command received */
  1098. __IOM uint32_t EVENTS_READ; /*!< (@ 0x00000168) Read command received */
  1099. __IM uint32_t RESERVED7[37];
  1100. __IOM uint32_t SHORTS; /*!< (@ 0x00000200) Shortcuts between local events and tasks */
  1101. __IM uint32_t RESERVED8[63];
  1102. __IOM uint32_t INTEN; /*!< (@ 0x00000300) Enable or disable interrupt */
  1103. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  1104. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  1105. __IM uint32_t RESERVED9[113];
  1106. __IOM uint32_t ERRORSRC; /*!< (@ 0x000004D0) Error source */
  1107. __IM uint32_t MATCH; /*!< (@ 0x000004D4) Status register indicating which address had
  1108. a match */
  1109. __IM uint32_t RESERVED10[10];
  1110. __IOM uint32_t ENABLE; /*!< (@ 0x00000500) Enable TWIS */
  1111. __IM uint32_t RESERVED11;
  1112. __IOM TWIS_PSEL_Type PSEL; /*!< (@ 0x00000508) Unspecified */
  1113. __IM uint32_t RESERVED12[9];
  1114. __IOM TWIS_RXD_Type RXD; /*!< (@ 0x00000534) RXD EasyDMA channel */
  1115. __IOM TWIS_TXD_Type TXD; /*!< (@ 0x00000544) TXD EasyDMA channel */
  1116. __IM uint32_t RESERVED13[13];
  1117. __IOM uint32_t ADDRESS[2]; /*!< (@ 0x00000588) Description collection: TWI slave address n */
  1118. __IM uint32_t RESERVED14;
  1119. __IOM uint32_t CONFIG; /*!< (@ 0x00000594) Configuration register for the address match
  1120. mechanism */
  1121. __IM uint32_t RESERVED15[10];
  1122. __IOM uint32_t ORC; /*!< (@ 0x000005C0) Over-read character. Character sent out in case
  1123. of an over-read of the transmit buffer. */
  1124. } NRF_TWIS_Type; /*!< Size = 1476 (0x5c4) */
  1125. /* =========================================================================================================================== */
  1126. /* ================ GPIOTE ================ */
  1127. /* =========================================================================================================================== */
  1128. /**
  1129. * @brief GPIO Tasks and Events (GPIOTE)
  1130. */
  1131. typedef struct { /*!< (@ 0x40006000) GPIOTE Structure */
  1132. __OM uint32_t TASKS_OUT[8]; /*!< (@ 0x00000000) Description collection: Task for writing to pin
  1133. specified in CONFIG[n].PSEL. Action on pin
  1134. is configured in CONFIG[n].POLARITY. */
  1135. __IM uint32_t RESERVED[4];
  1136. __OM uint32_t TASKS_SET[8]; /*!< (@ 0x00000030) Description collection: Task for writing to pin
  1137. specified in CONFIG[n].PSEL. Action on pin
  1138. is to set it high. */
  1139. __IM uint32_t RESERVED1[4];
  1140. __OM uint32_t TASKS_CLR[8]; /*!< (@ 0x00000060) Description collection: Task for writing to pin
  1141. specified in CONFIG[n].PSEL. Action on pin
  1142. is to set it low. */
  1143. __IM uint32_t RESERVED2[32];
  1144. __IOM uint32_t EVENTS_IN[8]; /*!< (@ 0x00000100) Description collection: Event generated from
  1145. pin specified in CONFIG[n].PSEL */
  1146. __IM uint32_t RESERVED3[23];
  1147. __IOM uint32_t EVENTS_PORT; /*!< (@ 0x0000017C) Event generated from multiple input GPIO pins
  1148. with SENSE mechanism enabled */
  1149. __IM uint32_t RESERVED4[97];
  1150. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  1151. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  1152. __IM uint32_t RESERVED5[129];
  1153. __IOM uint32_t CONFIG[8]; /*!< (@ 0x00000510) Description collection: Configuration for OUT[n],
  1154. SET[n], and CLR[n] tasks and IN[n] event */
  1155. } NRF_GPIOTE_Type; /*!< Size = 1328 (0x530) */
  1156. /* =========================================================================================================================== */
  1157. /* ================ TIMER0 ================ */
  1158. /* =========================================================================================================================== */
  1159. /**
  1160. * @brief Timer/Counter 0 (TIMER0)
  1161. */
  1162. typedef struct { /*!< (@ 0x40008000) TIMER0 Structure */
  1163. __OM uint32_t TASKS_START; /*!< (@ 0x00000000) Start Timer */
  1164. __OM uint32_t TASKS_STOP; /*!< (@ 0x00000004) Stop Timer */
  1165. __OM uint32_t TASKS_COUNT; /*!< (@ 0x00000008) Increment Timer (Counter mode only) */
  1166. __OM uint32_t TASKS_CLEAR; /*!< (@ 0x0000000C) Clear time */
  1167. __OM uint32_t TASKS_SHUTDOWN; /*!< (@ 0x00000010) Deprecated register - Shut down timer */
  1168. __IM uint32_t RESERVED[11];
  1169. __OM uint32_t TASKS_CAPTURE[6]; /*!< (@ 0x00000040) Description collection: Capture Timer value to
  1170. CC[n] register */
  1171. __IM uint32_t RESERVED1[58];
  1172. __IOM uint32_t EVENTS_COMPARE[6]; /*!< (@ 0x00000140) Description collection: Compare event on CC[n]
  1173. match */
  1174. __IM uint32_t RESERVED2[42];
  1175. __IOM uint32_t SHORTS; /*!< (@ 0x00000200) Shortcuts between local events and tasks */
  1176. __IM uint32_t RESERVED3[64];
  1177. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  1178. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  1179. __IM uint32_t RESERVED4[126];
  1180. __IOM uint32_t MODE; /*!< (@ 0x00000504) Timer mode selection */
  1181. __IOM uint32_t BITMODE; /*!< (@ 0x00000508) Configure the number of bits used by the TIMER */
  1182. __IM uint32_t RESERVED5;
  1183. __IOM uint32_t PRESCALER; /*!< (@ 0x00000510) Timer prescaler register */
  1184. __IM uint32_t RESERVED6[11];
  1185. __IOM uint32_t CC[6]; /*!< (@ 0x00000540) Description collection: Capture/Compare register
  1186. n */
  1187. } NRF_TIMER_Type; /*!< Size = 1368 (0x558) */
  1188. /* =========================================================================================================================== */
  1189. /* ================ RTC0 ================ */
  1190. /* =========================================================================================================================== */
  1191. /**
  1192. * @brief Real time counter 0 (RTC0)
  1193. */
  1194. typedef struct { /*!< (@ 0x4000B000) RTC0 Structure */
  1195. __OM uint32_t TASKS_START; /*!< (@ 0x00000000) Start RTC COUNTER */
  1196. __OM uint32_t TASKS_STOP; /*!< (@ 0x00000004) Stop RTC COUNTER */
  1197. __OM uint32_t TASKS_CLEAR; /*!< (@ 0x00000008) Clear RTC COUNTER */
  1198. __OM uint32_t TASKS_TRIGOVRFLW; /*!< (@ 0x0000000C) Set COUNTER to 0xFFFFF0 */
  1199. __IM uint32_t RESERVED[60];
  1200. __IOM uint32_t EVENTS_TICK; /*!< (@ 0x00000100) Event on COUNTER increment */
  1201. __IOM uint32_t EVENTS_OVRFLW; /*!< (@ 0x00000104) Event on COUNTER overflow */
  1202. __IM uint32_t RESERVED1[14];
  1203. __IOM uint32_t EVENTS_COMPARE[4]; /*!< (@ 0x00000140) Description collection: Compare event on CC[n]
  1204. match */
  1205. __IM uint32_t RESERVED2[109];
  1206. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  1207. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  1208. __IM uint32_t RESERVED3[13];
  1209. __IOM uint32_t EVTEN; /*!< (@ 0x00000340) Enable or disable event routing */
  1210. __IOM uint32_t EVTENSET; /*!< (@ 0x00000344) Enable event routing */
  1211. __IOM uint32_t EVTENCLR; /*!< (@ 0x00000348) Disable event routing */
  1212. __IM uint32_t RESERVED4[110];
  1213. __IM uint32_t COUNTER; /*!< (@ 0x00000504) Current COUNTER value */
  1214. __IOM uint32_t PRESCALER; /*!< (@ 0x00000508) 12 bit prescaler for COUNTER frequency (32768/(PRESCALER+1)).Mu
  1215. t be written when RTC is stopped */
  1216. __IM uint32_t RESERVED5[13];
  1217. __IOM uint32_t CC[4]; /*!< (@ 0x00000540) Description collection: Compare register n */
  1218. } NRF_RTC_Type; /*!< Size = 1360 (0x550) */
  1219. /* =========================================================================================================================== */
  1220. /* ================ TEMP ================ */
  1221. /* =========================================================================================================================== */
  1222. /**
  1223. * @brief Temperature Sensor (TEMP)
  1224. */
  1225. typedef struct { /*!< (@ 0x4000C000) TEMP Structure */
  1226. __OM uint32_t TASKS_START; /*!< (@ 0x00000000) Start temperature measurement */
  1227. __OM uint32_t TASKS_STOP; /*!< (@ 0x00000004) Stop temperature measurement */
  1228. __IM uint32_t RESERVED[62];
  1229. __IOM uint32_t EVENTS_DATARDY; /*!< (@ 0x00000100) Temperature measurement complete, data ready */
  1230. __IM uint32_t RESERVED1[128];
  1231. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  1232. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  1233. __IM uint32_t RESERVED2[127];
  1234. __IM int32_t TEMP; /*!< (@ 0x00000508) Temperature in degC (0.25deg steps) */
  1235. __IM uint32_t RESERVED3[5];
  1236. __IOM uint32_t A0; /*!< (@ 0x00000520) Slope of 1st piece wise linear function */
  1237. __IOM uint32_t A1; /*!< (@ 0x00000524) Slope of 2nd piece wise linear function */
  1238. __IOM uint32_t A2; /*!< (@ 0x00000528) Slope of 3rd piece wise linear function */
  1239. __IOM uint32_t A3; /*!< (@ 0x0000052C) Slope of 4th piece wise linear function */
  1240. __IOM uint32_t A4; /*!< (@ 0x00000530) Slope of 5th piece wise linear function */
  1241. __IOM uint32_t A5; /*!< (@ 0x00000534) Slope of 6th piece wise linear function */
  1242. __IM uint32_t RESERVED4[2];
  1243. __IOM uint32_t B0; /*!< (@ 0x00000540) y-intercept of 1st piece wise linear function */
  1244. __IOM uint32_t B1; /*!< (@ 0x00000544) y-intercept of 2nd piece wise linear function */
  1245. __IOM uint32_t B2; /*!< (@ 0x00000548) y-intercept of 3rd piece wise linear function */
  1246. __IOM uint32_t B3; /*!< (@ 0x0000054C) y-intercept of 4th piece wise linear function */
  1247. __IOM uint32_t B4; /*!< (@ 0x00000550) y-intercept of 5th piece wise linear function */
  1248. __IOM uint32_t B5; /*!< (@ 0x00000554) y-intercept of 6th piece wise linear function */
  1249. __IM uint32_t RESERVED5[2];
  1250. __IOM uint32_t T0; /*!< (@ 0x00000560) End point of 1st piece wise linear function */
  1251. __IOM uint32_t T1; /*!< (@ 0x00000564) End point of 2nd piece wise linear function */
  1252. __IOM uint32_t T2; /*!< (@ 0x00000568) End point of 3rd piece wise linear function */
  1253. __IOM uint32_t T3; /*!< (@ 0x0000056C) End point of 4th piece wise linear function */
  1254. __IOM uint32_t T4; /*!< (@ 0x00000570) End point of 5th piece wise linear function */
  1255. } NRF_TEMP_Type; /*!< Size = 1396 (0x574) */
  1256. /* =========================================================================================================================== */
  1257. /* ================ RNG ================ */
  1258. /* =========================================================================================================================== */
  1259. /**
  1260. * @brief Random Number Generator (RNG)
  1261. */
  1262. typedef struct { /*!< (@ 0x4000D000) RNG Structure */
  1263. __OM uint32_t TASKS_START; /*!< (@ 0x00000000) Task starting the random number generator */
  1264. __OM uint32_t TASKS_STOP; /*!< (@ 0x00000004) Task stopping the random number generator */
  1265. __IM uint32_t RESERVED[62];
  1266. __IOM uint32_t EVENTS_VALRDY; /*!< (@ 0x00000100) Event being generated for every new random number
  1267. written to the VALUE register */
  1268. __IM uint32_t RESERVED1[63];
  1269. __IOM uint32_t SHORTS; /*!< (@ 0x00000200) Shortcuts between local events and tasks */
  1270. __IM uint32_t RESERVED2[64];
  1271. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  1272. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  1273. __IM uint32_t RESERVED3[126];
  1274. __IOM uint32_t CONFIG; /*!< (@ 0x00000504) Configuration register */
  1275. __IM uint32_t VALUE; /*!< (@ 0x00000508) Output random number */
  1276. } NRF_RNG_Type; /*!< Size = 1292 (0x50c) */
  1277. /* =========================================================================================================================== */
  1278. /* ================ ECB ================ */
  1279. /* =========================================================================================================================== */
  1280. /**
  1281. * @brief AES ECB Mode Encryption (ECB)
  1282. */
  1283. typedef struct { /*!< (@ 0x4000E000) ECB Structure */
  1284. __OM uint32_t TASKS_STARTECB; /*!< (@ 0x00000000) Start ECB block encrypt */
  1285. __OM uint32_t TASKS_STOPECB; /*!< (@ 0x00000004) Abort a possible executing ECB operation */
  1286. __IM uint32_t RESERVED[62];
  1287. __IOM uint32_t EVENTS_ENDECB; /*!< (@ 0x00000100) ECB block encrypt complete */
  1288. __IOM uint32_t EVENTS_ERRORECB; /*!< (@ 0x00000104) ECB block encrypt aborted because of a STOPECB
  1289. task or due to an error */
  1290. __IM uint32_t RESERVED1[127];
  1291. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  1292. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  1293. __IM uint32_t RESERVED2[126];
  1294. __IOM uint32_t ECBDATAPTR; /*!< (@ 0x00000504) ECB block encrypt memory pointers */
  1295. } NRF_ECB_Type; /*!< Size = 1288 (0x508) */
  1296. /* =========================================================================================================================== */
  1297. /* ================ AAR ================ */
  1298. /* =========================================================================================================================== */
  1299. /**
  1300. * @brief Accelerated Address Resolver (AAR)
  1301. */
  1302. typedef struct { /*!< (@ 0x4000F000) AAR Structure */
  1303. __OM uint32_t TASKS_START; /*!< (@ 0x00000000) Start resolving addresses based on IRKs specified
  1304. in the IRK data structure */
  1305. __IM uint32_t RESERVED;
  1306. __OM uint32_t TASKS_STOP; /*!< (@ 0x00000008) Stop resolving addresses */
  1307. __IM uint32_t RESERVED1[61];
  1308. __IOM uint32_t EVENTS_END; /*!< (@ 0x00000100) Address resolution procedure complete */
  1309. __IOM uint32_t EVENTS_RESOLVED; /*!< (@ 0x00000104) Address resolved */
  1310. __IOM uint32_t EVENTS_NOTRESOLVED; /*!< (@ 0x00000108) Address not resolved */
  1311. __IM uint32_t RESERVED2[126];
  1312. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  1313. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  1314. __IM uint32_t RESERVED3[61];
  1315. __IM uint32_t STATUS; /*!< (@ 0x00000400) Resolution status */
  1316. __IM uint32_t RESERVED4[63];
  1317. __IOM uint32_t ENABLE; /*!< (@ 0x00000500) Enable AAR */
  1318. __IOM uint32_t NIRK; /*!< (@ 0x00000504) Number of IRKs */
  1319. __IOM uint32_t IRKPTR; /*!< (@ 0x00000508) Pointer to IRK data structure */
  1320. __IM uint32_t RESERVED5;
  1321. __IOM uint32_t ADDRPTR; /*!< (@ 0x00000510) Pointer to the resolvable address */
  1322. __IOM uint32_t SCRATCHPTR; /*!< (@ 0x00000514) Pointer to data area used for temporary storage */
  1323. } NRF_AAR_Type; /*!< Size = 1304 (0x518) */
  1324. /* =========================================================================================================================== */
  1325. /* ================ CCM ================ */
  1326. /* =========================================================================================================================== */
  1327. /**
  1328. * @brief AES CCM Mode Encryption (CCM)
  1329. */
  1330. typedef struct { /*!< (@ 0x4000F000) CCM Structure */
  1331. __OM uint32_t TASKS_KSGEN; /*!< (@ 0x00000000) Start generation of key-stream. This operation
  1332. will stop by itself when completed. */
  1333. __OM uint32_t TASKS_CRYPT; /*!< (@ 0x00000004) Start encryption/decryption. This operation will
  1334. stop by itself when completed. */
  1335. __OM uint32_t TASKS_STOP; /*!< (@ 0x00000008) Stop encryption/decryption */
  1336. __OM uint32_t TASKS_RATEOVERRIDE; /*!< (@ 0x0000000C) Override DATARATE setting in MODE register with
  1337. the contents of the RATEOVERRIDE register
  1338. for any ongoing encryption/decryption */
  1339. __IM uint32_t RESERVED[60];
  1340. __IOM uint32_t EVENTS_ENDKSGEN; /*!< (@ 0x00000100) Key-stream generation complete */
  1341. __IOM uint32_t EVENTS_ENDCRYPT; /*!< (@ 0x00000104) Encrypt/decrypt complete */
  1342. __IOM uint32_t EVENTS_ERROR; /*!< (@ 0x00000108) Deprecated register - CCM error event */
  1343. __IM uint32_t RESERVED1[61];
  1344. __IOM uint32_t SHORTS; /*!< (@ 0x00000200) Shortcuts between local events and tasks */
  1345. __IM uint32_t RESERVED2[64];
  1346. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  1347. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  1348. __IM uint32_t RESERVED3[61];
  1349. __IM uint32_t MICSTATUS; /*!< (@ 0x00000400) MIC check result */
  1350. __IM uint32_t RESERVED4[63];
  1351. __IOM uint32_t ENABLE; /*!< (@ 0x00000500) Enable */
  1352. __IOM uint32_t MODE; /*!< (@ 0x00000504) Operation mode */
  1353. __IOM uint32_t CNFPTR; /*!< (@ 0x00000508) Pointer to data structure holding AES key and
  1354. NONCE vector */
  1355. __IOM uint32_t INPTR; /*!< (@ 0x0000050C) Input pointer */
  1356. __IOM uint32_t OUTPTR; /*!< (@ 0x00000510) Output pointer */
  1357. __IOM uint32_t SCRATCHPTR; /*!< (@ 0x00000514) Pointer to data area used for temporary storage */
  1358. __IOM uint32_t MAXPACKETSIZE; /*!< (@ 0x00000518) Length of key-stream generated when MODE.LENGTH
  1359. = Extended. */
  1360. __IOM uint32_t RATEOVERRIDE; /*!< (@ 0x0000051C) Data rate override setting. */
  1361. } NRF_CCM_Type; /*!< Size = 1312 (0x520) */
  1362. /* =========================================================================================================================== */
  1363. /* ================ WDT ================ */
  1364. /* =========================================================================================================================== */
  1365. /**
  1366. * @brief Watchdog Timer (WDT)
  1367. */
  1368. typedef struct { /*!< (@ 0x40010000) WDT Structure */
  1369. __OM uint32_t TASKS_START; /*!< (@ 0x00000000) Start the watchdog */
  1370. __IM uint32_t RESERVED[63];
  1371. __IOM uint32_t EVENTS_TIMEOUT; /*!< (@ 0x00000100) Watchdog timeout */
  1372. __IM uint32_t RESERVED1[128];
  1373. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  1374. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  1375. __IM uint32_t RESERVED2[61];
  1376. __IM uint32_t RUNSTATUS; /*!< (@ 0x00000400) Run status */
  1377. __IM uint32_t REQSTATUS; /*!< (@ 0x00000404) Request status */
  1378. __IM uint32_t RESERVED3[63];
  1379. __IOM uint32_t CRV; /*!< (@ 0x00000504) Counter reload value */
  1380. __IOM uint32_t RREN; /*!< (@ 0x00000508) Enable register for reload request registers */
  1381. __IOM uint32_t CONFIG; /*!< (@ 0x0000050C) Configuration register */
  1382. __IM uint32_t RESERVED4[60];
  1383. __OM uint32_t RR[8]; /*!< (@ 0x00000600) Description collection: Reload request n */
  1384. } NRF_WDT_Type; /*!< Size = 1568 (0x620) */
  1385. /* =========================================================================================================================== */
  1386. /* ================ QDEC ================ */
  1387. /* =========================================================================================================================== */
  1388. /**
  1389. * @brief Quadrature Decoder (QDEC)
  1390. */
  1391. typedef struct { /*!< (@ 0x40012000) QDEC Structure */
  1392. __OM uint32_t TASKS_START; /*!< (@ 0x00000000) Task starting the quadrature decoder */
  1393. __OM uint32_t TASKS_STOP; /*!< (@ 0x00000004) Task stopping the quadrature decoder */
  1394. __OM uint32_t TASKS_READCLRACC; /*!< (@ 0x00000008) Read and clear ACC and ACCDBL */
  1395. __OM uint32_t TASKS_RDCLRACC; /*!< (@ 0x0000000C) Read and clear ACC */
  1396. __OM uint32_t TASKS_RDCLRDBL; /*!< (@ 0x00000010) Read and clear ACCDBL */
  1397. __IM uint32_t RESERVED[59];
  1398. __IOM uint32_t EVENTS_SAMPLERDY; /*!< (@ 0x00000100) Event being generated for every new sample value
  1399. written to the SAMPLE register */
  1400. __IOM uint32_t EVENTS_REPORTRDY; /*!< (@ 0x00000104) Non-null report ready */
  1401. __IOM uint32_t EVENTS_ACCOF; /*!< (@ 0x00000108) ACC or ACCDBL register overflow */
  1402. __IOM uint32_t EVENTS_DBLRDY; /*!< (@ 0x0000010C) Double displacement(s) detected */
  1403. __IOM uint32_t EVENTS_STOPPED; /*!< (@ 0x00000110) QDEC has been stopped */
  1404. __IM uint32_t RESERVED1[59];
  1405. __IOM uint32_t SHORTS; /*!< (@ 0x00000200) Shortcuts between local events and tasks */
  1406. __IM uint32_t RESERVED2[64];
  1407. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  1408. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  1409. __IM uint32_t RESERVED3[125];
  1410. __IOM uint32_t ENABLE; /*!< (@ 0x00000500) Enable the quadrature decoder */
  1411. __IOM uint32_t LEDPOL; /*!< (@ 0x00000504) LED output pin polarity */
  1412. __IOM uint32_t SAMPLEPER; /*!< (@ 0x00000508) Sample period */
  1413. __IM int32_t SAMPLE; /*!< (@ 0x0000050C) Motion sample value */
  1414. __IOM uint32_t REPORTPER; /*!< (@ 0x00000510) Number of samples to be taken before REPORTRDY
  1415. and DBLRDY events can be generated */
  1416. __IM int32_t ACC; /*!< (@ 0x00000514) Register accumulating the valid transitions */
  1417. __IM int32_t ACCREAD; /*!< (@ 0x00000518) Snapshot of the ACC register, updated by the
  1418. READCLRACC or RDCLRACC task */
  1419. __IOM QDEC_PSEL_Type PSEL; /*!< (@ 0x0000051C) Unspecified */
  1420. __IOM uint32_t DBFEN; /*!< (@ 0x00000528) Enable input debounce filters */
  1421. __IM uint32_t RESERVED4[5];
  1422. __IOM uint32_t LEDPRE; /*!< (@ 0x00000540) Time period the LED is switched ON prior to sampling */
  1423. __IM uint32_t ACCDBL; /*!< (@ 0x00000544) Register accumulating the number of detected
  1424. double transitions */
  1425. __IM uint32_t ACCDBLREAD; /*!< (@ 0x00000548) Snapshot of the ACCDBL, updated by the READCLRACC
  1426. or RDCLRDBL task */
  1427. } NRF_QDEC_Type; /*!< Size = 1356 (0x54c) */
  1428. /* =========================================================================================================================== */
  1429. /* ================ COMP ================ */
  1430. /* =========================================================================================================================== */
  1431. /**
  1432. * @brief Comparator (COMP)
  1433. */
  1434. typedef struct { /*!< (@ 0x40013000) COMP Structure */
  1435. __OM uint32_t TASKS_START; /*!< (@ 0x00000000) Start comparator */
  1436. __OM uint32_t TASKS_STOP; /*!< (@ 0x00000004) Stop comparator */
  1437. __OM uint32_t TASKS_SAMPLE; /*!< (@ 0x00000008) Sample comparator value */
  1438. __IM uint32_t RESERVED[61];
  1439. __IOM uint32_t EVENTS_READY; /*!< (@ 0x00000100) COMP is ready and output is valid */
  1440. __IOM uint32_t EVENTS_DOWN; /*!< (@ 0x00000104) Downward crossing */
  1441. __IOM uint32_t EVENTS_UP; /*!< (@ 0x00000108) Upward crossing */
  1442. __IOM uint32_t EVENTS_CROSS; /*!< (@ 0x0000010C) Downward or upward crossing */
  1443. __IM uint32_t RESERVED1[60];
  1444. __IOM uint32_t SHORTS; /*!< (@ 0x00000200) Shortcuts between local events and tasks */
  1445. __IM uint32_t RESERVED2[63];
  1446. __IOM uint32_t INTEN; /*!< (@ 0x00000300) Enable or disable interrupt */
  1447. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  1448. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  1449. __IM uint32_t RESERVED3[61];
  1450. __IM uint32_t RESULT; /*!< (@ 0x00000400) Compare result */
  1451. __IM uint32_t RESERVED4[63];
  1452. __IOM uint32_t ENABLE; /*!< (@ 0x00000500) COMP enable */
  1453. __IOM uint32_t PSEL; /*!< (@ 0x00000504) Pin select */
  1454. __IOM uint32_t REFSEL; /*!< (@ 0x00000508) Reference source select for single-ended mode */
  1455. __IOM uint32_t EXTREFSEL; /*!< (@ 0x0000050C) External reference select */
  1456. __IM uint32_t RESERVED5[8];
  1457. __IOM uint32_t TH; /*!< (@ 0x00000530) Threshold configuration for hysteresis unit */
  1458. __IOM uint32_t MODE; /*!< (@ 0x00000534) Mode configuration */
  1459. __IOM uint32_t HYST; /*!< (@ 0x00000538) Comparator hysteresis enable */
  1460. } NRF_COMP_Type; /*!< Size = 1340 (0x53c) */
  1461. /* =========================================================================================================================== */
  1462. /* ================ EGU0 ================ */
  1463. /* =========================================================================================================================== */
  1464. /**
  1465. * @brief Event generator unit 0 (EGU0)
  1466. */
  1467. typedef struct { /*!< (@ 0x40014000) EGU0 Structure */
  1468. __OM uint32_t TASKS_TRIGGER[16]; /*!< (@ 0x00000000) Description collection: Trigger n for triggering
  1469. the corresponding TRIGGERED[n] event */
  1470. __IM uint32_t RESERVED[48];
  1471. __IOM uint32_t EVENTS_TRIGGERED[16]; /*!< (@ 0x00000100) Description collection: Event number n generated
  1472. by triggering the corresponding TRIGGER[n]
  1473. task */
  1474. __IM uint32_t RESERVED1[112];
  1475. __IOM uint32_t INTEN; /*!< (@ 0x00000300) Enable or disable interrupt */
  1476. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  1477. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  1478. } NRF_EGU_Type; /*!< Size = 780 (0x30c) */
  1479. /* =========================================================================================================================== */
  1480. /* ================ SWI0 ================ */
  1481. /* =========================================================================================================================== */
  1482. /**
  1483. * @brief Software interrupt 0 (SWI0)
  1484. */
  1485. typedef struct { /*!< (@ 0x40014000) SWI0 Structure */
  1486. __IM uint32_t UNUSED; /*!< (@ 0x00000000) Unused. */
  1487. } NRF_SWI_Type; /*!< Size = 4 (0x4) */
  1488. /* =========================================================================================================================== */
  1489. /* ================ ACL ================ */
  1490. /* =========================================================================================================================== */
  1491. /**
  1492. * @brief Access control lists (ACL)
  1493. */
  1494. typedef struct { /*!< (@ 0x4001E000) ACL Structure */
  1495. __IM uint32_t RESERVED[512];
  1496. __IOM ACL_ACL_Type ACL[8]; /*!< (@ 0x00000800) Unspecified */
  1497. } NRF_ACL_Type; /*!< Size = 2176 (0x880) */
  1498. /* =========================================================================================================================== */
  1499. /* ================ NVMC ================ */
  1500. /* =========================================================================================================================== */
  1501. /**
  1502. * @brief Non Volatile Memory Controller (NVMC)
  1503. */
  1504. typedef struct { /*!< (@ 0x4001E000) NVMC Structure */
  1505. __IM uint32_t RESERVED[256];
  1506. __IM uint32_t READY; /*!< (@ 0x00000400) Ready flag */
  1507. __IM uint32_t RESERVED1;
  1508. __IM uint32_t READYNEXT; /*!< (@ 0x00000408) Ready flag */
  1509. __IM uint32_t RESERVED2[62];
  1510. __IOM uint32_t CONFIG; /*!< (@ 0x00000504) Configuration register */
  1511. union {
  1512. __OM uint32_t ERASEPAGE; /*!< (@ 0x00000508) Register for erasing a page in code area */
  1513. __OM uint32_t ERASEPCR1; /*!< (@ 0x00000508) Deprecated register - Register for erasing a
  1514. page in code area, equivalent to ERASEPAGE */
  1515. };
  1516. __OM uint32_t ERASEALL; /*!< (@ 0x0000050C) Register for erasing all non-volatile user memory */
  1517. __OM uint32_t ERASEPCR0; /*!< (@ 0x00000510) Deprecated register - Register for erasing a
  1518. page in code area, equivalent to ERASEPAGE */
  1519. __OM uint32_t ERASEUICR; /*!< (@ 0x00000514) Register for erasing user information configuration
  1520. registers */
  1521. __OM uint32_t ERASEPAGEPARTIAL; /*!< (@ 0x00000518) Register for partial erase of a page in code
  1522. area */
  1523. __IOM uint32_t ERASEPAGEPARTIALCFG; /*!< (@ 0x0000051C) Register for partial erase configuration */
  1524. } NRF_NVMC_Type; /*!< Size = 1312 (0x520) */
  1525. /* =========================================================================================================================== */
  1526. /* ================ PPI ================ */
  1527. /* =========================================================================================================================== */
  1528. /**
  1529. * @brief Programmable Peripheral Interconnect (PPI)
  1530. */
  1531. typedef struct { /*!< (@ 0x4001F000) PPI Structure */
  1532. __OM PPI_TASKS_CHG_Type TASKS_CHG[6]; /*!< (@ 0x00000000) Channel group tasks */
  1533. __IM uint32_t RESERVED[308];
  1534. __IOM uint32_t CHEN; /*!< (@ 0x00000500) Channel enable register */
  1535. __IOM uint32_t CHENSET; /*!< (@ 0x00000504) Channel enable set register */
  1536. __IOM uint32_t CHENCLR; /*!< (@ 0x00000508) Channel enable clear register */
  1537. __IM uint32_t RESERVED1;
  1538. __IOM PPI_CH_Type CH[20]; /*!< (@ 0x00000510) PPI Channel */
  1539. __IM uint32_t RESERVED2[148];
  1540. __IOM uint32_t CHG[6]; /*!< (@ 0x00000800) Description collection: Channel group n */
  1541. __IM uint32_t RESERVED3[62];
  1542. __IOM PPI_FORK_Type FORK[32]; /*!< (@ 0x00000910) Fork */
  1543. } NRF_PPI_Type; /*!< Size = 2448 (0x990) */
  1544. /* =========================================================================================================================== */
  1545. /* ================ USBD ================ */
  1546. /* =========================================================================================================================== */
  1547. /**
  1548. * @brief Universal serial bus device (USBD)
  1549. */
  1550. typedef struct { /*!< (@ 0x40027000) USBD Structure */
  1551. __IM uint32_t RESERVED;
  1552. __OM uint32_t TASKS_STARTEPIN[8]; /*!< (@ 0x00000004) Description collection: Captures the EPIN[n].PTR
  1553. and EPIN[n].MAXCNT registers values, and
  1554. enables endpoint IN n to respond to traffic
  1555. from host */
  1556. __OM uint32_t TASKS_STARTISOIN; /*!< (@ 0x00000024) Captures the ISOIN.PTR and ISOIN.MAXCNT registers
  1557. values, and enables sending data on ISO
  1558. endpoint */
  1559. __OM uint32_t TASKS_STARTEPOUT[8]; /*!< (@ 0x00000028) Description collection: Captures the EPOUT[n].PTR
  1560. and EPOUT[n].MAXCNT registers values, and
  1561. enables endpoint n to respond to traffic
  1562. from host */
  1563. __OM uint32_t TASKS_STARTISOOUT; /*!< (@ 0x00000048) Captures the ISOOUT.PTR and ISOOUT.MAXCNT registers
  1564. values, and enables receiving of data on
  1565. ISO endpoint */
  1566. __OM uint32_t TASKS_EP0RCVOUT; /*!< (@ 0x0000004C) Allows OUT data stage on control endpoint 0 */
  1567. __OM uint32_t TASKS_EP0STATUS; /*!< (@ 0x00000050) Allows status stage on control endpoint 0 */
  1568. __OM uint32_t TASKS_EP0STALL; /*!< (@ 0x00000054) Stalls data and status stage on control endpoint
  1569. 0 */
  1570. __OM uint32_t TASKS_DPDMDRIVE; /*!< (@ 0x00000058) Forces D+ and D- lines into the state defined
  1571. in the DPDMVALUE register */
  1572. __OM uint32_t TASKS_DPDMNODRIVE; /*!< (@ 0x0000005C) Stops forcing D+ and D- lines into any state
  1573. (USB engine takes control) */
  1574. __IM uint32_t RESERVED1[40];
  1575. __IOM uint32_t EVENTS_USBRESET; /*!< (@ 0x00000100) Signals that a USB reset condition has been detected
  1576. on USB lines */
  1577. __IOM uint32_t EVENTS_STARTED; /*!< (@ 0x00000104) Confirms that the EPIN[n].PTR and EPIN[n].MAXCNT,
  1578. or EPOUT[n].PTR and EPOUT[n].MAXCNT registers
  1579. have been captured on all endpoints reported
  1580. in the EPSTATUS register */
  1581. __IOM uint32_t EVENTS_ENDEPIN[8]; /*!< (@ 0x00000108) Description collection: The whole EPIN[n] buffer
  1582. has been consumed. The buffer can be accessed
  1583. safely by software. */
  1584. __IOM uint32_t EVENTS_EP0DATADONE; /*!< (@ 0x00000128) An acknowledged data transfer has taken place
  1585. on the control endpoint */
  1586. __IOM uint32_t EVENTS_ENDISOIN; /*!< (@ 0x0000012C) The whole ISOIN buffer has been consumed. The
  1587. buffer can be accessed safely by software. */
  1588. __IOM uint32_t EVENTS_ENDEPOUT[8]; /*!< (@ 0x00000130) Description collection: The whole EPOUT[n] buffer
  1589. has been consumed. The buffer can be accessed
  1590. safely by software. */
  1591. __IOM uint32_t EVENTS_ENDISOOUT; /*!< (@ 0x00000150) The whole ISOOUT buffer has been consumed. The
  1592. buffer can be accessed safely by software. */
  1593. __IOM uint32_t EVENTS_SOF; /*!< (@ 0x00000154) Signals that a SOF (start of frame) condition
  1594. has been detected on USB lines */
  1595. __IOM uint32_t EVENTS_USBEVENT; /*!< (@ 0x00000158) An event or an error not covered by specific
  1596. events has occurred. Check EVENTCAUSE register
  1597. to find the cause. */
  1598. __IOM uint32_t EVENTS_EP0SETUP; /*!< (@ 0x0000015C) A valid SETUP token has been received (and acknowledged)
  1599. on the control endpoint */
  1600. __IOM uint32_t EVENTS_EPDATA; /*!< (@ 0x00000160) A data transfer has occurred on a data endpoint,
  1601. indicated by the EPDATASTATUS register */
  1602. __IM uint32_t RESERVED2[39];
  1603. __IOM uint32_t SHORTS; /*!< (@ 0x00000200) Shortcuts between local events and tasks */
  1604. __IM uint32_t RESERVED3[63];
  1605. __IOM uint32_t INTEN; /*!< (@ 0x00000300) Enable or disable interrupt */
  1606. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
  1607. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
  1608. __IM uint32_t RESERVED4[61];
  1609. __IOM uint32_t EVENTCAUSE; /*!< (@ 0x00000400) Details on what caused the USBEVENT event */
  1610. __IM uint32_t RESERVED5[7];
  1611. __IOM USBD_HALTED_Type HALTED; /*!< (@ 0x00000420) Unspecified */
  1612. __IM uint32_t RESERVED6;
  1613. __IOM uint32_t EPSTATUS; /*!< (@ 0x00000468) Provides information on which endpoint's EasyDMA
  1614. registers have been captured */
  1615. __IOM uint32_t EPDATASTATUS; /*!< (@ 0x0000046C) Provides information on which endpoint(s) an
  1616. acknowledged data transfer has occurred
  1617. (EPDATA event) */
  1618. __IM uint32_t USBADDR; /*!< (@ 0x00000470) Device USB address */
  1619. __IM uint32_t RESERVED7[3];
  1620. __IM uint32_t BMREQUESTTYPE; /*!< (@ 0x00000480) SETUP data, byte 0, bmRequestType */
  1621. __IM uint32_t BREQUEST; /*!< (@ 0x00000484) SETUP data, byte 1, bRequest */
  1622. __IM uint32_t WVALUEL; /*!< (@ 0x00000488) SETUP data, byte 2, LSB of wValue */
  1623. __IM uint32_t WVALUEH; /*!< (@ 0x0000048C) SETUP data, byte 3, MSB of wValue */
  1624. __IM uint32_t WINDEXL; /*!< (@ 0x00000490) SETUP data, byte 4, LSB of wIndex */
  1625. __IM uint32_t WINDEXH; /*!< (@ 0x00000494) SETUP data, byte 5, MSB of wIndex */
  1626. __IM uint32_t WLENGTHL; /*!< (@ 0x00000498) SETUP data, byte 6, LSB of wLength */
  1627. __IM uint32_t WLENGTHH; /*!< (@ 0x0000049C) SETUP data, byte 7, MSB of wLength */
  1628. __IOM USBD_SIZE_Type SIZE; /*!< (@ 0x000004A0) Unspecified */
  1629. __IM uint32_t RESERVED8[15];
  1630. __IOM uint32_t ENABLE; /*!< (@ 0x00000500) Enable USB */
  1631. __IOM uint32_t USBPULLUP; /*!< (@ 0x00000504) Control of the USB pull-up */
  1632. __IOM uint32_t DPDMVALUE; /*!< (@ 0x00000508) State D+ and D- lines will be forced into by
  1633. the DPDMDRIVE task. The DPDMNODRIVE task
  1634. reverts the control of the lines to MAC
  1635. IP (no forcing). */
  1636. __IOM uint32_t DTOGGLE; /*!< (@ 0x0000050C) Data toggle control and status */
  1637. __IOM uint32_t EPINEN; /*!< (@ 0x00000510) Endpoint IN enable */
  1638. __IOM uint32_t EPOUTEN; /*!< (@ 0x00000514) Endpoint OUT enable */
  1639. __OM uint32_t EPSTALL; /*!< (@ 0x00000518) STALL endpoints */
  1640. __IOM uint32_t ISOSPLIT; /*!< (@ 0x0000051C) Controls the split of ISO buffers */
  1641. __IM uint32_t FRAMECNTR; /*!< (@ 0x00000520) Returns the current value of the start of frame
  1642. counter */
  1643. __IM uint32_t RESERVED9[2];
  1644. __IOM uint32_t LOWPOWER; /*!< (@ 0x0000052C) Controls USBD peripheral low power mode during
  1645. USB suspend */
  1646. __IOM uint32_t ISOINCONFIG; /*!< (@ 0x00000530) Controls the response of the ISO IN endpoint
  1647. to an IN token when no data is ready to
  1648. be sent */
  1649. __IM uint32_t RESERVED10[51];
  1650. __IOM USBD_EPIN_Type EPIN[8]; /*!< (@ 0x00000600) Unspecified */
  1651. __IOM USBD_ISOIN_Type ISOIN; /*!< (@ 0x000006A0) Unspecified */
  1652. __IM uint32_t RESERVED11[21];
  1653. __IOM USBD_EPOUT_Type EPOUT[8]; /*!< (@ 0x00000700) Unspecified */
  1654. __IOM USBD_ISOOUT_Type ISOOUT; /*!< (@ 0x000007A0) Unspecified */
  1655. } NRF_USBD_Type; /*!< Size = 1964 (0x7ac) */
  1656. /** @} */ /* End of group Device_Peripheral_peripherals */
  1657. /* =========================================================================================================================== */
  1658. /* ================ Device Specific Peripheral Address Map ================ */
  1659. /* =========================================================================================================================== */
  1660. /** @addtogroup Device_Peripheral_peripheralAddr
  1661. * @{
  1662. */
  1663. #define NRF_FICR_BASE 0x10000000UL
  1664. #define NRF_UICR_BASE 0x10001000UL
  1665. #define NRF_CLOCK_BASE 0x40000000UL
  1666. #define NRF_POWER_BASE 0x40000000UL
  1667. #define NRF_P0_BASE 0x50000000UL
  1668. #define NRF_RADIO_BASE 0x40001000UL
  1669. #define NRF_UART0_BASE 0x40002000UL
  1670. #define NRF_UARTE0_BASE 0x40002000UL
  1671. #define NRF_SPI0_BASE 0x40003000UL
  1672. #define NRF_SPIM0_BASE 0x40003000UL
  1673. #define NRF_SPIS0_BASE 0x40003000UL
  1674. #define NRF_TWI0_BASE 0x40003000UL
  1675. #define NRF_TWIM0_BASE 0x40003000UL
  1676. #define NRF_TWIS0_BASE 0x40003000UL
  1677. #define NRF_SPI1_BASE 0x40004000UL
  1678. #define NRF_SPIM1_BASE 0x40004000UL
  1679. #define NRF_SPIS1_BASE 0x40004000UL
  1680. #define NRF_TWI1_BASE 0x40004000UL
  1681. #define NRF_TWIM1_BASE 0x40004000UL
  1682. #define NRF_TWIS1_BASE 0x40004000UL
  1683. #define NRF_GPIOTE_BASE 0x40006000UL
  1684. #define NRF_TIMER0_BASE 0x40008000UL
  1685. #define NRF_TIMER1_BASE 0x40009000UL
  1686. #define NRF_TIMER2_BASE 0x4000A000UL
  1687. #define NRF_RTC0_BASE 0x4000B000UL
  1688. #define NRF_TEMP_BASE 0x4000C000UL
  1689. #define NRF_RNG_BASE 0x4000D000UL
  1690. #define NRF_ECB_BASE 0x4000E000UL
  1691. #define NRF_AAR_BASE 0x4000F000UL
  1692. #define NRF_CCM_BASE 0x4000F000UL
  1693. #define NRF_WDT_BASE 0x40010000UL
  1694. #define NRF_RTC1_BASE 0x40011000UL
  1695. #define NRF_QDEC_BASE 0x40012000UL
  1696. #define NRF_COMP_BASE 0x40013000UL
  1697. #define NRF_EGU0_BASE 0x40014000UL
  1698. #define NRF_SWI0_BASE 0x40014000UL
  1699. #define NRF_EGU1_BASE 0x40015000UL
  1700. #define NRF_SWI1_BASE 0x40015000UL
  1701. #define NRF_EGU2_BASE 0x40016000UL
  1702. #define NRF_SWI2_BASE 0x40016000UL
  1703. #define NRF_EGU3_BASE 0x40017000UL
  1704. #define NRF_SWI3_BASE 0x40017000UL
  1705. #define NRF_EGU4_BASE 0x40018000UL
  1706. #define NRF_SWI4_BASE 0x40018000UL
  1707. #define NRF_EGU5_BASE 0x40019000UL
  1708. #define NRF_SWI5_BASE 0x40019000UL
  1709. #define NRF_TIMER3_BASE 0x4001A000UL
  1710. #define NRF_ACL_BASE 0x4001E000UL
  1711. #define NRF_NVMC_BASE 0x4001E000UL
  1712. #define NRF_PPI_BASE 0x4001F000UL
  1713. #define NRF_USBD_BASE 0x40027000UL
  1714. /** @} */ /* End of group Device_Peripheral_peripheralAddr */
  1715. /* =========================================================================================================================== */
  1716. /* ================ Peripheral declaration ================ */
  1717. /* =========================================================================================================================== */
  1718. /** @addtogroup Device_Peripheral_declaration
  1719. * @{
  1720. */
  1721. #define NRF_FICR ((NRF_FICR_Type*) NRF_FICR_BASE)
  1722. #define NRF_UICR ((NRF_UICR_Type*) NRF_UICR_BASE)
  1723. #define NRF_CLOCK ((NRF_CLOCK_Type*) NRF_CLOCK_BASE)
  1724. #define NRF_POWER ((NRF_POWER_Type*) NRF_POWER_BASE)
  1725. #define NRF_P0 ((NRF_GPIO_Type*) NRF_P0_BASE)
  1726. #define NRF_RADIO ((NRF_RADIO_Type*) NRF_RADIO_BASE)
  1727. #define NRF_UART0 ((NRF_UART_Type*) NRF_UART0_BASE)
  1728. #define NRF_UARTE0 ((NRF_UARTE_Type*) NRF_UARTE0_BASE)
  1729. #define NRF_SPI0 ((NRF_SPI_Type*) NRF_SPI0_BASE)
  1730. #define NRF_SPIM0 ((NRF_SPIM_Type*) NRF_SPIM0_BASE)
  1731. #define NRF_SPIS0 ((NRF_SPIS_Type*) NRF_SPIS0_BASE)
  1732. #define NRF_TWI0 ((NRF_TWI_Type*) NRF_TWI0_BASE)
  1733. #define NRF_TWIM0 ((NRF_TWIM_Type*) NRF_TWIM0_BASE)
  1734. #define NRF_TWIS0 ((NRF_TWIS_Type*) NRF_TWIS0_BASE)
  1735. #define NRF_SPI1 ((NRF_SPI_Type*) NRF_SPI1_BASE)
  1736. #define NRF_SPIM1 ((NRF_SPIM_Type*) NRF_SPIM1_BASE)
  1737. #define NRF_SPIS1 ((NRF_SPIS_Type*) NRF_SPIS1_BASE)
  1738. #define NRF_TWI1 ((NRF_TWI_Type*) NRF_TWI1_BASE)
  1739. #define NRF_TWIM1 ((NRF_TWIM_Type*) NRF_TWIM1_BASE)
  1740. #define NRF_TWIS1 ((NRF_TWIS_Type*) NRF_TWIS1_BASE)
  1741. #define NRF_GPIOTE ((NRF_GPIOTE_Type*) NRF_GPIOTE_BASE)
  1742. #define NRF_TIMER0 ((NRF_TIMER_Type*) NRF_TIMER0_BASE)
  1743. #define NRF_TIMER1 ((NRF_TIMER_Type*) NRF_TIMER1_BASE)
  1744. #define NRF_TIMER2 ((NRF_TIMER_Type*) NRF_TIMER2_BASE)
  1745. #define NRF_RTC0 ((NRF_RTC_Type*) NRF_RTC0_BASE)
  1746. #define NRF_TEMP ((NRF_TEMP_Type*) NRF_TEMP_BASE)
  1747. #define NRF_RNG ((NRF_RNG_Type*) NRF_RNG_BASE)
  1748. #define NRF_ECB ((NRF_ECB_Type*) NRF_ECB_BASE)
  1749. #define NRF_AAR ((NRF_AAR_Type*) NRF_AAR_BASE)
  1750. #define NRF_CCM ((NRF_CCM_Type*) NRF_CCM_BASE)
  1751. #define NRF_WDT ((NRF_WDT_Type*) NRF_WDT_BASE)
  1752. #define NRF_RTC1 ((NRF_RTC_Type*) NRF_RTC1_BASE)
  1753. #define NRF_QDEC ((NRF_QDEC_Type*) NRF_QDEC_BASE)
  1754. #define NRF_COMP ((NRF_COMP_Type*) NRF_COMP_BASE)
  1755. #define NRF_EGU0 ((NRF_EGU_Type*) NRF_EGU0_BASE)
  1756. #define NRF_SWI0 ((NRF_SWI_Type*) NRF_SWI0_BASE)
  1757. #define NRF_EGU1 ((NRF_EGU_Type*) NRF_EGU1_BASE)
  1758. #define NRF_SWI1 ((NRF_SWI_Type*) NRF_SWI1_BASE)
  1759. #define NRF_EGU2 ((NRF_EGU_Type*) NRF_EGU2_BASE)
  1760. #define NRF_SWI2 ((NRF_SWI_Type*) NRF_SWI2_BASE)
  1761. #define NRF_EGU3 ((NRF_EGU_Type*) NRF_EGU3_BASE)
  1762. #define NRF_SWI3 ((NRF_SWI_Type*) NRF_SWI3_BASE)
  1763. #define NRF_EGU4 ((NRF_EGU_Type*) NRF_EGU4_BASE)
  1764. #define NRF_SWI4 ((NRF_SWI_Type*) NRF_SWI4_BASE)
  1765. #define NRF_EGU5 ((NRF_EGU_Type*) NRF_EGU5_BASE)
  1766. #define NRF_SWI5 ((NRF_SWI_Type*) NRF_SWI5_BASE)
  1767. #define NRF_TIMER3 ((NRF_TIMER_Type*) NRF_TIMER3_BASE)
  1768. #define NRF_ACL ((NRF_ACL_Type*) NRF_ACL_BASE)
  1769. #define NRF_NVMC ((NRF_NVMC_Type*) NRF_NVMC_BASE)
  1770. #define NRF_PPI ((NRF_PPI_Type*) NRF_PPI_BASE)
  1771. #define NRF_USBD ((NRF_USBD_Type*) NRF_USBD_BASE)
  1772. /** @} */ /* End of group Device_Peripheral_declaration */
  1773. /* ========================================= End of section using anonymous unions ========================================= */
  1774. #if defined (__CC_ARM)
  1775. #pragma pop
  1776. #elif defined (__ICCARM__)
  1777. /* leave anonymous unions enabled */
  1778. #elif defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
  1779. #pragma clang diagnostic pop
  1780. #elif defined (__GNUC__)
  1781. /* anonymous unions are enabled by default */
  1782. #elif defined (__TMS470__)
  1783. /* anonymous unions are enabled by default */
  1784. #elif defined (__TASKING__)
  1785. #pragma warning restore
  1786. #elif defined (__CSMC__)
  1787. /* anonymous unions are enabled by default */
  1788. #endif
  1789. #ifdef __cplusplus
  1790. }
  1791. #endif
  1792. #endif /* NRF52820_H */
  1793. /** @} */ /* End of group nrf52820 */
  1794. /** @} */ /* End of group Nordic Semiconductor */