5 Replies Latest reply on Sep 26, 2019 7:32 AM by RakshithM_16

    spi receive


      Hi Friends,

      I've CY8CKIT-042 Pioneer Kit, I tried to interface RFID Reader RC522 via SPI.

      In this, I need to configure my PSoC 4 as an SPI Master Receiver, I tried by modifying the demo example code, SCB_SpiCommMaster, but I didn't succeed.


      Can anyone help by giving me a way where I can get a video or demo example code for PSoC 4 as an SPI Master Receiver?




        • 1. Re: spi receive


          I think the code example is the proper one for you, but you need to find another SPI master code example, please follows the below steps.


          1) Open your 'PSoC Creator' (I am using 4.2 version)

          2) Click 'File' -> 'Code Example'

          3) Search 'SPI' as shown in the attached below image.


          Find Code Example window.PNG


          Thank you,


          • 2. Re: spi receive

            Hi Teddyy,

            Thanks! Your sugestion works


            But, still I didn't get correct value of Slave data, always I got 0x000000FF or dummy byte sent to receive data from salve.

            One more thing I surprised is that, if I connect SalveSel pin and map it appropriately, then I didn't receive any byte on MISO, but If I select Slave Device = 0, then only this works.

            FYI: I've connected RC522 (RFID Reader) via SPI, as I move RFID tag close to reader, I either receive 0x000000FF or dummy byte I sent!

            I used UART to display byte I received from slave.

            1 of 1 people found this helpful
            • 3. Re: spi receive

              Hi chsh_4442971


              Please share the project and the pin connection details so that we can reproduce the issue that you are facing.

              Also can you please explain this statement 'If I select Slave Device = 0, then only this works'.


              Thanks and Regards,

              Rakshith M B

              • 4. Re: spi receive

                Hi Rakshith,

                If I configure Slave Device  = 00, then only I get the response byte (of course false byte!).

                If I configure Slave Select pin  = 1 and then map it to the appropriate line, then nothing I received as a response byte.


                But, I need to study the query-response cycle of RC522 that I need to interface with PSoC 4.

                Let me give some time, I'll further update you if I shall face the issue again.


                Thanks for the support!



                • 5. Re: spi receive

                  Hi chsh_4442971


                  Sure, let us know if you need any help. You can also refer to these threads on RC522 which might help you with your issue -






                  Rakshith M B