Survey
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
Open Systems Interconnect (OSI) Model Interacts with software requiring network communications; identifies partners, resources and synchronization Layer 5 Session Establishes, manages, and terminates connections between computers Segment/ Datagram Layer 4 Transport Provides transparent transfer of data between hosts; end-toend error recovery and flow control Packet Layer 3 Network Provides switching, routing, addressing, error handling, congestion control, and packet fragmentation and sequencing Frame Layer 6 Formats and encrypts data; unifies syntax and semantics Presentation Layer 2 Data Link Encodes/decodes data packets into bits Logical Link Control: handles error in physical layer, flow control and frame synchronization Media Access Control: defines transmission protocol and management Bit Media Host Data Layer 7 Application Layer 1 Physical Carries bit stream; defines physical characteristics such as voltage/light levels and frequencies Controller Area Network Standard • Defines Physical Layer (L1) • Defines Data Link Layer (L2) • Defines how to Transport (L4) small (8 bytes) datagrams • No flow control (L3 and L4) • No sequencing and fragmentation (L3) • No Session (L5) or Presentation (L6) specs • Different Higher Layer Protocols (HLPs) handle the rest Common CAN HLPs • • • • • • • CanKingdom CANopen CCP/XCP DeviceNet SAE J1939 OSEK SDS • These define the “Object” Layer (layers not defined by the CAN standard) CAN Physical Layer – Voltages • • • • Open collector (wired-OR); NRZ Dominant bits are logical 0 Recessive bits are logical 1 Provides arbitration free transmission Automatic Collision Detection Transmitter B Transmitter A Dominant (0) Recessive (1) Dominant (0) Dominant (0) Dominant (0) Recessive (1) Dominant (0) Recessive (1) If A transmits recessive (1) and sees dominant (0) from B, A knows collision occurred and stops transmitting (will retry 6 clock cycles after end of dominant message) CAN Physical Layer – Timing • Each node has its own clock • Synchronization done by dividing bit time into four segments Bit Time Sync Propagation Phase Segment 1 Phase Segment 2 Clock • Phases 1 & 2 adjusted based on network and node conditions • Sample between Phase 1 & 2 CAN Data Link Layer • Specifies four message types • Data: contains data for transmission • Data Request (Remote): requests transmission of a specific identifier • Error: transmitted by any node detecting an error • Overload: injects a delay between data and/or remote frames CAN Data Frames Field Bit Length Description Start-of-Frame 1 Signals start of frame transmission Identifier 11 Unique id for data (embedded priority) Remote Trans. Request (RTR) 1 Optional, but must be dominant (0) ID Extension bit (IDE) 1 Optional, but must be dominant (0) Reserved bit (r0) 1 Reserved, but must be dominant (0) Data Length Code (DLC) 4 Number of data bytes (0-8) Data Field 0-8 bytes Actual data CRC 15 Cyclic redundancy check CRC Delimiter 1 Must be recessive (1) ACK Slot 1 Transmit recessive, receiver sends dominant ACK Delimiter 1 Must be recessive (1) End-of-Frame (EOF) 7 Must be recessive (1) For Data Request RTR = 1 (recessive) and DLC = 0 (data field empty) Error Frames • Active error generated by transmitter • Passive error generated by receiver • Error Types – Bit: Send recessive, read dominant – Stuff: more than 5 consecutive bits of same polarity – CRC: computed and received CRCs not equal – Form: invalid bits in field – ACK: no acknowledgement from receiver Overload Frames • Two overload conditions – Internal conditions of receiver – it can’t keep up – Dominant bit detected during expected intermission (interframe space) Byte Data Link Controller (BDLC) • Physical Layer has three forms – 2-wire: 10.4 Kbps, UART, NRZ (Chrysler) – 2-wire: 41.6 Kbps pulse width modulated (Ford) – 1-wire: 10.4 Kbps variable pulse width (GM) • High level 4.25-20 V; Low level < 3.5 V • Buses use weak pull-down, driver pulls it high • High signals are dominant • High and low values are bit symbols with specific times Active Passive Logic 0 Logic 1 128 s high 64 s low 64 s high 128 s low BDLC – Data Link Layer SOF Header Field Data Length CRC EOD IFR CRC EOF Description Start-of-Frame (SOF) 200 s high Signals start of frame transmission Header 1 or 3 bytes Data variable CRC 1 byte End-of-Data (EOD) In-Frame Response (IFR) CRC End-of-Frame (EOF) 200 s low Message priority; IFR required/disallowed; addressing mode; and message type Actual data Cyclic Redundancy Check for data Signals end of data; allows receivers to respond variable Receivers may append response here 1 byte Cyclic Redundancy Check for response 80 s low Signals end of frame 3 byte headers contain destination and source addresses