An ECU automatic numbering method and device, a terminal device, and a storage medium

By sending a wake-up signal from the main ECU, the slave ECU is awakened and the signal is parsed for automatic numbering. This solves the problems of time-consuming, labor-intensive, and error-prone ECU numbering in the existing technology, and realizes efficient and reliable automatic ECU numbering.

CN114859867BActive Publication Date: 2025-10-21SHANGHAI RUIPU ENERGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210495951.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-22
Publication Date
2025-10-21
Estimated Expiration
2042-04-22

AI Technical Summary

Technical Problem

The existing technology requires individual calibration when numbering multiple electronic control units (ECUs) with the same hardware specifications, which is time-consuming and labor-intensive and carries the risk of numbering errors.

Method used

The master ECU sends a wake-up signal to wake up the slave ECU and parses the signal according to the preset communication protocol to realize the automatic numbering of the slave ECU. By using the association between the wake-up signal and the numbering order, the efficiency and reliability of the automatic numbering of the ECU are ensured.

Benefits of technology

Without the need for calibration via a host computer, multiple ECUs with identical hardware specifications can be automatically numbered based on signal transmission capabilities, improving efficiency and reliability while reducing the time and risk of errors associated with manual operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114859867B_ABST
    Figure CN114859867B_ABST
Patent Text Reader

Abstract

The application relates to an ECU automatic numbering method and device, terminal equipment and a storage medium, and relates to the technical field of electronics. The method is applied to equipment with one master ECU and at least one slave ECU, and comprises the following steps: the master ECU sends a wake-up signal to the slave ECU, the wake-up signal is used for the slave ECU to determine the numbering sequence of the slave ECU; the slave ECU receives the wake-up signal and parses the wake-up signal according to a preset communication protocol to determine the numbering sequence of the slave ECU; and the slave ECU is automatically numbered according to the numbering sequence of the slave ECU. Based on the signal transmission capability, the wake-up signal associated with the numbering sequence is used to realize automatic numbering of multiple ECUs with the same hardware specifications, so that the efficient and reliable use requirement of ECU numbering is met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of electronic technology, and in particular to an ECU automatic numbering method, apparatus, terminal device and storage medium. Background Art

[0002] Currently, in the field of electronic technology, in actual applications, there are scenarios where multiple electronic control units (ECUs) with the same hardware specifications are used. Each ECU needs to be uniquely coded, i.e., ID calibrated, to distinguish hardware and control objects of the same specifications based on the ID.

[0003] Existing technical solutions primarily rely on a host computer sending calibration commands to a single ECU or multiple ECUs via communication lines to achieve different numbering, or determining ECU numbers based on installation location and using the host computer for calibration. Existing technical solutions require calibrating each ECU individually, which is time-consuming and labor-intensive, and carries the risk of incorrect numbering.

[0004] Therefore, there is an urgent need for a reliable and efficient ECU automatic numbering technology to meet current usage needs. Summary of the Invention

[0005] The present application provides an ECU automatic numbering method, apparatus, terminal device and storage medium. Based on signal transmission capability, it realizes automatic numbering of multiple ECUs with the same hardware specifications through a wake-up signal associated with the numbering sequence, thereby meeting the requirements for efficient and reliable use of ECU numbering.

[0006] In a first aspect, the present application provides an ECU automatic numbering method, which is applied to a device having a master ECU and at least one slave ECU, and comprises the following steps:

[0007] The master ECU sends a wake-up signal to the slave ECU;

[0008] The slave ECU receives the wake-up signal and parses the wake-up signal according to a preset communication protocol to determine the numbering sequence of the slave ECUs;

[0009] The slave ECUs are automatically numbered according to the numbering sequence of the slave ECUs; wherein,

[0010] The wake-up signal is used by the slave ECU to determine its own numbering sequence.

[0011] Furthermore, the number of the slave ECUs is at least two, and when the master ECU sends a wake-up signal to the slave ECUs, the method includes the following steps:

[0012] The master ECU sends a wake-up signal corresponding to the arrangement order of the slave ECUs.

[0013] Furthermore, the number of the slave ECUs is at least two, and the method includes the following steps:

[0014] The master ECU sends a corresponding wake-up signal to the first slave ECU;

[0015] The slave ECU receives the wake-up signal, parses the received wake-up signal according to a preset communication protocol to determine its own numbering sequence, and sends a corresponding wake-up signal to the next slave ECU; wherein,

[0016] The slave ECUs are sequentially connected according to a preset arrangement order;

[0017] The last slave ECU receives the wake-up signal, only determines its own serial number sequence, and does not generate a corresponding wake-up signal to be sent to the next slave ECU.

[0018] Furthermore, the number of the slave ECUs is at least two and they are divided into at least two slave ECU groups. The method includes the following steps:

[0019] The master ECU sends a corresponding wake-up signal to the first slave ECU in each of the slave ECU groups;

[0020] The slave ECU receives the wake-up signal, parses the received wake-up signal according to a preset communication protocol to determine its own numbering sequence, and sends a corresponding wake-up signal to the next slave ECU in the slave ECU group to which it belongs; wherein,

[0021] The slave ECUs in the slave ECU group are sequentially connected to each other according to a preset arrangement order, and only the first slave ECU in the slave ECU group is connected to the master ECU;

[0022] The last slave ECU in the slave ECU group receives the wake-up signal, only determines its own numbering sequence, and does not generate a corresponding wake-up signal to be sent to the next slave ECU in the slave ECU group to which it belongs.

