CN116048555A - Method and device for writing identification information of electronic control unit - Google Patents

Method and device for writing identification information of electronic control unit Download PDF

Info

Publication number
CN116048555A
CN116048555A CN202310032391.4A CN202310032391A CN116048555A CN 116048555 A CN116048555 A CN 116048555A CN 202310032391 A CN202310032391 A CN 202310032391A CN 116048555 A CN116048555 A CN 116048555A
Authority
CN
China
Prior art keywords
control unit
identification information
electronic control
writing
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310032391.4A
Other languages
Chinese (zh)
Inventor
陈创
鲁永山
杜浩
王攀
王涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Dongfeng Motor Corp
Original Assignee
Dongfeng Motor Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Dongfeng Motor Corp filed Critical Dongfeng Motor Corp
Priority to CN202310032391.4A priority Critical patent/CN116048555A/en
Publication of CN116048555A publication Critical patent/CN116048555A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a method and a device for writing identification information of an electric control unit, and relates to the technical field of electric control units. When the identification information is written into the electronic control unit, the invention only needs to write the complete identification data corresponding to the electronic control unit once, reads the software version number of the electronic control unit, matches the corresponding data length value and the identification information writing path for the software version number, writes the target data segment with the data length of the data length value in the complete identification data into the electronic control unit through the identification information writing path, does not need to manually input the identification data each time, improves the efficiency of writing the identification information, and reduces the error probability.

Description

