1. A data processing apparatus comprising: an input unit that inputs data; a data processing unit that performs predetermined processing on the data input by said input unit; a nonvolatile storage unit that stores the data on which the processing has been performed by said data processing unit; a first voltage supply unit that supplies voltage to said storage unit; a second voltage unit that supplies voltage to said storage unit when said first voltage supply unit is incapable of supplying voltage to said storage unit; and a control unit responsive to said first voltage supply unit becoming incapable of supplying voltage to said storage unit, for controlling said storage unit to erase the data stored in said storage unit using a selected one of a plurality of erasing processes depending on a status of processing of the data by said data processing unit.