VAB-820 Linux BSP v3.2.0 Quick Start Guide
19
5.4. Configuring FlexCAN
The CAN/COM 2 connector (J5) of the VAB-820 supports debug port (COM 2) and two
CAN bus ports. The CAN bus supports CAN protocol specification Version 2.0 B while
the COM 2 supports TX/RX for debugging purposes only.
CAN/COM 2 connector (J5) diagram
Pin Signal
1 5VIN
2 COM2 RX
3 COM2 TX
4 NC
5 NC
6 GND
7 CAN RX2
8 CAN TX2
9 CAN TX1
10 CAN RX1
CAN/COM 2 connector (J5) pinout table
Please note that you need to disable the CAN bus first, set the CAN bus bitrate. The
CAN bus bitrate should be 5000 < [BRT_value] < 1000000.
CAN bus 1 is can0 and CAN bus 2 is can1.
To set the CAN bus 1 bitrate [BRT_value], use the following command:
# ip link set can0 type can bitrate [BRT_value]
To enable the CAN bus 1, use the following command:
# ifconfig can0 up
To disable the CAN bus 1, use the following command:
# ifconfig can0 down
Use the cansend command to send CAN bus 1 data: