Communication control method and electronic control device
The communication control method for electronic control devices addresses communication errors by setting higher communication speeds during program updates and using a dummy node to prevent errors, achieving efficient updates and reduced errors.
Patent Information
- Application Number
- JP2023178721
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-10-17
- Publication Date
- 2025-04-30
AI Technical Summary
During the manufacturing and operation stages of electronic control devices, communication errors can occur due to differences in communication speed between the program rewriting device and the electronic control device, affecting the efficiency of program updates.
A communication control method is implemented where the electronic control device sets its communication speed to a higher speed when connected to a program rewriting device, using a dummy node to respond to communication start signals and prevent communication errors, while switching to standard communication speed for normal operation.
This method enables efficient program updates for electronic control devices while minimizing communication errors, improving manufacturing productivity and reducing costs.
Smart Images

Figure 2025068743000001_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to an electronic control unit that controls an in-vehicle device and a communication control method related to program rewriting in the electronic control unit. [Background technology]
[0002] An electronic control device that controls various devices mounted on a vehicle such as an automobile transmits and receives data between the devices to be controlled and other electronic control devices via a communication network. One example of such a communication technology is CAN (Controller Area Network). As an example of a conventional technology using CAN communication, a technology has been proposed in which a control device that requires specific information transmits and receives data at a specific high-speed communication speed. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] JP 2010-272971 A Summary of the Invention [Problem to be solved by the invention]
[0004] Here, during the manufacturing stage of the electronic control device and the subsequent operation stage, the control program that runs on the electronic control device is rewritten. At this time, the rewriting process is performed while transmitting and receiving data between the program rewriting device and the electronic control device. The faster the communication speed at this time, the faster and more efficiently the rewriting process can be realized. However, communication errors may occur due to the difference between the communication speed and the communication speed during normal operation of the electronic control device.
[0005] The present invention has been made in consideration of the problems in the related art, and has an object to realize efficient updating of programs in electronic control units while suppressing the occurrence of communication errors. [Means for solving the problem]
[0006] One aspect of the present invention is a communication control method executed in a system in which an electronic control device having a plurality of microcontrollers each storing a plurality of control programs for controlling an in-vehicle device is communicatively connected to at least one of a program rewriting device that transmits a rewrite command for the control programs and another node related to the control. The system is configured to further include a dummy node communicatively connected to the program rewriting device when the electronic control device is connected to the program rewriting device. In the method, the plurality of microcontrollers set their respective communication speeds to a second communication speed higher than a first communication speed used for communication with the other nodes at the time of startup, and set a communication function to a state in which only data reception is enabled. In the method, the following process is performed when the electronic control device is connected to the program rewriting device. That is, the program rewriting device transmits a communication start signal to the plurality of microcontrollers and the dummy node. Then, when the plurality of microcontrollers receive the communication start signal, the communication function is set to a state in which both data reception and transmission are enabled, while the dummy node returns a response signal to the communication start signal instead of the electronic control device. Furthermore, the program rewriting device identifies the electronic control device as being capable of communicating with the electronic control device by receiving the response signal, and transmits a program rewriting command to each of the multiple microcontrollers. The multiple microcontrollers then execute a process of rewriting the control program based on the program rewriting command. The method also performs the following process when the electronic control device is not connected to the program rewriting device. That is, the multiple microcontrollers set their respective communication speeds to the first communication speed, set their respective communication functions to a state in which both data reception and transmission are enabled, and execute the control program. Effect of the Invention
[0007] According to the present invention, it is possible to realize efficient updating of a program for an electronic control unit while suppressing the occurrence of communication errors. [Brief description of the drawings]
[0008] [Figure 1] FIG. 1 is an explanatory diagram illustrating an example of a vehicle control system. [Diagram 2] FIG. 2 is an explanatory diagram illustrating an example of the internal configuration of an ECU. [Diagram 3] 11 is a time chart showing the occurrence of a stuff error due to a difference in communication speed. [Figure 4] FIG. 1 is an explanatory diagram illustrating an example of a program rewriting system. [Diagram 5] FIG. 11 is a sequence diagram of a processing procedure in the program rewriting system. [Figure 6] 10 is a flowchart showing an example of a processing procedure of a communication control method. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0009] Hereinafter, an embodiment of the present invention will be described with reference to the drawings. [Vehicle control system configuration] 1 is a configuration diagram showing one embodiment of a vehicle control system 100. The vehicle control system 100 is a system mounted on a vehicle 200 such as an automobile, and includes a plurality of electronic control units (ECUs: Electronic Control Units) 300a-300n that control on-vehicle devices, actuators 400a-400n controlled by the ECUs 300a-300n, respectively, and a vehicle CAN bus 500 that is a communication line for a CAN communication method. For example, the actuator 400a is an electric motor of an electric power steering device provided in the vehicle 200, and the ECU 300a is a steering control device that drives and controls the electric motor. Also, for example, the actuator 400b is a fuel injection valve of an internal combustion engine, and the ECU 300b is an engine control device that drives and controls the fuel injection valve. Similarly, each of the ECUs 300c to 300n has a function of controlling an in-vehicle device. Note that, although FIG. 1 shows an example of only a combination of an ECU and one actuator, one ECU can also control multiple actuators.
[0010] The ECU 300a includes a plurality of micro control units (MCUs), namely, an MCU 310a and an MCU 310b. Furthermore, the other nodes, ECUs 300b to 300n, related to the control of the ECU 300a also include one or more MCUs (not shown). The ECU 300a and the other ECUs 300b to 300n are connected to a vehicle CAN bus 500 to configure a network system. The ECU 300a and the other ECUs 300b to 300n transmit data via the vehicle CAN bus 500 at a standard (low-speed) communication speed of 500 kbps.
[0011] [Internal structure of ECU] The internal configuration of the ECU 300a to which the program rewriting method according to the present invention is applied will be further described below. As shown in FIG 2, the ECU 300a includes an MCU 310a and an MCU 310b.
[0012] The MCU 310a includes a processor 320a, a non-volatile memory 330a, and a CAN controller 340a. The processor 320a executes a control program for the electric power steering device stored in the non-volatile memory 330a, and drives and controls the actuator 400a. The processor 320a also cooperates with the CAN controller 340a to control communication with the vehicle CAN bus 500. The non-volatile memory 330a stores the above-mentioned control program and firmware, as well as communication setting information used to switch the communication speed. The CAN controller 340a realizes CAN protocol functions such as bit stuffing, communication arbitration, error handling, and CRC check. The CAN controller 340a has a function of switching the communication speed between 1 Mbps and 500 Kbps according to an instruction from the processor 320a. The MCU 310a has a transmission port TX and a reception port RX, and is connected to the CAN transceiver 350. The CAN transceiver 350 has a function of connecting the transmission port TX to the "High" side of the vehicle CAN bus 500 and connecting the reception port RX to the "Low" side of the vehicle CAN bus 500 to perform CAN communication.
[0013] Similarly, the MCU 310b includes a processor 320b, a non-volatile memory 330b, and a CAN controller 340b. The processor 320b executes a control program for a fuel injection valve of an internal combustion engine stored in the non-volatile memory 330b, and drives and controls an actuator 400b. The processor 320b also cooperates with the CAN controller 340b to control communication with the CAN bus 500. The non-volatile memory 330b stores the above-mentioned control program and firmware, as well as communication setting information used to switch the communication speed. The CAN controller 340b realizes CAN protocol functions such as bit stuffing, communication arbitration, error handling, and CRC check. The CAN controller 340b has a function of switching the communication speed between 1 Mbps and 500 Kbps according to an instruction from the processor 320b. MCU 310b has a transmission port TX and a reception port RX, and is connected to CAN transceiver 350. CAN transceiver 350 has a function of connecting transmission port TX to the "High" side of vehicle CAN bus 500 and connecting reception port RX to the "Low" side of vehicle CAN bus 500 to perform CAN communication.
[0014] [Issues and solutions caused by communication speed settings] As described above, when the ECU 300a is incorporated in the vehicle control system 100, it transmits data to the other ECUs 300b to 300n at a communication speed of 500 kbps via the vehicle CAN bus 500. In this case, in order for the ECU 300a to normally communicate with other nodes such as the ECU 300b via the CAN bus, the communication speeds of all nodes including the ECU 300a must be unified to 500 kbps.
[0015] On the other hand, for example, when rewriting (reprogramming) a control program or the like during manufacturing, the time required for rewriting the program can be reduced by increasing the communication speed. For this reason, the communication speed of the CAN communication between the ECU 300a and the program rewriting device is set to a speed (second communication speed) higher than 500 kbps (first communication speed), for example, 1 Mbps. Here, the program rewriting device is a tool that transmits a program rewriting command (in other words, a reprogramming tool or an external device for rewriting). The program rewriting command here includes new program data to be rewritten. In this specification, rewriting a program (data) includes not only so-called updates but also writing new data.
[0016] However, if the ECU 300a is incorporated in a vehicle control system 100 that has a standard communication speed of 500 kbps and operates at a communication speed of 1 Mbps, the following problem may occur: A stuff error or misrecognition of data may occur due to the difference in communication speed between the ECU 300a and the other ECUs 300b to 300n, resulting in failure to establish communication.
[0017] FIG. 3 shows how a stuff error occurs. In the CAN communication method, in order to prevent synchronization loss, after sending five consecutive "0"s or five consecutive "1"s, the inverted bit is inserted; this specification is called bit stuffing, and the inserted bit is called a stuff bit. If the same level continues for six or more bits within the bit stuffing area, it is treated as a stuff error.
[0018] In the vehicle control system 100, if the ECU 300a operates at 1 Mbps and the other ECU 300b operates at 500 kbps, for example, when the ECU 300b transmits one "1", the ECU 300a receives two "1". Therefore, even if the transmitted data is normal when read at 500 kbps, the ECU 300a reading at 1 Mbps will read it as abnormal data in which the same level continues for six or more bits within the bit stuffing area. This will be detected as a stuffing error. When ECU 300a detects a stuff error, it transmits an error frame to vehicle CAN bus 500, which results in communication being unable to be established. Furthermore, when an error frame occurs, if another ECU such as the ECU 300b connected to the same bus has the ability to detect errors, it is possible that the other ECU may detect an abnormality due to the error frame.
[0019] In order to prevent the stuff error from occurring due to the mismatch in communication speed between the ECU 300a and the other ECUs 300b to 300n as described above, for example, the following method may be considered. That is, in the ECU 300a, a program rewrite process is performed once at a high communication speed of 1 Mbps, and then the communication speed is switched to the standard 500 kbps. This can eliminate the mismatch in communication speed between the ECU 300a and the other ECUs 300b to 300n when the ECU 300a is incorporated into the vehicle control system 100 whose standard communication speed is 500 kbps.
[0020] However, when the ECU 300a includes a plurality of MCUs 310a and 310b as in this embodiment, the following problem may occur. For example, first, the program is rewritten only for the MCU 310a at a high communication speed of 1 Mbps, and the communication speed of the MCU 310a is switched to the standard 500 kbps. On the other hand, the program of the MCU 310b has not yet been rewritten, so the communication speed remains set to the high communication speed of 1 Mbps. Here, the MCU 310a and the MCU 310b are mutually connected by a CAN bus inside the ECU 300a. Therefore, when a program rewriting request is next transmitted from the program rewriting device to the MCU 310b at a communication speed of 1 Mbps, a mismatch in communication speed occurs between the MCU 310a and the MCU 310a, whose communication speed has been switched to the standard 500 kbps. As a result, a stuff error is detected, and an error frame is transmitted from the MCU 310a.
[0021] Therefore, in this embodiment, the programs of both the MCU 310a and the MCU 310b in the ECU 300a can be rewritten at a communication speed faster than the standard (low) CAN communication speed (500 kbps) in the vehicle control system 100. Thus, while realizing high-speed program rewriting for a plurality of MCUs, it is possible to prevent stuff errors from occurring when the ECU 300a is incorporated into the vehicle control system 100 and used.
[0022] For this reason, in this embodiment, first, as an initial state, based on the communication setting information, the CAN communication of both the MCU 310a and the MCU 310b of the ECU 300a is set to a receive-only mode in which only data reception is enabled. Then, the communication speed of both the MCU 310a and the MCU 310b of the ECU 300a is set to a high communication speed (1 Mbps). In this state, if the ECU 300a receives data from the outside at a standard communication speed (500 kbps), the MCU 310a and the MCU 310b will detect a stuff error. However, since the MCU 310a and the MCU 310b are set to the receive-only mode and cannot transmit an error frame onto the CAN bus, a situation in which communication is hindered by an error frame is avoided.
[0023] Then, the MCU 310a and MCU 310b wait until they receive a communication start signal from the program rewriting device, which is a trigger for program rewriting. As a result, if the signal is not received and a predetermined time has passed, the MCU 310a and MCU 310b determine that the program rewriting process is not being performed, that is, that the program rewriting device is not connected. Then, the MCU 310a and MCU 310b switch the communication speed to a low (standard) communication speed (500 kbps). Furthermore, the MCU 310a and MCU 310b switch the communication function from a receive-only mode to a transmit / receive mode that allows both data reception and transmission. Then, the MCU 310a and MCU 310b execute the normal control program.
[0024] On the other hand, when the MCU 310a and MCU 310b receive a communication start signal that triggers program rewriting from the program rewriting device, the program rewriting process is performed, i.e., the MCU 310a and MCU 310b identify that the program rewriting device is connected. The MCU 310a and MCU 310b then maintain a high-speed communication speed (1 Mbps). In addition, the MCU 310a and MCU 310b switch their communication functions from a receive-only mode to a transmit / receive mode. The MCU 310a and MCU 310b then execute the program rewriting process while properly transmitting and receiving data to and from the program rewriting device. The state where only data reception is enabled can also be achieved by disabling the transmission port TX. In this case, by returning the transmission port TX to an enabled state, both data reception and transmission are enabled.
[0025] In the above method, if the MCU 310a and MCU 310b of the ECU 300a are in a receive-only mode, they cannot send back a response signal to the communication start signal sent by the program rewriting device, and therefore the program rewriting device cannot determine that subsequent communication is possible, and the subsequent program rewriting process does not proceed. Therefore, when the ECU 300a and the program rewriting device are connected to a CAN bus to update the control program of the ECU 300a, the system is configured as follows in this embodiment: That is, in this embodiment, a dummy node that transmits a reception response instead of the ECU 300a is connected to the CAN bus to which the ECU 300a and the program rewriting device are connected to configure a program rewriting system.
[0026] [Program rewriting system configuration] FIG. 4 shows the overall configuration of the program rewriting system 101 when rewriting the control program stored in the non-volatile memory 330a of the ECU 300a. The program rewriting system 101 in FIG. 4 is configured by connecting a CAN bus 900 with an ECU 300a, a dummy node 300x, and a program rewriting device 700. Like the ECU 300a, the dummy node 300x includes an MCU and a CAN transceiver, and has a function of returning a reception response to a communication start signal from the program rewriting device 700.
[0027] Here, the CAN communication speed of the dummy node 300x and the CAN communication speed of the program rewriting device 700 are both set to a high speed (1 Mbps). The personal computer 800 is a device for operating the program rewriting device 700 and the dummy node 300x.
[0028] The program rewriting system 101 in FIG. 4 can be configured by replacing the connector of the ECU 300a that constitutes the vehicle control system 100 in FIG. Also, the program rewriting device 700 and the dummy node 300x can be connected to the vehicle CAN bus 500, and the nodes other than the ECU 300a can be disconnected from the CAN bus by disconnecting connectors or switches. Furthermore, by supplying power only to the program rewriting device 700, the dummy node 300x, and the system required for program rewriting of the ECU 300a, it is possible to rewrite the program of the ECU 300a mounted on the vehicle. That is, the vehicle control system 100 and the program rewriting system 101 can have mutually overlapping or matching configurations depending on the connection mode of the components.
[0029] FIG. 5 shows a sequence of data transmission and reception between devices in the program rewriting system 101 of FIG. 4. All data transmission and reception shown in FIG. 5 is performed at a high communication speed (1 Mbps). The program rewriting device 700 transmits a communication start signal, which is a trigger for program rewriting, to both the ECU 300a and the dummy node 300x. At this time, the ECU 300a is in a receive-only mode and cannot return a response signal (ACK: Acknowledgement) to the program rewriting device 700. Therefore, the dummy node 300x, instead of the ECU 300a, returns a response signal indicating that the ECU 300a has received the communication start signal to the program rewriting device 700 via the CAN bus 900. By receiving the response signal from the dummy node 300x, the program rewriting device 700 identifies that communication with the ECU 300a can be established.
[0030] Meanwhile, upon receiving the communication start signal from the program rewriting device 700, the ECU 300a switches its communication function from the receive-only mode to the transmit / receive mode. This switching is performed at least at a timing before the program rewriting device 700 starts transmitting a subsequent program rewriting command after receiving a response signal from the dummy node 300x. Then, the program rewriting device 700 transmits a program rewriting command to the ECU 300a. At this time, the ECU 300a has been switched to the transmit / receive mode, and is therefore capable of communication involving normal data transmission and reception. Therefore, the program rewriting process in the ECU 300a can be realized while data is being transmitted and received between the program rewriting device 700 and the ECU 300a.
[0031] [Processing procedure for communication control method by ECU] FIG. 6 shows the procedure of a communication control method executed by the MCU 310a and MCU 310b of the ECU 300a in the configuration of the vehicle control system 100 shown in FIG. 1 or the program rewriting system 101 shown in FIG.
[0032] In step 1001 (indicated as S1001 in the figure, and the same applies below), when the start switch 201 of the vehicle 200 is switched from the off state to the on state and the power is turned on, the MCU 310a performs an initial process to start CAN communication. Specifically, the MCU 310a operates a boot loader, sets the receiving port RX and the transmitting port TX terminals, initializes the CAN module registers, and so on. Here, the MCU 310a reads communication setting information from the non-volatile memory 330a. The communication setting information includes information indicating the communication speed of the CAN communication (high-speed communication of 1 Mbps or low-speed communication of 500 kbps) and the communication function (whether only reception is enabled or both transmission and reception are enabled). Similarly, the MCU 310b also performs an initial process using the boot loader and reads communication setting information from the non-volatile memory 330b.
[0033] In step 1002, the MCU 310a and the MCU 310b set the CAN communication mode to a receive-only mode or disable the transmit port TX, and set the communication function to a state in which only data reception is enabled. This disables data transmission in the CAN communication. In step 1003, the MCU 310a and the MCU 310b set the communication speed of the CAN communication to high speed (1 Mbps). In step 1004, the MCU 310a and the MCU 310b start CAN communication.
[0034] In step 1005, the MCU 310a and the MCU 310b wait to receive a communication start signal transmitted from the program rewriting device 700, which serves as a trigger for program rewriting. In step 1006, the MCU 310a and MCU 310b determine whether or not they have received a communication start signal that triggers program rewriting from the program rewriting device 700. If they have received a communication start signal, they proceed to step 1007 (Yes), and if not, they proceed to step 1012 (No). Here, when the MCU 310a and MCU 310b receive the communication start signal, they can identify that their own devices are connected to the program rewriting device 700.
[0035] In step 1007, the MCU 310a and the MCU 310b set the CAN communication mode to a transmit / receive mode or set the transmit port TX to be enabled, and set the communication function to a state in which both data reception and transmission are enabled. When the MCU 310a and the MCU 310b receive a communication start signal that triggers program rewriting from the program rewriting device 700, the program rewriting device 700 also transmits the communication start signal to the dummy node 300x as shown in Fig. 5. Then, by receiving a response signal from the dummy node 300x, the program rewriting device 700 identifies that communication with the ECU 300a can be established.
[0036] In step 1008, the MCU 310a communicates with the program rewriting device 700 and executes a program rewriting process for its own device. Specifically, the MCU 310a receives a program rewriting command from the program rewriting device 700, and rewrites the control program stored in the non-volatile memory 330a based on the command. In the flowchart of FIG. 6, the MCU 310a is represented as MCU1. In step 1009, the MCU 310a ends the program rewriting process. In step 1010, the MCU 310b communicates with the program rewriting device 700 and executes a program rewriting process for its own device. Specifically, the MCU 310b receives a program rewriting command from the program rewriting device 700, and rewrites the control program stored in the non-volatile memory 330b based on the command. In the flowchart of FIG. 6, the MCU 310b is represented as MCU2. In step 1011, the MCU 310b ends the program rewriting process.
[0037] In the processing of steps 1008 to 1011, the program rewriting device 700 can specify which of the MCU 310a and the MCU 310b is to be rewritten by using a CANID or the like. Moreover, the above steps 1007 to 1011 are processes performed when the ECU 300a is connected to the program rewriting device 700.
[0038] In step 1012, the MCU 310a and MCU 310b determine whether a predetermined time has elapsed until they receive a communication start signal that triggers program rewriting from the program rewriting device 700, that is, whether a timeout has occurred. If a timeout has occurred, the process proceeds to step 1013 (Yes), and if not, the process returns to step 1005 (No). Here, if the MCU 310a and MCU 310b do not receive the communication start signal until the timeout has occurred, the MCU 310a and MCU 310b can identify that their own devices are not connected to the program rewriting device 700.
[0039] In step 1013, the MCU 310a and the MCU 310b set the communication speed of the CAN communication to a low speed (500 kbps). In step 1014, the MCU 310a and the MCU 310b set the CAN communication mode to a transmit / receive mode or set the transmit port TX to an enabled state, thereby setting the communication function to a state in which both data reception and transmission are enabled. In step 1015, the MCU 310a and the MCU 310b execute the control program. The above steps 1013 to 1015 are the processes performed when the ECU 300a is not connected to the program rewriting device 700.
[0040] [Effects, modifications, etc. of this embodiment] According to this embodiment, when the ECU 300a is started, the communication speed of both the MCU 310a and the MCU 310b included in the ECU 300a is set to high. Then, when the ECU 300a is connected to the program rewriting device 700, both the MCU 310a and the MCU 310b included in the ECU 300a communicate with the program rewriting device 700 at the high communication speed. Therefore, the time required for rewriting the programs of the MCU 310a and the MCU 310b is shortened. Therefore, the productivity of the ECU 300a is improved during the manufacture of the ECU 300a, and the manufacturing cost of the ECU 300a can be reduced. At this time, high-speed communication is maintained for both MCUs until the program rewriting process of both the MCU 310a and the MCU 310b is completed. Therefore, a stuff error caused by a mismatch in communication speed between the MCU 310a and the MCU 310b does not occur.
[0041] On the other hand, when the ECU 300a is incorporated in the vehicle control system 100, if the communication speed is initially set to high, the MCU 310a and MCU 310b may detect a stuff error when data is received from another device at a standard (low) communication speed. However, at this time, the MCU 310a and MCU 310b are set to a receive-only mode, so no error frame is transmitted. In this case, the communication speed is changed to the standard (low) communication speed in the vehicle control system 100 for both the MCU 310a and MCU 310b. Therefore, both the MCU 310a and MCU 310b can execute the control program of the in-vehicle device without causing a stuff error.
[0042] As described above, when the ECU 300a is started, the communication speed of both the MCU 310a and the MCU 310b included in the ECU 300a is initially set to high, which provides the following effect. That is, there is a case where the need for program rewriting arises after the ECU 300a is manufactured and mounted on a vehicle, and the program rewriting device 700 is connected by changing the connector or the like. In this case, too, the MCU 310a and the MCU 310b are restarted, and it is identified that the program rewriting device 700 is connected, so that the programs of both MCUs can be rewritten at a high communication speed. In this way, in this embodiment, it is possible to efficiently rewrite the program not only during the manufacture of the ECU 300a, but also after operation.
[0043] In the present embodiment, a specific example has been described in which the high-speed communication speed is 1 Mbps and the low-speed communication speed is 500 kbps. However, the communication speeds are not limited to these speeds. It is sufficient that the CAN communication speed of the ECU 300a can be switched to a communication speed higher than the standard CAN communication speed in the vehicle control system 100.
[0044] The technical ideas described in the above embodiments can be used in any suitable combination as long as no contradiction occurs. Furthermore, although the contents of the present invention have been specifically described with reference to preferred embodiments, it is obvious that a person skilled in the art can adopt various modified embodiments based on the basic technical concept and teachings of the present invention.
[0045] For example, the electronic control device according to the present invention is not limited to an electronic control device that directly controls an actuator, but may be an electronic control device that provides a control command or information for determining the control command to an electronic control device that controls an actuator. Furthermore, the system is not limited to a combination of the program rewriting device 700 and the personal computer 800 , and the personal computer 800 may also have the functions of the program rewriting device 700 .
[0046] Furthermore, the program rewriting device 700 can store update program data in a built-in storage means, or can wirelessly obtain update program data from an external source. Furthermore, although ECU 300a has two MCUs, MCU 310a and MCU 310b, the number of MCUs is not limited to two, and the present invention can also be realized in a case where ECU 300a has three or more MCUs. At least one of the MCU 310a and the MCU 310b of the ECU 300a may include a first non-volatile memory and a second non-volatile memory as a storage unit, and the control program may be stored in the first non-volatile memory, and the communication setting information may be stored in the second non-volatile memory. In addition, in this embodiment, the communication method is explained using an example of CAN communication, but the present invention can also be realized in other communication methods that can control the communication speed, other than CAN communication. [Explanation of symbols]
[0047] 100...vehicle control system, 101...program rewriting system, 200...vehicle, 300a...ECU, 300b to 300n...ECU (other nodes), 300x...dummy node, 310a, 310b...MCU, 320a, 320b...processor, 330a, 330b...non-volatile memory, 340a, 340b...CAN controller, 350...CAN transceiver, 400a, 400b...actuator, 500...vehicle CAN bus, 700...program rewriting device, 900...CAN bus
Claims
1. A communication control method executed in a system in which an electronic control device having a plurality of microcontrollers each storing a plurality of control programs for controlling an in-vehicle device is communicatively connected to at least one of a program rewriting device that transmits a rewrite command for the control programs and another node related to the control, comprising: the system further includes a dummy node communicatively connected to the program rewriting device when the electronic control device is connected to the program rewriting device, the plurality of microcontrollers, at the time of startup, set their respective communication speeds to a second communication speed higher than a first communication speed used for communication with the other nodes, and set their communication functions to a state in which only data reception is enabled; When the electronic control device is connected to the program rewriting device, the program rewriting device transmits a communication start signal to the plurality of microcontrollers and the dummy node; When the plurality of microcontrollers receive the communication start signal, the microcontrollers set a communication function to a state in which both data reception and transmission are enabled, while the dummy node returns a response signal to the communication start signal instead of the electronic control device; the program rewriting device identifies that communication with the electronic control device is possible by receiving the response signal, and transmits a program rewriting command to each of the plurality of microcontrollers, and the plurality of microcontrollers execute a rewriting process of the control program based on the program rewriting command; When the electronic control device is not connected to the program rewriting device, the plurality of microcontrollers set the communication speed of each of them to the first communication speed, and set the communication function of each of them to a state in which both data reception and transmission are enabled, and execute the control program; Communications control method.
2. 2. The communication control method according to claim 1, wherein the plurality of microcontrollers identify that they are connected to the program rewriting device when they receive a communication start signal from the program rewriting device within a predetermined time, and identify that they are not connected to the program rewriting device when they do not receive the communication start signal within the predetermined time.
3. The communication control method according to claim 1 , wherein the communication is a CAN communication, and the plurality of microcontrollers perform bit stuffing in data communication carried out via a CAN bus.
4. 2. The communication control method according to claim 1, wherein the first communication speed is 500 kbps and the second communication speed is 1 Mbps.
5. An electronic control device having a plurality of microcontrollers each storing a plurality of control programs for controlling an in-vehicle device, the electronic control device is communicatively connected to at least one of a program rewriting device that transmits a rewrite command for the control program, a dummy node communicatively connected to the program rewriting device, and another node related to the control; The plurality of microcontrollers At the time of startup, each communication speed is set to a second communication speed higher than a first communication speed used for communication with the other node, and a communication function is set to a state in which only data reception is enabled; when receiving a communication start signal transmitted from the program rewriting device to the electronic control device and the dummy node, sets a communication function to a state in which both data reception and transmission are enabled, and executes a rewrite process of the control program based on a program rewrite command transmitted from the program rewriting device which the dummy node has identified as being capable of communicating with the electronic control device by returning a response signal in place of the electronic control device; when the communication start signal is not received, the communication speed is set to the first communication speed, and the communication function is set to a state in which both data reception and transmission are enabled, and the control program is executed. Electronic control unit.
Citation Information
Patent Citations
Control system and method for rewriting control program
JP2010272971A