[0023] Specifically, when the number of the slave ECUs is greater than 1, the slave ECUs are arranged in sequence, and an output channel of a preceding slave ECU is signal-connected to an input channel of a succeeding slave ECU.

[0024] Furthermore, before the master ECU sends the wake-up signal to the slave ECU, the method further includes the following steps:

[0025] Configuring a communication protocol to the master ECU and the slave ECU; wherein,

[0026] The communication protocol records a plurality of numbers arranged in sequence and the duty cycles and signal frequencies corresponding to the numbers;

[0027] When the number of the slave ECUs is greater than 1, the communication protocol further records the corresponding relationship between the arrangement sequence of the slave ECUs and the numbers.

[0028] Furthermore, after the slave ECUs are automatically numbered according to the numbering sequence of the slave ECUs, the method further comprises the following steps:

[0029] The slave ECU configures its ID according to its own number and writes it into NVM.

[0030] In a second aspect, the present application provides an ECU automatic numbering device, which is applied to a device having a master ECU and at least one slave ECU, and includes:

[0031] A wake-up signal sending module, which is used to control the master ECU to send a wake-up signal to the slave ECU;

[0032] a number determination module, configured to control the slave ECU to receive the wake-up signal and parse the wake-up signal according to a preset communication protocol to determine the numbering sequence of the slave ECUs;

[0033] An automatic numbering module is used to control the slave ECUs to automatically number according to the numbering sequence of the slave ECUs; wherein,

[0034] The wake-up signal is used by the slave ECU to determine its own numbering sequence.

[0035] In the third aspect, the present application provides a terminal device, which includes: a processor, a memory, a communication interface and a bus; the processor, the memory and the communication interface are connected through the bus and communicate with each other; the memory stores executable program code; the processor runs the program corresponding to the executable program code by reading the executable program code stored in the memory, so as to execute the ECU automatic numbering method mentioned in the first aspect.

[0036] In a fourth aspect, the present application provides a storage medium storing a program, which, when run on a terminal device, executes the ECU automatic numbering method mentioned in the first aspect.

[0037] The beneficial effects of the technical solution provided by this application include:

[0038] This application does not require calibration by the host computer. Based on the signal transmission capability, it realizes automatic numbering of multiple ECUs with the same hardware specifications through wake-up signals associated with the numbering sequence, thereby meeting the requirements of efficient and reliable use of ECU numbers. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Explanation of terms:

[0040] ECU: Electronic Control Unit, electronic control unit;

[0041] ID: Identity document, ID card identification number;

[0042] NVM: Non-volatile memory, non-volatile memory;

[0043] MCU: Microcontroller Unit, microcontroller unit.

[0044] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0045] Figure 1 This is a flowchart of the steps of the ECU automatic numbering method provided in an embodiment of the present application;

[0046] Figure 2 This is a flow chart of the principle of the ECU automatic numbering method provided in the embodiment of the present application;

[0047] Figure 3 This is a schematic diagram of the connection between the master ECU and the slave ECU in the first case of the ECU automatic numbering method provided in the embodiment of the present application;

[0048] Figure 4 This is a schematic diagram of the second connection between the master ECU and the slave ECU in the ECU automatic numbering method provided in an embodiment of the present application;

[0049] Figure 5 This is a schematic diagram of the third connection between the master ECU and the slave ECU in the ECU automatic numbering method provided in an embodiment of the present application;

[0050] Figure 6 This is a schematic diagram of the fourth connection between the master ECU and the slave ECU in the ECU automatic numbering method provided in the embodiment of the present application;

[0051] Figure 7 This is a schematic diagram of the fifth connection between the master ECU and the slave ECU in the ECU automatic numbering method provided in the embodiment of the present application;

[0052] Figure 8 This is a structural block diagram of the ECU automatic numbering device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0053] To make the purpose, technical solutions, and advantages of the embodiments of this application more clear, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0054] The embodiments of the present application are further described in detail below with reference to the accompanying drawings.

[0055] The embodiments of the present application provide an ECU automatic numbering method, apparatus, terminal device and storage medium, which do not require calibration by a host computer. Based on signal transmission capability, automatic numbering of multiple ECUs with the same hardware specifications is achieved through a wake-up signal associated with the numbering sequence, thereby meeting the requirements for efficient and reliable use of ECU numbering.

[0056] The method provided in the embodiments of the present application is applied to a device having a master ECU and at least one slave ECU. To achieve the above technical effects, the inventive concept of the present application is:

[0057] The master ECU sends a wake-up signal to the first slave ECU, and the wake-up signal is used by the first slave ECU to determine its own numbering sequence;

[0058] The first slave ECU receives the wake-up signal and parses the wake-up signal according to a preset communication protocol to determine the numbering sequence of the first slave ECU;

[0059] The first slave ECU is automatically numbered according to the numbering sequence of the slave ECUs;

[0060] When there is a next slave ECU connected to the first slave ECU, the first slave ECU may also send a wake-up signal to the next slave ECU, so that the next slave ECU uses the wake-up signal to determine its own numbering sequence and automatically number it, and so on, until the numbering of all slave ECUs is completed.

[0061] The embodiments of the present application are further described in detail below with reference to the accompanying drawings.

[0062] First, see Figures 1 to 7 As shown, an embodiment of the present application provides an ECU automatic numbering method, which is applied to a device having a master ECU and at least one slave ECU, and the method includes the following steps:

