SPI examples not working

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

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

0 Likes
4 Replies
MichaelF_56
Moderator
Moderator
Moderator
250 sign-ins 25 comments on blog 10 comments on blog

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)?

Anonymous
Not applicable

I am using the samples provided with the SDK.

Anonymous
Not applicable

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.

Anonymous
Not applicable

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.

0 Likes