In need of help for PSoc - Arduino SPI | Cypress Semiconductor
In need of help for PSoc - Arduino SPI
I would like to have Arduino send short commands to PSoC 042 BLE (like "start" , "sleep" etc) via SPI communication.
If someone has done something similar before, I would be extremely grateful if he could provide me with hints or some kind of guidance. Is there something particular I should be aware of?
The Arduino code is as simple as that:
SPI.beginTransaction (SPISettings (4000000, MSBFIRST, SPI_MODE0)); // 4 MHz clock
digitalWrite (SS, LOW); // assert Slave Select
for (const char * p = "Hello" ; c = *p; p++)
digitalWrite (SS, HIGH); // de-assert Slave Select
delay(1500); // wait a bit before sending it again
For the PSoC part, I have used a SCB SPI Slave component and I have assigned the pins P0.0...P0.3.
How can I make the PSoC understand that the time has come to receive a message, and how to receive it?
Any thoughts, insights or hints are gratefully accepted.