CAN stands for Controller Area Network, it is defined in ISO-Standard 11898, often used in automotive environments. It acts as a nervous system inside the vehicle for enabling communication between all ECUs(Electronic Control Unit) with each other applications.
ECUs are interconnected with the CAN bus, information sensed by one ECU will be shared with other ECUs e.g., engine control module, brake control module, transmission control module, Airbag, audio system, etc. A modern car has more than 70 ECUs.
CAN bus is a Multiplexed network, all ECUs(nodes) are connected to physically conventional two wire bus. The wire is a twisted pair with a 120 Ω Terminating Resistors to avoid the reflections. This bus uses differential wired AND signals, CAN high (CANH) and CAN low (CANL), the signal will be in dominant state when CANH > CANL. A Logical 1 is said to be dominant state, while a Logical 0 bit is recessive state. ECU will broadcast the message, all other ECUs will receive the message on CAN network and each ECU will check the data and decide whether to receive or ignore it.
Communication over the CAN bus is done through CAN frames. Standard CAN frame consists of 11 bits identifier (CAN 2.0A), which is used by most of the vehicles. The extended CAN frame consists of 29-bit identifier frame (CAN 2.0B).
Structure of CAN frame.
SOF (Start of frame): Identifies start of frame.
Arbitration field: All node consists of arbitration ID which determines the priority of the messages on the bus. If multiple nodes try to transmit a message onto the CAN bus at the same time, the nodes with high priority (lowest arbitration ID) automatically gets bus access. Nodes with a lower priority must wait until the bus becomes free before trying to transmit again. The waiting devices wait until the end of the frame section is detected.
RTR: The Remote Transmission Request indicates whether a node sends data or requests dedicated data from another node.
Control field: To distinguish standard and extended frame formats, the IDE-bit (identifier extension bit) is used. A reserved bit intended for future extensions follows. The last 4 bits (DLC) identify the number of bytes included in the data field.
Data filed: The data field consists of actual data being transmitted. Its length can range from 0 to 8 byte.
CRC field: Contains a check sum that is used to identify bit errors.
ACK(Acknowledgment) field: The transmitter node sends a recessive ACK bit and every receiver node that identifies the message checks if the received message is accurate if yes it overwrites ACK bit with a dominant bit. If the receiving node does not change this bit, it means that the message may have an error and will be discarded.
EOF (End of Frame): Identifies the end of message.
To analyze CAN signals you can use CANEasy. CanEasy is a Windows based analysis and testing environment for CAN (FD), LIN and Automotive Ethernet. It can be used directly without any complex configuration or programming. CanEasy automatically simulates the behavior of all ECUs based on the communication matrix. The user can directly access all signals of the database, via generated panels and editors. Due to the automatically generated panels, the high level of automation and programmability, CanEasy can be used very quickly and flexibly. It saves effort, time and costs compared to common development tools.