Documentation/Allspark2-Orin NX WikiEnglish · NX
Browse documentation
7 Developer Guide

7.13 CAN Interface

The device has an integrated CAN transceiver that outputs CANH and CANL bus signals. The interface supports a 3V3 external power output with a current of less than 1 A. The inte…

1 min read · English documentation

The device has an integrated CAN transceiver that outputs CANH and CANL bus signals. The interface supports a 3V3 external power output with a current of less than 1 A. The interface pin definition is shown below:

PIN1 PIN2 PIN3 PIN4
3V3 CANH CANL GND

CAN Function Test

Test Equipment

Power adapter, Allspark 2-Orin main unit, and USBCAN analyzer (USBCAN-IIC+ upgraded black enclosure).

Test Objective

Test the functionality of the CAN-related circuitry

Test Procedure

  1. Connect the main unit's CAN port to the USBCAN analyzer: connect CAN_H to CAN_H and CAN_L to CAN_L.

图片.png

  1. Activate CAN.
sudo modprobe mttcan
  1. Configure the CAN bit rate.
sudo ip link set can0 type can bitrate 500000
  1. Enable CAN.
sudo ip link set up can0
  1. Receive data: monitor the can0 channel and display received CAN frames in the console.
sudo candump can0

图片.png

  1. Send data: send a CAN frame using the following command. It sends a 4-byte CAN message on the can0 channel with the data 11223344AABBCCDD at CAN ID 001.
cansend can0 001#11223344AABBCCDD

图片.png