主权项 |
1. An electronic control unit mounted in an object comprising:
a rewritable memory that stores control software and reprogramming software; a not-always-on power supply system micro-computer that operates in a control mode as an operating mode based on the control software and in a reprogramming mode as an operating mode based on the reprogramming software, wherein the reprogramming mode provides to rewrite the control software stored in the memory, and the not-always-on power supply system micro-computer is connected with a power source to be supplied an electric power from the power source according to a user operation, and is disconnected from the power source to stop supplying the electric power according to the user operation; and an always-on power supply system micro-computer that operates in the control mode and in the reprogramming mode, wherein the always-on power supply system micro-computer is constantly connected with the power source to be supplied the electric power from the power source without the user operation, wherein each of the not-always-on power supply system micro-computer and the always-on power supply system micro-computer includes:
a first mode determination device that determines whether to operate in an on-board mode when the power source starts to supply the electric power, the on-board mode being an operating mode not carried out under a condition that the electronic control unit is mounted in the object, and being different from the control mode and the reprogramming mode, which are carried out under a condition that the electric control unit is mounted in the object; anda second mode determination device that determines whether to operate in the reprogramming mode according to a determination whether the control software is normally written in the memory when the first mode determination device determines not to operate in the on-board mode, wherein, when it is determined that the control software is not normally written in the memory, the second mode determination device determines to operate in the reprogramming mode, and instructs another micro-computer to operate in the reprogramming mode, wherein the first mode determination device determines not to operate in the on-board mode when the first mode determination device is not instructed to operate in the reprogramming mode, wherein the first mode determination device determines to operate in the on-board mode when the first mode determination device is instructed to operate in the reprogramming mode, wherein the always-on power supply system micro-computer includes a first transition device that detects a change in a power supply state of the not-always-on power supply system micro-computer when the operation is carried out in the reprogramming mode and the control software is being rewritten, wherein the first transition device switches a processing to a determination executed by the first mode determination device when the first transition device detects that the power supply state has changed. |