A method for updating data in a nonvolatile memory is provided. The method comprises
the steps of writing in a RAM data stored in a data writing region of the non-volatile
memory, updating the data in the RAM, updating a data error detection region in
the RAM based on the data updated, writing in data saving region of the non-volatile
memory the data updated in the RAM, updating an end flag region of the data saving
region, deleting the data from the data writing region, writing in the data writing
region the data in the RAM, updating an end flag region of the data writing region,
and deleting the data from the data saving region.