12 Replies Latest reply on Jul 20, 2018 4:25 AM by user_3240106

    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:


      #include <SPI.h>


      void setup()
        SPI.beginTransaction (SPISettings (4000000, MSBFIRST, SPI_MODE0));  // 4 MHz clock


      void loop()
       digitalWrite (SS, LOW);        // assert Slave Select
       for (const char * p = "Hello" ; c = *p; p++)
          SPI.transfer (c);
       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. 




      Kind regards,