An on-vehicle electronic control unit, which is formed of a microprocessor provided with a non-volatile memory in which a control program module and control constants corresponding to an uncontrolled vehicle are stored from an external tool, and a RAM memory for operation processing;
- the on-vehicle electronic control unit controlling an on-vehicle current consumer group responsive to an input signal from on-vehicle sensor groups and a content of said non-volatile memory, and in which at least a part of said control constants is transferred to said RAM memory and used as a variable control constant to be rewritten and altered as a result of learning operation during operation;
- wherein said non-volatile memory employs a flash memory in which data can be written after batch clear in plural blocks of a first block acting as a main block and a second block acting as an auxiliary block;
- a control constant processing program module formed of initial transfer write means, first and second transfer save means, update transfer write means and batch clear means, and an initial value data with respect to a semi-fixed control constant and a variable control constant are preliminarily stored from said external tool in the first block of said non-volatile memory, in addition to an input/output control program module, a learning control program module and a fixed control constant, and the semi-fixed control constant is added to and stored in said first block after control operation, and;
- a variable control constant is stored in the second block being a block other than said first block;
- said initial transfer write means is transfer write means that transfers said initial value data to said RAM memory at the start of control operation, and uses said initial value data as a control constant at the time when learning has not completed yet;
- said first transfer save means is means that adds and stores said semi-fixed control constant having been learned and stored during the control operation and written in said RAM memory in a predetermined region of said first block;
- said second transfer save means is means that sequentially adds and stores a variable control constant having been learned and stored during the control operation and actual operation and having been sequentially updated and written in said RAM memory while updating an address of said second block;
- said update transfer write means are transfer write means that transfer to said RAM memory said semi-fixed control constant having been stored in the first block by said first transfer save means or the latest variable control constant having been stored in the second block by said second transfer save means, and use said semi-fixed control constant having been stored in the first block by said first transfer save means or the latest variable control constant having been stored in the second block by said second transfer save means as a control constant after learning has completed;
- and
- said batch clear means is means that executes batch clear before the next addition and write, in the state that an amount of variable control constants having been sequentially added and written in said second block have reached a predetermined value, and that erases an entire data having been written in the second block.