This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

SPI Daisy Chain

Hi folks,

So I'm developing a project which requires me to have SPI as the communication Protocol. I'll be having multiple slaves which can be increased from a minimum of 16 slaves to an N number. The slave code has to be versatile in a way that I don't need to tell the slaves how many of them are connected in the link. As a result, I have opted to use an SPI daisy chain so that I can have SDO (Serial Out) of slave 1 connected to SDI (Serial In) of slave 2, SDO of slave 2 to SDI of slave 3, and so on. 

Currently, I'm using PIC boards as master and slaves since only those were available currently. Before shifting to ARM I was searching the internet for documents regarding SPI daisy chain on ARM but didn't find any hence writing this.

As per the theory read on the internet of SPI daisy chain it's said "The data will shift from 1 salve to another until the enable line is held low ", as per this theory it's expected that I'll transfer out say 10 bytes on data for 2 salves (5 bytes for each slave) and once the enable is high slave 1 will have 5 bytes and slave 2 will have 5 bytes. So it was expected that spi will take care to copy the data from RX to tx until the enable is held low, but in the case of PIC, it is not happening. So after a lot of effort, we are now exploring options of Microcontroller where the bytes are shifted out and from RX to tx and we just need to work on the last bytes after the enable is made high again after the master transfers the packets it needs to.

I have currently planning to shift to LPC2148 since I have an Eval board for this one only.

Can anyone help in understanding the Shift registers of the ARM family so that I can have proper guidance before putting efforts and then getting the same results as I'm getting in PIC.

This is what I'm currently getting on logic analyzer. Both the salves are only sending out the 5 bytes which were already present in the write buffers, after those are shifted out it just sends out ''0". I'm expecting that it will send out the 5 bytes it received previously.

Parents
  • The SPI peripherals are not designed by Arm. So you need to check with the manufacturer of the SPI devices/microcontroller peripherals you use if they support SPI Daisychain. And if they do, check the related device manuals for related details.

Reply
  • The SPI peripherals are not designed by Arm. So you need to check with the manufacturer of the SPI devices/microcontroller peripherals you use if they support SPI Daisychain. And if they do, check the related device manuals for related details.

Children
No data