can transfer protocol
TRANSCRIPT
![Page 1: CAN Transfer Protocol](https://reader033.vdocument.in/reader033/viewer/2022061107/544a37f6b1af9f6d668b46e4/html5/thumbnails/1.jpg)
1
Welcome to Internal Training Program
CAN Network Layer
![Page 2: CAN Transfer Protocol](https://reader033.vdocument.in/reader033/viewer/2022061107/544a37f6b1af9f6d668b46e4/html5/thumbnails/2.jpg)
2
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
![Page 3: CAN Transfer Protocol](https://reader033.vdocument.in/reader033/viewer/2022061107/544a37f6b1af9f6d668b46e4/html5/thumbnails/3.jpg)
3
What is Network Layer
It Specifies protocol to meet the requirements of CAN-based vehiclenetwork systems on controller area networks . It has been defined in accordance with the diagnostic services established in ISO 14229-1 and ISO 15031-5
![Page 4: CAN Transfer Protocol](https://reader033.vdocument.in/reader033/viewer/2022061107/544a37f6b1af9f6d668b46e4/html5/thumbnails/4.jpg)
4
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 intoa single CAN frame, a segmentation method is provided by Network Layer.
![Page 5: CAN Transfer Protocol](https://reader033.vdocument.in/reader033/viewer/2022061107/544a37f6b1af9f6d668b46e4/html5/thumbnails/5.jpg)
5
Advantages of CAN
• Can is a multi-master Bus
• Prioritization of messages through “Identifiers”
•Theoriticaly No limitation on the number of nodes
• 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
![Page 6: CAN Transfer Protocol](https://reader033.vdocument.in/reader033/viewer/2022061107/544a37f6b1af9f6d668b46e4/html5/thumbnails/6.jpg)
6
Road Vehicle Diagnostics on CAN
Application Layer
Tester ECURequest
Response
![Page 7: CAN Transfer Protocol](https://reader033.vdocument.in/reader033/viewer/2022061107/544a37f6b1af9f6d668b46e4/html5/thumbnails/7.jpg)
7
Tester Application Layer
Physical Layer
ECU Application Layer
Physical Layer
Service Request
ServiceIndication
+ve or -veResponse
ServiceConformation
Application Layer talks about the Services available between the Tester Unit and the ECU (called Diagnostic Services)
![Page 8: CAN Transfer Protocol](https://reader033.vdocument.in/reader033/viewer/2022061107/544a37f6b1af9f6d668b46e4/html5/thumbnails/8.jpg)
8
Structure of Request and Response Messages
SA- Source Address TA- Target AddressRA- Remote Address TA_type- Addressing type (Physical or Functional)SID- Service Identifier NR- Negative Response
Request Message
Positive Response
TA TA_typeSA RA(optional)
ResponseID
Result Bytes
TA TA_typeSA RA(optional)
NR SID
TA TA_typeSA RA(optional)
SIDParameter
Bytes
Negative ResponseReason for
NR
![Page 9: CAN Transfer Protocol](https://reader033.vdocument.in/reader033/viewer/2022061107/544a37f6b1af9f6d668b46e4/html5/thumbnails/9.jpg)
9
Road Vehicle Diagnostics on CAN
Network Layer
![Page 10: CAN Transfer Protocol](https://reader033.vdocument.in/reader033/viewer/2022061107/544a37f6b1af9f6d668b46e4/html5/thumbnails/10.jpg)
10
Network Layer Functions
Message Segmentation
Message Re-assembly
Flow-Control
![Page 11: CAN Transfer Protocol](https://reader033.vdocument.in/reader033/viewer/2022061107/544a37f6b1af9f6d668b46e4/html5/thumbnails/11.jpg)
11
How the Network Layer fits in….
Appl Layer
Session LayerSession Layer
Appl Layer
Data link Layer Data link Layer
Physical LayerPhysical Layer
Network Layer Network Layer
Tester ECUServices
Maintain Diag Session
Flow Control
Segmentation
Re-Assembly
Segmentation
Re-Assembly
![Page 12: CAN Transfer Protocol](https://reader033.vdocument.in/reader033/viewer/2022061107/544a37f6b1af9f6d668b46e4/html5/thumbnails/12.jpg)
12
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.
![Page 13: CAN Transfer Protocol](https://reader033.vdocument.in/reader033/viewer/2022061107/544a37f6b1af9f6d668b46e4/html5/thumbnails/13.jpg)
13
Unsegmented Message Segmented Message Transmission
![Page 14: CAN Transfer Protocol](https://reader033.vdocument.in/reader033/viewer/2022061107/544a37f6b1af9f6d668b46e4/html5/thumbnails/14.jpg)
14
Transfer of Data between Network Layers of Two or more Nodes takes place through the Network-Protocol Data Units (N_PDU)
Address Information Protocol Control Info Data Field
N_AI N-PCI N_Data
N_PDU
N_AI parameters:Used to identify the Following:1. Source address, Target address of message senders and recipients2.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 DataBytes to be Transmittedto the other Node.
![Page 15: CAN Transfer Protocol](https://reader033.vdocument.in/reader033/viewer/2022061107/544a37f6b1af9f6d668b46e4/html5/thumbnails/15.jpg)
15
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 MessageTransmission, the N_AI information has to be copied to every Frame Segment.
![Page 16: CAN Transfer Protocol](https://reader033.vdocument.in/reader033/viewer/2022061107/544a37f6b1af9f6d668b46e4/html5/thumbnails/16.jpg)
16
N_PCI
![Page 17: CAN Transfer Protocol](https://reader033.vdocument.in/reader033/viewer/2022061107/544a37f6b1af9f6d668b46e4/html5/thumbnails/17.jpg)
17
Single Frame N_PCI
![Page 18: CAN Transfer Protocol](https://reader033.vdocument.in/reader033/viewer/2022061107/544a37f6b1af9f6d668b46e4/html5/thumbnails/18.jpg)
18
First Frame N_PCI
12 (4+8) bytes can be used to represent Data Length.
Max Data Length= 4095 bytes
![Page 19: CAN Transfer Protocol](https://reader033.vdocument.in/reader033/viewer/2022061107/544a37f6b1af9f6d668b46e4/html5/thumbnails/19.jpg)
19
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).
![Page 20: CAN Transfer Protocol](https://reader033.vdocument.in/reader033/viewer/2022061107/544a37f6b1af9f6d668b46e4/html5/thumbnails/20.jpg)
20
Flow Control N_PCI
Flow Status
![Page 21: CAN Transfer Protocol](https://reader033.vdocument.in/reader033/viewer/2022061107/544a37f6b1af9f6d668b46e4/html5/thumbnails/21.jpg)
21
Block Size (BS) : Byte 2 of the FC N_PCI
![Page 22: CAN Transfer Protocol](https://reader033.vdocument.in/reader033/viewer/2022061107/544a37f6b1af9f6d668b46e4/html5/thumbnails/22.jpg)
22
Separation Time (Stmin): Byte 3 of FC N_PCI
![Page 23: CAN Transfer Protocol](https://reader033.vdocument.in/reader033/viewer/2022061107/544a37f6b1af9f6d668b46e4/html5/thumbnails/23.jpg)
23
Network Layer Timing Parameters
![Page 24: CAN Transfer Protocol](https://reader033.vdocument.in/reader033/viewer/2022061107/544a37f6b1af9f6d668b46e4/html5/thumbnails/24.jpg)
24
CAN message flow
User Interface for Reading Request / Response
Example 1 – Diagnostic message transmission on CAN
Unsegmented Message Transmission
s
Request
Response
![Page 25: CAN Transfer Protocol](https://reader033.vdocument.in/reader033/viewer/2022061107/544a37f6b1af9f6d668b46e4/html5/thumbnails/25.jpg)
25
Request
Response
CAN message flow
Example 2 – Diagnostic message transmission on CAN
Segmented Message Transmission
![Page 26: CAN Transfer Protocol](https://reader033.vdocument.in/reader033/viewer/2022061107/544a37f6b1af9f6d668b46e4/html5/thumbnails/26.jpg)
26
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
![Page 27: CAN Transfer Protocol](https://reader033.vdocument.in/reader033/viewer/2022061107/544a37f6b1af9f6d668b46e4/html5/thumbnails/27.jpg)
27
Questions??
![Page 28: CAN Transfer Protocol](https://reader033.vdocument.in/reader033/viewer/2022061107/544a37f6b1af9f6d668b46e4/html5/thumbnails/28.jpg)
28
Thank you