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.

SPI operation on 430G2553

Hi,

I am trying to establish SPI comm between two launch pads with 430G2553. Connected  as master-slave by 3+Rst wires and powered slave from master by Vcc-Gnd, in IAR environment. Only master is in debug mode.

Used the example program example msp430g2xx3_uscia0_spi_09.c, and 10.c (D.Dang), which has two parts Master, Slave in the two uCs.

The example seems strange as it sends first character from the main program and all others from inside the ISR. This creates an infinite loop...!?? It works as the data is serial  numbers and no limits, it goes on until you stop it.

However, I tried to send a  Char array, 6 to 8 char,  from Master to slave, but no second char sent from inside the ISR. Not even the first Char gets through...!  It does not work. All received Cars are stored in local master's flash after being read.. Received nothing.

Next I tried the first char from the main and remaining from inside the ISR with increasing array index i++. It works and goes into infinite loop. My local flash fills up quickly.

Question: Is there a good simple example which demos an array transfer from Master to slave / vice versa....?

Thanks

IR

  • I don’t know the demo code, nor do I know your code.
    I guess you’re talking about the slave part. Since the data isn’t sent until the master sends a clock, It makes sense to fill a byte into TXBUF right after activating the USCI. You may use the ISR to do so, or do it manually, before activating the interrupts (which is faster, and this might be critical if you are slave).

    Just a guess. For further analysis, it is necessary to know your code.

    Also, the forum is full of threads regarding SPI transfers. Including code snippets. Just use the search function. It’s not only for decoration.

**Attention** This is a public forum