We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

AR# 16632

3.1 EDK OPB_UART - I use opb_uartlite (or uart16450/550) as STDOUT, but unexpected characters appear when I use the "printf" function


General Description:

When I set opb_uartlite (or uart16450/550) as STDOUT, strange characters appear on my terminal when I use the "printf" function.


In most cases, this is a board-specific issue that depends on the layout of the DB9 Connector. Please consult the schematics from your board vendor.

Some boards with this problem have RTS_n connected to the FPGA. In this case, you must ensure that the FPGA is driving the RTS_n signal properly (if the flow control is set to "None").

Solution 1

You can tie the RTS_n signal to a value (depending on the polarity of your RS232 device on the board) either in the UCF or the MHS file. You can use this method with both the OPB UART Lite and the UART 16450/550. For example, with UART Lite, you can use this method as follows:

# Define Global ports

PORT rts_n = net_gnd, DIR = OUTPUT # Memec-2vp4 board

Solution 2

For OPB(PLB) UART 16450/550, you can drive the RTS_n bit from this core, and set the RTS bit in the Modem Control Register in your application software as follows:

"1" -> Drives RTSN Low

"0" -> Drives RTSN High

UART Lite does not have this interface/register.

Please refer to "Processor IP Reference Guide" in your EDK documentation, and be sure to consult the schematics from your board vendor to determine the appropriate polarity.

AR# 16632
Date Created 09/03/2007
Last Updated 12/15/2012
Status Active
Type General Article