nrf51.h 95 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310
  1. /*
  2. * Copyright (c) 2010 - 2018, Nordic Semiconductor ASA
  3. *
  4. * All rights reserved.
  5. *
  6. * Redistribution and use in source and binary forms, with or without modification,
  7. * are permitted provided that the following conditions are met:
  8. *
  9. * 1. Redistributions of source code must retain the above copyright notice, this
  10. * list of conditions and the following disclaimer.
  11. *
  12. * 2. Redistributions in binary form, except as embedded into a Nordic
  13. * Semiconductor ASA integrated circuit in a product or a software update for
  14. * such product, must reproduce the above copyright notice, this list of
  15. * conditions and the following disclaimer in the documentation and/or other
  16. * materials provided with the distribution.
  17. *
  18. * 3. Neither the name of Nordic Semiconductor ASA nor the names of its
  19. * contributors may be used to endorse or promote products derived from this
  20. * software without specific prior written permission.
  21. *
  22. * 4. This software, with or without modification, must only be used with a
  23. * Nordic Semiconductor ASA integrated circuit.
  24. *
  25. * 5. Any software provided in binary form under this license must not be reverse
  26. * engineered, decompiled, modified and/or disassembled.
  27. *
  28. * THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS
  29. * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  30. * OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE
  31. * DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE
  32. * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  33. * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
  34. * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  35. * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  36. * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  37. * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  38. *
  39. * @file nrf51.h
  40. * @brief CMSIS HeaderFile
  41. * @version 522
  42. * @date 06. June 2018
  43. * @note Generated by SVDConv V3.3.18 on Wednesday, 06.06.2018 15:20:48
  44. * from File 'nrf51.svd',
  45. * last modified on Wednesday, 06.06.2018 13:20:43
  46. */
  47. /** @addtogroup Nordic Semiconductor
  48. * @{
  49. */
  50. /** @addtogroup nrf51
  51. * @{
  52. */
  53. #ifndef NRF51_H
  54. #define NRF51_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-M0 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. SVCall_IRQn = -5, /*!< -5 System Service Call via SVC instruction */
  70. PendSV_IRQn = -2, /*!< -2 Pendable request for system service */
  71. SysTick_IRQn = -1, /*!< -1 System Tick Timer */
  72. /* =========================================== nrf51 Specific Interrupt Numbers ============================================ */
  73. POWER_CLOCK_IRQn = 0, /*!< 0 POWER_CLOCK */
  74. RADIO_IRQn = 1, /*!< 1 RADIO */
  75. UART0_IRQn = 2, /*!< 2 UART0 */
  76. SPI0_TWI0_IRQn = 3, /*!< 3 SPI0_TWI0 */
  77. SPI1_TWI1_IRQn = 4, /*!< 4 SPI1_TWI1 */
  78. GPIOTE_IRQn = 6, /*!< 6 GPIOTE */
  79. ADC_IRQn = 7, /*!< 7 ADC */
  80. TIMER0_IRQn = 8, /*!< 8 TIMER0 */
  81. TIMER1_IRQn = 9, /*!< 9 TIMER1 */
  82. TIMER2_IRQn = 10, /*!< 10 TIMER2 */
  83. RTC0_IRQn = 11, /*!< 11 RTC0 */
  84. TEMP_IRQn = 12, /*!< 12 TEMP */
  85. RNG_IRQn = 13, /*!< 13 RNG */
  86. ECB_IRQn = 14, /*!< 14 ECB */
  87. CCM_AAR_IRQn = 15, /*!< 15 CCM_AAR */
  88. WDT_IRQn = 16, /*!< 16 WDT */
  89. RTC1_IRQn = 17, /*!< 17 RTC1 */
  90. QDEC_IRQn = 18, /*!< 18 QDEC */
  91. LPCOMP_IRQn = 19, /*!< 19 LPCOMP */
  92. SWI0_IRQn = 20, /*!< 20 SWI0 */
  93. SWI1_IRQn = 21, /*!< 21 SWI1 */
  94. SWI2_IRQn = 22, /*!< 22 SWI2 */
  95. SWI3_IRQn = 23, /*!< 23 SWI3 */
  96. SWI4_IRQn = 24, /*!< 24 SWI4 */
  97. SWI5_IRQn = 25 /*!< 25 SWI5 */
  98. } IRQn_Type;
  99. /* =========================================================================================================================== */
  100. /* ================ Processor and Core Peripheral Section ================ */
  101. /* =========================================================================================================================== */
  102. /* =========================== Configuration of the ARM Cortex-M0 Processor and Core Peripherals =========================== */
  103. #define __CM0_REV 0x0301U /*!< CM0 Core Revision */
  104. #define __MPU_PRESENT 0 /*!< MPU present or not */
  105. #define __NVIC_PRIO_BITS 2 /*!< Number of Bits used for Priority Levels */
  106. #define __Vendor_SysTickConfig 0 /*!< Set to 1 if different SysTick Config is used */
  107. /** @} */ /* End of group Configuration_of_CMSIS */
  108. #include "core_cm0.h" /*!< ARM Cortex-M0 processor and core peripherals */
  109. #include "system_nrf51.h" /*!< nrf51 System */
  110. #ifndef __IM /*!< Fallback for older CMSIS versions */
  111. #define __IM __I
  112. #endif
  113. #ifndef __OM /*!< Fallback for older CMSIS versions */
  114. #define __OM __O
  115. #endif
  116. #ifndef __IOM /*!< Fallback for older CMSIS versions */
  117. #define __IOM __IO
  118. #endif
  119. /* ======================================== Start of section using anonymous unions ======================================== */
  120. #if defined (__CC_ARM)
  121. #pragma push
  122. #pragma anon_unions
  123. #elif defined (__ICCARM__)
  124. #pragma language=extended
  125. #elif defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
  126. #pragma clang diagnostic push
  127. #pragma clang diagnostic ignored "-Wc11-extensions"
  128. #pragma clang diagnostic ignored "-Wreserved-id-macro"
  129. #pragma clang diagnostic ignored "-Wgnu-anonymous-struct"
  130. #pragma clang diagnostic ignored "-Wnested-anon-types"
  131. #elif defined (__GNUC__)
  132. /* anonymous unions are enabled by default */
  133. #elif defined (__TMS470__)
  134. /* anonymous unions are enabled by default */
  135. #elif defined (__TASKING__)
  136. #pragma warning 586
  137. #elif defined (__CSMC__)
  138. /* anonymous unions are enabled by default */
  139. #else
  140. #warning Not supported compiler type
  141. #endif
  142. /* =========================================================================================================================== */
  143. /* ================ Device Specific Cluster Section ================ */
  144. /* =========================================================================================================================== */
  145. /** @addtogroup Device_Peripheral_clusters
  146. * @{
  147. */
  148. /**
  149. * @brief PPI_TASKS_CHG [TASKS_CHG] (Channel group tasks.)
  150. */
  151. typedef struct {
  152. __OM uint32_t EN; /*!< (@ 0x00000000) Enable channel group. */
  153. __OM uint32_t DIS; /*!< (@ 0x00000004) Disable channel group. */
  154. } PPI_TASKS_CHG_Type; /*!< Size = 8 (0x8) */
  155. /**
  156. * @brief PPI_CH [CH] (PPI Channel.)
  157. */
  158. typedef struct {
  159. __IOM uint32_t EEP; /*!< (@ 0x00000000) Channel event end-point. */
  160. __IOM uint32_t TEP; /*!< (@ 0x00000004) Channel task end-point. */
  161. } PPI_CH_Type; /*!< Size = 8 (0x8) */
  162. /** @} */ /* End of group Device_Peripheral_clusters */
  163. /* =========================================================================================================================== */
  164. /* ================ Device Specific Peripheral Section ================ */
  165. /* =========================================================================================================================== */
  166. /** @addtogroup Device_Peripheral_peripherals
  167. * @{
  168. */
  169. /* =========================================================================================================================== */
  170. /* ================ POWER ================ */
  171. /* =========================================================================================================================== */
  172. /**
  173. * @brief Power Control. (POWER)
  174. */
  175. typedef struct { /*!< (@ 0x40000000) POWER Structure */
  176. __IM uint32_t RESERVED[30];
  177. __OM uint32_t TASKS_CONSTLAT; /*!< (@ 0x00000078) Enable constant latency mode. */
  178. __OM uint32_t TASKS_LOWPWR; /*!< (@ 0x0000007C) Enable low power mode (variable latency). */
  179. __IM uint32_t RESERVED1[34];
  180. __IOM uint32_t EVENTS_POFWARN; /*!< (@ 0x00000108) Power failure warning. */
  181. __IM uint32_t RESERVED2[126];
  182. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Interrupt enable set register. */
  183. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Interrupt enable clear register. */
  184. __IM uint32_t RESERVED3[61];
  185. __IOM uint32_t RESETREAS; /*!< (@ 0x00000400) Reset reason. */
  186. __IM uint32_t RESERVED4[9];
  187. __IM uint32_t RAMSTATUS; /*!< (@ 0x00000428) Ram status register. */
  188. __IM uint32_t RESERVED5[53];
  189. __OM uint32_t SYSTEMOFF; /*!< (@ 0x00000500) System off register. */
  190. __IM uint32_t RESERVED6[3];
  191. __IOM uint32_t POFCON; /*!< (@ 0x00000510) Power failure configuration. */
  192. __IM uint32_t RESERVED7[2];
  193. __IOM uint32_t GPREGRET; /*!< (@ 0x0000051C) General purpose retention register. This register
  194. is a retained register. */
  195. __IM uint32_t RESERVED8;
  196. __IOM uint32_t RAMON; /*!< (@ 0x00000524) Ram on/off. */
  197. __IM uint32_t RESERVED9[7];
  198. __IOM uint32_t RESET; /*!< (@ 0x00000544) Pin reset functionality configuration register.
  199. This register is a retained register. */
  200. __IM uint32_t RESERVED10[3];
  201. __IOM uint32_t RAMONB; /*!< (@ 0x00000554) Ram on/off. */
  202. __IM uint32_t RESERVED11[8];
  203. __IOM uint32_t DCDCEN; /*!< (@ 0x00000578) DCDC converter enable configuration register. */
  204. __IM uint32_t RESERVED12[291];
  205. __IOM uint32_t DCDCFORCE; /*!< (@ 0x00000A08) DCDC power-up force register. */
  206. } NRF_POWER_Type; /*!< Size = 2572 (0xa0c) */
  207. /* =========================================================================================================================== */
  208. /* ================ CLOCK ================ */
  209. /* =========================================================================================================================== */
  210. /**
  211. * @brief Clock control. (CLOCK)
  212. */
  213. typedef struct { /*!< (@ 0x40000000) CLOCK Structure */
  214. __OM uint32_t TASKS_HFCLKSTART; /*!< (@ 0x00000000) Start HFCLK clock source. */
  215. __OM uint32_t TASKS_HFCLKSTOP; /*!< (@ 0x00000004) Stop HFCLK clock source. */
  216. __OM uint32_t TASKS_LFCLKSTART; /*!< (@ 0x00000008) Start LFCLK clock source. */
  217. __OM uint32_t TASKS_LFCLKSTOP; /*!< (@ 0x0000000C) Stop LFCLK clock source. */
  218. __OM uint32_t TASKS_CAL; /*!< (@ 0x00000010) Start calibration of LFCLK RC oscillator. */
  219. __OM uint32_t TASKS_CTSTART; /*!< (@ 0x00000014) Start calibration timer. */
  220. __OM uint32_t TASKS_CTSTOP; /*!< (@ 0x00000018) Stop calibration timer. */
  221. __IM uint32_t RESERVED[57];
  222. __IOM uint32_t EVENTS_HFCLKSTARTED; /*!< (@ 0x00000100) HFCLK oscillator started. */
  223. __IOM uint32_t EVENTS_LFCLKSTARTED; /*!< (@ 0x00000104) LFCLK oscillator started. */
  224. __IM uint32_t RESERVED1;
  225. __IOM uint32_t EVENTS_DONE; /*!< (@ 0x0000010C) Calibration of LFCLK RC oscillator completed. */
  226. __IOM uint32_t EVENTS_CTTO; /*!< (@ 0x00000110) Calibration timer timeout. */
  227. __IM uint32_t RESERVED2[124];
  228. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Interrupt enable set register. */
  229. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Interrupt enable clear register. */
  230. __IM uint32_t RESERVED3[63];
  231. __IM uint32_t HFCLKRUN; /*!< (@ 0x00000408) Task HFCLKSTART trigger status. */
  232. __IM uint32_t HFCLKSTAT; /*!< (@ 0x0000040C) High frequency clock status. */
  233. __IM uint32_t RESERVED4;
  234. __IM uint32_t LFCLKRUN; /*!< (@ 0x00000414) Task LFCLKSTART triggered status. */
  235. __IM uint32_t LFCLKSTAT; /*!< (@ 0x00000418) Low frequency clock status. */
  236. __IM uint32_t LFCLKSRCCOPY; /*!< (@ 0x0000041C) Clock source for the LFCLK clock, set when task
  237. LKCLKSTART is triggered. */
  238. __IM uint32_t RESERVED5[62];
  239. __IOM uint32_t LFCLKSRC; /*!< (@ 0x00000518) Clock source for the LFCLK clock. */
  240. __IM uint32_t RESERVED6[7];
  241. __IOM uint32_t CTIV; /*!< (@ 0x00000538) Calibration timer interval. */
  242. __IM uint32_t RESERVED7[5];
  243. __IOM uint32_t XTALFREQ; /*!< (@ 0x00000550) Crystal frequency. */
  244. } NRF_CLOCK_Type; /*!< Size = 1364 (0x554) */
  245. /* =========================================================================================================================== */
  246. /* ================ MPU ================ */
  247. /* =========================================================================================================================== */
  248. /**
  249. * @brief Memory Protection Unit. (MPU)
  250. */
  251. typedef struct { /*!< (@ 0x40000000) MPU Structure */
  252. __IM uint32_t RESERVED[330];
  253. __IOM uint32_t PERR0; /*!< (@ 0x00000528) Configuration of peripherals in mpu regions. */
  254. __IOM uint32_t RLENR0; /*!< (@ 0x0000052C) Length of RAM region 0. */
  255. __IM uint32_t RESERVED1[52];
  256. __IOM uint32_t PROTENSET0; /*!< (@ 0x00000600) Erase and write protection bit enable set register. */
  257. __IOM uint32_t PROTENSET1; /*!< (@ 0x00000604) Erase and write protection bit enable set register. */
  258. __IOM uint32_t DISABLEINDEBUG; /*!< (@ 0x00000608) Disable erase and write protection mechanism
  259. in debug mode. */
  260. __IOM uint32_t PROTBLOCKSIZE; /*!< (@ 0x0000060C) Erase and write protection block size. */
  261. } NRF_MPU_Type; /*!< Size = 1552 (0x610) */
  262. /* =========================================================================================================================== */
  263. /* ================ RADIO ================ */
  264. /* =========================================================================================================================== */
  265. /**
  266. * @brief The radio. (RADIO)
  267. */
  268. typedef struct { /*!< (@ 0x40001000) RADIO Structure */
  269. __OM uint32_t TASKS_TXEN; /*!< (@ 0x00000000) Enable radio in TX mode. */
  270. __OM uint32_t TASKS_RXEN; /*!< (@ 0x00000004) Enable radio in RX mode. */
  271. __OM uint32_t TASKS_START; /*!< (@ 0x00000008) Start radio. */
  272. __OM uint32_t TASKS_STOP; /*!< (@ 0x0000000C) Stop radio. */
  273. __OM uint32_t TASKS_DISABLE; /*!< (@ 0x00000010) Disable radio. */
  274. __OM uint32_t TASKS_RSSISTART; /*!< (@ 0x00000014) Start the RSSI and take one sample of the receive
  275. signal strength. */
  276. __OM uint32_t TASKS_RSSISTOP; /*!< (@ 0x00000018) Stop the RSSI measurement. */
  277. __OM uint32_t TASKS_BCSTART; /*!< (@ 0x0000001C) Start the bit counter. */
  278. __OM uint32_t TASKS_BCSTOP; /*!< (@ 0x00000020) Stop the bit counter. */
  279. __IM uint32_t RESERVED[55];
  280. __IOM uint32_t EVENTS_READY; /*!< (@ 0x00000100) Ready event. */
  281. __IOM uint32_t EVENTS_ADDRESS; /*!< (@ 0x00000104) Address event. */
  282. __IOM uint32_t EVENTS_PAYLOAD; /*!< (@ 0x00000108) Payload event. */
  283. __IOM uint32_t EVENTS_END; /*!< (@ 0x0000010C) End event. */
  284. __IOM uint32_t EVENTS_DISABLED; /*!< (@ 0x00000110) Disable event. */
  285. __IOM uint32_t EVENTS_DEVMATCH; /*!< (@ 0x00000114) A device address match occurred on the last received
  286. packet. */
  287. __IOM uint32_t EVENTS_DEVMISS; /*!< (@ 0x00000118) No device address match occurred on the last
  288. received packet. */
  289. __IOM uint32_t EVENTS_RSSIEND; /*!< (@ 0x0000011C) Sampling of the receive signal strength complete.
  290. A new RSSI sample is ready for readout at
  291. the RSSISAMPLE register. */
  292. __IM uint32_t RESERVED1[2];
  293. __IOM uint32_t EVENTS_BCMATCH; /*!< (@ 0x00000128) Bit counter reached bit count value specified
  294. in BCC register. */
  295. __IM uint32_t RESERVED2[53];
  296. __IOM uint32_t SHORTS; /*!< (@ 0x00000200) Shortcuts for the radio. */
  297. __IM uint32_t RESERVED3[64];
  298. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Interrupt enable set register. */
  299. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Interrupt enable clear register. */
  300. __IM uint32_t RESERVED4[61];
  301. __IM uint32_t CRCSTATUS; /*!< (@ 0x00000400) CRC status of received packet. */
  302. __IM uint32_t RESERVED5;
  303. __IM uint32_t RXMATCH; /*!< (@ 0x00000408) Received address. */
  304. __IM uint32_t RXCRC; /*!< (@ 0x0000040C) Received CRC. */
  305. __IM uint32_t DAI; /*!< (@ 0x00000410) Device address match index. */
  306. __IM uint32_t RESERVED6[60];
  307. __IOM uint32_t PACKETPTR; /*!< (@ 0x00000504) Packet pointer. Decision point: START task. */
  308. __IOM uint32_t FREQUENCY; /*!< (@ 0x00000508) Frequency. */
  309. __IOM uint32_t TXPOWER; /*!< (@ 0x0000050C) Output power. */
  310. __IOM uint32_t MODE; /*!< (@ 0x00000510) Data rate and modulation. */
  311. __IOM uint32_t PCNF0; /*!< (@ 0x00000514) Packet configuration 0. */
  312. __IOM uint32_t PCNF1; /*!< (@ 0x00000518) Packet configuration 1. */
  313. __IOM uint32_t BASE0; /*!< (@ 0x0000051C) Radio base address 0. Decision point: START task. */
  314. __IOM uint32_t BASE1; /*!< (@ 0x00000520) Radio base address 1. Decision point: START task. */
  315. __IOM uint32_t PREFIX0; /*!< (@ 0x00000524) Prefixes bytes for logical addresses 0 to 3. */
  316. __IOM uint32_t PREFIX1; /*!< (@ 0x00000528) Prefixes bytes for logical addresses 4 to 7. */
  317. __IOM uint32_t TXADDRESS; /*!< (@ 0x0000052C) Transmit address select. */
  318. __IOM uint32_t RXADDRESSES; /*!< (@ 0x00000530) Receive address select. */
  319. __IOM uint32_t CRCCNF; /*!< (@ 0x00000534) CRC configuration. */
  320. __IOM uint32_t CRCPOLY; /*!< (@ 0x00000538) CRC polynomial. */
  321. __IOM uint32_t CRCINIT; /*!< (@ 0x0000053C) CRC initial value. */
  322. __IOM uint32_t TEST; /*!< (@ 0x00000540) Test features enable register. */
  323. __IOM uint32_t TIFS; /*!< (@ 0x00000544) Inter Frame Spacing in microseconds. */
  324. __IM uint32_t RSSISAMPLE; /*!< (@ 0x00000548) RSSI sample. */
  325. __IM uint32_t RESERVED7;
  326. __IM uint32_t STATE; /*!< (@ 0x00000550) Current radio state. */
  327. __IOM uint32_t DATAWHITEIV; /*!< (@ 0x00000554) Data whitening initial value. */
  328. __IM uint32_t RESERVED8[2];
  329. __IOM uint32_t BCC; /*!< (@ 0x00000560) Bit counter compare. */
  330. __IM uint32_t RESERVED9[39];
  331. __IOM uint32_t DAB[8]; /*!< (@ 0x00000600) Device address base segment. */
  332. __IOM uint32_t DAP[8]; /*!< (@ 0x00000620) Device address prefix. */
  333. __IOM uint32_t DACNF; /*!< (@ 0x00000640) Device address match configuration. */
  334. __IM uint32_t RESERVED10[56];
  335. __IOM uint32_t OVERRIDE0; /*!< (@ 0x00000724) Trim value override register 0. */
  336. __IOM uint32_t OVERRIDE1; /*!< (@ 0x00000728) Trim value override register 1. */
  337. __IOM uint32_t OVERRIDE2; /*!< (@ 0x0000072C) Trim value override register 2. */
  338. __IOM uint32_t OVERRIDE3; /*!< (@ 0x00000730) Trim value override register 3. */
  339. __IOM uint32_t OVERRIDE4; /*!< (@ 0x00000734) Trim value override register 4. */
  340. __IM uint32_t RESERVED11[561];
  341. __IOM uint32_t POWER; /*!< (@ 0x00000FFC) Peripheral power control. */
  342. } NRF_RADIO_Type; /*!< Size = 4096 (0x1000) */
  343. /* =========================================================================================================================== */
  344. /* ================ UART0 ================ */
  345. /* =========================================================================================================================== */
  346. /**
  347. * @brief Universal Asynchronous Receiver/Transmitter. (UART0)
  348. */
  349. typedef struct { /*!< (@ 0x40002000) UART0 Structure */
  350. __OM uint32_t TASKS_STARTRX; /*!< (@ 0x00000000) Start UART receiver. */
  351. __OM uint32_t TASKS_STOPRX; /*!< (@ 0x00000004) Stop UART receiver. */
  352. __OM uint32_t TASKS_STARTTX; /*!< (@ 0x00000008) Start UART transmitter. */
  353. __OM uint32_t TASKS_STOPTX; /*!< (@ 0x0000000C) Stop UART transmitter. */
  354. __IM uint32_t RESERVED[3];
  355. __OM uint32_t TASKS_SUSPEND; /*!< (@ 0x0000001C) Suspend UART. */
  356. __IM uint32_t RESERVED1[56];
  357. __IOM uint32_t EVENTS_CTS; /*!< (@ 0x00000100) CTS activated. */
  358. __IOM uint32_t EVENTS_NCTS; /*!< (@ 0x00000104) CTS deactivated. */
  359. __IOM uint32_t EVENTS_RXDRDY; /*!< (@ 0x00000108) Data received in RXD. */
  360. __IM uint32_t RESERVED2[4];
  361. __IOM uint32_t EVENTS_TXDRDY; /*!< (@ 0x0000011C) Data sent from TXD. */
  362. __IM uint32_t RESERVED3;
  363. __IOM uint32_t EVENTS_ERROR; /*!< (@ 0x00000124) Error detected. */
  364. __IM uint32_t RESERVED4[7];
  365. __IOM uint32_t EVENTS_RXTO; /*!< (@ 0x00000144) Receiver timeout. */
  366. __IM uint32_t RESERVED5[46];
  367. __IOM uint32_t SHORTS; /*!< (@ 0x00000200) Shortcuts for UART. */
  368. __IM uint32_t RESERVED6[64];
  369. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Interrupt enable set register. */
  370. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Interrupt enable clear register. */
  371. __IM uint32_t RESERVED7[93];
  372. __IOM uint32_t ERRORSRC; /*!< (@ 0x00000480) Error source. Write error field to 1 to clear
  373. error. */
  374. __IM uint32_t RESERVED8[31];
  375. __IOM uint32_t ENABLE; /*!< (@ 0x00000500) Enable UART and acquire IOs. */
  376. __IM uint32_t RESERVED9;
  377. __IOM uint32_t PSELRTS; /*!< (@ 0x00000508) Pin select for RTS. */
  378. __IOM uint32_t PSELTXD; /*!< (@ 0x0000050C) Pin select for TXD. */
  379. __IOM uint32_t PSELCTS; /*!< (@ 0x00000510) Pin select for CTS. */
  380. __IOM uint32_t PSELRXD; /*!< (@ 0x00000514) Pin select for RXD. */
  381. __IM uint32_t RXD; /*!< (@ 0x00000518) RXD register. On read action the buffer pointer
  382. is displaced. Once read the character is
  383. consumed. If read when no character available,
  384. the UART will stop working. */
  385. __OM uint32_t TXD; /*!< (@ 0x0000051C) TXD register. */
  386. __IM uint32_t RESERVED10;
  387. __IOM uint32_t BAUDRATE; /*!< (@ 0x00000524) UART Baudrate. */
  388. __IM uint32_t RESERVED11[17];
  389. __IOM uint32_t CONFIG; /*!< (@ 0x0000056C) Configuration of parity and hardware flow control
  390. register. */
  391. __IM uint32_t RESERVED12[675];
  392. __IOM uint32_t POWER; /*!< (@ 0x00000FFC) Peripheral power control. */
  393. } NRF_UART_Type; /*!< Size = 4096 (0x1000) */
  394. /* =========================================================================================================================== */
  395. /* ================ SPI0 ================ */
  396. /* =========================================================================================================================== */
  397. /**
  398. * @brief SPI master 0. (SPI0)
  399. */
  400. typedef struct { /*!< (@ 0x40003000) SPI0 Structure */
  401. __IM uint32_t RESERVED[66];
  402. __IOM uint32_t EVENTS_READY; /*!< (@ 0x00000108) TXD byte sent and RXD byte received. */
  403. __IM uint32_t RESERVED1[126];
  404. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Interrupt enable set register. */
  405. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Interrupt enable clear register. */
  406. __IM uint32_t RESERVED2[125];
  407. __IOM uint32_t ENABLE; /*!< (@ 0x00000500) Enable SPI. */
  408. __IM uint32_t RESERVED3;
  409. __IOM uint32_t PSELSCK; /*!< (@ 0x00000508) Pin select for SCK. */
  410. __IOM uint32_t PSELMOSI; /*!< (@ 0x0000050C) Pin select for MOSI. */
  411. __IOM uint32_t PSELMISO; /*!< (@ 0x00000510) Pin select for MISO. */
  412. __IM uint32_t RESERVED4;
  413. __IM uint32_t RXD; /*!< (@ 0x00000518) RX data. */
  414. __IOM uint32_t TXD; /*!< (@ 0x0000051C) TX data. */
  415. __IM uint32_t RESERVED5;
  416. __IOM uint32_t FREQUENCY; /*!< (@ 0x00000524) SPI frequency */
  417. __IM uint32_t RESERVED6[11];
  418. __IOM uint32_t CONFIG; /*!< (@ 0x00000554) Configuration register. */
  419. __IM uint32_t RESERVED7[681];
  420. __IOM uint32_t POWER; /*!< (@ 0x00000FFC) Peripheral power control. */
  421. } NRF_SPI_Type; /*!< Size = 4096 (0x1000) */
  422. /* =========================================================================================================================== */
  423. /* ================ TWI0 ================ */
  424. /* =========================================================================================================================== */
  425. /**
  426. * @brief Two-wire interface master 0. (TWI0)
  427. */
  428. typedef struct { /*!< (@ 0x40003000) TWI0 Structure */
  429. __OM uint32_t TASKS_STARTRX; /*!< (@ 0x00000000) Start 2-Wire master receive sequence. */
  430. __IM uint32_t RESERVED;
  431. __OM uint32_t TASKS_STARTTX; /*!< (@ 0x00000008) Start 2-Wire master transmit sequence. */
  432. __IM uint32_t RESERVED1[2];
  433. __OM uint32_t TASKS_STOP; /*!< (@ 0x00000014) Stop 2-Wire transaction. */
  434. __IM uint32_t RESERVED2;
  435. __OM uint32_t TASKS_SUSPEND; /*!< (@ 0x0000001C) Suspend 2-Wire transaction. */
  436. __OM uint32_t TASKS_RESUME; /*!< (@ 0x00000020) Resume 2-Wire transaction. */
  437. __IM uint32_t RESERVED3[56];
  438. __IOM uint32_t EVENTS_STOPPED; /*!< (@ 0x00000104) Two-wire stopped. */
  439. __IOM uint32_t EVENTS_RXDREADY; /*!< (@ 0x00000108) Two-wire ready to deliver new RXD byte received. */
  440. __IM uint32_t RESERVED4[4];
  441. __IOM uint32_t EVENTS_TXDSENT; /*!< (@ 0x0000011C) Two-wire finished sending last TXD byte. */
  442. __IM uint32_t RESERVED5;
  443. __IOM uint32_t EVENTS_ERROR; /*!< (@ 0x00000124) Two-wire error detected. */
  444. __IM uint32_t RESERVED6[4];
  445. __IOM uint32_t EVENTS_BB; /*!< (@ 0x00000138) Two-wire byte boundary. */
  446. __IM uint32_t RESERVED7[3];
  447. __IOM uint32_t EVENTS_SUSPENDED; /*!< (@ 0x00000148) Two-wire suspended. */
  448. __IM uint32_t RESERVED8[45];
  449. __IOM uint32_t SHORTS; /*!< (@ 0x00000200) Shortcuts for TWI. */
  450. __IM uint32_t RESERVED9[64];
  451. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Interrupt enable set register. */
  452. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Interrupt enable clear register. */
  453. __IM uint32_t RESERVED10[110];
  454. __IOM uint32_t ERRORSRC; /*!< (@ 0x000004C4) Two-wire error source. Write error field to 1
  455. to clear error. */
  456. __IM uint32_t RESERVED11[14];
  457. __IOM uint32_t ENABLE; /*!< (@ 0x00000500) Enable two-wire master. */
  458. __IM uint32_t RESERVED12;
  459. __IOM uint32_t PSELSCL; /*!< (@ 0x00000508) Pin select for SCL. */
  460. __IOM uint32_t PSELSDA; /*!< (@ 0x0000050C) Pin select for SDA. */
  461. __IM uint32_t RESERVED13[2];
  462. __IM uint32_t RXD; /*!< (@ 0x00000518) RX data register. */
  463. __IOM uint32_t TXD; /*!< (@ 0x0000051C) TX data register. */
  464. __IM uint32_t RESERVED14;
  465. __IOM uint32_t FREQUENCY; /*!< (@ 0x00000524) Two-wire frequency. */
  466. __IM uint32_t RESERVED15[24];
  467. __IOM uint32_t ADDRESS; /*!< (@ 0x00000588) Address used in the two-wire transfer. */
  468. __IM uint32_t RESERVED16[668];
  469. __IOM uint32_t POWER; /*!< (@ 0x00000FFC) Peripheral power control. */
  470. } NRF_TWI_Type; /*!< Size = 4096 (0x1000) */
  471. /* =========================================================================================================================== */
  472. /* ================ SPIS1 ================ */
  473. /* =========================================================================================================================== */
  474. /**
  475. * @brief SPI slave 1. (SPIS1)
  476. */
  477. typedef struct { /*!< (@ 0x40004000) SPIS1 Structure */
  478. __IM uint32_t RESERVED[9];
  479. __OM uint32_t TASKS_ACQUIRE; /*!< (@ 0x00000024) Acquire SPI semaphore. */
  480. __OM uint32_t TASKS_RELEASE; /*!< (@ 0x00000028) Release SPI semaphore. */
  481. __IM uint32_t RESERVED1[54];
  482. __IOM uint32_t EVENTS_END; /*!< (@ 0x00000104) Granted transaction completed. */
  483. __IM uint32_t RESERVED2[2];
  484. __IOM uint32_t EVENTS_ENDRX; /*!< (@ 0x00000110) End of RXD buffer reached */
  485. __IM uint32_t RESERVED3[5];
  486. __IOM uint32_t EVENTS_ACQUIRED; /*!< (@ 0x00000128) Semaphore acquired. */
  487. __IM uint32_t RESERVED4[53];
  488. __IOM uint32_t SHORTS; /*!< (@ 0x00000200) Shortcuts for SPIS. */
  489. __IM uint32_t RESERVED5[64];
  490. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Interrupt enable set register. */
  491. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Interrupt enable clear register. */
  492. __IM uint32_t RESERVED6[61];
  493. __IM uint32_t SEMSTAT; /*!< (@ 0x00000400) Semaphore status. */
  494. __IM uint32_t RESERVED7[15];
  495. __IOM uint32_t STATUS; /*!< (@ 0x00000440) Status from last transaction. */
  496. __IM uint32_t RESERVED8[47];
  497. __IOM uint32_t ENABLE; /*!< (@ 0x00000500) Enable SPIS. */
  498. __IM uint32_t RESERVED9;
  499. __IOM uint32_t PSELSCK; /*!< (@ 0x00000508) Pin select for SCK. */
  500. __IOM uint32_t PSELMISO; /*!< (@ 0x0000050C) Pin select for MISO. */
  501. __IOM uint32_t PSELMOSI; /*!< (@ 0x00000510) Pin select for MOSI. */
  502. __IOM uint32_t PSELCSN; /*!< (@ 0x00000514) Pin select for CSN. */
  503. __IM uint32_t RESERVED10[7];
  504. __IOM uint32_t RXDPTR; /*!< (@ 0x00000534) RX data pointer. */
  505. __IOM uint32_t MAXRX; /*!< (@ 0x00000538) Maximum number of bytes in the receive buffer. */
  506. __IM uint32_t AMOUNTRX; /*!< (@ 0x0000053C) Number of bytes received in last granted transaction. */
  507. __IM uint32_t RESERVED11;
  508. __IOM uint32_t TXDPTR; /*!< (@ 0x00000544) TX data pointer. */
  509. __IOM uint32_t MAXTX; /*!< (@ 0x00000548) Maximum number of bytes in the transmit buffer. */
  510. __IM uint32_t AMOUNTTX; /*!< (@ 0x0000054C) Number of bytes transmitted in last granted transaction. */
  511. __IM uint32_t RESERVED12;
  512. __IOM uint32_t CONFIG; /*!< (@ 0x00000554) Configuration register. */
  513. __IM uint32_t RESERVED13;
  514. __IOM uint32_t DEF; /*!< (@ 0x0000055C) Default character. */
  515. __IM uint32_t RESERVED14[24];
  516. __IOM uint32_t ORC; /*!< (@ 0x000005C0) Over-read character. */
  517. __IM uint32_t RESERVED15[654];
  518. __IOM uint32_t POWER; /*!< (@ 0x00000FFC) Peripheral power control. */
  519. } NRF_SPIS_Type; /*!< Size = 4096 (0x1000) */
  520. /* =========================================================================================================================== */
  521. /* ================ GPIOTE ================ */
  522. /* =========================================================================================================================== */
  523. /**
  524. * @brief GPIO tasks and events. (GPIOTE)
  525. */
  526. typedef struct { /*!< (@ 0x40006000) GPIOTE Structure */
  527. __OM uint32_t TASKS_OUT[4]; /*!< (@ 0x00000000) Tasks asssociated with GPIOTE channels. */
  528. __IM uint32_t RESERVED[60];
  529. __IOM uint32_t EVENTS_IN[4]; /*!< (@ 0x00000100) Tasks asssociated with GPIOTE channels. */
  530. __IM uint32_t RESERVED1[27];
  531. __IOM uint32_t EVENTS_PORT; /*!< (@ 0x0000017C) Event generated from multiple pins. */
  532. __IM uint32_t RESERVED2[97];
  533. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Interrupt enable set register. */
  534. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Interrupt enable clear register. */
  535. __IM uint32_t RESERVED3[129];
  536. __IOM uint32_t CONFIG[4]; /*!< (@ 0x00000510) Channel configuration registers. */
  537. __IM uint32_t RESERVED4[695];
  538. __IOM uint32_t POWER; /*!< (@ 0x00000FFC) Peripheral power control. */
  539. } NRF_GPIOTE_Type; /*!< Size = 4096 (0x1000) */
  540. /* =========================================================================================================================== */
  541. /* ================ ADC ================ */
  542. /* =========================================================================================================================== */
  543. /**
  544. * @brief Analog to digital converter. (ADC)
  545. */
  546. typedef struct { /*!< (@ 0x40007000) ADC Structure */
  547. __OM uint32_t TASKS_START; /*!< (@ 0x00000000) Start an ADC conversion. */
  548. __OM uint32_t TASKS_STOP; /*!< (@ 0x00000004) Stop ADC. */
  549. __IM uint32_t RESERVED[62];
  550. __IOM uint32_t EVENTS_END; /*!< (@ 0x00000100) ADC conversion complete. */
  551. __IM uint32_t RESERVED1[128];
  552. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Interrupt enable set register. */
  553. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Interrupt enable clear register. */
  554. __IM uint32_t RESERVED2[61];
  555. __IM uint32_t BUSY; /*!< (@ 0x00000400) ADC busy register. */
  556. __IM uint32_t RESERVED3[63];
  557. __IOM uint32_t ENABLE; /*!< (@ 0x00000500) ADC enable. */
  558. __IOM uint32_t CONFIG; /*!< (@ 0x00000504) ADC configuration register. */
  559. __IM uint32_t RESULT; /*!< (@ 0x00000508) Result of ADC conversion. */
  560. __IM uint32_t RESERVED4[700];
  561. __IOM uint32_t POWER; /*!< (@ 0x00000FFC) Peripheral power control. */
  562. } NRF_ADC_Type; /*!< Size = 4096 (0x1000) */
  563. /* =========================================================================================================================== */
  564. /* ================ TIMER0 ================ */
  565. /* =========================================================================================================================== */
  566. /**
  567. * @brief Timer 0. (TIMER0)
  568. */
  569. typedef struct { /*!< (@ 0x40008000) TIMER0 Structure */
  570. __OM uint32_t TASKS_START; /*!< (@ 0x00000000) Start Timer. */
  571. __OM uint32_t TASKS_STOP; /*!< (@ 0x00000004) Stop Timer. */
  572. __OM uint32_t TASKS_COUNT; /*!< (@ 0x00000008) Increment Timer (In counter mode). */
  573. __OM uint32_t TASKS_CLEAR; /*!< (@ 0x0000000C) Clear timer. */
  574. __OM uint32_t TASKS_SHUTDOWN; /*!< (@ 0x00000010) Shutdown timer. */
  575. __IM uint32_t RESERVED[11];
  576. __OM uint32_t TASKS_CAPTURE[4]; /*!< (@ 0x00000040) Capture Timer value to CC[n] registers. */
  577. __IM uint32_t RESERVED1[60];
  578. __IOM uint32_t EVENTS_COMPARE[4]; /*!< (@ 0x00000140) Compare event on CC[n] match. */
  579. __IM uint32_t RESERVED2[44];
  580. __IOM uint32_t SHORTS; /*!< (@ 0x00000200) Shortcuts for Timer. */
  581. __IM uint32_t RESERVED3[64];
  582. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Interrupt enable set register. */
  583. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Interrupt enable clear register. */
  584. __IM uint32_t RESERVED4[126];
  585. __IOM uint32_t MODE; /*!< (@ 0x00000504) Timer Mode selection. */
  586. __IOM uint32_t BITMODE; /*!< (@ 0x00000508) Sets timer behaviour. */
  587. __IM uint32_t RESERVED5;
  588. __IOM uint32_t PRESCALER; /*!< (@ 0x00000510) 4-bit prescaler to source clock frequency (max
  589. value 9). Source clock frequency is divided
  590. by 2^SCALE. */
  591. __IM uint32_t RESERVED6[11];
  592. __IOM uint32_t CC[4]; /*!< (@ 0x00000540) Capture/compare registers. */
  593. __IM uint32_t RESERVED7[683];
  594. __IOM uint32_t POWER; /*!< (@ 0x00000FFC) Peripheral power control. */
  595. } NRF_TIMER_Type; /*!< Size = 4096 (0x1000) */
  596. /* =========================================================================================================================== */
  597. /* ================ RTC0 ================ */
  598. /* =========================================================================================================================== */
  599. /**
  600. * @brief Real time counter 0. (RTC0)
  601. */
  602. typedef struct { /*!< (@ 0x4000B000) RTC0 Structure */
  603. __OM uint32_t TASKS_START; /*!< (@ 0x00000000) Start RTC Counter. */
  604. __OM uint32_t TASKS_STOP; /*!< (@ 0x00000004) Stop RTC Counter. */
  605. __OM uint32_t TASKS_CLEAR; /*!< (@ 0x00000008) Clear RTC Counter. */
  606. __OM uint32_t TASKS_TRIGOVRFLW; /*!< (@ 0x0000000C) Set COUNTER to 0xFFFFFFF0. */
  607. __IM uint32_t RESERVED[60];
  608. __IOM uint32_t EVENTS_TICK; /*!< (@ 0x00000100) Event on COUNTER increment. */
  609. __IOM uint32_t EVENTS_OVRFLW; /*!< (@ 0x00000104) Event on COUNTER overflow. */
  610. __IM uint32_t RESERVED1[14];
  611. __IOM uint32_t EVENTS_COMPARE[4]; /*!< (@ 0x00000140) Compare event on CC[n] match. */
  612. __IM uint32_t RESERVED2[109];
  613. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Interrupt enable set register. */
  614. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Interrupt enable clear register. */
  615. __IM uint32_t RESERVED3[13];
  616. __IOM uint32_t EVTEN; /*!< (@ 0x00000340) Configures event enable routing to PPI for each
  617. RTC event. */
  618. __IOM uint32_t EVTENSET; /*!< (@ 0x00000344) Enable events routing to PPI. The reading of
  619. this register gives the value of EVTEN. */
  620. __IOM uint32_t EVTENCLR; /*!< (@ 0x00000348) Disable events routing to PPI. The reading of
  621. this register gives the value of EVTEN. */
  622. __IM uint32_t RESERVED4[110];
  623. __IM uint32_t COUNTER; /*!< (@ 0x00000504) Current COUNTER value. */
  624. __IOM uint32_t PRESCALER; /*!< (@ 0x00000508) 12-bit prescaler for COUNTER frequency (32768/(PRESCALER+1)).
  625. Must be written when RTC is STOPed. */
  626. __IM uint32_t RESERVED5[13];
  627. __IOM uint32_t CC[4]; /*!< (@ 0x00000540) Capture/compare registers. */
  628. __IM uint32_t RESERVED6[683];
  629. __IOM uint32_t POWER; /*!< (@ 0x00000FFC) Peripheral power control. */
  630. } NRF_RTC_Type; /*!< Size = 4096 (0x1000) */
  631. /* =========================================================================================================================== */
  632. /* ================ TEMP ================ */
  633. /* =========================================================================================================================== */
  634. /**
  635. * @brief Temperature Sensor. (TEMP)
  636. */
  637. typedef struct { /*!< (@ 0x4000C000) TEMP Structure */
  638. __OM uint32_t TASKS_START; /*!< (@ 0x00000000) Start temperature measurement. */
  639. __OM uint32_t TASKS_STOP; /*!< (@ 0x00000004) Stop temperature measurement. */
  640. __IM uint32_t RESERVED[62];
  641. __IOM uint32_t EVENTS_DATARDY; /*!< (@ 0x00000100) Temperature measurement complete, data ready
  642. event. */
  643. __IM uint32_t RESERVED1[128];
  644. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Interrupt enable set register. */
  645. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Interrupt enable clear register. */
  646. __IM uint32_t RESERVED2[127];
  647. __IM int32_t TEMP; /*!< (@ 0x00000508) Die temperature in degC, 2's complement format,
  648. 0.25 degC pecision. */
  649. __IM uint32_t RESERVED3[700];
  650. __IOM uint32_t POWER; /*!< (@ 0x00000FFC) Peripheral power control. */
  651. } NRF_TEMP_Type; /*!< Size = 4096 (0x1000) */
  652. /* =========================================================================================================================== */
  653. /* ================ RNG ================ */
  654. /* =========================================================================================================================== */
  655. /**
  656. * @brief Random Number Generator. (RNG)
  657. */
  658. typedef struct { /*!< (@ 0x4000D000) RNG Structure */
  659. __OM uint32_t TASKS_START; /*!< (@ 0x00000000) Start the random number generator. */
  660. __OM uint32_t TASKS_STOP; /*!< (@ 0x00000004) Stop the random number generator. */
  661. __IM uint32_t RESERVED[62];
  662. __IOM uint32_t EVENTS_VALRDY; /*!< (@ 0x00000100) New random number generated and written to VALUE
  663. register. */
  664. __IM uint32_t RESERVED1[63];
  665. __IOM uint32_t SHORTS; /*!< (@ 0x00000200) Shortcuts for the RNG. */
  666. __IM uint32_t RESERVED2[64];
  667. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Interrupt enable set register */
  668. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Interrupt enable clear register */
  669. __IM uint32_t RESERVED3[126];
  670. __IOM uint32_t CONFIG; /*!< (@ 0x00000504) Configuration register. */
  671. __IM uint32_t VALUE; /*!< (@ 0x00000508) RNG random number. */
  672. __IM uint32_t RESERVED4[700];
  673. __IOM uint32_t POWER; /*!< (@ 0x00000FFC) Peripheral power control. */
  674. } NRF_RNG_Type; /*!< Size = 4096 (0x1000) */
  675. /* =========================================================================================================================== */
  676. /* ================ ECB ================ */
  677. /* =========================================================================================================================== */
  678. /**
  679. * @brief AES ECB Mode Encryption. (ECB)
  680. */
  681. typedef struct { /*!< (@ 0x4000E000) ECB Structure */
  682. __OM uint32_t TASKS_STARTECB; /*!< (@ 0x00000000) Start ECB block encrypt. If a crypto operation
  683. is running, this will not initiate a new
  684. encryption and the ERRORECB event will be
  685. triggered. */
  686. __OM uint32_t TASKS_STOPECB; /*!< (@ 0x00000004) Stop current ECB encryption. If a crypto operation
  687. is running, this will will trigger the ERRORECB
  688. event. */
  689. __IM uint32_t RESERVED[62];
  690. __IOM uint32_t EVENTS_ENDECB; /*!< (@ 0x00000100) ECB block encrypt complete. */
  691. __IOM uint32_t EVENTS_ERRORECB; /*!< (@ 0x00000104) ECB block encrypt aborted due to a STOPECB task
  692. or due to an error. */
  693. __IM uint32_t RESERVED1[127];
  694. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Interrupt enable set register. */
  695. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Interrupt enable clear register. */
  696. __IM uint32_t RESERVED2[126];
  697. __IOM uint32_t ECBDATAPTR; /*!< (@ 0x00000504) ECB block encrypt memory pointer. */
  698. __IM uint32_t RESERVED3[701];
  699. __IOM uint32_t POWER; /*!< (@ 0x00000FFC) Peripheral power control. */
  700. } NRF_ECB_Type; /*!< Size = 4096 (0x1000) */
  701. /* =========================================================================================================================== */
  702. /* ================ AAR ================ */
  703. /* =========================================================================================================================== */
  704. /**
  705. * @brief Accelerated Address Resolver. (AAR)
  706. */
  707. typedef struct { /*!< (@ 0x4000F000) AAR Structure */
  708. __OM uint32_t TASKS_START; /*!< (@ 0x00000000) Start resolving addresses based on IRKs specified
  709. in the IRK data structure. */
  710. __IM uint32_t RESERVED;
  711. __OM uint32_t TASKS_STOP; /*!< (@ 0x00000008) Stop resolving addresses. */
  712. __IM uint32_t RESERVED1[61];
  713. __IOM uint32_t EVENTS_END; /*!< (@ 0x00000100) Address resolution procedure completed. */
  714. __IOM uint32_t EVENTS_RESOLVED; /*!< (@ 0x00000104) Address resolved. */
  715. __IOM uint32_t EVENTS_NOTRESOLVED; /*!< (@ 0x00000108) Address not resolved. */
  716. __IM uint32_t RESERVED2[126];
  717. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Interrupt enable set register. */
  718. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Interrupt enable clear register. */
  719. __IM uint32_t RESERVED3[61];
  720. __IM uint32_t STATUS; /*!< (@ 0x00000400) Resolution status. */
  721. __IM uint32_t RESERVED4[63];
  722. __IOM uint32_t ENABLE; /*!< (@ 0x00000500) Enable AAR. */
  723. __IOM uint32_t NIRK; /*!< (@ 0x00000504) Number of Identity root Keys in the IRK data
  724. structure. */
  725. __IOM uint32_t IRKPTR; /*!< (@ 0x00000508) Pointer to the IRK data structure. */
  726. __IM uint32_t RESERVED5;
  727. __IOM uint32_t ADDRPTR; /*!< (@ 0x00000510) Pointer to the resolvable address (6 bytes). */
  728. __IOM uint32_t SCRATCHPTR; /*!< (@ 0x00000514) Pointer to a scratch data area used for temporary
  729. storage during resolution. A minimum of
  730. 3 bytes must be reserved. */
  731. __IM uint32_t RESERVED6[697];
  732. __IOM uint32_t POWER; /*!< (@ 0x00000FFC) Peripheral power control. */
  733. } NRF_AAR_Type; /*!< Size = 4096 (0x1000) */
  734. /* =========================================================================================================================== */
  735. /* ================ CCM ================ */
  736. /* =========================================================================================================================== */
  737. /**
  738. * @brief AES CCM Mode Encryption. (CCM)
  739. */
  740. typedef struct { /*!< (@ 0x4000F000) CCM Structure */
  741. __OM uint32_t TASKS_KSGEN; /*!< (@ 0x00000000) Start generation of key-stream. This operation
  742. will stop by itself when completed. */
  743. __OM uint32_t TASKS_CRYPT; /*!< (@ 0x00000004) Start encrypt/decrypt. This operation will stop
  744. by itself when completed. */
  745. __OM uint32_t TASKS_STOP; /*!< (@ 0x00000008) Stop encrypt/decrypt. */
  746. __IM uint32_t RESERVED[61];
  747. __IOM uint32_t EVENTS_ENDKSGEN; /*!< (@ 0x00000100) Keystream generation completed. */
  748. __IOM uint32_t EVENTS_ENDCRYPT; /*!< (@ 0x00000104) Encrypt/decrypt completed. */
  749. __IOM uint32_t EVENTS_ERROR; /*!< (@ 0x00000108) Error happened. */
  750. __IM uint32_t RESERVED1[61];
  751. __IOM uint32_t SHORTS; /*!< (@ 0x00000200) Shortcuts for the CCM. */
  752. __IM uint32_t RESERVED2[64];
  753. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Interrupt enable set register. */
  754. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Interrupt enable clear register. */
  755. __IM uint32_t RESERVED3[61];
  756. __IM uint32_t MICSTATUS; /*!< (@ 0x00000400) CCM RX MIC check result. */
  757. __IM uint32_t RESERVED4[63];
  758. __IOM uint32_t ENABLE; /*!< (@ 0x00000500) CCM enable. */
  759. __IOM uint32_t MODE; /*!< (@ 0x00000504) Operation mode. */
  760. __IOM uint32_t CNFPTR; /*!< (@ 0x00000508) Pointer to a data structure holding AES key and
  761. NONCE vector. */
  762. __IOM uint32_t INPTR; /*!< (@ 0x0000050C) Pointer to the input packet. */
  763. __IOM uint32_t OUTPTR; /*!< (@ 0x00000510) Pointer to the output packet. */
  764. __IOM uint32_t SCRATCHPTR; /*!< (@ 0x00000514) Pointer to a scratch data area used for temporary
  765. storage during resolution. A minimum of
  766. 43 bytes must be reserved. */
  767. __IM uint32_t RESERVED5[697];
  768. __IOM uint32_t POWER; /*!< (@ 0x00000FFC) Peripheral power control. */
  769. } NRF_CCM_Type; /*!< Size = 4096 (0x1000) */
  770. /* =========================================================================================================================== */
  771. /* ================ WDT ================ */
  772. /* =========================================================================================================================== */
  773. /**
  774. * @brief Watchdog Timer. (WDT)
  775. */
  776. typedef struct { /*!< (@ 0x40010000) WDT Structure */
  777. __OM uint32_t TASKS_START; /*!< (@ 0x00000000) Start the watchdog. */
  778. __IM uint32_t RESERVED[63];
  779. __IOM uint32_t EVENTS_TIMEOUT; /*!< (@ 0x00000100) Watchdog timeout. */
  780. __IM uint32_t RESERVED1[128];
  781. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Interrupt enable set register. */
  782. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Interrupt enable clear register. */
  783. __IM uint32_t RESERVED2[61];
  784. __IM uint32_t RUNSTATUS; /*!< (@ 0x00000400) Watchdog running status. */
  785. __IM uint32_t REQSTATUS; /*!< (@ 0x00000404) Request status. */
  786. __IM uint32_t RESERVED3[63];
  787. __IOM uint32_t CRV; /*!< (@ 0x00000504) Counter reload value in number of 32kiHz clock
  788. cycles. */
  789. __IOM uint32_t RREN; /*!< (@ 0x00000508) Reload request enable. */
  790. __IOM uint32_t CONFIG; /*!< (@ 0x0000050C) Configuration register. */
  791. __IM uint32_t RESERVED4[60];
  792. __OM uint32_t RR[8]; /*!< (@ 0x00000600) Reload requests registers. */
  793. __IM uint32_t RESERVED5[631];
  794. __IOM uint32_t POWER; /*!< (@ 0x00000FFC) Peripheral power control. */
  795. } NRF_WDT_Type; /*!< Size = 4096 (0x1000) */
  796. /* =========================================================================================================================== */
  797. /* ================ QDEC ================ */
  798. /* =========================================================================================================================== */
  799. /**
  800. * @brief Rotary decoder. (QDEC)
  801. */
  802. typedef struct { /*!< (@ 0x40012000) QDEC Structure */
  803. __OM uint32_t TASKS_START; /*!< (@ 0x00000000) Start the quadrature decoder. */
  804. __OM uint32_t TASKS_STOP; /*!< (@ 0x00000004) Stop the quadrature decoder. */
  805. __OM uint32_t TASKS_READCLRACC; /*!< (@ 0x00000008) Transfers the content from ACC registers to ACCREAD
  806. registers, and clears the ACC registers. */
  807. __IM uint32_t RESERVED[61];
  808. __IOM uint32_t EVENTS_SAMPLERDY; /*!< (@ 0x00000100) A new sample is written to the sample register. */
  809. __IOM uint32_t EVENTS_REPORTRDY; /*!< (@ 0x00000104) REPORTPER number of samples accumulated in ACC
  810. register, and ACC register different than
  811. zero. */
  812. __IOM uint32_t EVENTS_ACCOF; /*!< (@ 0x00000108) ACC or ACCDBL register overflow. */
  813. __IM uint32_t RESERVED1[61];
  814. __IOM uint32_t SHORTS; /*!< (@ 0x00000200) Shortcuts for the QDEC. */
  815. __IM uint32_t RESERVED2[64];
  816. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Interrupt enable set register. */
  817. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Interrupt enable clear register. */
  818. __IM uint32_t RESERVED3[125];
  819. __IOM uint32_t ENABLE; /*!< (@ 0x00000500) Enable the QDEC. */
  820. __IOM uint32_t LEDPOL; /*!< (@ 0x00000504) LED output pin polarity. */
  821. __IOM uint32_t SAMPLEPER; /*!< (@ 0x00000508) Sample period. */
  822. __IM int32_t SAMPLE; /*!< (@ 0x0000050C) Motion sample value. */
  823. __IOM uint32_t REPORTPER; /*!< (@ 0x00000510) Number of samples to generate an EVENT_REPORTRDY. */
  824. __IM int32_t ACC; /*!< (@ 0x00000514) Accumulated valid transitions register. */
  825. __IM int32_t ACCREAD; /*!< (@ 0x00000518) Snapshot of ACC register. Value generated by
  826. the TASKS_READCLEACC task. */
  827. __IOM uint32_t PSELLED; /*!< (@ 0x0000051C) Pin select for LED output. */
  828. __IOM uint32_t PSELA; /*!< (@ 0x00000520) Pin select for phase A input. */
  829. __IOM uint32_t PSELB; /*!< (@ 0x00000524) Pin select for phase B input. */
  830. __IOM uint32_t DBFEN; /*!< (@ 0x00000528) Enable debouncer input filters. */
  831. __IM uint32_t RESERVED4[5];
  832. __IOM uint32_t LEDPRE; /*!< (@ 0x00000540) Time LED is switched ON before the sample. */
  833. __IM uint32_t ACCDBL; /*!< (@ 0x00000544) Accumulated double (error) transitions register. */
  834. __IM uint32_t ACCDBLREAD; /*!< (@ 0x00000548) Snapshot of ACCDBL register. Value generated
  835. by the TASKS_READCLEACC task. */
  836. __IM uint32_t RESERVED5[684];
  837. __IOM uint32_t POWER; /*!< (@ 0x00000FFC) Peripheral power control. */
  838. } NRF_QDEC_Type; /*!< Size = 4096 (0x1000) */
  839. /* =========================================================================================================================== */
  840. /* ================ LPCOMP ================ */
  841. /* =========================================================================================================================== */
  842. /**
  843. * @brief Low power comparator. (LPCOMP)
  844. */
  845. typedef struct { /*!< (@ 0x40013000) LPCOMP Structure */
  846. __OM uint32_t TASKS_START; /*!< (@ 0x00000000) Start the comparator. */
  847. __OM uint32_t TASKS_STOP; /*!< (@ 0x00000004) Stop the comparator. */
  848. __OM uint32_t TASKS_SAMPLE; /*!< (@ 0x00000008) Sample comparator value. */
  849. __IM uint32_t RESERVED[61];
  850. __IOM uint32_t EVENTS_READY; /*!< (@ 0x00000100) LPCOMP is ready and output is valid. */
  851. __IOM uint32_t EVENTS_DOWN; /*!< (@ 0x00000104) Input voltage crossed the threshold going down. */
  852. __IOM uint32_t EVENTS_UP; /*!< (@ 0x00000108) Input voltage crossed the threshold going up. */
  853. __IOM uint32_t EVENTS_CROSS; /*!< (@ 0x0000010C) Input voltage crossed the threshold in any direction. */
  854. __IM uint32_t RESERVED1[60];
  855. __IOM uint32_t SHORTS; /*!< (@ 0x00000200) Shortcuts for the LPCOMP. */
  856. __IM uint32_t RESERVED2[64];
  857. __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Interrupt enable set register. */
  858. __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Interrupt enable clear register. */
  859. __IM uint32_t RESERVED3[61];
  860. __IM uint32_t RESULT; /*!< (@ 0x00000400) Result of last compare. */
  861. __IM uint32_t RESERVED4[63];
  862. __IOM uint32_t ENABLE; /*!< (@ 0x00000500) Enable the LPCOMP. */
  863. __IOM uint32_t PSEL; /*!< (@ 0x00000504) Input pin select. */
  864. __IOM uint32_t REFSEL; /*!< (@ 0x00000508) Reference select. */
  865. __IOM uint32_t EXTREFSEL; /*!< (@ 0x0000050C) External reference select. */
  866. __IM uint32_t RESERVED5[4];
  867. __IOM uint32_t ANADETECT; /*!< (@ 0x00000520) Analog detect configuration. */
  868. __IM uint32_t RESERVED6[694];
  869. __IOM uint32_t POWER; /*!< (@ 0x00000FFC) Peripheral power control. */
  870. } NRF_LPCOMP_Type; /*!< Size = 4096 (0x1000) */
  871. /* =========================================================================================================================== */
  872. /* ================ SWI ================ */
  873. /* =========================================================================================================================== */
  874. /**
  875. * @brief SW Interrupts. (SWI)
  876. */
  877. typedef struct { /*!< (@ 0x40014000) SWI Structure */
  878. __IM uint32_t UNUSED; /*!< (@ 0x00000000) Unused. */
  879. } NRF_SWI_Type; /*!< Size = 4 (0x4) */
  880. /* =========================================================================================================================== */
  881. /* ================ NVMC ================ */
  882. /* =========================================================================================================================== */
  883. /**
  884. * @brief Non Volatile Memory Controller. (NVMC)
  885. */
  886. typedef struct { /*!< (@ 0x4001E000) NVMC Structure */
  887. __IM uint32_t RESERVED[256];
  888. __IM uint32_t READY; /*!< (@ 0x00000400) Ready flag. */
  889. __IM uint32_t RESERVED1[64];
  890. __IOM uint32_t CONFIG; /*!< (@ 0x00000504) Configuration register. */
  891. union {
  892. __IOM uint32_t ERASEPAGE; /*!< (@ 0x00000508) Register for erasing a non-protected non-volatile
  893. memory page. */
  894. __IOM uint32_t ERASEPCR1; /*!< (@ 0x00000508) Register for erasing a non-protected non-volatile
  895. memory page. */
  896. };
  897. __IOM uint32_t ERASEALL; /*!< (@ 0x0000050C) Register for erasing all non-volatile user memory. */
  898. __IOM uint32_t ERASEPCR0; /*!< (@ 0x00000510) Register for erasing a protected non-volatile
  899. memory page. */
  900. __IOM uint32_t ERASEUICR; /*!< (@ 0x00000514) Register for start erasing User Information Congfiguration
  901. Registers. */
  902. } NRF_NVMC_Type; /*!< Size = 1304 (0x518) */
  903. /* =========================================================================================================================== */
  904. /* ================ PPI ================ */
  905. /* =========================================================================================================================== */
  906. /**
  907. * @brief PPI controller. (PPI)
  908. */
  909. typedef struct { /*!< (@ 0x4001F000) PPI Structure */
  910. __IOM PPI_TASKS_CHG_Type TASKS_CHG[4]; /*!< (@ 0x00000000) Channel group tasks. */
  911. __IM uint32_t RESERVED[312];
  912. __IOM uint32_t CHEN; /*!< (@ 0x00000500) Channel enable. */
  913. __IOM uint32_t CHENSET; /*!< (@ 0x00000504) Channel enable set. */
  914. __IOM uint32_t CHENCLR; /*!< (@ 0x00000508) Channel enable clear. */
  915. __IM uint32_t RESERVED1;
  916. __IOM PPI_CH_Type CH[16]; /*!< (@ 0x00000510) PPI Channel. */
  917. __IM uint32_t RESERVED2[156];
  918. __IOM uint32_t CHG[4]; /*!< (@ 0x00000800) Channel group configuration. */
  919. } NRF_PPI_Type; /*!< Size = 2064 (0x810) */
  920. /* =========================================================================================================================== */
  921. /* ================ FICR ================ */
  922. /* =========================================================================================================================== */
  923. /**
  924. * @brief Factory Information Configuration. (FICR)
  925. */
  926. typedef struct { /*!< (@ 0x10000000) FICR Structure */
  927. __IM uint32_t RESERVED[4];
  928. __IM uint32_t CODEPAGESIZE; /*!< (@ 0x00000010) Code memory page size in bytes. */
  929. __IM uint32_t CODESIZE; /*!< (@ 0x00000014) Code memory size in pages. */
  930. __IM uint32_t RESERVED1[4];
  931. __IM uint32_t CLENR0; /*!< (@ 0x00000028) Length of code region 0 in bytes. */
  932. __IM uint32_t PPFC; /*!< (@ 0x0000002C) Pre-programmed factory code present. */
  933. __IM uint32_t RESERVED2;
  934. __IM uint32_t NUMRAMBLOCK; /*!< (@ 0x00000034) Number of individualy controllable RAM blocks. */
  935. union {
  936. __IM uint32_t SIZERAMBLOCKS; /*!< (@ 0x00000038) Size of RAM blocks in bytes. */
  937. __IM uint32_t SIZERAMBLOCK[4]; /*!< (@ 0x00000038) Deprecated array of size of RAM block in bytes.
  938. This name is kept for backward compatinility
  939. purposes. Use SIZERAMBLOCKS instead. */
  940. };
  941. __IM uint32_t RESERVED3[5];
  942. __IM uint32_t CONFIGID; /*!< (@ 0x0000005C) Configuration identifier. */
  943. __IM uint32_t DEVICEID[2]; /*!< (@ 0x00000060) Device identifier. */
  944. __IM uint32_t RESERVED4[6];
  945. __IM uint32_t ER[4]; /*!< (@ 0x00000080) Encryption root. */
  946. __IM uint32_t IR[4]; /*!< (@ 0x00000090) Identity root. */
  947. __IM uint32_t DEVICEADDRTYPE; /*!< (@ 0x000000A0) Device address type. */
  948. __IM uint32_t DEVICEADDR[2]; /*!< (@ 0x000000A4) Device address. */
  949. __IM uint32_t OVERRIDEEN; /*!< (@ 0x000000AC) Radio calibration override enable. */
  950. __IM uint32_t NRF_1MBIT[5]; /*!< (@ 0x000000B0) Override values for the OVERRIDEn registers in
  951. RADIO for NRF_1Mbit mode. */
  952. __IM uint32_t RESERVED5[10];
  953. __IM uint32_t BLE_1MBIT[5]; /*!< (@ 0x000000EC) Override values for the OVERRIDEn registers in
  954. RADIO for BLE_1Mbit mode. */
  955. } NRF_FICR_Type; /*!< Size = 256 (0x100) */
  956. /* =========================================================================================================================== */
  957. /* ================ UICR ================ */
  958. /* =========================================================================================================================== */
  959. /**
  960. * @brief User Information Configuration. (UICR)
  961. */
  962. typedef struct { /*!< (@ 0x10001000) UICR Structure */
  963. __IOM uint32_t CLENR0; /*!< (@ 0x00000000) Length of code region 0. */
  964. __IOM uint32_t RBPCONF; /*!< (@ 0x00000004) Readback protection configuration. */
  965. __IOM uint32_t XTALFREQ; /*!< (@ 0x00000008) Reset value for CLOCK XTALFREQ register. */
  966. __IM uint32_t RESERVED;
  967. __IM uint32_t FWID; /*!< (@ 0x00000010) Firmware ID. */
  968. union {
  969. __IOM uint32_t BOOTLOADERADDR; /*!< (@ 0x00000014) Bootloader start address. */
  970. __IOM uint32_t NRFFW[15]; /*!< (@ 0x00000014) Reserved for Nordic firmware design. */
  971. };
  972. __IOM uint32_t NRFHW[12]; /*!< (@ 0x00000050) Reserved for Nordic hardware design. */
  973. __IOM uint32_t CUSTOMER[32]; /*!< (@ 0x00000080) Reserved for customer. */
  974. } NRF_UICR_Type; /*!< Size = 256 (0x100) */
  975. /* =========================================================================================================================== */
  976. /* ================ GPIO ================ */
  977. /* =========================================================================================================================== */
  978. /**
  979. * @brief General purpose input and output. (GPIO)
  980. */
  981. typedef struct { /*!< (@ 0x50000000) GPIO Structure */
  982. __IM uint32_t RESERVED[321];
  983. __IOM uint32_t OUT; /*!< (@ 0x00000504) Write GPIO port. */
  984. __IOM uint32_t OUTSET; /*!< (@ 0x00000508) Set individual bits in GPIO port. */
  985. __IOM uint32_t OUTCLR; /*!< (@ 0x0000050C) Clear individual bits in GPIO port. */
  986. __IM uint32_t IN; /*!< (@ 0x00000510) Read GPIO port. */
  987. __IOM uint32_t DIR; /*!< (@ 0x00000514) Direction of GPIO pins. */
  988. __IOM uint32_t DIRSET; /*!< (@ 0x00000518) DIR set register. */
  989. __IOM uint32_t DIRCLR; /*!< (@ 0x0000051C) DIR clear register. */
  990. __IM uint32_t RESERVED1[120];
  991. __IOM uint32_t PIN_CNF[32]; /*!< (@ 0x00000700) Configuration of GPIO pins. */
  992. } NRF_GPIO_Type; /*!< Size = 1920 (0x780) */
  993. /** @} */ /* End of group Device_Peripheral_peripherals */
  994. /* =========================================================================================================================== */
  995. /* ================ Device Specific Peripheral Address Map ================ */
  996. /* =========================================================================================================================== */
  997. /** @addtogroup Device_Peripheral_peripheralAddr
  998. * @{
  999. */
  1000. #define NRF_POWER_BASE 0x40000000UL
  1001. #define NRF_CLOCK_BASE 0x40000000UL
  1002. #define NRF_MPU_BASE 0x40000000UL
  1003. #define NRF_RADIO_BASE 0x40001000UL
  1004. #define NRF_UART0_BASE 0x40002000UL
  1005. #define NRF_SPI0_BASE 0x40003000UL
  1006. #define NRF_TWI0_BASE 0x40003000UL
  1007. #define NRF_SPI1_BASE 0x40004000UL
  1008. #define NRF_TWI1_BASE 0x40004000UL
  1009. #define NRF_SPIS1_BASE 0x40004000UL
  1010. #define NRF_GPIOTE_BASE 0x40006000UL
  1011. #define NRF_ADC_BASE 0x40007000UL
  1012. #define NRF_TIMER0_BASE 0x40008000UL
  1013. #define NRF_TIMER1_BASE 0x40009000UL
  1014. #define NRF_TIMER2_BASE 0x4000A000UL
  1015. #define NRF_RTC0_BASE 0x4000B000UL
  1016. #define NRF_TEMP_BASE 0x4000C000UL
  1017. #define NRF_RNG_BASE 0x4000D000UL
  1018. #define NRF_ECB_BASE 0x4000E000UL
  1019. #define NRF_AAR_BASE 0x4000F000UL
  1020. #define NRF_CCM_BASE 0x4000F000UL
  1021. #define NRF_WDT_BASE 0x40010000UL
  1022. #define NRF_RTC1_BASE 0x40011000UL
  1023. #define NRF_QDEC_BASE 0x40012000UL
  1024. #define NRF_LPCOMP_BASE 0x40013000UL
  1025. #define NRF_SWI_BASE 0x40014000UL
  1026. #define NRF_NVMC_BASE 0x4001E000UL
  1027. #define NRF_PPI_BASE 0x4001F000UL
  1028. #define NRF_FICR_BASE 0x10000000UL
  1029. #define NRF_UICR_BASE 0x10001000UL
  1030. #define NRF_GPIO_BASE 0x50000000UL
  1031. /** @} */ /* End of group Device_Peripheral_peripheralAddr */
  1032. /* =========================================================================================================================== */
  1033. /* ================ Peripheral declaration ================ */
  1034. /* =========================================================================================================================== */
  1035. /** @addtogroup Device_Peripheral_declaration
  1036. * @{
  1037. */
  1038. #define NRF_POWER ((NRF_POWER_Type*) NRF_POWER_BASE)
  1039. #define NRF_CLOCK ((NRF_CLOCK_Type*) NRF_CLOCK_BASE)
  1040. #define NRF_MPU ((NRF_MPU_Type*) NRF_MPU_BASE)
  1041. #define NRF_RADIO ((NRF_RADIO_Type*) NRF_RADIO_BASE)
  1042. #define NRF_UART0 ((NRF_UART_Type*) NRF_UART0_BASE)
  1043. #define NRF_SPI0 ((NRF_SPI_Type*) NRF_SPI0_BASE)
  1044. #define NRF_TWI0 ((NRF_TWI_Type*) NRF_TWI0_BASE)
  1045. #define NRF_SPI1 ((NRF_SPI_Type*) NRF_SPI1_BASE)
  1046. #define NRF_TWI1 ((NRF_TWI_Type*) NRF_TWI1_BASE)
  1047. #define NRF_SPIS1 ((NRF_SPIS_Type*) NRF_SPIS1_BASE)
  1048. #define NRF_GPIOTE ((NRF_GPIOTE_Type*) NRF_GPIOTE_BASE)
  1049. #define NRF_ADC ((NRF_ADC_Type*) NRF_ADC_BASE)
  1050. #define NRF_TIMER0 ((NRF_TIMER_Type*) NRF_TIMER0_BASE)
  1051. #define NRF_TIMER1 ((NRF_TIMER_Type*) NRF_TIMER1_BASE)
  1052. #define NRF_TIMER2 ((NRF_TIMER_Type*) NRF_TIMER2_BASE)
  1053. #define NRF_RTC0 ((NRF_RTC_Type*) NRF_RTC0_BASE)
  1054. #define NRF_TEMP ((NRF_TEMP_Type*) NRF_TEMP_BASE)
  1055. #define NRF_RNG ((NRF_RNG_Type*) NRF_RNG_BASE)
  1056. #define NRF_ECB ((NRF_ECB_Type*) NRF_ECB_BASE)
  1057. #define NRF_AAR ((NRF_AAR_Type*) NRF_AAR_BASE)
  1058. #define NRF_CCM ((NRF_CCM_Type*) NRF_CCM_BASE)
  1059. #define NRF_WDT ((NRF_WDT_Type*) NRF_WDT_BASE)
  1060. #define NRF_RTC1 ((NRF_RTC_Type*) NRF_RTC1_BASE)
  1061. #define NRF_QDEC ((NRF_QDEC_Type*) NRF_QDEC_BASE)
  1062. #define NRF_LPCOMP ((NRF_LPCOMP_Type*) NRF_LPCOMP_BASE)
  1063. #define NRF_SWI ((NRF_SWI_Type*) NRF_SWI_BASE)
  1064. #define NRF_NVMC ((NRF_NVMC_Type*) NRF_NVMC_BASE)
  1065. #define NRF_PPI ((NRF_PPI_Type*) NRF_PPI_BASE)
  1066. #define NRF_FICR ((NRF_FICR_Type*) NRF_FICR_BASE)
  1067. #define NRF_UICR ((NRF_UICR_Type*) NRF_UICR_BASE)
  1068. #define NRF_GPIO ((NRF_GPIO_Type*) NRF_GPIO_BASE)
  1069. /** @} */ /* End of group Device_Peripheral_declaration */
  1070. /* ========================================= End of section using anonymous unions ========================================= */
  1071. #if defined (__CC_ARM)
  1072. #pragma pop
  1073. #elif defined (__ICCARM__)
  1074. /* leave anonymous unions enabled */
  1075. #elif (__ARMCC_VERSION >= 6010050)
  1076. #pragma clang diagnostic pop
  1077. #elif defined (__GNUC__)
  1078. /* anonymous unions are enabled by default */
  1079. #elif defined (__TMS470__)
  1080. /* anonymous unions are enabled by default */
  1081. #elif defined (__TASKING__)
  1082. #pragma warning restore
  1083. #elif defined (__CSMC__)
  1084. /* anonymous unions are enabled by default */
  1085. #endif
  1086. #ifdef __cplusplus
  1087. }
  1088. #endif
  1089. #endif /* NRF51_H */
  1090. /** @} */ /* End of group nrf51 */
  1091. /** @} */ /* End of group Nordic Semiconductor */