UART to RS232

Hi :sweat_smile: I am looking for 3 unit of UART to RS232 converter for the DigiConnect core 6+. The RS232 port would be use to connect to any industrial devices with RS232. Can someone give me recommendation?

Thanks

simon

I like this TTL to RS-232 adaptor:
https://www.digikey.com/short/2bz9tqfd

Hi Paul:
Thank you for the suggestion. I came across this, it work with 3.3 & 5V . May I know are all the pins need to wire up? My program work on linux PC (with 3 RS232 directly connected to 3 devices). Of course I need to change the port number for the SBC (I believe it should match as “/dev/ttys1” , “/dev/tty3”, “/dev/tty5”).

Here are the text from Digi Manual

The ConnectCore 6 SBC provides access to three UART interfaces on a 14-pin, 1.25mm pitch UART
expansion connector. This connector provides access to the following interfaces:
n UART1: 4 wire, RS-232 level UART —> not ttL? Can I connect directly or do the adapter work?
n UART3: 4 wire, RS-232 level UART ----> not ttL? Can I connect directly or do the adapter work?
n UART5: 4 wire, TTL UART shared with XBee interface

These three UART interfaces have software flow control lines (RTS and CTS). UART1 and UART3 have
RS-232 levels and they are configured in DTE mode (CTS input and RTS output). The UART5 interface
has TTL levels and it is configured in DCE mode (CTS output and RTS input).

The terms as confusing.

Regars

Simon

Hi @simon.ongsk UART1 and UART3 on this connector do not need level shifting for RS-232.

ConnectCore® for i.MX6 SBC Hardware Reference Manual.pdf (97.0 KB)

Since UART5 is shared with the XBEE interface it has TTL levels.

Regards,

Hi @RobertCNelson
Good to hear from you again :laughing: I have the manual.
I have a simple Qt program running on Linux using /dev/ttyS0 which i cross compile with /dev/tty1 (i presume UART1 as tty1). it does not communicate at all. Do DTE Mode & DCE Mode affect the communication? As I need all 3 ports behave just like “Standard” RS232.

UART 1 and UART 3 should be able to use directly with any devices? Do I need to connect RTS and CTS? I had tried only 3 wire connection (RX,TX and GND) with Utek UT-2216 RS232 to RS485 Active Serial Interface converter by using “/dev/tty1”.

As for UART 5, I will purchase the recommended unit (all 6 lines required ?)

Any Idea as I am not using flow control.

Regards

Simon

PS: Thanks for all the help. I hope all this will work out then I may proceed to purchase Digi SBC for Production from DigiKey.

/dev/tty1 would be a virtual terminal for the screen… The other usart should be /dev/ttyS1 and /dev/ttyS3 what version of Digi’s SDK are you using?

Regards,

Hi @RobertCNelson :grinning: My BAD !!! I should not based on the file name under /dev ! :rofl: I should use dmseg | grep tty…that will show the available TTY ! Now both UART_1 & 3 work perfectly!

1 Like

@RobertCNelson
Can I ask you one more question? It is related to UART_5. I know you are well verse with device tree.

here is the link.

https://www.digi.com/resources/documentation/digidocs/embedded/dey/2.6/cc6ul/bsp_r_uart_6ul

I think U_ART5 can be modified as RS485.

/* UART2 */
&uart2 {
	/* RTS/CTS lines multiplexed with CAN2 */
	pinctrl-0 = <&pinctrl_uart2_4wires>;
	uart-has-rtscts;
	linux,rs485-enabled-at-boot-time;
	rs485-rts-active-high;
	rs485-rx-during-tx;
	rs485-rts-delay = <1 1>;
	status = "okay";
};

Am I right, I read some where in order for the device tree to work after modification. It need to recompile?

Do you have a step by step process to modify the device tree and loaded back to the board?

If I am able to modify it and use as RS485, they will be some cost saving by not adding a RS232 to RS485 converter.

What do you think?

Regards

Simon

Careful, that link is the 6ul… You are on a 6 plus:

https://www.digi.com/resources/documentation/digidocs/embedded/dey/2.6/cc6plus/bsp_r_uart_cc6cc6qp

Any device tree changes will require a rebuild of the device tree files, but not a full rebuild of everything…

PS, i need to look at the 6+ install scripts, on the 8M i utilized the “run install_linux_fw_sd” script in u-boot to do that…

Regards,

@RobertCNelson I used the same script to install, but mostly with updated Yocto. I have no idea where and how to modify the Device tree…man … what a journey for me. I am using ConnectCore 6+ Development Kits.

But how and where to change the Device Tree?

Regards

Simon