A method for brush writing an ECU

By controlling the ECU to disconnect and unlock on the CAN bus, combined with the operation of the EOL tool and relay module, simultaneous flashing of multiple ECUs was achieved, solving the problem of low flashing efficiency of single-channel USBCAN and reducing equipment upgrade costs.

CN115220761BActive Publication Date: 2025-11-11GUANGXI YUCHAI MASCH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210795992.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-07
Publication Date
2025-11-11
Estimated Expiration
2042-07-07

AI Technical Summary

Technical Problem

In existing technologies, a single-channel USBCAN can only be programmed for one ECU, while multi-channel USBCAN requires additional cost upgrades, leading to increased investment costs.

Method used

By using the EOL tool to operate on the same CAN bus with the relay module and several ECUs, the control ECUs are disconnected, the UDS$27Service request seed command is sent, Key#1 is calculated, all ECUs are unlocked in a loop, and data transmission and verification are performed after all ECUs are connected, so as to realize the simultaneous flashing of multiple ECUs.

Benefits of technology

Without increasing equipment costs, it can simultaneously flash multiple ECUs, up to 255, reducing cost investment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115220761B_ABST
    Figure CN115220761B_ABST
Patent Text Reader

Abstract

This invention provides a method for flashing an ECU using a relay, belonging to the field of ECU flashing technology. The method includes S1: an EOL tool downloads ECU data from the production database to the local machine; S2: the EOL tool connects to a USBCAN bus, which is connected to several ECUs via a tooling harness. At this point, the EOL tool, the relay module, and the ECUs are all on the same CAN bus. In use, the EOL tool begins data transmission, performs ECU data verification and reset upon completion, indicates successful flashing, transmits the flashing record to the database, and finally prints an ECU label. Based on the theoretical number of CAN bus nodes, this relay flashing method can flash up to 255 ECUs simultaneously without requiring an upgrade to the USBCAN bus, thus reducing investment costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of ECU flashing technology, and more specifically, to a method for flashing an ECU using a relay. Background Technology

[0002] A relay is an electrical control device that causes a predetermined step change in the controlled variable in the electrical output circuit when the input quantity changes to a specified value. It establishes an interactive relationship between the control system and the controlled system. Commonly used in automated control circuits, it essentially functions as an "automatic switch" that uses a small current to control a large current. Therefore, it plays a role in automatic adjustment, safety protection, and circuit switching within the circuit.

[0003] The relay-based ECU flashing method in related technologies can only flash one ECU at a time with a single-channel USBCAN without increasing equipment costs. Multi-channel USBCAN requires investment in upgrading equipment, which increases the cost. Summary of the Invention

[0004] To overcome the above shortcomings, this invention provides a method for flashing an ECU using a relay, aiming to improve the situation where a single-channel USBCAN can only flash one ECU at a time, while multi-channel USBCAN requires investment in upgrading equipment, thus increasing costs.

[0005] This invention is implemented as follows:

[0006] This invention provides a method for flashing an ECU using a relay, comprising the following steps:

[0007] S1: The EOL tool downloads ECU data from the production database to the local machine;

[0008] S2: The EOL tool is connected to the USBCAN. The USBCAN is connected to several ECUs through the tooling wiring harness. At this time, the EOL tool, the relay module, and several ECUs are all in the same CAN bus.

[0009] S3: The EOL tool controls the relay module to disconnect ECUs other than ECU#1 from the CAN bus, and then sends the UDS$27Service request Seed command via USBCAN. ECU#1 replies with Seed#1. The interaction process between the commands is as follows:

[0010] Connect ECU#1; only ECU#1 is connected to the CAN bus.

[0011] Session control, DIAGNOSTICSESSIONCONTROL, POSITIVERESPONSE#1;

[0012] Request seed, REQUESTSEED, SEED#1;

[0013] S4: The EOL tool calculates Key#1 using Seed#1 according to a specific algorithm;

[0014] S5: The EOL tool sends Key#1 to the CAN bus and will receive a positive response from ECU#1;

[0015] Send the secret key, SEENDKEY#1, POSITIVERESPONSE#1;

[0016] S6: Repeat steps S2-S5 to unlock the next ECU, until all ECUs are unlocked;

[0017] S7: All relays close, connecting all ECUs to the CAN bus. The EOL tool begins data transmission, followed by ECU data verification and reset. The interaction process between flashing commands is as follows:

