🎧 New: AI-Generated Podcasts Turn your study notes into engaging audio conversations. Learn more

16 - CAN FD Protocol Part -1.pdf

Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...

Full Transcript

# Basics on CAN FD Protocol ## TATA ELXSI Learning Central **Mrs. Priya R, Transportation** ## CAN FD (Controller Area Network Flexible Data-Rate) ## AGENDA 1. Recap of CAN protocol 2. What is CAN -FD ? 3. Why CAN -FD? 4. How does CAN -FD works? 5. CAN-FD Frame format 6. CAN - XL ## CAN-Protoco...

# Basics on CAN FD Protocol ## TATA ELXSI Learning Central **Mrs. Priya R, Transportation** ## CAN FD (Controller Area Network Flexible Data-Rate) ## AGENDA 1. Recap of CAN protocol 2. What is CAN -FD ? 3. Why CAN -FD? 4. How does CAN -FD works? 5. CAN-FD Frame format 6. CAN - XL ## CAN-Protocol Recap | Number of Bits | Start of Frame | Arbitration field | Control field | Data Field | CRC | ACK | End of Frame | Inter frame space | | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | | 1 bit | Start of Frame | 12 bits | 6 bits | 0 to 8 bytes | 16 bits | 2 bits | 7 bits | 3 bits | | | | Identifier 11 bit | RTR 1 bit | Data 1 Byte | | | | | | | | | | Data 8 Byte | | | | | ### Why CAN? - CAN Properties - The maximum data rate is 1 Mbit/s. 8 bytes of data field - CAN Node / controller / Bus representation - The Basic CAN Message Structure - CAN Frames - CAN Error ## 1. What is CAN-FD (Controller Area Network Flexible Data-Rate) ? Developed by Bosch, CAN with Flexible Data-Rate (CAN FD) is an extension to the original CAN protocol as specified in ISO 11898-1 that responds to increased bandwidth requirements in automotive networks. ## 2.Why CAN-FD 1. **Increased data rate**: From a max of 1 Mb/s to up to 8 Mb/s. Supports dual bitrate normal bit rate, data bit rate. - **Useful Scenario**: Increased data rate is highly beneficial in re-programming the applications like ADAS (Advanced Driver Assistance System), as large data packets are needed to be transmitted. 2. **Large Payloads**: CAN FD supports 64 bytes of data field as compared to 8 bytes in CAN. With 64 bytes of payload supported, there is no need for the splitting of the long messages as well. 3. **Better reliability**: CAN FD uses an improved cyclic redundancy check (CRC) and the "protected stuff-bit counter", which lower the risk of undetected errors. 4. **Backward compatibility**: A Classical CAN controller will not be compatible with CAN FD, however, the vice-versa is true. Backward compatibility very much exists between CAN FD and classical CAN. High data rate and larger payload were achieved by modifying the frame format of CAN. This new frame format (CAN FD solution) has the capability to support higher bandwidth than 1 Mbit/s and hence it could manage data payloads higher than 8 bytes. ## CAN FD Features 1. **Wiring is same as CAN protocol.** ``` 120 Ω Node A | | - | | 120 Ω Node B | | - -------- CAN_H -------- | | - | | | 120 Ω Node X | | - | | -------- CAN_L -------- ``` 2. **Requires different transceivers and controllers** - This implies that the process of upgrading from CAN to CAN FD can be achieved with neither huge costs for education nor the loss of experience. - Just like traditional CAN, CAN FD also knows two types of **data frame** formats: the standard frame with 11 bit identifier and the extended frame with 29 bit identifier ## 3.How does CAN FD work? (i) Pack more data into each message. (ii) Speed up the data transmission. 1. If we simply pack Classical CAN frames with 64 bytes of data, it would block the CAN bus for longer, potentially delaying mission-critical higher-priority data frames. **Classic CAN Frame (11-bit ID)** | ID | RTR. | IDE | DLC | DATA 1 | DATA 2 | DATA 3 | CRC | | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | **CAN FD Frame (11-bit ID | 3 Data Bytes | Bit Rate Switch: Off)** | ID | RRS. | IDE | ESI | DLC | DATA 1 | DATA 2 | DATA 2 | STC | CRC | AOK | SOKA'S | | ---- | ---- | ---- | ---- | ---- | ---- | | | | | | | **CAN FD Frame (11-bit ID | 3 Dato Bytes | Bit Rate Switch: On - 4x Arbitration Speed)** | ID | RRS. | IDE | FDF | BRS | DATA 1 | DATA 2 | DATA 3 | STC | CC | | ---- | ---- | ---- | ---- | ---- | ---- | | | | | **CAN FD Frame (11-bit ID | 64 Data Bytes | Bit Rate Switch: On - 10x Arbitration Speed)** | ID | RRS. | IDE | FDF | BRS | DATA 1 | DATA 2 | DATA 3 | STC | CC | | ---- | ---- | ---- | ---- | ---- | ---- | | | | | ## 4.CAN FD Frame Format (Continued..) ### Start-of-frame Denotes the start of frame transmission. CAN and CAN FD use the same SOF - a single "dominant” bit ### Identifier A unique identifier which represents the message priority. Both CAN and CAN FD has the same addressing for Standard(11 bit identifier) and Extended(29 bit identifier) formats. An 11 bit identifier (standard format) allows a total of $2^{11}$ (= 2048) different messages. A 29 bit identifier (extended format) allows a total of $2^{29}$ (= 536+ million) messages. ### Remote Request Substitution(RRS) The CAN FD format does not support remote frames, the previous RTR bit after the identifier is replaced by the "Remote Request Substitution" (RRS) bit. ### Identifier extension bit (IDE) Must be dominant (0) for base frame format with 11-bit identifiers. Must be recessive (1) for extended frame format with 29-bit identifiers. In case of extended frame format, IDE field is followed by the remaining 18 bit identifier which constitutes a total of 29 bit identifier. ### FDF – Flexible Data Format/Extended Data Length EDL distinguishes between the standard CAN frame format and the CAN FD frame format. FDF bit - Dominant (0) -CAN FDF bit – Recessive (1)-CAN FD ### res This new reserved bit plays the same role as ro - i.e. it may in the future be set to recessive (1) to denote a new protocol. ### Bit Rate Switch(BRS) The Bit Rate Switch (BRS) can be dominant (0), meaning that the CAN FD data frame is sent at the arbitration rate (i.e. up to max 1 Mbit/s). Setting it to recessive (1) means that the remaining part of the data frame is sent at a higher bit rate (up to 5 Mbit/s). ``` In-bit-time detection "Free" transmission In-bit-time detection __________________________ __________________________ __________________________ | | | | | | | Arbitration phase | | Data transmission phase | | ACK phase | |__________________________| |__________________________| |__________________________| up to 1 Mbit/s up to 1 Mbit/s and higher up to 1 Mbit/s ``` CAN FD data frames can be transmitted with two different bit-rates: In the arbitration phase the bit-rate depends on the network topology and is limited to 1 Mbit/s; in the data phase the bit-rate is limited by the transceiver characteristics ### ESI - Error State Indicator In CAN FD frames, the transmitter's error state is indicated by ESI, dominant for error active and recessive for error passive. This simplifies network management. ### DLC Data Length Code (DLC) uses 4 bits for both formats. CAN FD is compatible with. CAN at data lengths ≤ 8 For lengths ≥ 9, CAN FD uses the following DLCs: | DLC (bin) | DLC (dec) | Classic CAN | CAN FD | | ----------- | ----------- | ----------- | ------ | | 0000 | 0 | 0 | 0 | | 0001 | 1 | 1 | 1 | | 0010 | 2 | 2 | 2 | | 0011 | 3 | 3 | 3 | | 0100 | 4 | 4 | 4 | | 0101 | 5 | 5 | 5 | | 0110 | 6 | 6 | 6 | | 0111 | 7 | 7 | 7 | | 1000 | 8 | 8 | 8 | | 1001 | 9 | 8 | 12 | | 1010 | 10 | 8 | 16 | | 1011 | 11 | 8 | 20 | | 1100 | 12 | 8 | 24 | | 1101 | 13 | 8 | 32 | | 1110 | 14 | 8 | 48 | | 1111 | 15 | 8 | 64 | ## Data Length Code **Encoding the Data Length** | DLC value | Data field size (Bytes) | | ----------- | ----------- | | 0..8 | 0..8 | | 9 | 12 | | 10 | 16 | | 11 | 20 | | 12 | 24 | | 13 | 32 | | 14 | 48 | | 15 | 64 | ## 4.CAN FD Frame Format (Continued..) ### Data Field Data to be transmitted (as in DLC field). Data is transmitted as either 0-8, 12, 16, 20, 24, 32, 48, or 64 bytes in CAN FD. ### Stuff Bit Counter Preceding stuff bits are included in the CAN FD CRC calculation. CAN does not use stuff bits in the CRC calculation. This makes it necessary to transmit the total number of bits. Therefore the number of dynamic stuff bits is included into the frame format (stuff bit count modulo 8). When a stuff bit is dropped or inserted by synchronization failure, the CRC is corrupted. To solve the CRC issue, the receiving node needs to know the total number of transmitted bits for each frame. Therefore the number of dynamic stuff bits (generated by the Classical CAN stuffing method) is included into the frame format ### Cyclic Redundancy Check (CRC) Improved CRC method is used in CAN FD. Two new CRC polynomials: g17 for frames with up to 16 data bytes: $g17 = x^{17} + x^{16} + x^{14} + x^{13} + x^{11} + x^6 + x^4 + x^3 + x^1 + 1$ g21 for frames with more than 16 data bytes: $g21 = x^{21} + x^{20} + x^{13} + x^{11} + x^7 + x^4 + x^3 + 1$ Hence the length of the CRC Sequence in CAN FD data frames depends on the Data Length Code DLC. In standard CAN, the stuff bits, which are inserted into the bit stream to ensure that there are enough edges for resynchronization, are not considered for CRC calculation. In CAN FD, the stuff bits are also included in the CRC calculation. ### CRC delimiter The CRC SEQUENCE is followed by the CRC DELIMITER. In CAN format, the CRC DELIMITER is one single recessive bit. In CAN FD format, the CRC DELIMITER may consist of one or two recessive bits. ### ACK Once the CRC is sent, the driver remains recessive, and the receiver can transmit a dominant bit called the ACK or acknowledge bit to indicate successful message reception. ### End of Frame Once the receiver has acknowledged transmission, the driver sends seven recessive bits as End of frame message followed by a seven bit interframe spacing. ## 5.CAN XL The migration from Classical CAN to CAN FD is not finished yet. Nevertheless, the next CAN-based protocol is knocking at the door: CAN XL. CAN XL provides a superior solution for data rates up to 10Mbit/s by maintaining the advantages of the CAN protocol like collision-resolution by non-destructive arbitration. With respect to the bitrate, CAN XL fills the gap between CAN FD and 100BASE-T1 (Ethernet). ### Key Protocol Features - Net data rates up to 10Mbit/s - Large data fields with up to 2048 byte enable the use of higher layer protocols like IP (Internet Protocol) and even the tunneling of complete Ethernet frames - Interoperability with CAN FD for mixed FD/XL networks ## Summary | Features | Classical CAN | CAN FD | | --------------- | ---------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | | Payloads | Supports upto 8 bytes of payload/frame | Supports upto 64 bytes of payload/frame | | Data Rate | Maximum of 1 Mb/s speed at 40 meter bus length | The standard permits speeds upto 5 Mb/s | | Latency | Takes significantly more time to send the data | Able to send the message at less time as the data is transmitted at a higher bit rate | | Bit rate dependency | Propagation delay is common in CAN bus standard due to the transceivers and cable length. | There is no such dependence of bit rate on signal propagation delay due to the difference in the message frame format. | | Compatibility Factor | A Classical CAN controller is not compatible with CAN FD | CAN FD is backward compatible with Classical CAN which means that both CAN and CAN FD nodes can be used together | ## Thank you **Training by** **Priya R** **[email protected]** **Transporation** **Tata ELXSI**

Use Quizgecko on...
Browser
Browser