1. Field of the Invention
The invention relates to a vehicle control apparatus, and a control method of the same. More specifically, the invention relates to a vehicle control apparatus that has a function of determining whether a malfunction occurs in a vehicle, and a control method of the same.
2. Description of the Related Art
Nonvolatile memories are used for various purposes. For example, the nonvolatile memory is provided in an ECU (Electronic Control Unit) for a vehicle.
Japanese Patent Application Publication No. 2006-79168 (JP-A-2006-79168) describes a technology relating to rewriting of data in a nonvolatile memory provided in an ECU for a vehicle. Similar technologies are described in Japanese Patent Application Publications No. 2006-79168 (JP-A-2006-79168), No. 2003-22218 (JP-A-2003-22218), No. 2001-282563 (JP-A-2001-282563), and No. 10-105468 (JP-A-10-105468).
Recently, in some cases, it has been required to perform OBD (On Board Diagnosis) that automatically checks the operations of sensors used for control for reducing emissions. In a vehicle used for a long period of time, by performing the OBD, it is possible to quickly determine whether repair or the like is needed. The OBD may be also performed by an ECU that controls, for example, an engine, an automatic transmission, and a hybrid system that uses the engine and a motor for driving a vehicle. In this case, by performing self-diagnosis in the vehicle, a malfunction is quickly detected.
When the OBD is performed, and it is determined that a malfunction occurs, a diagnostic trouble code (DTC) corresponding to the malfunction is written in the memory of the ECU, and a malfunction indicator lamp MIL is turned on. Then, when the vehicle is brought to a repair shop, a diagnostic tool, which is called “scan tool”, is connected to the vehicle, and the diagnostic trouble code is read out from the memory of the ECU, using the scan tool. Because the diagnostic trouble code is indicated in the indication portion of the scan tool, an operator in the repair shop can determine the type of malfunction that occurs in the vehicle. After repair is completed, the diagnostic trouble code in the memory is erased using the scan tool, and the malfunction indicator lamp MIL is turned off.
Thus, when a malfunction occurs, and repair has not been performed, the malfunction indicator lamp MIL is on. Therefore, the trouble can be detected and indicated when the vehicle is examined.
However, because the diagnostic trouble code is stored in the volatile memory of the ECU, the malfunction indicator lamp may be turned off if a battery is intentionally removed to clear the memory of the ECU. Accordingly, a law, which makes it mandatory to store a specific diagnostic trouble code in the nonvolatile memory, has been enacted to reserve the record of a malfunction. The diagnostic trouble code in the nonvolatile memory cannot be erased even by the scan tool.
However, the law also states that when the program in the ECU is rewritten, the record showing the diagnostic trouble code in the nonvolatile memory may be erased, because the diagnostic trouble code in the nonvolatile memory has no meaning any more. Accordingly, when the diagnostic trouble code in the nonvolatile memory is erased, it is necessary to determine whether the program in the ECU has been rewritten.
In general, it is determined whether the program in the ECU has been rewritten, by storing, in the nonvolatile memory, identifying information unique to the program, and comparing the identifying information in the nonvolatile memory with the identifying information for the program that is currently stored in the ROM when the ECU is started. However, it is difficult to manage the identifying information for each program so that the same identifying information is not assigned to different programs.