<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://ess-wiki.advantech.com.tw/wiki/index.php?action=history&amp;feed=atom&amp;title=How_to_use_UART_RK3576</id>
		<title>How to use UART RK3576 - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://ess-wiki.advantech.com.tw/wiki/index.php?action=history&amp;feed=atom&amp;title=How_to_use_UART_RK3576"/>
		<link rel="alternate" type="text/html" href="https://ess-wiki.advantech.com.tw/wiki/index.php?title=How_to_use_UART_RK3576&amp;action=history"/>
		<updated>2026-05-02T21:11:48Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.28.3</generator>

	<entry>
		<id>https://ess-wiki.advantech.com.tw/wiki/index.php?title=How_to_use_UART_RK3576&amp;diff=40901&amp;oldid=prev</id>
		<title>Yunjin.jiang: Created page with &quot; = '''Overview''' =  &lt;font color=&quot;#000000&quot;&gt;The Android/Linux UART/serial port access from user is through the tty-devices. The tty-devices have different names depending on UA...&quot;</title>
		<link rel="alternate" type="text/html" href="https://ess-wiki.advantech.com.tw/wiki/index.php?title=How_to_use_UART_RK3576&amp;diff=40901&amp;oldid=prev"/>
				<updated>2025-09-24T05:58:34Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot; = &amp;#039;&amp;#039;&amp;#039;Overview&amp;#039;&amp;#039;&amp;#039; =  &amp;lt;font color=&amp;quot;#000000&amp;quot;&amp;gt;The Android/Linux UART/serial port access from user is through the tty-devices. The tty-devices have different names depending on UA...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
= '''Overview''' =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;#000000&amp;quot;&amp;gt;The Android/Linux UART/serial port access from user is through the tty-devices. The tty-devices have different names depending on UART driver on different board.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;font color=&amp;quot;#0066cc&amp;quot;&amp;gt;RS-485&amp;lt;/font&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
RS-485 uses half-duplex communication, which means that one medium is shared for transmitting and receiving data.&lt;br /&gt;
&lt;br /&gt;
Therefore the system needs to control the RS-485 transceiver's transmit mode.&lt;br /&gt;
&lt;br /&gt;
Usually the UART RTS signal is used to switch the transmitter on and off.&lt;br /&gt;
&lt;br /&gt;
= '''Boards''' =&lt;br /&gt;
&lt;br /&gt;
== AOM-3841 Borad ==&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| '''COM Name'''&lt;br /&gt;
| '''Device Node'''&lt;br /&gt;
| '''Remark'''&lt;br /&gt;
|-&lt;br /&gt;
| COM1&lt;br /&gt;
| /dev/ttyS2&lt;br /&gt;
| RS232 2-wire&lt;br /&gt;
|-&lt;br /&gt;
| COM2&lt;br /&gt;
| /dev/ttyS4&lt;br /&gt;
| &lt;br /&gt;
RS232 4-wire&lt;br /&gt;
&lt;br /&gt;
RS485&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| M.2 E-Key&lt;br /&gt;
| /dev/ttyS6&lt;br /&gt;
| RS232 4-wire&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Note&amp;amp;nbsp;:&amp;amp;nbsp;'''&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
= How to config RS232 or RS485 mode =&lt;br /&gt;
&lt;br /&gt;
Enter U-boot interrupt mode&lt;br /&gt;
&lt;br /&gt;
Connect device to debug port, and open debug console. See more&amp;amp;nbsp;:&amp;amp;nbsp;[http://ess-wiki.advantech.com.tw/view/How_to_debug_RK3568 How_to_debug].&lt;br /&gt;
&lt;br /&gt;
Press&amp;amp;nbsp;&amp;quot;ctrl + c&amp;quot; key before power up the device, until get the following information on debug console&amp;amp;nbsp;:&amp;amp;nbsp;&lt;br /&gt;
&amp;lt;pre&amp;gt;Hit any key to stop autoboot: 0&lt;br /&gt;
=&amp;gt; &amp;lt;INTERRUPT&amp;gt;&lt;br /&gt;
=&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you can&amp;amp;nbsp;input the following cammand to config UART mode.&lt;br /&gt;
&lt;br /&gt;
== Config Uart coming from cpu ==&lt;br /&gt;
&lt;br /&gt;
'''RS485 Mode（Taking AOM-3841 for example）:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;setenv uart_mode_cpu 4:1&lt;br /&gt;
saveenv&lt;br /&gt;
reset&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''RS232 Mode（Taking AOM-3841 for example）:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;setenv uart_mode_cpu 4:0&lt;br /&gt;
saveenv&lt;br /&gt;
reset&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note&amp;amp;nbsp;:'''&lt;br /&gt;
&lt;br /&gt;
The default value is RS232 for AOM-3841 ttyS4.&lt;br /&gt;
&lt;br /&gt;
Above command &amp;quot;uart_mode_cpu 4:1&amp;quot;, 4:1 means set ttyS4 to RS485(0 means to RS232; 1 means to RS485).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Config Uart coming from cp2108 ==&lt;br /&gt;
&lt;br /&gt;
'''RS485 Mode:&amp;amp;nbsp;'''&lt;br /&gt;
&amp;lt;pre&amp;gt;setenv uart_mode 0x0c&lt;br /&gt;
saveenv&lt;br /&gt;
reset&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''RS232&amp;amp;nbsp;Mode:&amp;amp;nbsp;'''&lt;br /&gt;
&amp;lt;pre&amp;gt;setenv uart_mode 0x00&lt;br /&gt;
saveenv&lt;br /&gt;
reset&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note&amp;amp;nbsp;:&amp;amp;nbsp;'''&lt;br /&gt;
&lt;br /&gt;
Above command &amp;quot;setenv uart_mode 0x0c&amp;quot;, 0x0c means set bit2(ttyUSB2) and bit3(ttyUSB3) to 1 (0 means to RS232; 1 means to RS485).&lt;br /&gt;
&lt;br /&gt;
If you just want ttyUSB2 (or ttyUSB3)to be RS485 mode, please change 0x0c to 0x04 (or 0x08).&lt;/div&gt;</summary>
		<author><name>Yunjin.jiang</name></author>	</entry>

	</feed>