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.

UART serial comm issues

Other Parts Discussed in Thread: MAX232

Currently messing with the Stellaris Launchpad for LM4F120H5QR.  I seem to not see the expected characters on a service terminal that which I am sending out via the UARTCharPut command.  The virtual serial port via the USB (port 0) appears to show the characters correctly for does not for all other UARTs.  See below for the characters that I send out but then actually see on the service terminal.  Just as a FYI, by service terminal settings are 38400 8-N-1.  I would be happy to just stay with the virtual serial port, but need to set up an external UART for communications.  I am not sure if it might be due to the muxing on the pins or what not, but it seems to be an offset sort of algorithm for what I am seeing.  The same is true in reading characters from the serial port as they are not what is expected when stopping and seeing code.  My next step is to put a scope on it, but wanted to see if anyone else has seen this.

My current connection to UART3 is simply just connecting my Rx line to PC6 and my Tx line to PC7 header pin on the Launchpad board.  I get the same issues when connecting directly to the Rx0 and Tx0 pads on the board and attempting same test with UART0.  Please note the below samples are writing characters A through H and 1 through 7.  Also note that if I enter the same characters on the service terminal to be picked up by the sample UART code, that I see the same values (i.e. enter a C and see the incoming character as the ^).  Do I have a settings issue some where possibly?

Outgoing Char - Seen on Service Terminal: A - _, B - /, C - ^, D - ↕, E - ], F - ., G - \, H - <return>, 1 - g, 2 - 3, 3 - f, 4 - ↓, 5 - e, 6 - 2, 7 - d

 

  • Can you describe the interface to your service terminal that you are using?  i.e., what is the service terminal?  Is there data translation to RS-232 or something going on somewhere in your system?  Are the power rails compatible between the two ends?  How are your ground connections? 

    Have you connected other devices successfully to your service terminal?

    That information will help in the debugging. 

    Dustin

  • Have you used an oscilloscope to verify what baud rate you are actually getting on the line?

     

  • Hi,

    You can review this post - very useful.

    Petrei

  • I'd get an ASCII chart - there may well be a "fixed offset" between your "desired" and "actual" characters.  Once such offset is identified - problem is substantially eased.

    Always in question in UART Commo - is the distant device transmitting or receiving RS232 or CMOS levels?  Plus/Minus 12-15V RS232 levels likely will make short work of unprotected/limited MCU Uart pins.  And - along with "killing" those pins - the offending data will be inverted as well! 

    As always - basics/fundamentals - "Connect and Pray" somewhat less productive than "Review/Probe - only then Connect!"  (if signal levels matched/proper)

    Also possible (another dagger awaiting) - Parity and 7 or 8 Data Bits may be in play.  (rarely 2 Stop Bits) 

    Somewhere - dog-ear'ed, beer-stained/sealed Service Terminal Manual awaits your review...

  • My serial connection essentially takes a serial cable with one end cut off and then have the wires broken out and connected to ground, Tx and Rx points on the Launchpad.  As for the service terminal used, I have tried using both Hyperterminal and TeraTerm.  As originally stated, when I connect via the virtual port (via USB), the characters come through just fine as expected.  I am going through an Edgeport with my serial connection, which typically is not an issue but will try directly to COM1 on my PC to be sure.

  • Hello Petrei.  I had reviewed the noted post before making my post.  I try to always read through other posts before asking for help.  The difference with my post compared to the one you mentioned, is that I am actually seeing activity on the serial port where it simply is not what I am expecting on the other end.  If you have further suggestions, please let me know.

  • Yes, the scope was my next step before asking for help on the forum.  As I can see board voltages and such, the downloaded software and board tend to freeze up on me at times when the scope is connected and thus causing futher angst.  I continue to utilize this as I want to see what the Launchpad is actually sending out before being interpreted by my PC and service terminal.  If I see unexpected data coming off the board, what then?  Something must be changing the data before it is sent then.

  • Hi James,

    From your previous posts I can conclude you need to use an interface adapter like MAX232 between Launchpad and PC - this is needed to adapt the levels for the PC. Only UART0 can be used without since it is managed by ICDI; all others UARTs need this interface circuit. 

    Petrei

  • I concur.  That was my original guess, which is why I asked for details about the connection.  There is a big difference between UART and a PC serial port that is using RS232.

    Dustin

  • Yes, after connecting up a transceiver to convert the TTL signal to 232 or 485, the expected characters were seen on the service terminal.  Thanks for input(s) and comment(s) related to this topic.  Forgive me thinking that the UART would be a direct translation for the Tx and Rx lines.

  • Nothing to forgive.  I have done the same thing before, and I am sure many others have as well.  Glad you got it fixed.

  • cb1- said:
    Always in question in UART Commo - is the distant device transmitting or receiving RS232 or CMOS levels?

    Pardon - this post was first to note - and correctly identify your issue.   (Mar 11 23:48 p.m. - seems to deserve some credit...)

    Update: protest here unwarranted - reread indeed shows that Dustin was first to so identify.   (now must remove tears from aged keyboard...)