Protocol chip debugging circuit and method, protocol chip and debugging system
By using pull-down modules in the protocol chip to detect the configuration interface status, the debugging mode switching of the chip is solved, and the high cost and error rate problems caused by the additional debugging chip are solved, which reduces the debugging complexity and cost, and reduces the additional interface overhead .
Patent Information
- Application Number
- CN202411133917.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-19
- Publication Date
- 2024-11-12
AI Technical Summary
In the prior art, debugging the debugging chip with the help of an additional debugging chip leads to high cost, complexity and error rate of debugging work, and increases the area and cost of the chip.
Design a debugging circuit for a protocol chip, use the pull-down module to detect the status of the configuration interface, enter debug mode or normal working mode through the charging communication interface, without the need to use additional debugging chips, which reduces the cost and complexity of debugging work and reduces the Error rate.
Through pull-down module detection, the debug mode switch of the chip to be debugged is realized, which reduces the cost and complexity of debugging work, avoids errors caused by accident, and reuses the charging communication interface for debugging, avoids the use of additional communication interfaces, and further reduces debugging cost.
Smart Images

Figure CN118937977A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of integrated circuit design, and in particular to a debugging circuit and method for a protocol chip, a protocol chip and a debugging system. Background Art
[0002] During the chip testing phase, the chip needs to be debugged. In the prior art, a debugging chip is usually used to debug the chip to be debugged.
[0003] However, using an additional debugging chip not only increases the cost and complexity of debugging, but also may cause the chip to be debugged to be falsely triggered due to communication errors between the debugging chip and the chip to be debugged, that is, responding to normal information as debugging information, thereby causing the chip to be debugged to enter an incorrect working state. In addition, the debugging chip and the chip to be debugged need to use an additional communication interface to communicate in order to implement the debugging function, which increases the chip area and cost. Summary of the invention
[0004] The present invention provides a debugging circuit and method for a protocol chip, a protocol chip and a debugging system, which solve the problem that debugging a chip to be debugged is performed with the help of a debugging chip, resulting in high cost, complexity and error rate of the debugging work.
[0005] In order to achieve the above object, the present invention adopts the following technical scheme: In a first aspect, the present invention provides a debugging circuit for a protocol chip, comprising: A charging communication interface, connected to a terminal; A logic module connected to the charging communication interface; A debugging detection module is connected to the configuration interface and the logic module of the protocol chip, and is used to send a first signal to the logic module when detecting that the configuration interface is externally connected to the pull-down module; The logic module is used to enter the debugging mode after receiving the first signal, receive the debugging instruction information sent by the terminal through the charging communication interface, and perform corresponding debugging operations according to the debugging instruction information.
[0006] In a possible implementation, the debugging detection module is further configured to send a second signal to the logic module when detecting that the configuration interface is not externally connected to the pull-down module; The logic module is also used to enter a normal working mode after receiving the second signal, and interact with the terminal for charging protocol information through the charging communication interface.
[0007] In a possible implementation, the debugging detection module includes two detection modules, and the configuration interface includes two CC ports; The input end of each detection module is connected to a CC port of the configuration interface, and the output end is connected to the input end of the logic module.
[0008] In a possible implementation, the detection module includes a current source and a collection unit; A current source is connected to a CC port; The acquisition unit is connected to a CC port and an input end of the logic module, and is used to send a first signal to the logic module when it is detected that the CC port is externally connected to a pull-down module, and send a second signal to the logic module when it is detected that the CC port is not externally connected to a pull-down module.
[0009] In a possible implementation, the acquisition unit includes a comparator or an analog to digital converter (ADC).
[0010] In a possible implementation, the logic module includes: a slave unit, a charging communication unit, a logic gate, and a multiplexer; The input end of the logic gate is connected to the output end of the debugging detection module, and the output end of the logic gate is connected to the selection end of the multiplexer, and is used to send a first selection signal to the multiplexer when two first signals are received, and is also used to send a second selection signal to the multiplexer when two first signals are not received; A slave unit is connected to the first input terminal and the second input terminal of the multiplexer; A charging communication unit connected to the third input terminal and the fourth input terminal of the multiplexer; The output end of the multiplexer is connected to the charging communication interface, and is used to select the slave unit to enter the debugging mode when receiving the first selection signal, receive the debugging instruction information sent by the terminal through the charging communication interface, and perform corresponding debugging operations according to the debugging instruction information; it is also used to select the charging communication unit to enter the normal working mode when receiving the second selection signal, and interact with the terminal through the charging communication interface for charging protocol information.
[0011] In one possible implementation, the logic gate includes an AND gate; The two input ends of the AND gate are respectively connected to the two output ends of the debugging detection module, and the output end is connected to the selection end of the multiplexer.
[0012] In a second aspect, the present invention provides a debugging method for a protocol chip, which is applied to a debugging circuit of a protocol chip according to the first aspect and any possible implementation thereof. The debugging method may include: The debugging detection module sends a first signal to the logic module when detecting that the configuration interface of the protocol chip is externally connected to the pull-down module; The logic module enters the debugging mode after receiving the first signal, receives the debugging instruction information sent by the terminal through the charging communication interface of the protocol chip, and performs corresponding debugging operations according to the debugging instruction information.
[0013] In a possible implementation, the debugging detection module sends a second signal to the logic module when detecting that the configuration interface is not externally connected to the pull-down module; The logic module enters a normal working mode after receiving the second signal, and interacts with the terminal for charging protocol information through the charging communication interface.
[0014] In a third aspect, the present invention provides a protocol chip, which may include a debugging circuit of the protocol chip of the first aspect and any possible implementation thereof.
[0015] In a fourth aspect, the present invention provides a debugging system for a protocol chip, which may include: a terminal, a pull-down module, and the protocol chip of the third aspect.
[0016] Among them, the protocol chip is connected to the terminal through a charging communication interface, and the configuration interface of the protocol chip can be externally connected to a pull-down module.
[0017] The debugging circuit of the protocol chip provided by the present invention can be such that the debugging detection module can send a first signal to the logic module when it is detected that the configuration interface of the protocol chip is externally connected to a pull-down module. After receiving the first signal, the logic module enters the debugging mode, receives the debugging instruction information sent by the terminal through the charging communication interface, and performs corresponding debugging operations according to the debugging instruction information. In this way, by utilizing the pull-down module, the chip to be debugged enters the debugging mode without the need for an additional debugging chip, thereby reducing the cost and complexity of the debugging work and the error rate of the debugging work. Moreover, the protocol chip to be debugged multiplexes the charging communication interface of the protocol chip to communicate with the terminal to realize the debugging function, without the need for an additional communication interface, further reducing the debugging cost. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 A schematic diagram of the structure of a debugging system for a protocol chip provided by the prior art; Figure 2 A schematic diagram of the structure of a debugging system for a protocol chip provided by an embodiment of the present invention; Figure 3 A circuit principle block diagram of a debugging circuit of a protocol chip provided by an embodiment of the present invention; Figure 4 A circuit schematic diagram of a debugging circuit of a protocol chip provided by an embodiment of the present invention; Figure 5A circuit schematic diagram of another debugging circuit of a protocol chip provided by an embodiment of the present invention; Figure 6 The present invention provides a flowchart of a debugging method for a protocol chip according to an embodiment of the present invention. DETAILED DESCRIPTION
[0019] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0020] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present disclosure, unless otherwise specified, "multiple" means two or more. In addition, the use of "based on" or "according to" means openness and inclusiveness, because the process, steps, calculations or other actions "based on" or "according to" one or more of the conditions or values may be based on additional conditions or values beyond the described values in practice.
[0021] Figure 1 The schematic diagram of the structure of a debugging system of a protocol chip provided by the prior art. Figure 1 As shown, the debugging system of the protocol chip includes a terminal 11, a debugging chip 12 and a chip to be debugged 13. Among them, the terminal 11 can be a host computer.
[0022] The terminal 11 is connected to the debugging chip 12. The debugging chip 12 and the chip to be debugged 13 use an additional communication interface, are connected through a CC signal line, and transmit debugging information, so that the terminal 11 can debug the chip to be debugged 13 with the help of the debugging chip 12. The additional communication interface can be an interface such as Uart, I2C, etc.
[0023] When debugging, the terminal 11 sends debugging instruction information to the debugging chip 12, and the debugging chip 12 uses an additional communication interface to send the debugging instruction information to the chip to be debugged 13 through the CC signal line. After receiving the debugging instruction information sent by the debugging chip 12, the chip to be debugged 13 sends a response message to the terminal 11 through the debugging chip 12, and performs corresponding debugging operations according to the debugging instruction information.
[0024] However, using an additional debugging chip not only increases the cost and complexity of debugging, but also may cause the chip to be debugged to be falsely triggered due to communication errors between the debugging chip and the chip to be debugged, that is, responding to normal information as debugging information, thereby causing the chip to be debugged to enter an incorrect working state. In addition, the debugging chip and the chip to be debugged need to use an additional communication interface to communicate in order to implement the debugging function, which increases the chip area and cost.
[0025] In actual applications, the debugging chip 12 and the chip to be debugged 13 encrypt and decrypt the interactive information according to the agreed encryption and decryption method to distinguish the debugging mode from the normal working mode. However, encrypting and decrypting the information requires additional hardware and time expenditure, which increases the cost and complexity of the chip.
[0026] In order to solve the problem of high debugging cost, complexity and error rate when debugging a chip to be debugged with the help of a debugging chip, the embodiment of the present invention provides a debugging circuit, method, protocol chip and debugging system for a protocol chip, which does not require the use of an additional debugging chip, reduces the cost and complexity of debugging work, and reduces the error rate of debugging work. The protocol chip to be debugged uses the charging communication interface of the protocol chip to communicate with the terminal to realize the debugging function, without the need to use an additional communication interface, further reducing the debugging cost.
[0027] Figure 2 A schematic diagram of the structure of a debugging system for a protocol chip provided by an embodiment of the present invention is shown in FIG. Figure 2 As shown, the debugging system of the protocol chip may include: a terminal 21 , a protocol chip to be debugged 22 , and a pull-down module 23 .
[0028] The protocol chip 22 includes a charging port, which may include a configuration interface and a charging communication interface. The configuration interface is used to transmit configuration information. The charging communication interface is used to transmit data.
[0029] The terminal 21 is connected to the charging communication interface of the protocol chip 22, and the configuration interface of the protocol chip 22 can be externally connected to the pull-down module 23. When the configuration interface of the protocol chip 22 is externally connected to the pull-down module 23, the protocol chip 22 enters the debugging mode, otherwise, the protocol chip 22 enters the normal working mode.
[0030] In a possible implementation, the pull-down module 23 may include a pull-down resistor, or may include other devices capable of changing the pin voltage of the charging port of the protocol chip 22. The pull-down resistor may be a 5.1KΩ resistor.
[0031] In a possible implementation, the terminal 21 and the protocol chip 22 may be connected via a communication bus, such as an I2C bus. Of course, it may also be other buses for communication, which are not limited here. Figure 2 The connection via the I2C bus is taken as an example.
[0032] In a possible implementation, the protocol chip 22 may include one charging port or multiple charging ports. In practical applications, when the protocol chip 22 is integrated with multiple charging ports, a pull-down module 23 may be externally connected to any one of the multiple charging ports to implement debugging of the protocol chip 22, which can save the cost of debugging. In other words, when the debugging circuit of the protocol chip 22 detects that the configuration interface of a certain charging port is externally connected to a pull-down module 23, the protocol chip 22 can enter the debugging mode, otherwise, it enters the normal working mode.
[0033] In a possible implementation, the charging port of the protocol chip 22 may be a Type-C interface that supports a fast charging protocol, such as a power transmission protocol (USB Power Delivery, USB PD). When the charging port of the protocol chip 22 is a Type-C interface, the configuration interface included in the Type-C interface may include a group of CC ports, namely CC1 and CC2. The charging communication interface included in the Type-C interface may include a DP (Data Plus) interface and a DM (Data Minus) interface.
[0034] It can be understood that in a specific implementation, when the CC1 port and CC2 port of the configuration interface of the Type-C interface are both externally connected to the pull-down module 23, the protocol chip 22 enters the debugging mode, otherwise, the protocol chip 22 enters the normal working mode. Figure 2 In the example, the protocol chip 22 includes a Type-C interface, and the configuration interface CC1 port of the Type-C interface is connected to the pull-down resistor R1, and the CC2 port is connected to the pull-down resistor R2.
[0035] Figure 3 The circuit principle block diagram of a debugging circuit of a protocol chip provided by an embodiment of the present invention. Figure 3 As shown, the debugging circuit of the protocol chip may include: a charging communication interface 31 in the charging port of the protocol chip, a logic module 32 and a debugging detection module 33.
[0036] Among them, the charging communication interface 31 is connected to the terminal. The logic module 32 is connected to the charging communication interface 31. The debugging detection module 33 is connected to the configuration interface in the charging port of the protocol chip and the logic module 32, and is used to send a first signal to the logic module 32 when detecting that the configuration interface is externally connected to the pull-down module. The logic module 32 is used to enter the debugging mode after receiving the first signal, and receive the debugging instruction information sent by the terminal through the charging communication interface 31, and perform corresponding debugging operations according to the debugging instruction information.
[0037] It is understandable that the above debugging operation refers to the read and write operation or the burning operation of the protocol chip.
[0038] In addition, for the specific description of the connection between the charging communication interface 31 and the terminal, and the specific description of the charging port of the protocol chip, reference may be made to the relevant description in the aforementioned embodiments, which will not be repeated here.
[0039] In this way, by using the pull-down module, the chip to be debugged enters the debugging mode without the need for an additional debugging chip, which reduces the cost and complexity of the debugging work and reduces the error rate of the debugging work. In addition, the protocol chip to be debugged reuses the charging communication interface of the protocol chip to communicate with the terminal to realize the debugging function, without the need for an additional communication interface, which further reduces the debugging cost.
[0040] Optionally, in an embodiment of the present invention, the debugging detection module 33 is further used to send a second signal to the logic module 32 when it is detected that the configuration interface is not externally connected to the pull-down module. The logic module 32 is also used to enter the normal working mode after receiving the second signal, and interact with the terminal through the charging communication interface 31 to perform charging protocol information. Exemplarily, the charging protocol information may be fast charging protocol information. For example, the fast charging protocol information may be USB PD information.
[0041] From the above, it can be seen that when the protocol chip to be debugged enters the debugging mode and the normal working mode, the charging communication interface is used to receive information, and no additional communication interface is required to implement the debugging function, which reduces the debugging cost. In other words, when the charging port of the protocol chip is a Type-C interface, when the protocol chip enters the debugging mode, the debugging function is implemented by multiplexing the DP and DM interfaces, which reduces the debugging cost.
[0042] Optional, Figure 4 A circuit schematic diagram of a debugging circuit of a protocol chip provided by an embodiment of the present invention. Figure 3 ,like Figure 4 As shown, the above-mentioned debugging detection module 33 may include two detection modules 331, and the above-mentioned configuration interface may include two CC ports.
[0043] The input end of each detection module 331 is connected to a CC port of the configuration interface, and the output end is connected to the input end of the logic module 32 .
[0044] In a possible implementation, the first signal output by the detection module 331 to the logic module 32 may be a high level or a low level.
[0045] Optionally, in the embodiment of the present invention, the circuit structures of the two detection modules 331 are the same, and the embodiment of the present invention takes one as an example for detailed description. The detection module 331 may include a current source and a collection unit.
[0046] The current source is connected to a CC port, and is used to supply power to the pull-down module when the CC port is externally connected to a pull-down resistor. The acquisition unit is connected to a CC port in the configuration interface and an input terminal of the logic module 32, and is used to send a first signal to the logic module 32 when it is detected that the CC port is externally connected to a pull-down module, and send a second signal to the logic module 32 when it is detected that the CC port is not externally connected to a pull-down module.
[0047] In a specific implementation, one end of the pull-down resistor is grounded and the other end is connected to the CC port. When the acquisition unit detects that the voltage of the CC port connected to it is the voltage across the pull-down resistor (equal to the current value of the current source multiplied by the resistance value of the pull-down resistor), it determines that the CC port is externally connected to a pull-down resistor.
[0048] Optionally, in an embodiment of the present invention, the acquisition unit may include a comparator, or may include an ADC.
[0049] Optional, Figure 5 A circuit schematic diagram of another debugging circuit of a protocol chip provided by an embodiment of the present invention. Figure 4 ,like Figure 5 As shown, the logic module 32 may include: a slave unit 321 , a charging communication unit 322 , a logic gate 323 and a multiplexer 324 .
[0050] The input end of the logic gate 323 is connected to the output end of the debugging detection module 33, and the output end of the logic gate 323 is connected to the selection end of the multiplexer 324, and is used to send a first selection signal to the multiplexer 324 when two first signals are received, and is also used to send a second selection signal to the multiplexer 324 when two first signals are not received.
[0051] The slave unit 321 is connected to the first input terminal and the second input terminal of the multiplexer 324 .
[0052] The charging communication unit 322 is connected to the third input terminal and the fourth input terminal of the multiplexer 324 .
[0053] The output end of the multiplexer 324 is connected to the charging communication interface 31, and is used to select the slave unit 321 to enter the debugging mode when receiving the first selection signal, receive the debugging instruction information sent by the terminal through the charging communication interface 31, and perform the corresponding debugging operation according to the debugging instruction information. The multiplexer 324 is also used to select the charging communication unit 322 to enter the normal working mode when receiving the second selection signal, and exchange the charging protocol information with the terminal through the charging communication interface 31.
[0054] In a possible implementation, the first selection signal may be a high level or a low level. The first selection signal is used to indicate that both CC ports in the configuration interface of the protocol chip are externally connected to a pull-down module. The second selection signal is used to indicate that both CC ports in the configuration interface of the protocol chip are not externally connected to a pull-down module, or to indicate that one of the two CC ports is externally connected to a pull-down module and the other is not externally connected to a pull-down module.
[0055] In a specific implementation, the first selection signal is usually set to a high level, and the second selection signal is usually set to a low level.
[0056] When the first signal output by the detection module 331 is at a high level, the logic gate 323 may include an AND gate. The two input ends of the AND gate are respectively connected to the two output ends of the two detection modules 331, and the output end is connected to the selection end of the multiplexer 324. The first selection signal output by the AND gate is at a high level.
[0057] When the first signal output by the detection module 331 is at a low level, the logic gate 323 may include two NOT gates and an AND gate. The input end of each NOT gate is connected to the output end of the detection module 331, the output end of each NOT gate is connected to the input end of the AND gate, and the output end of the AND gate is connected to the selection end of the multiplexer 324. The first selection signal output by the AND gate is at a high level.
[0058] Of course, the first selection signal can also be set to a low level and the second selection signal to a high level. In a specific implementation, when the first signal output by the detection module 331 is a high level, the logic gate 323 may include two NOT gates and an OR gate. The input end of each NOT gate is connected to the output end of the detection module 331, the output end of each NOT gate is connected to the input end of the OR gate, and the output end of the OR gate is connected to the selection end of the multiplexer 324. The first selection signal output by the OR gate is a low level, indicating that the protocol chip needs to enter the debug mode. When the two detection modules 331 detect that the two configuration interfaces are not externally connected to the pull-down resistor, the second signal is output as a low level respectively. After two NOT gates and an OR gate, the second selection signal is output at a high level, indicating that the normal working mode needs to be entered. When the two detection modules 331 detect that one configuration interface is externally connected to the pull-down resistor and the other configuration interface is not externally connected to the pull-down resistor, the first signal is output at a high level and the second signal is output at a low level respectively. After two NOT gates and an OR gate, the second selection signal is output as a high level, indicating that the normal working mode needs to be entered.
[0059] Figure 5 The pull-down module includes a pull-down resistor, the configuration interface includes two CC ports, and the logic gate 323 includes an AND gate. Also, it is assumed that the current source in the detection module 331 is 180 microamperes and the pull-down resistor is 5.1 KΩ.
[0060] refer to Figure 5 The circuit principle of the debugging circuit of the protocol chip is: when the two acquisition units in the two detection modules 331 detect that the pin voltages of the CC ports connected thereto are both 0.9V, it indicates that both CC ports are externally connected to pull-down resistors and need to enter the debugging mode. Then, the two acquisition units output the first signal high level to the two input ends of the AND gate respectively. The AND gate outputs the first selection signal high level to the multiplexer. The multiplexer can then select the slave unit to enter the debugging mode, and the slave unit can reuse the charging communication interface, that is, the DP and DM interfaces as the SDA and SCL interfaces of the I2C bus, receive the debugging command information sent by the terminal, and transmit the response information to the terminal, and perform the corresponding debugging operation according to the debugging command information.
[0061] When the two acquisition units in the two detection modules 331 detect that the pin voltage of the CC port connected to it is not 0.9V, it indicates that the two CC ports are not externally connected to the pull-down resistor and need to enter the normal working mode. Then, the two acquisition units output the second signal low level to the two input ends of the AND gate respectively. The AND gate outputs the second selection signal to the multiplexer as a low level. Alternatively, when one acquisition unit in the two detection modules 331 detects that the pin voltage of the CC port connected to it is 0.9V, and the other acquisition unit detects that the pin voltage of the CC port connected to it is not 0.9V, it indicates that one of the two CC ports is externally connected to a pull-down resistor and the other is not externally connected to a pull-down resistor, and needs to enter the normal working mode. Then, the two acquisition units output the first signal low level and the second signal high level to the two input ends of the AND gate respectively. The AND gate outputs the second selection signal as a low level to the multiplexer. After receiving the second selection signal low level, the multiplexer can select the charging communication unit to enter the normal working mode. The charging communication unit can use the charging communication interface, i.e., the DP and DM interfaces, to interact with the terminal for charging protocol information.
[0062] In this way, the debugging mode and the normal working mode of the protocol chip to be debugged can be switched by using two pull-down resistors without the help of an additional debugging chip, thus avoiding false triggering of the chip to be debugged due to losses or errors in the communication process between the debugging chip and the chip to be debugged, thereby reducing the cost, complexity and error rate of the debugging work.
[0063] In an embodiment of the present invention, after the protocol chip to be debugged enters the debugging mode, the charging communication interface, that is, the DP and DM interfaces can be reused as the SDA and SCL interfaces of the I2C bus to receive the debugging instruction information sent by the terminal. No additional communication interface is required, which reduces additional interface overhead and communication overhead, and reduces the cost of debugging work.
[0064] In the embodiment of the present invention, the protocol chip can enter the debugging mode through two pull-down resistors, without the need to encrypt or decrypt information, thereby reducing additional hardware and time expenses and lowering the cost of debugging work.
[0065] The embodiment of the present invention further provides a protocol chip, which may include: Figure 3-Figure 5 The debugging circuit of any protocol chip in the system.
[0066] The embodiment of the present invention also provides a debugging method for a protocol chip, which is applied to the above Figure 3-Figure 5 The debugging circuit of any protocol chip, Figure 6 The flowchart of a debugging method of a protocol chip provided by an embodiment of the present invention is as follows. Figure 6 As shown, the debugging method may include the following steps 601-602.
[0067] 601. A debugging detection module sends a first signal to a logic module when detecting that a configuration interface of a protocol chip is externally connected to a pull-down module.
[0068] 602. After receiving the first signal, the logic module enters a debugging mode, receives debugging instruction information sent by the terminal through the charging communication interface of the protocol chip, and performs corresponding debugging operations according to the debugging instruction information.
[0069] In this way, by using the pull-down module, the chip to be debugged enters the debugging mode without the need for an additional debugging chip, which reduces the cost and complexity of the debugging work and reduces the error rate of the debugging work. In addition, the protocol chip to be debugged reuses the charging communication interface of the protocol chip to communicate with the terminal to realize the debugging function, without the need for an additional communication interface, which further reduces the debugging cost.
[0070] Optionally, the debugging method of the protocol chip provided by the embodiment of the present invention may further include the following steps: The debugging detection module sends a second signal to the logic module when detecting that the configuration interface is not externally connected to the pull-down module.
[0071] The logic module enters a normal working mode after receiving the second signal, and interacts with the terminal for charging protocol information through the charging communication interface.
[0072] In this way, when the protocol chip to be debugged enters the debugging mode and the normal working mode, the charging communication interface is used to receive information, and no additional communication interface is required to implement the debugging function, thereby reducing the debugging cost.
[0073] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A debugging circuit for a protocol chip, characterized in that: include: A charging communication interface, connected to a terminal; A logic module connected to the charging communication interface; A debugging detection module, connected to the configuration interface of the protocol chip and the logic module, and configured to send a first signal to the logic module when detecting that the configuration interface is externally connected to a pull-down module; The logic module is used to enter the debugging mode after receiving the first signal, receive the debugging instruction information sent by the terminal through the charging communication interface, and perform corresponding debugging operations according to the debugging instruction information.
2. The debugging circuit of the protocol chip according to claim 1, characterized in that: The debugging detection module is further configured to send a second signal to the logic module when detecting that the configuration interface is not externally connected to the pull-down module; The logic module is further configured to enter a normal working mode after receiving the second signal, and to interact with the terminal for charging protocol information through the charging communication interface.
3. The debugging circuit of the protocol chip according to claim 2, characterized in that: The debugging detection module includes two detection modules, and the configuration interface includes two CC ports; The input end of each detection module is connected to a CC port of the configuration interface, and the output end is connected to the input end of the logic module.
4. The debugging circuit of the protocol chip according to claim 3, characterized in that: The detection module includes a current source and a collection unit; The current source is connected to a CC port; The acquisition unit is connected to a CC port and an input end of the logic module, and is used to send the first signal to the logic module when it is detected that the CC port is externally connected to the pull-down module, and send the second signal to the logic module when it is detected that the CC port is not externally connected to the pull-down module.
5. The debugging circuit of the protocol chip according to claim 4, characterized in that: The acquisition unit includes a comparator or an analog-to-digital converter ADC.
6. The debugging circuit of the protocol chip according to any one of claims 2 to 5, characterized in that: The logic module includes: a slave unit, a charging communication unit, a logic gate and a multiplexer; The input end of the logic gate is connected to the output end of the debugging detection module, and the output end of the logic gate is connected to the selection end of the multiplexer, and is used to send a first selection signal to the multiplexer when two first signals are received, and is also used to send a second selection signal to the multiplexer when two first signals are not received; The slave unit is connected to the first input terminal and the second input terminal of the multiplexer; The charging communication unit is connected to the third input terminal and the fourth input terminal of the multiplexer; The output end of the multiplexer is connected to the charging communication interface, and is used to select the slave unit to enter the debugging mode when the first selection signal is received, receive the debugging instruction information sent by the terminal through the charging communication interface, and perform corresponding debugging operations according to the debugging instruction information; and is also used to select the charging communication unit to enter the normal working mode when the second selection signal is received, and interact the charging protocol information with the terminal through the charging communication interface.
7. The debugging circuit of the protocol chip according to claim 6, characterized in that: The logic gate comprises an AND gate; The two input ends of the AND gate are respectively connected to the two output ends of the debugging detection module, and the output end is connected to the selection end of the multiplexer.
8. A debugging method for a protocol chip, characterized in that: A debugging circuit applied to a protocol chip as claimed in any one of claims 1 to 7, comprising: The debugging detection module sends a first signal to the logic module when detecting that the configuration interface of the protocol chip is externally connected to a pull-down module; After receiving the first signal, the logic module enters a debugging mode, receives debugging instruction information sent by the terminal through the charging communication interface of the protocol chip, and performs corresponding debugging operations according to the debugging instruction information.
9. A protocol chip, characterized in that: The protocol chip comprises a debugging circuit of the protocol chip as described in any one of claims 1-7.
10. A debugging system for a protocol chip, characterized in that: The debugging system comprises: a terminal, a protocol chip as claimed in claim 9, and a pull-down module.
