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 communicating with UART on the MSP430G2553

Other Parts Discussed in Thread: MSP430G2553, MSPWARE

Launchpad: MSP430G2 Rev 1.5

Chip: MSP430G2553

Code Composer: 5.1.1.0031

OS: Windows 7 Ultimate SP1

I have used code composer to turn the leds on and off successfully on the Launchpad.

The USB port appears to be seen correctly as I see "Texas Instruments MSP-FET430UIF" in control panel.  

Recently, I tried the the msp430g2xx3_uscia0_uart_01_9600.c - USCI_A0, 9600 UART Echo ISR, DCO SMCLK example from MSPware in Code Composer.

Using putty as the serial port tool, I have been unable to send/receive data.  It seems like the windows driver or the interface chip on the Launchpad is not working.

How can I figure out why I am unable to communicate with putty to the UART?

Thank you.

  • Do you have a MSP430 Application UART device driver installed?  You should see this in the Device Manager as well as its associated COM port number.

    Usually I just open up HyperTerminal to remove any possible issues.  I guess this may not be available with your particular PC operating system.

    Are you seeing appropriate signaling on the UART TX pin via a scope to verify there is activity?

  • Thank you for the response.

    The "Texas Instruments MSP-FET430UIF" properties show a device function with "MSP430 Application UART (COM4)".

    Does this mean that a UART device driver is installed?

    Unfortunately, HyperTerminal is not installed on Windows 7.  In addition to Putty, I also tried RealTerm with no success.  I also tried a terminal plug-in for eclipse with no success.

    I haven't tried a scope yet.  I was hoping it would not be needed.  I can hunt one down if needed.

    Although I was thinking it was some kind of CSS/windows 7/Launchpad driver problem.

    Note that when I first got the Launchpad(serveral months ago), I had the temperature sense demo working with the windows GUI app that displayed the temperature on the PC; although on an earlier version of Code Composer.  

    Since then I had to re-install Windows 7 and installed the latest version of Code Composer.

    Are there any software tools I can use to help narrow the problem down?

  • I would suggest dividing this problem a bit.  Have you verified the use of putty with another USB-to-serial port adapter to verify the connection there.  I realize this doesn't solve the interaction with the Virtual COM port on the MSP430 Launchpad, but we need to verify each step of the process.

    If the MSP430 Application UART is shown, then yes, the device driver is installed.

    Regarding Code Composer Studio, are you able to connect to the MSP430 target and download the firmware?

  • Hi Ken,

    just my two cents, but if I remember right, newer launchpads (and I think you have one because of the MSP430G2553 which comes with them) you will need the correct jumper stettings for TXD and RXD on jumper J6 (that is the one at the upper side of the pcb - I have no launchpad at reach in the moment, but hope I remember right), they are the left two ones.

    If they are inserted vertically they are good for software uart used by the first generation launchpads and simpler devices without hardware uart. If inserted horizontally they connect the hardware uart to the TUSB UART-USB-Converter.Look at you launchpad documentation, maybe this is what you miss.

    Hope to help ;-)

  • Hi Jan,  

    Thank you. Changing the jumpers fixed the problem.  I did not realize I had to change the jumpers for the UART to work.

    Thank you, to everyone who responded.

  • msp430g2xx3_uscia0_uart_01_9600.c works.

    but msp430g2xx3_uscia0_uart_01_19200.c is not work. putty receives errors

    and msp430g2xx3_uscia0_uart_01_115k.c is not work too. putty receives nothing

  • Chirkin Vladimir said:
    msp430g2xx3_uscia0_uart_01_9600.c works.
    but msp430g2xx3_uscia0_uart_01_19200.c is not work. putty receives errors

    The application UART on the LaunchPad FET is limited to 9600Bd since it is a simulated 'bit-banging' UART on the USB chips I/O ports. It is meant for debugging output and first experiments, not as a reliable serial port.
    The real hardware UART on this chip (which will of course support 115200Bd) goes to the LaunchPads FET.

    if you connect the MSPs RX and TX pins to a full-featured USB/serial chip, 115200Bd are no problem.

  • thank you again. it works with prolific USB2SERIAL adapter at 115200.

  • Note that the G2553 hardware UART has teh RX and TX lines twisted compared to the software UART on the other G series devices. The latest LaunchPad board provides a way to switch the lines by rotatign the RX and TX jumper by 90degrees. The older LaunchPads do not offer this and you must manually cross-wire the RX and TX signals on the jumpe rbridhge between G2553 and the FET part of the LaunchPad.

    Don't forget that the application UART is limited to 9600Bd. Higher baudrates are possible with the 2553 but require a 'real' USB/serial adapter.

  • Changing the jumpers resolves the problem while working on the LaunchPad.  If you tansfer the G2553 to a bread board the hardware UART code that worked  on the Launcpad with horizontal jumpers fails.  Viewing  the  the Lauchpad PCB in the Users Guide reveals  an  obfiscated configuartion to accomdate the horizontal jumper configuration. I am working with REV  1.5. It seems there a fundamental design issue.

  • Changing the jumpers resolves the problem while working on the LaunchPad.  If you tansfer the G2553 to a bread board the hardware UART code that worked  on the Launcpad with horizontal jumpers fails.  Viewing  the  the Lauchpad PCB in the Users Guide reveals  an  obfiscated configuartion to accomdate the horizontal jumper configuration. I am working with REV  1.5. It seems there a fundamental design issue.

     

    PS: I am using a FTDI    C232HM  USB cable.

  • Ken Axtmann said:
    Unfortunately, HyperTerminal is not installed on Windows 7.

    It is just not automatically installed. Same for some other things like the telnet client etc. You can install them from the windows CD through the software tab in the system settings.

    However, HyperTerm won't help you if putty already failed :)

    However, a scope is a must for everyone dealing with microcontrollers. It' sby far the most versatile tool for any hardware-related development (including device drivers). A logic analyzer is a nice add-on. But a scope is a must.

  • Can you tell me the difference between software and hardware UART?
  • A hardware serial port is implemented on the MCU chip itself. A software serial port is created with user written code that manipulates standard I/O

    pins to create the serial port.

  • To extend the previous (correct) answer:

    An UART (Universal Asynchronous Receiver Transmitter) Takes a byte, precedes it with a start bit, adds one or two stop bits and optionally a parity bit and sends this out serially with a certain signal time per bit. It also receives incoming signals, strips the start and stop bits, checks the parity bit (if applicable) and gives a received byte as result.

    This can be done in software by manually calculating all the bit manipulations, sending the signal using GPIO or timer PWM hardware and receiving through GPIO or port interrupts or timer capture .
    Alternatively, there is a hardware module that, after configuring the timing and protocol parameters, takes a byte and sends it or receives a byte and presents it when done, while the CPU can do other things in the meantime.

    A Hardware UART can be combined with DMA to send or receive blocks of data without any CPU activity.

    There are different UART variants available for different MSPs, starting with the USART (which also supports SPI and in some implementations I2C serial connections too) and ending with the eUSCI, which also supports SPI and I2C, evne in parallel with an UART transmission.
    But not all MSPs do have one of the hardware UARTs included. In these cases, you'll need a software UART.

    In addition, the BootStrap Loader (BSL) uses a software UART, because it does not know about the device's clock frequencies and therefore has to determine its timing from the baudrate of an incoming sync byte.

**Attention** This is a public forum