3-wires SPI on nRF54L15

Hello,

We need to interface the nRF54L15 with a 3-wires SPI slave (which uses one single bidirectional pin for MOSI and MISO).

I see two options here:

1. Connect the Slave MISO/MOSI line to two nRF54L15 different pins and use one of them as Master MOSI and the other one as Master MISO

2. Connect the Slave MISO/MOSI to a single nRF54L15 pin and use it as Master MISO/MOSI

Option 2 will save as a pin which could be quite convenient in this project.

My worries s if it can be done and can be supported by the current nRF Connect SDK without too much patching around :)

Could anyone help?

Kind Regards,

Andrea

Parents
  • Hi,

    The nRF54L15 SPIM peripheral does not have a dedicated “3-wire” or single-data-pin master mode. From both the hardware and nRF Connect SDK perspective, SPIM is defined as a conventional 4-wire interface (SCK, CS, MOSI, MISO).

    But still, a 3-wire SPI slave can be supported without custom drivers by using the standard SPIM interface and mapping SPIM_MOSI and SPIM_MISO to the same physical GPIO in pinctrl. Electrically, this gives you a single bidirectional data line connected to the slave, while the SPI driver continues to operate normally. By this approach you should be able to interface 3-wire SPI slaves using nRF Connect SDK. You may check out this relevant dev zone case for your further understanding.

    Best Regards,
    Syed Maysum

  • Hi,

    Just to add to Maysum's description, that suggestion require you to reconfigure the spi to switch the pin in question between miso and mosi for bidirectional transfer (e.g. chip select low, write some bytes, reconfigure, read some bytes, chip select high). So for a bidirectional transfer you may consider the below approach also (then it's chip select low, spi transfer, chip select high): 

     RE: Attempting SPIM3 reads with MOSI and MISO Tied Together 

    Both should work yes.

    Kenneth
     

Reply Children
Related