[0018] REQUEST#1, RESPONSE#1, RESPONSE#2...RESPONSE#m

[0019] ...

[0020] REQUEST#n, RESPONSE#1, RESPONSE#2...RESPONSE#m;

[0021] S8: After successful verification, a message will be displayed indicating that the flashing process is complete. The flashing record will be transmitted to the database, and finally the ECU label will be printed.

[0022] In one embodiment of the present invention, the ECU in step S1 is an electronic control unit, which consists of a microcontroller, a memory, an input / output interface, an analog-to-digital converter, and a shaping and driving large-scale integrated circuit.

[0023] In one embodiment of the present invention, the USBCAN in step S2 is a CAN testing tool. The testing tool is equipped with a driver and host computer software. The USBCAN is connected to the computer using a USB cable. After the connection is completed, the working status of the USBCAN is checked. A green light indicates that the device is ready, and a red light indicates that the device connection is abnormal.

[0024] In one embodiment of the present invention, the host computer software simultaneously controls the relay module and the controller flashing module. The relay module is responsible for controlling each controller to disconnect from the bus at a specified time to ensure that the controller is unlocked before flashing. The adapter in the flashing module refers to a USBCAN device, which is responsible for sending data frames to each controller.

[0025] In one embodiment of the present invention, in step S2, the ECU can restore data and modify calibration parameters by flashing, and can perform backup and flashing operations.

[0026] In one embodiment of the present invention, the relay module in step S2 is an electrical control device. It is an electrical appliance that causes a predetermined step change in the controlled quantity in the electrical output circuit when the change in the input quantity reaches a specified requirement. It has an interactive relationship between the control system and the controlled system and is applied in the control circuit of automation.

[0027] In one embodiment of the present invention, the CAN bus in step S2 is short for Controller Area Network, which is one of the most widely used fieldbuses. The CAN bus protocol has become the standard bus for embedded industrial control local area networks.

[0028] In one embodiment of the present invention, the interactive process of the relay module issuing instructions in step S3 includes connecting to ECU#1, session control, requesting a seed, sending a key, and flashing the program.

[0029] In one embodiment of the present invention, the adapter controls several ECUs simultaneously. The adapter has several channels and integrates a USB interface and a CAN bus interface to ensure that the computer and the target CAN device are connected and exchange data.

[0030] In one embodiment of the present invention, the database in step S8 is a data warehouse, which is a collection of large amounts of data that is stored in a computer for a long time, is organized, can be shared, and is uniformly managed.

[0031] The beneficial effects of this invention are as follows: The method for flashing an ECU using a relay, as designed above, involves the EOL tool downloading ECU data from the production database to the local machine. The EOL tool is connected to a USBCAN bus, which in turn connects to several ECUs via a tooling harness. At this time, the EOL tool, the relay module, and the ECUs are all on the same CAN bus. The EOL tool controls the relay module to disconnect all ECUs except ECU#1 from the CAN bus. Then, it sends a UDS$27Service request seed command via USBCAN. ECU#1 replies with Seed#1, and the EOL tool, based on specific... The algorithm calculates Key#1 using Seed#1. The EOL tool sends Key#1 to the CAN bus and receives a positive response from ECU#1. Steps S2-S5 are repeated until all ECUs are unlocked, all relays are closed, and all ECUs are connected to the CAN bus. The EOL tool then begins data transmission. After completion, ECU data verification and reset are performed. Upon successful verification, a message indicating that the flashing is complete is displayed, and the flashing record is transmitted to the database. Finally, an ECU label is printed. Based on the theoretical value of the number of CAN bus nodes, this relay flashing method can flash up to 255 ECUs simultaneously without requiring an upgrade to USBCAN, thus reducing cost investment. Attached Figure Description

[0032] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained from these drawings without creative effort.

[0033] Figure 1 This is a schematic diagram of the instruction interaction for a relay-based ECU flashing method according to the present invention. Detailed Implementation

[0034] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0035] Example

[0036] Please see Figure 1 This invention provides a technical solution: a method for flashing an ECU using a relay, comprising the following steps:

[0037] S1: The EOL tool downloads ECU data from the production database to the local machine. The ECU in step S1 is an electronic control unit, which consists of a microcontroller, memory, input / output interface, analog-to-digital converter, and shaping and driving large-scale integrated circuits.

