SBC-EC9100 User Manual
Embest Technology Co. Ltd
|
http://www.embest-tech.com
15
2.8
Serial
The board has 2 serial interfaces, while the UART-3 is the debug interface. Short connect J203 to configure the
iomux IC working at UART & CAN mode.
2.8.1
Loopback
UART2 test, short connect Pin 20 and 22 in J9:
Execute the following instructions on the serial terminal:
root@embest:~# ./uart_test -d /dev/ttymxc1 -b 115200
/dev/ttymxc1 SEND: 1234567890
/dev/ttymxc1 RECV 10 total
/dev/ttymxc1 RECV: 1234567890
2.8.2
Board to Board
Use two SBC-EC9100 boards, connect the Rx pin (22 in J9) with the Tx pin of the other board (Pin 20 in J9), Tx pin
to the Rx pin of the other board.
Execute the following instructions on the serial terminal for each board:
root@embest:~# ./uart_test -d /dev/ttymxc1 -b 115200
Two boards will both send and receive data.
The serial terminal will print the following info:
/dev/ttymxc1 SEND: 1234567890
/dev/ttymxc1 RECV 10 total
/dev/ttymxc1 RECV: 1234567890
……
Note: Press “CTRL+C” to exit the serial test.
2.9
RS485
Use two SBC-EC9100 boards to make the test, connect the pin 39 and 40 on board to the other board, then:
Execute the following instructions on board A:
root@embest:~# ./uart_test2 /dev/ttymxc0 9600 0 100
Execute the following instructions on board B:
root@embest:~# ./uart_test2 /dev/ttymxc0 9600 1
If test passed, board B will receive info like following:
*****data length = 31 ******