3.5
Serial Port
For COM1 serial port pin definition, please refer to previous chapter 2.4.2.4 for more
information.
3.5.1
RS-232 Loopback Test (eg. ttymxc1)
# stty -F /dev/ttymxc1 -echo -onlcr 115200
# cat /dev/ttymxc1 &
# echo "Serial Port Test" > /dev/ttymxc1
3.5.2
RS-422 Test
Step 1: First change the debug console port to UART2 (UIO-4032 COM_3), or use
telnet to login to the system console to issue the command for the com port test.
u-boot=>
u-boot=> editenv console
edit: ttymxc1,115200
Step 2: Set both GPIO#496, GPIO#497, set as 1, 1 for RS-422.
# echo 496 > /sys/class/gpio/export
# echo 497 > /sys/class/gpio/export
# echo out > /sys/class/gpio/gpio1/direction
# echo out > /sys/class/gpio/gpio2/direction
# echo 1 > /sys/class/gpio/gpio1/value
# echo 1 > /sys/class/gpio/gpio2/value
Step 3: Test RS-422 with Adam-4520. Connect Adam-4520 with COM1 with
1700100250 DB9 as the following:
Adam-4520 RX- <--> DB9 Pin 1, Adam-4520 RX+ <-->DB9 Pin 2, Adam-4520 TX- <-
->DB9 Pin 4, Adam-4520 TX+ <--> DB9 Pin 3
# stty -F /dev/ttymxc2 speed 115200 ignbrk -brkint -icrnl -imaxbel -opost -onlcr -isig -icanon -
iexten -echo -echoe -echok -echoctl -echoke
# cat /dev/ttymxc2 &
# echo "Serial Test" > /dev/ttymxc2
RSB-3720 User Manual
38