Electronic control device and start-up control method
The electronic control device ensures normal startup control of the microcomputer by employing communication-based activation modes and a shutdown mechanism for failed registers, addressing activation issues in wake-up circuits.
Patent Information
- Application Number
- JP2023080713
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-05-16
- Publication Date
- 2024-11-28
- Estimated Expiration
- 2043-05-16
AI Technical Summary
In electronic control devices, a failure in the register of the wake-up circuit can prevent proper authentication of wake-up identifiers, leading to impossible activation control of the microcomputer.
The electronic control device includes a first mode for activation via communication line communication and a second mode for activation upon receiving a wake-up identifier, with the ability to switch to a shutdown state upon failure, ensuring normal startup control even with a failed register.
This approach allows for normal startup control of the main microcomputer even if the wake-up circuit's register fails, without requiring hardware changes, by setting the wake-up circuit to a sleep-wake-up mode and preventing unintended activation.
Smart Images

Figure 2024164960000001_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to an electronic control device and a startup control method. [Background technology]
[0002] As an example of a technology for properly performing startup processing in an electronic control unit installed in a vehicle, a technology has been proposed in which the operational requirements of each application are determined based on the power supply state and startup requirements, and only applications that satisfy the operational requirements are started. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] JP 2006-327217 A Summary of the Invention [Problem to be solved by the invention]
[0004] Here, in the electronic control device, a wake-up circuit that performs startup control of a main microcomputer may have a configuration that performs startup control of a microcomputer (microcomputer) that performs control processing of an in-vehicle device when a specific wake-up identifier is received from an external unit, etc. In such a configuration, if a failure occurs in the register of the wake-up circuit, authentication of the wake-up identifier may not be performed normally, and a situation may arise in which startup control becomes impossible.
[0005] Therefore, an object of one aspect of the present invention is to enable normal startup control of a microcomputer in an electronic control device even when a failure occurs in a register of a wake-up circuit. [Means for solving the problem]
[0006] In one aspect of the present invention, there is provided an electronic control device comprising a computer having a processor and a memory, and a wake-up circuit that controls the startup of the computer, wherein the wake-up circuit operates in either a first mode in which the computer is started up on condition that communication has occurred over a communication line connected to the outside, or a second mode in which the computer is started up only when an identifier that matches a wake-up identifier stored in a register provided in the wake-up circuit is received, and the computer identifies whether or not a fault has occurred in the register of the wake-up circuit, and if a fault has occurred in the register, the electronic control device sets the wake-up circuit to the first mode and then performs a shutdown when a shutdown command is received from the outside. Effect of the Invention
[0007] According to one aspect of the present invention, even if a failure occurs in a register of a wake-up circuit in an electronic control device, startup control of a main microcomputer can be performed normally. [Brief description of the drawings]
[0008] [Figure 1] FIG. 1 is an explanatory diagram illustrating an example of a control system according to an embodiment of the present invention. [Diagram 2] 2 is a diagram showing the configuration of a register of a wake-up IC in one embodiment of the present invention. FIG. [Diagram 3] 4 is a flowchart showing a process performed when a main microcomputer is first started up in one embodiment of the present invention. [Figure 4] 4 is a flowchart showing a process performed when a main microcomputer is first started up in one embodiment of the present invention. [Diagram 5] 4 is a flowchart showing a process performed when a main microcomputer is first started up in one embodiment of the present invention. [Figure 6] 5 is a flowchart showing a process performed when a main microcomputer is restarted in one embodiment of the present invention. [Figure 7] 5 is a flowchart showing a process performed when a main microcomputer is restarted in one embodiment of the present invention. [Figure 8] FIG. 2 is a sequence diagram showing states and processing of a wakeup IC and a main microcomputer (when the register of the wakeup IC is normal) in one embodiment of the present invention. [Figure 9] FIG. 2 is a sequence diagram showing states and processing of a wake-up IC and a main microcomputer (when a register of the wake-up IC is broken) in one embodiment of the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0009] Hereinafter, an embodiment of the present invention will be described with reference to the drawings. Note that the present invention is not limited to the embodiment described in this specification, and different embodiments and their modifications can be appropriately combined.
[0010] [Control system configuration] 1 shows an example of a control system 1 according to this embodiment. The control system 1 is mounted on a vehicle such as an automobile, and controls various devices related to the running of the vehicle. Depending on the type of on-board device to be controlled, the control system 1 can be classified into a powertrain control system such as engine control, a vehicle control system such as electric power steering and brake control, a body control system such as airbags and surroundings monitoring, and an information system such as a navigation system and a GPS (Global Positioning System). The control system 1 includes an ECU 10 (Electronic Control Unit) that controls the on-board devices, and external units 50A to 50C.
[0011] The ECU 10 includes a wake-up circuit (IC) 20 and a main microcomputer 30. The wake-up IC 20 and the main microcomputer 30 are connected by a Serial Peripheral Interface (SPI) bus and a Controller Area Network (CAN) bus. A wake-up signal is transmitted from the wake-up IC 20 to the main microcomputer 30 through an inhibit (INH) terminal. The ECU 10 is also connected to a battery 40, and power is supplied from the battery 40 to the wake-up IC 20 and the main microcomputer 30.
[0012] The wake-up IC 20 is an electronic circuit having a function of activating the main microcomputer 30 when a predetermined condition is satisfied. The predetermined condition will be described in detail later. The wake-up IC 20 includes a control unit 21, a register 22, and communication interfaces 23A to 23D.
[0013] The control unit 21 transmits a wake-up signal to the main microcomputer 30 to start up the main microcomputer 30 according to the operation mode in which the wake-up IC 20 operates. The register 22 stores various setting values used in the operation of the control unit 21. Details of the data stored in the register 22 will be described later. The communication interfaces 23A to 23D have a function of realizing communication between the wake-up IC 20 and the outside. For example, the communication interfaces 23A and 23B are composed of a CAN (Controller Area Network) transceiver or the like, and the communication interface 23A performs CAN communication with the external units 50A to 50C, and the communication interface 23B performs CAN communication with the main microcomputer 30. The communication interface 23C performs SPI communication with the main microcomputer 30. The communication interface 23D transmits a wake-up signal to the main microcomputer 30 via the INH terminal. Note that the wake-up IC 20 has a terminal that operates a wake-up function when a wake-up signal is input from the outside, but in this embodiment, the terminal is omitted from the illustration as it is open.
[0014] The main microcomputer 30 includes a processor 31, a RAM 32, a ROM 33, and communication interfaces 34A to 34C, which are interconnected by an internal bus. The processor 31 is hardware that executes an instruction set (such as data transfer, calculation, processing, control, and management) described in a program, and is composed of an arithmetic unit, registers that store instructions and information, peripheral circuits, etc. The functions of the processor 31 are realized by executing a program. The processes executed by the processor 31 will be described in detail later.
[0015] The RAM 32 is made of a volatile memory in which data is lost when the power supply is cut off, and provides a temporary storage area for use by the processor during operation. The ROM 33 is made of a non-volatile memory (such as an EEPROM or a flash memory) on which data can be electrically rewritten, and stores the program body operated by the processor 31 and various data used when the program is executed. In this embodiment, the ROM 33 stores a fault flag, which will be described later. The communication interfaces 34A to 34C have a function of realizing communication between the main microcomputer 30 and the outside. For example, the communication interface 34A performs CAN communication with the wakeup IC 20, and the communication interface 34B performs SPI communication with the wakeup IC 20. The communication interface 34C receives a wakeup signal transmitted from the wakeup IC 20 and starts up the main microcomputer 30 via the main relay.
[0016] In this embodiment, the communication method between the wake-up IC 20 and the external units 50A to 50C is CAN, but any communication method such as LIN (Local Interconnect Network), Ethernet (registered trademark), FlexRay, etc. can be used. Similarly, the communication method between the wake-up IC 20 and the main microcomputer 30 is not necessarily limited to the above example. Although not shown in the figure, communication between the main microcomputer 30 and the external units 50A to 50C is also possible. Furthermore, although not shown in the figure, the ECU 10 is connected to be able to communicate with the in-vehicle device to be controlled.
[0017] 2 shows an area related to the processing executed in this embodiment among the storage areas of the register 22 of the wakeup IC 20. The register 22 includes two types of areas: a control register and a status register. The control register includes an operation mode setting area in which information identifying an operation mode is set, and a wakeup CANID setting area in which a wakeup CANID (described in detail later), which is one type of wakeup identifier, is set. The status register also includes an error setting area in which information indicating that an illegal write has been performed in the wakeup IC 20 is set.
[0018] [Wake-up IC operation modes and startup conditions] Here, the operation modes of the wakeup IC 20 and the conditions under which the wakeup IC 20 activates the main microcomputer 30 will be described. The wakeup IC 20 goes into standby mode when power is supplied from the battery 40, and when it receives a start-up command from the main microcomputer 30, it starts up the main microcomputer 30 and transitions to normal mode. When the main microcomputer 30 shuts down, the wakeup IC 20 transitions from normal mode to sleep mode. On the other hand, when it receives a start-up command from the main microcomputer 30, it starts up the main microcomputer 30 again and transitions to normal mode. This transition between normal mode and sleep mode is performed based on a control signal received from the main microcomputer 30 by SPI communication. Specifically, the main microcomputer 30 transmits a signal for setting information for identifying the operation mode of the wakeup IC 20 in an operation mode setting area of the register 22. The wakeup IC 20 operates in an operation mode based on the information set in the operation mode setting area of the register 22.
[0019] Furthermore, the wake-up IC20 has two types of sleep modes. The first mode is a selective sleep mode in which the main microcomputer 30 is started up when a specific CANID is received (WUF: Wake Up Frame). In this selective sleep mode, the wakeup IC 20 transmits a start-up command to the main microcomputer 30 when the wakeup CANID received from outside matches the one set in the wakeup CANID setting area of the register 22. In other words, when a CANID other than the CANID set in the wakeup CANID setting area of the register 22 is received, the main microcomputer 30 is not started up. Note that the CANID is set in the wakeup CANID setting area by the main microcomputer 30 at the time of startup.
[0020] The second mode is a sleep wake-up mode (WUP) in which the main microcomputer 30 is started up (WUP: Wake Up Pattern) not only when a specific CANID is received, but also when the CAN bus is operating, i.e., when there is a voltage change in the CAN bus. Note that the operation of the CAN bus is one aspect of communication being performed in a communication line connected to the outside.
[0021] As described above, in this embodiment, the input terminal is open and invalid for the pattern (LWU: Local Wake Up) in which the wake-up function operates when a wake-up signal is input from outside. Also, if an illegal write is made to the wake-up CANID setting area during operation in the selective sleep mode, information indicating an error is set in the error setting area of the register 22. In this case, the wake-up IC 20 transitions to the sleep wake-up mode described next, regardless of the mode set in the operation mode setting area.
[0022] Here, technical problems related to the operation modes of the wakeup IC 20 will be described. Usually, when the main microcomputer 30 is in a shut-down state, the wakeup IC 20 operates in a selective sleep mode. However, if some kind of failure such as sticking occurs in the register 22, the main microcomputer 30 may not be able to set the wakeup CANID in the wakeup CANID setting area of the register 22. In this case, it is not possible to normally determine whether or not the wakeup CANID received from the outside matches the one set in the wakeup CANID setting area of the register 22. As a result, a situation may occur in which the wakeup IC 20 cannot start the main microcomputer 30 even though it has received a start-up request from the main microcomputer 30. In the control system 1 of this embodiment, it is possible to prevent such a situation from occurring by executing the process described below.
[0023] [Wake-up IC and main microcontroller processing] The processes executed by the wakeup IC 20 and the main microcomputer 30 will be described with reference to the flowcharts shown in FIGS. 3 to 7 and the sequence diagrams shown in FIGS. Figures 3 to 5 show the processing of the main microcomputer 30 at the initial startup when the battery 40 is connected to the wakeup IC 20 and the main microcomputer 30 and power is supplied to them. Figures 8 and 9 are sequence diagrams showing the operation of the wakeup IC 20 and the main microcomputer 30 at the initial startup. Figure 8 shows the operation when the register 22 of the wakeup IC 20 is normal, and Figure 9 shows the operation when a failure occurs in the register 22 of the wakeup IC 20.
[0024] In step 101 (denoted as S101 in the figure, and so on below), the main microcomputer 30 transitions to a startup mode (Smode). In step 102, the main microcomputer 30 performs an initial process at the time of startup. The initial process here is, for example, initialization of the RAM 32. In step 103, the main microcomputer 30 reads the value of a failure flag stored in the ROM 33, which is a non-volatile memory that is electrically rewritable. This failure flag is a value that is set in steps 109 and 112, which will be described later.
[0025] In step 104, the main microcomputer 30 performs SPI communication and writes a setting value to the register 22 of the wakeup IC 20. For example, the main microcomputer 30 writes a wakeup CANID to be used for determining whether or not to start up the main microcomputer 30 in the selective sleep mode, to a wakeup CANID setting area. In step 105 , the main microcomputer 30 performs SPI communication and reads the setting value of the register 22 of the wake-up IC 20 that was written in step 104 .
[0026] In step 106, the main microcomputer 30 determines whether or not there is a previous fault history in the wake-up IC 20 based on the value of the fault flag read in step 103. If there is a fault history, the process proceeds to step 107 (Yes), and if not, the process proceeds to step 110 (No). In step 107, the main microcomputer 30 identifies whether or not a startup request has been sent from another control device of the control system 1, i.e., the external units 50A-50C, to the wakeup IC 20. Specifically, the main microcomputer 30 identifies the presence or absence of a startup request by communicating with the external units 50A-50C to confirm whether or not a wakeup CANID has been sent to the wakeup IC 20.
[0027] In step 108, the main microcomputer 30 determines whether or not a start request has been sent from another ECU based on the result of the confirmation process in step 107. If a start request has been sent, the process proceeds to step 109 (Yes), and if not, the process proceeds to step 114 (No). In step 109, the main microcomputer 30 sets the failure flag in the RAM 32 to "0 (no failure)".
[0028] In step 110, the main microcomputer 30 performs an echo-back diagnosis to identify whether or not a failure has occurred in the register 22 of the wake-up IC 20. Specifically, the main microcomputer 30 identifies the presence or absence of a failure by checking whether or not the setting value written in the register 22 of the wake-up IC 20 in step 104 has been correctly read in step 105. In step 111, the main microcomputer 30 determines whether the result of the echo back diagnosis is abnormal, i.e., whether the setting value written in the register 22 of the wake-up IC 20 in step 105 could not be read normally in step 106. If the result is abnormal, i.e., if a fault has occurred in the register 22, the process proceeds to step 112 (Yes), and if not, the process proceeds to step 113 (No).
[0029] In step 112, the main microcomputer 30 sets the fault flag to "1 (fault exists)" in the RAM 32. If the result of the echo back diagnosis is abnormal, the main microcomputer 30 can also retry writing to and reading from the register 22 within the time allowed.
[0030] In step 113, the main microcomputer 30 determines whether or not a shutdown command has been received. For example, the shutdown command is received by the wakeup IC 20 from the external units 50A to 50C and transmitted to the main microcomputer 30. If a shutdown command has been received, the process proceeds to step 114 (Yes), and if not, the process continues normal operation (No). In step 114, the main microcomputer 30 transitions to the shutdown mode (Umode).
[0031] In step 115, the main microcomputer 30 judges whether the setting value of the failure flag of the RAM 32 is "1 (failure exists)" or not. If the setting value of the failure flag is "1", the process proceeds to step 116 (Yes), and if not, the process proceeds to step 118 (No). In step 116, the main microcomputer 30 prohibits the wake-up IC 20 from transitioning to the selective sleep mode. In step 117, the main microcomputer 30 notifies the external units 50A-50C that a failure has occurred in the register 22 of the wakeup IC 20. This enables the external units 50A-50C to identify that the main microcomputer 30 of the ECU 10 may be started by an unintended CANID. At this time, the main microcomputer 30 may also notify the correct wakeup CANID in preparation for when the register 22 of the wakeup IC 20 is restored to normal.
[0032] In step 118, the main microcomputer 30 sends a command to transition to sleep mode to the wakeup IC 20 via SPI communication. At this time, if transition to the selective sleep mode is not prohibited, the main microcomputer 30 sends a control signal to transition to the selective sleep mode. In other words, the main microcomputer 30 sets the wakeup IC 20 to the selective sleep mode. On the other hand, if transition to the selective sleep mode is prohibited in step 116, the main microcomputer 30 sends a control signal to transition to a sleep wakeup mode that starts the main microcomputer 30 when the CAN bus operates. In other words, the main microcomputer 30 sets the wakeup IC 20 to the sleep wakeup mode.
[0033] In step 119, the main microcomputer 30 writes the value of the failure flag set in the RAM 32 to the ROM 33, which is a non-volatile memory that allows data to be electrically rewritten. This allows the value of the failure flag to be retained without being erased even after shutdown. In step 120, the main microcomputer 30 performs a shutdown process.
[0034] 6 and 7 show the processing executed in the wake-up IC 20 when the main microcomputer 30 is restarted from the state shut down by the processing of steps 113 to 117 described above. FIG. 6 shows the process when the register 22 of the wake-up IC 20 is normal, that is, when the wake-up IC 20 is set to the selective sleep mode.
[0035] In step 121, since the wakeup IC 20 is in selective sleep mode, it authenticates the wakeup CANID. That is, the wakeup IC 20 determines whether or not it has received the wakeup CANID. If it has received the wakeup CANID, it proceeds to step 122 (Yes), and if not, it waits as is (No). In step 122, the wakeup IC 20 performs the same process as the initial startup process of the main microcomputer 30. That is, the wakeup IC 20 transmits a startup request to the main microcomputer 30, and as a result, the main microcomputer 30 executes the same processes as the processes in steps 101 to 120 described above, and the main microcomputer 30 starts up.
[0036] FIG. 7 shows a process when a failure occurs in the register 22 of the wake-up IC 20, that is, when the wake-up IC 20 is set to the sleep wake-up mode. In step 131, since the wake-up IC 20 is in the sleep wake-up mode, it determines whether the CAN bus is operating. If it is operating, the process proceeds to step 132 (Yes), and if it is not, the process waits (No). In step 132, the wakeup IC 20 performs the same process as the initial startup process of the main microcomputer 30. That is, the wakeup IC 20 transmits a startup request to the main microcomputer 30, and as a result, the main microcomputer 30 executes the same processes as the processes in steps 101 to 120 described above, and the main microcomputer 30 starts up.
[0037] [Effects of this embodiment] According to this embodiment, when a failure occurs in the register 22, the main microcomputer 30 sets the operation mode of the wakeup IC 20 to the sleep wakeup mode and then shuts down. Therefore, when a startup request for the main microcomputer 30 is received again, even if the wakeup CAN ID is not correctly set in the register 22 due to a failure in the register 22 and the wakeup CAN ID is not correctly authenticated, the main microcomputer 30 is started on the condition that CAN communication is operating. Therefore, it is possible to prevent the startup of the main microcomputer 30 from failing due to a failure in the register 22 without requiring any changes in the hardware.
[0038] On the other hand, according to this embodiment, when there is no failure in the register 22 of the wakeup IC 20, the wakeup IC 20 is set to the selective sleep mode, so that the main microcomputer 30 can be started only when a wakeup CANID indicating a start-up request is received.
[0039] Here, in this embodiment, as described above, when a failure occurs in the register 22, the wake-up IC 20 is set to the sleep wake-up mode. Therefore, the main microcomputer 30 is started on the condition that the CAN communication is operated. Therefore, even if communication having a CANID that is not intended to start the main microcomputer 30 is performed, it is possible that the main microcomputer 30 will be started. In this regard, in this embodiment, a failure flag indicating whether or not a failure occurs in the register 22 of the wake-up IC 20 is set, and the presence or absence of a failure in the register 22 is confirmed based on this failure flag when the main microcomputer 30 is started next time. Then, when a failure occurs in the register 22, it is confirmed whether or not a start request has been sent to the external units 50A to 50C, and if the start request has not been sent, a shutdown is performed again. Therefore, it is possible to suppress the generation of unnecessary processing loads and power consumption caused by the main microcomputer 30 being started due to communication having a CANID that is not intended to start the main microcomputer 30 and continuing to operate thereafter.
[0040] Furthermore, in this embodiment, when a failure occurs in the register 22, the failure is notified to the external units 50A to 50C. This can prevent the external units 50A to 50C from unintentionally starting up the main microcomputer 30 due to unnecessary communication.
[0041] [others] The above-described embodiments of the present invention are merely some of the possible implementations within the technical scope of the present invention, and are disclosed as examples of the present invention, and do not limit the technical scope of the present invention. Furthermore, the functional and physical configurations in each embodiment are not limited to the above-described aspects, and for example, each function or physical resource can be integrated and implemented, or conversely, can be further distributed and implemented, and further, some of the configurations can be added, deleted, or replaced with other configurations. [Explanation of symbols]
[0042] 1... control system, 10... ECU, 20... wake-up IC, 21... control unit, 22... register, 30... main microcomputer, 31... processor, 32... RAM, 33... ROM, 40... battery, 50A to 50C... external unit
Claims
1. An electronic control device including a computer having a processor and a memory, and a wake-up circuit that controls startup of the computer, the wake-up circuit operates in either a first mode in which the computer is started on condition that communication has been performed on a communication line connected to an external device, or a second mode in which the computer is started only when an identifier that matches a wake-up identifier stored in a register of the wake-up circuit is received; the computer identifies whether or not a failure has occurred in the register of the wake-up circuit, and if a failure has occurred in the register, sets the wake-up circuit to the first mode and then performs a shutdown when a shutdown command is received from an external device; Electronic control unit.
2. 2. The electronic control device according to claim 1, wherein said computer sets said wake-up circuit to said second mode and then performs a shutdown when said register is operating normally.
3. 3. The electronic control device according to claim 1 or 2, wherein, when a fault occurs in the register, the computer sets a fault flag in the memory to a value indicating that a fault has occurred in the register, and at the next startup, by referring to the fault flag, if a value indicating that a fault has occurred in the register is set, the computer identifies whether or not a startup request has been received from an external electronic control device, and when a startup request has been received from the outside, the computer continues the current startup state, whereas when a startup request has not been received, the computer performs a shutdown.
4. 3. The electronic control device according to claim 1, wherein when the computer identifies that a fault has occurred in the register, the computer notifies an external device of the occurrence of the fault.
5. An electronic control device includes a computer having a processor and a memory, and a wake-up circuit that controls the startup of the computer, the wake-up circuit operating in either a first mode in which the computer is started on condition that communication has been performed over a communication line connected to an external device, or a second mode in which the computer is started only when an identifier that matches a wake-up identifier stored in a register of the wake-up circuit is received, the electronic control device comprising: Identifying whether a fault has occurred in the register of the wake-up circuit; if it is identified that a fault has occurred in the register, when a shutdown command is received, the wake-up circuit is set to the first mode and then a shutdown is performed. Start-up control method.
Citation Information
Patent Citations
Controller equipped with soft error detection circuit
JP2010231417A
Communication system
JP2013255034A
Failure detection method
JP2022184459A
On-vehicle device, on-vehicle system, control method and computer program
JP2023152363A
Electronic control device and method for daiagnosing wake-up circuit
WO2022075006A1