[0063] S1. The master ECU sends a wake-up signal to the slave ECU. The wake-up signal is used by the slave ECU to determine its own numbering sequence.

[0064] S2. Receive a wake-up signal from the ECU and parse the wake-up signal according to a preset communication protocol to determine the serial numbering sequence of the slave ECUs.

[0065] S3. The slave ECUs are automatically numbered according to the numbering sequence of the slave ECUs.

[0066] It should be noted that the numbering of the slave ECUs may be, but is not limited to, a sequentially increasing manner.

[0067] In actual application scenarios, multiple hardware with the same specifications are used. In order to distinguish them and determine the control target, they are mainly distinguished by different IDs. Usually, it is a one-master-multiple-slave structure, that is, one master ECU and at least one slave ECU.

[0068] The master ECU and the slave ECU both have certain computing and data processing capabilities. In one possible implementation, the master ECU and the slave ECU may implement data processing functions through a processor, a microcontroller unit (MCU), etc. The embodiments of the present application are not limited thereto.

[0069] In one possible implementation, the wake-up signal can distinguish different numbers by using signals with different duty cycles and frequencies. In this implementation, the master ECU needs to have the ability to output a signal with a certain frequency and duty cycle and the ability to capture and calculate the signal duty cycle and frequency, while the slave ECU also needs to have the ability to detect the wake-up signal and output signals with different duty cycles and frequencies.

[0070] In high-frequency mode, the slave ECU needs to be able to avoid power failure. Since one of the wake-up sources of the slave ECU can be a wake-up signal with a certain frequency and duty cycle sent by the master controller, when the wake-up signal frequency is high, the slave controller can be woken up. When the frequency is low, it is not enough to wake up the slave controller. The specific frequency range is determined by the hardware circuit.

[0071] In an embodiment of the present application, a master ECU sends a wake-up signal to a slave ECU. The wake-up signal is used by the slave ECU to determine its own numbering sequence. The slave ECU receives the wake-up signal and parses the wake-up signal according to a preset communication protocol to determine the numbering sequence of the slave ECUs. The slave ECUs are then automatically numbered according to the numbering sequence of the slave ECUs. Compared to the prior art method of ID calibration of each ECU by a host computer, the location of the ECU and the ID number to be calibrated must be determined before ID calibration. In an embodiment of the present application, based on signal transmission capabilities, multiple ECUs with the same hardware specifications are automatically numbered through wake-up signals associated with the numbering sequence, thereby meeting the requirements for efficient and reliable use of ECU numbering.

[0072] In a possible implementation, before the master ECU sends the wake-up signal to the slave ECU, the method may further include the following steps:

[0073] When the master ECU and the slave ECU are installed on the corresponding terminal devices, or when the ECU is pre-configured for production, the corresponding terminal devices or production devices configure the communication protocol to the master ECU and the slave ECU; wherein the communication protocol records multiple numbers arranged in sequence and the duty cycle and signal frequency corresponding to the numbers.

[0074] For example, in actual operation, a duty cycle of 90% and a frequency of 500 Hz represent No. 1, a duty cycle of 80% and a frequency of 500 Hz represent No. 2, a duty cycle of 90% and a frequency of 600 Hz represent No. 3, and a duty cycle of 85% and a frequency of 450 Hz represent No. 4. This association relationship can be adjusted according to actual conditions.

[0075] In addition, when the number of slave ECUs is greater than 1, the correspondence between the arrangement order and the numbers of the slave ECUs may also be recorded in the communication protocol.

[0076] When the number of slave ECUs is greater than one, each slave ECU has a specific order. This order can be based on their hardware connection order or a user-defined order. By establishing a correspondence between the order of each slave ECU and the number assigned to each slave ECU in the communication protocol, the reliability of the numbering can be ensured. Furthermore, if the order of each slave ECU corresponds to their hardware connection order, the wake-up signal is transmitted from the output channel of one ECU to the input channel of the next ECU in hardware. This hardware connection ensures absolute position. If the connection is incorrect, automatic numbering cannot be achieved. Therefore, it is also possible to troubleshoot wiring problems between the slave ECUs.

[0077] The embodiments of the present application do not impose any specific restrictions on the direct correspondence between the arrangement order and the number. The correspondence between the arrangement order of each slave ECU and the number that each slave ECU needs to be assigned can be set in the communication protocol according to actual needs. For example, the arrangement order of the first slave ECU is 1, and its corresponding number is set to 1 in the communication protocol, the arrangement order of the second slave ECU is 2, and its corresponding number is set to 2 in the communication protocol, and the arrangement order of the third slave ECU is 3, and its corresponding number is set to 3 in the communication protocol. For another example, the arrangement order of the first slave ECU is 1, and its corresponding number is set to 1 in the communication protocol, the arrangement order of the second slave ECU is 2, and its corresponding number is set to 3 in the communication protocol, and the arrangement order of the third slave ECU is 3, and its corresponding number is set to 5 in the communication protocol. For another example, the arrangement order of the first slave ECU is 1, and its corresponding number is set to 2 in the communication protocol, the arrangement order of the second slave ECU is 2, and its corresponding number is set to 4 in the communication protocol, and the arrangement order of the third slave ECU is 3, and its corresponding number is set to 6 in the communication protocol.

[0078] Furthermore, in a possible implementation manner, after the slave ECUs are automatically numbered according to the numbering sequence of the slave ECUs, the method further includes the following steps:

