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.

Max baud rate for USCI_A UART?

Other Parts Discussed in Thread: MAX3232

Hello

I have a small program for the Launchpad G2553 which sends data over the Launchpad's USB serial connection.  When I configure it to run at 9600 baud via the onboard RXD/TXD pins it works.  However, when I try to increase the speed to 115200 baud, I just get a few garbage characters on the serial terminal software on my PC.

My guess is that it is too fast of a baud rate for a board w/o a crystal.  Is this true, and if so what is the maximum non-crystal baud rate I could use?  Also does anyone have a code sample of a setup for 115200 with and without a crystal?  Below is what I am using on my Launchpad... I got it from the "MSP430G2xx3 Code Examples" zip file download from TI.

Thanks

Matt

/* Clock setup */
WDTCTL = WDTPW | WDTHOLD;	// Stop WDT
BCSCTL1 = CALBC1_1MHZ;		// Run at 1 MHz
DCOCTL = CALDCO_1MHZ;		// Run at 1 MHz

/* USCI setup */
P1SEL = BIT1 + BIT2;		// Set pin modes to USCI_A0
P1SEL2 = BIT1 + BIT2;		// Set pin modes to USCI_A0
P1DIR |= BIT2;			// Set 1.2 to output
UCA0CTL1 |= UCSSEL_2;		// USCI_A use SMCLK
UCA0BR0 = 8;			// 1 MHz -> 115200
UCA0BR1 = 0;			// 1 MHz -> 115200
UCA0MCTL = UCBRS2 + UCBRS0;	// Modulation UCBRSx = 5
UCA0CTL1 &= ~UCSWRST;		// **Initialize USCI state machine**
IE2 |= UCA0RXIE;		// Enable USCI_A0 RX interrupt
  • Matthew Cashdollar said:

    Hello

    When I configure it to run at 9600 baud via the onboard RXD/TXD pins it works.  However, when I try to increase the speed to 115200 baud, I just get a few garbage characters on the serial terminal software on my PC.

    While I have never tested it, I have read that the USB chip on the launchpad limits the baud rate to 9600. So 9600 is the max UART baud rate over USB you can achieve with the Launchpad.

  • Alan said:
    While I have never tested it, I have read that the USB chip on the launchpad limits the baud rate to 9600. So 9600 is the max UART baud rate over USB you can achieve with the Launchpad.

    Indeed (while the real limit may be a bit higher - it's a software UART in teh USB bridge chip - its real hardware UART is used for the connection to the FET).

    With a separate USB/serial converter attached to the TX and RX pins of the LaunchPad (pull the jumpers between MSP and FET), the maximum MSP baudrate is 1MBd. Personally, I never used more than 115200 - partly because my PCs serial port didn't support more :)
    If you go this way, be sure that the USB/serial converter has 3.3V compatible output signals, else it will overload the MSP with 5V or (worse) with RS232 signals (+-12V), in which case you'll need a level shifter such as MAX3232.

  • I was actually just using the launchpad interface for testing that I had the USCI settings correct.  The real interface is going to be with a bluetooth device and I am working on that now.

    Thanks for the help guys.

**Attention** This is a public forum