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 High baud rates

Other Parts Discussed in Thread: MAX3232

Hello,

 I am using TM4C129X DK. and tirtos_tivac_2_10_01_38.while i am trying uartecho_TivaTM4C129XNCZAD sample i could receive 1k byte binary file at 9600 and 115200 bps baud rates through UART_0 but when i tried to raise up that baud rate to 256000 bps i received rubbish data !!

Thank you

Regards

Ahmed

  • Hi Ahmed,

    How are you configuring the baud rate to be that value?
    To what are you connecting the MCU? Is it set with the correct baud rate also?
  • Ahmed Mokhtar said:
    While...using uartecho_TivaTM4C129XNCZAD ... I could receive 1k byte binary file at 9600 and 115200 bps baud rates through UART_0 but (when raised to) 256000 bps i received rubbish data !!

    Is that "echo" feature ideal for testing at so high a baud rate?

    Uart_0 is processed/converted thru an ICDI MCU - which may limit such transactions - unless you've directly connected UART_0 to a compatible (speed/type) UART Port at your remote device.  (assumed to be a PC)   That ICDI MCU serves as a "convenience" - may not be noted (nor intended) as, "speed-demon!"

    Any "real test" of an MCU peripheral would employ SW appropriate to the test - and would not force (potentially) limiting "other devices" w/in the connection path...

  • Hello Ahmed

    More important what is the source of UART Clock and what is the System Clock Frequency

    Regards
    Amit
  • Hello,

    The system clock frequency which is also used as the source of UART clock is 120,000,000 .

    -The high rates work fine through the stellaris virtula serial port on the TM4C129x DK but when is use my custom board and try to receive 1k bytes through null modem RS232 cable i receive rubbish data inspite of working fine at 115200 bps and lower rates.

    thanks

    Regards
    Ahmed

  • Ahmed Mokhtar said:
    through null modem RS232 cable i receive rubbish data inspite of working fine at 115200 bps and lower rates

    Perhaps the RS232 interface on your computer (or is it a USB converter cable?) can't handle anything more than 115200. And even if the UART controller (on your computer/cable) could handle it, the transceiver might not. Or maybe the RS232 tranceiver on your custom board.

  • Make this vote #2 for Veikko's identification of the (likely) limitation imposed on speed by the RS232 level shifter.   Most have "graduated" to small cap. charge-pump methods to raise voltage - often those are "speed cops" - thus limit data rates.

    Check of the level shifter's spec should reveal AND scope at the output of the shifter likely will reveal the "purity" of data.

    For completeness - you should confirm the proper operation of your "remote" system at that high speed.  (independent of your custom board)

  • And a vote #3.

    For e.g. MAX3232 has a Maximu data rate of 250 kbit/sec at specified load condition.

    Regards
    Amit
  • Agreed with cb1 and Veikko.  Also note that the baud rate error generally rises with speed and PC serial ports generally top out at 115k especially if they faithfully emulate the original serial ports. In fact the highest PC bauds rates are specifically chosen based on the UART crystals of the original PCs to minimize the error on the PC which is why they deviate from the standard baud frequency progression.

    Robert

  • Appears now (w/4 votes) that it's time to "splash green" upon Veikko's (correct) diagnosis.

    As noted - scope at either side of the RS232 level shifter should confirm signal distortion.

    Past method to best measure "bit times" was the transmission of 0x55 or 0xAA - both yield alternating bit pattern - ideal for observation and measurement...