[0079] The slave ECU configures the ID according to its own number and writes it into NVM;

[0080] After learning its own number from the ECU, it performs ID configuration, thereby realizing automatic numbering and ID automatic configuration from the ECU, and writing the ID into NVM, so that the ID will not be lost after losing the control of the mainboard or power failure.

[0081] In the embodiment of the present application, according to the number of slave ECUs, it can be divided into two situations. The first situation is that the number of slave ECUs is 1, the second situation is that the number of slave ECUs is at least 2 and each slave ECU is connected to the master ECU signal in parallel, and the third situation is that the number of slave ECUs is at least 2 and each slave ECU is connected to the master ECU signal in series.

[0082] In the first case, that is, when the number of slave ECUs is 1, the implementation process of the embodiment of the present application is as follows:

[0083] At this time, since there is only one slave ECU, its arrangement order is the first. The master ECU selects the number corresponding to the first arrangement order according to the preset communication protocol, and then selects the duty cycle and frequency corresponding to the number, generates a wake-up signal, and sends it to the slave ECU;

[0084] Receive the wake-up signal from the ECU, obtain the duty cycle and frequency of the wake-up signal, and then obtain the corresponding number according to the preset communication protocol and perform automatic numbering.

[0085] In the second case, that is, when the number of slave ECUs is at least 2, and each slave ECU is connected to the master ECU signal in parallel, that is, each slave ECU is connected to the master ECU signal, the implementation process of the embodiment of the present application is as follows:

[0086] At this time, the master ECU knows the arrangement order of each slave ECU by presetting the corresponding number information on the signal link of each slave ECU or through specific information of the signal link or other methods. The master ECU selects the corresponding number according to the arrangement order of each slave ECU according to the preset communication protocol, and then selects the duty cycle and frequency corresponding to the number, generates the corresponding wake-up signal for each slave ECU, and sends the corresponding wake-up signal to each slave ECU respectively;

[0087] Each slave ECU receives a corresponding wake-up signal, obtains the duty cycle and frequency of the wake-up signal, and then obtains a corresponding number according to a preset communication protocol and performs automatic numbering.

[0088] That is, in this case, the actual operation of step S1 in the embodiment of the present application is: the master ECU sends a wake-up signal corresponding to the arrangement order of the slave ECUs.

[0089] The third case is when the number of slave ECUs is at least 2, and each slave ECU is connected to the master ECU signal in series, that is, each slave ECU is signal-connected in sequence, and one slave ECU is signal-connected to the master ECU.

[0090] In this case, in order to facilitate the determination of the arrangement order between the slave ECUs connected in series, the output channel of the previous slave ECU can be connected to the input channel signal of the next slave ECU on the premise that the slave ECUs are arranged in sequence, and the first slave ECU will be directly connected to the master ECU signal. In this way, the slave ECUs can grasp the arrangement order of each slave ECU based on the actual connection situation.

[0091] That is, in this case, the actual operation of step S1 in the embodiment of the present application is: the master ECU sends a corresponding wake-up signal to the first slave ECU;

[0092] The actual operation of step S2 in the embodiment of the present application is: the slave ECU receives the wake-up signal, parses the received wake-up signal according to the preset communication protocol to determine its own numbering sequence, and sends a corresponding wake-up signal to the next slave ECU.

[0093] This operation ensures the absoluteness of the position in the hardware connection. If the connection is wrong, the subsequent automatic numbering cannot be achieved. This can be used to troubleshoot the connection problem, thereby ensuring the consistency of the position and ID of each slave ECU through hard-wired connection.

[0094] Of course, in the second case mentioned above, a similar connection method can also be adopted.

[0095] Specifically, in the third case, the implementation process of the embodiment of the present application is as follows:

[0096] At this time, the master ECU determines that the slave ECU with direct signal connection is the first slave ECU. The master ECU selects the number corresponding to the first ECU according to the preset communication protocol, and then selects the duty cycle and frequency corresponding to the number, generates a wake-up signal corresponding to the first slave ECU, and sends the corresponding wake-up signal to the first slave ECU.

[0097] After the first ECU receives the wake-up signal, it obtains the duty cycle and frequency of the wake-up signal, and then, according to the preset communication protocol, it may also learn its own arrangement order and obtain the corresponding number for automatic numbering.

[0098] The first ECU can know that the next ECU connected to it is the second ECU, and then select the number corresponding to the second ECU according to the preset communication protocol, and then select the duty cycle and frequency corresponding to the number, generate a wake-up signal corresponding to the second slave ECU, and send the corresponding wake-up signal to the second slave ECU.

[0099] According to the above operation process, after the master ECU sends a wake-up signal, the previous slave ECU receives the wake-up signal, parses the received wake-up signal according to the preset communication protocol to determine its own numbering sequence, and determines the arrangement sequence of the next slave ECU, and sends the corresponding wake-up signal to the next slave ECU according to the preset communication protocol;

[0100] Each slave ECU is automatically numbered according to its own numbering sequence;

[0101] It should be noted that since there are no other slave ECUs after the last slave ECU, the last slave ECU receives the wake-up signal and only determines its own numbering sequence, but does not generate a corresponding wake-up signal to send to the next slave ECU.

