Is it possible to configure nRF54L15 for SPI without SDI / MISO and use that pin for other functions?

We have previously used nRF52840 and for the latest iteration of our board design we are updating to use nRF54L15.

We are aware that for nRF52840 we could map any pin to any function however for nRF54L15 we must use specific pins for some function (e.g. clock signals).

We require 3 SPI interfaces and our design is currently intending to configure nRF54L15 as follows:

SPIM/SPIS00

SCK : P2.01

SDO : P2.08

SDI : P2.09

CS : P2.10

SPIM/SPIS20

SCK : P1.12

SDO : P1.13

SDI : P1.14

CS : P1.04

SPIM/SPIS21

SCK : P1.08

SDO : P1.07

SDI : P1.10

CS : P1.06

For one of our SPI interfaces (SPIS21) we do not require SDI (P1.10) and would like to use this as a GPIO (input) signal as we have maxed out the available pins.

In our pinctrl.dtsi file it is possible to only configure the pins we need, for example we can change:

group1 {
    psels = <NRF_PSEL(SPIM_MOSI, 1, 7)>, <NRF_PSEL(SPIM_MISO, 1, 10)>, <NRF_PSEL(SPIM_SCK, 1, 8)>;
};
To:
group1 {
    psels = <NRF_PSEL(SPIM_MOSI, 1, 7)>, <NRF_PSEL(SPIM_SCK, 1, 8)>;
};
However I wanted to check if this will actually work for nRF54L15 ? Can the SPI interfaces be configured without SDI / MISO and the pin can be used for GPIO instead? 
Parents
  • Alex, 

    It looks like you can omit SDI pin assignment to SPIM.  In the Nordic HAL you do this by passing the standard NRF_PSEL_DISCONNECTED constant for the MISO pin; under Zephyr you must explicitly set the devicetree’s miso-pin to 0xFFFFFFFF rather than dropping it altogether. Once that’s done, P1.10 (your would-be SDI pin) remains a free GPIO you can configure for your other signal. I have not tried this myself, but it seems very possible to do this.

Reply
  • Alex, 

    It looks like you can omit SDI pin assignment to SPIM.  In the Nordic HAL you do this by passing the standard NRF_PSEL_DISCONNECTED constant for the MISO pin; under Zephyr you must explicitly set the devicetree’s miso-pin to 0xFFFFFFFF rather than dropping it altogether. Once that’s done, P1.10 (your would-be SDI pin) remains a free GPIO you can configure for your other signal. I have not tried this myself, but it seems very possible to do this.

Children
Related