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.

Why doesn't the receiving device recognize UART transmissions ?

I am trying to get an Intel Galileo to run Node.js and serialPort.js to collect data being sent from an MSP430 Launch pad (Arduino based board). When I run the code on the Galileo the "Port Open" message is printed so I know the 'open' state has been reached in serialPort but it just wont ever use the data function.

Here is the code on the MSP430 which sets up and transmits data:

//UART configuration settings
UCA0CTL1 &= UCSWRST; //Reset UART control register
UCA0CTL1 = UCSSEL_2 + UCMSB; //UART timer input MCLK, enable MSB sent first
//Defaults: Parity disabled, 8 bit data, one stop bit, UART mode, asyncronous
UCA0BR0 = 0x68; //1MHz 9600 baud
UCA0BR1 = 0x00; //1MHz 9600 baud
UCA0MCTL = UCBRS0; //Modulation UCBRSx = 1
UCA0CTL1 &= ~UCSWRST; //Enable the USCI peripheral (take it out of reset)

Here is the pair of functions which are used to transmit the data:

void uartCHAR(int txChar)
{

while (!(IFG2 & UCA0TXIFG)); //Wait for the transmit buffer to be ready
UCA0TXBUF = (char)txChar; //Put integer value in to UART transmit buffer in character format

}

void uartTransmit(int tx)
{
P1OUT |= REDLED; //Turn on Red LED
unsigned int byteSelect = 0xFF00; //Declare value used to isolate each byte
unsigned int byteHold = 0; //Declare varible to hold isolated byte
unsigned char sendByte = 0; //Declare a variable to hold the byte to be transmitted
int k; //Declare a variable to be used in the for loop
for (k = 1; k>=0 ; k--) //Cycle through the code twice
{

byteHold = byteSelect&tx; //Isoltate each section of 8 bits in the and store in byteHold
byteHold >>= (8*(k)); //Shift the data down to the lowest byte position
sendByte = byteHold;
uartCHAR(sendByte); //Pass sendByte in to the uartCHAR function
byteHold = 0;
byteSelect>>=8; //Shift the byte selector to the next section of 8 bits
}
P1OUT &= ~REDLED; //Turn off Red LED
uartCHAR('\n'); //Send symbol to indicate to the parser that the end of the message has arrived
}

If someone could point out if I am doing anything wrong I would really appreciate it. I am not getting any output to the screen when it is running. I know that if I had mismatch baud rates then I would get a strange output but there is no output whatsoever so I cant examine and fix it.

**Attention** This is a public forum