AnsweredAssumed Answered

SPIH as a slave in SpiMasterSlaveTest?

Question asked by amf on Jul 29, 2015
Latest reply on Jul 31, 2015 by emoloney

Hello,

   I have been able to successfully send data from one eval board to another using the SpiMasterSlaveTest example.  In the SpiMasterSlaveTest example, the master board sets up SPI1 as the SPI master.  The slave board sets up SPI0 as the SPI slave.  I left the bit rate alone (i.e. I didn't change it from the original 10 kHz bit rate).  However, I did reduce the BUFFERSIZE (the number of bytes sent) from 250 to 26, just to make it easier to see things on a scope.  

 

   Now, I've modified the program in one more step, along with the inter-board connections, so that the master board remains using SPI1 as the SPI master, but the slave board now uses SPIH as the SPI slave.  I'm thinking this should be the easiest next-first-best step on the longer road to eventually bringing up a high-speed data connection to Labview.  That is, all I'm doing is changing the slave from using SPI0 to using SPIH.  There's just a one-character change in the code, as you can see on the attached first slide.  However, it seems as though the slave's SPIH never recognizes receiving any bytes from the master ... much less sending anything back on its MISO line.

 

   My guess is that for some reason, the slave doesn't appreciate that it is getting sent this 10 kHz SCLK by the master, and so therefore it doesn't clock anything into its SPIH receive buffer.  (What do you think of this theory?)  You can see the SPIH registers in the attached slides.

 

   What am I missing that I need to set up on the slave to get it to understand to use SPIH instead of SPI0?

Outcomes