CAN FD Protocol Part 2 PDF

Summary

This document provides an overview of CAN FD Protocol, a crucial communication protocol in automotive technology. It explains the fundamentals, applications, and various aspects of the protocol through diagrams and tables. The document targets professionals in the automotive industry or related fields.

Full Transcript

# Basics on CAN Protocol ## **TATA ELXSI learning central** - Mrs. Priya R, Transportation ## CAN Protocol ## Topics Covered - Communication Protocols - CAN Introduction - Why CAN? - CAN Properties - CAN Network - CAN Node / controller / Bus representation - The Basic CAN Message...

# Basics on CAN Protocol ## **TATA ELXSI learning central** - Mrs. Priya R, Transportation ## CAN Protocol ## Topics Covered - Communication Protocols - CAN Introduction - Why CAN? - CAN Properties - CAN Network - CAN Node / controller / Bus representation - The Basic CAN Message Structure - CAN Frames - CAN Error - CAN applications ## Communication Protocol - A diagram showing a bus system with different nodes and connecting wires. A table shows different protocols with: - Protocol - Bit-rate - Application - Domain - Standard - **High CAN**: 125Kbps to 1Mbps, Real time critical applications e.g engine and braking systems, Powertrain and Chassis train, ISO 11898 - **CAN low**: 5kbps to 125kbps, Non-critical such as doors and windows, Body Domain, ISO 11898 - **CAN FD**: Up to 10Mbps, Critical real time applications, Powertrain and Chassis train, ISO 11898 - **LIN**: 1kbps to 20 kbps, Non-critical applications, Body Domain, ISO 17987 - **FlexRay**: up to 10 Mbps, Critical applications, Powertrain and Chassis, ISO 17458 ## CAN -Controller Area Network - CAN is a two-wire high-speed network system, developed by Robert Bosch - It is a Serial communication technology used for reliable data exchange between electronic control units (ECU's) in the automobile. - A diagram showing a bus with three nodes and two wires: - CAN_H - CAN_L - Uses common CAN bus, where messages are broadcasted. - Terminated with 120ohm resistor to avoid refelection. ## Gateway module - A diagram showing a gateway node connecting with different nodes: - Powertrain Domain - Body Domain - Infotainment Domain - Telematics Control Unit - OBD ScanTool - A gateway Electronic Control Unit (ECU) is a central network interconnectingsystem to link various field buses in a vehicle. - It acts as a router and enables communication between multi-protocol and connected services. ## CAN Introduction - CAN is a message based not address based protocol. - The maximum data rate is 1 Mbit/s. A maximum network extension of about 40 meters is allowed. At the ends of the CAN network, bus termination resistors contribute to preventing transient phenomena (reflections). - Other maximum cable lengths are (these values are approximate): - 100 meters (330 ft) at 500 kbit/s - 200 meters (650 ft) at 250 kbit/s - 500 meters (1600 ft) at 125 kbit/s - 6 kilometers (20000 ft) at 10 kbit/s - A very simple system with CAN mechanism is shown in figure: - A diagram shows a basic network of different CAN buses. - CAN networks significantly reduce wiring. ## Why CAN? - CAN has many advantages over other communication protocols, few of which are important are listed below, - CAN Adoption: a Worldwide Standard - Low cost: As CAN serial bus uses two wires, it offers good price/performance ratio - A diagram shows CAN communication bus with two wires. - Good Speed: CAN supports data rate of 1 MBit/s @ 40m bus length. - Multi-master Protocol: Any node can access the bus. - Broadcast capability: Messages can be sent to one / many /all nodes. - Error Handling: Guaranteed Message Delivery - Flexibility: CAN Nodes can be easily connected / disconnected. Also, the number of nodes is not limited by the protocol. - Message Collisions: Never Occur. - Standardized: standardized by industry organizations such as SAE-Society of Automotive Engineers. ## CAN Node / CAN controller / CAN Transceiver - **CAN Node**: - An ECU that performs its tasks in a CAN network is referred as a CAN node. - **CAN controller**: - An ECU that wants to participate in CAN Communication requires a CAN interface. - **CAN Transceiver**: - A CAN transceiver always has two bus pins: one for the CAN high line (CANH) and one for the CAN low line (CANL) - A diagram showing CAN controller and transceiver with CANH and CANL pins. ## CAN - Characteristics - A diagram representing logic levels and voltage levels for CANH and CANL pins. - Logic 1 is a recessive state. To transmit 1 on CAN bus, both CAN high and CAN low should be applied with 2.5V. - Logic 0 is a dominant state. To transmit 0 on CAN bus, CAN high should be applied at 3.5V and CAN low should be applied at 1.5V. ## CAN – Bus logic - **Wired-AND Logic** - A table shows the data stream of sender 1, sender 2, sender 3 and CAN Bus: - Sender 1: 01010101 - Sender 2: 00110011 - Sender 3: 00001111 - CAN Bus: 00000001 - The CAN bus will have dominant values for all the bits. - **Wired-AND Logic** - A table shows the data stream of sender 1, sender 2, sender 3 and CAN Bus: - Sender 1: 01010101 - Sender 2: 00110011 - Sender 3: 00001111 - CAN Bus: 00000001 - The CAN bus will have recessive values for all the bits. ## The Basic CAN Message Structure - The CAN message/ frame format: - A table showing the message frame format with: - Number of bits - Start of Frame (1 bit) - Arbitration field (12 bits) - Control field (6 bits) - Data Field (0 to 8 bytes) - CRC (16 bits) - ACK (2 bits) - End of frame (7 bits) - Interframe space (3 bits) - A table showing the bus idle (50), identifier (11 bits), RTR (1 bit), data 1 (byte 1), data 8 (byte 8), start of frame (1 bit), remote transmission request (1 bit), CRC sequence (15) and others. - It describes arbitration field, CRC sequence, CRC field (Acknowledgement field), Bit Stuffing (CAN Data Frame). - **Idle**: Each CAN message is preceded by a period of "idle" during which the bus is in the recessive state. - **Start of Frame – SOF**: Each CAN message begins with a Start of Frame indication. This is a single bit period during which the bus is in the dominant state - **ARBITRATION FIELD**: The ARBITRATION FIELD consists of the IDENTIFIER and the RTR-BIT. - **Identifier**: - Each CAN message includes an identifier. Depending on your point of view - system, software, or hardware - the identifier essentially "names" the message or points at the data or acts as an address. The following two sizes of CAN identifiers are available - The 11 bit identifier - allowing the ability to point at about 2,000 network objects- **Standard CAN** - The 29 bit identifier - allowing the ability to point at millions of network objects - **Extended CAN** - A diagram showing the 11 bit and 29 bit identifier field. - **Control**: The CONTROL FIELD consists of six bits. It includes the DATA LENGTH CODE and two bits reserved for future expansion. Data Length Code, usually called the DLC, which essentially tells the size of the data that is being transferred. - A diagram showing the control field with idle, SOF, identifier, control, data, CRC, ACK, End of frame, Interframe Space. - It describes data length code. - **DATA FIELD**: The DATA FIELD consists of the data to be transferred within a DATA FRAME. It can contain from 0 to 8 bytes, which each contain 8 bits which are transferred MSB first. - A diagram showing the data field with byte order and bit order. - **CRC FIELD**: contains the CRC SEQUENCE followed by a CRC DELIMITER. - A diagram showing the CRC field, data or control field, CRC sequence, CRC delimiter and ACK field. - **Cyclic Redundancy Check**: - To increase the reliability of message transfers. A CRC is a type of checksum, a computed value near the end of a message frame which is based on the contents of a block of data starting from the start of frame to the last byte of the data field - The CRC computed by the transmitter is compared within each receiver to a locally calculated CRC. If the receiver's CRC matches the transmitted CRC, then the likelihood of a transfer error is very low - CAN uses a 15-bit CRC that is considered to be more than adequate for most applications - **CRC DELIMITER**: The CRC SEQUENCE is followed by the CRC DELIMITER which consists of a single 'recessive' bit. - **Acknowledgment**: The ACK FIELD is two bits long and contains the ACK SLOT and the ACK DELIMITER - **ACK SLOT**: All network members that agree the transfer is correct will indicate this condition during the acknowledgment bit by transmitting a dominant bit. - **ACK DELIMITER**: is the second bit of the ACK FIELD and has to be a 'recessive' bit. As consequence, the ACK SLOT is surrounded by two 'recessive' bits (CRC DELIMITER, ACK DELIMITER). ## CAN Frames - There are 4 types of CAN frames - **Data Frame**: CAN 2.0A (Standard Format), 11 bit message identifier, Transmits and receives only standard format messages. - **Remote Frame**: - **Error Frame**: - **Overload Frame**: - A diagram showing different frames with bus idle, arbitration field, control field, data field, CRC, ACK, EOF, INT, delimiter and bus idle. - **RTR BIT**: Remote Transmission Request BIT - In **DATA FRAME**'s the RTR BIT has to be 'dominant' (0). - **REMOTE FRAME**'s the RTR BIT has to be 'recessive' (1). ## Remote Frame - **Remote Frame**: - A station acting as a RECEIVER for certain data can initiate the transmission of the respective data by its source node by sending a REMOTE FRAME. - Contrary to **DATA FRAME**s, the RTR bit of **REMOTE FRAME**s is 'recessive'. There is no **DATA FIELD**. - A diagram showing different sections of **REMOTE FRAME**: - Inter Frame Space - Start of Frame - Arbitration Field - Control Field - CRC Field - ACK field - End of frame ## ERROR FRAME and OverLoad Frame - **Error Frame**: - It is transmitted when a node detects an error in a message, and causes all other nodes in the network to send an error frame as well. The original transmitter then automatically retransmits the message. - **Overload Frame**: - It is very similar to Error Frame in format, and it is transmitted by any node to buy some time if it is too busy so that it can complete its pending task. - Because of very much similarities between Error And Overload Frame, it would be tough to differentiate sometime. Keep in mind that overload frame always starts after inter-frame space(Message Completion) while the error frame doesn't wait for message completion, Any Node which detects error first starts transmission of error frame in the next bit cycle. ## Example - A diagram showing different frames: - Data frame 1 - Remote frame 3 - Data frame 2 - Error frame - Overload frame - Data frame 4 - Data frame 5 - Data frame 6 - Error frame causes data frame 4 to be resent - Overload frame causes delay before data frame 6 ## INTERFRAME SPACING - **INTERFRAME SPACING**: - DATA FRAMEs and REMOTE FRAMES are separated from preceding frames whatever type they are (DATA FRAME, REMOTE FRAME, ERROR FRAME, OVERLOAD FRAME) by a bit field called INTERFRAME SPACE. In contrast, OVERLOAD FRAMES and ERROR FRAMEs are not preceded by an INTERFRAME SPACE and multiple OVERLOAD FRAMEs are not separated by an INTERFRAME SPACE. ## CAN applications - A car diagram showing different applications of CAN protocol: - Direct fuel injection - Active suspension - Electric throttle valve control - 42-V converter - Brake-by-wire - Steer-by-wire - Electrically assisted power steering - **Automotive Applications**: common application is in-vehicle electronic networking - **Railways Applications**: Trams, light railways, and long-distance trains incorporate CAN - **Aircraft with flight-state sensors, navigation systems.** - **Aerospace applications, ranging from in-flight data analysis to aircraft engine control systems such as fuel systems, pumps, and linear actuators.** - **Medical devices.** - **Lifts and escalators use embedded CAN networks.** ## Summary - Using CAN protocol 8bytes of data can be transmitted at a time - Maximum of 1Mb/s speed can be achieved - Message based protocol - Low cost protocol with good CRC check - Multi-master Protocol - Collision can be avoided because of message priority technique. ## **Thank you** - Training by Priya R, [email protected], Transporation, Tata ELXSI

Use Quizgecko on...
Browser
Browser