[0102] It should be noted that the position of the master ECU controlling the slave ECU is not limited to being connected to the first slave ECU. The master ECU can be located between any controllers. By sending different frequencies and duty cycles to both sides, bidirectional self-encoding of the slave ECU can be achieved. In this case, hardware support for multi-channel signal output is required. A slave ECU can send different signals through two channels respectively to achieve bidirectional numbering. The numbering rules can be agreed in advance through the protocol.

[0103] Therefore, based on the technical solution of the embodiment of the present application, according to the number of slave ECUs and the connection method between the slave ECUs and the master ECU, there is also a fourth situation, that is, when the number of slave ECUs is at least two, and they are divided into at least two slave ECU groups, the specific operation process is as follows:

[0104] The master ECU sends a corresponding wake-up signal to the first slave ECU in each slave ECU group;

[0105] The slave ECU receives a wake-up signal, parses the received wake-up signal according to a preset communication protocol to determine its own number sequence, and sends a corresponding wake-up signal to the next slave ECU in the slave ECU group to which it belongs;

[0106] The slave ECUs are automatically numbered according to their own numbering sequence;

[0107] Each slave ECU in the slave ECU group is connected to the master ECU in sequence according to a preset arrangement order, and only the first slave ECU in the slave ECU group is connected to the master ECU in signal connection;

[0108] The last slave ECU in the slave ECU group receives the wake-up signal, only determines its own number sequence, and does not generate a corresponding wake-up signal to be sent to the next slave ECU in the slave ECU group to which it belongs.

[0109] In addition, in the fourth case, the slave ECUs in the slave ECU group are arranged in sequence and connected in series. The output channel of the previous slave ECU in the slave ECU group is connected to the input channel signal of the next slave ECU, and the first slave ECU in the slave ECU group is directly connected to the master ECU signal. In this way, the slave ECUs can grasp the arrangement order of each slave ECU according to the actual connection situation.

[0110] Here, we give an example for the fourth case:

[0111] Assume that there are two groups of slave ECUs. The first group of slave ECUs is denoted as 1. Then the order of the slave ECUs in the first group of slave ECUs is denoted as 11, 12, 13, and so on. Similarly, the second group of slave ECUs is denoted as 2. Then the order of the slave ECUs in the second group of slave ECUs is denoted as 21, 22, 23, and so on.

[0112] In the direction of the first group of slave ECUs, the master ECU sends a corresponding wake-up signal to the slave ECU ranked 11. The slave ECU ranked 11 receives the wake-up signal, parses the received wake-up signal according to the preset communication protocol to determine its own numbering sequence, and sends a corresponding wake-up signal to the slave ECU ranked 12, and so on.

[0113] In the direction of the second group of slave ECUs, the master ECU sends a corresponding wake-up signal to the slave ECU ranked 21. The slave ECU ranked 21 receives the wake-up signal, parses the received wake-up signal according to the preset communication protocol to determine its own numbering order, and sends a corresponding wake-up signal to the slave ECU ranked 22, and so on.

[0114] Of course, based on the technical solution of the embodiment of the present application, according to the number of slave ECUs and the connection method between the slave ECUs and the master ECU, there is also a fifth situation, that is, when the number of slave ECUs is at least two, the slave ECUs are connected in series, and the first slave ECU and the last ECU are both connected to the master ECU signal, forming a ring path between the master ECU and the slave ECUs. The specific operation process is as follows:

[0115] The master ECU sends the corresponding wake-up signal to the first slave ECU in the two sequencing directions;

[0116] Receive a wake-up signal from the slave ECU, parse the received wake-up signal according to a preset communication protocol to determine its own sequence, and send the corresponding wake-up signal to the next slave ECU in the corresponding sequence direction;

[0117] The slave ECUs are automatically numbered according to their own numbering sequence;

[0118] Since the master ECU generates wake-up signals from two directions, based on the above operations, the slave ECU may receive wake-up signals from two directions. Therefore, if necessary, the following operation steps can be set:

[0119] After the slave ECU completes automatic numbering, it refuses to receive subsequent wake-up signals, or receives subsequent wake-up signals but does not perform automatic numbering.

[0120] Of course, in the fifth case, each slave EUC can also receive wake-up signals from two directions and obtain the numbering sequence from the two directions, and then automatically number and obtain numbers from the two directions to meet various usage requirements.

[0121] In addition, based on the technical solution of the embodiment of the present application, when the ID of the slave ECU needs to be updated, the master ECU modifies the correspondence between the arrangement order and numbering between the slave ECUs in the above communication protocol, and then still uses the wake-up signal in conjunction with the above-mentioned related steps to realize the function of updating the ID of the slave ECU without powering off.

[0122] It should be noted that the step numbers of the steps in the embodiments of the present application do not limit the order of the operations in the technical solution of the present application.

[0123] Second, see Figure 8 As shown, the embodiment of the present application provides an ECU automatic numbering device on the technical basis of the ECU automatic numbering method mentioned in the first aspect. The EUC automatic numbering method provided by the embodiment of the present application can be implemented by the ECU automatic numbering device provided by the embodiment of the present application. The content and effect of the ECU automatic numbering device provided by the embodiment of the present application can refer to the ECU automatic numbering method provided by the embodiment of the present application.

[0124] The device is applied to a device having a master ECU and at least one slave ECU, and includes:

[0125] A wake-up signal sending module is used to control the master ECU to send a wake-up signal to the slave ECU. The wake-up signal is used by the slave ECU to determine its own numbering sequence;

[0126] A number determination module is used to control the reception of a wake-up signal from the slave ECU and parse the wake-up signal according to a preset communication protocol to determine the numbering sequence of the slave ECUs;

