4.4 RS485
This example demonstrates the MYD-AM335X series of the same type of two
development board how to use the Linux API configuration development board on
the RS485 and send and receive data,please refer to the source code for detail.
Hardware Preparation:
Hardware debugging environment to see chapter second.
Board
Type
MYD-AM335X
MYD-AM335X-
Y
MYD-AM335X-J
RS485
interface
U16 4,5 Pin
were
connected to
the same type
of
development
board 4,5 Pin
CON2 5,4 Pin
were
connected to
the same type
of development
board 5,4 Pin
JP2 and JP3 shorted
,
JP5
and JP7 shorted
,
J18 1
,
2
,
4
,
5 Pin were connected to
the same type of development
board 1
,
2
,
4
,
5 Pin
Software Preparation:
Linux Kernel 4.1.18
tty_test application
Board Type
MYD-AM335X
MYD-AM335X-Y
MYD-AM335X-J
Device node
ttyO1
ttyO2
ttyO2 ttyO3
Test Steps:
Copy cross compiled
<WORKDIR>/Examples/tty/tty_test
to
/usr/bin
directory of the
MYD-AM335X series development board, run
tty_test
application as below:
# tty_test -h
Usage: tty_test [options]
Version 1.0
Options:
-d | --device name tty device name, default: /dev/tty0
-m | --mode mode operate mode. 0: RS232, 1: RS485 default mode: 0
-f | --flow flow control
-b | --baudrate baudrate set baudrate, default baudrate: 115200
-l | --loop operate circularly
39