To make use of CAN communications, I have refer to the following link:
But I still having some problems about it, I have connected the CAN_H/CANL to a vehicle CAN BUS, and then I use the follow command to enable the can controller:
ip link set can0 type can bitrate 500000 dbitrate 2000000 berr-reporting on fd on ip link set up can0
In front of a period of time，some errors occured:
1.Stuff Error Detected
2.Bit1/Bit0 Error Detected
Sometimes the can bus probably off because of these errors and sometimes it will run well in next inside period of time, no error occured.
What the CAN transceiver we used is NXP’s TJA1042T/3, the BSP version is R28.1.