mbed official / mbed

Dependents:   hello SerialTestv11 SerialTestv12 Sierpinski ... more

Committer:
Kojto
Date:
Thu Jul 07 14:34:11 2016 +0100
Revision:
122:f9eeca106725
Parent:
104:b9ad9a133dc7
Release 122 of the mbed library

Changes:
- new targets - Nucleo L432KC, Beetle, Nucleo F446ZE, Nucleo L011K4
- Thread safety addition - mbed API should contain a statement about thread safety
- critical section API addition
- CAS API (core_util_atomic_incr/decr)
- DEVICE_ are generated from targets.json file, device.h deprecated
- Callback replaces FunctionPointer to provide std like interface
- mbed HAL API docs improvements
- toolchain - prexif attributes with MBED_
- add new attributes - packed, weak, forcedinline, align
- target.json - contains targets definitions
- ST - L1XX - Cube update to 1.5
- SPI clock selection fix (clock from APB domain)
- F7 - Cube update v1.4.0
- L0 - baudrate init fix
- L1 - Cube update v1.5
- F3 - baudrate init fix, 3 targets CAN support
- F4 - Cube update v1.12.0, 3 targets CAN support
- L4XX - Cube update v1.5.1
- F0 - update Cube to v1.5.0
- L4 - 2 targets (L476RG/VG) CAN support
- NXP - pwm clock fix for KSDK2 MCU
- LPC2368 - remove ARM toolchain support - due to regression
- KSDK2 - fix SPI , I2C address and repeat start
- Silabs - some fixes backported from mbed 3
- Renesas - RZ_A1H - SystemCoreClockUpdate addition

Who changed what in which revision?

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