Patent ID: 11934566
Assignee: SHENZHEN GOODIX TECHNOLOGY CO., LTD.
Field: Computer technology (Electrical engineering)
Classification: CPC G  H | IPC G  H

Claim 0:
1. A voltage attack detection circuit, comprising:
a first programmable resistor and a second programmable resistor, wherein a first terminal of the first programmable resistor is connected to a supply voltage, a second terminal of the first programmable resistor is connected to a ground voltage through the second programmable resistor, the first terminal is configured to output a first voltage, and the second terminal is configured to output a second voltage; and
a voltage detection circuit, wherein the voltage detection circuit is configured to receive the first voltage and a first reference voltage and output a first signal, and the first signal is configured to indicate whether the first voltage is greater than or equal to the first reference voltage, the voltage detection circuit is further configured to receive the second voltage and a second reference voltage and output a second signal, the second signal is configured to indicate whether the second voltage is less than or equal to the second reference voltage, and the first reference voltage is greater than the second reference voltage;
wherein the first reference voltage is less than or equal to a voltage value of the first voltage when the supply voltage is a maximum working voltage of a bandgap voltage reference, and the second reference voltage is greater than or equal to a voltage value of the second voltage when the supply voltage is a minimum working voltage of the bandgap voltage reference;, wherein the voltage detection circuit comprises:
a first hysteresis comparator and a second hysteresis comparator;
wherein a positive input terminal of the first hysteresis comparator is connected to the first terminal to receive the first voltage, a negative input terminal of the first hysteresis comparator is connected to the first reference voltage, an output terminal of the first hysteresis comparator is configured to output the first signal, a positive input of the second hysteresis comparator is connected to the second terminal to receive the second voltage, a negative input terminal of the second hysteresis comparator is connected to the second reference voltage, and an output terminal of the second hysteresis comparator is configured to output the second signal;
wherein the second signal is configured to indicate whether the second voltage in a falling phase is less than or equal to the second reference voltage, the second voltage is further configured to indicate whether the second voltage in a rising phase is greater than or equal to a second threshold, and a difference between the second threshold and the second reference voltage is an amount of hysteresis of the second hysteresis comparator;
wherein the voltage attack detection circuit further comprises:
a first AND gate and a second AND gate;
wherein the first AND gate is configured to receive the first signal and a first indication signal and output a third signal, the second AND gate is configured to receive the second signal and a second indication signal and output a fourth signal, the first indication signal is configured to indicate whether the first reference voltage is abnormal, and the second indication signal is configured to indicate whether the second reference voltage is abnormal;
wherein the voltage attack detection circuit further comprises:
a reference voltage generation circuit and a reference voltage detection circuit;
wherein the reference voltage generation circuit is configured to generate the first reference voltage and the second reference voltage, the reference voltage detection circuit is connected to the reference voltage generation circuit, the reference voltage detection circuit is configured to receive the first reference voltage and output the first indication signal, and the reference voltage detection circuit is further configured to receive the second reference voltage and output the second indication signal;
wherein the voltage attack detection circuit further comprises:
a deglitch circuit;
wherein the reference voltage generation circuit is connected to the first AND gate and the second AND gate respectively through the deglitch circuit, and the deglitch circuit is configured to reset an indication signal, configured to indicate that a reference voltage is abnormal, with a duration less than or equal to a preset threshold to an indication signal configured to indicate that a reference voltage is not abnormal.