You are here

SPI Multi-slave software solution? | Cypress Semiconductor

SPI Multi-slave software solution?

Summary: 1 Reply, Latest post by Bob Marlowe on 03 Apr 2015 01:33 AM PDT
Verified Answers: 0
Last post
Log in to post new comments.
WilkiCJ's picture
1 post


I am using the PSoC 4 to communicate between 3 slaves and 1 master. I have set everything up based on the PSoC 4 SPI documentation. After testing it for a while I found that we needed to put a resistor on the slave select lines in order for it to function properly. Unfortunately, I had already ordered the PCB without a spot for these resistors.

A little bit of research indicated that the problem I have encountered is common and that using a resistor is a quick and easy fix. However, it seems there is also a way to get multi-slave SPI to work by using software, but I can't seem to figure it out. Does anybody know what I have to do to resolve this issue using software?

I can post pictures of the top design and the code if that helps.




user_1377889's picture
9284 posts

The only thing that comes to my mind is to control some SS lines per program. Set the number of SS lines in the component to zero (0) and add the requires number of pin components (assume names SS1 to SS3). Now in your program before you send out a stream to a slave you pull the corresponding slave select line low by calling the pin's API SS1_Write(0); and when the transmission is complete (you will have to wait for) set SS1_Write(1). I do not know what the cause of your resistor issue is, but when it is a timing-problem you may insert a short delay when chancing the SS or use as drive mode resistive pull up.



Log in to post new comments.