[0127] Automatic numbering module, which is used to control the slave ECUs to automatically number according to the numbering sequence of the slave ECUs;

[0128] The numbering of the slave ECUs may be, but is not limited to, a sequentially increasing manner.

[0129] Furthermore, the device also includes:

[0130] A communication protocol configuration module is used to configure the communication protocol to the master ECU and the slave ECU; wherein,

[0131] The communication protocol records a plurality of numbers arranged in sequence and the duty cycles and signal frequencies corresponding to the numbers.

[0132] In addition, when the number of slave ECUs is greater than 1, the communication protocol also records the corresponding relationship between the arrangement order and the number of the slave ECUs;

[0133] When the number of slave ECUs is greater than 1, there is an arrangement order between the slave ECUs. In order to facilitate the slave ECU to know its own number, it is necessary to establish a corresponding relationship between the arrangement order of the slave ECUs and the number to be allocated to each slave ECU.

[0134] The corresponding relationship between the arrangement order of each slave ECU and the number to be allocated to each slave ECU can be set in the communication protocol according to actual needs.

[0135] Furthermore, the device also includes:

[0136] ID configuration module, which is used to control the slave ECU to configure the ID according to its own number and write it into NVM;

[0137] After learning its own number from the ECU, it performs ID configuration, thereby realizing automatic numbering and ID automatic configuration from the ECU, and writing the ID into NVM, so that the ID will not be lost after losing the control of the mainboard or power failure.

[0138] In the embodiment of the present application, according to the number of slave ECUs, it can be divided into two situations. The first situation is that the number of slave ECUs is 1, the second situation is that the number of slave ECUs is at least 2 and each slave ECU is connected to the master ECU signal in parallel, and the third situation is that the number of slave ECUs is at least 2 and each slave ECU is connected to the master ECU signal in series.

[0139] In the first case, that is, when the number of slave ECUs is 1, the implementation process of the embodiment of the present application is as follows:

[0140] At this time, since there is only one slave ECU, its arrangement order is the first. The master ECU selects the number corresponding to the first arrangement order according to the preset communication protocol, and then selects the duty cycle and frequency corresponding to the number, generates a wake-up signal, and sends it to the slave ECU;

[0141] Receive the wake-up signal from the ECU, obtain the duty cycle and frequency of the wake-up signal, and then obtain the corresponding number according to the preset communication protocol and perform automatic numbering.

[0142] The second case is when there are at least two slave ECUs and each slave ECU is connected to the master ECU signal in parallel, that is, each slave ECU is connected to the master ECU signal.

[0143] In this case, the wake-up signal sending module is further used to control the master ECU to send a wake-up signal corresponding to the arrangement order of the slave ECUs. The implementation process of the embodiment of the present application is as follows:

[0144] At this time, the master ECU knows the arrangement order of each slave ECU by presetting the corresponding number information on the signal link of each slave ECU or through specific information of the signal link or other methods. The master ECU selects the corresponding number according to the arrangement order of each slave ECU according to the preset communication protocol, and then selects the duty cycle and frequency corresponding to the number, generates the corresponding wake-up signal for each slave ECU, and sends the corresponding wake-up signal to each slave ECU respectively;

[0145] Each slave ECU receives a corresponding wake-up signal, obtains the duty cycle and frequency of the wake-up signal, and then obtains a corresponding number according to a preset communication protocol and performs automatic numbering.

[0146] The third case is when there are at least two slave ECUs, and each slave ECU is connected to the master ECU in series, that is, each slave ECU is connected in sequence, and one slave ECU is connected to the master ECU.

[0147] In this case, the wake-up signal sending module is further used to control the master ECU to send a corresponding wake-up signal to the first slave ECU;

[0148] The number determination module is further used to control the slave ECU to receive the wake-up signal, parse the received wake-up signal according to a preset communication protocol to determine its own number sequence, and send a corresponding wake-up signal to the next slave ECU; wherein,

[0149] The slave ECUs are sequentially connected according to a preset arrangement order;

[0150] The last slave ECU receives the wake-up signal, only determines its own serial number sequence, and does not generate a corresponding wake-up signal to be sent to the next slave ECU.

[0151] In this case, in order to facilitate the determination of the arrangement order between the slave ECUs in series, the output channel of the previous slave ECU can be connected to the input channel signal of the next slave ECU under the premise of arranging the slave ECUs in order, and the first slave ECU will be directly connected to the master ECU signal. In this way, the slave ECUs can grasp the arrangement order of the slave ECUs according to the actual connection situation.

[0152] This operation ensures the absoluteness of the position in the hardware connection. If the connection is wrong, the subsequent automatic numbering cannot be achieved. This can not only troubleshoot the connection problem, but also ensure the consistency of the position and ID of each slave ECU through the hard-wired connection.

[0153] Of course, in the second case mentioned above, a similar connection method can also be adopted.

[0154] Specifically, in the third case, the implementation process of the embodiment of the present application is as follows:

[0155] At this time, the wake-up signal sending module is further used to control the master ECU to determine that the slave ECU with direct signal connection is the first slave ECU. The master ECU selects the number corresponding to the first ECU according to the preset communication protocol, and then selects the duty cycle and frequency corresponding to the number, generates a wake-up signal corresponding to the first slave ECU, and sends the corresponding wake-up signal to the first slave ECU;

