Electronic control unit
Patent Information
- Application Number
- DE102015200862
- Authority / Receiving Office
- DE · DE
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2014-01-24
- Filing Date
- 2015-01-20
- Publication Date
- 2024-10-31
- Estimated Expiration
- 2035-01-20
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
The invention relates to an electronic control unit installed in a vehicle.An electronic control unit mounted on a vehicle is supplied with a battery voltage of the vehicle as an operating power voltage, and a microcomputer starts to operate when the vehicle is placed in an ignition-on state in response to an ignition switch (hereinafter referred to as the IGSW) being turned on by a user of the vehicle. Further, this type of electronic control unit includes a relay driving circuit that turns on a power relay for supplying the power supply voltage to the electronic control unit. In the electronic control unit, after starting to operate, the microcomputer outputs a command signal for causing the relay driving circuit to turn on the power relay.Generically, JP 9-330 104 A discloses such a type of electronic control unit. This is supplied with the power supply voltage based on a logical sum of the ON state of the IGSW and the output of the command signal from the microcomputer to the relay drive circuit. Further, by outputting the command signal for the ON state of the power relay, the microcomputer continues to operate even after the IGSW is turned off. When the microcomputer detects the turning-off of the IGSW and then ends a certain process (for example, a process of saving data from a volatile memory to a nonvolatile memory), the microcomputer stops the output of the command signal and thereby causes the power relay to be turned off.In addition, JP 2011-179 446 A discloses an engine start control device for starting an engine by continuing a driving state of a starter through relatively simple control processing even when a CPU is reset during driving of the starter. The CPU is configured to ignore establishment of a starter stop state until a prescribed starter stop state ignoering time elapses from a reset return when the CPU is reset during driving of the starter due to a source voltage drop. This configuration can prevent the starter from being stopped by the establishment of the starter stop condition upon the reset return of the CPU, and enables the engine to be started by continuing the starting of the engine. Here, the time period in which the starter stop condition is ignored may be set based on at least one of the following: power supply voltage (battery voltage), air temperature, oil temperature, cooling water temperature, number of reset operations during a cranking operation, engine speed, and communication setup time of an in-vehicle network.In addition, JP 2007-002 812 A discloses an engine start control device that securely drives and stops a starter even when a CPU operates irregularly at the start of an engine. The engine start control device is provided with a latch circuit that latches a drive command until a stop signal for stopping a starter is output from a CPU when the drive command for driving the starter is output from the CPU to securely start the engine even if the CPU is reset due to a voltage drop at the time of driving the starter and the drive command is stopped. Moreover, the engine start control device is provided with a hard masking circuit which forcibly stops the starter when the CPU cannot output the stop signal after the starter is driven due to irregular operation and further outputs the drive command for a predetermined control time or longer.Finally, JP S62-291 571 A discloses a vehicle speed alarm apparatus for improving the recognition characteristic of an alarm vehicle speed by performing the changeover display of the set alarm vehicle speed instead of the vehicle speed data on a speedometer at the time of setting the alarm vehicle speed. A setting switch for setting an alarm vehicle speed based on "0" and "1" codes and a setting / resetting switch for setting and resetting the alarm vehicle speed are provided in a switching module for setting the alarm vehicle speed. The signals from the switches and a vehicle speed signal (a) from a vehicle speed sensor are input to a control module, and the output of the control module is supplied to a Gong and a speedometer. The control module compares the target value of the alarm vehicle speed set in the switch module with the actual vehicle speed on the signal (a), and if both coincide, the Gong is driven to emit a vehicle speed alarm, and if the set / reset switch of the switch module is subjected to a setting operation, the target value of the alarm vehicle speed is subjected to a changeover display on the speedometer instead of the vehicle speed.In an existing electronic control unit, when a reset signal is generated to the microcomputer between the turning off of the IGSW and the completion of the certain process in the microcomputer, the microcomputer cannot continue the output of the command signal, so that the power relay is turned off. In this case, the specific process to be performed after the IGSW is turned off may not be normally ended.An object of the present invention is to provide an electronic control unit that controls a power relay of a power supply with a microcomputer, and that can continue an on state of the power relay even when the microcomputer is reset between a time when a vehicle is placed in an ignition off state and a time when the microcomputer finishes a certain process and intentionally turns off the power relay.This object is achieved by an electronic control unit having the features of the claim.An electronic control unit according to an aspect of the invention includes a power supply unit, a microcomputer, a reset unit, and a drive unit. The power supply unit is supplied with a battery voltage of a vehicle as a power supply voltage. The microcomputer operates with the power supply voltage supplied to the power supply unit as a power source. The reset unit outputs a reset signal to the microcomputer when a reset execution condition requiring the microcomputer to be reset is satisfied. The drive unit turns on a power relay when a supplied power supply right hold signal is at an active level, and the power relay supplies the power supply voltage to the power supply unit by being turned on.In the electronic control unit, when the vehicle is placed in an ignition-on state, the power supply voltage is supplied to the power supply unit and the microcomputer starts to operate, and then even when the vehicle is placed in an ignition-off state, the microcomputer continues to operate by causing the drive unit to turn on the power relay until the microcomputer ends a certain process.After the microcomputer starts to operate, the microcomputer outputs a turn-on command for turning on the power relay, and then, upon detecting the ignition-off state of the vehicle and ending the certain process, the microcomputer outputs a turn-off command for turning off the power relay.The electronic control unit further includes a signal generation unit. The signal generation unit outputs, to the drive unit, the power supply maintenance signal at the active level during a period from when the microcomputer outputs the turn-on command until when the microcomputer outputs the turn-off command. The signal generation unit has a function that even if the power supply right holding signal is set to the active level in response to the power-on command and then the microcomputer is reset by the reset signal, the power supply right holding signal is further set to the active level. When the microcomputer outputs the power-on command in a state where the microcomputer is not reset by the reset signal, the signal generation unit sets the power supply right holding signal to a non-active level.According to the above electronic control unit, the microcomputer starts to operate when the vehicle enters the ignition on state. Thereafter, during a period from when the vehicle enters the ignition-off state until when the microcomputer has finished the certain process (in other words, during a period until the microcomputer outputs the turn-off command), the turned-on state of the power relay is maintained, and the power supply maintenance signal remains at the active level even when the microcomputer is reset during the period. Thereafter, when the reset of the microcomputer is stopped by the reset unit and the microcomputer starts to operate, the microcomputer detects the ignition-off state, executes the specific process, and outputs the turn-off command while ending the process. Then, the power supply right holding signal from the signal generation unit to the drive unit changes to the non-active level, and the power relay is turned off.In further accordance with the above electronic control unit, the microcomputer outputs a single command signal that plays the role of both the turn-on command and the turn-off command, controls the output level of the command signal from the non-active level to the active level as an output of the turn-on command, and controls the output level of the command signal from the active level to the non-active level as an output of the turn-off command. The active level of the command signal is different from the output level of the command signal output when the microcomputer is reset by the reset signal. The signal generating unit includes a latch circuit into which the command signal, the reset signal, and a clear signal from the microcomputer are input. When the reset signal is supplied, the latch circuit assumes a held state in which the command signal is latched a predetermined time before a supply timing of the reset signal, and the latched command signal is output further to the drive unit than the power supply right holding signal. After the microcomputer starts to operate and controls the output level of the command signal from the inactive level to the active level, the microcomputer outputs the clear signal to the latch circuit.In this way, the turned-on state of the power relay can be continued during a period from when the vehicle enters the ignition-off state until when the microcomputer ends the certain process and intentionally turns off the power relay (outputs the turn-off command) even when the microcomputer is reset during this period. Further, when the microcomputer restarted after the initiation of the reset ends the specified process and outputs the OFF signal, the power relay can be turned off at this point. Therefore, the specific process can be normally executed and ended.The foregoing and other objects, features and advantages of the invention will become apparent from the following detailed description when taken in conjunction with the accompanying drawings. The following are shown: FIG. 1 is a diagram illustrating a configuration of an electronic control unit according to a first embodiment; FIG. 2 is a flowchart illustrating processes executed by a microcomputer of the first embodiment; FIG. 3 is a diagram illustrating operations of the electronic control unit of the first embodiment; FIG. 4 is a diagram illustrating a configuration of an electronic control unit according to a second embodiment; FIG. 5 is a flowchart illustrating processes executed by a microcomputer of the second embodiment; and FIG. 6 is a diagram illustrating operations of the electronic control unit of the second embodiment.Electronic control units (hereinafter referred to as ECU) of embodiments will be described. The ECUs of these embodiments are mounted in a vehicle and controls, for example, the engine of the vehicle, but the target of control may be other than the engine.(First Embodiment)As shown in FIG. 1, an ECU 11 of a first embodiment includes a terminal 17 as a power supply unit which is supplied with a voltage Vbat of a vehicle battery (normally around 12 V, hereinafter referred to as a battery voltage) as a power supply voltage VB via a main relay 15 which is a power relay. The battery voltage Vbat is supplied to one end of a coil 15 aof the main relay 15.Further, the ECU 11 includes a terminal 18 and a terminal 23, and the terminal 18 is connected to a downstream side of the coil 15 a(an opposite side of the coil 15 afrom a side supplied with the battery voltage Vbat) of the main relay 15. The terminal 23 receives voltage from a power supply line 21 of an ignition system as an IGSW signal indicating ON and OFF of an ignition switch (IGSW) 19. In the above, the power supply line 21 of the ignition system is supplied with the battery voltage Vbat when the ignition switch (IGSW) 19 of the vehicle is turned on.The vehicle state includes an ignition-on state and an ignition-off state. Specifically, when the battery voltage Vbat is supplied to the power supply line 21 of the ignition system, the vehicle state is an ignition-on state. When the battery voltage Vbat is not supplied to the power supply line 21 of the ignition system, the vehicle state is an ignition-off state. In this embodiment, when the IGSW 19 is turned on, the vehicle is placed in the ignition-on state. Due to this, the IGSW signal indicates whether or not the vehicle is in the ignition ON state. The vehicle may be placed in an ignition on state and an ignition off state in accordance with an operation of a start switch operating on the pressure switch principle.Further, the ECU 11 includes a microcomputer 25, a main relay driving circuit 27, a power supply circuit 29, a reset control circuit 31, and an input circuit 33. The microcomputer 25 controls operations of the ECU 11. The main relay driving circuit 27 turns on or off the main relay 15 in accordance with a command from the microcomputer 25. The reset control circuit 31 implements the reset of the microcomputer 25.From the power supply voltage VB supplied to the terminal 17, the power supply circuit 29 generates a constant operation voltage Vd (which is, for example, 5V in this example) for operating the microcomputer 25 and outputs the operation voltage Vd to the microcomputer 25. The operation voltage Vd is also supplied as a power supply to, for example, the main relay driving circuit 27 and the reset control circuit 31.The reset control circuit 31 monitors the microcomputer 25; when it is determined that the microcomputer is in an abnormal state, the reset control circuit 31 outputs a reset signal Sres to a reset terminal of the microcomputer 25 for a predetermined period of time. This function is a reset function for returning the abnormally operating microcomputer 25 to the normal operation.For example, the reset control circuit 31 includes a watchdog timer which is cleared by a clear pulse Cp output at constant time intervals or less and more times, respectively, when the microcomputer 25 is normally operating. When the clear pulse Cp is not output for not less than or shorter than a predetermined time slightly longer than the above time interval, the watchdog timer overflows. In this case, the reset signal Sres is output to the microcomputer 25. In this embodiment, the reset signal Sres is a low-level active signal.The reset control circuit 31 outputs the reset signal Sres during a period from when the operation voltage Vd from the power supply circuit 29 rises from 0V to when the operation voltage Vd reaches the minimum value of a normal range (for example, 4.5V to 5.5V). The reset control circuit 31 further includes a so-called power-on reset function and a so-called voltage-drop reset function, whereby the reset control circuit 31 outputs the reset signal Sres when it is detected that the operation voltage Vd has decreased from the normal range to a predetermined value (for example, 4V) or less.The high-level IGSW signal may have the battery voltage Vbat, and the low-level IGSW signal may have 0V. The input circuit 33 converts the IGSW signal supplied from the terminal 23 into a signal having a voltage level executable in the microcomputer 25, and outputs the signal to the microcomputer 25. For example, the high-level converted signal may have the operating voltage Vd, and the low-level converted signal may have 0V.The microcomputer 25 includes a CPU 41 for executing a program, a ROM 42 storing the program executed by the CPU 41 and fixed data, a RAM 43 for storing a result of an operation of the CPU 41 and the like, and a flash memory 44. the RAM 43 is a volatile memory, while the flash memory 44 is a nonvolatile memory into which data is rewritable. Without being limited to the flash memory 44, for example, an EEPROM may be used as a nonvolatile data rewritable nonvolatile memory.The main relay drive circuit 27 includes a transistor 45, an OR circuit 46, and a latch circuit 47, and by being turned on, the transistor 45 connects the terminal 18 to a ground line, thereby causing current to flow through the coil 15.The latch circuit 47 includes a set terminal (S), a reset terminal (R), and an output terminal (Q). In the latch circuit 47, when only the first signal Sa becomes an active level among a first signal Sa supplied to the set terminal (S) and a second signal Sb supplied to the reset terminal (R), the latch circuit 47 is set in a set state in which an output signal So at the output terminal (Q) is maintained at an active level. Of the first signal Sa and the second signal Sb, when only the second signal Sb becomes an active level, the latch circuit 47 is reset to a reset state in which the output signal So is maintained at a non-active level. In the present embodiment, the latch circuit 47 is an SR latch.The first signal Sa and the second signal Sb to the latch circuit 47 are output from the microcomputer 25. In this embodiment, the active level of the first signal Sa, the second signal Sb and the output signal So are high and high, respectively.Among the terminals of the microcomputer 25, terminals for outputting signals such as the first signal Sa and the second signal Sb have a low output level when the microcomputer 25 is reset. This is because of the hardware. Consequently, the active level (high level) of the first signal Sa and the second signal (Sb) is different from the output level of each of the signals Sa, Sb output when the microcomputer 25 is reset by the reset signal Sres.The OR circuit 46 outputs a logical sum signal to the transistor 45 as a drive signal. The logical sum signal indicates a logical sum of the IGSW signal supplied from the terminal 43 and the output signal So of the latch circuit 47. When the output of the OR circuit 46 is high, the transistor 45 is turned on. When the IGSW signal is high (Vbat), the OR circuit 46 turns on the transistor 45 in accordance with the IGSW signal even when the operation voltage Vd is not output from the power supply circuit 29 (i.e., even when the main relay 15 is in a turned-off state). When the transistor 45 is turned on, current flows through the coil 15a, so that the main relay 15 is turned on.Due to this, the main relay drive circuit 27 turns on the main relay 15 when the IGSW signal is high or when the output signal So of the latch circuit 47 is high.Therefore, when the IGSW 10 is turned on by the user of the vehicle and the IGSW signal becomes high (when the vehicle is placed in an ignition-on state), the main relay 15 is turned on, the power supply voltage VB is supplied to the terminal 17 of the ECU 11, the operation voltage Vd is output from the power supply circuit 29, and the microcomputer 25 starts to operate. Thereafter, when the microcomputer 25 controls the first signal Sa output to the latch circuit 47 to be high and the output signal So of the latch circuit 47 becomes high accordingly, the main relay 15 remains in an on state even after the IGSW 19 is turned off (even after the vehicle shifts to an ignition-off state). Of the signals fed into the OR circuit 46, the output signal So of the latch circuit 47 corresponds to a power supply right signal which causes the main relay 15 to remain in an on state even after the IGSW 19 is turned off.Next, processes executed by the microcomputer 25 will be described with reference to FIG. 2. The processes executed by the microcomputer 25 may be realized by a program executed by the CPU 41.As shown in FIG. 2, when the microcomputer 25 starts to operate, the microcomputer 25 executes a step S 110. In step S 110, of the first signal Sa and the second signal Sb for the latch circuit 47, only the first signal Sa becomes high level. When the first signal Sa becomes high, the latch circuit 47 goes into the set state, and the output signal So of the latch circuit 47 is maintained at the high level. Accordingly, the main relay 15 can be maintained in an on state even when the IGSW is subsequently turned off.Next, in a step S 120, the microcomputer 25 determines whether or not the IGSW 19 is turned off based on the IGSW signal supplied from the input circuit 33.When it is determined in step S 120 that the IGSW 19 is not turned off (the IGSW 19 is turned on), the microcomputer 25 executes a process for controlling the control target (in this example, the motor) although not shown in the drawing, and the microcomputer 25 executes the determination process of step S 120, for example, each time a predetermined time elapses.Further, when it is determined in step S 120 that the IGSW 19 is turned off (in other words, when it is detected that the vehicle is in an ignition-off state), the microcomputer 25 proceeds to step S 130, and executes certain processes to be implemented after the IGSW 19 is turned off (hereinafter, referred to as processes after the ignition is turned off). As the processes after the ignition is turned off, at least a data saving process of writing saving target data that determines whether data stored in the random access volatile memory 43 is in the nonvolatile flash memory 44 is mentioned.Upon completion of the processes after the ignition is turned off in step S 130, the microcomputer 25 proceeds to step S 140 and returns the first signal Sa, which has been controlled to be high in step S 110, to be low. Then, in a following step S150, the microcomputer 25 performs pulse output so that the second signal Sb to the latch circuit 47 is high for only a predetermined time. After that, the microcomputer 25 is in a state of executing no process.When the microcomputer 25 controls the second signal Sb to be high in step S 150, only the second signal Sb for the latch circuit 47 is high among the first signal Sa and the second signal Sb. Accordingly, the latch circuit 47 enters a reset state, and the output signal So of the latch circuit 47 becomes low level. In this case, the main relay 15 is turned off because the IGSW 19 is turned off and the IGSW signal is low. Therefore, the supply of the power supply voltage VB to the ECU 11 is stopped, and the microcomputer 25 stops operating.In step S 110, the microcomputer 25 may execute pulse output such that the first signal Sa is high only for a predetermined time. In this case, the process of step S 140 becomes unnecessary. In addition, in step S 150, the microcomputer 25 may execute a process of keeping the second signal Sb at the high level. This is because, assuming that the second signal Sb is high, the main relay 15 is finally turned off and the supply of the power supply voltage VB to the ECU 11 is stopped.In addition, for example, when it is first determined after the power-up that the IGSW 19 is turned on, the microcomputer 25 executes a data recovery process of writing the backup target data stored in the flash memory 44 into the random access memory 43.Next, with reference to FIG. 3, an explanation will be given of processes of the ECU 11.When the IGSW 19 is turned on at a time t 1 as shown in FIG. 3, the main relay 15 is turned on, and the power supply voltage VB is supplied to the terminal 17 of the ECU 11. That is, the power supply voltage VB for the terminal 17 becomes the battery voltage Vbat from 0V. Then, the operation voltage Vd is output from the power supply circuit 29, and thereafter, when the reset of the microcomputer 25 is triggered by the power-on reset function of the reset control circuit 31 (when the reset signal Sres changes from low level to high level), the microcomputer 25 starts to operate.At its beginning to operate, the microcomputer 25 controls only the first signal Sa out of the first signal Sa and the second signal Sb to the latch circuit 47 (at a time t 3, step S 110 of FIG. 2 ). Then, the latch circuit 47 becomes a set state, and the output signal So of the latch circuit 47 becomes high level.After that, even when the IGSW 19 is turned off at a time t4, the output signal So of the latch circuit 47 which is in the set state is high, so that the on state of the main relay 15 is maintained and the microcomputer 25 continues to operate. Thereafter, the microcomputer 25 detects the turning-off of the IGSW 19 ("YES" in step S 120 of FIG. 2 ) and executes the processes after the turning-off of the ignition (S 130 in FIG. 2 ).Now, assume that after the IGSW 19 is turned off, the reset signal Sres from the reset control circuit 31 becomes low level at a time t 5, while the microcomputer 25 executes the processes after the ignition is turned off, and the microcomputer 25 is reset. Then, the high-level first signal Sa output from the microcomputer 25 becomes low-level, but the latch circuit 47 is in the set state, and the output signal So of the latch circuit 47 remains high-level. Consequently, the main relay 15 remains in an on state.Thereafter, when the reset of the microcomputer 25 is triggered by the reset circuit 31 at a time t 6 (when the reset signal Sres changes from low level to high level), the microcomputer 25 starts to operate.Then, at the start of its operation, the microcomputer 25 drives the first signal Sa, which is destined for the latch circuit 47, high again (at a time t 7, S 110 of FIG. 2 ). In this case, it is noted that the latch circuit 47 is in the set state before the microcomputer 25 starts to operate.Subsequently, the microcomputer 25 detects the turning-off of the IGSW 19 ("YES" in step S 120 of FIG. 2 ) and executes the processes after the turning-off of the ignition again from the beginning (step S 130 of FIG. 2 ).Then, upon ending the processes after the ignition is turned off, the microcomputer 25 returns the first signal Sa determined for the latch circuit 47 to low level (step S 140 of FIG. 2 ), and thereafter controls the second signal Sb determined for the latch circuit 47 to high level (at a time t 8, step S 150 of FIG. 2 ).When the first signal Sa becomes low and the second signal Sb becomes high, the latch circuit 47 goes to the reset state, and the output signal So of the latch circuit 47 becomes low (at time t8).Therefore, when the IGSW 19 is turned off at this point, the main relay 15 is turned off, the supply of the power supply voltage VB to the ECU 11 is stopped, and the microcomputer 25 stops operating. Moreover, since the power supply for the reset circuit 31 also ends, the reset signal Sres output from the reset circuit 31 also changes to a low level (0V).When the reset signal Sres does not become low level at time t 5 of FIG. 3, the microcomputer 25 is not reset and executes the processes after the ignition is turned off until the end of the processes after the ignition is turned off. When the microcomputer 25 finishes the processes after the ignition is turned off and the second signal Sb changes from low level to high level, the main relay 15 is turned off. Note that the dotted lines in the fourth waveform of FIG. 3 represent an example when the microcomputer 25 performs pulse output of the first signal Sa in step S 110 of FIG. 2.The above-described ECU 11 includes the OR circuit 46 and the transistor 45 as driving units that cause the main relay 15 to be turned on when an input signal is high. Further, the ECU 11 includes the latch circuit 47 as a signal generation unit that outputs a high-level signal for a period from the microcomputer 25 outputting a turn-on command for the main relay 15 to the microcomputer 25 outputting a turn-off command for the main relay 15.Further, after the microcomputer 25 starts to operate, the first signal Sa of the first signal Sa and the second signal Sb for the latch circuit 47 controls high (the active level) as an output of a turn-on command for the main relay 15. Subsequently, upon detecting the IGSW 19 being turned off (the ignition-off state of the vehicle) and ending the processes after the ignition is turned off, the microcomputer 25 controls the second signal Sb of the first signal Sa and the second signal Sb to be high (the active level) as an output of a turn-off command for the main relay 15.The latch circuit 47 is an SR latch as described above. When the first signal Sa from the microcomputer 25 becomes high level, the latch circuit 47 becomes a set state and the output signal So to the OR circuit 46 becomes high level. When the second signal Sb from the microcomputer 25 becomes high level, the latch circuit 47 assumes a reset state, and the output signal So becomes low level.Due to this, the output signal So to the OR circuit 46 changes to the high level in accordance with a power-on command from the microcomputer 25, and the latch circuit 47 maintains the output signal So to the OR circuit 46 at the high level even when the microcomputer 25 is reset by the reset signal Sres. Further, when the microcomputer 25 outputs a power-off command in a state where the microcomputer 25 is not reset by the reset signal Sres, the latch circuit 47 controls the output signal So destined for the OR circuit 46 to be low (the non-active level).Therefore, as shown in FIG. 3, the IGSW 19 may be turned off after the microcomputer 25 starts operating in response to the turning on of the IGSW. In this case, even if the microcomputer 25 remains high during a period from the IGSW 19 turned off to the completion of the processes after the ignition is turned off, the output signal So from the latch circuit 47 to the OR circuit 46 is maintained high, and the on state of the main relay 15 is continued. Thereafter, when the reset of the microcomputer 25 is triggered, the microcomputer 25 detects the turn-off of the IGSW 19 and executes the processes after the ignition is turned off again, and when the microcomputer 25 finishes the processes after the ignition is turned off and outputs a turn-off command, the output signal So from the latch circuit 47 to the OR circuit 46 becomes low and the main relay 15 is turned off.In this way, according to the ECU 11, the turned-on state of the main relay 15 can be continued during a period from when the vehicle enters the ignition-off state due to the turning-off of the IGSW 19 to when the microcomputer 25 finishes the processes after the ignition-off and intentionally turns off the main relay, even if the microcomputer 25 is reset during this period. Further, when the microcomputer 25 restarted due to the initiation of the reset ends the processes after the ignition is turned off and issues a turn-off command, the main relay 15 may be turned off at this point. Therefore, the processes after the ignition is turned off can be implemented and normally ended. Specifically, backup target data stored in the random access memory 43 can be backed up in the flash memory 44 without being lost after the IGSW 19 is turned off.(Second Embodiment)Next, an ECU 51 of a second embodiment will be described. Like reference numerals are used between the first embodiment and the second embodiment to refer to like components and signals.When the ECU 51 of the second embodiment shown in FIG. 4 is compared with the ECU 11 of the first embodiment, differences include the following items 1 to 3.1. the ECU 51 includes a main relay drive circuit 28 instead of the main relay drive circuit 27. 2. a command signal Sc output from a microcomputer 25 for commanding a main relay 15 to be turned on or off, a clear signal Sd output from the microcomputer 25, and a reset signal Sres output from a reset circuit 31 to the microcomputer 25 are supplied to the latch circuit 53.The levels of the command signal Sc are such that high level is the active level instructing turning on of the main relay 15, while low level is the inactive level instructing turning off of the main relay 15. That is, the command signal Sc is a signal that plays roles of both an on command for the main relay 15 and an off command for the main relay 15. Meanwhile, the high level of the erase signal Sd is the active level.Further, when the clear signal Sd is supplied from the microcomputer 25 (i.e., when the clear signal Sd becomes high), the latch circuit 53 assumes a clear state in which the latch circuit 53 outputs the command signal Sc derived from the microcomputer 25 itself to an OR circuit 46 as a power supply right maintaining signal. The cleared state is a through state in which the supplied command signal Sc itself is output as an output signal So.When the reset signal Sres is supplied (i.e., when the reset signal Sres becomes low), the latch circuit 53 assumes a latched state in which the command signal Sc is latched a predetermined time Td before the supply timing of the reset signal Sres (i.e., the timing of the rise of the reset signal Sres), so that the output is continued. The latch circuit 53 in the latching state continues to output the latched command signal Sc to the OR circuit 46 as a power supply right signal.For example, the latch circuit 53 may include a latching unit for latching an input signal and a delay circuit for delaying the command signal Sc from the microcomputer 25 for the predetermined time Td and inputting the command signal Sc to the latching unit. When the reset signal Sres falls, the latching unit latches the command signal Sc from the delay circuit and outputs the command signal Sc as the output signal So.The predetermined time Td is set to a time longer than a period from when the reset signal Sres becomes low until when the latching operation is completed. In this regard, it may be preferable that the predetermined time Td is a shortest possible time within a range satisfying the above condition. This is because the command signal Sc is to be latched immediately before the microcomputer 25 is reset (the timing at which the reset signal Sres is output). 3. the microcomputer 25 changes the output level of the command signal Sc from low level to high level to output a turn-on command for the main relay 15, and changes the output level of the command signal Sc from high level to low level to output a turn-off command for the main relay 15. Moreover, when it starts to operate, the microcomputer 25 changes the command signal Sc from low level to high level, and immediately thereafter outputs the clear signal Sd to the latch circuit 53.With this knowledge, a description will be given below of processes executed by the microcomputer 25 with reference to FIG. 5. The processes of FIG. 5 are performed in place of the processes of FIG. 2.As shown in FIG. 5, when it starts to operate, the microcomputer 25 changes the command signal Sc determined for the latch circuit 53 from low to high in a step S210.Immediately thereafter, in a step S215, the microcomputer 25 sets the clear signal Sd determined for the latch circuit 53 to the high level for a predetermined time. That is, the microcomputer 25 performs pulse output of the clear signal Sd.Then, the latch circuit 53 assumes an cleared state (ON state) and outputs the high-level command signal Sc from the microcomputer 25 to the OR circuit 46 as the output signal So (Leistungsversorgungsaufrechterhaltesignal). Note that, when supply of a power supply voltage VB to the ECU 51 is started in accordance with the turning on of the IGSW 19 and the microcomputer 25 starts up, the latch circuit 53 operates out of the cleared state even if the clear signal Sd is not supplied.Next, in a step S220, the microcomputer 25 determines whether or not the IGSW 19 is off based on an IGSW signal supplied from an input circuit 33. When it is determined that the IGSW 19 is not turned off (the IGSW 19 is turned on), the microcomputer 25 executes a process for controlling the control target, and executes the determination process of step S 220, for example, each time a predetermined time elapses.Further, when it is determined in step S 220 that the IGSW 19 is turned off, it proceeds to step S 230, and performs the processes after the ignition is turned off, in the same manner as in step S 130 of FIG. 2.Upon completion of the processes after the ignition is turned off in step S 230, the microcomputer 25 proceeds to step S 240 and returns the command signal Sc, which has been changed to high level in step S 210, to low level, and thereafter the microcomputer 25 is in a state of executing no process.When the microcomputer 25 changes the command signal Sc from high to low in step S 240, the output signal So of the latch circuit 53 which is in a cleared state also changes from high to low. At this time, since the IGSW 19 is turned off and also the IGSW signal is low, the main relay 15 is turned off. Therefore, the supply of the power supply voltage VB to the ECU 51 ends, and the microcomputer 25 stops operating. In this embodiment, the microcomputer 25 changing from low to high in step S240 corresponds to the microcomputer 25 intentionally turning off the main relay 15.Next, referring to FIG. 6, operations of the ECU 51 will be described.When the IGSW 19 is turned on at a time t 11 as shown in FIG. 6, the main relay 15 is turned on and the power supply voltage VB is supplied to a terminal 17 of the ECU 51. Then, an operation voltage Vd is output from a power supply circuit 29. Thereafter, at a time t12, when the reset of the microcomputer 25 is triggered by the power-on reset function of the reset control circuit 31 (when the reset signal Sres changes from low level to high level), the microcomputer 25 starts to operate. An operation flow from the time t 11 to the time t 12 is the same as the operation flow from the time t 1 to the time t 2 in FIG. 3.The microcomputer 25, when it starts to operate, sets the command signal Sc intended for the latch circuit 53 to the high level (at a time t 13, step S 210 of FIG. 5 ). Immediately thereafter, the microcomputer 25 sets the clear signal Sd determined for the latch circuit 53 to high level in a pulse form (at a time t 14, step S 220 of FIG. 5 ). Then, the latch circuit 53 which is in a cleared state outputs the high-level command signal Sc from the microcomputer 25 to the OR circuit 46 as the output signal So.As described above, when the supply of the power supply voltage VB to the ECU 51 is started and the microcomputer 25 starts, the latch circuit 25 operates from the cleared state even if the clear signal Sd is not supplied. Consequently, when the microcomputer 25 sets the command signal Sc to high level at the time t 13, the output signal So of the latch circuit 53 also becomes high level. Further, even if the state of the latch circuit 53 when the power supply to the ECU 51 starts is indeterminate, the latch circuit 53 assumes a cleared state by receiving the clear signal from the microcomputer 25. Also in this case, the latch circuit 53 outputs the high-level command signal Sc from the microcomputer 25 to the OR circuit 46.After that, even when the IGSW 19 is turned off at time t15, the microcomputer 25 in operation sets the command signal Sc to high level and the output signal So of the latch circuit 53 in a cleared state is high level. Consequently, the on state of the main relay 15 is maintained, and the microcomputer 25 continues to operate. Then, the microcomputer 25 detects the turn-off of the IGSW 10 ("YES" in step S 220 of FIG. 5 ) and executes the processes after the ignition is turned off (step S 230 of FIG. 5 ).Now, assume that the IGSW is turned off, after that, the reset signal Sres from the reset control circuit 31 becomes low level at a time t 16, while the microcomputer 25 executes the processes after the ignition is turned off, and the microcomputer 25 is reset.Then, although the high-level command signal Sc output from the microcomputer 25 unintentionally becomes low-level, the latch circuit 53 latches the high-level command signal Sc immediately before the time of falling of the reset signal Sres, and continues to output the latched level. Due to this, the output signal So of the latch circuit 53 remains high, and thus the main relay 15 remains in a turned-on state.Thereafter, when the reset of the microcomputer 25 by the reset control circuit 31 is triggered at a time t 17 (when the reset signal Sres changes from low level to high level), the microcomputer 25 starts to operate.At the start of its operation, the microcomputer 25 sets the command signal Sc intended for the latch circuit 53 to high level again (at a time t 18, step S 210 of FIG. 5 ), and immediately thereafter sets the clear signal Sd intended for the latch circuit 53 to high level in a pulse form (at a time t 19, step S 220 of FIG. 5 ). Then, the latch circuit 53 returns from a latching state to a cleared state. In this case, since the command signal Sc from the microcomputer 25 is high before the latch circuit 53 returns to the cleared state, the output signal So of the latch circuit 53 remains high.Subsequently, the microcomputer 25 detects the turning-off of the IGSW 19 ("YES" in step S 220 of FIG. 5 ) and executes the processes after the turning-off of the ignition again from the beginning (step S 230 of FIG. 5 ).Then, upon completion of the processes after the ignition is turned off, the microcomputer 25 returns the command signal Sc intended for the latch circuit 53 to the low level (at a time t 20, step S 240 of FIG. 5 ).Then, since the latch circuit 53 is in a cleared state, the output signal So of the latch circuit 53 becomes low level when the command signal Sc becomes low level (at time t20). Then, the IGSW 19 is turned off at this point, the main relay 15 is turned off, the supply of the power supply voltage VB to the ECU 51 ends, and the microcomputer 25 stops operating. In addition, the reset signal Sres output from the reset circuit 31 also changes to a low level (0V) because the power supply to the reset control circuit 31 also ends.When the reset signal Sres does not become low level at time t 16 of FIG. 6, the microcomputer 25 executes the processes after the ignition is turned off until the end of the processes after the ignition is turned off without being reset. When the microcomputer 25 finishes the processes after the ignition is turned off and the command signal Sc changes from high level to low level, the main relay 15 is turned off.In the above ECU 51, even when the output signal So to the OR circuit 46 is set to the high level in accordance with a power-on command (in this example, the high-level command signal Sc) from the microcomputer 25 and then the microcomputer 25 is reset by the reset signal Sres, the latch circuit 53 keeps the output signal So to the OR circuit 46 at the high level. Further, when the microcomputer 25 outputs a power-off command (the low-level command signal Sc in this example) in a situation where the microcomputer 25 is not reset by the reset signal Sres, the latch circuit 53 sets the output signal So intended for the OR circuit 46 to the low level.Therefore, the same advantages as those of the ECU 11 of the first embodiment are obtained with the ECU 51.Although embodiments have been illustrated, these embodiments are not limited to the embodiments illustrated above. Various configurations may be made. Moreover, the numerical values given in advance are also examples, and other values may be acceptable.For example, the battery voltage Vbat may also be supplied as the power supply voltage VB to the terminal 17 of the ECUs 11 and 51 of the embodiments via the IGSW 19 and a diode. In this case, when the IGSW 19 is turned on, the power supply voltage VB is supplied to the ECUs 11 and 15 even when the main relay 15 is not turned on. Consequently, the OR circuit 46 can be omitted, and the output signal So of the latch circuits 47 and 53 can be used as a drive signal for the transistor 45.Moreover, in addition to the above-described ECUs, embodiments may also be realized in various forms, such as a system including the ECU as a component, a program executed by the microcomputer of the ECU, a medium storing the program, a method of controlling the power supply of the ECU, and the like.
Claims
An electronic control unit comprising: a power supply unit (17) supplied with a battery voltage of a vehicle as a power supply voltage; a microcomputer (25) operating with the power supply voltage supplied to the power supply unit (17) as a power source; a reset unit (31) outputting a reset signal to the microcomputer (25) when a reset execution condition requiring the microcomputer (25) to be reset is satisfied; A drive unit (45, 46) that turns on a power relay (15) when a supplied power supply right hold signal is at an active level, wherein the power relay (15) supplies the power supply voltage to the power supply unit (17) by being turned on, wherein: when the vehicle is placed in a state in which the ignition is turned on, the power supply voltage is supplied to the power supply unit (17) and the microcomputer (25) starts to operate, and also when the vehicle is placed in a state in which the ignition is turned off, the microcomputer continues to operate by causing the drive unit (45, 46) to turn on the power relay (15) until the microcomputer (25) finishes a certain process; and after the microcomputer (25) starts to operate, the microcomputer (25) outputs a turn-on command for turning on the power relay (15), and then upon detecting the key-off state of the vehicle and ending the certain process, the microcomputer (25) outputs a turn-off command for turning off the power relay (15), wherein the electronic control unit further includes: a signal generating unit (47, 53) that, during a period from when the microcomputer (25) outputs the turn-on command until when the microcomputer (25) outputs the turn-off command, outputs the power supply right maintaining signal at the active level to the driving unit (45, 46), wherein: the signal generating unit (47, 53) has a function of, even when the power supply right maintaining signal is set at the active level in response to the turn-on command, and then the microcomputer (25) is reset by the reset signal, Continuing to set the power supply right holding signal to the active level; and when the microcomputer (25) outputs the power-off command in a state in which the microcomputer (25) is not reset by the reset signal, the signal generating unit (47, 53) sets the power supply right holding signal to a non-active level, and wherein the microcomputer (25) outputs a single command signal (Sc) that plays the role of both the power-on command and the power-off command, controls the output level of the command signal (Sc) from the non-active level to the active level as an output of the power-on command, and controls the output level of the command signal (Sc) from the active level to the non-active level as an output of the power-off command; the active level of the command signal (Sc) is different from the output level of the command signal output when the microcomputer (25) is reset by the reset signal; the signal generating unit (47) includes a latch circuit (53) into which the command signal (Sc), the reset signal and a clear signal (Sd) are fed from the microcomputer (25); when the reset signal is fed, the latch circuit (53) assumes a held state in which the command signal (Sc) is latched a predetermined time before a feed timing of the reset signal and the latched command signal (Sc) is further output to the driving unit (45, 46) as the power supply right holding signal; and after the microcomputer (25) starts to operate and controls the output level of the command signal (Sc) from the non-active level to the active level, the microcomputer (25) outputs the clear signal (Sd) to the latch circuit (53).
Citation Information
Patent Citations
Speed alarm device for vehicle
JP1987291571A
Terminal adaptor device for b-channel packet
JP1993030104A
Engine start control device
JP2007002812A
Engine start control device
JP2011179446A
JP000H09330104A
