Skip to main content
n.serina
Associate III
February 15, 2019
Question

SPI 1 line simplex rxonly

  • February 15, 2019
  • 3 replies
  • 855 views

Hello,

How to read data from slave in 1 line rxonly.

I have this set up

STM3f446re board as master and arduino uno as slave

Master and slave are connected through only 2 lines. MISO and NSS.

Master will be in rxonly mode and slave sends data to master over MISO

Slave sends the data in the below format

<start byte><couple of bytes of data><end byte>

I can see master is continuously producing clock as expected .

But since master can sample at any clock edge i dont receive the data in order expected.

How to solve this issue?

Pls help

    This topic has been closed for replies.

    3 replies

    Andrei Chichak
    Lead
    February 15, 2019

    SPI is a synchronous bus with the master providing a clock signal. You might want to hook up the clock signal to the slave device.

    https://www.embedded.fm/blog/2017/3/24/i-spi

    S.Ma
    Principal
    February 15, 2019

    If not confortable with SPI, start with 4 wires first. NSS, MISO, MOSI, SCK

    waclawek.jan
    Super User
    February 16, 2019

    You still can use normal duplex setup, and not bring out MOSI onto a pin in GPIO (unless you use a 'F1xx).

    JW