2
\$\begingroup\$

I have an msp430g2553 in its launch pad. I have tried using a baud rate of 19200 with the UART and I get gibberish. From what I have found, something with the launchpad or drivers limits the UART baud rate to 9600. From the datasheets I know that the chip can transmit up to 1MBd, but I can't find anything that tells me how to utilize any transfer rate higher than 9600. What hardware or software do I need to get the msp430 to talk to my computer faster?

P.S. I am using the msp430 to send ADC samples to a C# program on my computer, and that works perfectly at 9600, but I can't make it any faster.

EDIT: "The MSP itself can go as high as 1MBd. It's the USB/ser converter inside the LaunchPad (the so-called Applicaiton UART) that is limited to 9600Bd - its high-speed part is required for the JTAG (debugging) functionality." - source. So how can I set up a USB/Serial connection in place of the launchpad?

\$\endgroup\$
6
  • 2
    \$\begingroup\$ Are you using an external crystal? You will need it for higher baud rates. \$\endgroup\$
    – Renan
    May 25, 2014 at 22:52
  • \$\begingroup\$ I am not using the external crystal, but the data sheet says I can use a number of higher rates than 9600 while running at 1 MHz. I don't need to run it at the max baud rate, just anything higher than 9600. \$\endgroup\$ May 26, 2014 at 1:23
  • \$\begingroup\$ How do you know that the problem is the MSP430 UART rather than the ADC or your computer? How have you isolated the problem? \$\endgroup\$
    – Joe Hass
    May 26, 2014 at 1:35
  • \$\begingroup\$ The ADC is running at 200ksps and I'm using interrupts, so that is plenty fast to use a 19200 baud rate. Using the ti drivers for the msp430 uart, and putty to receive the data, I don't get the right characters from the msp. I spent several hours googling baud rate stuff for the msp430, and a number of places say that either the launchpad or the drivers (I couldn't figure out which for certain) didn't allow anything above 9600Bd. I know the chip can do better because of the datasheets, but I couldn't find any way to implement uart without the standard launchpad and drivers. \$\endgroup\$ May 26, 2014 at 4:53
  • \$\begingroup\$ Did you try the code samples from TI? I assume you have enabled the DCO, along with the 32768Hz crystal. \$\endgroup\$
    – Lior Bilia
    May 26, 2014 at 7:43

2 Answers 2

3
\$\begingroup\$

As you have noted, the Launchpad's USB driver is hard coded for 9600bps. You cannot change it.

So how can I set up a USB/Serial connection in place of the launchpad?

By bypassing the Launchpad's usb serial connection. You need a USB to ~3.3V (3.6 for Launchpad Standard Voltage) TTL Serial adapter.

Just remove the RX and TX jumpers, and connect the MSP430's RX to the Serial Adapter's TX, and MSP430's TX to the Adapter's RX. You can still program & debug the msp430 via the launchpad as all it needs is the SBW and RST jumpers.

Configure the msp430 to match the speed you need. Any standard FTDI or Prolific or Cypress usb-serial ic with the right voltage would work.

\$\endgroup\$
2
  • \$\begingroup\$ Thanks, I figured I needed a serial adapter, but no one anywhere on the internet said what you needed to do with it or what to get, only that the launchpad wouldn't work for faster baud rates. \$\endgroup\$ May 28, 2014 at 2:17
  • \$\begingroup\$ @Marcopolo1613 yea, just remove the RX and TX jumpers, and connect the MSP430's RX to the Serial Adapter's TX, and MSP430's TX to the Adapter's RX. You can still program & debug the msp430 via the launchpad as all it needs is the SBW and RST jumpers. \$\endgroup\$
    – Passerby
    May 28, 2014 at 3:19
0
\$\begingroup\$

You set the baud rate with registers UCA0BR0 and UCA0BR1. Look up in the datasheet which values to set them equal to. Make sure your computer is set to the sane baud rate. You can test with a terminal program like putty.

\$\endgroup\$
4
  • \$\begingroup\$ I have used the recommended values from the datasheets before posting, and I have been using putty to test it. when the baud rate goes above 9600 I get the wrong characters. From what I read the issue has to do with a coded limit on the launchpad or the drivers, not the chip. So I am trying to figure out how I can get above 9600 despite that limit, i.e. hardware or software for better usb-serial communication with an msp430g2553. \$\endgroup\$ May 26, 2014 at 4:58
  • \$\begingroup\$ This is straight from a Texas instruments engineer on their forums: "you can use 1000000 baudrate with 16MHz clock. (UCOS16 = 1, UCBRx =1, UCBRSx=0, UCBRFx=0)." Have you double checked your putty settings? Do you have a scope to see if the data your sending is correct? \$\endgroup\$
    – JBaczuk
    May 26, 2014 at 6:50
  • \$\begingroup\$ When using Putty have you selected the right baud rate? Make sure the same baud rate is selected otherwise u will have wrong data. if it is not working I would suggest you to use the similar software like Tera Term just for the conformation. \$\endgroup\$ May 26, 2014 at 10:05
  • \$\begingroup\$ I have entered the correct baud rate in putty. Also, I am well aware that the chip can reach 1MBd with the 16MHz clock, but does the launchpad (the red circuit board) allow anything higher than 9600? From what I have found on google it does not, though it doesn't make sense why it does that. I'm sort of looking for someone who has a proven and tested example of higher baud rates, and how they did it (i.e. extra hardware, or a software work around). \$\endgroup\$ May 27, 2014 at 16:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.