Electronic control device and electronic control method
The electronic control device addresses the issue of data protection during voltage drops in the auxiliary battery by writing program execution data from the main memory to nonvolatile memory, ensuring data integrity and preventing corruption.
Patent Information
- Application Number
- PCT/JP2023/035721
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-09-29
- Publication Date
- 2025-04-03
AI Technical Summary
Existing technologies fail to protect data related to program execution in the main memory when the voltage of the auxiliary battery drops, potentially leading to data corruption or loss.
The electronic control device writes at least a part of the target data related to program execution from the main memory into the nonvolatile memory when the voltage of the auxiliary battery falls below a predetermined voltage, ensuring data protection.
This solution effectively protects data related to program execution by transferring critical data to nonvolatile memory before voltage drops occur, preventing data corruption and ensuring data integrity.
Smart Images

Figure JP2023035721_03042025_PF_FP_ABST
Abstract
Description
Electronic control device and electronic control method
[0001] The present invention relates to an electronic control device and an electronic control method.
[0002] A technology is known for an electronic device having a backup power supply that supplies power to a main memory while in a standby state with the ACC-OFF, and that reduces the backup power supply voltage depending on the battery state (Patent Document 1).
[0003] JP 2013-123981 A
[0004] However, the technology described in Patent Document 1 has a problem in that if the voltage of the backup power supply drops while data is stored in the main memory, the data may not be able to be stored in the main memory and the data in the main memory may be corrupted.
[0005] The problem to be solved by the present invention is to provide an electronic control device and an electronic control method that can protect data related to program execution even if a voltage shortage occurs in the auxiliary battery that supplies power to the main memory while the data related to program execution remains stored in the main memory.
[0006] The present invention solves the above problem by writing at least a portion of the target data related to the execution of a program stored in main memory to non-volatile memory when the voltage of the auxiliary battery falls below a first predetermined voltage.
[0007] According to the present invention, even if a voltage shortage occurs in the auxiliary battery that supplies power to the main memory while the data related to the execution of the program is maintained in the main memory, the data related to the execution of the program can be protected.
[0008] FIG. 1 is a block diagram of a power supply system including an electronic control device according to a first embodiment of the present invention. FIG. 2 is a diagram showing a program execution state of the electronic control device according to the first embodiment. FIG. 3 is a diagram showing a standby state of the electronic control device according to the first embodiment. FIG. 4 is a diagram showing a stopped state of the electronic control device according to the first embodiment. FIG. 5 is a diagram showing an example of a flowchart of the control procedure of an electronic control method executed by the electronic control device according to the first embodiment. FIG. 6 is a diagram showing the progression of voltage drop of an auxiliary battery according to this embodiment. FIG. 7 is a block diagram of a power supply system including an electronic control device according to a second embodiment of the present invention. FIG. 8 is a diagram showing an example of a flowchart of the control procedure of an electronic control method executed by the electronic control device according to the second embodiment.
[0009] Hereinafter, an electronic control device and an electronic control method according to an embodiment of the present invention will be described with reference to the drawings.
[0010] <<First Embodiment>> FIG. 1 is a block diagram of a power supply system including an electronic control device according to a first embodiment of the present invention. The electronic control device 10 is an electronic control unit (ECU) mounted on a vehicle and serves as a controller for controlling the vehicle's load. The vehicle is equipped with multiple electronic control devices 10, each of which controls various vehicle functions, such as the vehicle's drive system, auxiliary systems such as lights, a navigation system, and display control for a display. The vehicle is equipped with an in-vehicle network such as a Controller Area Network (CAN) that connects multiple electronic control devices 10 to enable mutual communication. While FIG. 1 illustrates one electronic control device 10, the electronic control device 10 is also connected to other electronic control devices (not shown) via a CAN bus 5 to exchange information. The power supply system 100 shown in FIG. 1 supplies power to the electronic control devices 10 from a vehicle battery 1.
[0011] As shown in FIG. 1 , the power supply system 100 includes a battery 1, a power supply line 2, a switch 3, an ACC line 4, and an electronic control unit 10. The battery 1 is a vehicle battery and serves as a power source for operating the electronic control unit 10. The battery 1 may be, for example, a 12V battery that supplies power to auxiliary devices, or a large-capacity battery installed in an electric vehicle or hybrid vehicle. The battery 1 is located external to each electronic control unit 10 and is connected to multiple electronic control units 10 to supply power to each electronic control unit 10. Specifically, the battery 1 supplies power to each element included in the electronic control unit 10, namely, a control unit 20, a main memory 30, a non-volatile memory 40, and an auxiliary battery 50. In this embodiment, the battery 1 supplies power to each element included in the electronic control unit 10 when the ACC (accessory) is on.
[0012] The power supply line 2 is a power line that electrically connects the battery 1 and the electronic control unit 10. The power supply line 2 branches from a branch point 6 into a line 21 that connects the branch point 6 to the control unit 20 and a line 22 that connects the branch point 6 to the auxiliary battery 50. The power supply line 2 is connected to the main memory 30 and the non-volatile memory 40 via the control unit 20.
[0013] The switch 3 is, for example, a semiconductor switch, that is, a semiconductor component configured with a transistor such as an FET. The switch 3 is connected to the power supply line 2 between the battery 1 and the electronic control unit 10. More specifically, the switch 3 is connected to the power supply line 2 between the battery 1 and the branch point 6. The switch 3 has a function of switching between electrical conduction and cut-off between the battery 1 and the electronic control unit 10.
[0014] The switch 3 is connected to the ACC line 4. The ACC line 4 outputs a signal to the switch 3 depending on whether the ACC is on or off. When the ACC power supply is on, the ACC line 4 outputs an ACC-on signal to the switch 3 indicating that the ACC is on. When the ACC power supply is off, the ACC line 4 outputs an ACC-off signal to the switch 3 indicating that the ACC is off. The switch 3 physically switches the current flowing through the power supply line 2 on or off depending on whether the ACC line 4 is on or off. When the ACC is on, the switch 3 switches the current flowing through the power supply line 2 on. When the ACC line 4 is off, the switch 3 switches the current flowing through the power supply line 2 off. As a result, when the ACC is off, the switch 3 cuts off the power supply from the vehicle battery 1 to each element of the electronic control unit 10.
[0015] The electronic control device 10 includes a control unit 20, a main memory 30, a non-volatile memory 40, and an auxiliary battery 50. The control unit 20 includes a CPU that executes programs for implementing each function of the electronic control device 10. For example, the control unit 20 is a system on a chip (SOC) or a microcomputer. The programs include, for example, a program for implementing a function related to vehicle control, a program for implementing a voltage monitoring function that monitors the voltage of the auxiliary battery 50, and a program for implementing a data writing function that writes data related to the execution of the programs stored in the main memory 30 to the non-volatile memory 40. Each program is stored in the non-volatile memory 40. During normal program execution, the control unit 20 deploys the program in the main memory 30 and executes the program to implement the functions of the electronic control device 10.
[0016] In this embodiment, the electronic control unit 10 has a plurality of states. Each state of the electronic control unit 10 corresponds to a different state of each element provided in the electronic control unit 10, such as an operating state and a power supply state. The states of the electronic control unit 10 include a program execution state, a standby state, and a stopped state. When the ACC is on, the electronic control unit 10 is in the program execution state. In the program execution state, the program is loaded from the non-volatile memory 40 to the main memory 30, and the program is being executed or can be executed by the control unit 20.
[0017] FIG. 2 is a diagram illustrating a program execution state of the electronic control unit according to the first embodiment. FIG. 2 illustrates the operating state and power supply state of each element in the program execution state. In the program execution state, the control unit 20, main memory 30, and nonvolatile memory 40 are energized (powered state). For example, when the ACC is turned on, power is supplied from the battery 1 to each element of the electronic control unit 10, thereby energizing the control unit 20, main memory 30, and nonvolatile memory 40. The control unit 20 loads a program from the nonvolatile memory 40 to the main memory 30 and executes the program once initialization is complete. While the electronic control unit 10 is in the program execution state, target data is maintained in the main memory 30 in a state in which the program can be executed. The target data is data related to the execution of the program by the control unit 20. For example, the target data includes the OS and application programs executed by the control unit 20 and various data required for processing by the control unit 20. The various data required for processing by the control unit 20 includes data related to vehicle functions, such as vehicle cruise control, and profile data associated with the user. As will be described later, even when the ACC is turned off, the auxiliary battery 50 continues to supply power to each element of the electronic control device 10, thereby maintaining the power supply state of the control unit 20, the main memory 30, and the non-volatile memory 40. This allows the electronic control device 10 to maintain a program execution state.
[0018] Furthermore, when the ACC is off, i.e., when the power supply to the electronic control device 10 is switched from the battery 1 to the auxiliary battery 50, the control unit 20 monitors the state of the auxiliary battery 50. Specifically, the control unit 20 periodically acquires voltage information of the auxiliary battery 50. The voltage information is information obtained by measuring the voltage of the auxiliary battery 50.
[0019] The control unit 20 changes the state of the electronic control unit 10 depending on the voltage of the auxiliary battery 50. Specifically, the control unit 20 determines, based on the voltage information, whether the voltage of the auxiliary battery 50 has fallen below a first predetermined voltage. The first predetermined voltage is a voltage higher than the voltage required to write at least a portion of the target data stored in the main memory 30 to the non-volatile memory 40. The control unit 20 maintains the program execution state of the electronic control unit 10 when the voltage of the auxiliary battery 50 has not fallen below the first predetermined voltage, i.e., when the voltage of the auxiliary battery 50 is higher than the first predetermined voltage. That is, the control unit 20 maintains the power supply to the control unit 20, main memory 30, and non-volatile memory 40 by continuing to supply power from the auxiliary battery 50 to each element of the electronic control unit 10. This maintains the state in which the target data is stored in the main memory 30 in a state where the program can be executed in the program execution state. Furthermore, the control unit 20 continues to execute the program. At this time, if the electronic control unit 10 has a display or the like, the display may be turned off because the display or the like can be turned on immediately.
[0020] The control unit 20 changes the electronic control unit 10 from the program execution state to the standby state when the voltage of the auxiliary battery 50 falls below a first predetermined voltage. FIG. 3 is a diagram showing the standby state of the electronic control unit 10 according to this embodiment. FIG. 3 shows the operating state and power supply state of each element in the standby state. The standby state is a state in which the electronic control unit 10 consumes less power than the program execution state. When the electronic control unit 10 is in the standby state, the control unit 20 enters a sleep state. In the sleep state, the control unit 20 stops the program counter. This reduces the power consumption required for operation of the control unit 20, and the control unit 20 enters a power-saving state in which it does not require power supply from the auxiliary battery 50 as much as in the program execution state.
[0021] Furthermore, when the electronic control device 10 is in a standby state, the main memory 30 maintains a program execution state. In the program execution state, the control unit 20 continues to supply power from the auxiliary battery 50 to the main memory 30, thereby maintaining a state in which the target data is stored in the main memory 30 and the program is executable. In other words, the main memory 30 remains energized and maintains the state it was in when the program was executed. Furthermore, when the electronic control device 10 is in a standby state, the non-volatile memory 40 enters a stopped state. The stopped state is a state in which the power supply to the non-volatile memory 40 is cut off (shutdown state). Furthermore, in the standby state, only the main memory 30 remains energized, and elements other than the non-volatile memory 40, including the control unit 20 and the main memory 30, may also be stopped.
[0022] The standby state is a so-called "suspend to RAM" state. That is, when the voltage of the auxiliary battery 50 falls below a first predetermined voltage, the control unit 20 reduces power consumption in the control unit 20 and the non-volatile memory 40 while maintaining a state in which the target data is stored in the main memory 30 and the program is executable. In the standby state, since the target data is stored in the main memory 30, when transitioning from the standby state back to the program execution state, the program does not need to be reloaded from the non-volatile memory 40 to the main memory 30 and initialized, allowing the program to be executed quickly. Note that when transitioning to the standby state, the control unit 20 may supply power only to the main memory 30 from the auxiliary battery 50 and stop power supply to the control unit 20 and the non-volatile memory 40 to enter a halted state. As will be described later, when the electronic control device 10 transitions to the standby state, the control unit 20 writes at least a portion of the target data stored in the main memory 30 to the non-volatile memory 40, and then continues to supply power from the auxiliary battery 50 to the main memory 30, thereby maintaining a state in which the target data is stored in the main memory 30 and in a state in which the program can be executed. Note that in this embodiment, when the voltage of the auxiliary battery falls below a first predetermined voltage, the target data is written to the non-volatile memory 40 and the electronic control device 10 transitions to the standby state. However, this is not limited to this, and the electronic control device 10 may only write the target data to the non-volatile memory 40. In this case, the transition to the standby state is separately executed in response to a drop in the voltage of the auxiliary battery.
[0023] The control unit 20 changes the electronic control device 10 from a standby state to a stopped state when the voltage of the auxiliary battery 50 falls below a second predetermined voltage. The second predetermined voltage is a voltage lower than the first predetermined voltage. The control unit 20 continues to monitor the voltage of the auxiliary battery 50 even after the voltage of the auxiliary battery 50 falls below the first predetermined voltage and determines whether the voltage of the auxiliary battery 50 falls below the second predetermined voltage. The control unit 20 transitions the electronic control device 10 to a stopped state when it determines that the voltage of the auxiliary battery 50 has fallen below the second predetermined voltage. FIG. 4 is a diagram showing the stopped state of the electronic control device 10 according to the first embodiment. FIG. 4 illustrates the operating state and power supply state of each element in the stopped state. The stopped state is a state in which the electronic control device 10 consumes less power than the standby state. In the stopped state, the control unit 20, the main memory 30, and the non-volatile memory 40 are de-energized (shutdown state). The control unit 20 transitions the electronic control device 10 to the stopped state by stopping the power supply from the auxiliary battery 50 to each element of the electronic control device 10, including the main memory 30. As will be described later, when the electronic control device 10 transitions to a stopped state, the control unit 20 transitions the electronic control device 10 to a stopped state after writing the remaining target data stored in the main memory 30 to the non-volatile memory 40. In the stopped state, elements other than the control unit 20, the main memory 30, and the non-volatile memory 40 may also be in a stopped state.
[0024] The relationship between the first and second predetermined voltages will now be described. The second predetermined voltage is a voltage required to write at least a portion of the target data stored in the main memory 30 to the nonvolatile memory 40. For example, the second predetermined voltage is a voltage higher than the limit value of the voltage required to write the target data to the nonvolatile memory 40. The first predetermined voltage is also a voltage higher than the second predetermined voltage. Specifically, the first predetermined voltage is set so that the time required for the voltage of the auxiliary battery 50 to drop from the first predetermined voltage to the second predetermined voltage is a predetermined period. The predetermined period is, for example, two weeks. More specifically, the time required for the voltage of the auxiliary battery 50 to drop from the first predetermined voltage to the second predetermined voltage is the time required for the voltage of the auxiliary battery 50 to drop from the first predetermined voltage to the second predetermined voltage due to power consumption by the control unit 20 and the main memory 30 in the standby state. This period is set taking into consideration the possibility that the driver will start the engine, since the power consumption of the control unit 20 and main memory 30 is very low in the standby state and data can be retained for a long period of time, and because most drivers start the engine of their vehicle at least once every two weeks. This allows the electronic control unit 10 to start up quickly from the standby state when the driver starts the engine, preventing inconvenience to the driver.
[0025] Furthermore, in this embodiment, the first predetermined voltage and / or the second predetermined voltage may be set according to the amount of target data stored in the main memory 30. The larger the amount of target data, the higher the first predetermined voltage and / or the second predetermined voltage is set.
[0026] As described above, in this embodiment, when the ACC is off, the control unit 20 changes the state of the electronic control unit 10 according to the voltage of the auxiliary battery 50. This reduces the power consumption of the electronic control unit 10. Specifically, while the electronic control unit 10 is in a program execution state, the power consumption of the electronic control unit 10 is several hundred mA. When the state of the electronic control unit 10 transitions to a standby state, the power consumption of the electronic control unit 10 in the standby state is between a dozen and several mA, thereby significantly reducing power consumption. Furthermore, when the execution state of the electronic control unit 10 transitions to a stopped state, the power consumption of the electronic control unit 10 in the stopped state is 0.1 mA, thereby further reducing power consumption.
[0027] Furthermore, in this embodiment, the control unit 20 executes a data write process to write target data stored in the main memory 30 to the non-volatile memory 40 in accordance with the voltage of the auxiliary battery 50. The data write process is a process for saving the target data to the non-volatile memory 40 in order to protect the target data. When the voltage of the auxiliary battery 50 is higher than a first predetermined voltage, the control unit 20 does not execute the data write process and maintains the state in which the target data is stored in the main memory 30.
[0028] When the voltage of the auxiliary battery 50 becomes equal to or lower than a first predetermined voltage, the control unit 20 writes at least a portion of the target data to the non-volatile memory 40. This data writing process is also referred to as a first data writing process. The amount of target data written to the non-volatile memory 40 in the first data writing process may be a predetermined amount. In the first data writing process, the control unit 20 may write at least a portion of the target data to the non-volatile memory 40 in descending order of importance. Furthermore, the control unit 20 writes target data whose importance is equal to or higher than a predetermined threshold to the non-volatile memory 40 preferentially over target data whose importance is lower than the predetermined threshold. The importance is preset for each type of target data. For example, target data related to vehicle driving is set to be more important than target data related to functions other than vehicle driving. Furthermore, target data related to vehicle safety is set to be more important than target data other than vehicle safety. Furthermore, the control unit 20 may preferentially write profile data associated with a user to the non-volatile memory 40 among the target data. The profile data includes information about the user himself / herself, information about other users owned by the user, etc. In this embodiment, after the first data writing process, the control unit 20 keeps the target data stored in the main memory 30 in a state where the program can be executed, while setting the control unit 20 and the non-volatile memory 40 to a state where power consumption is reduced. As a result, the electronic control unit 10 transitions to a standby state.
[0029] Furthermore, when the voltage of the auxiliary battery 50 becomes equal to or lower than a second predetermined voltage, the control unit 20 executes a data write process to write the remaining target data stored in the main memory 30 to the non-volatile memory 40. This data write process is also referred to as a second data write process. In the second data write process, the control unit 20 writes to the non-volatile memory 40 the target data that was not written to the non-volatile memory 40 in the first data write process. For example, the control unit 20 writes target data with low importance to the non-volatile memory 40. More specifically, the control unit 20 may write to the non-volatile memory 40 target data whose importance is equal to or higher than a predetermined threshold in the first data write process, and write to the non-volatile memory 40 target data whose importance is lower than the predetermined threshold in the second data write process. In this embodiment, the control unit 20 stops the power supply from the auxiliary battery 50 to the main memory 30 after the second data write process. This causes the electronic control device 10 to transition to a stopped state.
[0030] The main memory 30 is a memory that temporarily stores data related to program execution. For example, the main memory 30 temporarily stores the OS and application programs executed by the control unit 20, as well as various data required for processing by the control unit 20. The main memory 30 is, for example, a RAM. When program execution starts, the program to be executed is loaded from the nonvolatile memory 40 into the main memory 30, and the program is executed after initialization. The nonvolatile memory 40 stores the OS and application programs executed by the control unit 20. The nonvolatile memory 40 is, for example, a flash memory (storage). The nonvolatile memory 40 is not limited to a flash memory, and may be any memory that retains its memory even without a power supply.
[0031] The auxiliary battery 50 is a battery different from the battery 1 and is built into each electronic control unit 10. The auxiliary battery 50 is an auxiliary battery that supplies power to each element of the electronic control unit 10 when the power supply from the battery 1 is cut off. For example, in this embodiment, when the ACC is on, power is supplied from the battery 1, but when the ACC is off, the power supply from the battery 1 is cut off. Therefore, when the ACC is off, the auxiliary battery 50 supplies power to each element of the electronic control unit 10. This makes it possible to prevent the vehicle's battery 1 from running out of power. Targets to which power is supplied by the auxiliary battery 50 include the control unit 20, the main memory 30, and the non-volatile memory 40.
[0032] Next, an example of a control procedure for executing the electronic control method according to this embodiment will be described with reference to Fig. 5. Fig. 5 is a diagram showing an example of a flowchart of the control procedure of the electronic control method executed by the electronic control unit 10 according to the first embodiment. In this embodiment, when the ACC is turned off and the power supply to the electronic control unit 10 is switched from the vehicle battery 1 to the auxiliary battery 50, the control unit 20 starts the flow from step S101.
[0033] In step S101, the control unit 20 acquires voltage information of the auxiliary battery 50 from the auxiliary battery 50. In step S102, the control unit 20 determines whether the voltage of the auxiliary battery 50 has become equal to or lower than a first predetermined voltage based on the voltage information acquired in step S101. If it is determined that the voltage of the auxiliary battery 50 has become equal to or lower than the first predetermined voltage, the control unit 20 proceeds to step S103. If it is determined that the voltage of the auxiliary battery 50 has not become equal to or lower than the first predetermined voltage, i.e., if it is determined that the voltage of the auxiliary battery 50 is higher than the first predetermined voltage, the control unit 20 proceeds to step S104.
[0034] In step S103, the control unit 20 writes the target data stored in the main memory 30 to the non-volatile memory 40. The target data is data related to the execution of a program by the control unit 20. This may be all or part of the target data. After writing the target data to the non-volatile memory 40 in step S103, the control unit 20 may transition the electronic control device 10 from the program execution state to a standby state. In the standby state, the target data is maintained in a state where the program can be executed and stored in the main memory 30. The control unit 20 maintains the state where the target data is stored in the main memory 30 and where the program can be executed by continuing to supply power from the auxiliary battery 50 to the main memory 30.
[0035] In step S104, the control unit 20 maintains the program execution state of the electronic control unit 10. In the program execution state, power is supplied from the auxiliary battery 50 to the control unit 20, the main memory 30, and the non-volatile memory 40. The control unit 20 and the main memory 30 maintain the program execution state. After processing in step S104, the control unit 20 returns to step S101 and repeats the subsequent flow. That is, in this embodiment, the control unit 20 continuously monitors the voltage of the auxiliary battery 50 at regular intervals, and continues to maintain the program execution state of the electronic control unit 10 while the voltage of the auxiliary battery 50 is higher than the first predetermined voltage. Then, when the voltage of the auxiliary battery 50 drops and becomes equal to or lower than the first predetermined voltage, the control unit 20 proceeds to step S103.
[0036] As described above, in the electronic control device and electronic control method according to this embodiment, the electronic control device includes a control unit, a main memory, a non-volatile memory, and an auxiliary battery that supplies power to the main memory. The control unit acquires voltage information of the auxiliary battery, and when the voltage of the auxiliary battery falls below a first predetermined voltage, writes at least a portion of the target data stored in the main memory related to program execution by the control unit to the non-volatile memory. This allows the data related to program execution to be protected even if the voltage of the auxiliary battery that supplies power to the main memory becomes insufficient while the data related to program execution remains stored in the main memory.
[0037] In the electronic control device and electronic control method according to this embodiment, the first predetermined voltage is higher than the voltage required to write at least a portion of the target data to the nonvolatile memory, thereby allowing data related to program execution to be stored in the nonvolatile memory while the voltage of the auxiliary battery is higher than the voltage required to write to the nonvolatile memory.
[0038] In the electronic control device and electronic control method according to this embodiment, the control unit maintains the state in which the target data is stored in the main memory by continuing to supply power from the auxiliary battery to the main memory when the voltage of the auxiliary battery is higher than the first predetermined voltage, thereby allowing the main memory to continue storing data related to program execution as long as the voltage of the auxiliary battery is sufficiently high.
[0039] In the electronic control device and electronic control method according to this embodiment, when the voltage of the auxiliary battery falls below a first predetermined voltage, the control unit writes at least a portion of the target data to the non-volatile memory and then continues to supply power from the auxiliary battery to the main memory, thereby maintaining the target data stored in the main memory in a state where the program can be executed. This makes it possible to protect data related to program execution even if the voltage of the auxiliary battery becomes insufficient while the target data is stored in the main memory in a state where the program can be executed.
[0040] In the electronic control device and electronic control method according to this embodiment, when the voltage of the auxiliary battery drops below a second predetermined voltage that is lower than the first predetermined voltage, the control unit writes the remaining target data stored in the main memory to the non-volatile memory and stops the power supply from the auxiliary battery to the main memory. This makes it possible to protect data related to program execution even when the voltage of the auxiliary battery drops.
[0041] In the electronic control device and electronic control method according to this embodiment, the control unit writes at least a portion of the target data to the non-volatile memory in descending order of importance, thereby protecting important data related to program execution.
[0042] In the electronic control device and electronic control method according to this embodiment, the control unit writes the profile data associated with the user out of the target data to the non-volatile memory, thereby protecting the user profile data out of the data related to the execution of the program.
[0043] Second Embodiment In the first embodiment, the processing up to when the electronic control unit 10 transitions to a stopped state has been described, but the present invention is not limited to the above embodiment. The electronic control unit 10 may execute processing after transitioning to a stopped state. For example, the control unit 20 may have a function to execute processing to protect target data when the electronic control unit 10 is in a stopped state and the ACC is turned on.
[0044] When the ACC is turned on after the electronic control unit 10 has transitioned to a stopped state, an ON signal indicating that the ACC is turned on is first output from the ACC line 4 to the switch 3. The switch 3 starts supplying power from the vehicle's battery 1 to each element of the electronic control unit 10 (the control unit 20, the main memory 30, the non-volatile memory 40, and the auxiliary battery 50), thereby supplying power to the control unit 20, the main memory 30, and the non-volatile memory 40, and charging the auxiliary battery 50. Normally, the alternator supplies sufficient power from the engine's power to the battery 1 and the auxiliary battery 50. However, in some cases, the engine may not start and the ACC may be turned off again after being turned on. In such a case, the electronic control unit 10 is stopped and the voltage of the auxiliary battery 50 is below the second predetermined voltage. Therefore, if the auxiliary battery 50 is not sufficiently powered between the time the ACC is turned on and the time it is turned off again, the voltage of the auxiliary battery 50 will remain below the second predetermined voltage.
[0045] Therefore, when the ACC is turned off and the control unit 20 starts monitoring the voltage of the auxiliary battery 50, the condition that the voltage of the auxiliary battery 50 is equal to or lower than the second predetermined voltage is satisfied, and the control unit 20 immediately writes the target data to the non-volatile memory 40 and transitions to a stopped state. However, at this time, the voltage of the auxiliary battery 50 is equal to or lower than the voltage required to store the target data in the non-volatile memory 40. Therefore, while the target data is being written to the non-volatile memory 40, the auxiliary battery 50 may not be able to supply the necessary power, and the target data may not be written correctly to the non-volatile memory 40. This may result in corruption of the target data.
[0046] Here, the relationship between the voltage drop of the auxiliary battery and the data write process will be described using FIG. 6 . FIG. 6 is a diagram showing the progression of the voltage drop of the auxiliary battery in this embodiment. FIG. 6 shows the change in the voltage of the auxiliary battery 50 from time T1 when the ACC is turned off. The auxiliary battery 50 continues to supply power to the electronic control unit 10 after the ACC is turned off, and the voltage drops accordingly. When the voltage of the auxiliary battery 50 drops to the second predetermined voltage V2, the control unit 20 transitions the electronic control unit 10 to a stopped state at time T2 when the voltage of the auxiliary battery 50 falls below the second predetermined voltage V2. Thereafter, when the ACC is turned on, the electronic control unit 10 starts up. At this time, the ACC may be turned off again immediately after the electronic control unit 10 starts up. When the ACC is turned off, the auxiliary battery 50 starts supplying power to the electronic control unit 10. The control unit 20 also begins monitoring the voltage of the auxiliary battery 50, but since the voltage of the auxiliary battery 50 remains below the second predetermined voltage, the control unit 20 immediately begins the process of writing the target data to the non-volatile memory 40 in order to transition the electronic control device 10 back to a stopped state.
[0047] In the example of FIG. 6 , the data write process starts at time T3, and shutdown starts at time T4 when the data write process ends. Shutdown ends at time T5. At this time, due to power consumption during the data write process, the voltage of the auxiliary battery 50 begins to decrease from time T3, when the data write process of the target data to the non-volatile memory 40 starts, and by time T4, when the data write process ends, the voltage of the auxiliary battery 50 drops below the limit voltage required for the data write process. If the voltage of the auxiliary battery 50 is lower than the limit voltage required, the data write process may not be executed properly, and the target data may be corrupted. In this embodiment, to prevent such a situation, the control unit 20 controls the switch 3 to supply power from the vehicle battery 1 instead of the auxiliary battery 50.
[0048] An example of power supply switching control by the control unit 20 will be described using Figure 7. Figure 7 is a block diagram of a power supply system including an electronic control device according to a second embodiment of the present invention. In the second embodiment, the configuration is the same as that of the first embodiment except for the configuration described below. In the following description, the same configuration and control process as in the first embodiment will be omitted, but the description of the first embodiment will be used as appropriate for the omitted description. The second embodiment differs from the first embodiment in that it includes a communication line 7 connecting the control unit 20 and the switch 3.
[0049] In the second embodiment, the control unit 20 determines whether the voltage of the auxiliary battery 50 has fallen below a second predetermined voltage based on the voltage information. When the voltage of the auxiliary battery 50 has fallen below the second predetermined voltage, the control unit 20 supplies power from the vehicle battery 1 to the auxiliary battery 50. That is, in this embodiment, when the ACC is off, the control unit 20 continuously monitors the voltage of the auxiliary battery 50. Even after the voltage of the auxiliary battery 50 falls below the first predetermined voltage and the electronic control device 10 transitions to a standby state, the control unit 20 continues to monitor the voltage drop of the auxiliary battery 50 and determines whether the voltage of the auxiliary battery 50 has fallen below the second predetermined voltage. When the voltage of the auxiliary battery 50 has fallen below the second predetermined voltage, the control unit 20 controls the switch 3 to supply power from the vehicle battery 1 to the auxiliary battery 50. Power may be supplied from the vehicle battery 1 not only to the auxiliary battery 50 but also to the control unit 20, the main memory 30, and the non-volatile memory 40. Power may be supplied to the control unit 20, the main memory 30, and the non-volatile memory 40 from an auxiliary battery 50 that receives power from the vehicle battery 1.
[0050] Here, the power supply by controlling the switch 3 will be described. When the control unit 20 determines that the voltage of the auxiliary battery 50 has fallen below the second predetermined voltage, it outputs an ON signal to the switch 3 via the communication line 7, instructing the switch 3 to turn on. The switch 3 switches on the current flowing through the power supply line 2 when at least one of the signals output from the ACC line 4 and the control unit 20 is an ON signal. The switch 3 switches off the current flowing through the power supply line 2 when both the signals output from the ACC line 4 and the control unit 20 are OFF signals. As a result, the control unit 20 switches the power supply to the electronic control unit 10 from the auxiliary battery 50 to the vehicle battery 1 when the voltage of the auxiliary battery 50 falls below the second predetermined voltage. As described above, after the ACC is turned off, while the target data is stored in the main memory 30 in a state where the program can be executed, the control unit 20 controls the switch 3 to supply power from the vehicle battery 1 to the auxiliary battery 50 when the voltage of the auxiliary battery 50 falls below the second predetermined voltage.
[0051] When the voltage of the auxiliary battery 50 becomes greater than the second predetermined voltage due to the power supply from the vehicle battery 1, the control unit 20 writes the target data to the non-volatile memory 40 and transitions the electronic control device 10 to a stopped state. This allows the auxiliary battery 50 to supply the power necessary to write the target data to the non-volatile memory 40, so that the target data can be written to the non-volatile memory 40 normally.
[0052] Next, an example of a control procedure for executing an electronic control method according to a second embodiment of the present invention will be described with reference to Fig. 8. Fig. 8 is a diagram showing an example of a flowchart of the control procedure for the electronic control method executed by the electronic control unit 10 according to the second embodiment. In this embodiment, when the ACC is off and the voltage of the auxiliary battery 50 falls below a first predetermined voltage, causing the execution state of the electronic control unit 10 to transition to a standby state, the control unit 20 starts the flow from step S201.
[0053] In step S201, the control unit 20 acquires voltage information of the auxiliary battery 50 from the auxiliary battery 50. In step S202, the control unit 20 determines whether the voltage of the auxiliary battery 50 has become equal to or lower than a second predetermined voltage based on the voltage information acquired in step S201. If it is determined that the voltage of the auxiliary battery 50 has become equal to or lower than the second predetermined voltage, the control unit 20 proceeds to step S203. If it is determined that the voltage of the auxiliary battery 50 has not become equal to or lower than the second predetermined voltage, i.e., if it is determined that the voltage of the auxiliary battery 50 is higher than the second predetermined voltage, the control unit 20 proceeds to step S204.
[0054] In step S203, the control unit 20 switches the power supply to the electronic control unit 10 from the auxiliary battery 50 to the vehicle battery 1. Specifically, the control unit 20 outputs an ON signal to the switch 3 via the communication line 7, instructing the switch 3 to be turned ON. When the ON signal is input from the control unit 20, the switch 3 switches ON the current flowing through the power supply line 2, thereby supplying power from the vehicle battery 1 to the electronic control unit 10. In step S204, the control unit 20 maintains the standby state of the electronic control unit 10. After processing step S204, the control unit 20 returns to step S201 and repeats the subsequent steps. That is, in this embodiment, the control unit 20 continuously monitors the voltage of the auxiliary battery 50 at regular intervals and continues to maintain the standby state of the electronic control unit 10 while the voltage of the auxiliary battery 50 is higher than the second predetermined voltage. Then, when the voltage of the auxiliary battery 50 drops to or below the second predetermined voltage, the control unit 20 proceeds to step S203.
[0055] As described above, in the electronic control device and electronic control method according to this embodiment, the control unit supplies power from the vehicle battery to the main memory when the voltage of the auxiliary battery falls to or below a second predetermined voltage that is lower than the first predetermined voltage. This allows data to be written to the non-volatile memory and shutdown to be performed normally even when the voltage of the auxiliary battery drops.
[0056] In the electronic control device and electronic control method according to this embodiment, the control unit supplies power from the vehicle battery to the auxiliary battery when the auxiliary battery is turned off, so that the target data is stored in the main memory in a state where the program can be executed. If the voltage of the auxiliary battery falls below a second predetermined voltage that is lower than the first predetermined voltage, the control unit supplies power from the vehicle battery to the auxiliary battery. As a result, even if the voltage of the auxiliary battery drops, data related to program execution can be written to the non-volatile memory and shutdown can be performed normally, as long as the main memory maintains the state where the data related to program execution is stored.
[0057] It should be noted that the above-described embodiments have been described to facilitate understanding of the present invention, and are not intended to limit the present invention. Therefore, each element disclosed in the above-described embodiments is intended to include all design modifications and equivalents that fall within the technical scope of the present invention.
[0058] REFERENCE SIGNS LIST 1 battery 2 power supply line 3 switch 4 ACC line 10 electronic control device 20 control unit 30 main memory 40 non-volatile memory 50 auxiliary battery
Claims
1. An electronic control device comprising a control unit, a main memory, a non-volatile memory, and an auxiliary battery that supplies power to the main memory, wherein the control unit acquires voltage information of the auxiliary battery, and when the voltage of the auxiliary battery falls below a first predetermined voltage, writes at least a portion of target data related to the execution of a program by the control unit, which is stored in the main memory, to the non-volatile memory.
2. An electronic control device according to claim 1, wherein the first predetermined voltage is a voltage higher than a voltage required to write at least a portion of the target data to the non-volatile memory.
3. An electronic control device as described in claim 1 or 2, wherein the control unit maintains a state in which the target data is stored in the main memory by continuing to supply power from the auxiliary battery to the main memory when the voltage of the auxiliary battery is higher than the first specified voltage.
4. An electronic control device as claimed in any one of claims 1 to 3, wherein the control unit, when the voltage of the auxiliary battery falls below the first predetermined voltage, writes at least a portion of the target data to the non-volatile memory, and then continues to supply power from the auxiliary battery to the main memory, thereby maintaining a state in which the target data is stored in the main memory and in a state in which the program can be executed.
5. An electronic control device as claimed in any one of claims 1 to 4, wherein the control unit supplies power from the vehicle battery to the main memory when the voltage of the auxiliary battery falls below a second predetermined voltage which is lower than the first predetermined voltage.
6. An electronic control device as claimed in any one of claims 1 to 5, wherein the control unit supplies power from the vehicle's battery to the auxiliary battery when the voltage of the auxiliary battery falls below a second predetermined voltage lower than the first predetermined voltage while maintaining a state in which the program can be executed and the target data is stored in the main memory by the auxiliary battery supplying power to the main memory when the vehicle's ACC is off.
7. An electronic control device as claimed in any one of claims 1 to 4, wherein the control unit, when the voltage of the auxiliary battery falls below a second predetermined voltage which is lower than the first predetermined voltage, writes the remaining target data stored in the main memory to the non-volatile memory and stops the power supply from the auxiliary battery to the main memory.
8. An electronic control device according to any one of claims 1 to 7, wherein the control unit writes at least a portion of the target data into the non-volatile memory in order of importance.
9. An electronic control device according to any one of claims 1 to 7, wherein the control unit writes profile data associated with a user from among the target data into the non-volatile memory.
10. An electronic control method executed by an electronic control device having a control unit, a main memory, a non-volatile memory, and an auxiliary battery that supplies power to the main memory, wherein the control unit acquires voltage information of the auxiliary battery, and when the voltage of the auxiliary battery falls below a first predetermined voltage, writes at least a portion of target data related to the execution of a program by the control unit, which is stored in the main memory, to the non-volatile memory.
Citation Information
Patent Citations
Information processor
JP1993257826A
Electric vehicle charge controller
JP1996098324A
Data recorder and facsimile equipment using the same
JP2002268956A
Circuit device, circuit device data protection method, and fiscal printer
JP2013089151A