Transcription of A CAN Physical Layer Discussion - Microchip Technology
1 2002 Microchip Technology 1 MAN228 INTRODUCTIONMany network protocols are described using the sevenlayer Open System Interconnection (OSI) model, asshown in Figure 1. The Controller Area Network (CAN)protocol defines the Data Link Layer and part of thePhysical Layer in the OSI model. The remaining physi-cal Layer (and all of the higher layers) are not defined bythe CAN specification. These other layers can either bedefined by the system designer, or they can be imple-mented using existing non-proprietary Higher LayerProtocols (HLPs) and Physical Data Link Layer is defined by the CAN specifica-tion.
2 The Logical Link Control (LLC) manages the over-load control and notification, message filtering andrecovery management functions. The Medium AccessControl (MAC) performs the data encapsulation/decap-sulation, error detection and control, bit stuffing/de-stuffing and the serialization and Physical Medium Attachment (PMA) and MediumDependent Interface (MDI) are the two parts of thephysical Layer which are not defined by CAN. ThePhysical Signaling (PS) portion of the Physical Layer isdefined by the CAN specification.
3 The system designercan choose any driver/receiver and transport mediumas long as the PS requirements are International Standards Organization (ISO) hasdefined a standard which incorporates the CAN speci-fication as well as the Physical Layer . The standard,ISO-11898, was originally created for high-speed in-vehicle communications using CAN. ISO-11898 speci-fies the Physical Layer to ensure compatibility betweenCAN CAN controller typically implements the entire CANspecification in hardware, as shown in Figure 1.
4 ThePMA is not defined by CAN, however, it is defined byISO-11898. This document discusses the MCP2551 CAN transceiver and how it fits in with the 1:CAN AND THE OSI MODELA uthor:Pat RichardsMicrochip Technology LinkPhysical Medium AttachmentPhysical SignalingMedium Dependent Interface- Bit encoding/decoding- Bit timing/synchronization- Driver/receiver characteristics- Connectors/wiresLogical Link Control (LLC)Medium Access Control (MAC)- Data encapsulation/decapsulation- Acceptance filtering- Overload notification- Recovery management- Frame coding (stuffing/de-stuffing)
5 - Error detection/signaling- Serialization/deserializationDefined byISO118987- Layer OSICAN ControllerTransceiverMCP2551A CAN Physical Layer DiscussionAN228DS00228A-page 2 Preliminary 2002 Microchip Technology OVERVIEWISO11898 is the international standard for high-speedCAN communications in road vehicles. ISO-11898-2specifies the PMA and MDA sublayers of the PhysicalLayer. See Figure 3 for a representation of a commonCAN node/bus as described by LevelsCAN specifies two logical states: recessive and domi-nant.
6 ISO-11898 defines a differential voltage to repre-sent recessive and dominant states (or bits), as shownin Figure the recessive state ( , logic 1 on the MCP2551 TXD input), the differential voltage on CANH and CANLis less than the minimum threshold (< receiverinput or < transmitter output)(See Figure 4).In the dominant state ( , logic 0 on the MCP2551 TXD input), the differential voltage on CANH and CANLis greater than the minimum threshold. A dominant bitoverdrives a recessive bit on the bus to achievenondestructive bitwise 2:DIFFERENTIAL BUSC onnectors and WiresISO-11898-2 does not specify the mechanical wiresand connectors.
7 However, the specification doesrequire that the wires and connectors meet the electri-cal specification also requires 120 (nominal) termi-nating resistors at each end of the bus. Figure 3 showsan example of a CAN bus based on 3:CAN BUSV oltage Level (V)Time (t)VDIFFD ominantRecessiveRecessiveCANHCANL120 120 MCUCAN ControllerTransceiverNodeNode 2002 Microchip Technology 3AN228 FIGURE 4:ISO11898 NOMINAL BUS LEVELSR obustnessThe ISO11898-2 specification requires that a compliantor compatible transceiver must meet a number of elec-trical specifications.
8 Some of these specifications areintended to ensure the transceiver can survive harshelectrical conditions, thereby protecting thecommunications of the CAN node. The transceivermust survive short circuits on the CAN bus inputs from-3V to +32V and transient voltages from -150V to+100V. Table 1 shows the major ISO11898-2 electricalrequirements, as well as MCP2551 1:COMPARING THE MCP2551 TO Voltage on CANH and CANL-3+32-40+40 VExceeds ISO-11898 Transient voltage on CANH and CANL-150+100-250+250 VExceeds ISO-11898 Common Mode Bus + +12 VExceeds ISO-11898 Recessive Output Bus Voltage+ + + + ISO-11898 Recessive Differential Output Voltage-500+50-500+50mV Meets ISO-11898 Differential Internal Resistance1010020100k Meets ISO-11898 Common Mode Input Meets ISO-11898 Differential Dominant Output Voltage+ + + + ISO-11898 Dominant Output Voltage (CANH)
9 + + + + ISO-11898 Dominant Output Voltage (CANL)+ + + + ISO-11898 Permanent Dominant Detection (Driver)Not msPower-On Reset and Brown-Out DetectionNot RequiredYe s- -AN228DS00228A-page 4 Preliminary 2002 Microchip Technology LengthsISO11898 specifies that a transceiver must be able todrive a 40m bus at 1 Mb/s. A longer bus length can beachieved by slowing the data rate. The biggest limita-tion to bus length is the transceiver s DELAYThe CAN protocol has defined a recessive (logic 1 )and dominant (logic 0 ) state to implement a non-destructive bit-wise arbitration scheme.
10 It is this arbitra-tion methodology that is affected most by propagationdelays. Each node involved with arbitration must beable to sample each bit level within the same bit example, if two nodes at opposite ends of the busstart to transmit their messages at the same time, theymust arbitrate for control of the bus. This arbitration isonly effective if both nodes are able to sample duringthe same bit time. Figure 5 shows a one-way propaga-tion delay between two nodes. Extreme propagationdelays (beyond the sample point) will result in invalidarbitration.