Detection system, system control method and electronic equipment
By designing a detection system for chip pins, using reference voltage and switch control units to detect leakage, the applicability and accuracy problems in different fields are solved, efficient and low-cost leakage detection is achieved, and redundant temperature acquisition is avoided. Remaining influence.
Patent Information
- Application Number
- CN202410946849.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-15
- Publication Date
- 2024-11-01
AI Technical Summary
The existing chip pin leakage detection system cannot be applied to different fields, which affects the accuracy of the detection results.
A detection system is designed, including a reference voltage unit, a reference voltage switch, a detection switch, a leakage detection unit and a switch control unit. By controlling the conduction or shutdown of the reference voltage switch and the detection switch, it is determined whether there is leakage in the pin to be detected. , and avoid the influence of off-chip temperature control resistance during temperature acquisition.
The accuracy and efficiency of chip pin leakage detection in different fields is achieved, which avoids the impact of the reference voltage unit and leakage detection unit on the normal operation of the detection pin to be detected, and reduces the detection cost.
Smart Images

Figure CN118884296A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of automatic detection technology, and in particular to a detection system and electronic equipment. Background Art
[0002] In different application fields, especially in the detection field, leakage of chip pins will cause errors in the voltage at the chip pins, thus affecting the accuracy of the final detection results. Therefore, it is very important to detect whether the pins on the chip are leaking.
[0003] However, the internal and external circuit structures of the chip will change with different application fields, so the circuit for chip pin leakage detection will also change with the changes in the internal and external circuit structures of the chip, resulting in different circuits for chip pin leakage detection in different application fields.
[0004] Therefore, providing a detection system applicable to different fields has become a technical problem that the industry urgently needs to solve. Summary of the invention
[0005] The technical problem solved by the present invention is to provide a detection system, a system control method and an electronic device, which solves the problem that the detection system is applicable to chip pin leakage detection in different fields.
[0006] In order to solve the above technical problems, an embodiment of the present invention provides a detection system for detecting whether there is leakage on a pin to be detected on a chip, the system comprising: a reference voltage unit, a first reference voltage switch, a second reference voltage switch, a detection switch, a leakage detection unit, a switch control unit and an off-chip resistive unit; wherein:
[0007] The output end of the reference voltage unit is connected to the first end of the first reference voltage switch, the second end of the first reference voltage switch is connected to the reference voltage pin on the chip, and the reference voltage unit is used to output a reference voltage;
[0008] The reference voltage pin is connected to the first end of the second reference voltage switch, the pin to be detected is connected to the first end of the detection switch, and the second end of the second reference voltage switch and the second end of the detection switch are both connected to the input end of the leakage detection unit;
[0009] An off-chip resistive unit, wherein a first end of the off-chip resistive unit is connected to the reference voltage pin, and a second end of the off-chip resistive unit is connected to the pin to be detected;
[0010] The switch control unit is used to control the first reference voltage switch, the second reference voltage switch and the detection switch to be turned on when detecting whether there is leakage at the pin to be detected, and the switch control unit is also used to control the first reference voltage switch, the second reference voltage switch and the detection switch to be turned off when the chip is working normally;
[0011] The leakage detection unit is used to detect the input voltage signal, and judge that there is no leakage in the pin to be detected according to the absolute value of the difference between the input voltage signals being less than the first threshold, and judge that there is leakage in the pin to be detected according to the absolute value of the difference between the input voltage signals being greater than the first threshold;
[0012] The reference voltage unit, the first reference voltage switch, the second reference voltage switch, the detection switch, the leakage detection unit, and the switch control unit are integrated in the chip; and the off-chip resistive unit is arranged outside the chip.
[0013] Optionally, the leakage detection unit includes a voltage detection subunit and a leakage judgment subunit;
[0014] The input end of the voltage detection subunit is used as the input end of the leakage detection unit, and the voltage detection subunit is used to convert the input voltage signal into a corresponding judgment signal and output it;
[0015] The leakage judgment subunit is used to judge whether there is leakage in the pin to be detected according to the input judgment signal;.
[0016] Optionally, the voltage detection subunit includes an analog-to-digital converter, and the second end of the second reference voltage switch and the second end of the detection switch are both connected to an input end of the analog-to-digital converter;
[0017] When detecting whether there is leakage at the pin to be detected, the analog-to-digital converter converts the reference voltage at the reference voltage pin into a first digital signal and outputs the signal, and the analog-to-digital converter also converts the first voltage at the pin to be detected into a second digital signal and outputs the signal;
[0018] The leakage judgment subunit is used to judge that the pin to be detected is leaking according to the absolute value of the difference between the first digital signal and the second digital signal being greater than the first threshold, and is also used to judge that the pin to be detected is not leaking according to the absolute value of the difference between the first digital signal and the second digital signal being less than the first threshold.
[0019] Optionally, the detection system is also used to collect the temperature outside the chip, and the detection system further includes:
[0020] A common switch integrated in the chip, wherein a first end of the common switch is connected to a common pin on the chip, and a second end of the common switch is connected to a ground terminal of the chip;
[0021] An off-chip temperature-controlled resistor, wherein the off-chip temperature-controlled resistor is arranged outside the chip, a first end of the off-chip temperature-controlled resistor is connected to a second end of the off-chip resistive unit, and a second end of the off-chip temperature-controlled resistor is connected to the common pin;
[0022] The switch control unit is used to control the detection switch and the second reference voltage switch to be turned off, and control the first reference voltage switch and the common switch to be turned on when collecting the temperature outside the chip; the analog-to-digital converter is used to convert the second voltage on the pin to be detected into a third digital signal and output it, and the leakage judgment subunit is used to detect the temperature outside the chip according to the third digital signal;
[0023] The switch control unit is also used to control the first reference voltage switch, the second reference voltage switch and the detection switch to be turned on, and control the common switch to be turned off when detecting whether there is leakage at the pin to be detected; the analog-to-digital converter converts the reference voltage on the reference voltage pin into the first digital signal, and converts the first voltage on the pin to be detected into the second digital signal; the leakage judgment subunit is used to judge that the pin to be detected is leaking according to the absolute value of the difference between the first digital signal and the second digital signal being greater than the first threshold, and is also used to judge that the pin to be detected is not leaking according to the absolute value of the difference between the first digital signal and the second digital signal being less than the first threshold.
[0024] Optionally, the off-chip temperature control resistor is specifically an NTC resistor.
[0025] Optionally, the voltage detection subunit includes a window comparator; a first input end of the window comparator is connected to the second end of the second reference voltage switch, a second input end of the window comparator is connected to the second end of the detection switch, and the window comparator is provided with a first threshold;
[0026] When detecting whether there is leakage at the pin to be detected, the window comparator determines whether the voltage difference between the reference voltage input to the first input terminal and the first voltage input to the second input terminal exceeds the first threshold; if it exceeds the first threshold, the window comparator outputs a first level signal; if it does not exceed the first threshold, the window comparator outputs a second level signal;
[0027] The leakage judgment subunit is used to judge whether there is leakage in the pin to be detected according to the received level signal; if the leakage judgment subunit receives the first level signal, it judges that there is leakage in the pin to be detected; if the leakage judgment subunit receives the second level signal, it judges that there is no leakage in the pin to be detected;.
[0028] Optionally, the leakage judgment subunit includes at least any one of an MCU, a CPU, a digital comparator and an analog comparator.
[0029] Optionally, the off-chip resistive unit includes a single resistor.
[0030] Optionally, the off-chip resistive unit includes a resistor network formed by connecting a plurality of resistors in series and in parallel.
[0031] Correspondingly, the technical solution of the present invention also provides a system control method based on the detection system, the method comprising:
[0032] When detecting whether the pin to be detected has leakage:
[0033] The switch control unit controls the first reference voltage switch, the second reference voltage switch and the detection switch to be turned on;
[0034] The leakage detection unit detects the input voltage signal, and if the absolute value of the difference between the input voltage signals is less than a first threshold, it is determined that there is no leakage in the pin to be detected; if the absolute value of the difference between the input voltage signals is greater than the first threshold, it is determined that there is leakage in the pin to be detected;
[0035] When the chip is working properly:
[0036] The switch control unit controls the first reference voltage switch, the second reference voltage switch, and the detection switch to be turned off.
[0037] Correspondingly, the technical solution of the present invention also provides a system control method based on the detection system, the method comprising:
[0038] When detecting whether the pin to be detected has leakage:
[0039] The switch control unit controls the first reference voltage switch, the second reference voltage switch and the detection switch to be turned on, and controls the common switch to be turned off;
[0040] The analog-to-digital converter converts the reference voltage on the reference voltage pin into the first digital signal, and converts the first voltage on the pin to be detected into the second digital signal;
[0041] The leakage judging subunit judges that there is no leakage in the pin to be detected according to that the absolute value of the difference between the first digital signal and the second digital signal is less than the first threshold;
[0042] The leakage judging subunit further judges that leakage exists in the pin to be detected according to that the absolute value of the difference between the first digital signal and the second digital signal is greater than the first threshold value;
[0043] When collecting the temperature outside the chip:
[0044] The switch control unit controls the detection switch and the second reference voltage switch to be turned off, and controls the first reference voltage switch and the common switch to be turned on;
[0045] The analog-to-digital converter converts the second voltage on the pin to be detected into a third digital signal and outputs the third digital signal;
[0046] The leakage determination subunit detects the temperature outside the chip according to the third digital signal.
[0047] Correspondingly, the technical solution of the present invention further provides an electronic device, including the detection system provided by the technical solution of the present invention.
[0048] Compared with the prior art, the technical solution of the embodiment of the present invention has the following beneficial effects:
[0049] In the detection system of the technical solution of the present invention, on the one hand, when detecting whether there is leakage in the pin to be detected, the switch control unit controls the first reference voltage switch, the second reference voltage switch and the detection switch to be turned on, and the leakage detection unit realizes leakage detection of the pin to be detected; on the other hand, when the chip is working normally, the switch control unit controls the first reference voltage switch, the second reference voltage switch and the detection switch to be turned off, so as to avoid the reference voltage unit and the leakage detection unit from affecting the normal operation of the pin to be detected. Based on the above two aspects, the detection system of the present application realizes chip pin leakage detection in different fields.
[0050] Furthermore, in the application field of collecting the temperature outside the chip, a common pin and a common switch connecting the common pin and the chip ground are additionally provided on the chip. When detecting whether there is leakage on the pin to be detected, the switch control unit controls the first reference voltage switch, the second reference voltage switch and the detection switch to be turned on, and controls the common switch to be turned off, so as to avoid the influence of the off-chip temperature control resistor on the leakage detection of the pin to be detected. Compared with the redundant detection method in the field of temperature acquisition in the prior art, the detection system of the present application can effectively avoid the influence of the off-chip temperature control resistor, thereby realizing simple, efficient and low-cost leakage detection of the pin to be detected. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 The circuit structure diagram of the detection system provided by the technical solution of the present invention Figure 1 ;
[0052] Figures 2 to 5 They are schematic diagrams of the circuit structure of the detection system provided by the embodiments of the present invention. Figure 2 To the circuit structure diagram Figure 5 ;
[0053] Figure 6 The process of the system control method provided by the technical solution of the present invention is Figure 1 ;
[0054] Figure 7 The process of the system control method provided by the technical solution of the present invention is Figure 2 .
[0055] Reference numerals:
[0056] 10- reference voltage unit;
[0057] 20-leakage detection unit;
[0058] 21- voltage detection subunit;
[0059] 22-leakage judgment subunit;
[0060] 30- switch control unit;
[0061] 40- off-chip resistive unit;
[0062] 50- off-chip temperature control resistor;
[0063] IO1-reference voltage pin;
[0064] IO2-pin to be detected;
[0065] IO3 - common pin;
[0066] VREF-reference voltage;
[0067] V1-first voltage;
[0068] SVREF1 - first reference voltage switch;
[0069] SVREF2 - second reference voltage switch;
[0070] S0-detection switch;
[0071] SW - common switch. DETAILED DESCRIPTION
[0072] As described in the background art, the existing chip pin leakage detection system cannot be applied to different fields.
[0073] It should be noted that if there is chip leakage, and the leakage current flows through the chip pins, but the leakage current does not flow out of the chip through the chip pins, but only flows inside the chip; or if there is leakage in the chip peripheral circuit, and the leakage current flows through the chip pins, but the leakage current does not flow into the chip through the chip pins, but only flows around the chip, they do not belong to the chip pin leakage located in the present invention. Therefore, the chip pin leakage that appears below is based on: there is leakage current flowing into or out of the chip from the chip pins.
[0074] In view of this, the technical solution of the present invention provides a new detection system for detecting whether there is leakage in the pin to be detected on the chip;.
[0075] in, Figure 1 The circuit structure diagram of the detection system provided by the technical solution of the present invention Figure 1 .
[0076] Please refer to Figure 1 The detection system provided by the technical solution of the present invention includes: a reference voltage unit 10, a first reference voltage switch SVREF1, a second reference voltage switch SVREF2, a detection switch S0, a leakage detection unit 20, a switch control unit 30 and an off-chip resistive unit 40; wherein:
[0077] The output end of the reference voltage unit 10 is connected to the first end of the first reference voltage switch SVREF1, and the second end of the first reference voltage switch SVREF1 is connected to the reference voltage pin IO1 on the chip. The reference voltage unit 10 is used to output the reference voltage VREF;
[0078] The reference voltage pin IO1 is connected to the first end of the second reference voltage switch SVREF2, the to-be-detected pin IO2 is connected to the first end of the detection switch S0, and the second end of the second reference voltage switch SVREF2 and the second end of the detection switch S0 are both connected to the input end of the leakage detection unit 20;
[0079] An off-chip resistive unit 40, wherein a first end of the off-chip resistive unit 40 is connected to the reference voltage pin IO1, and a second end of the off-chip resistive unit 40 is connected to the pin to be detected IO2;
[0080] The switch control unit 30 is used to control the first reference voltage switch SVREF1, the second reference voltage switch SVREF2 and the detection switch S0 to be turned on when detecting whether there is leakage on the pin to be detected IO2. The switch control unit 30 is also used to control the first reference voltage switch SVREF1, the second reference voltage switch SVREF2 and the detection switch S0 to be turned off when the chip is working normally;
[0081] The leakage detection unit 20 is used to detect the input voltage signal, and judge that the pin IO2 to be detected does not have leakage according to the absolute value of the difference between the input voltage signals being less than the first threshold, and judge that the pin IO2 to be detected has leakage according to the absolute value of the difference between the input voltage signals being greater than the first threshold;
[0082] The reference voltage unit 10, the first reference voltage switch SVREF1, the second reference voltage switch SVREF2, the detection switch S0, the leakage detection unit 20, and the switch control unit 30 are integrated in the chip: the off-chip resistive unit 40 is arranged outside the chip.
[0083] It should be noted that the system has an upper tolerance limit for the leakage of the chip pins. Once the leakage current of the chip pins exceeds the upper tolerance limit, the system will not be able to accept it. The difference in the input voltage signal corresponding to the upper tolerance limit is the first threshold. The upper tolerance limit of the system for the leakage of the chip pins is not fixed, and it will depend on the actual application scenario. Some application scenarios will be more relaxed about the leakage of the chip pins, and some application references will strictly limit the leakage of the chip pins. Therefore, the first threshold will vary with the different upper tolerance limits of the system for the leakage of the chip pins in different application scenarios. At the same time, under the same upper tolerance limit condition, the first threshold will also change with the different resistance values of the off-chip resistive unit. For example, if the upper tolerance limit of the system for the leakage of the chip pins is 100nA, and the resistance value of the off-chip resistive unit is 100k, then the first threshold is equal to 10mV. If the upper tolerance limit of the system for the leakage of the chip pins is 100nA, and the resistance value of the off-chip resistive unit is 1M, then the first threshold is equal to 100mV. Therefore, the specific value of the first threshold value will depend on the specific application scenario and the specific resistance value of the off-chip resistive unit, and is not limited here.
[0084] Through the above technical solution, the detection system provided by the present invention can be applied to chip pin leakage detection in different fields. The specific principle is:
[0085] Please refer to Figure 1 When leakage detection is required for the pin IO2 to be detected on the chip, the switch control unit 30 controls the first reference voltage switch SVREF1, the second reference voltage switch SVREF2 and the detection switch S0 to be turned on. Of course, the second reference voltage switch SVREF2 and the detection switch S0 can be controlled to be turned on simultaneously or in steps. After the second reference voltage switch SVREF2 and the detection switch S0 are both turned on, the voltage on the reference voltage pin IO1 and the voltage on the pin IO2 to be detected are both input to the leakage detection unit 20. The leakage detection unit 20 detects the input voltage signal and determines whether the pin IO2 to be detected has leakage according to whether the absolute value of the difference between the input voltage signals is less than a first threshold value; if the voltage on the reference voltage pin IO1 and the voltage on the pin IO2 to be detected are less than the first threshold value, the leakage detection unit 20 determines that the pin IO2 to be detected has no leakage; if the voltage on the reference voltage pin IO1 and the voltage on the pin IO2 to be detected are greater than the first threshold value, the leakage detection unit 20 determines that the pin IO2 to be detected has leakage.
[0086] When the chip needs to work normally, the switch control unit 30 controls the first reference voltage switch SVREF1, the second reference voltage switch SVREF2 and the detection switch S0 to be turned off to ensure that when the chip is working normally, the leakage detection unit 20 and the reference voltage unit 10 will not affect the pin IO2 to be detected.
[0087] Based on the above description, when it is necessary to perform leakage detection on the pin IO2 to be detected on the chip, leakage detection of the pin IO2 to be detected can be realized; when the chip works normally, it can avoid affecting the pin IO2 to be detected, so that the detection system provided by the technical solution of the present invention can be suitable for leakage detection in different fields.
[0088] It should be noted that the above technical solution is not only applicable to leakage detection of a single chip pin. Based on actual circuit applications, the detection system provided by the present invention is also applicable to leakage detection of multiple chip pins. When multiple pins are subjected to leakage detection, it is only necessary to set a corresponding detection switch S0 between each pin and the leakage detection unit 20, and set a corresponding off-chip resistance unit 40 for each pin, so that the first end of each off-chip resistance unit 40 is connected to the corresponding pin IO2 to be detected, and the first end of each off-chip resistance unit 40 is connected to the reference voltage pin IO1. When leakage detection is performed on a certain pin IO2 to be detected, only the first reference voltage switch SVREF1, the second reference voltage switch SVREF2 and the detection switch S0 corresponding to the pin IO2 to be detected are closed, and the detection switches S0 corresponding to other pins are all turned off, so that only the pin IO2 to be detected is subjected to leakage detection.
[0089] In order to make the above-mentioned objects, features and beneficial effects of the present invention more obvious and easy to understand, specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0090] Figures 2 to 5 They are schematic diagrams of the circuit structure of the detection system provided by the embodiments of the present invention. Figure 2 To the circuit structure Figure 5 .
[0091] As a specific implementation, the reference voltage unit 10 is specifically a bandgap reference source.
[0092] Please refer to Figure 2 As a specific implementation, the leakage detection unit 20 includes a voltage detection subunit 21 and a leakage judgment subunit 22;
[0093] The input end of the voltage detection subunit 21 serves as the input end of the leakage detection unit 20, and the voltage detection subunit 21 is used to convert the input voltage signal into a corresponding judgment signal and output it;
[0094] The leakage judging subunit 22 is used to judge whether there is leakage in the pin IO2 to be detected according to the input judging signal.
[0095] Please refer to Figure 3 As a specific implementation, the voltage detection subunit 21 includes an analog-to-digital converter, and the second end of the second reference voltage switch SVREF2 and the second end of the detection switch S0 are both connected to the input end of the analog-to-digital converter;
[0096] When detecting whether there is leakage on the pin IO2 to be detected, the analog-to-digital converter converts the reference voltage VREF on the reference voltage pin IO1 into a first digital signal and outputs it, and the analog-to-digital converter also converts the first voltage V1 on the pin IO2 to be detected into a second digital signal and outputs it;
[0097] The leakage judging subunit 22 is used to judge that there is no leakage in the pin IO2 to be detected according to the absolute value of the difference between the first digital signal and the second digital signal being less than the first threshold value; the leakage judging subunit 22 is also used to judge that there is leakage in the pin IO2 to be detected according to the absolute value of the difference between the first digital signal and the second digital signal being greater than the first threshold value. It should be noted that the absolute value of the difference between the first digital signal and the second digital signal being greater than the first threshold value here only indicates that the first digital signal is greater than the second digital signal, and may also indicate that the first digital signal is less than the second digital signal.
[0098] The leakage judging subunit 22 judges whether the pin IO2 to be detected has leakage; the principle is as follows:
[0099] When there is no leakage at the pin IO2 to be detected, according to the circuit principle, it can be known that the difference between the reference voltage VREF at the reference voltage pin IO1 and the first voltage V1 at the pin IO2 to be detected should be smaller than the first threshold value, so at this time, the difference between the first digital signal converted by the reference voltage VREF and the second digital signal converted by the first voltage V1 should also be smaller than the first threshold value, that is, the leakage judgment subunit 22 is used to judge that there is no leakage at the pin IO2 to be detected according to the difference between the first digital signal and the second digital signal being smaller than the first threshold value;.
[0100] When leakage occurs at the pin IO2 to be detected, a potential difference will be formed between the pin IO2 to be detected and a certain position of the chip, thereby forming a conduction path from the reference voltage pin IO1 through the off-chip resistance unit 40 to the certain position, generating a leakage current flowing from the pin IO2 to be detected into the chip or generating a leakage current flowing out of the chip from the pin IO2 to be detected. However, no matter whether the leakage current flows into or out of the chip through the pin IO2 to be detected, due to the existence of the off-chip resistance unit 40, there will be a voltage drop between the pin IO2 to be detected and the reference voltage pin IO1, so that the difference between the first voltage V1 on the pin IO2 to be detected and the reference voltage VREF on the reference voltage pin IO1 is greater than the first threshold value, so at this time, the difference between the first digital signal converted by the reference voltage VREF and the second digital signal converted by the first voltage V1 is also greater than the first threshold value, that is, the leakage judgment subunit 22 is used to judge that leakage occurs at the pin IO2 to be detected according to the difference between the first digital signal and the second digital signal being greater than the first threshold value;. In a further embodiment, if a certain position is the ground terminal, then at this time the leakage current will flow from the reference voltage pin IO1 through the pin to be detected IO2 into the chip, and finally flow to the ground terminal, so the reference voltage VREF is greater than the first voltage V1, that is, the first digital signal is greater than the second digital signal. If the potential of a certain position is higher than the reference voltage pin IO1, then at this time the leakage current will flow from the leakage position through the pin to be detected IO2 out of the chip, and finally flow to the reference voltage pin IO1, so the first voltage V1 is greater than the reference voltage VREF, that is, the second digital signal is greater than the first digital signal. Therefore, the leakage judgment subunit 22 can judge that the leakage current flows into the chip through the pin to be detected IO2 according to the fact that the first digital signal is greater than the second digital signal, and the difference between the first digital signal and the second digital signal is greater than the first threshold. The leakage judgment subunit 22 can also judge that the leakage current flows out of the chip through the pin to be detected IO2 according to the fact that the first digital signal is less than the second digital signal, and the difference between the first digital signal and the second digital signal is greater than the first threshold.
[0101] Please refer to Figure 4 On the basis that the voltage detection subunit 21 is an analog-to-digital converter, as a specific implementation, the detection system can also be used to collect the temperature outside the chip, and the detection system also includes:
[0102] A common switch SW integrated in the chip, wherein a first end of the common switch SW is connected to a common pin IO3 on the chip, and a second end of the common switch SW is connected to a ground terminal of the chip;
[0103] An off-chip temperature-controlled resistor 50, wherein the off-chip temperature-controlled resistor 50 is arranged outside the chip, a first end of the off-chip temperature-controlled resistor 50 is connected to a second end of the off-chip resistive unit 40, and a second end of the off-chip temperature-controlled resistor 50 is connected to the common pin IO3;
[0104] The switch control unit 30 is used to control the detection switch S0 and the second reference voltage switch SVREF2 to be turned off, and control the first reference voltage switch SVREF1 and the common switch SW to be turned on when collecting the temperature outside the chip; the analog-to-digital converter is used to convert the second voltage on the pin IO2 to be detected into a third digital signal and output it, and the leakage judgment subunit 22 is used to detect the temperature outside the chip according to the third digital signal. The principle of detecting the temperature outside the chip is as follows:
[0105] The analog-to-digital converter detects the first voltage V1 on the pin to be detected IO2. At this time, the formula of the first voltage V1 is as follows:
[0106] V(GPIO)=VREF*R2 / (R1+R2); Formula (1)
[0107] Among them, V(GPIO) is used to characterize the first voltage V1; VREF is used to characterize the reference voltage VREF; R1 is used to characterize the equivalent resistance of the off-chip resistive unit 40; and R2 is used to characterize the off-chip temperature control resistor 50.
[0108] Since the first voltage V1, the equivalent resistance of the off-chip resistive unit 40 and the reference voltage VREF are all known parameters, the resistance value of the off-chip temperature-controlled resistor 50 can be obtained by combining formula (1). Since the relationship between the off-chip temperature-controlled resistor 50 and the temperature is also known, the relationship between the off-chip temperature-controlled resistor 50 and the temperature can be combined with the resistance value of the off-chip temperature-controlled resistor 50 to obtain the temperature outside the chip.
[0109] However, if the pin IO2 to be detected leaks, formula (1) will not hold, and the temperature outside the chip cannot be accurately obtained by the first voltage V1 collected by the analog-to-digital converter. Therefore, it is necessary to perform leakage detection on the pin IO2 to be detected.
[0110] The switch control unit 30 is also used to control the first reference voltage switch SVREF1, the second reference voltage switch SVREF2 and the detection switch SO to be turned on, and control the common switch SW to be turned off when detecting whether there is leakage on the pin IO2 to be detected; the analog-to-digital converter converts the reference voltage VREF on the reference voltage pin IO1 into the first digital signal, and converts the first voltage V1 on the pin IO2 to be detected into the second digital signal; the leakage judgment subunit 22 is used to judge that there is no leakage on the pin IO2 to be detected according to the difference between the first digital signal and the second digital signal being less than the first threshold; the leakage judgment subunit 22 is also used to judge that there is leakage on the pin IO2 to be detected according to the difference between the first digital signal and the second digital signal being greater than the first threshold;.
[0111] In the above embodiment, the beneficial effect of setting the common switch SW and the common pin IO3 in the chip is that the influence of the off-chip temperature control resistor 50 on the leakage detection of the pin to be detected IO2 is avoided, and compared with the chip pin leakage detection in the field of temperature detection in the prior art, the waste of chip pin resources is greatly reduced. The specific principle of this beneficial effect is as follows:
[0112] In the existing temperature acquisition application, the second end of the off-chip temperature control resistor 50 needs to be connected to the ground terminal of the chip, which is equivalent to naturally constructing a path from the reference voltage pin IO1 to the ground terminal of the chip. Therefore, the voltage at the pin IO2 to be detected will be affected by the off-chip temperature control resistor 50, and the resistance of the off-chip temperature control resistor 50 will change with the ambient temperature, resulting in the voltage at the pin IO2 to be detected not only being affected by leakage, but also by ambient temperature, so that it is impossible to determine whether the pin IO2 to be detected has leakage by detecting the voltage at the pin IO2 to be detected. In order to solve the problem of leakage detection of chip pins, the prior art either adds an additional set of resistor voltage divider circuits and chip pins, and determines whether the pin IO2 to be detected has leakage by detecting the voltage of another set of chip pins and the voltage of the pin IO2 to be detected, but this will result in doubling of the resistor voltage divider circuit and chip pins outside the chip, thereby doubling the manufacturing cost. Alternatively, the existing resistor voltage divider circuit and chip pins used for temperature detection may be used to perform leakage detection on the pin IO2 to be detected, but this may result in that the N chip pins can only collect temperatures at N / 2 positions.
[0113] Since the second end of the off-chip temperature control resistor 50 is connected to the common pin IO3, and the common switch SW is arranged between the common pin IO3 and the ground terminal of the chip, when detecting whether the pin IO2 to be detected is leaking, the common switch SW is turned off, cutting off the path from the reference voltage pin IO1 to the ground terminal, thereby avoiding the off-chip temperature control resistor 50 from affecting the leakage detection of the pin IO2 to be detected. After the common switch SW is disconnected, the leakage detection method and principle of the pin IO2 to be detected are the same as those in the previous embodiment, and are not described in detail here.
[0114] As a specific implementation, the off-chip temperature control resistor 50 is specifically an NTC resistor.
[0115] Please refer to Figure 5 As a specific implementation, the voltage detection subunit 21 includes a window comparator; the first input end of the window comparator is connected to the second end of the second reference voltage switch SVREF2, the second input end of the window comparator is connected to the second end of the detection switch SO, and the window comparator is provided with a first threshold;
[0116] When detecting whether there is leakage at the pin IO2 to be detected, the window comparator determines whether the voltage difference between the reference voltage VREF inputted at the first input terminal and the first voltage V1 inputted at the second input terminal exceeds the first threshold value; if it exceeds the first threshold value, the window comparator outputs a first level signal; if it does not exceed the first threshold value, the window comparator outputs a second level signal;
[0117] The leakage judgment subunit 22 is used to judge whether there is leakage on the pin IO2 to be detected according to the received level signal; if the leakage judgment subunit 22 receives the first level signal, it judges that there is leakage on the pin IO2 to be detected; if the leakage judgment subunit 22 receives the second level signal, it judges that there is no leakage on the pin IO2 to be detected;.
[0118] Specifically, if the first input terminal is the in-phase input terminal of the window comparator, and the second input terminal is the inverting input terminal of the window comparator, the leakage judgment subunit 22 judges that the pin IO2 to be detected has leakage according to the high level received, and judges that the pin IO2 to be detected does not have leakage according to the low level received; If the first input terminal is the inverting input terminal of the window comparator, and the second input terminal is the in-phase input terminal of the window comparator, the leakage judgment subunit 22 judges that the pin IO2 to be detected has leakage according to the low level received, and judges that the pin IO2 to be detected does not have leakage according to the high level received;.
[0119] It should be added that the structure of the window comparator is a conventional technical means in this field, and its specific structure is not explained here. The common pin IO3 can refer to the existing GPIO pin, so that it is impossible to set additional pins for the chip. The first threshold can be set between 10mV-30mV. Of course, the specific size of the first threshold can be set according to demand, and the range of the first threshold can also be adjusted according to actual needs, which is not limited here.
[0120] As a specific implementation, the leakage judgment subunit 22 includes at least an MCU. Of course, in addition to the MCU, the leakage judgment subunit 22 may also include a CPU, a digital comparator, an analog comparator, etc., which may be selected according to the needs and are not limited here.
[0121] As a specific implementation, the off-chip resistive unit 40 includes a single resistor. The off-chip resistive unit 40 may also include a resistor network formed by connecting a plurality of resistors in series and parallel. Any device with a fixed resistance falls within the protection range of the off-chip resistive unit 40.
[0122] In summary, the detection system provided by the embodiment of the present invention, on the one hand, when detecting whether there is leakage in the pin to be detected, the switch control unit controls the first reference voltage switch, the second reference voltage switch and the detection switch to be turned on, and the leakage detection unit realizes leakage detection of the pin to be detected; on the other hand, when the chip is working normally, the switch control unit controls the first reference voltage switch, the second reference voltage switch and the detection switch to be turned off, so as to avoid the reference voltage unit and the leakage detection unit from affecting the normal operation of the pin to be detected. Based on the above two aspects, the detection system of the present application realizes chip pin leakage detection in different fields.
[0123] Furthermore, in the application field of collecting the temperature outside the chip, a common pin and a common switch connecting the common pin and the chip ground are additionally provided on the chip. When detecting whether there is leakage on the pin to be detected, the switch control unit controls the first reference voltage switch, the second reference voltage switch and the detection switch to be turned on, and controls the common switch to be turned off, so as to avoid the influence of the off-chip temperature control resistor on the leakage detection of the pin to be detected. Compared with the redundant detection method in the field of temperature acquisition in the prior art, the detection system of the present application can effectively avoid the influence of the off-chip temperature control resistor, thereby realizing simple, efficient and low-cost leakage detection of the pin to be detected.
[0124] The technical solution of the present invention also provides a system control method based on the detection system.
[0125] in, Figure 6 The process of the system control method provided by the technical solution of the present invention is Figure 1 .
[0126] Please refer to Figure 2 and Figure 6 The specific steps of the system control method provided by the technical solution of the present invention are as follows:
[0127] S11: Determine whether leakage detection is required for the pin to be detected. If yes, jump to S12; if no, jump to S14.
[0128] S12: The switch control unit controls the first reference voltage switch, the second reference voltage switch, and the detection switch to be turned on.
[0129] S13: The leakage detection unit detects the input voltage signal and determines whether there is leakage in the pin to be detected according to the detection result;.
[0130] S14: The switch control unit controls the first reference voltage switch, the second reference voltage switch, and the detection switch to be turned off.
[0131] The technical solution of the present invention further provides a system control method based on the detection system, wherein the normal operation of the detection system is used to collect the temperature outside the chip, and additionally includes: a common switch integrated in the chip, wherein the first end of the common switch is connected to the common pin on the chip, and the second end of the common switch is connected to the ground terminal of the chip; an off-chip temperature-controlled resistor, wherein the off-chip temperature-controlled resistor is arranged outside the chip, the first end of the off-chip temperature-controlled resistor is connected to the second end of the off-chip resistive unit, and the second end of the off-chip temperature-controlled resistor is connected to the common pin.
[0132] in, Figure 7 The process of the system control method provided by the technical solution of the present invention is Figure 2 .
[0133] Please refer to Figure 4 and Figure 7 The specific steps of the system control method provided by the technical solution of the present invention are as follows:
[0134] S21: Determine whether leakage detection is required for the pin to be detected. If yes, jump to S22; if no, jump to S26.
[0135] S22: The switch control unit controls the first reference voltage switch, the second reference voltage switch, and the detection switch to be turned on, and controls the common switch to be turned off.
[0136] S23: The analog-to-digital converter converts the reference voltage on the reference voltage pin into the first digital signal, and converts the first voltage on the pin to be detected into the second digital signal.
[0137] S24: the leakage judging subunit judges that there is no leakage in the pin to be detected according to the absolute value of the difference between the first digital signal and the second digital signal being less than the first threshold value;.
[0138] S25: The leakage judging subunit further judges that leakage exists in the pin to be detected according to that the absolute value of the difference between the first digital signal and the second digital signal is greater than the first threshold value;.
[0139] S26: The switch control unit controls the detection switch and the second reference voltage switch to be turned off, and controls the first reference voltage switch and the common switch to be turned on.
[0140] S27: The analog-to-digital converter converts the second voltage on the pin to be detected into a third digital signal and outputs the third digital signal.
[0141] S28: The leakage determination subunit detects the temperature outside the chip according to the third digital signal.
[0142] Although the present invention is disclosed as above, the present invention is not limited thereto. Any person skilled in the art can make various changes and modifications without departing from the spirit and scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the scope defined by the claims.
Claims
1. A detection system for detecting whether there is leakage on the pin to be detected on the chip. It is characterized in that The system comprises: a reference voltage unit, a first reference voltage switch, a second reference voltage switch, a detection switch, a leakage detection unit, a switch control unit and an off-chip resistive unit; wherein: The output end of the reference voltage unit is connected to the first end of the first reference voltage switch, the second end of the first reference voltage switch is connected to the reference voltage pin on the chip, and the reference voltage unit is used to output a reference voltage; The reference voltage pin is connected to the first end of the second reference voltage switch, the pin to be detected is connected to the first end of the detection switch, and the second end of the second reference voltage switch and the second end of the detection switch are both connected to the input end of the leakage detection unit; An off-chip resistive unit, wherein a first end of the off-chip resistive unit is connected to the reference voltage pin, and a second end of the off-chip resistive unit is connected to the pin to be detected; The switch control unit is used to control the first reference voltage switch, the second reference voltage switch and the detection switch to be turned on when detecting whether there is leakage at the pin to be detected, and the switch control unit is also used to control the first reference voltage switch, the second reference voltage switch and the detection switch to be turned off when the chip is working normally; The leakage detection unit is used to detect the input voltage signal, and judge that there is no leakage in the pin to be detected according to the absolute value of the difference between the input voltage signals being less than the first threshold, and judge that there is leakage in the pin to be detected according to the absolute value of the difference between the input voltage signals being greater than the first threshold; The reference voltage unit, the first reference voltage switch, the second reference voltage switch, the detection switch, the leakage detection unit, and the switch control unit are integrated in the chip; and the off-chip resistive unit is arranged outside the chip.
2. The detection system according to claim 1, It is characterized in that The leakage detection unit includes a voltage detection subunit and a leakage judgment subunit; The input end of the voltage detection subunit is used as the input end of the leakage detection unit, and the voltage detection subunit is used to convert the input voltage signal into a corresponding judgment signal and output it; The leakage judging subunit is used to judge whether there is leakage in the pin to be detected according to the input judgment signal.
3. The detection system according to claim 2, It is characterized in that The voltage detection subunit comprises an analog-to-digital converter, and the second end of the second reference voltage switch and the second end of the detection switch are both connected to an input end of the analog-to-digital converter; When detecting whether there is leakage at the pin to be detected, the analog-to-digital converter converts the reference voltage at the reference voltage pin into a first digital signal and outputs the signal, and the analog-to-digital converter also converts the first voltage at the pin to be detected into a second digital signal and outputs the signal; The leakage judgment subunit is used to judge that the pin to be detected is leaking according to the absolute value of the difference between the first digital signal and the second digital signal being greater than the first threshold, and is also used to judge that the pin to be detected is not leaking according to the absolute value of the difference between the first digital signal and the second digital signal being less than the first threshold.
4. The detection system according to claim 3 is also used to collect the temperature outside the chip. It is characterized in that Also includes: A common switch integrated in the chip, wherein a first end of the common switch is connected to a common pin on the chip, and a second end of the common switch is connected to a ground terminal of the chip; An off-chip temperature-controlled resistor, wherein the off-chip temperature-controlled resistor is arranged outside the chip, a first end of the off-chip temperature-controlled resistor is connected to a second end of the off-chip resistive unit, and a second end of the off-chip temperature-controlled resistor is connected to the common pin; The switch control unit is used to control the detection switch and the second reference voltage switch to be turned off, and control the first reference voltage switch and the common switch to be turned on when collecting the temperature outside the chip; the analog-to-digital converter is used to convert the second voltage on the pin to be detected into a third digital signal and output it, and the leakage judgment subunit is used to detect the temperature outside the chip according to the third digital signal; The switch control unit is further used to control the first reference voltage switch, the second reference voltage switch and the detection switch to be turned on, and control the common switch to be turned off when detecting whether the pin to be detected has leakage; The analog-to-digital converter converts the reference voltage on the reference voltage pin into the first digital signal, and converts the first voltage on the pin to be detected into the second digital signal; the leakage judgment subunit is used to judge that the pin to be detected is leaking according to the absolute value of the difference between the first digital signal and the second digital signal being greater than the first threshold, and is also used to judge that the pin to be detected is not leaking according to the absolute value of the difference between the first digital signal and the second digital signal being less than the first threshold.
5. The detection system according to claim 4, It is characterized in that The leakage judgment subunit is further used to judge that the leakage current flows into the chip from the pin to be detected based on the first digital signal being greater than the second digital signal; the leakage judgment subunit is further used to judge that the leakage current flows out of the chip from the pin to be detected based on the first digital signal being less than the second digital signal.
6. The detection system according to claim 2, It is characterized in that The voltage detection subunit comprises a window comparator; a first input end of the window comparator is connected to the second end of the second reference voltage switch, a second input end of the window comparator is connected to the second end of the detection switch, and the window comparator is provided with a first threshold; When detecting whether there is leakage at the pin to be detected, the window comparator determines whether a voltage difference between a reference voltage input at the first input terminal and a first voltage input at the second input terminal exceeds the first threshold; If the first threshold is exceeded, the window comparator outputs a first level signal; if the first threshold is not exceeded, the window comparator outputs a second level signal; The leakage judging subunit is used to judge whether there is leakage in the pin to be detected according to the received level signal; If the leakage judging subunit receives the first level signal, it is judged that the pin to be detected has leakage; If the leakage determination subunit receives the second level signal, it determines that there is no leakage on the pin to be detected.
7. The detection system according to any one of claims 2 to 6, It is characterized in that The leakage judgment subunit includes at least one of an MCU, a CPU, a digital comparator and an analog comparator.
8. The detection system according to claim 1, It is characterized in that The off-chip resistive unit includes a single resistor.
9. The detection system according to claim 1, It is characterized in that The off-chip resistive unit includes a resistor network formed by connecting a plurality of resistors in series and in parallel.
10. A system control method based on the detection system according to claim 1, It is characterized in that The method includes: When detecting whether the pin to be detected has leakage: The switch control unit controls the first reference voltage switch, the second reference voltage switch and the detection switch to be turned on; The leakage detection unit detects the input voltage signal, and if the absolute value of the difference between the input voltage signals is less than a first threshold, it is determined that there is no leakage in the pin to be detected; if the absolute value of the difference between the input voltage signals is greater than the first threshold, it is determined that there is leakage in the pin to be detected; When the chip is working properly: The switch control unit controls the first reference voltage switch, the second reference voltage switch, and the detection switch to be turned off.
11. A system control method based on the detection system according to claim 4, It is characterized in that The method includes: When detecting whether the pin to be detected has leakage: The switch control unit controls the first reference voltage switch, the second reference voltage switch and the detection switch to be turned on, and controls the common switch to be turned off; The analog-to-digital converter converts the reference voltage on the reference voltage pin into the first digital signal, and converts the first voltage on the pin to be detected into the second digital signal; The leakage judging subunit judges that there is no leakage in the pin to be detected according to that the absolute value of the difference between the first digital signal and the second digital signal is less than the first threshold; The leakage judging subunit further judges that leakage exists in the pin to be detected according to that the absolute value of the difference between the first digital signal and the second digital signal is greater than the first threshold value; When collecting the temperature outside the chip: The switch control unit controls the detection switch and the second reference voltage switch to be turned off, and controls the first reference voltage switch and the common switch to be turned on; The analog-to-digital converter converts the second voltage on the pin to be detected into a third digital signal and outputs the third digital signal; The leakage determination subunit detects the temperature outside the chip according to the third digital signal.
12. An electronic device, It is characterized in that A detection system comprising any one of claims 1 to 9.
