In the previous article, we briefly introduced the content of the CAN bus protocol. Now let's take a look at the physical layer and packet type of the CAN bus protocol. Based on my previous learning experience, I know that in the protocol, we usually use the packet structure and frame form for data transmission. The CAN Bus Protocol has a similar definition.
The physical layer of the CAN bus is the driving circuit connecting the ECU to the bus. The total number of ECUs is limited by the electrical load on the bus. The physical layer defines the transmission process of physical data between nodes on the bus. It mainly refers to the implementation standards of connection media, line electrical characteristics, data encoding/decoding, bit timing and synchronization. Bosch can basically does not define the physical layer, but it is defined based on the can iso standard. When designing a CAN System, the physical layer has a lot of options, but it must ensure the non-destructive BIT arbitration requirements of the media access layer in the CAN bus protocol, that is, in the case of bus competition, therefore, the physical layer must support the state characteristics of the hidden and dominant bits in the CAN bus. When no explicit bit is sent, the bus is in the recessive state. When idle, the bus is in the recessive state. When one or more nodes send the dominant bit, the dominant bit overwrites the hidden bit, make the bus dominant. On this basis, the physical layer mainly depends on the transmission speed requirements.
In CAN, the Physical Layer CAN be divided into three layers: Physical Layer Signaling (PLS) and Physical MediaAttachment (PMA) media Dependent: Inter-face, MDI layer. The PLS and the data link layer functions are completed by the CAN controller, the PMA layer function is completed by the CAN transceiver, and the MDI layer defines the characteristics of cables and connectors. Currently, the CAN controller and transceiver circuit are integrated into the microprocessor that supports CAN, such as MC68HC908GZl6. PMA and MDI have many different international or national or industrial standards. They CAN also be customized. The high-speed CAN sending/receiver standard defined by isoll898. Theoretically, the number of nodes on the CAN bus is almost unlimited, and there CAN be up to 2000 nodes. In fact, due to the limitation of electrical characteristics, a maximum of 100 nodes CAN be connected.
The data Link layer of CAN is its core content. The Logical Link control (LLC) provides functions such as filtering, overload notification, management and recovery, and Medium Aeeess control, MAC) Sub-layer to complete data packaging/unpacking, frame encoding, media access management, error detection, error signaling, response, serial and conversion functions. These functions focus on the information frame transfer process.
Message Type
In CAN2.0B, the CAN bus protocol has two different frame formats. The difference is that the length of the identifier domain is different. Frames containing ll-bit identifiers are called standard frames, frames with 29-bit identifiers are called extended frames. As described in the CAN1.2 protocol, the standard and remote frame formats of the two versions are equivalent, while the extended format is a new feature of the CAN2.0B protocol. To make the controller design relatively simple and do not require full extension formats, the new controller must support standard formats without any restrictions. However, no matter which frame format
There are four different types of frames during transmission:
(1) Data frame transfers Data from the transmitter to the receiver.
(2) the Remote frame bus Unit sends a Remote frame and requests a data frame with the same identifier.
(3) An Error frame is triggered when any unit detects a bus Error.
(4) Overload frames provide additional latency between adjacent data frames or remote frames.
There is an isolated domain between a data frame or remote frame and the previous frame, that is, the interval between frames. The standard frame and extended frame formats can be used for data frames and remote frames.