Method and device for writing identification information of electronic control unit
Technical Field
The invention relates to the technical field of electronic control units, in particular to an electronic control unit identification information writing method and device.
Background
The electronic control unit used by the vehicle may be of different manufacturers or different brands produced by the same manufacturer, and the whole vehicle manufacturer assembles the electronic control unit before the whole vehicle, and needs to write identification information such as assembly time, manufacturer code or brand code into the electronic control unit so as to trace back later. At present, the mode of writing identification information into the electronic control unit by a whole vehicle factory is manual input, the manual input efficiency is low, errors are easy to occur, and the whole vehicle assembly efficiency is greatly reduced.
Disclosure of Invention
The invention solves the technical problems of low efficiency and easy error of writing the identification information of the electric control unit in the prior art by providing the method and the device for writing the identification information of the electric control unit.
On one hand, the embodiment of the invention provides the following technical scheme:
an electronic control unit identification information writing method comprises the following steps:
writing and storing complete identification data corresponding to the electric control unit;
reading the software version number of the electric control unit;
matching the corresponding data length value with the software version number and an identification information writing path;
and writing the target data segment in the complete identification data into the electric control unit through the identification information writing path, wherein the data length of the target data segment is the data length value.
Preferably, the complete identification data is any one of an assembly date, a manufacturer code and a brand code.
Preferably, before reading the software version number of the electronic control unit, the method further includes:
handshake with the electronic control unit;
commanding the electronic control unit to enter an expansion mode;
and unlocking the safety access of the electronic control unit.
Preferably, after reading the software version number of the electronic control unit and before writing the target data segment in the complete identification data into the electronic control unit through the identification information writing path, the method further includes:
judging whether the software version number is obtained for the first time;
if yes, executing the step of writing the data length value and the identification information corresponding to the software version number matching into the path;
otherwise, directly acquiring the data length value and the identification information writing path corresponding to the software version number.
Preferably, writing the target data segment in the complete identification data into the electronic control unit through the identification information writing path includes:
and sequentially writing the first bit to the Nth bit in the complete identification data into the electric control unit through the identification information writing path, wherein N is the data length value.
On the other hand, the embodiment of the invention also provides the following technical scheme:
an electronic control unit identification information writing device, comprising:
the identification data acquisition module is used for writing and storing complete identification data corresponding to the electric control unit;
the software version number reading module is used for reading the software version number of the electric control unit;
the writing rule matching module is used for matching the corresponding data length value and the identification information writing path for the software version number;
and the identification data writing module is used for writing the target data segment in the complete identification data into the electric control unit through the identification information writing path, wherein the data length of the target data segment is the data length value.
Preferably, the electronic control unit identification information writing device further includes:
the handshake module is used for handshake with the electric control unit;
the expansion mode control module is used for commanding the electric control unit to enter an expansion mode;
and the secure access unlocking module is used for unlocking the secure access of the electric control unit.
Preferably, the identification data writing module is further configured to sequentially write the first bit to the nth bit in the complete identification data into the electronic control unit through the identification information writing path, where N is the data length value.
On the other hand, the embodiment of the invention also provides the following technical scheme:
an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing any one of the above-mentioned electronic control unit identification information writing methods when executing the program.
On the other hand, the embodiment of the invention also provides the following technical scheme:
a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements any of the above-described electronic control unit identification information writing methods.
The one or more technical schemes provided by the invention have at least the following technical effects or advantages:
when the identification information is written into the electronic control unit, the invention only needs to write the complete identification data corresponding to the electronic control unit once, reads the software version number of the electronic control unit, matches the corresponding data length value and the identification information writing path for the software version number, writes the target data segment with the data length of the data length value in the complete identification data into the electronic control unit through the identification information writing path, does not need to manually input the identification data each time, improves the efficiency of writing the identification information, and reduces the error probability.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a method for writing identification information of an electronic control unit according to an embodiment of the present invention;
fig. 2 is a schematic diagram of an electronic control unit identification information writing device according to an embodiment of the present invention.
Detailed Description
The embodiment of the invention solves the technical problems of low efficiency and easy error of writing of the identification information of the electric control unit in the prior art by providing the method and the device for writing the identification information of the electric control unit.
In order to better understand the technical scheme of the present invention, the following detailed description will refer to the accompanying drawings and specific embodiments.
As shown in fig. 1, the method for writing identification information of an electronic control unit according to the present embodiment includes:
step S1, writing and storing complete identification data corresponding to an electric control unit;
s2, reading a software version number of the electric control unit;
step S3, the corresponding data length value and the identification information writing path are matched for the software version number;
and S4, writing the target data segment in the complete identification data into the electric control unit through an identification information writing path, wherein the data length of the target data segment is a data length value.
The identification information of the electric control units can be an assembly date, a manufacturer code or a brand code, the electric control units of the same series can be different manufacturers or different brands produced by the same manufacturer, and each electric control unit can have different identification information input rules. In step S1, if the identification information is an assembly date, in a plurality of electronic control units assembled on the same day, the identification information input rule of some electronic control units may require writing 4 bits (e.g. 2022) of identification data, the identification information input rule of another part of electronic control units may require writing 7 bits (e.g. 2022.01) of identification data, and the identification information input rule of the remaining electronic control units may require writing 10 bits (e.g. 2022.01.01) of identification data, then the complete identification data corresponding to the electronic control units is 2022.01.01; if the identification information is brand code, in the same series of electric control units, the identification information input rule of one part of electric control units may require 2-bit (S5) identification data to be written, the identification information input rule of the other part of electric control units may require 6-bit (S5-Pro) identification data to be written, and the identification information input rule of the rest of electric control units may require 7-bit (S5-pro+) identification data to be written, then the complete identification data corresponding to the series of electric control units is S5-pro+. Before a large number of electronic control units are written in by a technician on a whole vehicle assembly production line, the complete identification data corresponding to the electronic control units are input into diagnostic equipment, and the complete identification data are stored in a certain fixed address space of the diagnostic equipment according to a UDS protocol, so that the complete identification data can be directly obtained from the fixed address space when the identification information is recorded.
In step S2, the software version number of the electronic control unit is BT software version number SW, BT (Boot loader) refers to a section of bottom driver running before the operating system kernel runs, and through this section of applet, the hardware device can be initialized, and the map of the memory space can be built, so that the software and hardware environment of the system is brought to a suitable state, so that a correct environment is prepared for finally calling the operating system kernel.
In step S3, after the technician obtains the software version number of a certain electronic control unit for the first time, the technician can determine the rule for writing the identification information of the electronic control unit according to the software version number, which can be understood as determining the length of the identification data to be written and the path for writing the identification information, so that the diagnostic equipment can match the corresponding data length value and the path for writing the identification information for the software version number. In this embodiment, different software version numbers may correspond to the same data length value and the same identification information writing path.
Of course, after a certain software version number is obtained for the first time and the data length value and the identification information writing path are matched, when the same software version number is obtained next time, the data length value and the identification information writing path corresponding to the software version number can be directly obtained, and after step S2 and before step S4, the method for writing identification information into the electronic control unit according to the embodiment may further include:
judging whether the software version number is obtained for the first time; if yes, executing step S3; otherwise, directly acquiring the data length value corresponding to the software version number and the identification information writing path.
Step S4 may include: and sequentially writing the first bit to the Nth bit in the complete identification data into the electric control unit through an identification information writing path, wherein N is a data length value. For example, if the identification information is the assembly date and the data length value corresponding to the software version number of a certain electronic control unit is 7, 2022.01 in the complete identification data 2022.01.01 is written into the electronic control unit through the identification information writing path corresponding to the software version number, that is, the target data segment is 2022.01. Of course, if the complete identification data is 01.01.2022, the last N bits in the complete identification data are written into the electronic control unit.
As can be seen from the foregoing, when the method for writing the identification information of the electronic control unit in this embodiment writes the identification information of the electronic control unit, only the complete identification data corresponding to the electronic control unit needs to be written once, the software version number of the electronic control unit is read, the corresponding data length value and the identification information writing path are matched for the software version number, the target data segment with the data length being the data length value in the complete identification data is written into the electronic control unit through the identification information writing path, and no need of manually inputting the identification data every time, thereby improving the efficiency of writing the identification information and reducing the error probability.
In this embodiment, the diagnostic device writes the identification information into the electronic control unit through the UDS protocol, so before reading the software version number of the electronic control unit, it needs to handshake with the electronic control unit, then instruct the electronic control unit to enter the expansion mode, and finally unlock the secure access of the electronic control unit, that is, before step S2, the method for writing the identification information into the electronic control unit further includes: handshake with the electronic control unit; commanding the electronic control unit to enter an expansion mode; and unlocking the security access of the electronic control unit. The write may be ended by a handshake failure, a failure to enter extended mode, or a failure to unlock secure access.
As shown in fig. 2, this embodiment further provides an electronic control unit identification information writing device, including:
the identification data acquisition module is used for writing and storing complete identification data corresponding to the electric control unit;
the software version number reading module is used for reading the software version number of the electric control unit;
the writing rule matching module is used for matching the corresponding data length value and the identification information writing path for the software version number;
the identification data writing module is used for writing the target data segment in the complete identification data into the electric control unit through the identification information writing path, wherein the data length of the target data segment is a data length value.
Further, the electronic control unit identification information writing device further includes: the handshake module is used for handshake with the electric control unit; the expansion mode control module is used for commanding the electric control unit to enter an expansion mode; and the secure access unlocking module is used for unlocking the secure access of the electronic control unit.
Further, the identification data writing module is further configured to sequentially write the first bit to the nth bit in the complete identification data into the electronic control unit through the identification information writing path, where N is a data length value.
Based on the same inventive concept as the method for writing identification information of an electronic control unit described above, the present embodiment further provides an electronic device, including a memory, a processor, and a computer program stored on the memory and capable of running on the processor, where the processor implements the steps of any one of the methods for writing identification information of an electronic control unit described above when executing the program.
Where a bus architecture (represented by a bus), a bus may comprise any number of interconnected buses and bridges, linking together various circuits, including one or more processors, as represented by a processor, and a memory, as represented by a memory. The bus may also link together various other circuits such as peripheral devices, voltage regulators, power management circuits, etc., as are well known in the art and, therefore, will not be further described herein. The bus interface provides an interface between the bus and the receiver and transmitter. The receiver and the transmitter may be the same element, i.e. a transceiver, providing a unit for communicating with various other apparatus over a transmission medium. The processor is responsible for managing the bus and general processing, while the memory may be used to store data used by the processor in performing operations.
Since the electronic device described in this embodiment is an electronic device used to implement the method for writing identification information of an electronic control unit in this embodiment, based on the method for writing identification information of an electronic control unit described in this embodiment, those skilled in the art can understand the specific implementation of the electronic device in this embodiment and various modifications thereof, so how this electronic device is implemented in this embodiment of the present invention will not be described in detail herein. As long as the person skilled in the art implements the electronic device adopted by the method for writing the identification information of the electronic control unit in the embodiment of the invention, the electronic device belongs to the scope of protection required by the invention.
Based on the same inventive concept as the above-mentioned electronic control unit identification information writing method, the present invention also provides a computer readable storage medium, on which a computer program is stored, which when executed by a processor, implements any one of the above-mentioned electronic control unit identification information writing methods.
It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present invention without departing from the spirit or scope of the invention. Thus, it is intended that the present invention also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.

