This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

SPI protocol configuration. How to change spi0(master) into spis0(slave) in running time?

Hi all

I use nRf52840 with SDK 15.0. It allows  SPI SPIS and TWI (i2c) ,but almost 3 items in the same time. I want to use spi0 as master to configurate my other mcu and change to spis 0 as a receiver to receive data from this mcu. but the macro can't change. If I define spi0 ,I can't use spis0 anymore.  How to implement my requirement ?

Parents
  • That does not sould like you understood SPI in the first place. SPI always transmits and receives at the same time - you will typically just throw away the data from the path you don't need.

    The clock signal defines which party is the master: The clock generator is called SPI master, the clock receiver is called the SPI slave. You don't want to mix roles.

Reply
  • That does not sould like you understood SPI in the first place. SPI always transmits and receives at the same time - you will typically just throw away the data from the path you don't need.

    The clock signal defines which party is the master: The clock generator is called SPI master, the clock receiver is called the SPI slave. You don't want to mix roles.

Children
Related