1. A semiconductor device, comprising: a non-volatile memory cell array; a control unit configured to generate a mode signal indicating if a flash mode has been enabled; a write circuit configured to write in the non-volatile memory cell array based on the mode signal such that the write circuit disables erasing the non-volatile memory cell array if the flash mode has not been enabled and instructions to erase one or more cells of the non-volatile memory cell array is received.