Claims (10)

1. An electronic control unit identification information writing method is characterized by comprising the following steps:
writing and storing complete identification data corresponding to the electric control unit;
reading the software version number of the electric control unit;
matching the corresponding data length value with the software version number and an identification information writing path;
and writing the target data segment in the complete identification data into the electric control unit through the identification information writing path, wherein the data length of the target data segment is the data length value.
2. The method for writing identification information of an electronic control unit according to claim 1, wherein the complete identification data is any one of an assembly date, a manufacturer code and a brand code.
3. The electronic control unit identification information writing method according to claim 1, further comprising, before reading the software version number of the electronic control unit:
handshake with the electronic control unit;
commanding the electronic control unit to enter an expansion mode;
and unlocking the safety access of the electronic control unit.
4. The electronic control unit identification information writing method according to claim 1, wherein after reading a software version number of the electronic control unit and before writing a target data segment in the complete identification data to the electronic control unit through the identification information writing path, further comprising:
judging whether the software version number is obtained for the first time;
if yes, executing the step of writing the data length value and the identification information corresponding to the software version number matching into the path;
otherwise, directly acquiring the data length value and the identification information writing path corresponding to the software version number.
5. The electronic control unit identification information writing method according to claim 1, wherein writing the target data segment in the complete identification data to the electronic control unit through the identification information writing path includes:
and sequentially writing the first bit to the Nth bit in the complete identification data into the electric control unit through the identification information writing path, wherein N is the data length value.
6. An electronic control unit identification information writing device, characterized by comprising:
the identification data acquisition module is used for writing and storing complete identification data corresponding to the electric control unit;
the software version number reading module is used for reading the software version number of the electric control unit;
the writing rule matching module is used for matching the corresponding data length value and the identification information writing path for the software version number;
and the identification data writing module is used for writing the target data segment in the complete identification data into the electric control unit through the identification information writing path, wherein the data length of the target data segment is the data length value.
7. The electronic control unit identification information writing device according to claim 6, further comprising:
the handshake module is used for handshake with the electric control unit;
the expansion mode control module is used for commanding the electric control unit to enter an expansion mode;
and the secure access unlocking module is used for unlocking the secure access of the electric control unit.
8. The electronic control unit identification information writing device according to claim 6, wherein the identification data writing module is further configured to sequentially write first to nth bits in the complete identification data into the electronic control unit through the identification information writing path, and N is the data length value.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the electronic control unit identification information writing method of any of claims 1-5 when the program is executed.
10. A computer readable storage medium, characterized in that the computer readable storage medium has stored thereon a computer program which, when executed by a processor, implements the electronic control unit identification information writing method of any of claims 1-5.
CN202310032391.4A 2023-01-10 2023-01-10 Method and device for writing identification information of electronic control unit Pending CN116048555A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310032391.4A CN116048555A (en) 2023-01-10 2023-01-10 Method and device for writing identification information of electronic control unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310032391.4A CN116048555A (en) 2023-01-10 2023-01-10 Method and device for writing identification information of electronic control unit

