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.

Problem UART MSP430AFE253

Other Parts Discussed in Thread: MSP430AFE253, TUSB3410

Hi All,

I have code:

#include "msp430.h"

volatile unsigned char tx = 'A';

void main(void)
{
volatile unsigned int i;

WDTCTL = WDTPW + WDTHOLD; // Stop WDT
P1DIR |= BIT3 + BIT4;
P1SEL |= BIT3+BIT4; // P1.3,1.4 = USART0 TXD/RXD
IFG1 &= ~OFIFG;
__delay_cycles(1000);
while ((IFG1 & OFIFG)); // OSCFault flag still set?

ME1 |= UTXE0 + URXE0; // Enable USART0 TXD/RXD
U0CTL |= CHAR; // 8-bit character
U0TCTL |= SSEL1; // UCLK= SMCLK
U0BR0 = 0x6D; // 1MHz 115200
U0BR1 = 0x00; // 1MHz 115200
U0MCTL = 0x44; // 1MHz 115200 modulation
U0CTL &= ~SWRST; // Initialize USART state machine
IE1 |= URXIE0; // Enable USART0 RX interrupt


__bis_SR_register(LPM0_bits + GIE); // Enter LPM0 w/ interrupt

}


#pragma vector=USART0RX_VECTOR
__interrupt void USART0_RX (void)

{
while (!(IFG1 & UTXIFG0)); // USART0 TX buffer ready?
//__delay_cycles(1000);
TXBUF0 = tx; // RXBUF0 to TXBUF0

}

When I send char form Hercules, I recive A{FF}.

What happen with my code?

I use TUSB3410 to interface with msp430afe253

Thank you so much

**Attention** This is a public forum