4 Replies Latest reply on Sep 23, 2015 12:54 PM by userc_21026

    SPI examples not working

      Hi,

      I am trying to get the default SPI master/slave examples to run on my tag boards.Using the examples in Wicked Smart SDK 2.2.1.

      I am getting errors when trying to send data via bluetooth from master to slave and vice versa.Attached are files and screenshots for the same.

      The connections I make are as follows

      Master - (Use P2 for CS, P24 for CLK, P4 for MOSI, P25 for MISO, and P14 for FCO)

      Slave - (Use P2 for CS, P3 for CLK, P0 for MOSI, P1 for MISO, and P14 for FCO)

       

      I have also tried enabling the loop back mode but still the data transfer is not successful.The red led's kick off on both master/slave after a unsuccessful transmission I guess.On the master side,I get "Bad Received Length" error message in the trace.

      Any pointers?

       

       

      Thanks

        • 1. Re: SPI examples not working
          MichaelF_56

          Which SPI examples are you referring to?

           

          The sample code provided in the WICED Smart Hardware Interfaces guide

           

          or

           

          The samples provided with the SDK (/WICED-Smart-SDK/Apps/spi_comm_master and /WICED-Smart-SDK/Apps/spi_comm_slave)?

          • 2. Re: SPI examples not working

            I am using the samples provided with the SDK.

            • 3. Re: SPI examples not working

              How are you connecting the two boards?  Last time I checked the P24 and P25 were on the bottom of the tag board without header access.  Has that changed or did you solder wires to get P24 and P25 connected to P3 and P0 on the other board?

               

              I'm not familiar with the application and how it is supposed to work so the scope traces don't make sense to me, but certainly good to have that so you can at least see if your clock is good and if data is going out.  That seems like the best place to start debugging.

               

              Also, I haven't looked at the sample code yet, but will eyeball it later. I have two tag boards but probably won't have time to try it out as it would require significant setup time I think.

              • 4. Re: SPI examples not working

                yes i did solder wires on P24/25 connected to P3/P1 respectively.

                I am able to see clock and data but i get error messages on the master side when sending,ex -  Bad Received Length.

                I tried the continuous data transfer by un-commenting the  SLAVE_TRANSMIT define but it seems the communication is not proper.

                 

                I wish there was a easier way to debug these applications and verify their correctness.