1 /* 2 3 Copyright (c) 2010 - 2024, Nordic Semiconductor ASA All rights reserved. 4 5 SPDX-License-Identifier: BSD-3-Clause 6 7 Redistribution and use in source and binary forms, with or without 8 modification, are permitted provided that the following conditions are met: 9 10 1. Redistributions of source code must retain the above copyright notice, this 11 list of conditions and the following disclaimer. 12 13 2. Redistributions in binary form must reproduce the above copyright 14 notice, this list of conditions and the following disclaimer in the 15 documentation and/or other materials provided with the distribution. 16 17 3. Neither the name of Nordic Semiconductor ASA nor the names of its 18 contributors may be used to endorse or promote products derived from this 19 software without specific prior written permission. 20 21 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 IMPLIED WARRANTIES OF MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE 24 ARE DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE 25 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 POSSIBILITY OF SUCH DAMAGE. 32 33 */ 34 35 #ifndef _NRF52840_PERIPHERALS_H 36 #define _NRF52840_PERIPHERALS_H 37 38 39 /* Clock Peripheral */ 40 #define CLOCK_PRESENT 41 #define CLOCK_COUNT 1 42 43 /* Power Peripheral */ 44 #define POWER_PRESENT 45 #define POWER_COUNT 1 46 47 #define POWER_FEATURE_RAM_REGISTERS_PRESENT 48 #define POWER_FEATURE_RAM_REGISTERS_COUNT 9 49 50 #define POWER_FEATURE_VDDH_PRESENT 51 #define POWER_FEATURE_VDDH_DCDC_PRESENT 52 53 /* Non-Volatile Memory Controller */ 54 #define NVMC_PRESENT 55 #define NVMC_COUNT 1 56 57 #define NVMC_FEATURE_CACHE_PRESENT 58 59 /* Floating Point Unit */ 60 #define FPU_PRESENT 61 #define FPU_COUNT 1 62 63 /* Systick timer */ 64 #define SYSTICK_PRESENT 65 #define SYSTICK_COUNT 1 66 67 /* Software Interrupts */ 68 #define SWI_PRESENT 69 #define SWI_COUNT 6 70 71 /* Memory Watch Unit */ 72 #define MWU_PRESENT 73 #define MWU_COUNT 1 74 75 /* GPIO */ 76 #define GPIO_PRESENT 77 #define GPIO_COUNT 2 78 79 #define P0_PIN_NUM 32 80 #define P1_PIN_NUM 16 81 82 #define P0_FEATURE_PINS_PRESENT 0xFFFFFFFFUL 83 #define P1_FEATURE_PINS_PRESENT 0x0000FFFFUL 84 85 /* ACL */ 86 #define ACL_PRESENT 87 88 #define ACL_REGIONS_COUNT 8 89 90 /* Radio */ 91 #define RADIO_PRESENT 92 #define RADIO_COUNT 1 93 94 #define RADIO_EASYDMA_MAXCNT_SIZE 8 95 #define RADIO_FEATURE_IEEE_802_15_4_PRESENT 96 97 #define RADIO_TXPOWER_TXPOWER_Max RADIO_TXPOWER_TXPOWER_Pos8dBm 98 99 /* Accelerated Address Resolver */ 100 #define AAR_PRESENT 101 #define AAR_COUNT 1 102 103 #define AAR_MAX_IRK_NUM 16 104 105 /* AES Electronic CodeBook mode encryption */ 106 #define ECB_PRESENT 107 #define ECB_COUNT 1 108 109 /* AES CCM mode encryption */ 110 #define CCM_PRESENT 111 #define CCM_COUNT 1 112 113 /* NFC Tag */ 114 #define NFCT_PRESENT 115 #define NFCT_COUNT 1 116 117 #define NFCT_EASYDMA_MAXCNT_SIZE 9 118 119 /* Peripheral to Peripheral Interconnect */ 120 #define PPI_PRESENT 121 #define PPI_COUNT 1 122 123 #define PPI_CH_NUM 20 124 #define PPI_FIXED_CH_NUM 12 125 #define PPI_GROUP_NUM 6 126 #define PPI_FEATURE_FORKS_PRESENT 127 128 /* Event Generator Unit */ 129 #define EGU_PRESENT 130 #define EGU_COUNT 6 131 132 #define EGU0_CH_NUM 16 133 #define EGU1_CH_NUM 16 134 #define EGU2_CH_NUM 16 135 #define EGU3_CH_NUM 16 136 #define EGU4_CH_NUM 16 137 #define EGU5_CH_NUM 16 138 139 /* Timer/Counter */ 140 #define TIMER_PRESENT 141 #define TIMER_COUNT 5 142 143 #define TIMER0_MAX_SIZE 32 144 #define TIMER1_MAX_SIZE 32 145 #define TIMER2_MAX_SIZE 32 146 #define TIMER3_MAX_SIZE 32 147 #define TIMER4_MAX_SIZE 32 148 149 #define TIMER0_CC_NUM 4 150 #define TIMER1_CC_NUM 4 151 #define TIMER2_CC_NUM 4 152 #define TIMER3_CC_NUM 6 153 #define TIMER4_CC_NUM 6 154 155 /* Real Time Counter */ 156 #define RTC_PRESENT 157 #define RTC_COUNT 3 158 159 #define RTC0_CC_NUM 3 160 #define RTC1_CC_NUM 4 161 #define RTC2_CC_NUM 4 162 163 /* RNG */ 164 #define RNG_PRESENT 165 #define RNG_COUNT 1 166 167 /* Watchdog Timer */ 168 #define WDT_PRESENT 169 #define WDT_COUNT 1 170 171 /* Temperature Sensor */ 172 #define TEMP_PRESENT 173 #define TEMP_COUNT 1 174 175 /* Serial Peripheral Interface Master */ 176 #define SPI_PRESENT 177 #define SPI_COUNT 3 178 179 /* Serial Peripheral Interface Master with DMA */ 180 #define SPIM_PRESENT 181 #define SPIM_COUNT 4 182 183 #define SPIM0_MAX_DATARATE 8 184 #define SPIM1_MAX_DATARATE 8 185 #define SPIM2_MAX_DATARATE 8 186 #define SPIM3_MAX_DATARATE 32 187 188 #define SPIM0_FEATURE_HARDWARE_CSN_PRESENT 0 189 #define SPIM1_FEATURE_HARDWARE_CSN_PRESENT 0 190 #define SPIM2_FEATURE_HARDWARE_CSN_PRESENT 0 191 #define SPIM3_FEATURE_HARDWARE_CSN_PRESENT 1 192 193 #define SPIM0_FEATURE_DCX_PRESENT 0 194 #define SPIM1_FEATURE_DCX_PRESENT 0 195 #define SPIM2_FEATURE_DCX_PRESENT 0 196 #define SPIM3_FEATURE_DCX_PRESENT 1 197 198 #define SPIM0_FEATURE_RXDELAY_PRESENT 0 199 #define SPIM1_FEATURE_RXDELAY_PRESENT 0 200 #define SPIM2_FEATURE_RXDELAY_PRESENT 0 201 #define SPIM3_FEATURE_RXDELAY_PRESENT 1 202 203 #define SPIM0_EASYDMA_MAXCNT_SIZE 16 204 #define SPIM1_EASYDMA_MAXCNT_SIZE 16 205 #define SPIM2_EASYDMA_MAXCNT_SIZE 16 206 #define SPIM3_EASYDMA_MAXCNT_SIZE 16 207 208 /* Serial Peripheral Interface Slave with DMA*/ 209 #define SPIS_PRESENT 210 #define SPIS_COUNT 3 211 212 #define SPIS0_EASYDMA_MAXCNT_SIZE 16 213 #define SPIS1_EASYDMA_MAXCNT_SIZE 16 214 #define SPIS2_EASYDMA_MAXCNT_SIZE 16 215 216 /* Two Wire Interface Master */ 217 #define TWI_PRESENT 218 #define TWI_COUNT 2 219 220 /* Two Wire Interface Master with DMA */ 221 #define TWIM_PRESENT 222 #define TWIM_COUNT 2 223 224 #define TWIM0_EASYDMA_MAXCNT_SIZE 16 225 #define TWIM1_EASYDMA_MAXCNT_SIZE 16 226 227 /* Two Wire Interface Slave with DMA */ 228 #define TWIS_PRESENT 229 #define TWIS_COUNT 2 230 231 #define TWIS0_EASYDMA_MAXCNT_SIZE 16 232 #define TWIS1_EASYDMA_MAXCNT_SIZE 16 233 234 /* Universal Asynchronous Receiver-Transmitter */ 235 #define UART_PRESENT 236 #define UART_COUNT 1 237 238 /* Universal Asynchronous Receiver-Transmitter with DMA */ 239 #define UARTE_PRESENT 240 #define UARTE_COUNT 2 241 242 #define UARTE0_EASYDMA_MAXCNT_SIZE 16 243 #define UARTE1_EASYDMA_MAXCNT_SIZE 16 244 245 /* Quadrature Decoder */ 246 #define QDEC_PRESENT 247 #define QDEC_COUNT 1 248 249 /* Successive Approximation Analog to Digital Converter */ 250 #define SAADC_PRESENT 251 #define SAADC_COUNT 1 252 253 #define SAADC_EASYDMA_MAXCNT_SIZE 15 254 255 #define SAADC_CH_NUM 8 256 257 /* GPIO Tasks and Events */ 258 #define GPIOTE_PRESENT 259 #define GPIOTE_COUNT 1 260 261 #define GPIOTE_CH_NUM 8 262 263 #define GPIOTE_FEATURE_SET_PRESENT 264 #define GPIOTE_FEATURE_CLR_PRESENT 265 266 /* Low Power Comparator */ 267 #define LPCOMP_PRESENT 268 #define LPCOMP_COUNT 1 269 270 #define LPCOMP_REFSEL_RESOLUTION 16 271 272 #define LPCOMP_FEATURE_HYST_PRESENT 273 274 /* Comparator */ 275 #define COMP_PRESENT 276 #define COMP_COUNT 1 277 278 /* Pulse Width Modulator */ 279 #define PWM_PRESENT 280 #define PWM_COUNT 4 281 282 #define PWM0_CH_NUM 4 283 #define PWM1_CH_NUM 4 284 #define PWM2_CH_NUM 4 285 #define PWM3_CH_NUM 4 286 287 #define PWM0_EASYDMA_MAXCNT_SIZE 15 288 #define PWM1_EASYDMA_MAXCNT_SIZE 15 289 #define PWM2_EASYDMA_MAXCNT_SIZE 15 290 #define PWM3_EASYDMA_MAXCNT_SIZE 15 291 292 /* Pulse Density Modulator */ 293 #define PDM_PRESENT 294 #define PDM_COUNT 1 295 296 #define PDM_EASYDMA_MAXCNT_SIZE 15 297 298 /* Inter-IC Sound Interface */ 299 #define I2S_PRESENT 300 #define I2S_COUNT 1 301 302 #define I2S_EASYDMA_MAXCNT_SIZE 14 303 304 /* Universal Serial Bus Device */ 305 #define USBD_PRESENT 306 #define USBD_COUNT 1 307 308 #define USBD_EASYDMA_MAXCNT_SIZE 7 309 310 /* ARM TrustZone Cryptocell 310 */ 311 #define CRYPTOCELL_PRESENT 312 #define CRYPTOCELL_COUNT 1 313 314 /* Quad SPI */ 315 #define QSPI_PRESENT 316 #define QSPI_COUNT 1 317 318 #define QSPI_EASYDMA_MAXCNT_SIZE 20 319 320 #endif // _NRF52840_PERIPHERALS_H 321