CAN FD
CAN FD (Controller Area Network Flexible Data-Rate) is a data-communication protocol used for broadcasting sensor data and control information on 2 wire interconnections between different parts of electronic instrumentation and control system. This protocol is used in modern high performance vehicles.
CAN FD is an extension to the original CAN bus protocol that was specified in ISO 11898-1. CAN-FD is the second generation of CAN protocol developed by BOSCH.[1] The basic idea to overclock part of the frame and to oversize the payload dates back to 1999.[2] Developed in 2011 and released in 2012 by Bosch, CAN FD[3] was developed to meet the need to increase the data transfer rate up to 5 times faster and with larger frame/message sizes for use in modern automotive Electronic Control Units (ECUs).
As in the classic CAN, CAN FD protocol is designed to reliably transmit and receive sensor data, control commands and to detect data errors between electronic sensor devices, controllers and microcontrollers. Although CAN FD was primarily designed for use in high performance vehicle ECUs, the pervasiveness of classic CAN in the different industries will lead into inclusion of this improved data-communication protocol in a variety of other applications as well, such as in electronic systems used in robotics, defense, industrial automation, underwater vehicles, medical equipment, avionics, down-hole drilling sensors, etc.
CAN FD versus classic CAN
The primary difference between the classical CAN (Controller Area Network) and CAN FD is the Flexible Data (FD). Using CAN FD, Electronic Control Units (ECUs) are enabled to dynamically switch between different data rates and longer or shorter messages. Faster data speed and more data capacity enhancements results in several system operational advantages compared to classic CAN. Commands issued by the executing ECU software reach the output controller much faster. CAN FD is typically used in high performance ECUs of modern vehicles. A modern vehicle can have more than 70 ECUs that use CAN FD to exchange information over the CAN bus when the engine is running or when the vehicle is moving.
In CAN FD, it's possible to use the 11-bit identifier (FDBF FD base frame Format) or the 29bit identifier (FEFF FD extended frame Format). The message payload size has been increased to 64 bytes of data in each CAN-frame / message, compared to only 8-bytes in the classic CAN frame. A frame is a message transmitted as a sequence of binary bit-pattern. In CAN FD, the data rate (i.e. number of bits transmitted per second) is increased to be 5 to 8 times faster than the classic CAN (5 to 8Mbit/s for the data payload only, the arbitration bit rate is still limited to max 1Mbit/s for compatibility). Data rate depends on the topology of the bus network and the used Transceivers. CAN FD protocol specification includes some other enhancements as well, such as better detection of errors[4] in the received CAN message and the executing software flexibility to dynamically select (from a list) and switch to faster or slower data rate transfer, as and when required. On the CAN FD bus, some sensors may operate at slower data rate while others at faster data rate. CAN bus is a shared pair of wires onto which electronic sensors, controller units and ECUs are connected. CAN bus is used for exchanging information between operational units periodically or on demand. The electrical condition and configuration of the CAN bus, i.e. the total number of units connected, the length of the CAN bus wires and other electro-magnetic factors determine the fastest data transfer rate possible on that CAN bus. The CAN protocol (and by extension CAN FD) has an excellent collision resolution mechanism that depends on the propagation time of the signal and the network configuration (ring, bus or star), and to, a lesser extent, the number of units on the bus. Therefore, a physically long network may limit the data rate below the theoretical maximum.
CAN-FD bus load that was developed by "De Andrade's" equation based on Tindel's equation.[1][5][6]
β = τ/ω (1) (β = Busload), (τ = time of slow bits plus faster bits), ω (time in seconds of measurement). τ = Ts + Tf (2)
CAN-FD protocol defines five different error detection mechanisms: Two of them work at the bit level, and the other three at the message level. They are:
- (1) Bit Monitoring, - (2) Bit Stuffing, - (3) Frame Check, - (4) Acknowledgement Check and - (5) Cyclic Redundancy Check. There are two options of CRC which should be denoted as for CRC length of 17 (Data Length 0-16 bytes) or CRC length of 21 bits (Data Length 17–64) bytes.
Ts = ([(SOF+ID+r1+IDE+EDL+r0+BRS/2+CRCdel/2)* 1,2]+ACK+DEL+EOF+IFS)/t_x (3)
Tf = ([(D〗_f+BRS/2+ESI+DLC+CRCdel/2)*1,2]+〖CRC〗_17+5)/t_y (4)
where SOF (Start of Frame) + ID (Identifier) + r1 (reserved bit 1) + IDE + EDL(Extended Data Length) + r0(reserved bit 0) + BRS/2 (Bit Rate Switch) + CRCdel/2 (CRC delimiter)= 17 bits; 1.25 is the factor of the worst case bit stuffing,[7] which means the computation shall be increased by 25%. It is considered BRS and CRCdel divided by 2, because they are exactly in the shift of bit rate transition. The ACK (Acknowledge) + DEL (Delimiter) + EOF (End-of-Frame) + IFS (Interframe Spacing) = 12 bits without bit stuffing. The CAN-FD payload size may be 0, 8, 12, 16, 20, 24, 32, 48, 64 Bytes. t_X is the transmission bandwidth for the message header (up to 1 Mbit/s).
- For data < 16 Bytes
β = ( (SOF+ID+r1+IDE+EDL+r0+BRS/2+CRCdel/2 * 1,25)+ACK+DEL+EOF+IFS)/t_x + (〖[(D〗_f+BRS/2+ESI+DLC+CRCdel/2)*1,25]+〖CRC〗_17+5)/t_y)/ω (5)
- For data >= 16 Bytes
β = ( (SOF+ID+r1+IDE+EDL+r0+BRS/2+CRCdel/2 * 1,25)+ACK+DEL+EOF+IFS)/t_x + (〖[(D〗_f+BRS/2+ESI+DLC+CRCdel/2 )*1,25]+〖CRC〗_21+6)/t_y )/ω (6)
CAN FD also has decreased the number of undetected errors through increases in the performance of the CRC-algorithm.[8] In addition, CAN FD is compatible with existing CAN 2.0 networks, allowing the new protocol to function on the same network as classic CAN.[9] CAN FD bit rate can be up to 8Mbit/s with the right CAN SIC (Signal Improvement Capability) Transceiver and so up to 8 times faster than classic CAN with 1Mbit/s data phase.
Due to higher communication speed, CAN FD constraints are tougher in terms of line parasitic capacitance. Therefore, all components on the line have seen their "capacitance" budget reduced compared to regular CAN bus. That is the reason why semiconductor suppliers have released new components approved by car makers. This approval reflects the need for interoperability between all CAN FD systems. Indeed, selected ESD protection components are compatible with all transceivers (CAN or CAN FD) and withstand ISO7637-3.[10]
Despite a higher stand-off voltage (37 V), devices for truck applications must also comply with the low capacitance requirement (3.5 pF).[11]
Different Types of Data Frames in CAN-FD
The transfer of messages is expressed and regulated through four distinct frame types in CAN FD. A DATA FRAME transports data from a Transmitter to the Receivers, with four subtypes under the DATA FRAME category.
- Data Frame in CAN Base Format.
- Data Frame in CAN Extended Format.
- Data Frame in CAN FD Base Format.
- Data Frame in CAN FD Extended Format.
CAN & CAN FD TP Headers
7 .. 4 (byte 0) | 3 .. 0 (byte 0) | 15 .. 8 (byte 1) | 23..16 (byte 2) | (byte 3) | (byte 4) | (byte 5) | (byte 6) | .... | ||
---|---|---|---|---|---|---|---|---|---|---|
Single Frame (SF) | according to CAN | 0 | size (1..7) | Data | ||||||
CAN-FD specific | 0 | size (0..62) | Data | |||||||
First Frame (FF) | according to CAN | 1 | size (8..4095) | Data | ||||||
CAN-FD specific | 0 | 0 | size (4bytes ~4GB) | Data | ||||||
Consecutive Frame (CF) | according to CAN | 2 | index (0..15) | Data | ||||||
Flow Control Frame (FC) | according to CAN | 3 | FC flag (0,1,2) | Block size | ST | Unused |
The above table explains the transfer protocol defined for CAN + CANFD, based on ISO 15765-2 (ISO-TP).
- if the first byte is 0x00, then it's a CAN-FD SF, and the second byte specifies the size of the data.
- if the first byte is 0x01-0x07, then it's a normal CAN SF with this byte indicating the size of 1-7 bytes data.
- if the first 2 bytes are 0x1000, then it's a CAN-FD FF, and the following 4 bytes specifies the size of data in high byte first order. This virtually enables to send ~4GB (approx.) data in CAN FD.
- if the first 2 bytes are 0x1008-0x1FFF, then it's a normal CAN FF with a size of 0x008-0xFFF.
CAN Transceiver
CAN FD can use Transceiver for classical CAN and CAN FD. Additionally there are new CAN SiC (Signal improvement Capability) Transceiver with 5 to 8Mbit/s data rate.[12]
CAN FD in action
In 2017, CAN FD was predicted to be used in most vehicles by 2019–2020.[13]
CAN FD supporters
Some of the companies behind the new standard include STMicroelectronics, Infineon,[14] NXP, Texas Instruments, Kvaser, Daimler and GM.
CAN FD forms a basic data link layer in some higher Layer protocols like CANopen as CANopen FD and J1939 and supported by different companies with protocol stacks.
CAN XL
CAN XL is the 3rd version of the CAN data link layer after classical CAN and CAN FD. CAN FD is compatible to CAN XL.
References
- ↑ 1.0 1.1 "CAN in Automation (CiA): CAN FD - The basic idea" (in en). https://www.can-cia.org/can-knowledge/can/can-fd/.
- ↑ Cena, G.; Valenzano, A. (1999). "Overclocking of controller area networks" (in en). Electronics Letters 35 (22): 1923. doi:10.1049/el:19991289. Bibcode: 1999ElL....35.1923C. https://digital-library.theiet.org/content/journals/10.1049/el_19991289.
- ↑ "Bosch CAN FD Specification Version 1.0 (released April 17th, 2012)" (in en). http://www.bosch-semiconductors.de/media/ubk_semiconductors/pdf_1/canliteratur/can_fd_spec.pdf.
- ↑ "CAN FD and the CRC issue". https://can-newsletter.org/uploads/media/raw/604de101b0ecaed387518831d32b044e.pdf.
- ↑ de Andrade, R.; Hodel, K. N.; Justo, J. F.; Laganá, A. M.; Santos, M. M.; Gu, Z. (2018). "Analytical and Experimental Performance Evaluations of CAN-FD Bus". IEEE Access 6: 21287–21295. doi:10.1109/ACCESS.2018.2826522. Bibcode: 2018IEEEA...621287D..
- ↑ https://www.teses.usp.br/teses/disponiveis/3/3140/tde-06082015-111553/publico/Dissertacao_Ricardo_rev2_17.pdf[bare URL PDF]
- ↑ "can: length: add definitions for frame lengths in bits". https://lore.kernel.org/linux-can/CAMZ6RqKQw702HPjBTNJdBfL8yhkn5vDVDfn6dbrVMv7SX6NO2w@mail.gmail.com/.
- ↑ "Archived copy". https://www.kvaser.com/wp-content/uploads/2016/10/comparing-can-fd-with-classical-can.pdf.
- ↑ "High speed CAN FD bus is coming to cars, says Microchip" (in en-GB). Electronics Weekly. 2015-10-26. http://www.electronicsweekly.com/news/high-speed-can-fd-bus-is-coming-to-cars-says-microchip-2015-10/.
- ↑ "CAN bus ESD protection for 12V systems". http://www.st.com/content/st_com/en/products/protection-devices/automotive-protection-devices/automotive-dataline-esd-protection/esdcan03-2bwy.html.
- ↑ "CAN bus ESD protection for 24V systems". http://www.st.com/content/st_com/en/products/protection-devices/automotive-protection-devices/automotive-dataline-esd-protection/esdcan05-2bwy.html.
- ↑ "CAN Signal Improvement". https://www.nxp.com/products/interfaces/can-transceivers/can-signal-improvement:CAN-FD#/.
- ↑ "CAN 2020: The future of CAN technology" (in en). www.can-cia.org. https://www.can-cia.org/ru/news/cia-in-action/view/can-2020-the-future-of-can-technology/2016/3/21/.
- ↑ Kelling, Ursula (April 2014). "Infineon Microcontrollers". CAN Newsletter Online. https://can-newsletter.org/uploads/media/raw/88000d1061d24e686756dac2155a5853.pdf.
External links
- Comparing CAN FD with Classical CAN
- CAN FD: From Theory to Practice
- CAN Bus Protection : Protect What Protects You
- Linux and ISO 15765-2 with CAN FD - Details of how (payload) data length differs between CAN and CANFD
- Linux and ISO 15765-2 with CAN FD 15th international CAN Conference 2015
- CAN FD Explained
Original source: https://en.wikipedia.org/wiki/CAN FD.
Read more |