[0038] S2: The EOL tool and USBCAN are connected. The USBCAN is connected to several ECUs via a tooling harness. At this time, the EOL tool, relay module, and several ECUs are all on the same CAN bus. The CAN bus enables communication data forwarding between various electronic control devices. This intelligent electronic control device uses a powerful 16-bit microcontroller with two CAN controllers, supports CAN2.0A and CAN2.0B protocols, and is developed according to the UDS standard protocol. It can be used in both high-speed and low-speed CAN bus networks, has excellent sealing properties, and can be used in various harsh environments. The USBCAN in step S2 is a CAN testing tool. The testing tool is equipped with drivers and host computer software. The USBCAN is connected to the computer via a USB cable. After connection, the working status of the USBCAN is checked. A green light indicates the device is ready, and a red light indicates a connection error. The host computer software simultaneously controls the relay module and the controller flashing module. The flashing module is responsible for controlling each controller to disconnect from the bus at the appropriate time so that the controller can be unlocked smoothly before flashing. The adapter in the flashing module is a USBCAN device, which is responsible for sending data frames to each controller. The adapter controls several ECUs at the same time. The adapter has several channels and integrates USB interface and CAN bus interface to enable the computer to connect with the target CAN device and exchange data. In step S2, the ECU can restore data and modify calibration parameters through flashing. It can perform backup and flashing operations. The relay module in step S2 is an electrical control device. When the change of the input quantity reaches the specified requirements, it causes the controlled quantity to undergo a predetermined step change in the electrical output circuit. It has an interactive relationship between the control system and the controlled system. It is used in the control circuit of automation. It is actually an automatic switch that uses a small current to control a large current. It plays the role of automatic adjustment, safety protection and circuit switching in the circuit.

[0039] The CAN bus mentioned in step S2 is short for Controller Area Network, which is one of the most widely used fieldbuses. The CAN bus protocol has become the standard bus for embedded industrial control local area networks.

[0040] S3: The EOL tool controls the relay module to disconnect ECUs other than ECU#1 from the CAN bus, and then sends the UDS$27Service request Seed command via USBCAN. ECU#1 replies with Seed#1. The interaction process between the commands is as follows:

[0041] Connect ECU#1; only ECU#1 is connected to the CAN bus.

[0042] Session control, DIAGNOSTICSESSIONCONTROL, POSITIVERESPONSE#1;

[0043] Request seed, REQUESTSEED, SEED#1;

[0044] S4: The EOL tool calculates Key#1 using Seed#1 according to a specific algorithm;

[0045] S5: The EOL tool sends Key#1 to the CAN bus and will receive a positive response from ECU#1;

[0046] Send the secret key, SEENDKEY#1, POSITIVERESPONSE#1;

[0047] S6: Repeat steps S2-S5 to unlock the next ECU, until all ECUs are unlocked;

[0048] S7: All relays close, connecting all ECUs to the CAN bus. The EOL tool begins data transmission, followed by ECU data verification and reset. The interaction process between flashing commands is as follows:

[0049] REQUEST#1, RESPONSE#1, RESPONSE#2...RESPONSE#m

[0050] ...

[0051] REQUEST#n, RESPONSE#1, RESPONSE#2...RESPONSE#m;

[0052] S8: After verification, a message indicates that the flashing is complete, and the flashing record is transmitted to the database. Finally, the ECU label is printed. The database in step S8 is a data warehouse with a large storage space, capable of storing millions, tens of millions, or even hundreds of millions of data entries. The database stores the data in a regular manner, improving the efficiency of data retrieval.

[0053] Specifically, the working principle of this relay-based ECU flashing method is as follows: During use, the EOL tool downloads ECU data from the production database to its local machine. The EOL tool connects to the USBCAN, which in turn connects to several ECUs via a tooling harness. At this point, the EOL tool, the relay module, and the ECUs are all on the same CAN bus. The EOL tool controls the relay module to disconnect all ECUs except ECU #1 from the CAN bus. Then, it sends a UDS$27Service request seed command via USBCAN. ECU #1 replies with Seed #1. The EOL tool calculates Key #1 using Seed #1 according to a specific algorithm and sends Key #1 to the CAN bus, receiving a positive response from ECU #1. This process repeats steps S2-S5 until all ECUs are unlocked, all relays are closed, and all ECUs are connected to the CAN bus. The EOL tool then begins data transmission. After completion, it performs ECU data verification and reset. Upon successful verification, it indicates that the flashing is complete and transmits the flashing record to the database. Finally, it prints an ECU label. This relay-based flashing method can simultaneously flash up to 255 ECUs based on the theoretical number of CAN bus nodes, without requiring an upgrade to USBCAN, thus reducing costs.

