CN115687205A - Debugging module, terminal equipment, debugging method and device - Google Patents

Debugging module, terminal equipment, debugging method and device Download PDF

Info

Publication number
CN115687205A
CN115687205A CN202110832996.2A CN202110832996A CN115687205A CN 115687205 A CN115687205 A CN 115687205A CN 202110832996 A CN202110832996 A CN 202110832996A CN 115687205 A CN115687205 A CN 115687205A
Authority
CN
China
Prior art keywords
log
port
serial port
pin
interface
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110832996.2A
Other languages
Chinese (zh)
Inventor
郑春厚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN202110832996.2A priority Critical patent/CN115687205A/en
Publication of CN115687205A publication Critical patent/CN115687205A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The disclosure relates to a debugging module, a terminal device, a debugging method and a debugging device, wherein the debugging module comprises: the first interface is used for being connected with a debugging host; the second interface is used for being connected with terminal equipment to be debugged and is provided with at least one log pin; the serial port chip is provided with at least one serial port and is connected with the second interface through a switch circuit, and the switch circuit is used for adjusting the corresponding connection relation between the at least one serial port and the at least one log pin.

Description

Debugging module, terminal equipment, debugging method and device
Technical Field
The disclosure relates to the technical field of terminal debugging, in particular to a debugging module, terminal equipment, a debugging method and a debugging device.
Background
Before the terminal equipment leaves a factory, the terminal equipment needs to be debugged to enable all aspects of performances to reach ideal states. When debugging, terminal equipment passes through the debugging module and is connected with the debugging host computer, then can carry out data communication and log interaction between terminal equipment and the debugging host computer, and then the debugging host computer can debug terminal equipment according to user's operation. However, in the related art, when the debugging module is connected with the terminal device through the interface, there is a certain direction limitation, which reduces the debugging efficiency and the debugging precision.
Disclosure of Invention
In order to overcome the problems in the related art, embodiments of the present disclosure provide a debugging module, a terminal device, a debugging method and a debugging device, which are used to solve the defects in the related art.
According to a first aspect of the embodiments of the present disclosure, there is provided a debugging module, including:
the first interface is used for being connected with a debugging host;
the second interface is used for being connected with terminal equipment to be debugged and is provided with at least one log pin;
the serial port chip is provided with at least one serial port, the debugging chip is connected with the second interface through a switch circuit, and the switch circuit is used for adjusting the corresponding connection relation between the at least one serial port and the at least one log pin.
In one embodiment, the serial port chip has a first serial port for connecting with a log receiving port RX of the terminal device to be debugged, and a second serial port for connecting with a log transmitting port TX of the terminal device to be debugged.
In one embodiment, the second interface has a first log pin and a second log pin;
when the second interface is connected with the terminal equipment to be debugged in a first connection state, the first log pin is connected with a third log pin of the terminal equipment to be debugged, and the second log pin is connected with a fourth log pin of the terminal equipment to be debugged; when the second interface is connected with the terminal equipment to be debugged in a second connection state, the first log pin is connected with a fourth log pin of the terminal equipment to be debugged, and the second log pin is connected with a third log pin of the terminal equipment to be debugged;
the third log pin is connected with the log receiving port, and the fourth log pin is connected with the log sending port.
In one embodiment, the switch circuit comprises a wire and at least one single-pole multi-throw switch, wherein the wire and the at least one single-pole multi-throw switch are arranged between the at least one log pin and the at least one serial port, and the at least one single-pole multi-throw switch is in one-to-one correspondence with the at least one log pin.
In one embodiment, the second interface further has at least one data pin for connecting with a data port of the terminal device to be debugged, and the data pin is connected with the first interface.
According to a second aspect of the embodiments of the present disclosure, a terminal device is provided, which includes at least one log port, where the at least one log port is used for connecting with at least one serial port of a debugging module;
each log port is connected with a resistor, wherein the resistor connected with each log port has different electrical parameters.
In one embodiment, the at least one log port comprises a log receiving port for connecting with a first serial port of the debugging module and a log sending port for connecting with a second serial port of the debugging module;
the terminal equipment further comprises a third log pin connected with the log receiving port and a fourth log pin connected with the log sending port.
According to a third aspect of the embodiments of the present disclosure, there is provided a debugging method applied to a debugging module, including:
acquiring electrical parameters of each serial port of a serial port chip of the debugging module, wherein the serial port is connected with a log port of a terminal device to be debugged through a second interface of the debugging module;
determining the parameter relationship of each serial port according to the electrical parameters of each serial port;
and adjusting the corresponding connection relation between at least one serial port of the serial port chip and at least one log pin of the second interface according to the parameter relation and the preset reference relation of each serial port, so that the parameter relation is consistent with the reference relation, wherein the reference relation is determined according to the electrical parameters of the resistor connected with each log port of the terminal equipment to be debugged.
According to a fourth aspect of the embodiments of the present disclosure, there is provided a debugging apparatus applied to a debugging module, including:
the acquisition module is used for acquiring the electrical parameters of each serial port of the serial port chip of the debugging module, wherein the serial port is connected with a log port of the terminal device to be debugged through a second interface of the debugging module;
the determining module is used for determining the parameter relationship of each serial port according to the electrical parameters of each serial port;
and the adjusting module is used for adjusting the corresponding connection relation between at least one serial port of the serial port chip and at least one log pin of the second interface according to the parameter relation and the preset reference relation of each serial port, so that the parameter relation is consistent with the reference relation, wherein the reference relation is determined according to the electrical parameters of the resistor connected with each log port of the terminal equipment to be debugged.
According to a fifth aspect of embodiments of the present disclosure, there is provided an electronic device, comprising a memory for storing computer instructions executable on a processor, and a processor for performing the debugging method according to the third aspect when the computer instructions are executed.
According to a sixth aspect of embodiments of the present disclosure, there is provided a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the method of the third aspect.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
this is disclosed through setting up the second interface that is used for the first interface of being connected with the debugging host computer and is used for being connected with terminal equipment, can realize debugging module to debugging host computer and terminal equipment's connection, and the serial ports chip can realize being connected of first interface and second interface, because the corresponding relation between the serial ports of serial ports chip and the log pin of second interface can be adjusted, consequently can remove the restriction of direction when second interface is connected with terminal equipment, increase the flexibility that second interface and terminal equipment are connected, the efficiency of connection is improved, and debugging efficiency and debugging precision.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
Fig. 1 is a schematic diagram of a connection structure of a terminal device, a debugging module, and a debugging host according to an exemplary embodiment of the present disclosure;
FIG. 2 is a flow chart illustrating a debugging method according to an exemplary embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of a debugging apparatus according to an exemplary embodiment of the present disclosure;
fig. 4 is a block diagram of a terminal device according to an exemplary embodiment of the present disclosure.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
The terminology used in the present disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. As used in this disclosure and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present disclosure. The word "if," as used herein, may be interpreted as "at … …" or "at … …" or "in response to a determination," depending on the context.
Before the terminal equipment leaves a factory, the terminal equipment needs to be debugged to enable all aspects of performance to reach an ideal state. When debugging, terminal equipment passes through the debugging module and is connected with the debugging host computer, then can carry out data communication and log interaction between terminal equipment and the debugging host computer, and then the debugging host computer can debug terminal equipment according to user's operation. However, in the related art, when the debugging module is connected to the terminal device through the interface, there is a certain direction limitation, which reduces the debugging efficiency and the debugging precision.
In a first aspect, referring to fig. 1, at least one embodiment of the present disclosure provides a debugging module 100, including: a first interface 101 for connecting with a debug host 200; the second interface 102 is used for connecting with a terminal device 300 to be debugged, and the second interface 102 is provided with at least one log pin; the serial port chip 103 is provided with at least one serial port, the serial port chip 103 is connected with the second interface 102 through a switch circuit, and the switch circuit is used for adjusting the corresponding connection relation between the at least one serial port and the at least one log pin.
The debugging module 100 may be in the form of a data line, one end of which is a first interface 101, the other end of which is a second interface 102, and the portion between the two ends may be a connection line and a serial port chip 103. The debugging host 200 is provided with an interface, and the interface of the debugging host 200 is matched with the form of the first interface 101, that is, the first interface 101 is connected with the interface of the debugging host 200 in a matching manner by insertion, for example, the interfaces of the first interface 101 and the debugging host 200 may be USB interfaces; the terminal device 300 to be debugged also has an interface, and the interface of the terminal device 300 is matched with the form of the second interface 102, that is, the second interface 102 is connected with the interface of the terminal device 300 in a matching manner by insertion, for example, the interfaces of the second interface 102 and the terminal device 300 may be typeC interfaces. The pins of the first interface 101 may be directly connected to the second interface 102 through a connection line, and the pins of the first interface 101 may also be connected to the second interface 102 through the serial chip 103 and the connection line, for example, the pins for data communication may be directly connected to the second interface 102 through the connection line, and the pins for log interaction may be connected to the second interface 102 through the serial chip 103 and the connection line.
The serial port chip 103 may convert a signal form of the first interface 101 into a signal form of the second interface 102, or convert a signal form of the second interface 102 into a signal form of the first interface 101, for example, convert a USB signal into a typeC signal, or convert a typeC signal into a USB signal. Each serial port is connected with one log pin, and the corresponding relation between the serial port and the log pin is not fixed but can be adjusted through a switch circuit.
This is disclosed through setting up the first interface 101 that is used for being connected with debugging host computer 200 and the second interface 102 that is used for being connected with terminal equipment 300, can realize debugging module 100 to debugging host computer 200 and terminal equipment 300's connection, and serial port chip 103 can realize being connected of first interface 101 and second interface 102, because the corresponding relation between serial ports of serial port chip 103 and the log pin of second interface 102 can be adjusted, consequently can remove the restriction of direction when second interface 102 is connected with terminal equipment 300, increase the flexibility that second interface 102 and terminal equipment 300 are connected, and improve connection efficiency, and debugging efficiency and debugging precision.
In some embodiments of the present disclosure, the serial port chip 103 has a first serial port 1031 for connecting with the log receiving port RX of the terminal device 300 to be debugged, and a second serial port 1032 for connecting with the log transmitting port TX of the terminal device 300 to be debugged.
The main board of the terminal device 300 to be debugged may have a plurality of ports, each port having different functions, including a log receiving port RX and a log sending port TX, where the log receiving port RX may obtain a log related instruction of the debug host 200 through a log interface connected to the log receiving port RX and the first serial port 1031, and the log sending port TX may send the log to the debug host 200 through the log interface connected to the log sending port TX and the second serial port 1032. It is understood that the terminal device 300 to be debugged has other ports, the log receiving port RX has other functions, and the log transmitting port TX has other functions.
Based on the serial port and the port, the second interface 102 is provided with a first log pin and a second log pin; when the second interface 102 is connected with the terminal device 300 to be debugged in a first connection state, the first log pin is connected with a third log pin of the terminal device 300 to be debugged, and the second log pin is connected with a fourth log pin of the terminal device 300 to be debugged; when the second interface 102 is connected to the terminal device 300 to be debugged in the second connection state, the first log pin is connected to a fourth log pin of the terminal device 300 to be debugged, and the second log pin is connected to a third log pin of the terminal device 300 to be debugged; the third log pin is connected with the log receiving port, and the fourth log pin is connected with the log sending port TX.
The first log pin may be a SUB1 pin, and the second log pin may be a SUB2 pin.
When the second interface 102 and the terminal device 300 are connected in the first connection state, the connection state may be a typeC interface being plugged, that is, the connection state shown in fig. 1; when the second interface 102 and the terminal device 300 are connected in the second connection state, the connection state may be a reverse insertion state of the typeC interface. In the first connection state and the second connection state, the corresponding connection relations between the log receiving port RX and the log sending port TX and the first log pin and the second log pin are different, and the corresponding connection relations between the log receiving port RX and the log sending port TX and the first serial port 1031 and the second serial port 1032 can be adjusted by adjusting the corresponding connection relations between the first log pin and the second log pin and the first serial port 1031 and the second serial port 1032, so that in the two connection states, the log receiving port RX is connected with the first serial port 1031, and the log sending port TX is connected with the second serial port 1032.
The typeC-USB debug module in the related art includes two parts, USB (Universal Serial Bus) and UART (Universal Asynchronous Receiver/Transmitter). The USB is used for data communication, and the UART is used for capturing logs of the terminal device 300 such as a mobile phone, and obtaining working state information. The TX port and the RX port of the UART are connected to the SBU pin on the typeC interface, and the TX port and the RX port need to be directional, so if the direction of the typeC-USB debug module inserted in the terminal device 300 is not correct, the log cannot be captured normally, the UART communication fails, and only the USB works normally. Since the typeC-USB debugging module supports positive and negative plugging, only the positive plugging state or the negative plugging state can capture the log for debugging during debugging, in other words, the other state is not capable of debugging, and the user cannot recognize the positive plugging state or the negative plugging state from the outside, so that the user can only try through plugging. This brings great inconvenience to the user, and the hardware design is unstable in the debugging process, so it is still necessary to distinguish whether the abnormal state is caused by a wrong insertion direction or a hardware problem during debugging, which increases the difficulty of debugging. By adopting the debugging module provided by the embodiment, the log receiving port RX can be automatically adjusted to be connected with the first serial port 1031 and the log sending port TX is connected with the second serial port 1032 under the condition of any inserting direction, so that the technical problems in the related art are overcome, and the debugging convenience, efficiency and precision are improved.
In some embodiments of the disclosure, the switch circuit includes a wire and at least one single-pole multi-throw switch disposed between the at least one log pin and the at least one serial port, wherein the at least one single-pole multi-throw switch is in one-to-one correspondence with the at least one log pin. For example, in the example shown in fig. 1, the first serial port 1031, the second serial port 1032 and the first log pin are respectively connected to three connection terminals of the first single-pole double-throw switch 104, the first serial port 1031 may be connected to the first log pin or the first serial port 1031 may be connected to the second log pin by a toggle switch, the first serial port 1031, the second serial port 1032 and the second log pin may be respectively connected to three connection terminals of the second single-pole double-throw switch 105, and the second serial port 1032 may be connected to the first log pin or the second serial port 1032 may be connected to the second log pin by a toggle switch.
In some embodiments of the present disclosure, the second interface 102 further has at least one data pin for connecting with a data port of the terminal device 300 to be debugged, and the data pin is connected with the first interface 101. For example, in the example shown in fig. 1, the data pins may be a DN pin and a DP pin in a typeC interface, and may be correspondingly connected to a DN port and a DP port of the terminal device 300, and the two pins are symmetrical, so there is no limitation and requirement on the insertion direction of the second interface 102. The data pin may form a USB portion of the debug module.
Referring to fig. 1, according to a second aspect of the embodiment of the present disclosure, a terminal device 300 is provided, which includes at least one log port, where the at least one log port is used for connecting with at least one serial port of a debugging module 100; each log port is connected with a resistor, wherein the resistor connected with each log port has different electrical parameters.
Wherein the at least one log port includes a log receiving port RX for connecting with the first serial port 1031 of the debugging module 100 and a log transmitting port TX for connecting with the second serial port 1032 of the debugging module 100; the terminal device 300 further includes a third log pin connected to the log receiving port, and a fourth log pin connected to the log transmitting port TX. When the second interface 102 is connected with the terminal device 300 to be debugged in a first connection state, the first log pin is connected with a third log pin of the terminal device 300 to be debugged, and the second log pin is connected with a fourth log pin of the terminal device 300 to be debugged; when the second interface 102 is connected to the terminal device 300 to be debugged in the second connection state, the first log pin is connected to the fourth log pin of the terminal device 300 to be debugged, and the second log pin is connected to the third log pin of the terminal device 300 to be debugged.
The log receiving port RX may be connected to the pull-down resistor R1, and the log transmitting port TX may be connected to the pull-up resistor R2, so that the level of the log receiving port RX is low, and the level of the log transmitting port TX is high.
The debugging module 100 may be the debugging module 100 described in the first aspect.
According to a third aspect of the embodiments of the present disclosure, a debugging method is provided, please refer to fig. 2, which illustrates a flow of the method, including steps S201 to S203.
The method may be applied to a debugging module, which may be the debugging module of the first aspect.
In step S201, an electrical parameter of each serial port of the serial port chip of the debugging module is obtained, where the serial port is connected to a log port of the terminal device to be debugged through the second interface of the debugging module.
And the electrical parameters of the serial port are consistent with the log port connected with the serial port through the second interface. The electrical parameter may be a level. For example, the debugging module in the embodiment of the first aspect includes a first serial port and a second serial port, the terminal device includes a log receiving port RX and a log sending port TX, when the first serial port is connected to the log receiving port RX and the second serial port is connected to the log sending port TX, the electrical parameter of the first serial port is the electrical parameter of the log receiving port RX, the electrical parameter of the second serial port is the electrical parameter of the log sending port TX, and the electrical parameters of the log receiving port RX and the log sending port TX are determined by the electrical parameters of the resistor connected thereto.
In step S202, a parameter relationship of each serial port is determined according to the electrical parameter of each serial port.
The parameter relationship of each serial port can be the level relationship between different serial ports. For example, in the debug module in the embodiment of the first aspect, when the first serial port is connected to the log receiving port RX and the second serial port is connected to the log sending port TX, the parameter relationship between the first serial port and the second serial port is the parameter relationship between the log receiving port RX and the log sending port TX, when the log receiving port RX may be connected to a pull-down resistor and the log sending port TX may be connected to a pull-up resistor, the level of the log receiving port RX is lower than the level of the log sending port TX, and further the level of the first serial port is lower than the level of the second serial port.
In step S203, according to the parameter relationship and a preset reference relationship of each serial port, adjusting a corresponding connection relationship between at least one serial port of the serial port chip and at least one log pin of the second interface to make the parameter relationship and the reference relationship consistent, where the reference relationship is determined according to an electrical parameter of a resistor connected to each log port of the terminal device to be debugged.
For example, the first serial port is used for connecting the log receiving port RX, the second serial port is used for connecting the log sending port TX, and the level of the log receiving port RX is lower than that of the log sending interface, so that the reference relationship is that the level of the first serial port is lower than that of the second serial port.
By adjusting the corresponding connection relationship between the serial port and the log pin, the corresponding connection relationship between the serial port and the log port can be changed, and further the parameter relationship between the serial ports can be changed. That is to say, after the second interface of the debugging module is connected with the interface of the terminal device, if the connection relationship between the serial port and the log port is correct, the connection relationship is kept unchanged, and if the connection relationship between the serial port and the log port is wrong, the connection relationship between the serial port and the log port can be adjusted to be correct.
According to a fourth aspect of the embodiments of the present disclosure, a debugging apparatus is provided, which is applied to a debugging module, and referring to fig. 3, a schematic structural diagram of the apparatus is shown, including:
an obtaining module 301, configured to obtain an electrical parameter of each serial port of a serial port chip of the debugging module, where the serial port is connected to a log port of a terminal device to be debugged through a second interface of the debugging module;
a determining module 302, configured to determine a parameter relationship of each serial port according to the electrical parameter of each serial port;
and the adjusting module 303 is configured to adjust a corresponding connection relationship between at least one serial port of the serial port chip and at least one log pin of the second interface according to the parameter relationship and a preset reference relationship of each serial port, so that the parameter relationship is consistent with the reference relationship, where the reference relationship is determined according to an electrical parameter of a resistor connected to each log port of the terminal device to be debugged.
With regard to the apparatus in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment of the first aspect related to the method, and will not be elaborated herein.
According to a fifth aspect of the disclosed embodiment, please refer to fig. 4, which schematically shows a block diagram of an electronic device. For example, the apparatus 400 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 4, the terminal device 400 may include one or more of the following components: processing components 402, memory 404, power components 406, multimedia components 408, audio components 410, input/output (I/O) interfaces 412, sensor components 414, and communication components 416.
The processing component 402 generally controls overall operation of the terminal device 400, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing element 402 may include one or more processors 420 to execute instructions to perform all or part of the steps of the methods described above. Further, the processing component 402 can include one or more modules that facilitate interaction between the processing component 402 and other components. For example, the processing component 402 can include a multimedia module to facilitate interaction between the multimedia component 408 and the processing component 402.
The memory 404 is configured to store various types of data to support operations at the device 400. Examples of such data include instructions for any application or method operating on the terminal device 400, contact data, phonebook data, messages, pictures, videos, and the like. The memory 404 may be implemented by any type or combination of volatile or non-volatile memory devices, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
Power components 406 provide power to the various components of terminal device 400. Power components 406 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for terminal device 400.
The multimedia component 408 comprises a screen providing an output interface between the terminal device 400 and the user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 408 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the terminal device 400 is in an operation mode, such as a photographing mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 410 is configured to output and/or input audio signals. For example, the audio component 410 includes a Microphone (MIC) configured to receive an external audio signal when the terminal apparatus 400 is in an operation mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 404 or transmitted via the communication component 416. In some embodiments, audio component 410 also includes a speaker for outputting audio signals.
The I/O interface 412 provides an interface between the processing component 402 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor component 414 includes one or more sensors for providing various aspects of status assessment for the terminal device 400. For example, the sensor component 414 can detect an open/closed state of the terminal device 400, the relative positioning of components, such as a display and keypad of the terminal device 400, the sensor component 414 can also detect a change in the position of the terminal device 400 or a component of the terminal device 400, the presence or absence of user contact with the terminal device 400, orientation or acceleration/deceleration of the terminal device 400, and a change in the temperature of the terminal device 400. The sensor assembly 414 may also include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 414 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 414 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 416 is configured to facilitate wired or wireless communication between the terminal device 400 and other devices. The terminal device 400 may access a wireless network based on a communication standard, such as WiFi,2G or 3g,4g or 5G or a combination thereof. In an exemplary embodiment, the communication component 416 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 416 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the terminal device 400 may be implemented by one or more Application Specific Integrated Circuits (ASICs), digital Signal Processors (DSPs), digital Signal Processing Devices (DSPDs), programmable Logic Devices (PLDs), field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for controlling the operation of the above-described coil mechanisms.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (11)

