Switching between SPIS and SPIM

How do I switch between being SPIS/SPIM with the Zephyr library?

I am using ncs v1.9.1. I have code that works separately as a slave or master but I need to make it dynamic. Is there any way to do this?

Parents
  • Hello,

    Can you please clarify a thing for me. Are you trying to connect to two different devices? One SPI slave and one SPI master? Do you want to/need to use the same GPIOs for the SPI slave and the SPI master?

    The only reason that I can think of to have both SPIS and SPIM is that you are talking to two different devices, so wouldn't it be easier just to set up both (on different GPIOs)?

    Best regards,

    Edvin

Reply
  • Hello,

    Can you please clarify a thing for me. Are you trying to connect to two different devices? One SPI slave and one SPI master? Do you want to/need to use the same GPIOs for the SPI slave and the SPI master?

    The only reason that I can think of to have both SPIS and SPIM is that you are talking to two different devices, so wouldn't it be easier just to set up both (on different GPIOs)?

    Best regards,

    Edvin

Children
Related