We are using CYBLE-222014-01. Does it support multiple slaves in the SPI bus?
Welcome in the forum.
multiple slaves in the SPI bus Not out-of-the-box.
I would suggest you to configure your SPI with no (0) ss-lines. This requires handling of the ss-pins yourself as: setting the required ss-line low before a transaction and setting back high again after transaction has finished.
Configure the ss-lines as: No hardware connection, strong drive, initially high.
Thanks Bob. We are able to use standard GPIO lines as SS and handling them ourselves to get the SPI communication working.
We have one other issue - We have two SPI slave devices, one that uses SPI settings CPHA=1, CPOL=1 and other that uses CPHA=1, CPOL=0. With a single SPI block, in PSoC creator, I have tried to configure these settings separately through UI and able to communicate with the SPI slaves, one at a time. However, when one slave works, the other does not because of the difference in the SCLK Mode settings.
Is there a way to switch between the modes( configure CPHA and CPOL) through the software APIs so that I can get both the slaves running simulataneously?
You can do that, but it is a bit (or byte?) complicated.
You can use an "Unconfigured SCB" and configure it as SPI interface as your usual requirements are. Have a look into the datasheet. To ease the programming it might work to copy the initialization structure and just modify the differences.