[0054] The above are merely preferred embodiments of the present invention and are not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for flashing an ECU using a relay, characterized in that, Includes the following steps: S1: The EOL tool downloads ECU data from the production database to the local machine; S2: The EOL tool is connected to the USBCAN. The USBCAN is connected to several ECUs through the tooling wiring harness. At this time, the EOL tool, the relay module, and several ECUs are all in the same CAN bus. S3: The EOL tool controls the relay module to disconnect all ECUs except ECU #1 from the CAN bus, and then sends the UDS $27 Service request Seed command via USBCAN. ECU #1 replies with Seed #1. The interaction process between the commands is as follows: Connect ECU #1; only ECU #1 is connected to the CAN bus. Session control, DIAGNOSTICSESSIONCONTROL, POSITIVERESPONSE #1; Request seed, REQUESTSEED, SEED #1; S4: The EOL tool calculates Key #1 using Seed #1; S5: The EOL tool sends Key #1 to the CAN bus and will receive a positive response from ECU #1; Send the secret key, SEENDKEY#1, POSITIVERESPONSE#1; S6: Repeat steps S2-S5 to unlock the next ECU, until all ECUs are unlocked; S7: All relays close, connecting all ECUs to the CAN bus. The EOL tool begins data transmission, followed by ECU data verification and reset. The interaction process between flashing commands is as follows: REQUEST #1, RESPONSE #1, RESPONSE #2...RESPONSE #m …… REQUEST #n, RESPONSE #1, RESPONSE #2...RESPONSE #m; S8: After successful verification, a message will be displayed indicating that the flashing process is complete. The flashing record will be transmitted to the database, and finally the ECU label will be printed.

2. The method for flashing an ECU using a relay according to claim 1, characterized in that, The ECU in step S1 is an electronic control unit, which consists of a microcontroller, memory, input / output interface, analog-to-digital converter, and large-scale integrated circuits for shaping and driving.

3. The method for flashing an ECU using a relay according to claim 1, characterized in that, The USBCAN in step S2 is a CAN testing tool. The testing tool is equipped with drivers and host computer software. Connect the USBCAN to the computer with a USB cable. After the connection is completed, check the working status of the USBCAN. A green light indicates that the device is ready, and a red light indicates that the device connection is abnormal.

4. The method for flashing an ECU using a relay according to claim 3, characterized in that, The host computer software controls both the relay module and the controller flashing module. The relay module is responsible for controlling each controller to disconnect from the bus at a specified time to ensure that the controller is unlocked before flashing. The adapter in the flashing module is a USBCAN device, which is responsible for sending data frames to each controller.

5. The method for flashing an ECU using a relay according to claim 1, characterized in that, In step S2, the ECU can restore data and modify calibration parameters by flashing, and can perform backup and flashing operations.

6. The method for flashing an ECU using a relay according to claim 1, characterized in that, The relay module in step S2 is an electrical control device. When the change in the input quantity reaches the specified requirements, it causes a predetermined step change in the controlled quantity in the electrical output circuit. It has an interactive relationship between the control system and the controlled system and is applied in the control circuit of automation.

7. The method for flashing an ECU using a relay according to claim 1, characterized in that, The CAN bus mentioned in step S2 is short for Controller Area Network, which is one of the most widely used fieldbuses. The CAN bus protocol has become the standard bus for embedded industrial control LANs.

8. The method for flashing an ECU using a relay according to claim 1, characterized in that, The interactive process of the relay module issuing commands in step S3 includes connecting to ECU #1, session control, requesting a seed, sending a key, and the flashing process.

9. The method for flashing an ECU using a relay according to claim 4, characterized in that, The adapter controls several ECUs simultaneously and has several channels. It integrates a USB interface and a CAN bus interface to ensure that the computer and the target CAN device can connect and exchange data.

10. A method for flashing an ECU using a relay according to claim 1, characterized in that, The database in step S8 is a data warehouse, a collection of large amounts of organized, shareable, and uniformly managed data that is stored in a computer for a long time.