Quantcast
Channel: MSP low-power microcontroller forum - Recent Threads
Viewing all articles
Browse latest Browse all 21951

MSP430FR5994: SPI communication with MSP430FG4618

$
0
0

Part Number:MSP430FR5994

Good morning,

I'm implementing a 3-wire SPI communiation between MSP430FR5994, selected as the master, and MSP430FG4618, selected as the slave.

The communication is made between USCIA3 of the master and USART (set as SPI) of the slave.

I set the desired port configuration based on the example codes found on TI website.

When I try to send data from MSP430FR5994 to MSP430FG4618, I can't see anything on the output line using an oscilloscope , even if the code is running (I can see the correct value saved in buffer UCA3TXBUF).

Here there is the communication that I implemented for the master:

// SPI initialization
UCA3CTLW0 |= UCSWRST;                                                                     // **Put state machine in reset**
UCA3CTLW0|= UCMST__MASTER | UCSYNC | UCCKPL | UCMSB ; // 3-pin, 8-bit SPI master, Clock polarity high, MSB
 
UCA3CTLW0 |= UCSSEL__SMCLK;                                                       // SMCLK
UCA3BRW |= 0x0341;                                                                              // /833

UCA3CTLW0 &= ~UCSWRST;                                                                // **Initialize USCI state machine**

and for the slave:

U1CTL |= CHAR+SYNC+SWRST;                                                       // 8-bit, SPI, Slave
U1TCTL |= CKPL+STC;                                                                        // Polarity, UCLK, 3-wire
ME2 |= USPIE1;                                                                                    // Module enable
U1CTL &= ~SWRST;                                                                             // SPI enable


Viewing all articles
Browse latest Browse all 21951

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>