This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430F5342: Problem with SPI Master-Slave communication

Part Number: MSP430F5342

I have an application using Atmel SAM3X8E controller. It has single MOSI, MISO and SCLK lines and four separate Chip Select lines for SPI. As I needed to connect total 7 slaves, I expanded the chip select lines using a Demux as shown in attached figure. One of My slave is having MSP430F5432 controller which is working in slave mode (SPIB0). Another SPI of MSP430 (SPIB1) is used to communicate with an ADC. I was able to test the SPI Master slave communication between Atmel controller and MSP430 while all other slaves are disabled. But when other slaves are connected/enabled, I am unable to establish proper communication with Atmel and MSP430. Moreover, the touch function of the display is also not working. But when the MSP430 device is removed, the touch is found to be responsive and it automatically goes to the page as a result of prev. touch that is done before removing the MSP device. It is to be noted that, Atmel controller was able to communicate properly with all its slaves before connecting MSP430 Device.

We also have an option to bypass the MSP430 controller and communicate directly with ADC of the slave, then also it was found the communication between master and all the slaves are found to be working properly (including the touch).

Can you please provide some possible reasons for the issues mentioned above?

Thanks in Advance.

 

  • Hey Arun,

    Thanks for the diagram. This is very helpful in trying to solve the issue. I do have a couple things I'd like to get some clarification on:

    Arun Krishnan said:
    I was able to test the SPI Master slave communication between Atmel controller and MSP430 while all other slaves are disabled.

    Are you saying you tested communication between Atmel controller and ALL MSP430s (Slave 5, slave 6, and slave 7) while slaves 1, 2, 3, and 4 were disabled? Or you tested communication between Atmel controller and only 1 MSP430 device while the other 6 slaves were disabled?

    Arun Krishnan said:
    But when other slaves are connected/enabled, I am unable to establish proper communication with Atmel and MSP430.

    Specifically which slaves are "connected/enabled"?

    Arun Krishnan said:
    But when the MSP430 device is removed, the touch is found to be responsive and it automatically goes to the page as a result of prev. touch that is done before removing the MSP device. It is to be noted that, Atmel controller was able to communicate properly with all its slaves before connecting MSP430 Device.

    Can you clarify if only 1 or all 3 MSP430 devices were removed and connected?

    Thanks!

    -Mitch

  • Hey Arun,

    I wanted to check in and see if there were any updates?

    Thanks!

    -Mitch
  • Hey Mitch,

    Sorry fort he delay in the reply.

    I have tested the the communication between Slave 5 and Atmel controller while slave 1,2,3,4 were disabled. As you said, I tested the communication between Atmel controller and only 1 MSP device. Slave 6 and 7 were disconnected.

    Which SPI mode I should select in MSP - 3 wire or 4 wire? I was using 3 wire mode with GPIO interrupt for SPI communication. When CS becomes low , GPIO interrupt will be enabled and I will read the SPI Rx Buffer.

    Thanks,

    Arun

  • Hi Arun,

    Sorry for the delayed reply.

    You mention that your CS signal triggers GPIO interrupts for the slave devices that read the SPI RX buffer. Does this mean that SPI is enabled on all MSP slaves even while CS is false? If so, the other slaves may still be "listening" on the SPI line even though the CS signal is false (because you are using 3 wire mode).  

    2 things that would be worth trying:

    1. If you want to stick with 3 wire mode, make sure to enable the SPI peripheral only when the CS signal is true. This can be handled within the interrupt.

    2. Switch to 4 wire SPI mode and route your CS signal to the UCxSTE pin instead of the GPIO. This will ensure that only 1 slave device is actively in SPI mode at a time.

    Please let me know if either of these approaches fixes the issue.

    Thanks,

    Mitch

  • Hi Mitch,

    Whats the harm if the other slaves continue "listening" on the SPI line ? As long as they are not sending anything, Is it ok?

    Update 2: I have switched to 4 wire mode and now Atmel is able to receive the data from all 4 MSP430 slaves.

    Thanks for your help

**Attention** This is a public forum