CAN-FD FILTER FOR CLASSICAL CAN DEVICES VIENNA 27 OCTOBER 2015 BY KENT LENNARTSSON , kl@kvaser.com KVASER AB WWW.KVASER.COM
THE CLASSICAL-CAN PROBLEM: A RECEIVED CAN-FD FRAMES WILL CAUSE ERROR-FRAMES
THE LOGICAL FILTER WILL PREVENT CAN-FD FRAMES FROM REACHING THE CLASSICAL CAN-CONTROLLER
DURING IDLE AND CLASSICAL CAN-FRAMES WILL THE FILTER BE TRANSPARENT IN BOTH DIRECTIONS.
EVEN THE FIRST PART IN THE CAN-FD FRAME WILL BE TRANSPARENT UP TO THE FDF-BIT.
IF THE FDF-BIT IS RECESSIVE INDICATING A CAN-FD FRAME, TWO LOGIC BLOCKS ARE PLACE INTO THE PATH.
THE BIT AFTER THE FDF-BIT IS THE res-BIT. CLASSICLA CAN ALWAYS EXPECT THE DLC TO FOLLOW THE FDF-BIT (THE r0-BIT).
AFTER res-BIT COMES THE (BIT-RATE-SWITCH) BRS-BIT. IN THIS EXAMPLE IS THE BRS-BIT DOMINANT INDICATING THAT THERE IS NO CHANGE OF THE BIT-RATE.
AFTER BRS COMES THE (ERROR-STATUS-INDICATOR) ESI- BIT. IF THE SENDER IS ERROR ACTIVE THIS BIT WILL BE DOMINANT.
FOR SEVERAL REASON IS IT ALMOST IMPOSSIBLE TO TRANSFER DLC OR ANY DATA. THE MIMIC DLC WILL BE SET TO ZERO.
THE BEST SOLUTION IS TO MIMIC A CLASSICAL CAN- FRAME WITH NO DATA.
IN ALMOST ALL CASES WILL THE CLASSICAL CAN- FRAME END EARLY AND SOMETIMES LATE. IN THIS CASE THE MIMIC FRAME END EARLY.
THE READ PART IS CRITICAL BECAUSE IT IS NOT POSSIBLE TO START AN ARBITRATION (SOF) IN THIS PART.
AFTER THE CAN-FD FRAME HAS REACHED IM3-BIT IT WILL NOT CAUSE ANY PROBLEM TO START A NEW FRAME(SOF). WE MUST PREVENT ANY NEW CAN-FRAMES IN THE RED PART
MANY THANKS TO THIS GREAT MAN UWE KIENCKE THE FATHER OF THE CAN-PROTOCOL. He gave us the CAN-protocol 1983, including means to make a filter preventing CAN-FD frames reaching the Classical CAN-controller and still comply to all CAN-protocol rules . THE OVERLOAD FRAME
WE NEED TO MATCH THE OVERLOAD DELIMITER WITH THE END OF FRAME OF THE CAN-FD FRAME . WE HAVE SOME FREEDOM, SOF CAN START EARLY.
WE NEED TO MATCH THE OVERLOAD DELIMITER WITH THE END OF FRAME OF THE CAN-FD FRAME . WE HAVE SOME FREEDOM, SOF CAN START NOMINAL.
WE NEED TO MATCH THE OVERLOAD DELIMITER WITH THE END OF FRAME OF THE CAN-FD FRAME . WE HAVE SOME FREEDOM, SOF CAN START LATE.
WHEN WE REACH THE CRC-DELIMITER IT IS TIME TO SYNCHRONIZE THE TWO SIDES AT THE BIT-EDGE.
THE FIRST IMPORTANT SYNCHRONIZATION EDGES IS THE ACK-BIT.
THE NEXT EDGES WILL BE AT THE START OF THE OVERLOAD FRAME. THE EARLIESTE START IS IN THE LAST BIT OF THE EOF.
THE NEXT EDGES WILL BE AT THE START OF THE OVERLOAD FRAME. OR LATER IN THE IM1-BIT.
THE NEXT EDGES WILL BE AT THE START OF THE OVERLOAD FRAME. OR LATER IN THE IM2-BIT.
IN THIS CASE IT IS BEST TO START THE OVERLOAD FRAME AS LATE AS POSSIBLE. STILL THERE IS A GAP AFTER THE OVERLOAD FLAG.
THE CAN PROTOCOL WILL ACCEPT UP TO 14 DOMINANT BITS IN THE OVERLOAD FLAG.
IN THIS EXAMPLE IS THE BIT-RATE-SWITCH USED. EVEN IN THIS CASE IS THE CLASSICAL FRAME SHORT THAN THE CAN-FD FRAME.
THE NUMBER OF DATA-BITS DO NORMALLY NOT ADD UP TO EVEN TO THE ARBITRATION BITS. THIS RESULT IN A OFFSET OF +/- HALF ARBITRATION BIT.
THE CANFD FRAME ENDS IN THE OVERLOAD FLAG AND THAT IS NOT ACCEPTABLE. TO SOLVE THIS PROBLEM IS IT NECESSARY TO PLACE A OVERLOAD FLAG AT THE CANFD FRAME.
AS A RESULT BOTH OL-DELIMITERS WILL END AT THE SAME TIME.
The mimicked frame will end with the three IM-bits
The mimicked frame can be extended in time with a Overload Frames
The mimicked frame can be extended with multiple Overload Frames
All mimicked parts will end with a EoF or Overload Delimiter with the same length
The worst case is of the CAN-FD EOF and the OL-frame starts at the same time.
The next case is little later and that will make the OL-flag shorter.
For each case coming later will the OL-flag be shorter.
All those early frames will match the mimincked frame 421.
When the CAN-FD is as late as (502) is the mimic OL-flag extended.
For each case you have a later CAN-FD frame is the IL-flag extended.
Here 504 will match 404.
Here 505 will match 405.
Here 506 will match 406.
Here 507 will match 407.
Here 508 will match 408.
Here 511 will match 431.
As can be seen is the CAN-FD frame 511 identical to 501 relative mimicked frame.
WITH FILTER INTEGRATED IN CAN-DRIVER, CAN ANY ECU BE CONNECTED TO A CAN-FD BUS BY REPLACING THE CAN-DRIVER CIRCUIT
ADVANTAGES Only the CAN-driver need to be replaced in existing ECU. No changes in the ECU software or hardware are necessary. All existing MCU with Classical-CAN can be used in a ECU for a CAN-FD system. Realtime performance given by the CAN-protocol will stay the same. Self contained indepeded of MCU hardware or software
ADVANTAGES WITH FILTER COMPARED TO ISOLATION WITH PARTIAL NETWORKING No need to switch between different modes. Classical-CAN nodes can be programmed at the same time as CAN-FD nodes are programmed.
DISADVANTAGES The filter logic is larger than partial networking logic. To add the partial networking in the filter will demand very little extra logic. The bit-rate must be preprogrammed and fixed to keep the ECU SW and HW unchanged.
THE FILTER CAN BE USED IN A BRIDGE BETWEEN A CLASSICAL CAN BUS AND A CAN-FD BUS. • Arbitration is done concurrently on both CAN-busses. • The delays in the two added CAN-drivers will reduce the possible cable length on the two CAN- busses. • The filter delay is only a few nano-seconds.
THANK YOU! QUESTIONS? BY KENT LENNARTSSON KVASER AB WWW.KVASER.COM
Recommend
More recommend