Loading...
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 | # Copyright (c) 2017 - 2018, Nordic Semiconductor ASA # # SPDX-License-Identifier: Apache-2.0 # menuconfig SPI_NRFX bool "nRF SPI nrfx drivers" depends on SOC_FAMILY_NRF help Enable support for nrfx SPI drivers for nRF MCU series. Peripherals with the same instance ID cannot be used together, e.g. SPI_0 and I2C_0. You may need to disable I2C_0 or I2C_1. if SPI_NRFX # Nordic TWIx0 and SPIx0 instances can not be used at the same time. if SPI_0 && !I2C_0 choice prompt "SPI Port 0 Driver type" optional config SPI_0_NRF_SPI bool "nRF SPI 0" depends on SOC_SERIES_NRF52X || SOC_SERIES_NRF51X select NRFX_SPI help Enable nRF SPI Master without EasyDMA on port 0. config SPI_0_NRF_SPIM bool "nRF SPIM 0" depends on SOC_NRF52840 select NRFX_SPIM help Enable nRF SPI Master with EasyDMA on port 0. config SPI_0_NRF_SPIS bool "nRF SPIS 0" depends on SOC_SERIES_NRF52X select SPI_SLAVE select NRFX_SPIS help Enable nRF SPI Slave with EasyDMA on port 0. Due to hardware limitations the implementation supports only simple buffers (consisting of one part) located in RAM. endchoice if SPI_0_NRF_SPI || SPI_0_NRF_SPIM || SPI_0_NRF_SPIS config SPI_0_NRF_SCK_PIN int "SCK pin number" range 0 47 if SOC_NRF52840_QIAA range 0 31 help GPIO pin number to use for SCK. config SPI_0_NRF_MOSI_PIN int "MOSI pin number" range 0 47 if SOC_NRF52840_QIAA range 0 31 help GPIO pin number to use for MOSI. config SPI_0_NRF_MISO_PIN int "MISO pin number" range 0 47 if SOC_NRF52840_QIAA range 0 31 help GPIO pin number to use for MISO. config SPI_0_NRF_ORC hex "Over-read Character" range 0x00 0xff default 0xff help Over-read character. Character clocked out after an over-read of the transmit buffer. endif # SPI_0_NRF_SPI || SPI_0_NRF_SPIM || SPI_0_NRF_SPIS if SPI_0_NRF_SPIS config SPI_0_NRF_CSN_PIN int "CSN pin number" range 0 47 if SOC_NRF52840_QIAA range 0 31 help GPIO pin number to use for Chip Select. config SPI_0_NRF_DEF hex "Default Character" range 0x00 0xff default 0xff help Default character. Character clocked out when the slave was not provided with buffers and is ignoring the transaction. endif # SPI_0_NRF_SPIS endif # SPI_0 && !I2C_0 # Nordic TWIx1 and SPIx1 instances can not be used at the same time. if SPI_1 && !I2C_1 choice prompt "SPI Port 1 Driver type" optional config SPI_1_NRF_SPI bool "nRF SPI 1" depends on SOC_SERIES_NRF52X || SOC_SERIES_NRF51X select NRFX_SPI help Enable nRF SPI Master without EasyDMA on port 1. config SPI_1_NRF_SPIM bool "nRF SPIM 1" depends on SOC_NRF52840 select NRFX_SPIM help Enable nRF SPI Master with EasyDMA on port 1. config SPI_1_NRF_SPIS bool "nRF SPIS 1" depends on SOC_SERIES_NRF52X || SOC_SERIES_NRF51X select SPI_SLAVE select NRFX_SPIS help Enable nRF SPI Slave with EasyDMA on port 1. Due to hardware limitations the implementation supports only simple buffers (consisting of one part) located in RAM. endchoice if SPI_1_NRF_SPI || SPI_1_NRF_SPIM || SPI_1_NRF_SPIS config SPI_1_NRF_SCK_PIN int "SCK pin number" range 0 47 if SOC_NRF52840_QIAA range 0 31 help GPIO pin number to use for SCK. config SPI_1_NRF_MOSI_PIN int "MOSI pin number" range 0 47 if SOC_NRF52840_QIAA range 0 31 help GPIO pin number to use for MOSI. config SPI_1_NRF_MISO_PIN int "MISO pin number" range 0 47 if SOC_NRF52840_QIAA range 0 31 help GPIO pin number to use for MISO. config SPI_1_NRF_ORC hex "Over-read Character" range 0x00 0xff default 0xff help Over-read character. Character clocked out after an over-read of the transmit buffer. endif # SPI_1_NRF_SPI || SPI_1_NRF_SPIM || SPI_1_NRF_SPIS if SPI_1_NRF_SPIS config SPI_1_NRF_CSN_PIN int "CSN pin number" range 0 47 if SOC_NRF52840_QIAA range 0 31 help GPIO pin number to use for Chip Select. config SPI_1_NRF_DEF hex "Default Character" range 0x00 0xff default 0xff help Default character. Character clocked out when the slave was not provided with buffers and is ignoring the transaction. endif # SPI_1_NRF_SPIS endif # SPI_1 && !I2C_1 if SPI_2 choice prompt "SPI Port 2 Driver type" optional config SPI_2_NRF_SPI bool "nRF SPI 2" depends on SOC_SERIES_NRF52X select NRFX_SPI help Enable nRF SPI Master without EasyDMA on port 2. config SPI_2_NRF_SPIM bool "nRF SPIM 2" depends on SOC_NRF52840 select NRFX_SPIM help Enable nRF SPI Master with EasyDMA on port 2. config SPI_2_NRF_SPIS bool "nRF SPIS 2" depends on SOC_SERIES_NRF52X select SPI_SLAVE select NRFX_SPIS help Enable nRF SPI Slave with EasyDMA on port 2. Due to hardware limitations the implementation supports only simple buffers (consisting of one part) located in RAM. endchoice if SPI_2_NRF_SPI || SPI_2_NRF_SPIM || SPI_2_NRF_SPIS config SPI_2_NRF_SCK_PIN int "SCK pin number" range 0 47 if SOC_NRF52840_QIAA range 0 31 help GPIO pin number to use for SCK. config SPI_2_NRF_MOSI_PIN int "MOSI pin number" range 0 47 if SOC_NRF52840_QIAA range 0 31 help GPIO pin number to use for MOSI. config SPI_2_NRF_MISO_PIN int "MISO pin number" range 0 47 if SOC_NRF52840_QIAA range 0 31 help GPIO pin number to use for MISO. config SPI_2_NRF_ORC hex "Over-read Character" range 0x00 0xff default 0xff help Over-read character. Character clocked out after an over-read of the transmit buffer. endif # SPI_2_NRF_SPI || SPI_2_NRF_SPIM || SPI_2_NRF_SPIS if SPI_2_NRF_SPIS config SPI_2_NRF_CSN_PIN int "CSN pin number" range 0 47 if SOC_NRF52840_QIAA range 0 31 help GPIO pin number to use for Chip Select. config SPI_2_NRF_DEF hex "Default Character" range 0x00 0xff default 0xff help Default character. Character clocked out when the slave was not provided with buffers and is ignoring the transaction. endif # SPI_2_NRF_SPIS endif # SPI_2 if SPI_3 config SPI_3_NRF_SPIM bool depends on SOC_NRF52840 select NRFX_SPIM default y if SPI_3_NRF_SPIM config SPI_3_NRF_SCK_PIN int "SCK pin number" range 0 47 if SOC_NRF52840_QIAA range 0 31 help GPIO pin number to use for SCK config SPI_3_NRF_MOSI_PIN int "MOSI pin number" range 0 47 if SOC_NRF52840_QIAA range 0 31 help GPIO pin number to use for MOSI config SPI_3_NRF_MISO_PIN int "MISO pin number" range 0 47 if SOC_NRF52840_QIAA range 0 31 help GPIO pin number to use for MISO config SPI_3_NRF_ORC hex "Over-read Character" range 0x00 0xff default 0xff help Over-read character. Character clocked out after an over-read of the transmit buffer. config SPI_3_NRF_RX_DELAY int "MISO sampling delay" range 0 7 default 0 help Number of 64 MHz clock cycles (15.625 ns) delay from the sampling edge of SCK (leading or trailing, depending on the CPHA setting used) until the input serial data on MISO is actually sampled. endif # SPI_3_NRF_SPIM endif # SPI_3 if NRFX_SPIM config SPI_NRFX_RAM_BUFFER_SIZE int "Size of RAM buffer" default 0 help SPIM peripherals cannot transmit data directly from flash. Therefore, a buffer in RAM needs to be provided for each instance of SPI driver using SPIM peripheral, so that the driver can copy there a chunk of data from flash and transmit it. The size is specified in bytes. A size of 0 means that this feature should be disabled, and the application must then take care of not supplying buffers located in flash to the driver, otherwise such transfers will fail. endif # NRFX_SPIM endif # SPI_NRFX |