Thursday 9 November 2017

CAN Frame message format



The Start of Frame (SOF) is a dominant 0 to tell all the other ECUs that a message is on the way.
 Identifier field (ID). This is usually a functional address (e.g. Engine parameters, Wheel speeds, etc.). In some applications, the ID can contain source and destination addresses. The value of the Identifier determines the message priority.
The Remote Transfer Request (RTR) bit allows an ECU to request an ID from another ECU that has not been transferred within a specified time period. 
The Control Field contains the Data Length Code (DLC). The DLC simply informs of the length of the data field. This can be a value between 0 and 8 Bytes.It is always in Bytes. Even if the node wants to send just one bit, a Byte must be assigned. There can be 0 Byte frames. The RTR message is a 0 Byte message. In some protocols, a 0 Byte message can be used as health/heartbeat message.

The Data Field contains the information to be relayed to other ECUs, e.g. the Engine Parameters message may contain info such as Engine speed, Water & Oil Temp, etc.

The Cyclic Redundancy Check (CRC) is a 15 bit sequence used for checking the integrity of the data. Sometimes known as Check Sum, it is a common error checking method in digital communication.
The way it works is that the transmitting node will generate a 15 bit digital sequence based on the prior data (ID, Control, and Data fields). Once the frame is brought into the receiver node, that node will generate its own CRC sequence based on the received info (ID, Control, and Data fields).
The receiver's CRC is then compared with the transmitted CRC. If there is a match, the data is deemed OK, and the Acknowledge is generated. If they do not match, there has been corruption of the data, and the receiver node will generate an Error Frame.

The Acknowledge (ACK) slot is a single bit generated by all receiving CAN node to indicate that their CRC processes are OK.

End-of-Frame (EOF). EOF is a seven bit recessive sequence at the end of the CAN frame. This, along with the minimum of 3 bits of Interframe Space, give enough time delay to allow for the next access of CAN messages. If there are back-to-back CAN messages, you will observe a minimum of 11 bits of Recessive before the next CAN frame. 
      

No comments:

Post a Comment