Does all SPI pins need to be in same GPIO port on ncs v2.4.2?

There are two GPIO pots on nRF5340 device. Does all SPI pins (cs, clock, mosi, and miso) need to belong to same port? 

  • Hello,

    I'm guessing something you read in the technical documentation wasn't clear. For example, Figure 201 in nrF5340_PS_v1.3.pdf shows pins connected to `SPI slave transceiver`, as though they were dedicated pins.

    All GPIO pins can be individually mapped to different interface blocks. In your case, the interface block is SPI. If you're using the libraries, then when you configure the SPI with the C code (let me know if you need code references) the GPIO pin you specify will be internally connected to the SPI circuitry. 

    In short, all SPI pins do not need to be in the same GPIO port because each GPIO pin can be individually assigned for SPI. 

    If you want more info, look at the PSEL.n register in the docs. You will see there that you can specify both a port and a pin.

Related