Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

What is CAN FD?

CAN FD (CAN Flexible Data Rate) is an advanced version of CAN with features as shown below.

The main features that would be beneficial are the increased length and increased speed. The increased length of data would be helpful to send more data in a single CAN message. The structure of the normal CAN message versus a CAN FD message is shown below.

For more details see https://www.csselectronics.com/screen/page/can-fd-flexible-data-rate-intro/language/en

Setting up CAN FD

To set up Virtual CAN to work with CAN FD we can run

sudo modprobe vcan
sudo ip link add dev vcan0 type vcan
sudo ip link set vcan0 mtu 72 # For CAN-FD
sudo ip link set up vcan0

The format of the DBC file should be as such. This will need to be updated for our next car, though many similar messages can be ported over.

BO_ 1 canFdStandard1: 24 Vector__XXX
 SG_ signal3 : 128|64@1- (1,0) [0|0] "" Vector__XXX
 SG_ signal2 : 64|64@1- (1,0) [0|0] "" Vector__XXX
 SG_ signal1 : 0|64@1- (1,0) [0|0] "" Vector__XXX

Using CAN FD

https://buildmedia.readthedocs.org/media/pdf/python-can/3.0.0/python-can.pdf

According to the documentation, we can simply add the flag when are packing CAN messages or when creating the CAN interface

is_fd = True
  • No labels