sales@ecucoder.com
400-685-6859
 


UDS

The diagnostic protocol stack mainly includes hardware driver, transport layer and diagnostic service layer.
 
   
Huahai Technologies > HOME > Products > BASIC SOFTWARE > UDS >
UDS
—— Overview
With the rapid development of automotive electronics, different ECU devices are involved in the vehicle-mounted network as network nodes. In order to ensure the patency of the vehicle-mounted network and the correctness of communication protocols, it is necessary to carry out diagnostic tests based on communication protocols for vehicle communication networks. From the level of diagnostic detection mechanism, the internal diagnostic detection mechanism of ECU is determined by the upper layer application, while the diagnosis of external communication of ECU is realized through the interaction of diagnostic tools and target ECU based on diagnostic protocol. In order to realize the communication mechanism and certain functions between diagnostic equipment and ECU, a set of protocols from the physical layer to the upper layer is called communication diagnostic protocol stack.

The diagnostic protocol stack mainly includes hardware driver, transport layer and diagnostic service layer.

To provide a diagnostic system to meet the ECU fault diagnosis protocol and program download (reprogramming) functional requirements, to complete the development of upper and lower computer software:
•  Lower computer software: The protocol stack software running in ECU, including communication protocol stack and FlashBootloader software, belongs to embedded software development;
•  Upper computer software: diagnostic software.

 
International standard diagnostic protocols followed:
ISO 14229 Road vehicles — Unified diagnostic services (UDS) — Specification and requirements
ISO 15765-1 Road vehicles — Diagnostics on Controller Area Networks (CAN) — Part 1: General information
ISO 15765-2 Road vehicles — Diagnostics on Controller Area Networks (CAN) — Part 2: Network layer services
ISO 15765-3 Road vehicles — Diagnostics on Controller Area Networks (CAN) — Part 3: Implementation of unified diagnostic services (UDS on CAN)

Diagnostic protocol is widely used in the global automotive industry, which is perfect, reliable and versatile.

—— Solution
According to users' requirements for the development of diagnostic functions based on UDS on CAN controller, huahai technology solution is adopted, including three parts: ECU terminal protocol stack implementation code, diagnostic software and test cases. According to the specific requirements of ECU, such as the main chip, the type of communication bus and the communication protocol, the protocol stack is trimmed and combined.
 

 
(1) the ECU protocol stack implementation code: communication protocol stack software implementation ECU fault diagnosis, program download (programming) function, seamless integration with existing ECU application, does not affect the application of existing ECU algorithm, and provides the source code and interface configuration software - ECUCoder Simulink model, the common third-party compatible UDS based on CAN general diagnostic equipment.
(2) Diagnostic software (optional) : The software developed in this project is based on MeCa, a software tool of Huahai Technology, and is used with CAN bus interface card USBCANII. It has the functions of ECU fault diagnosis communication and program download (reprogramming) through the International General Diagnostic Protocol (UDS).
(3) Related services, including: test cases, integration development, training and technical support.


—— Detailed Instructions
The ECU side protocol stack implementation code, software architecture is shown in the figure, including the development of the following four parts:
1) CAN Driver-CAN Driver: It is used for initialization and transceiver operation of CAN controller and transceiver;
According to the communication requirements of this project, the CAN driver module should have the following functions:

•  Initialize the CAN controller
•  Send the CAN message
•  Setting CAN controller model
•  Provides two handling interrupt and polling
•  Provide enabling/ban CAN controller hardware interrupts
•  Receives the CAN message indicating notification
•  Send the CAN message confirmation notice
•  Bus close (BusOff) processing
•  Wake (WakeUp) processing
•  CAN jump process controller mode
Responsible for the configuration of CAN driver module, and provide the integration service of target ECU.
 
2) Transport Laye- Transport layer: It is responsible for unpacking the data in the diagnostic layer (breaking the data over 8 bytes into multiple packets, which are sent out by CAN bus) and packing (the reverse process of unpacking).
The main functions are as follows:

•  Single package and package messages;
•  Provide receiving instructions and send confirmation mechanism;
•  Provide error and timeout monitoring mechanism and corresponding notification mechanism.
 
3) Diagnostics Layer - Diagnostic Layer: It is used for data calibration and fault information processing, that is, after receiving the calibration command of the tool, the Diagnostics Layer will propose a request for data reading/modification to the application program, and the application program will complete data operation;
The main functions are as follows:

•  Management diagnosis data flow (i.e., diagnostic request/response);
•  Management diagnosis, such as diagnostic session state and security;
•  Implement diagnosis application layer timing parameter P2 / P2ext/S3;
•  Support ISO 15765-3 / ISO14229-1 diagnostic services;
•  Provided that is associated with the application of diagnostic services.
 
4) Flash Bootloader -- An online Flash Bootloader program that fully meets ISO 15765 specification. The Bootloader module is developed based on ISO 15765-2 and ISO 15765-3 standards. The software architecture of each functional module is shown in the figure below and used for Application downloading.


 
5) Simulink\ECUCoder model interface configuration software
Application software interface configuration based on Simulink model and generation of standardized diagnostic data format engineering files (ODX).
 
Diagnostic Software (optional) :

•  Diagnostic software and ECU protocol stack software unified parameter display, program download (reprogramming) process, fault handling, etc., to achieve the following functions of ECU:
    ※  Parameter display
    ※  Fault diagnosis
    ※  Program download (programming)

•  Through the parameter configuration interface, users can achieve:
    ※  Configuration bit machine communication up and down
    ※  Real-time monitoring ECU internal variable's value and its change curve

•  Through the fault diagnosis interface, users can realize:
    ※  Read ECU stored fault code
    ※  To remove ECU fault code storage

•  Through the program download (reprogramming) interface, the user realizes:
    ※  Will Flash drives, applications downloaded to the ECU by CAN block RAM, Flash, or EEPROM
    ※  In the CAN network composed of multiple ECU, the ECU application downloading updates

•  Support CAN communication adapter:
    ※  USBCANII
    ※  Kvaser (optional)
    ※  Value CAN (optional)


 
Related Services
1) Test cases
It provides test cases for various user needs and is compatible with CANoe, DTS, Vehicle SPY and so on.

2) Code integration and delivery
According to the needs of customers, we will help customers do the following work:

•  Software of hardware platform with the user integration (optional)
•  Diagnostic software and user application software integration (optional)
•  Driver and user application software integration (optional)
•  The source code of the delivery
•  Submission process documentation and instructions

3) Training (customization)
In the process of integrating services, in order to enable users to better master the use of codes and tools, we will provide relevant knowledge training, including principles, integration methods, tool use methods and so on.
 
4) Technical support
Provide technical support for software source code, including email, telephone communication and on-site service.

 


 
  Consulting Service
  Development Consulting
  Development Consulting
  Functional Safety
 
  Training Support
  Video Center
  Data download
  Huahai College
 
  News
  News
  Product dynamics
  Market activity
 
  About Us
  Company profile
  Contact us
  Join us
  Honor
 


WeChat public number
Copyright 2011-2021   Huahai Technologies Co., Ltd. All Rights Reserved.    京ICP备12005423   TEL:400-685-6859  网站技术支持:3A设计