Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

CAN FD DLC and Data Length Different

Solved!
Go to solution
Highlighted

This is a bit of a CANalyzer question, but it relates to CAN FD in general.  In CAN FD the payload lengths can be 0-8 bytes like normal CAN and can be larger (12, 16, 20, 24, 32, 36, 48, or 64).  What is odd is in CANalyzer there are two entries in the trace window, one for Data Length, and one for DLC and they aren't the same.

 

Does CAN FD support two different values for DLC and Data Length?  Does XNet handle this or support this?  Does anyone know what DLC (Data Length Code) actually mean to CANalyzer in respect to CAN FD, and how did it believe the DLC was 13 in this case  Notice that there is actually data past byte 13, and according to the database there should be.  Thanks.

 

CAN FD Length.png

0 Kudos
Message 1 of 2
(120 Views)
Solution
Accepted by topic author Hooovahh

Okay mystery solved.  So in the CAN FD spec it states the payload size options.

 

https://can-newsletter.org/assets/files/ttmedia/raw/e5740b7b5781b8960f55efcc2b93edf8.pdf

 

Page 12 has a table of the various valid bits for DLC.  If the DLC is 0-8 then that means that corresponds to a payload length of 0-8.  But if the DLC is 9 then payload length is now 12 bytes.  DLC being 10 means payload length of 16, and wouldn't you know it a DLC of 13 corresponds to a data length of 32.  Not sure why CANalyzer chooses to show the DLC and Data length separate, but it doesn't really give you any more information.

Message 2 of 2
(60 Views)