nrf52805.h 129 KB

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