![]() | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
|
How Automotive Networks Are Configured, Part 2Posted 2/15/2006By Jared Busen, Lawrence E. Jeralds and Ben Komnick
Protocol To access the network, both CAN and ethernet use what's called "carrier sense multiple access" with collision detection (CSMA/CD). "Carrier sense" means a controller will sense that the network is quiet enough to handle transmission and only then transmit. This is also called "contention-based technology" since a controller has to contend for a chance to communicate. Two controllers could broadcast at the same time, corrupting the frames, or packet of information. "Multiple access" refers to multiple controllers having access to the network. "Collision detection" is what's used to indicate two controllers transmitting at the same time, causing a frame collision. As a device is transmitting on the network, it is monitoring the network at the same time. If it senses a different signal on the network than the signal it is broadcasting, a collision is occurring. CAN is typically written as using CSMA/CDCR, with the CR meaning "collision resolution," which is how CAN decides which controller is allowed to continue communication if multiple controllers do broadcast simultaneously. Other CAN terms are CSMA/CD-AMP and CSMA/CD-NDA. AMP means "arbitration with message priority" and NDA means "non-destructive arbitration," which indicates the same process as CR expressed in different terminology. Once the collision detection registers a collision, the collision resolution corrects the error. CAN collision resolution (CR) operates using a non-destructive bit-wise arbitration. On single wire CAN the idle (no communication) state of the bus is voltage high. When a controller wants to communicate, it initiates a voltage low condition to start communication and then switches back and forth between voltage low and voltage high for a low bit or high bit, respectively. The low bit is the dominant bit; the high bit is the recessive bit. The non-destructive bit-wise arbitration uses the dominant and recessive bits to determine transmission priority. The controller with the most dominant bits in a row is considered to have higher priority and will be allowed to continue its transmission, which is known as the arbitration function. As stated earlier, each controller monitors the bus. When two CAN controllers transmit at the same time, they each start by pulling the bus low. When they try to bring the bus back up to voltage high (send a recessive bit), they will see that the bus stayed at a low voltage (a dominant bit). This means that a higher priority controller is communicating and the lower priority controller stops its communication. Since the dominant controller never had to stop transmitting, it is considered non-destructive. Air bags or the anti-lock brake system would have a higher priority than would audio controls and therefore would be allowed to continue their communication.
The data frame is the frame that contains the information a vehicle needs to operate, such as vehicle speed or required stiffness of the suspension. The data frame could be a standard version or extended, the extended having larger frame format. The larger frame gives greater capabilities with arbitration. Remote frame allows a controller to request vehicle information from another controller. If a controller needs more time to process the frame, it will send an overload frame so that no new information is sent until the controller can accept the new information. An error frame is generated if a frame on the bus has been corrupted. CAN corrects the corrupt frame by retransmitting the frame. CAN uses broadcast technology to transmit messages. A message is broadcast to all controllers on the network; as opposed to being destined for one controller in particular. In the beginning of each frame there is a section that identifies the vehicle data in the frame. Each controller that receives the frame will decide on its own if it needs to process the frame or to disregard the frame. Ethernet uses frames, but does not use five different formats. There is only one frame format for ethernet; it is used for all needs of the network. The ethernet frame is sent over the network to all devices. Contained in the beginning of the frame is information stating its origin and destination address. Just like CAN, ethernet can broadcast a frame intended for every device on the network. The CAN broadcast can be ignored by any controller that decides it doesn't need the data in that particular frame; however, an ethernet broadcast is intended for all devices to receive and process. It is also possible to multicast, meaning to send the frame to selected multiple devices. Fault Confinement A big advantage of CAN over ethernet is its use of fault confinement. Fault confinement allows for a defective controller to either restrict its access or to remove itself from the network. If a defective controller continues to broadcast, it could dramatically slow down network operation or cause it to cease all together. There are three states in which a controller can operate: error active, error passive and off-bus. Error active is the normal operating state of a controller. The controller has normal operating parameters for bus access and receiving and transmitting operations without restrictions. If a controller has recorded enough errors either in transmitting or receiving it will go into error passive state. The controller can then receive like normal; however, it must wait a predetermined amount of time after its transmission before it can retransmit. This wait prevents a controller from flooding the network with frames. If the controller makes enough transmit errors it will go into off-bus state. When in this state, the controller will no longer participate in bus communication. The two-wire configuration of CAN B is designed so that if one of the wires opens, or if the two wires are shorted together, it will then function as a single wire CAN; even though CAN C is configured for two wires it does not have this ability. The user will never notice the operational difference. The error detection and resolution combined with the fault confinement are so well designed that with every two million hours of bus operation at 25 percent of its communication capacity - which is a normal amount of traffic - only one error will go undetected. The fault tolerance on CAN is necessary because of the environment in which it is designed to function. A car is subject to severe temperature ranges and severe vibrations. A lot of fault tolerance is built in because safety features on the car rely upon the CAN network to be functional. The computers that use ethernet are stationary and typically have a narrow window of operating temperatures. Ethernet is not nearly as robust because the environment it operates in isn't nearly as harsh. Despite CAN being a more robust and stable network, it will not take the place of ethernet in personal computer networking. The higher speeds of ethernet make it more ideal for Internet use. The star topology allows for a much greater expansion of the network, which makes the Internet and building wide networks possible.
|
|||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||