Skip to content

Hex 4310 canline config en

CAN Configuration

Hardware Configuration

Termination resistors must use split termination. Star topology is not allowed. Make sure there are exactly two termination resistor groups on the same CAN line, both located at the two ends of the line.

As shown below:

Software Configuration

The motor uses CAN-FD. The arbitration phase is fixed at 1 Mbps with a sample point of 0.8. The data phase bitrate is fixed at 5 Mbps with a sample point of 0.75.

Recommended CAN configuration command:

ip link set can0 type can bitrate 1000000 sample-point 0.8 dbitrate 5000000 dsample-point 0.75 sjw 5 dsjw 3 fd on

Once the CAN configuration succeeds, bring the CAN interface up:

ip link set can0 up

Note

The sample point must be set correctly, otherwise sending long frames will definitely cause communication failure. Some USB-to-CAN devices may not correctly support setting these parameters. If you encounter this situation, please use an SoC with hardware CAN-FD support such as the RK3576.