1 /* 2 3 Copyright (c) 2010 - 2023, 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 _NRF52832_PERIPHERALS_H 36 #define _NRF52832_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 #if defined(NRF52832_XXAA) 49 #define POWER_FEATURE_RAM_REGISTERS_COUNT 8 50 #elif defined(NRF52832_XXAB) 51 #define POWER_FEATURE_RAM_REGISTERS_COUNT 4 52 #endif 53 54 /* Non-Volatile Memory Controller */ 55 #define NVMC_PRESENT 56 #define NVMC_COUNT 1 57 58 #define NVMC_FEATURE_CACHE_PRESENT 59 60 /* Floating Point Unit */ 61 #define FPU_PRESENT 62 #define FPU_COUNT 1 63 64 /* Systick timer */ 65 #define SYSTICK_PRESENT 66 #define SYSTICK_COUNT 1 67 68 /* Software Interrupts */ 69 #define SWI_PRESENT 70 #define SWI_COUNT 6 71 72 /* Memory Watch Unit */ 73 #define MWU_PRESENT 74 #define MWU_COUNT 1 75 76 /* GPIO */ 77 #define GPIO_PRESENT 78 #define GPIO_COUNT 1 79 80 #define P0_PIN_NUM 32 81 82 #define P0_FEATURE_PINS_PRESENT 0xFFFFFFFFUL 83 84 /* MPU and BPROT */ 85 #define BPROT_PRESENT 86 87 #define BPROT_REGIONS_SIZE 4096 88 89 #if defined(NRF52832_XXAA) 90 #define BPROT_REGIONS_NUM 128 91 #elif defined(NRF52832_XXAB) 92 #define BPROT_REGIONS_NUM 64 93 #endif 94 95 /* Radio */ 96 #define RADIO_PRESENT 97 #define RADIO_COUNT 1 98 99 #define RADIO_EASYDMA_MAXCNT_SIZE 8 100 101 #define RADIO_TXPOWER_TXPOWER_Max RADIO_TXPOWER_TXPOWER_Pos4dBm 102 103 /* Accelerated Address Resolver */ 104 #define AAR_PRESENT 105 #define AAR_COUNT 1 106 107 #define AAR_MAX_IRK_NUM 16 108 109 /* AES Electronic CodeBook mode encryption */ 110 #define ECB_PRESENT 111 #define ECB_COUNT 1 112 113 /* AES CCM mode encryption */ 114 #define CCM_PRESENT 115 #define CCM_COUNT 1 116 117 /* NFC Tag */ 118 #define NFCT_PRESENT 119 #define NFCT_COUNT 1 120 121 #define NFCT_EASYDMA_MAXCNT_SIZE 9 122 123 /* Peripheral to Peripheral Interconnect */ 124 #define PPI_PRESENT 125 #define PPI_COUNT 1 126 127 #define PPI_CH_NUM 20 128 #define PPI_FIXED_CH_NUM 12 129 #define PPI_GROUP_NUM 6 130 #define PPI_FEATURE_FORKS_PRESENT 131 132 /* Event Generator Unit */ 133 #define EGU_PRESENT 134 #define EGU_COUNT 6 135 136 #define EGU0_CH_NUM 16 137 #define EGU1_CH_NUM 16 138 #define EGU2_CH_NUM 16 139 #define EGU3_CH_NUM 16 140 #define EGU4_CH_NUM 16 141 #define EGU5_CH_NUM 16 142 143 /* Timer/Counter */ 144 #define TIMER_PRESENT 145 #define TIMER_COUNT 5 146 147 #define TIMER0_MAX_SIZE 32 148 #define TIMER1_MAX_SIZE 32 149 #define TIMER2_MAX_SIZE 32 150 #define TIMER3_MAX_SIZE 32 151 #define TIMER4_MAX_SIZE 32 152 153 #define TIMER0_CC_NUM 4 154 #define TIMER1_CC_NUM 4 155 #define TIMER2_CC_NUM 4 156 #define TIMER3_CC_NUM 6 157 #define TIMER4_CC_NUM 6 158 159 /* Real Time Counter */ 160 #define RTC_PRESENT 161 #define RTC_COUNT 3 162 163 #define RTC0_CC_NUM 3 164 #define RTC1_CC_NUM 4 165 #define RTC2_CC_NUM 4 166 167 /* RNG */ 168 #define RNG_PRESENT 169 #define RNG_COUNT 1 170 171 /* Watchdog Timer */ 172 #define WDT_PRESENT 173 #define WDT_COUNT 1 174 175 /* Temperature Sensor */ 176 #define TEMP_PRESENT 177 #define TEMP_COUNT 1 178 179 /* Serial Peripheral Interface Master */ 180 #define SPI_PRESENT 181 #define SPI_COUNT 3 182 183 /* Serial Peripheral Interface Master with DMA */ 184 #define SPIM_PRESENT 185 #define SPIM_COUNT 3 186 187 #define SPIM0_MAX_DATARATE 8 188 #define SPIM1_MAX_DATARATE 8 189 #define SPIM2_MAX_DATARATE 8 190 191 #define SPIM0_FEATURE_HARDWARE_CSN_PRESENT 0 192 #define SPIM1_FEATURE_HARDWARE_CSN_PRESENT 0 193 #define SPIM2_FEATURE_HARDWARE_CSN_PRESENT 0 194 195 #define SPIM0_FEATURE_DCX_PRESENT 0 196 #define SPIM1_FEATURE_DCX_PRESENT 0 197 #define SPIM2_FEATURE_DCX_PRESENT 0 198 199 #define SPIM0_FEATURE_RXDELAY_PRESENT 0 200 #define SPIM1_FEATURE_RXDELAY_PRESENT 0 201 #define SPIM2_FEATURE_RXDELAY_PRESENT 0 202 203 #define SPIM0_EASYDMA_MAXCNT_SIZE 8 204 #define SPIM1_EASYDMA_MAXCNT_SIZE 8 205 #define SPIM2_EASYDMA_MAXCNT_SIZE 8 206 207 /* Serial Peripheral Interface Slave with DMA*/ 208 #define SPIS_PRESENT 209 #define SPIS_COUNT 3 210 211 #define SPIS0_EASYDMA_MAXCNT_SIZE 8 212 #define SPIS1_EASYDMA_MAXCNT_SIZE 8 213 #define SPIS2_EASYDMA_MAXCNT_SIZE 8 214 215 /* Two Wire Interface Master */ 216 #define TWI_PRESENT 217 #define TWI_COUNT 2 218 219 /* Two Wire Interface Master with DMA */ 220 #define TWIM_PRESENT 221 #define TWIM_COUNT 2 222 223 #define TWIM0_EASYDMA_MAXCNT_SIZE 8 224 #define TWIM1_EASYDMA_MAXCNT_SIZE 8 225 226 /* Two Wire Interface Slave with DMA */ 227 #define TWIS_PRESENT 228 #define TWIS_COUNT 2 229 230 #define TWIS0_EASYDMA_MAXCNT_SIZE 8 231 #define TWIS1_EASYDMA_MAXCNT_SIZE 8 232 233 /* Universal Asynchronous Receiver-Transmitter */ 234 #define UART_PRESENT 235 #define UART_COUNT 1 236 237 /* Universal Asynchronous Receiver-Transmitter with DMA */ 238 #define UARTE_PRESENT 239 #define UARTE_COUNT 1 240 241 #define UARTE0_EASYDMA_MAXCNT_SIZE 8 242 243 /* Quadrature Decoder */ 244 #define QDEC_PRESENT 245 #define QDEC_COUNT 1 246 247 /* Successive Approximation Analog to Digital Converter */ 248 #define SAADC_PRESENT 249 #define SAADC_COUNT 1 250 251 #define SAADC_EASYDMA_MAXCNT_SIZE 15 252 253 #define SAADC_CH_NUM 8 254 255 /* GPIO Tasks and Events */ 256 #define GPIOTE_PRESENT 257 #define GPIOTE_COUNT 1 258 259 #define GPIOTE_CH_NUM 8 260 261 #define GPIOTE_FEATURE_SET_PRESENT 262 #define GPIOTE_FEATURE_CLR_PRESENT 263 264 /* Low Power Comparator */ 265 #define LPCOMP_PRESENT 266 #define LPCOMP_COUNT 1 267 268 #define LPCOMP_REFSEL_RESOLUTION 16 269 270 #define LPCOMP_FEATURE_HYST_PRESENT 271 272 /* Comparator */ 273 #define COMP_PRESENT 274 #define COMP_COUNT 1 275 276 /* Pulse Width Modulator */ 277 #define PWM_PRESENT 278 #define PWM_COUNT 3 279 280 #define PWM0_CH_NUM 4 281 #define PWM1_CH_NUM 4 282 #define PWM2_CH_NUM 4 283 284 #define PWM0_EASYDMA_MAXCNT_SIZE 15 285 #define PWM1_EASYDMA_MAXCNT_SIZE 15 286 #define PWM2_EASYDMA_MAXCNT_SIZE 15 287 288 /* Pulse Density Modulator */ 289 #define PDM_PRESENT 290 #define PDM_COUNT 1 291 292 #define PDM_EASYDMA_MAXCNT_SIZE 15 293 294 /* Inter-IC Sound Interface */ 295 #define I2S_PRESENT 296 #define I2S_COUNT 1 297 298 #define I2S_EASYDMA_MAXCNT_SIZE 14 299 300 301 #endif // _NRF52832_PERIPHERALS_H 302