Introduction to UDS Basics

Publisher:genius5Latest update time:2024-11-12 Source: elecfans Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Introduction to UDS

UDS (Unified Diagnostic Services) is a universal diagnostic service standard used for the diagnosis and debugging of automotive electronic control units (ECUs). UDS is a communication protocol defined by the ISO 14229 standard that can communicate on multiple buses such as CAN and LIN.


The UDS protocol defines a set of standard diagnostic services, including session control, diagnostic request, diagnostic response, and ECU programming. Through the UDS protocol, the diagnostic tool can send specific requests to the ECU, obtain the ECU's status information and fault codes, and diagnose and solve fault problems.


The UDS protocol is widely used in the diagnosis and debugging of automotive electronic control systems and has become an important part of modern automobile manufacturing.

The simple understanding is to conduct a question-and-answer session in accordance with the UDS protocol format, but the UDS protocol is complex and difficult to understand. Master the basic concepts and principles and know how to consult the standards. You don't need to remember them deliberately at the beginning. You will remember them after reading them many times.

The diagnostics shared in this article are all CAN bus diagnostic services, and the articles shared later are also

picture

Why UDS is needed

Before the advent of the automotive diagnostic protocol, if your car broke down, you could only rely on the mechanic's experience, because the car parts would not tell you what was wrong with it.

But with the diagnostic protocol, once a component has a problem or has had a problem, it will store the fault information in the memory, and the repairman can read the fault information through the communication bus. For example, after an ECU experiences a high temperature or undervoltage fault, it will store the DTC (diagnostic trouble code) representing the fault, and optionally save the snapshot information when the fault occurs (such as the vehicle speed at that time, the voltage value read, etc.). The snapshot information helps test engineers and after-sales engineers find the cause of the fault. This greatly improves the repair efficiency of the repairman.

UDS Features

  1. Support multiple buses: The UDS protocol can communicate on multiple buses such as CAN and LIN, and has strong applicability.

  2. Improve diagnostic efficiency: The UDS protocol defines a set of standard diagnostic services that can improve the compatibility and efficiency of diagnostic tools.

  3. Increase diagnostic functions: UDS protocol supports advanced diagnostic functions such as ECU programming, which can meet more complex diagnostic needs

UDS format introduction

Diagnostic Request format:

Format 1: [Service Identifier] + [Sub-function]

Format 2: [SID] + [DID]

Format 3: [SID] + [Sub-function] + [DID]

picture

Common diagnostic services

Positive Response:

Diagnostic response is divided into positive and negative. A positive response means that the diagnostic request sent by the diagnostic instrument can be executed, while a negative response means that the ECU cannot execute the diagnostic request sent by the diagnostic instrument for some reason, and the reason for the failure to execute is contained in the negative response message.

Format 1: [SID + 0x40] + [Sub-function]

Format 2: [SID + 0x40] + [DID]

Format 3: [SID + 0x40] + [Sub-function] + [DID]

Negative Response:

The format of Negative Response is fixed to 3 bytes. The first byte is 0x7F, the second byte is the SID, and the third byte is the reason why this diagnostic service cannot be executed.

[0x7F] + [SID] + [NRC]

picture

Common negative response codes

UDS addressing mode

There are two addressing modes for UDS: physical addressing and functional addressing

Physical addressing (point-to-point, one-to-one), access is performed based on different physical addresses, but only a single ECU node can be accessed, Tester is the SA source address, and ECU is the TA target address;

Function addressing (broadcast, one-to-many), access is based on different functions, it can access multiple ECU nodes, for standard frames, it is usually 0x7DF.

OSI Model of UDS

ISO 14229, also known as the UDS protocol, only defines the application layer and the session layer. UDS does not refer exclusively to ISO 14229-1. UDS includes seven sub-protocols under ISO 14229, of which ISO 14229-2 is still a session layer, so it is wrong to say that UDS only includes the application layer.

picture

picture


Reference address:Introduction to UDS Basics

Previous article:What is SEooC? Introduction to SEooC as a software component development process
Next article:In-depth exploration of the scenarios and advantages of perception radar technology

Latest Embedded Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号