Abstract: The supply voltage of an on-chip flash memory is regulated with two feedback loops. One loop comprises the flash memory, a register, and a voltage regulator with bandgap reference to regulate the supply voltage. The other loop comprises the flash memory, another register, an amplifier with bandgap reference, and comparators to monitor the supply voltage and adjust the threshold of the signals which control the operation of the flash memory and registers. The calibration data controls variable resistive means in the feedback paths of the voltage regulator and in the calibration of the threshold values of the control signals. Calibration data is held in the registers when the supply voltage is out-of-range to prevent self-start up.