Publications (1)

Publication Number Publication Date
CN116048555A true CN116048555A (en) 2023-05-02

Family

ID=86125156

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310032391.4A Pending CN116048555A (en) 2023-01-10 2023-01-10 Method and device for writing identification information of electronic control unit

Country Status (1)

Country Link
CN (1) CN116048555A (en)

Similar Documents

Publication Publication Date Title
US10409587B2 (en) Method for programming vehicle electronic control modules
US7774382B2 (en) Method and apparatus for configuring a control device, and corresponding control device
US10274919B2 (en) Method, device and computer program product for programming a plurality of control units
CN110244958B (en) Method and device for updating calibration data of a vehicle
CN112000083A (en) ECU data flashing method, flashing device, flashing equipment and storage medium
CN116451238A (en) ECU firmware upgrading method, device, equipment and readable storage medium
EP2709073A2 (en) Electronic control unit of vehicle
CN116048555A (en) Method and device for writing identification information of electronic control unit
US20090210613A1 (en) Method for Programming a Controller in a Motor Vehicle
CN112277841B (en) Vehicle type configuration identification method, vehicle control method, driving computer and vehicle
CN114281065A (en) Electronic control unit flashing method and device for vehicle and diagnostic equipment
CN114942745A (en) Automatic configuration method for UDS protocol stack of motor controller
US8738221B2 (en) Methods and systems for securing vehicle data
CN112104766B (en) Diagnostic protocol reconstruction method, device, terminal equipment and storage medium
CN116068997A (en) Design method and device for vehicle whole-vehicle-level fault diagnosis system
US20240184453A1 (en) Information processing system, storage medium, and data write count management method
CN112104708B (en) Communication method and device of diagnostic equipment, electronic equipment and storage medium
CN112988249B (en) Method and device for creating sound card, electronic equipment and storage medium
CN115048317B (en) Test method, test system, and computer-readable storage medium
CN110471818B (en) Method, device and equipment for marking error physical address of flash memory
CN112363925A (en) Method for acquiring vehicle-mounted machine basic information, electronic equipment and computer storage medium
CN116186789A (en) Checksum calculation sequence determining method, device, equipment and storage medium
JP2001125790A (en) Program reloading method for on-vehicle electronics
CN108241578A (en) Automobile electronic control unit software compatibility inspection method and device
CN114764336A (en) PeakCAN-based automobile ECU (electronic control Unit) flashing method and device, vehicle-mounted terminal and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination