0% found this document useful (0 votes)
351 views28 pages

CAN Transfer Protocol

This document provides an overview of the network layer in CAN-based vehicle networks. The network layer specifies the protocol for meeting requirements of CAN-based vehicle network systems. It defines how data is exchanged between network nodes through segmentation of messages that do not fit in a single frame. The network layer functions include message segmentation, reassembly, and flow control. It fits between the application layer and the data link layer to allow diagnostic services between a tester and ECU.

Uploaded by

Venkatesh Palla
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
351 views28 pages

CAN Transfer Protocol

This document provides an overview of the network layer in CAN-based vehicle networks. The network layer specifies the protocol for meeting requirements of CAN-based vehicle network systems. It defines how data is exchanged between network nodes through segmentation of messages that do not fit in a single frame. The network layer functions include message segmentation, reassembly, and flow control. It fits between the application layer and the data link layer to allow diagnostic services between a tester and ECU.

Uploaded by

Venkatesh Palla
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 28

Welcome to Internal Training Program CAN Network Layer

Agenda
What is Network Layer
Why Network Layer

Advantages of CAN
Road Vehicle Diagnostics on CAN Network Layer Functions Types of Frames in the Network Layer Structure of Request and Response Messages Network Layer Timing Parameters Examples

What is Network Layer


It Specifies protocol to meet the requirements of CAN-based vehicle network systems on controller area networks . It has been defined in accordance with the diagnostic services established in ISO 14229-1 and ISO 15031-5

Why Network Layer


The exchange of data between network nodes, e.g. from ECU to ECU, or between external test equipment and an ECU. If the data to be transferred do not fit into a single CAN frame, a segmentation method is provided by Network Layer.

Advantages of CAN
Can is a multi-master Bus Theoriticaly No limitation on the number of nodes Prioritization of messages through Identifiers Multicast reception with the time synchronization System wide data consistency Error detection and error signaling automatic retransmission of corrupted messages as soon as the bus is idle again Distinction between temporary errors and permanent failures of nodes and autonomous switching off of defect nodes

Road Vehicle Diagnostics on CAN

Application Layer

Tester

Request Response

ECU

Application Layer talks about the Services available between the Tester Unit and the ECU (called Diagnostic Services)

Tester Application Layer Service Service Request Conformation Physical Layer

ECU Application Layer +ve or -ve Response Service Indication Physical Layer

Structure of Request and Response Messages


Request Message RA TA SA Positive Response RA TA SA Parameter Bytes Result Bytes Reason for NR

(optional)

TA_type

SID

(optional)

TA_type

Response ID

Negative Response RA TA SA
SA- Source Address RA- Remote Address SID- Service Identifier

(optional)

TA_type

NR

SID

TA- Target Address TA_type- Addressing type (Physical or Functional) NR- Negative Response

Road Vehicle Diagnostics on CAN

Network Layer

Network Layer Functions

Message Segmentation

Message Re-assembly
Flow-Control

10

How the Network Layer fits in.

Tester

Appl Layer
Session Layer
Re-Assembly

Services Maintain Diag Session

ECU

Appl Layer
Session Layer
Re-Assembly

Network Layer
Segmentation

Flow Control

Network Layer
Segmentation

Data link Layer Physical Layer

Data link Layer Physical Layer


11

Types of Frames in the Network Layer


Unsegmented Message Transmission:
Single Frame (SF): Used in short messages which can be transmitted in a Single CAN message.

Segmented Message Transmission:


First Frame (FF):First Frame to be transmitted as part of Segmented message transmission. Consecutive Frame (CF):The Remainder of the message Frames that are sent by the Message transmitter following the First frame. Flow-Control Frame (FC):Frame sent by the message- Receiver periodically to regulate the rate of arrival of the segmented messages.

12

Unsegmented Message

Segmented Message Transmission

13

Transfer of Data between Network Layers of Two or more Nodes takes place through the Network-Protocol Data Units (N_PDU)

N_PDU
Address Information N_AI Protocol Control Info N-PCI Data Field N_Data

N_AI parameters:Used to identify the Following: 1. Source address, Target address of message senders and recipients 2.Communication model for the message and 3.Optional Address extension

N_PCI Parameters: Used to identify the Type of N_PDU and other necessary Control Information

N_Data Parameters: Consists of the Data Bytes to be Transmitted to the other Node.

14

N_AI

N_SA (Source Address)

N_TA (Target Address)

N_TAtype (Physical/Functional Address)

N_AE (Extended Address-Optional)

For Long messages that make use of Segmented Message Transmission, the N_AI information has to be copied to every Frame Segment.

15

N_PCI

16

Single Frame N_PCI

17

First Frame N_PCI

12 (4+8) bytes can be used to represent Data Length. Max Data Length= 4095 bytes

18

Consecutive Frame N_PCI

Sequence Number (SN):Used in the Consecutive Frame N_PDU to specify the order of the consecutive frames. Rules applying to the Sequence Number (SN):

1.Starts with zero (0) for all segmented messages.


2.For the First Frame, SN=0 by default. 3.SN is incremented by 1 for each Consecutive frame transmitted during a segmented message transmission. 4.When SN reaches 15 (Fh), it shall wraparound and be set to zero (0) for the Consecutive Frame (CF).
19

Flow Control N_PCI

Flow Status

20

Block Size (BS) : Byte 2 of the FC N_PCI

21

Separation Time (Stmin): Byte 3 of FC N_PCI

22

Network Layer Timing Parameters

23

Example 1 Diagnostic message transmission on CAN Unsegmented Message Transmission


CAN message flow

User Interface for Reading Request / Response

Request

Response
s

24

Example 2 Diagnostic message transmission on CAN


Request

Segmented Message Transmission


CAN message flow

Response

25

Documents for Reference


1.Documents on Road Vehicle Diagnostics on CAN ISO 15765-1 : General Information ISO 15765-2 : Network Layer ISO 15765-3 : Application Layer

2. KWP Specifications ISO 14230-1 to ISO14230-4


3. CAN Specification Documents Part A and Part B

26

Questions??

27

Thank you

28

You might also like