1. A debug module, comprising:
the first interface is used for being connected with a debugging host;
the second interface is used for being connected with terminal equipment to be debugged and is provided with at least one log pin;
the serial port chip is provided with at least one serial port and is connected with the second interface through a switch circuit, and the switch circuit is used for adjusting the corresponding connection relation between the at least one serial port and the at least one log pin.
2. The debugging module according to claim 1, wherein said serial port chip has a first serial port for connecting with a log receiving port of said terminal device to be debugged, and a second serial port for connecting with a log sending port of said terminal device to be debugged.
3. The debug module of claim 2, wherein the second interface has a first log pin and a second log pin;
when the second interface is connected with the terminal equipment to be debugged in a first connection state, the first log pin is connected with a third log pin of the terminal equipment to be debugged, and the second log pin is connected with a fourth log pin of the terminal equipment to be debugged; when the second interface is connected with the terminal equipment to be debugged in a second connection state, the first log pin is connected with a fourth log pin of the terminal equipment to be debugged, and the second log pin is connected with a third log pin of the terminal equipment to be debugged;
the third log pin is connected with the log receiving port, and the fourth log pin is connected with the log sending port.
4. The debug module of any one of claims 1 to 3, wherein the switch circuitry comprises a wire disposed between the at least one log pin and the at least one serial port and at least one single-pole-multiple-throw switch, wherein the at least one single-pole-multiple-throw switch is in one-to-one correspondence with the at least one log pin.
5. The debug module as claimed in claim 2, wherein said second interface further has at least one data pin for connecting to a data port of said terminal device to be debugged, said data pin being connected to said first interface.
6. The terminal equipment is characterized by comprising at least one log port, wherein the at least one log port is used for being connected with at least one serial port of a debugging module;
each log port is connected with a resistor, wherein the resistor connected with each log port has different electrical parameters.
7. The terminal device according to claim 6, wherein the at least one log port comprises a log receiving port for connecting with a first serial port of the debugging module and a log sending port for connecting with a second serial port of the debugging module;
the terminal equipment further comprises a third log pin connected with the log receiving port and a fourth log pin connected with the log sending port.
8. The debugging method is characterized by being applied to a debugging module and comprising the following steps:
acquiring electrical parameters of each serial port of a serial port chip of the debugging module, wherein the serial port is connected with a log port of the terminal device to be debugged through a second interface of the debugging module;
determining the parameter relationship of each serial port according to the electrical parameters of each serial port;
and adjusting the corresponding connection relation between at least one serial port of the serial port chip and at least one log pin of the second interface according to the parameter relation and the preset reference relation of each serial port, so that the parameter relation is consistent with the reference relation, wherein the reference relation is determined according to the electrical parameters of the resistor connected with each log port of the terminal equipment to be debugged.
9. The utility model provides a debugging device which characterized in that is applied to the debugging module, includes:
the acquisition module is used for acquiring the electrical parameters of each serial port of the serial port chip of the debugging module, wherein the serial port is connected with a log port of the terminal device to be debugged through a second interface of the debugging module;
the determining module is used for determining the parameter relationship of each serial port according to the electrical parameters of each serial port;
and the adjusting module is used for adjusting the corresponding connection relation between at least one serial port of the serial port chip and at least one log pin of the second interface according to the parameter relation and the preset reference relation of each serial port, so that the parameter relation is consistent with the reference relation, wherein the reference relation is determined according to the electrical parameters of the resistor connected with each log port of the terminal equipment to be debugged.
10. An electronic device, comprising a memory for storing computer instructions executable on a processor, a processor for performing the debugging method of claim 8 when the computer instructions are executed.
11. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the method of claim 8.
CN202110832996.2A 2021-07-22 2021-07-22 Debugging module, terminal equipment, debugging method and device Pending CN115687205A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110832996.2A CN115687205A (en) 2021-07-22 2021-07-22 Debugging module, terminal equipment, debugging method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110832996.2A CN115687205A (en) 2021-07-22 2021-07-22 Debugging module, terminal equipment, debugging method and device

