4.5 CAN Bus
This example demonstrates the MYD-AM335X series of the same type of two
development board how to use Linux APIs to send and receive data from CAN bus,
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
CAN
interface
U16 7,8 Pin
were connected
to the same
type of
development
board 7,8 Pin
CON2 1,2 Pin
were connected
to the same type
of development
board 1,2 Pin
Disconnect jumper cap
JP7,Shorted JP4, J17 1,2
Pin were connected to the
same type of development
board 1,2 Pin
Software Preparation:
Linux Kernel 4.1.18
can_test application
ip link applicatoin
Board Type
MYD-AM335X
MYD-AM335X-Y
MYD-AM335X-J
Operation node
can1
can1
can0
Test Steps:
Copy cross compiled
<WORKDIR>/Examples/can/can_test
to
/usr/bin
directory of the
MYD-AM335x series development board, run
can_test
application as below:
# can_test --help
Usage: can_test [options]
Version 1.0
Options:
-d | --device name can device name: can0
-b | --baudrate baudrate set baudrate, default baudrate:50000
-l | --loop operate circularly, default not operate circularly!
-w | --write frame frame string with format ID#MESSAGE. such as: 123#112233445566
41