Circuit and device for positive and negative connection of JTAG interface
By introducing signal judgment, latch and power supply control circuits into the JTAG interface, the forward and reverse connection functions of the JTAG interface are realized, solving the problem of reverse connection burnout and unifying the interface standards, ensuring device safety and interface consistency.
Patent Information
- Application Number
- CN202110773351.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-07-08
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2041-07-08
AI Technical Summary
The JTAG interface currently only supports forward connection and does not support reverse connection. As a result, reverse connection may burn out the device during debugging. Moreover, the interface standards of each chip are different, making it difficult to achieve unified interfaces.
A JTAG interface forward and reverse connection circuit including a signal judgment circuit, a latch, a signal switching circuit and a power supply circuit is designed. By judging signals, controlling signal switching and power supply methods, the forward and reverse connection of the JTAG interface is realized.
It effectively avoids the problem of burning expensive components when the JTAG interface is connected, and implements a unified standard for the interface to ensure the normal operation of the JTAG interface in both forward and reverse connections.
Smart Images

Figure CN113690871B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of circuits, and in particular relates to a circuit and a device for forward and reverse connection of a JTAG interface. Background Art
[0002] Currently, the JTAG interface only supports forward connection, not reverse connection. The JTAG interface can only be prevented from reverse connection by the connector's built-in anti-mock function, to avoid the problem of the JTAG interface being connected in reverse and burning the device during debugging. All chips with the JTAG protocol do not have a fixed interface standard, and the interface of each chip is different, making it difficult to achieve interface unification. Summary of the invention
[0003] The present invention aims to solve one of the technical problems in the related art at least to a certain extent. To this end, one object of the present invention is to provide a circuit and device for supporting forward and reverse connection of a JTAG interface.
[0004] In order to solve the above technical problems, the embodiments of the present invention provide the following technical solutions:
[0005] A JTAG interface forward and reverse connection circuit, comprising:
[0006] A signal judgment circuit, wherein the signal judgment circuit is used to output a judgment signal;
[0007] A latch, wherein an input end of the latch receives the judgment signal, and an output end of the latch outputs a control signal;
[0008] A signal switching circuit, wherein the signal switching circuit receives the control signal and controls the JTAG interface to be connected forward or reversely according to the level state of the control signal;
[0009] A power supply circuit receives the control signal, and the power supply circuit is used to supply power to the JTAG interface in a forward direction or a reverse direction according to the control signal.
[0010] Optionally, the signal switching circuit includes:
[0011] A first switch, a JTAG interface, and a second switch;
[0012] The JTAG interface is connected to the first switch and the second switch respectively;
[0013] The first switch is used to control the on / off of the forward connection of the JTAG interface according to the control signal, and the second switch is used to control the on / off of the reverse connection of the JTAG interface according to the control signal.
[0014] Optionally, the signal determination circuit includes:
[0015] The first triode and the second triode;
[0016] The emitter of the first transistor is connected to the first output terminal of the JTAG interface, and the collector and base of the first transistor are both connected to the second output terminal of the JTAG interface;
[0017] The base of the second triode is connected to the second output terminal, the collector of the second triode is connected to the first backup power supply, and the emitter of the second triode is grounded;
[0018] The collector of the second transistor outputs a judgment signal.
[0019] Optionally, the first output terminal outputs JTAG_DIR_J10_N, the first output terminal outputs JTAG_DIR_J2_N, and the signal judgment circuit obtains the judgment signal according to the potential difference between JTAG_DIR_J10_N and JTAG_DIR_J2_N.
[0020] Optionally, when the potential difference between the JTAG_DIR_J10_N and the JTAG_DIR_J2_N is 0, the determination signal is a positive connection signal;
[0021] When the potential difference between the JTAG_DIR_J10_N and the JTAG_DIR_J2_N is not 0, the determination signal is a reverse connection signal.
[0022] Optionally, the power supply circuit includes an enabling circuit, a forward power supply circuit and a reverse power supply circuit;
[0023] The enabling circuit is connected to the forward power supply circuit and the reverse power supply circuit respectively.
[0024] Optionally, the enabling circuit includes a first MOS transistor and a second MOS transistor, and the first MOS transistor and the second MOS transistor are connected;
[0025] The gate of the first MOS receives the control signal, and the control signal controls the enabling circuit to output an enabling signal.
[0026] Optionally, when the enable signal is at a low level, the enable signal turns on the forward power supply circuit, and the forward power supply circuit supplies power to the JTAG interface.
[0027] Optionally, when the enable signal is at a high level, the enable signal turns on the reverse power supply circuit, and the reverse power supply circuit supplies power to the JTAG interface.
[0028] An embodiment of the present invention further provides a device for forward and reverse connection of a JTAG interface, comprising the circuit as described above.
[0029] The embodiments of the present invention have the following technical effects:
[0030] The above technical solution of the present invention can realize the forward and reverse connection of the JTAG interface by setting a signal judgment circuit, a latch, a signal switching circuit and a power supply circuit, and effectively avoids the problem of burning valuable components when the JTAG interface is connected in reverse.
[0031] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 is a schematic diagram of the circuit structure of a latch provided by an embodiment of the present invention;
[0033] Figure 2 is a schematic diagram of the structure of a signal switching circuit provided by an embodiment of the present invention;
[0034] Figure 3 is a schematic diagram of the structure of a signal judgment circuit provided by an embodiment of the present invention;
[0035] Figure 4 It is a schematic diagram of the principle of obtaining a judgment signal provided by an embodiment of the present invention;
[0036] Figure 5 is a schematic diagram of the structure of an enabling circuit of a power supply circuit provided in an embodiment of the present invention;
[0037] Figure 6 It is a schematic diagram of the structure of a forward power supply circuit of a JTAG interface provided by an embodiment of the present invention;
[0038] Figure 7 It is a schematic diagram of the reverse power supply circuit structure of the JTAG interface provided by an embodiment of the present invention;
[0039] Figure 8 This is a power-on timing diagram of the power supply provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0040] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present invention, and should not be construed as limiting the present invention.
[0041] The present invention mentions that JTAG (Joint Test Action Group) is an international standard test protocol.
[0042] The standard JTAG interface has 4 lines: TMS, TCK, TDI, and TDO, which are mode selection, clock, data input, and data output lines respectively.
[0043] An embodiment of the present invention provides a JTAG interface forward and reverse connection circuit, including:
[0044] A signal judgment circuit, wherein the signal judgment circuit is used to output a judgment signal;
[0045] Specifically, the judgment signal is JTAG_JUDGE;
[0046] A latch, wherein an input end of the latch receives the judgment signal, and an output end of the latch outputs a control signal;
[0047] Specifically, the control signal is JTAG_JUDGE_AFTER;
[0048] like Figure 1 As shown, latch U1 is a D-type latch 74CBTLV3126PW, and the output signal of the D-type latch latches the state of the input signal at the previous moment until it is cleared. In this embodiment of the present invention, JTAG_JUDGE_AFTER latches the level state of JTAG_JUDGE input at the previous moment until it is cleared.
[0049] The power supply of U1 is P5V_AUX. The latch bit 1LE of U1 is connected to PGD_P3V3_STBY through the inverted PGD_P3V3_STBY_N of the latch MOS tube. It is used to realize the time Tstable from the stabilization of P3V3_AUX to the power-on of P3V3_STBY when the JTAG interface is inserted and the burning is not started:
[0050] When the JTAG interface is connected in the forward direction, the level of JTAG_JUDGE=JTAG_JUDGE_AFTER is always kept at 0. When the JTAG interface is connected in the reverse direction, the level of JTAG_JUDGE=JTAG_JUDGE_AFTER is always kept at 1. After the P3V3_STBY power supply is powered on and stabilized, the level of PGD_P3V3_STBY_N is 0, triggering U1 to latch the level state of the forward and reverse connection state JTAG_JUDGE_AFTER, which is used to prevent the level change of JTAG_DIR_J2_N and JTAG_DIR_J10_N during the JTAG interface programming process from causing signal path switching errors and causing programming failures.
[0051] The clear bit of U1 is connected to P3V3_AUX, which is used to wait for the JTAG programming to be completed, and then clear the state of the latch at the previous moment when the power is cut off and the line is unplugged.
[0052] The enable bit OE of U1 is always connected to GND to ensure that U1 is always in the enabled state.
[0053] Among them, Tstable is the time from P12V_AUX, P3V3_AUX stabilizing to P3V3_STBY powering on, and Tstable>0S.
[0054] A signal switching circuit, wherein the signal switching circuit receives the control signal and controls the JTAG interface to be connected forward or reversely according to the level state of the control signal;
[0055] A power supply circuit receives the control signal, and the power supply circuit is used to supply power to the JTAG interface in a forward direction or a reverse direction according to the control signal.
[0056] Specifically, the JTAG interface itself does not support hot plugging. The device is powered off, the JTAG interface is connected to the programmer, and then powered on for programming. During this period, the signal judgment circuit quickly determines whether the JTAG interface is connected forward or reverse. Through the forward and reverse connection of the JTAG interface, the signal switching circuit switches the JTAG signal path to the corresponding TCK, TDI, TMS, TDO and the corresponding GND. At the same time, U1 latches the forward and reverse connection level state, and the JTAG interface forward and reverse power supply circuit switches the JTAG power supply to the forward power supply P3V3_P or the reverse power supply P3V3_N. All states will not be cleared until the JTAG programming action is completed and the power is turned off.
[0057] This embodiment of the present invention can realize positive and negative connection of the JTAG interface by setting a signal judgment circuit, a latch, a signal switching circuit and a power supply circuit, effectively avoiding the problem of burning valuable components when the JTAG interface is connected in reverse.
[0058] like Figure 2 As shown, in an optional embodiment of the present invention, the signal switching circuit includes:
[0059] A first switch, a JTAG interface, and a second switch;
[0060] The JTAG interface is connected to the first switch and the second switch respectively;
[0061] The first switch is used to control the on / off of the forward connection of the JTAG interface according to the control signal, and the second switch is used to control the on / off of the reverse connection of the JTAG interface according to the control signal.
[0062] Specifically, the first switch and the second switch are both 4-bit 1-to-2-way high-speed switches SN74CBTLV3257PWR (a 4-bit 1-to-2-way high-speed switch supporting a frequency of up to 200HMZ), the power supply of the switch is P3V3_STBY, the enable signal OE is pulled low, and the first switch and the second switch are always in the enabled state. As long as P3V3_STBY is powered on, the selection signals of the first pin of the first switch and the second pin of the second switch open the corresponding JTAG signal path through the control signal JTAG_JUDGE_AFTER;
[0063] Among them, when the JTAG interface is connected forwardly, the level of S is 0, A=B1, and when the JTAG interface is connected reversely, the level of S is 1, A=B2.
[0064] The following table shows the signals of each pin and the corresponding burner signal when the JTAG interface is connected forward and reverse
[0065] Table 1 JTAG interface positive and negative interface signals
[0066] Pinout Signal Positive and negative connection corresponds to the signal of the programmer 1 TCK Positive: TCK, negative: GND 2 JTAG_DIR_J2_N Positive: GND, negative: TDI 3 TDO Positive: TDO, negative: NC 4 P3V3_P Positive: VCC, negative: NC 5 TMS Positive: TMS, negative: NC 6 NA Positive: NC, negative: TMS 7 P3V3_N Positive: NC, negative: VCC 8 NA Positive: NC, negative: TDO 9 TDI Positive: TDI, negative: GND 10 JTAG_DIR_J10_N Positive: GND, negative: TCK
[0067] This embodiment of the present invention sets the correspondence between each pin and each pin of the corresponding programmer when the JTAG interface is connected forwardly or reversely, so that the signal path can be opened when the JTAG interface is connected forwardly or reversely, thereby realizing the normal operation of the programmer.
[0068] like Figure 3 and Figure 4 As shown, in an optional embodiment of the present invention, the signal determination circuit includes:
[0069] The first triode and the second triode;
[0070] The emitter of the first transistor is connected to the first output terminal of the JTAG interface, and the collector and base of the first transistor are both connected to the second output terminal of the JTAG interface;
[0071] The base of the second triode is connected to the second output terminal, the collector of the second triode is connected to the first backup power supply, and the emitter of the second triode is grounded;
[0072] The collector of the second transistor outputs a judgment signal.
[0073] Specifically, Figure 3 As shown, the first and second NPN transistors detect the potential difference between JTAG_DIR_J2_N and JTAG_DIR_J10_N to determine the positive and negative of the JTAG interface; Figure 4As shown, the power supply of the signal judgment circuit is P3V3_AUX, the external pull-down resistor R1 is at JTAG_DIR_J2_N, and the external pull-up resistor R2 is at JTAG_DIR_J10_N.
[0074] Among them, when the JTAG interface is connected correctly, combined with Table 1, the two JTAG signals JTAG_DIR_J2_N and JTAG_DIR_J10_N received by the burner correspond to GND, then the electrical properties of the pins corresponding to the two signals of the burner are consistent, JTAG_DIR_J2_N and JTAG_DIR_J10_N are short-circuited, the potential difference is 0V, the first transistor is cut off, and the second transistor is turned on.
[0075] JTAG_DIR_J2_N is connected to the collector and base of the first transistor, JTAG_DIR_J10_N is connected to the emitter of Q5, U(first transistor.BE)=U.JTAG_DIR_J2_N-U.JTAG_DIR_J10_N=0V, the first transistor is cut off, U(first transistor.B) of the first transistor=U(first transistor.E)=P3V3_AUX*(R2 / R1+R2)=3.3*(10 / 11)=3V, where the resistance of R2 is 10 times that of R1.
[0076] R4 and R5 form a voltage divider circuit, and the second transistor's U(second transistor.B)=U(second transistor.B)*(R5 / R4+R5)=3*(1 / 2)=1.5V, where R4 and R5 have the same resistance value, U(second transistor.BE)=U(second transistor.B)-0=1.5V>0.6V, the second transistor is turned on, and the level of JTAG_JUDGE is 0.
[0077] When the JTAG interface is reversed, combined with Table 1, the two JTAG signals JTAG_DIR_J2_N and JTAG_DIR_J10_N received by the JTAG programmer correspond to TDI and TCK. When reversed, the electrical properties of these two PIN pins are inconsistent, the circuit is open, and the potential difference is not 0V, then the first transistor is turned on, and the second transistor is turned off. JTAG_DIR_J2_N is pulled up to 3.3V by the external resistor R1, and JTAG_DIR_J10_N is pulled down to 0V by the external resistor R2. U (first transistor.BE) = U.JTAG_DIR_J2_N-U.JTAG_DIR_J10_N = 3.3V-0V = 3.3V>0.6V, the first transistor is turned on, and U (first transistor.B) is clamped at 0.6V. R4 and R5 form a voltage divider circuit. The second transistor's U(second transistor.B)=U(second transistor.B)*(R5 / R4+R5)=0.6*(1 / 2)=0.3V, U(first transistor.BE)=U(first transistor.B)-0=0.3V<0.6V. For the second transistor, the level of JTAG_JUDGE is 1.
[0078] In this embodiment of the present invention, the first transistor and the second transistor detect the potential difference between JTAG_DIR_J2_N and JTAG_DIR_J10_N to determine the positive and negative of the JTAG interface, and then obtain a determination signal.
[0079] In an optional embodiment of the present invention, the first output terminal outputs JTAG_DIR_J10_N, the first output terminal outputs JTAG_DIR_J2_N, and the signal judgment circuit obtains the judgment signal according to the potential difference between JTAG_DIR_J10_N and JTAG_DIR_J2_N.
[0080] In this embodiment of the present invention, JTAG_DIR_J10_N and JTAG_DIR_J2_N are used as detection signals, and other pins continue to be used as working signals, thereby achieving the working state of the working signal being controlled according to the detection signal.
[0081] In an optional embodiment of the present invention, when the potential difference between the JTAG_DIR_J10_N and the JTAG_DIR_J2_N is 0, the determination signal is a positive connection signal;
[0082] When the potential difference between the JTAG_DIR_J10_N and the JTAG_DIR_J2_N is not 0, the determination signal is a reverse connection signal.
[0083] This embodiment of the present invention determines whether the JTAG interface is in a forward connection state or a reverse connection state according to the potential difference between JTAG_DIR_J10_N and JTAG_DIR_J2_N, and then outputs a judgment signal to U1 to latch the level state of the judgment signal.
[0084] In an optional embodiment of the present invention, the power supply circuit includes an enabling circuit, a forward power supply circuit and a reverse power supply circuit;
[0085] The enabling circuit is connected to the forward power supply circuit and the reverse power supply circuit respectively.
[0086] In this embodiment of the present invention, in order to ensure that the JTAG interface can work normally regardless of whether it is connected forward or reversely and no abnormal power failure occurs, a forward power supply circuit and a reverse power supply circuit are provided, and the working states of the forward power supply circuit and the reverse power supply circuit are controlled by an enabling circuit.
[0087] like Figure 5 As shown, in an optional embodiment of the present invention, the enabling circuit includes a first MOS transistor and a second MOS transistor, and the first MOS transistor and the second MOS transistor are connected;
[0088] The gate of the first MOS receives the control signal, and the control signal controls the enabling circuit to output an enabling signal.
[0089] like Figure 5 and Figure 6 As shown, specifically, the enabling circuit uses two power N-type MOS tubes, including a first MOS tube and a second MOS tube to switch the forward and reverse power supply circuits. When connected forward, the JTAG_JUDGE_AFTER level is 0, the first MOS tube is cut off, the JTAG_JUDGE_AFTER_N level is 1, the second MOS tube is turned on, the FM_N1_P3V3_EN_RC (enable signal) level is 0, the third MOS tube is turned on, the fourth MOS tube is cut off, P3V3_P = P3V3_STBY = 3.3V, P3V3_N = 0V;
[0090] like Figure 5 and Figure 7 As shown, conversely, when the JTAG interface is reversed, the JTAG_JUDGE_AFTER level is 1, the first MOS tube is turned on, the JTAG_JUDGE_AFTER_N level is 0, the second MOS tube is cut off, the FM_N1_P3V3_EN_RC level is 1, the third MOS tube is cut off, the fourth MOS tube is turned on, P3V3_P=0V, P3V3_N=P3V3_STBY=3.3V.
[0091] In this embodiment of the present invention, the first MOS tube and the second MOS tube are provided to control the level state of the enable signal, thereby switching the power supply circuit to forward or reverse through the enable signal.
[0092] In an optional embodiment of the present invention, when the enable signal is at a low level, the enable signal turns on the forward power supply circuit, and the forward power supply circuit supplies power to the JTAG interface.
[0093] In this embodiment of the present invention, the time for enabling the signal to switch the power supply circuit does not exceed 10 ms, which is fast and efficient, and avoids damage to the device.
[0094] In an optional embodiment of the present invention, when the enable signal is at a high level, the enable signal turns on the reverse power supply circuit, and the reverse power supply circuit supplies power to the JTAG interface.
[0095] like Figure 8 As shown, specifically, the power supplies of the signal switching circuit, the signal judgment circuit, U1 and the power supply circuit are P12V_AUX, P5V_AUX, P3V3_AUX and P3V3_STBY respectively. The above four power supplies have certain timing requirements. P12V_AUX, P5V_AUX and P3V3_AUX must be started before P3V3_STBY to ensure that the JTAG interface positive and negative signal judgment module can correctly judge the positive and negative signal status and latch the positive and negative status through U1.
[0096] An embodiment of the present invention further provides a device for forward and reverse connection of a JTAG interface, comprising the circuit as described above.
[0097] In addition, other structures and functions of the circuits in the embodiments of the present invention are known to those skilled in the art and are not described herein in detail to reduce redundancy.
[0098] It should be noted that the logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection portion with one or more wirings (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.
[0099] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0100] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0101] In the description of the present invention, it is to be understood that the terms “center”, “longitudinal”, “lateral”, “length”, “width”, “thickness”, “up”, “down”, “front”, “back”, “left”, “right”, “vertical”, “horizontal”, “top”, “bottom”, “inside”, “outside”, “clockwise”, “counterclockwise”, “axial”, “radial”, “circumferential”, etc., indicating orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as limiting the present invention.
[0102] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of the present invention, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0103] In the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements, unless otherwise clearly defined. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0104] In the present invention, unless otherwise clearly specified and limited, a first feature being "above" or "below" a second feature may mean that the first and second features are in direct contact, or the first and second features are in indirect contact through an intermediate medium. Moreover, a first feature being "above", "above" or "above" a second feature may mean that the first feature is directly above or obliquely above the second feature, or simply means that the first feature is higher in level than the second feature. A first feature being "below", "below" or "below" a second feature may mean that the first feature is directly below or obliquely below the second feature, or simply means that the first feature is lower in level than the second feature.
[0105] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.
Claims
1. A JTAG interface forward and reverse connection circuit, characterized in that: include: A signal judgment circuit, wherein the signal judgment circuit is used to output a judgment signal; A latch, wherein an input end of the latch receives the judgment signal, and an output end of the latch outputs a control signal; A signal switching circuit, wherein the signal switching circuit receives the control signal and controls the JTAG interface to be connected forward or reversely according to the level state of the control signal; A power supply circuit, the power supply circuit receiving the control signal, the power supply circuit being used to supply power to the JTAG interface in a forward or reverse direction according to the control signal; Wherein, the signal judgment circuit comprises: A first triode and a second triode; The emitter of the first transistor is connected to the first output terminal of the JTAG interface, and the collector and base of the first transistor are both connected to the second output terminal of the JTAG interface; The base of the second triode is connected to the second output terminal, the collector of the second triode is connected to the first backup power supply, and the emitter of the second triode is grounded; The collector of the second transistor outputs a judgment signal; The first output terminal outputs JTAG_DIR_J10_N, the second output terminal outputs JTAG_DIR_J2_N, and the signal judgment circuit obtains the judgment signal according to the potential difference between JTAG_DIR_J10_N and JTAG_DIR_J2_N.
2. The circuit according to claim 1, characterized in that The signal switching circuit comprises: A first switch, a JTAG interface, and a second switch; The JTAG interface is connected to the first switch and the second switch respectively; The first switch is used to control the on / off of the forward connection of the JTAG interface according to the control signal, and the second switch is used to control the on / off of the reverse connection of the JTAG interface according to the control signal.
3. The circuit according to claim 1, characterized in that When the potential difference between JTAG_DIR_J10_N and JTAG_DIR_J2_N is 0, the judgment signal is a positive connection signal; When the potential difference between the JTAG_DIR_J10_N and the JTAG_DIR_J2_N is not 0, the determination signal is a reverse connection signal.
4. The circuit according to claim 3, characterized in that The power supply circuit includes an enabling circuit, a forward power supply circuit and a reverse power supply circuit; The enabling circuit is connected to the forward power supply circuit and the reverse power supply circuit respectively.
5. The circuit according to claim 4, characterized in that The enabling circuit includes a first MOS transistor and a second MOS transistor, and the first MOS transistor and the second MOS transistor are connected; The gate of the first MOS receives the control signal, and the control signal controls the enabling circuit to output an enabling signal.
6. The circuit according to claim 5, characterized in that When the enable signal is at a low level, the enable signal turns on the forward power supply circuit, and the forward power supply circuit supplies power to the JTAG interface.
7. The circuit according to claim 6, characterized in that When the enable signal is at a high level, the enable signal turns on the reverse power supply circuit, and the reverse power supply circuit supplies power to the JTAG interface.
8. A device for forward and reverse connection of a JTAG interface, characterized in that: Comprising a circuit as claimed in any one of claims 1 to 7.
Citation Information
Patent Citations
Transformer protection method and protection device with exciting inrush current restrain and switch parameter detection
CN102403694A
Mainboard
CN104932998A
Debugging interface device and a server with the same
CN109614333A
Program burning device system and method
CN114282475A
Protection circuit for preventing unauthorized access to the memory device of a processor
US20020166034A1