Publications (1)

Publication Number Publication Date
CN115687205A true CN115687205A (en) 2023-02-03

Family

ID=85044778

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110832996.2A Pending CN115687205A (en) 2021-07-22 2021-07-22 Debugging module, terminal equipment, debugging method and device

Country Status (1)

Country Link
CN (1) CN115687205A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116401114A (en) * 2023-06-08 2023-07-07 北京华电众信技术股份有限公司 Mainboard debugging system, method and device, storage medium and computer equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116401114A (en) * 2023-06-08 2023-07-07 北京华电众信技术股份有限公司 Mainboard debugging system, method and device, storage medium and computer equipment
CN116401114B (en) * 2023-06-08 2024-06-07 北京华电众信技术股份有限公司 Mainboard debugging system, method and device, storage medium and computer equipment

Similar Documents

Publication Publication Date Title
CN109890021A (en) Bluetooth headset switching method, bluetooth headset and terminal
CN106445856B (en) Interface circuit, state switching method and device
CN104468971A (en) Method and device for connecting playing source
CN105224494A (en) Method for handover control and device
CN105472706A (en) Method and device for connection establishment
CN105376144A (en) Information processing method and device
CN107329520B (en) USB interface connection method, device and system of mobile terminal
CN104796875A (en) Call mode selection method and device
CN108011191B (en) Antenna, terminal, and method and device for controlling antenna
CN104881342A (en) Terminal testing method and device
CN112798988A (en) Detection circuit, detection method and device, and electronic device
CN115687205A (en) Debugging module, terminal equipment, debugging method and device
CN109586125B (en) Type-C adapter, terminal and electronic equipment
CN217932695U (en) Control device for working assembly and electronic equipment
CN105846223A (en) USB interface plug and USB interface plug control method and device
CN105183274A (en) Switching control method and device
CN106658674B (en) Mobile terminal and method for outputting conducted power
CN113692067B (en) Device connection method and device and readable storage medium
EP3188018B1 (en) Method and apparatus for setting waiting time duration
CN106598892B (en) Switching control method and device
CN105100135A (en) Network sharing setting method and device
EP3828716A1 (en) Method and apparatus for identifying electronic device, terminal device, and electronic device
CN108897553B (en) Chip programming tool, system, chip programming method and device
CN112821515A (en) Charging method, device and system
CN108092986B (en) Data transmission method and device of mobile terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination