CAN bus protocol:
Covering the transport layer, data link layer, and physical layer defined by OSI
Physical Layer:
It determines the bit encoding method (NRZ encoding, 6-Bit Insert filling bits), bit sequence (bit timing, bit sampling), and synchronization mode (Synchronization Based on the synchronization segment SS, but specifically, the electrical characteristics of the signal level, communication speed, sampling points, drivers and bus, and the form of connectors are not defined,The user shall determine it by himself;
Transport Layer:
Defines the re-sending control;
Data link layer:
The data link layer is divided into two child layers: LLC (Logical Link Control) and MAC (Media Access Control;
The sublayer of the LLC executes the selection of received messages (point-to-point, broadcast, multicast), overload notification (notification receipt preparation is still complete), and error recovery function (resend );
MAC layer: data frame (four frame types), connection mode control (competitive mode), message arbitration (ID arbitration), and fault diffusion suppression (automatic identification of temporary errors and continuous errors, troubleshooting node), Error Notification (CRC error, filling location error, bit error, Ack error, format error), error detection, response method (ACK, NACK ), communication Mode (Half Duplex) and other settings;
The MAC Sub-layer is the core of the CAN protocol. The function of the data link layer is to form meaningful messages from the physical layer and provide transmission control procedures such as error control. The function of the data link layer is usually executed in the hardware of the CAN controller;
CAN bus Basics