[0156] The number determination module is also used for the first ECU to obtain the duty cycle and frequency of the wake-up signal after receiving the wake-up signal, and then according to the preset communication protocol, it may also learn its own arrangement order and obtain the corresponding number for automatic numbering;

[0157] The first ECU can know that the next ECU connected to it is the second ECU, and then according to the preset communication protocol, the number determination module selects the number corresponding to the second ECU, and then selects the duty cycle and frequency corresponding to the number, generates a wake-up signal corresponding to the second slave ECU, and sends the corresponding wake-up signal to the second slave ECU.

[0158] According to the above operation process, after the master ECU sends a wake-up signal, the previous slave ECU receives the wake-up signal, parses the received wake-up signal according to the preset communication protocol to determine its own numbering sequence, and determines the arrangement sequence of the next slave ECU, and sends the corresponding wake-up signal to the next slave ECU according to the preset communication protocol;

[0159] Each slave ECU is automatically numbered according to its own numbering sequence;

[0160] It should be noted that since there are no other slave ECUs after the last slave ECU, the last slave ECU receives the wake-up signal and only determines its own numbering sequence, but does not generate a corresponding wake-up signal to send to the next slave ECU.

[0161] It should be noted that the position of the master ECU controlling the slave ECU is not limited to being connected to the first slave ECU. The master ECU can be located between any controllers. By sending different frequencies and duty cycles to both sides, bidirectional self-encoding of the slave ECU can be achieved. In this case, hardware support for multi-channel signal output is required. A slave ECU can send different signals through two channels respectively to achieve bidirectional numbering. The numbering rules can be agreed in advance through the protocol.

[0162] Therefore, in order to cope with the second situation mentioned above, the wake-up signal sending module is further used to control the master ECU to send a wake-up signal corresponding to the arrangement order of the slave ECUs.

[0163] In addition, to deal with the second situation mentioned above, the wake-up signal sending module is also used to control the master ECU to send a corresponding wake-up signal to the first slave ECU, and wait for the slave ECU to receive the wake-up signal, parse the received wake-up signal according to the preset communication protocol to determine its own numbering sequence, and then control the slave ECU to send a corresponding wake-up signal to the next slave ECU.

[0164] Therefore, based on the technical solution of the embodiment of the present application, according to the number of slave ECUs and the connection method between the slave ECUs and the master ECU, there is also a fourth situation, that is, when the number of slave ECUs is at least two, and they are divided into at least two slave ECU groups,

[0165] In this case, the wake-up signal sending module is further used to control the master ECU to send a corresponding wake-up signal to the first slave ECU in each of the slave ECU groups;

[0166] The number determination module is further used to control the slave ECU to receive the wake-up signal, parse the received wake-up signal according to a preset communication protocol to determine its own number sequence, and send a corresponding wake-up signal to the next slave ECU in the slave ECU group to which it belongs; wherein,

[0167] The slave ECUs in the slave ECU group are sequentially connected to each other according to a preset arrangement order, and only the first slave ECU in the slave ECU group is connected to the master ECU;

[0168] The last slave ECU in the slave ECU group receives the wake-up signal, only determines its own numbering sequence, and does not generate a corresponding wake-up signal to be sent to the next slave ECU in the slave ECU group to which it belongs.

[0169] In addition, in the fourth case, the slave ECUs in the slave ECU group are arranged in sequence and connected in series. The output channel of the previous slave ECU in the slave ECU group is connected to the input channel signal of the next slave ECU, and the first slave ECU in the slave ECU group is directly connected to the master ECU signal. In this way, the slave ECUs can grasp the arrangement order of each slave ECU according to the actual connection situation.

[0170] Of course, based on the technical solution of the embodiment of the present application, there is also a fifth situation depending on the number of slave ECUs and the connection method between the slave ECU and the master ECU, that is, when the number of slave ECUs is at least two, each slave ECU is connected in series, and the first slave ECU and the last ECU are both connected to the master ECU signal, forming a ring-shaped path between the master ECU and each slave ECU.

[0171] In this case, the wake-up signal sending module is further used to control the master ECU to send a corresponding wake-up signal to the first slave ECU in the two sorting directions;

[0172] The number determination module is further configured to receive a wake-up signal from the ECU, parse the received wake-up signal according to a preset communication protocol to determine its own number sequence, and send a corresponding wake-up signal to the next slave ECU in the corresponding sequence direction; wherein,

[0173] Since the master ECU generates wake-up signals from two directions, based on the above operations, the slave ECU may receive wake-up signals from two directions. Therefore, if necessary, the following operation steps can be set:

[0174] After the slave ECU completes automatic numbering, it refuses to receive subsequent wake-up signals, or receives subsequent wake-up signals but does not perform automatic numbering.

[0175] Of course, in the fifth case, each slave EUC can also receive wake-up signals from two directions and obtain the numbering sequence from the two directions, and then automatically number and obtain numbers from the two directions to meet various usage requirements.

[0176] In the fourth and fifth cases, the wake-up signal is still sent by controlling the master ECU or the slave ECU using the wake-up signal sending module. The specific principle is similar to that of the first to third cases.

[0177] In addition, based on the technical solution of the embodiment of the present application, when the ID of the slave ECU needs to be updated, the master ECU modifies the correspondence between the arrangement order and numbering between the slave ECUs in the above communication protocol, and then still uses the wake-up signal to cooperate with the above-mentioned related operations to realize the function of updating the ID of the slave ECU without powering off.

