Why does my program get stuck at the line: spiffyd_rxData(SPIFFYD_2, 1 ,&byteReceived); when I set the spiffyd_configure() clock speed to 0?

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

cross mob
PhRi_4317641
Level 1
Level 1
First question asked First reply posted

I want my BCM20737 chip to be the slave, and an FPGA on my PC board to be the master. I'm trying to send data over SPI from the FPGA to the BCM20737 chip. When I set the spiffyd_configure() clock speed to a value other than 0, I get the data (when running the spiffyd_rxData function): 0x96, then it switches to 0x3b once i send data from FPGA to BCM20737 over SPI. Is 0x96 the default data stored? Any ideas why the code gets frozen at the line: spiffyd_rxData(SPIFFYD_2, 1 ,&byteReceived); when I configure the clock speed to 0 (I think i'm supposed to configure the clock speed to 0 when I want the BCM20737 to be the slave)?

Thank you very much for the help.

0 Likes
1 Solution
AnjanaM_61
Moderator
Moderator
Moderator
5 comments on KBA First comment on KBA 5 questions asked

Hi,

Yes, clock speed parameter should set to 0 for SPI slave.
1. Could you please check with spi_comm_slave example available in WICED SMART ( WICED-Smart-SDK/Apps/spi_comm_slave ) ? Did you test it? Are you facing this issue there?

2. Please probe and check SPI master lines to check if the clock and commands are coming correctly to confirm the master is working

3. Please change the SPI pins and try

4.

Reference:

Please go through the below docs for SPI usage restrictions

- WICED Smart Hardware Interfaces

WICED Smart User's Guide

Thanks ,
Anjana

View solution in original post

3 Replies
AnjanaM_61
Moderator
Moderator
Moderator
5 comments on KBA First comment on KBA 5 questions asked

Hi,

Yes, clock speed parameter should set to 0 for SPI slave.
1. Could you please check with spi_comm_slave example available in WICED SMART ( WICED-Smart-SDK/Apps/spi_comm_slave ) ? Did you test it? Are you facing this issue there?

2. Please probe and check SPI master lines to check if the clock and commands are coming correctly to confirm the master is working

3. Please change the SPI pins and try

4.

Reference:

Please go through the below docs for SPI usage restrictions

- WICED Smart Hardware Interfaces

WICED Smart User's Guide

Thanks ,
Anjana

Thanks for the reply. I was able to get the spi data using: spiffyd_slaveRxData(SPIFFYD_2, 15 ,&bytes[0]);

Not sure why the spiffyd_rxData function doesn't work, but at least spi works with the other function!

0 Likes

Hi,

Thanks for the confirmation.

As per checking with software team, one is master mode RX and the other is slave mode RX.

Regards,

Anjana

0 Likes