CANFD bus transport layer
This chapter defines the CANFD bus based transport layer of DroneCAN.
DroneCAN on CANFD
DroneCAN operates on CANFD with a small number of changes from operation on bxCAN. The changes are:
- frames can be up to 64 bytes in length, as opposed to 8 byte frames for bxCAN
- the TAO (tail array optimisation) technique is never used in the encoding at any level
- the DLC is quantised as described below
Bus rates
CANFD implementations will usually use bit rate switching (BRS) with a nominal bit rate of 1MBps, with payload switching to 1, 2, 4, 5 or 8 MBit depending on hardware capabilities
DLC Encoding
To accomodate the limited range of the DLC field a mapping is used for data lengths of over 8 bytes.
The mapping is
# Data Length Code 9 10 11 12 13 14 15
# Number of data bytes 12 16 20 24 32 48 64
Compiler support
It is highly recommended that implementors use the dronecan_dsdlc compiler for building compliant C and C++ bindings for DroneCAN that work with both bxCAN and CANFD