[0178] It should be noted that the ECU automatic programming device provided in the embodiment of the present application, and its corresponding technical problems, technical means and technical effects are similar to the principles of the ECU automatic programming method at the principle level.

[0179] In a third aspect, an embodiment of the present application provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, the ECU automatic numbering method mentioned in the first aspect is implemented.

[0180] In a fourth aspect, an embodiment of the present application provides a terminal device comprising a memory and a processor, wherein the memory stores a computer program running on the processor, and when the processor executes the computer program, the ECU automatic numbering method mentioned in the first aspect is implemented.

[0181] It should be noted that, in this application, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises", "includes" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element.

[0182] The above are merely specific embodiments of the present application to enable those skilled in the art to understand or implement the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but rather is intended to conform to the widest scope consistent with the principles and novel features of the present application.

Claims

1. An ECU automatic numbering method, characterized in that: The method is applied to a device having a master ECU and at least two slave ECUs, and comprises the following steps: Configuring a communication protocol for the master ECU and the slave ECUs; wherein the communication protocol records a plurality of numbers arranged in sequence and the duty cycles and signal frequencies corresponding to the numbers; and the communication protocol also records the correspondence between the arrangement sequence of the slave ECUs and the numbers; The master ECU sends a wake-up signal to the slave ECU via a hardwire; wherein the wake-up signal is used by the slave ECU to determine its own serial number sequence, and different serial numbers are distinguished by the wake-up signal having different duty cycles and frequencies; the slave ECU receives the wake-up signal and parses the wake-up signal according to a preset communication protocol to determine the serial number sequence of the slave ECU; The slave ECUs are automatically numbered according to the numbering sequence of the slave ECUs, and each slave ECU wakes up at most one slave ECU.

2. The method according to claim 1, characterized in that In the process of sending a wake-up signal from the master ECU to the slave ECU, the method comprises the following steps: The master ECU sends a wake-up signal corresponding to the arrangement order of the slave ECUs.

3. The method according to claim 1, characterized in that The method comprises the following steps: The master ECU sends a corresponding wake-up signal to the first slave ECU; The slave ECU receives the wake-up signal, parses the received wake-up signal according to a preset communication protocol to determine its own numbering sequence, and sends a corresponding wake-up signal to the next slave ECU; wherein, The slave ECUs are sequentially connected according to a preset arrangement order; The last slave ECU receives the wake-up signal, only determines its own serial number sequence, and does not generate a corresponding wake-up signal to be sent to the next slave ECU.

4. The method according to claim 1, wherein The slave ECUs are divided into at least two slave ECU groups, and the method comprises the following steps: The master ECU sends a corresponding wake-up signal to the first slave ECU in each of the slave ECU groups; The slave ECU receives the wake-up signal, parses the received wake-up signal according to a preset communication protocol to determine its own numbering sequence, and sends a corresponding wake-up signal to the next slave ECU in the slave ECU group to which it belongs; wherein, The slave ECUs in the slave ECU group are sequentially connected to each other according to a preset arrangement order, and only the first slave ECU in the slave ECU group is connected to the master ECU; The last slave ECU in the slave ECU group receives the wake-up signal, only determines its own numbering sequence, and does not generate a corresponding wake-up signal to be sent to the next slave ECU in the slave ECU group to which it belongs.

5. The method according to any one of claims 2 to 4, characterized in that: The slave ECUs are arranged in sequence, and an output channel of a preceding slave ECU is signal-connected to an input channel of a succeeding slave ECU.

6. The method according to any one of claims 1 to 4, characterized in that After the slave ECUs are automatically numbered according to the numbering sequence of the slave ECUs, the method further comprises the following steps: The slave ECU configures its ID according to its own number and writes it into NVM.

7. An ECU automatic numbering device, characterized in that: The device is applied to a device having a master ECU and at least two slave ECUs, and includes: A communication protocol configuration module configured to configure a communication protocol for the master ECU and slave ECUs; wherein the communication protocol records a plurality of sequentially arranged numbers and the duty cycles and signal frequencies corresponding to the numbers; and the communication protocol also records the correspondence between the arrangement order and the numbers of the slave ECUs; A wake-up signal sending module, which is used to control the master ECU to send a wake-up signal to the slave ECU via a hard line; a number determination module, configured to control the slave ECU to receive the wake-up signal and parse the wake-up signal according to a preset communication protocol to determine the numbering sequence of the slave ECUs; An automatic numbering module, which is used to control the slave ECUs to automatically number according to the numbering sequence of the slave ECUs; The wake-up signal is used by the slave ECU to determine its own serial number sequence, and different serial numbers can be distinguished by using the wake-up signal with different duty cycles and frequencies; Each slave ECU wakes up at most one slave ECU.

8. A terminal device, characterized in that: The terminal device includes: a processor, a memory, a communication interface and a bus; the processor, the memory and the communication interface are connected through the bus and communicate with each other; the memory stores executable program code; the processor runs the program corresponding to the executable program code by reading the executable program code stored in the memory, so as to execute the ECU automatic numbering method as described in any one of claims 1 to 6 above.

9. A storage medium, characterized in that: The storage medium stores a program, and when the program is run on the terminal device, the ECU automatic numbering method as described in any one of claims 1 to 6 is executed.

Citation Information

Patent Citations

  • A whole vehicle energy consumption control method of an electric vehicle

    CN109039662A

  • Local dormancy / wake-up method and system of CAN bus

    CN109144029A