WO2017166211A1 - 测试功能组件及数据调试方法 - Google Patents

测试功能组件及数据调试方法 Download PDF

Info

Publication number
WO2017166211A1
WO2017166211A1 PCT/CN2016/078151 CN2016078151W WO2017166211A1 WO 2017166211 A1 WO2017166211 A1 WO 2017166211A1 CN 2016078151 W CN2016078151 W CN 2016078151W WO 2017166211 A1 WO2017166211 A1 WO 2017166211A1
Authority
WO
WIPO (PCT)
Prior art keywords
pin
debug
configuration
mode
jtag
Prior art date
Application number
PCT/CN2016/078151
Other languages
English (en)
French (fr)
Inventor
张瑞荣
杜维
齐少敏
裴家俊
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to CN201680077024.4A priority Critical patent/CN108475227B/zh
Priority to PCT/CN2016/078151 priority patent/WO2017166211A1/zh
Publication of WO2017166211A1 publication Critical patent/WO2017166211A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/26Functional testing

Definitions

  • the present application relates to the field of communications, and in particular, to a test function component and a data debugging method.
  • debugging technology In the process of developing consumer electronics products, debugging technology is an indispensable means of analyzing and solving problems.
  • many debugging technologies are limited in product form (for example, compared with development boards, and physical debugging interfaces of commercial products are much less). They are inflexible to use and cannot be directly used in some scenarios, and need to be destroyed.
  • the following three debugging scenarios are limited to mobile phone products:
  • UART (English: Universal Asynchronous Receiver/Transmitte, Chinese: Universal Asynchronous Receiver/Transmission) debug interface and USB (English: Universal Serial Bus) interface multiplexing, which is used as the USB function by default. While the USB function is not available, the system and application running status logs can also be viewed through the UART interface.
  • the embodiment of the present application provides a test function component and a data debugging method, which can improve the debugging efficiency of the product.
  • a test function component comprising: a system chip SOC, a universal serial bus USB switching component, and a USB Type-C interface; the SOC includes a joint test working group JTAG module, The JTAG module leads to the debug pin group and the configuration pin group.
  • Each debug pin in the debug pin group is configured to transmit debug data, and each configuration pin in the configuration pin group is configured to transmit a configuration command;
  • the USB Type-C interface includes a first configuration channel CC tube a pin and a transmission pin group;
  • the debug pin group and the configuration pin group of the JTAG module are connected to the USB switching component;
  • the first CC pin and the transmission pin group of the USB Type-C interface are both
  • the USB switching component is configured to: when the first vendor defined message VDM for entering the debug mode is received through the first CC pin, each of the debug pin groups is Debugging pins are respectively connected to the respective transmission pins in the transmission pin group, and generate corresponding configuration instructions according to the first VDM;
  • the JTAG module is configured to receive, by using the configuration pin group When the instruction is configured, the debug data corresponding to the configuration command is output through the debug pin group. Therefore, in the process of using the JTAG debugging function, it is possible to realize the debugging signal without
  • the transmission pin group includes a first sideband using an SBU1 pin, a second sideband using an SBU2 pin, a first data D+ pin, a second data D-pin, and a second CC pin;
  • the debug pin group includes a test clock TCK pin, a test mode select TMS pin, a test data input TDI pin, a test data output TDO pin, and a test reset input TRST_N pin.
  • the SBU1 pin corresponds to the TMS pin
  • the SBU2 pin corresponds to the TCK pin
  • the D+ pin corresponds to the TDI pin
  • the D-pin corresponds to the TDO pin
  • the second CC pin corresponds to the TRST_N pin.
  • the USB switching component includes:
  • a power output PD chip a control unit, and a switch assembly
  • the PD chip is connected to the control unit;
  • the PD chip is connected to the switch component
  • the PD chip is configured to receive, by using the first CC pin, an instruction to enter a debug mode. a VDM, and transmitting the first VDM to the control unit;
  • the control unit is configured to generate a corresponding configuration instruction according to the first VDM, and send the configuration instruction to a configuration pin group of the JTAG module;
  • the switch component is configured to connect each debug pin to each of the transfer pins according to the first VDM.
  • the configuration pin group includes a first configuration pin and a second configuration pin
  • the control unit is specifically configured to output a low level to the first configuration pin and output a low power to the second configuration pin.
  • the JTAG module is further configured to acquire, from the SOC, debug data corresponding to the transmission debug data mode;
  • the control unit is specifically configured to output a low level to the first configuration pin and output a high level to the second configuration pin.
  • the JTAG module is further configured to acquire, from the SOC, debug data corresponding to the on-chip debugging and tracking mode;
  • the control unit is specifically configured to output a high level to the first configuration pin and output a high power to the second configuration pin.
  • the JTAG module is further configured to acquire debug data corresponding to the JTAG security authentication mode from the SOC chip.
  • the control unit is specifically configured to output a high level to the first configuration pin and output a low power to the second configuration pin. level;
  • the JTAG module is further configured to switch to a destination debug mode according to the custom JTAG timing information when the custom JTAG timing information is received by the transmission pin group, where the custom JTAG timing information is the SOC chip Identifiable information.
  • the SOC chip further includes: a universal asynchronous transceiver UART control module and a peripheral control module;
  • the UART control module and the peripheral control module are connected to the JTAG module through a JTAG data selector MUX;
  • the destination debugging mode includes a UART control module debugging mode or a peripheral control module debugging mode;
  • the UART control module provides debugging data corresponding to a debug mode of the UART control module to the JTAG module;
  • the peripheral control module is configured to provide the JTAG module with debug data corresponding to the debug mode of the peripheral control module.
  • the PD chip is further configured to receive, by the first CC pin, a second VDM for indicating an end debug mode; the control unit is further configured to: use the first configuration pin and the second VDM according to the second VDM The second configuration pin is set to be high impedance; the switch component is further configured to: each of the debug pins in the debug pin group and each transfer pin in the transfer pin group according to the second VDM Corresponding to disconnection.
  • a second aspect of the present application provides a data debugging method, which is applied to a test function component provided by the first aspect.
  • a universal synchronous bus USB switching component is received through a first configuration channel CC pin for Determining a first vendor definition message VDM entering the debug mode; the USB switching component correspondingly connecting each debug pin in the debug pin group with each transfer pin in the transfer pin group, and generating according to the first VDM Corresponding configuration instruction; the USB switching component sends the configuration instruction to the joint test working group JTAG module through the configuration pin group; and the JTAG module outputs the debugging data corresponding to the configuration instruction by using the debugging pin group . Therefore, in the process of using the JTAG debugging function, it is possible to realize the debugging signal without disassembling the machine and improve the debugging efficiency of the product.
  • the configuration pin group includes a first configuration pin and a second configuration pin
  • the method further includes:
  • the USB switch component When the first VDM indicates that the incoming debug mode is the transfer debug data mode, the USB switch component outputs a low level to the first configuration pin and outputs a low power to the second configuration pin. Ping, the JTAG module acquires debug data corresponding to the transmission debug data mode from the system chip SOC;
  • the USB switching component When the first VDM indicates that the incoming debug mode is an on-chip debug and tracking mode, the USB switching component outputs a low level to the first configuration pin and a high level to the second configuration pin.
  • the JTAG module acquires debug data corresponding to the on-chip debugging and tracking mode from the system chip SOC;
  • the USB switching component When the first VDM indicates that the incoming debug mode is the JTAG secure authentication mode, the USB switching component outputs a high level to the first configuration pin and a high level to the second configuration pin.
  • the JTAG module acquires debug data corresponding to the JTAG security authentication mode from the system chip SOC.
  • the method further includes:
  • the USB switching component When the first VDM indicates that the entering debug mode is a custom JTAG mode, the USB switching component outputs a high level to the first configuration pin and a low level to the second configuration pin;
  • the JTAG module receives custom JTAG timing information through the transmission pin group, and switches to a destination debugging mode according to the customized JTAG timing information, where the customized JTAG timing information is information that the SOC can recognize.
  • the debug mode described includes the universal asynchronous transceiver UART control module debug mode or the peripheral control module debug mode.
  • the method further includes:
  • the USB switching component receives a second VDM for indicating an end debug mode through the first CC pin; the USB switching component sets the first configuration pin and the second configuration according to the second VDM The pin is set to be high impedance; the USB switching component disconnects each of the debug pins in the debug pin group from each of the transfer pin groups according to the second VDM.
  • the test function component provided by the application can be set to debug the related functions of the terminal in the terminal (for example, a mobile phone), and the external debugging board sends the VDM to the USB switching component through the USB Type-C interface, and the USB switching component is debugged in the pin group.
  • Each of the debug pins and the transfer pins in the transfer pin group Corresponding to the connection, and generating a corresponding configuration instruction according to the VDM; after receiving the configuration instruction by the configuration pin group, the JTAG module outputs the debugging data corresponding to the configuration instruction through the debugging pin group. Therefore, in the process of using the JTAG debugging function, it is possible to realize the debugging signal without disassembling the machine and improve the debugging efficiency of the product.
  • FIG. 1 is a schematic structural diagram of a USB Type-C interface of the prior art
  • FIG. 2 is a schematic structural diagram of an organization of a debugging system provided by the present application.
  • FIG. 3 is a schematic diagram of an organizational structure of a test function component provided by the present application.
  • FIG. 4 is another schematic structural diagram of a test function component provided by the present application.
  • FIG. 5 is another schematic structural diagram of a test function component provided by the present application.
  • FIG. 6 is another schematic structural diagram of a test function component provided by the present application.
  • FIG. 7 is another schematic structural diagram of a test function component provided by the present application.
  • FIG. 8 is a timing flowchart of a debug mode of a custom JTAG provided by the present application.
  • FIG. 9 is a schematic flowchart diagram of a data debugging method provided by the present application.
  • JTAG Joint Test Action Group, Chinese: Joint Test Working Group
  • DSP Digital Signal Processing
  • FPGA Field-Programmable Gate Array
  • Chinese Field Programmable Gate Array
  • UART (English: Universal Asynchronous Receiver/Transmitte, Chinese: Universal Asynchronous Transceiver): A universal serial data bus for asynchronous communication.
  • the bus bidirectional communication enables full duplex transmission and reception.
  • Embedded design is often used to connect to a PC (English: Personal Computer, Chinese: personal computer) to view the operating status log of the device system.
  • USB Type-C is a connection interface of USB interface. It can be inserted in both front and back. The size is about 8.3mm ⁇ 2.5mm. It supports USB standard charging, data transmission and display like other interfaces. Output and other functions. USB Type-C was developed by the USB Implementers Forum and became popular after being supported by vendors such as Apple, Google, Intel, and Microsoft in 2014.
  • PD (English: Power Delivery, Chinese: Power Output): Power Delivery protocol
  • non-USB Type-C interface such as: micro B interface
  • FSK English: Frequency Shift Keying
  • Chinese Frequency Shift Keying
  • the BMC (English: Biphase Mark Coding, Chinese: Biphase Mark Coding) signal is coupled to the CC (English: Configuration channel, Chinese: configuration channel) pin to realize communication between the two terminal devices. Thereby negotiating a suitable power supply environment.
  • VDM (English: Vendor Defined Message): The PD protocol defines the VDM message format field. The vendor can use a custom field to define different VDM messages.
  • TRACE32 TRACE32 as a truly integrated, versatile system simulator can be combined into a variety of solutions, can support network solutions, laboratory stand-alone solutions, off-site fiber solutions, etc. It has a fully modular, building block structure, can support JTAG And BDM (English: Background Debugging Mode) interface and all CPUs, can provide powerful functions such as software analysis, port analysis, waveform analysis and software testing.
  • JTAG And BDM English: Background Debugging Mode
  • Fastboot mode is a recovery mode in Android phones. (recovery) the lower level of the brush mode. It is a brush mode that uses a USB cable to connect to a mobile phone. Compared to some systems (such as ios system) card brush, the line brush is more reliable and safe. In this mode, you can also modify some of the phone's available parameters.
  • SD (English: Secure Digital Memory Card): The SD card is a new generation of memory devices based on semiconductor flash memory.
  • SOC (English: System on Chip, Chinese: System Chip): System-on-a-chip, also known as a system-on-a-chip, means that it is a product, an integrated circuit with a dedicated target, which contains the complete system and has the entire contents of the embedded software. .
  • On-chip debugging and tracking Industry name for on-chip debugging and tracking, Products include ARM processor's various trace macrocells, system and software measurements, and a complete set of IP blocks to debug and track the most complex multi-core SOCs.
  • USB Type-C interface is rich in pin pins and has 24 pin pins on the upper and lower sides, as shown in Figure 1:
  • Pin pin VBUS, GND is used for power supply.
  • USB3.0 channel transmission is high-speed AC signal, to ensure signal quality, product board level will be added Redriver (redriver), and the debug signal is a low-speed DC signal, the USB3.0 channel will be filtered out, so the USB3.0 channel can not be used for debugging pin.
  • D-pins when used for USB2.0 function, one of them is used for data transmission or charging. When used for USB3.0, one of them is enumerated. Use, that is, whether using USB2.0 or USB3.0, there is a way D+, D- for debugging pin.
  • the CC (English: Configuration channel, Chinese: Configuration Channel) pin includes the CC1 pin and the CC2 pin.
  • the CC1 and CC2 pins are used to detect the forward, reverse, and transmit PD protocols.
  • the normal cable (cable) has only one CC pin contact. In this debugging scheme, a special cable is made.
  • the USB Type- Two CC pin pins of the C interface are connected, one of which is CC pin
  • the foot is used as a normal CC/PD function.
  • the other 1 CC pin is used as the CC/PD function in non-debug mode and as a debug pin in debug mode.
  • auxiliary signal SBU1 (English: Side band use, Chinese: sideband use) and SBU2 are used in certain transmission modes, such as: AUX (Audio Input Interface) is assisted by SBU1 and SUB2 of USB Type-C. In debug mode, it can also be used as a debug pin.
  • AUX Audio Input Interface
  • USB Type-C interface CC1, CC2, SBU1, SBU2, D+ and D- one of the two
  • USB3.0 function is used to bring out the debugging signal on the mobile phone side, and the following functions are used when the whole machine is not disassembled:
  • USB Type-C interface-based USB2.0 or the future USB3.0 Device function normally when using the JTAG analysis system to kill the problem.
  • the debugging system includes a test function component, an external debugging board, and a computing device (such as a PC), and the testing function component includes a system chip SOC and a USB switching component. And USB Type-C interface.
  • the test function component in the system is connected to the external debug board through the USB Type-C interface to enable communication between the devices.
  • An external debug board in the system is used to send a debug message to the test function component to perform debug test on the test function component.
  • an implementation may configure a debug message sent by the external debug board by a computing device (such as a PC) in the system, by the PC.
  • the external debug board which debug function to select.
  • the external debug board sends the corresponding debug message to the test function component according to the PC's selection.
  • a dialing code can be added to the external debugging board, and the debugging function can also be achieved by dialing the code and confirming the key.
  • the above test function component can be set and applied to the terminal, and the terminal can be any terminal device such as a mobile phone, a tablet computer, a PDA (Personal Digital Assistant).
  • the test function component of FIG. 2 can be implemented by the test function component 200 of FIG.
  • the test function component 200 includes: a system chip SOC, hereinafter referred to as SOC chip 202, universal serial bus USB switching component 204, and USB Type-C interface 206; wherein SOC chip 202 and USB switching component 204 may also be integrated into one chip.
  • the USB switching component 204 has a PD chip.
  • the SOC chip 202 includes a JTAG module 302, and the JTAG module 302 leads a debug pin group and a configuration pin group, and each debug pin in the debug pin group is used to transmit debug data, and the configuration pin group Each configuration pin is used to transmit a configuration command;
  • the USB Type-C interface 206 includes a first configuration channel CC pin and a transmission pin group;
  • the debug pin group and the configuration pin group of the JTAG module 302 are both connected to the USB switch component 204;
  • the first CC pin and the transmission pin group of the USB Type-C interface 206 are all connected to the USB switching component 204;
  • the USB switching component 204 is configured to: when the first vendor defined message VDM for entering the debug mode is received through the first CC pin, the debug pins in the debug pin group are Each transmission pin in the transmission pin group is correspondingly connected, and generates a corresponding configuration instruction according to the first VDM;
  • the JTAG module 302 is configured to output debug data corresponding to the configuration instruction by using the debug pin group when receiving the configuration instruction by the configuration pin group.
  • the test function component can be set to debug the related function of the terminal in the terminal (for example, a mobile phone), and the external debugging board sends the VDM to the USB switching component 204 through the USB Type-C interface 206, and the USB switching component 204 will be in the debugging pin group.
  • Each of the debug pins is correspondingly connected to each of the transfer pins in the transfer pin group, and generates a corresponding configuration command according to the VDM; the JTAG module 302 is configured After receiving the configuration command, the pin group outputs the debug data corresponding to the configuration command through the debug pin group. Therefore, the JTAG debugging function can be used without disassembling the machine to improve the debugging efficiency of the product.
  • the transmission pin group includes a first sideband using an SBU1 pin, a second sideband using an SBU2 pin, a first data D+ pin, a second data D-pin, and a first Two CC pins;
  • the debug pin group includes a test clock TCK pin, a test mode select TMS pin, a test data input TDI pin, a test data output TDO pin, and a test reset input TRST_N pin.
  • the SBU1 pin corresponds to the TMS pin
  • the SBU2 pin corresponds to the TCK pin
  • the D+ pin corresponds to the TDI pin
  • the D-pin corresponds to the TDO pin
  • the second CC pin corresponds to the TRST_N pin.
  • the USB switching component 204 includes:
  • the PD chip 402 is connected to the control unit 404;
  • the PD chip 402 is connected to the switch component 406;
  • the PD chip 402 is configured to receive, by using the first CC pin, a first VDM for indicating to enter a debug mode, and send the first VDM to the control unit 404;
  • the control unit 404 is configured to generate a corresponding configuration instruction according to the first VDM, and send the configuration instruction to a configuration pin group of the JTAG module 302;
  • the switch component 406 is configured to connect each debug pin to each of the transfer pins according to the first VDM.
  • the configuration pin group includes a first configuration pin and a second configuration pin
  • the control unit 404 is specifically configured to output a low level to the first configuration pin and output a low level to the second configuration pin.
  • the JTAG module 302 is further configured to acquire, from the SOC chip 202, debug data corresponding to the transmission debug data mode;
  • the control unit 404 is specifically configured to output a low level to the first configuration pin and output to the second configuration pin.
  • the JTAG module 302 is further configured to acquire, from the SOC chip 202, debug data corresponding to the on-chip debugging and tracking mode;
  • the control unit 404 is specifically configured to output a high level to the first configuration pin and output a high level to the second configuration pin.
  • the JTAG module 302 is further configured to acquire debug data corresponding to the JTAG secure authentication mode from the SOC chip 202.
  • the control unit 404 is specifically configured to output a high level to the first configuration pin and output a low level to the second configuration pin.
  • the JTAG module 302 is further configured to switch to a destination debug mode according to the custom JTAG timing information when the custom JTAG timing information is received by the transmission pin group, where the custom JTAG timing information is the SOC Information that the chip 202 can recognize.
  • the SOC chip 202 further includes: a universal asynchronous transceiver UART control module 502 and a peripheral control module 504;
  • the UART control module 502 and the peripheral control module 504 are connected to the JTAG module 302 through a JTAG data selector MUX (506);
  • the destination debugging mode includes a UART control module debugging mode or a peripheral control module debugging mode;
  • the UART control module 502 is configured to provide the JTAG module 302 with debug data corresponding to a debug mode of the UART control module;
  • the peripheral control module 504 is configured to provide the JTAG module 302 with debug data corresponding to the peripheral control module debug mode.
  • the PD chip 402 is further configured to receive, by using the first CC pin, an instruction to end the debugging mode.
  • Second VDM Second VDM
  • the control unit 404 is further configured to set the first configuration pin and the second configuration pin to a high resistance according to the second VDM;
  • the switch component 406 is further configured to disconnect each debug pin in the debug pin group from each transfer pin in the transfer pin group according to the second VDM.
  • test function component 200 The organization of the test function component 200 will be specifically described below in conjunction with a possible design in FIG. 6 or FIG.
  • the SOC chip includes a JTAG module
  • the debug pin group led out by the JTAG module includes five debug pins: the TCK pin, the TMS pin, and the TDI pin. , TDO pin, TRST_N pin. These pins are used to drive the circuit modules and control to perform the specified operations. The function of each pin is as follows:
  • the data and instructions are serially input or removed through the TDI and TDO pins under the synchronization of TCK.
  • TCK provides the clock for the TAP controller state machine.
  • the control mode selector determines the state of the controller using the state of the TMS pin at the rising edge of TCK.
  • JTAG instruction and data registers It is the serial data input of the JTAG instruction and data registers. It specifies which register a particular operation is loaded into by TDI through the controller and the current state and the specific instructions held in the instruction register, and at the rising edge of TCK. Sampled and sent to the JTAG register set.
  • test reset input signal active low, which provides an asynchronous initialization signal to the controller.
  • the configuration pin group from the JTAG module includes two configuration pins (pins are configured in the figure) for transmitting configuration commands.
  • the USB switching component includes a control unit, a PD chip, and a switch component.
  • the PD chip is connected to the control unit; the PD chip is connected to the switch assembly.
  • the five debug pins of the above JTAG module are connected to the switch component of the USB switch component, and the other two configuration pins are connected to the control unit of the USB switch component.
  • the USB Type-C interface includes a first CC pin and a transmission pin group; wherein the transmission pin group includes a CC1/CC2 pin, an SBU1 pin, an SBU2 pin, a D+ pin, and a D-pin, A CC pin (CC1 pin in the figure) and each transfer pin are connected to the switch component of the USB switching component.
  • FIGS. 6 and 7 The working principle of the organization structure in FIGS. 6 and 7 will be described with reference to FIG. 3 and FIG. 4 and the data debugging method provided by the present application.
  • USB Type-C interface specification defines that when the cable is connected to two pull-down resistors, it enters the debug mode. Based on the specification, before receiving the debug message VDM, the USB switch component (USB_SWITCH) defaults to the non-debug mode, and the USB switch component is internal.
  • the switch pin (switch) and the debug pin on the SOC side JTAG module (TCK pin, TMS pin, TDI pin, TDO pin, TRST_N pin shown in Figures 6 and 7) are disconnected.
  • the structure diagram shown in FIG. 6 or FIG. 7 also shows a possible connection relationship between the JTAG debug pins and the USB Type-C interface pins.
  • the TCK pin corresponds to the SBU2 pin
  • the TMS pin corresponds to the SBU1 pin
  • the TDI pin corresponds to the D+ pin
  • the TDO pin corresponds to the D- pin
  • the TRST_N pin corresponds to the CC1 pin or the CC2 pin
  • the TRST_N pin is connected to the CC1 pin in the switch component, or the CC2 pin is connected, depending on whether the mobile phone is plugged in or reversed. If the external debug board passes the CC1 pin To send a VDM message, the other one (CC2 pin) is used as a debug pin.
  • the PD chip of the USB switching component identifies the VDM message, and controls the TRST_N pin and the CC1 through the switch component.
  • Pin, TCK pin and SBU2 pin, TMS pin and SBU1 pin, TDI pin and D+ pin, TDO pin and D- pin are in the closed state, enter debug mode, as shown 7 is shown.
  • the received VDM message is converted into an internally readable command based on the PD protocol, and a corresponding configuration instruction is generated, and the generated configuration command is input by the control unit inside the USB switching component to the configuration pin on the JTAG module.
  • the JTAG module outputs debug data according to the configuration command, and the debug data is transmitted to the external debug board through a transmission channel established between the debug pin and each pin of the USB Type-C interface, thereby debugging the debug data through the PC.
  • the USB switching component generates a configuration command according to the received VDM message.
  • the USB switching component sets a configuration command of a configuration pin (hereinafter referred to as a configuration pin) connected to the SOC side JTAG module according to the received VDM message.
  • a configuration pin hereinafter referred to as a configuration pin
  • two configuration pins correspond to four configuration commands, namely: 00, 01, 10, 11.
  • debugging function subdivision there may be dozens of debugging modes, such as:
  • JTAG has on-chip debugging and tracking (Coresight) debugging, digital signal processing debugging and so on.
  • the UART has application processor debugging, low power module debugging, and so on.
  • Peripheral function pin signals include display debugging, camera debugging, camera debugging, etc.
  • the debugging features are defined as follows:
  • the control unit When the VDM message indicates that the debugging mode is the transmission debugging data mode, the control unit outputs a low level to the first configuration pin, and outputs a low level to the second configuration pin, and the JTAG module acquires the transmission debugging from the SOC.
  • Debug data corresponding to the data mode. For example, configure the pin input configuration command 00, and the debug configuration register value is 0 (the default value is 0), defined as the output print log of the application processor AP running status of the UART.
  • the control unit When the VDM message indicates that the debugging mode is the on-chip debugging and tracking mode, the control unit outputs a low level to the first configuration pin, and outputs a high level to the second configuration pin, and the JTAG module acquires the on-chip from the SOC.
  • Debug data for debug and trace mode For example, configure pin input configuration command 01, defined as Coresight to debug the application processor AP.
  • the control unit When the VDM message indicates that the debug mode entered is a custom JTAG mode, the control unit outputs a high level to the first configuration pin and a low level to the second configuration pin; the JTAG module receives through the transmission pin group. Customize the JTAG vector timing information and switch to the destination debug mode according to the custom JTAG vector timing information; where the custom JTAG vector timing information is known to the SOC chip For other information, the destination debug mode includes the UART control module debug mode or the peripheral control module debug mode. For example, configure pin input configuration command 10, defined as a custom debug mode based on JTAG design, which can be switched to other debug functions through software configuration.
  • the control unit When the VDM message indicates that the incoming debug mode is the JTAG secure authentication mode, the control unit outputs a high level to the first configuration pin and a high level to the second configuration pin, and the JTAG module further uses Acquiring debug data corresponding to the JTAG security authentication mode from the SOC chip. For example, configure the pin input configuration command 11, defined as security authentication JTAG (JTAG can be used after security authentication).
  • debugging VDM messages are defined, which are sent to the test function component side by the PD chip on the external debugging board.
  • the generated configuration command or output can refer to the corresponding relationship in Table 1:
  • jtag_sel1/0 in the table is the 2 configuration pins of the JTAG module.
  • the USB switching component After the USB switching component receives the VDM0, VDM2, and VDM4 messages for debugging, the USB switching component connects to each debugging pin on the JTAG module on the SOC side, and directly enters the setting SOC.
  • Corresponding debug mode (the functions corresponding to the VDM described in Table 1 above, different functions correspond to different debug modes).
  • the external debugging board sends VDM3 and enters the custom JTAG debugging mode.
  • the MCU on the external debug board sends the custom JTAG timing information to the USB switch component through the debug pin debug 5pin.
  • the USB switching component transparently transmits the custom JTAG timing information to the JTAG module to set the system register to switch to other debugging modes.
  • the present application Based on the debugging system shown in FIG. 2, the present application provides a data debugging method.
  • the testing function component provided by the present application executes the method at runtime, and a schematic flowchart thereof is shown in FIG. 9.
  • the universal synchronous bus USB switching component receives a first vendor defined message VDM for indicating entering the debug mode by using the first configuration channel CC pin.
  • the USB switching component connects each debug pin in the debug pin group to each transfer pin in the transfer pin group, and generates a corresponding configuration instruction according to the first VDM.
  • the USB switching component sends the configuration command to the joint test working group JTAG module through a configuration pin group.
  • the JTAG module outputs debug data corresponding to the configuration command by using the debug pin group.
  • the configuration pin group includes a first configuration pin and a second configuration pin; the test function component further performs the following steps:
  • the USB switch component When the first VDM indicates that the incoming debug mode is the transfer debug data mode, the USB switch component outputs a low level to the first configuration pin and outputs a low level to the second configuration pin.
  • the JTAG module acquires debug data corresponding to the transmission debug data mode from the system chip SOC;
  • the USB switching component When the first VDM indicates that the incoming debug mode is an on-chip debug and tracking mode, the USB switching component outputs a low level to the first configuration pin and a high level to the second configuration pin.
  • the JTAG module acquires debug data corresponding to the on-chip debugging and tracking mode from the system chip SOC;
  • the USB switching component When the first VDM indicates that the incoming debug mode is the JTAG secure authentication mode, the USB switching component outputs a high level to the first configuration pin and a high level to the second configuration pin.
  • the JTAG module acquires debug data corresponding to the JTAG security authentication mode from the system chip SOC.
  • test function component further performs the following steps:
  • the USB switching component When the first VDM indicates that the entering debug mode is a custom JTAG mode, the USB switching component outputs a high level to the first configuration pin and a low level to the second configuration pin;
  • the JTAG module receives custom JTAG timing information through the transmission pin group, and switches to a destination debugging mode according to the customized JTAG timing information, where the customized JTAG timing information is information that the SOC can recognize.
  • Description of the debug mode includes universal asynchronous transceiver UART control Module debug mode or peripheral control module debug mode.
  • test function component further performs the following steps:
  • the USB switching component receives a second VDM for indicating an end debug mode by using the first CC pin;
  • the USB switching component sets the first configuration pin and the second configuration pin to a high impedance according to the second VDM;
  • the USB switching component disconnects each of the debug pins in the debug pin group from each of the transfer pin groups in the transfer pin group according to the second VDM.
  • the disclosed system, apparatus, and method may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the integrated unit is implemented in the form of a software functional unit and sold as a standalone product Or when used, it can be stored in a computer readable storage medium.
  • the technical solution of the present application in essence or the contribution to the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium.
  • a number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present application.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like. .
  • the functions described herein may be implemented in hardware or software.
  • the functions may be stored in a computer readable medium or transmitted as one or more instructions or code on a computer readable medium.
  • a storage medium may be any available media that can be accessed by a general purpose or special purpose computer.

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Tests Of Electronic Circuits (AREA)
  • Debugging And Monitoring (AREA)

Abstract

实施例提供了一种测试功能组件(200)及数据调试方法,该测试功能组件(200)包括:系统芯片SOC(202)、USB切换组件(204)以及USB Type-C接口(206);SOC(202)包含联合测试工作组JTAG模块(302),JTAG模块(302)引出调试管脚组和配置管脚组;USB Type-C接口(206)包含CC管脚以及传输管脚组;JTAG模块(302)的调试管脚组和配置管脚组均与USB切换组件(204)相连;USB Type-C接口(206)的第一CC管脚以及传输管脚组均与USB切换组件(204)相连;USB切换组件(204)用于当通过第一CC管脚接收到用于指示进入调试模式的第一厂商定义消息VDM时,将调试管脚组中的各调试管脚与传输管脚组中的各传输管脚对应连接,并根据第一VDM生成对应的配置指令;JTAG模块(302)用于当通过所述配置管脚组接收到配置指令时,通过调试管脚组输出与配置指令对应的调试数据。该组件和方法能够提高产品的调试效率。

Description

测试功能组件及数据调试方法 技术领域
本申请涉及通信领域,特别涉及一种测试功能组件及数据调试方法。
背景技术
在消费类电子产品研发过程中,调试技术是分析,解决问题必不可少的手段。但很多调试技术受限产品形态(例如和开发板比,商用产品的物理调试接口少很多),使用不灵活,在某些场景下甚至无法直接使用,需要破坏现场。例如受限于手机产品的以下三种调试场景:
1、使用仿真器TRACE32对手机系统卡死类问题进行JTAG(英文:Joint Test Action Group,中文:联合测试工作组)调试,需要拆机后通过飞线才能调试。
2、UART(英文:Universal Asynchronous Receiver/Transmitte,中文:通用异步收发)调试接口和USB(英文:Universal Serial Bus,中文:通用串行总线)接口复用,默认用作USB功能。做不到使用USB功能的同时,也可以通过UART接口查看系统及应用程序运行状态日志。
3、观察手机整机外围器件(如:照相机、传感器等)管脚信号,也需要拆机后才能借助示波器观察。
以上列举的各种场景由于受到手机产品形态的限制,因此在调试过程中影响手机产品其他功能的使用,尤其是当前手机一体化程度设计越来越高的形势下,通过拆机使得调试效率非常低下。
发明内容
本申请实施例提供了一种测试功能组件及数据调试方法,能够提高产品的调试效率。
本申请第一方面,提供了一种测试功能组件,该测试功能组件包括:系统芯片SOC、通用串行总线USB切换组件以及USB Type-C接口;所述SOC包含联合测试工作组JTAG模块,所述JTAG模块引出调试管脚组和配置管脚组, 所述调试管脚组中的各调试管脚用于传输调试数据,所述配置管脚组中的各配置管脚用于传输配置指令;所述USB Type-C接口包含第一配置通道CC管脚以及传输管脚组;所述JTAG模块的调试管脚组和配置管脚组均与所述USB切换组件相连;所述USB Type-C接口的第一CC管脚以及传输管脚组均与所述USB切换组件相连;所述USB切换组件用于当通过所述第一CC管脚接收到用于指示进入调试模式的第一厂商定义消息VDM时,将所述调试管脚组中的各调试管脚与所述传输管脚组中的各传输管脚对应连接,并根据所述第一VDM生成对应的配置指令;所述JTAG模块用于当通过所述配置管脚组接收到所述配置指令时,通过所述调试管脚组输出与所述配置指令对应的调试数据。因此,在使用JTAG调试功能过程中,可以实现不拆机引出调试信号,提高产品的调试效率。
结合本申请第一方面,在第一方面的第一种实现方式中,
所述传输管脚组包括第一边带使用SBU1管脚、第二边带使用SBU2管脚、第一数据D+管脚、第二数据D-管脚以及第二CC管脚;
所述调试管脚组包括测试时钟TCK管脚、测试模式选择TMS管脚、测试数据输入TDI管脚、测试数据输出TDO管脚以及测试复位输入TRST_N管脚。
结合本申请第一方面的第一种实现方式,在第一方面的第二种实现方式中,
所述SBU1管脚与所述TMS管脚对应;
所述SBU2管脚与所述TCK管脚对应;
所述D+管脚与所述TDI管脚对应;
所述D-管脚与所述TDO管脚对应;
所述第二CC管脚与所述TRST_N管脚对应。
结合本申请第一方面、第一方面的第一种实现方式、或第一方面的第二种实现方式,在第一方面的第三种实现方式中,所述USB切换组件包括:
功率输出PD芯片、控制单元以及开关组件;
所述PD芯片与所述控制单元相连;
所述PD芯片与所述开关组件相连;
所述PD芯片用于通过所述第一CC管脚接收用于指示进入调试模式的第 一VDM,并将所述第一VDM发送给控制单元;
所述控制单元用于根据所述第一VDM生成对应的配置指令,并向所述JTAG模块的配置管脚组发送所述配置指令;
所述开关组件用于根据所述第一VDM将各调试管脚与各传输管脚对应连接。
结合本申请第一方面的第三种实现方式,在第一方面的第四种实现方式中,所述配置管脚组包括第一配置管脚以及第二配置管脚;
当所述第一VDM指示进入的调试模式为传输调试数据模式时,所述控制单元具体用于向所述第一配置管脚输出低电平,并向所述第二配置管脚输出低电平,所述JTAG模块还用于从所述SOC中获取所述传输调试数据模式对应的调试数据;
或,
当所述第一VDM指示进入的调试模式为片上调试和跟踪模式时,所述控制单元具体用于向所述第一配置管脚输出低电平,并向所述第二配置管脚输出高电平,所述JTAG模块还用于从所述SOC中获取所述片上调试和跟踪模式对应的调试数据;
或,
当所述第一VDM指示进入的调试模式为JTAG安全认证模式时,所述控制单元具体用于向所述第一配置管脚输出高电平,并向所述第二配置管脚输出高电平,所述JTAG模块还用于从所述SOC芯片中获取所述JTAG安全认证模式对应的调试数据。
结合本申请第一方面的第四种实现方式,在第一方面的第五种实现方式中,
当所述第一VDM指示进入的调试模式为自定义JTAG模式时,所述控制单元具体用于向所述第一配置管脚输出高电平,并向所述第二配置管脚输出低电平;
所述JTAG模块还用于当通过所述传输管脚组接收到自定义JTAG时序信息时,根据所述自定义JTAG时序信息切换至目的调试模式,所述自定义JTAG时序信息为所述SOC芯片可识别的信息。
结合本申请第一方面的第五种实现方式,在第一方面的第六种实现方式中,
所述SOC芯片还包括:通用异步收发UART控制模块以及外设控制模块;
所述UART控制模块以及所述外设控制模块通过JTAG的数据选择器MUX与所述JTAG模块连接;
所述目的调试模式包括UART控制模块调试模式或外设控制模块调试模式;
所述UART控制模块向所述JTAG模块提供UART控制模块调试模式对应的调试数据;
所述外设控制模块用于向所述JTAG模块提供外设控制模块调试模式对应的调试数据。
结合本申请第一方面的第四至第六任一种实现方式,在第一方面的第七种实现方式中,
所述PD芯片还用于通过所述第一CC管脚接收用于指示结束调试模式的第二VDM;所述控制单元还用于根据所述第二VDM将所述第一配置管脚以及所述第二配置管脚设置为高阻;所述开关组件还用于根据所述第二VDM将所述调试管脚组中的各调试管脚与所述传输管脚组中的各传输管脚对应断开。
本申请第二方面,提供了一种数据调试方法,该方法应用于第一方面提供的测试功能组件,该数据调试方法中:通用同步总线USB切换组件通过第一配置通道CC管脚接收用于指示进入调试模式的第一厂商定义消息VDM;所述USB切换组件将调试管脚组中的各调试管脚与传输管脚组中的各传输管脚对应连接,并根据所述第一VDM生成对应的配置指令;所述USB切换组件将所述配置指令通过配置管脚组发送至联合测试工作组JTAG模块;所述JTAG模块通过所述调试管脚组输出与所述配置指令对应的调试数据。因此,在使用JTAG调试功能过程中,可以实现不拆机引出调试信号,提高产品的调试效率。
结合本申请第二方面,在第二方面的第一种实现方式中,所述配置管脚组包括第一配置管脚以及第二配置管脚;所述方法还包括:
当所述第一VDM指示进入的调试模式为传输调试数据模式时,所述USB切换组件向所述第一配置管脚输出低电平,并向所述第二配置管脚输出低电 平,所述JTAG模块从系统芯片SOC中获取所述传输调试数据模式对应的调试数据;
或,
当所述第一VDM指示进入的调试模式为片上调试和跟踪模式时,所述USB切换组件向所述第一配置管脚输出低电平,并向所述第二配置管脚输出高电平,所述JTAG模块从系统芯片SOC中获取所述片上调试和跟踪模式对应的调试数据;
或,
当所述第一VDM指示进入的调试模式为JTAG安全认证模式时,所述USB切换组件向所述第一配置管脚输出高电平,并向所述第二配置管脚输出高电平,所述JTAG模块从系统芯片SOC中获取所述JTAG安全认证模式对应的调试数据。
结合本申请第二方面的第一种实现方式,在第二方面的第二种实现方式中,所述方法还包括:
当所述第一VDM指示进入的调试模式为自定义JTAG模式时,所述USB切换组件向所述第一配置管脚输出高电平,并向所述第二配置管脚输出低电平;所述JTAG模块通过所述传输管脚组接收自定义JTAG时序信息,并根据所述自定义JTAG时序信息切换至目的调试模式,所述自定义JTAG时序信息为所述SOC可识别的信息,所述目的调试模式包括通用异步收发UART控制模块调试模式或外设控制模块调试模式。
结合本申请第二方面的第一种实现方式或第二方面的第二种实现方式,在第二方面的第三种实现方式中,所述方法还包括:
所述USB切换组件通过所述第一CC管脚接收用于指示结束调试模式的第二VDM;所述USB切换组件根据所述第二VDM将所述第一配置管脚以及所述第二配置管脚设置为高阻;所述USB切换组件根据所述第二VDM将所述调试管脚组中的各调试管脚与所述传输管脚组中的各传输管脚对应断开。
本申请提供的测试功能组件可设置到终端(例如手机)中对终端的相关功能进行调试,外部调试板通过USB Type-C接口向USB切换组件发送VDM,该USB切换组件将调试管脚组中的各调试管脚与传输管脚组中的各传输管脚 对应连接,并根据该VDM生成对应的配置指令;JTAG模块通过配置管脚组接收到配置指令后,通过调试管脚组输出与配置指令对应的调试数据。因此,在使用JTAG调试功能过程中,可以实现不拆机引出调试信号,提高产品的调试效率。
附图说明
图1为现有技术USB Type-C接口的结构示意图;
图2为本申请提供的调试系统的一个组织结构示意图;
图3为本申请提供的测试功能组件的一个组织结构示意图;
图4为本申请提供的测试功能组件的另一组织结构示意图;
图5为本申请提供的测试功能组件的另一组织结构示意图;
图6为本申请提供的测试功能组件的另一组织结构示意图;
图7为本申请提供的测试功能组件的另一组织结构示意图;
图8为本申请提供的自定义JTAG的调试模式的一个时序流程图;
图9为本申请提供的数据调试方法的一个流程示意图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”、“第四”等(如果存在)是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的实施例能够以除了在这里图示或描述的内容以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。
缩略语和关键术语定义
JTAG(英文:Joint Test Action Group,中文:联合测试工作组):是一种国际标准测试协议(IEEE 1149.1兼容),主要用于芯片内部测试。现在多数的高级器件都支持JTAG协议,如DSP(英文:Digital Signal Processing,中文:数字信号处理)、FPGA(英文:Field-Programmable Gate Array,中文:现场可编程门阵列)器件等。
UART(英文:Universal Asynchronous Receiver/Transmitte,中文:通用异步收发):一种通用串行数据总线,用于异步通信。该总线双向通信,可以实现全双工传输和接收。嵌入式设计中常用于和PC(英文:Personal Computer,中文:个人计算机)相连,查看设备系统运行状态日志。
USB Type-C:USB Type-C是USB接口的一种连接介面,不分正反两面均可插入,大小约为8.3mm×2.5mm,和其他介面一样支持USB标准的充电、数据传输、显示输出等功能。USB Type-C由USB Implementers Forum制定,在2014年获得苹果、谷歌、英特尔、微软等厂商支持后开始普及。
PD(英文:Power Delivery,中文:功率输出):Power Delivery协议,对非USB Type-C接口(如:micro B接口),通过耦合FSK(英文:Frequency Shift Keying,中文:频移键控)信号,实现两个终端设备的通信,从而协商出合适的供电环境。对USB Type-C接口,通过在CC(英文:Configuration channel,中文:配置通道)管脚上耦合BMC(英文:Biphase Mark Coding,中文:双相标记编码)信号,实现两个终端设备的通信,从而协商出合适的供电环境。
VDM(英文:Vendor Defined Message,中文:厂商定义消息):PD协议定义VDM消息格式字段,厂商可以使用自定义字段,用于定义不同的VDM消息。
TRACE32:TRACE32作为一种真正集成化、通用性系统仿真器可以组合成多种方案,可以支持网络方案、实验室单机方案、异地光纤方案等,它具有全模块化、积木式结构、可支持JTAG及BDM(英文:Background Debugging Mode,中文:背景调试模式)接口和所有CPU,能够提供软件分析、端口分析、波形分析以及软件测试等强大功能。
快速启动(fastboot)模式:在安卓手机中fastboot是一种比恢复模式 (recovery)更底层的刷机模式。就是使用USB数据线连接手机的一种刷机模式。相对于某些系统(如ios系统)卡刷来说,线刷更可靠,安全。在该模式下,也可以修改手机一些可配参数。
SD(英文:Secure Digital Memory Card,中文:安全数码)卡:SD卡是一种基于半导体快闪记忆器的新一代记忆设备。
SOC(英文:System on Chip,中文:系统芯片):系统级芯片,也有称片上系统,意指它是一个产品,是一个有专用目标的集成电路,其中包含完整系统并有嵌入软件的全部内容。
片上调试和跟踪(CoreSight):片上调试和跟踪的行业名称,
Figure PCTCN2016078151-appb-000001
产品包括ARM处理器的各种跟踪宏单元、系统和软件测量以及一整套IP块,以便调试和跟踪最复杂的多核SOC。
发明背景及概述
随着USB Type-C接口的产品越来越多,较之前5pin脚的USB接口,USB Type-C接口pin脚丰富,上、下有24pin脚,如图1所示:
其中:
pin脚VBUS,GND用于供电。
pin脚TX1+,TX1-,RX1+,RX1-,TX2+,TX2-,RX2+,RX2-用于USB3.0数据传输,USB3.0通道传输的是高速交流信号,为保证信号质量,产品板级会加再驱动(redriver),而调试信号是低速直流信号,走USB3.0通道会被过滤掉,所以,USB3.0通道不能作调试pin脚用。
两路D+管脚(英文:data,中文:数据),D-管脚,在作USB2.0功能时,其中一路作数据传输或充电用,在作USB3.0用时,其中一路在枚举时用,即无论用USB2.0还是USB3.0,都有一路D+,D-作调试pin用。
CC(英文:Configuration channel,中文:配置通道)管脚包括CC1管脚和CC2管脚。CC1、CC2管脚用于检测正、反插和传输PD协议,插正常电缆(cable)只有1个CC pin脚接触,本调试方案中制作特殊cable,在调试模式下,同时把手机USB Type-C接口的2个CC pin脚接出来,其中1个CC pin 脚用作正常的CC/PD功能。另外1个CC pin脚,在非调试模式下,用作CC/PD功能,在调试模式下,用作调试pin脚。
辅助信号SBU1(英文:Side band use,中文:边带使用)和SBU2在特定的一些传输模式时才用,如:AUX(音频输入接口)辅助由USB Type-C的SBU1,SUB2来传。在调试模式下,也可以用来作调试pin脚用。
综上所述,通过一个外接调试板,利用USB Type-C接口的CC1,CC2,SBU1,SBU2,D+和D-(两路中其中一路),在不影响USB2.0或基于USB Type-C的USB3.0功能使用,把手机侧的调试信号引出来,实现整机不拆机的情况下使用下述功能:
1、可以在使用JTAG分析系统卡死类问题的情况下,正常使用基于USB Type-C接口的USB2.0或者未来的USB3.0的Device功能。
2、可以同时使用芯片平台2路UART观察多个子系统调试日志输出的情况下,正常使用基于USB Type-C接口的USB2.0或者未来的USB3.0的Device(设备)功能。
3、通过外接调试板,可以同时观察多路外围设备功能管脚信号(2路双向信号+1路单向信号或5路单向信号)。正常使用基于USB Type-C接口的USB2.0或者未来的USB3.0的Device功能。
4、不依赖于手机侧软件配置,在收到外接调试板发送的硬件信号命令后,直接使用上述的JTAG、UART、观察外设功能管脚信号等调试功能。
本申请实施例所应用的系统架构
图2为本申请实施例所应用的调试系统的一个组织结构示意图,该调试系统包括测试功能组件、外部调试板以及计算设备(例如PC机),该测试功能组件包括系统芯片SOC、USB切换组件以及USB Type-C接口。该系统中测试功能组件通过该USB Type-C接口与外部调试板连接可实现设备之间的进行通信。该系统中的外部调试板用于向该测试功能组件发送调试消息,从而对该测试功能组件进行调试测试。为便于调试操作,一种实现方式可通过该系统中的计算设备(例如PC机)对该外部调试板发送的调试消息进行配置,由PC 告诉外接调试板选择哪个调试功能,外部调试板根据PC的选择发送对应的调试消息给测试功能组件。另一种实现方式可在外接调试板上加设拨码,通过拨码以及确认键也可以达到选择调试功能的目的。上述测试功能组件可设置并应用到终端中,该终端可以为手机、平板电脑、PDA(Personal Digital Assistant,个人数字助理)等任意终端设备。
本申请具体实施例
图2中的测试功能组件可通过图3中的测试功能组件200实现。该测试功能组件200包括:系统芯片SOC以下简称SOC芯片202、通用串行总线USB切换组件204以及USB Type-C接口206;其中,SOC芯片202和USB切换组件204也可以是集成为一体的芯片,USB切换组件204带有PD芯片。
所述SOC芯片202包含JTAG模块302,所述JTAG模块302引出调试管脚组和配置管脚组,所述调试管脚组中的各调试管脚用于传输调试数据,所述配置管脚组中的各配置管脚用于传输配置指令;
所述USB Type-C接口206包含第一配置通道CC管脚以及传输管脚组;
所述JTAG模块302的调试管脚组和配置管脚组均与所述USB切换组件204相连;
所述USB Type-C接口206的第一CC管脚以及传输管脚组均与所述USB切换组件204相连;
所述USB切换组件204用于当通过所述第一CC管脚接收到用于指示进入调试模式的第一厂商定义消息VDM时,将所述调试管脚组中的各调试管脚与所述传输管脚组中的各传输管脚对应连接,并根据所述第一VDM生成对应的配置指令;
所述JTAG模块302用于当通过所述配置管脚组接收到所述配置指令时,通过所述调试管脚组输出与所述配置指令对应的调试数据。
该测试功能组件可设置到终端(例如手机)中对终端的相关功能进行调试,外部调试板通过USB Type-C接口206向USB切换组件204发送VDM,该USB切换组件204将调试管脚组中的各调试管脚与传输管脚组中的各传输管脚对应连接,并根据该VDM生成对应的配置指令;JTAG模块302通过配置 管脚组接收到配置指令后,通过调试管脚组输出与配置指令对应的调试数据。从而实现不拆机使用JTAG调试功能,提高产品的调试效率。
在一种可能的实现方式中,所述传输管脚组包括第一边带使用SBU1管脚、第二边带使用SBU2管脚、第一数据D+管脚、第二数据D-管脚以及第二CC管脚;
所述调试管脚组包括测试时钟TCK管脚、测试模式选择TMS管脚、测试数据输入TDI管脚、测试数据输出TDO管脚以及测试复位输入TRST_N管脚。
在一种可能的实现方式中,
所述SBU1管脚与所述TMS管脚对应;
所述SBU2管脚与所述TCK管脚对应;
所述D+管脚与所述TDI管脚对应;
所述D-管脚与所述TDO管脚对应;
所述第二CC管脚与所述TRST_N管脚对应。
如图4所示,在一种可能的实现方式中,所述USB切换组件204包括:
功率输出PD芯片402、控制单元404以及开关组件406;
所述PD芯片402与所述控制单元404相连;
所述PD芯片402与所述开关组件406相连;
所述PD芯片402用于通过所述第一CC管脚接收用于指示进入调试模式的第一VDM,并将所述第一VDM发送给控制单元404;
所述控制单元404用于根据所述第一VDM生成对应的配置指令,并向所述JTAG模块302的配置管脚组发送所述配置指令;
所述开关组件406用于根据所述第一VDM将各调试管脚与各传输管脚对应连接。
在一种可能的实现方式中,所述配置管脚组包括第一配置管脚以及第二配置管脚;
当所述第一VDM指示进入的调试模式为传输调试数据模式时,所述控制单元404具体用于向所述第一配置管脚输出低电平,并向所述第二配置管脚输出低电平,所述JTAG模块302还用于从所述SOC芯片202中获取所述传输调试数据模式对应的调试数据;
或,
当所述第一VDM指示进入的调试模式为片上调试和跟踪模式时,所述控制单元404具体用于向所述第一配置管脚输出低电平,并向所述第二配置管脚输出高电平,所述JTAG模块302还用于从所述SOC芯片202中获取所述片上调试和跟踪模式对应的调试数据;
或,
当所述第一VDM指示进入的调试模式为JTAG安全认证模式时,所述控制单元404具体用于向所述第一配置管脚输出高电平,并向所述第二配置管脚输出高电平,所述JTAG模块302还用于从所述SOC芯片202中获取所述JTAG安全认证模式对应的调试数据。
在一种可能的实现方式中,
当所述第一VDM指示进入的调试模式为自定义JTAG模式时,所述控制单元404具体用于向所述第一配置管脚输出高电平,并向所述第二配置管脚输出低电平;
所述JTAG模块302还用于当通过所述传输管脚组接收到自定义JTAG时序信息时,根据所述自定义JTAG时序信息切换至目的调试模式,所述自定义JTAG时序信息为所述SOC芯片202可识别的信息。
如图5所示,在一种可能的实现方式中,所述SOC芯片202还包括:通用异步收发UART控制模块502以及外设控制模块504;
所述UART控制模块502以及所述外设控制模块504通过JTAG的数据选择器MUX(506)与所述JTAG模块302连接;
所述目的调试模式包括UART控制模块调试模式或外设控制模块调试模式;
所述UART控制模块502用于向所述JTAG模块302提供UART控制模块调试模式对应的调试数据;
所述外设控制模块504用于向所述JTAG模块302提供外设控制模块调试模式对应的调试数据。
在一种可能的实现方式中,
所述PD芯片402还用于通过所述第一CC管脚接收用于指示结束调试模 式的第二VDM;
所述控制单元404还用于根据所述第二VDM将所述第一配置管脚以及所述第二配置管脚设置为高阻;
所述开关组件406还用于根据所述第二VDM将所述调试管脚组中的各调试管脚与所述传输管脚组中的各传输管脚对应断开。
下面结合图6或图7中一种可能的设计对该测试功能组件200的组织结构进行具体说明。
图6或图7中,SOC芯片包括JTAG模块,该JTAG模块引出的调试管脚组中包括五个调试管脚,这五个调试管脚分别为:TCK管脚、TMS管脚、TDI管脚、TDO管脚、TRST_N管脚。这些管脚用于驱动电路模块和控制执行规定的操作。各管脚的功能如下所述:
1、TCK(Test Clook)
这是JTAG的测试时钟,为控制器和寄存器提供测试参考。在TCK的同步作用下通过TDI和TDO管脚串行输入或移出数据及指令,同时,TCK为TAP控制器状态机提供时钟。
2、TMS(Test Mode Selector)
控制模式选择器,用TCK的上升沿时刻的TMS管脚的状态来确定控制器的状态。
3、TDI(Test Data Input)
它是JTAG指令和数据寄存器的串行数据输入端,通过控制器和当前状态以及保持在指令寄存器中的具体指令,来指定一个特定的操作由TDI装入哪个寄存器,并在TCK的上升沿时刻被采样,结果送到JTAG寄存器组。
4、TDO(Test Data Output)
它是JTAG指令和数据寄存器的串行数据输出端通过控制器的当前状态以及保持在指令寄存器中的具体指令,来决定在一个特定的操作中哪个寄存器的内容送到TDO输出,对于任何已知的操作,在TDI管脚和TDO管脚之间只能有一个寄存器处于有效连接状态。
5、TRST_N
这是测试复位输入信号,低电平有效,它为控制器提供异步初始化信号。
该JTAG模块引出的配置管脚组中包括两个配置管脚(图示中配置pin),用于传输配置指令。
该USB切换组件包括控制单元、PD芯片、以及开关组件。该PD芯片与所述控制单元相连;该PD芯片与所述开关组件相连。
上述JTAG模块的五个调试管脚均连接到USB切换组件的开关组件上,另外两个配置管脚均连接到USB切换组件的控制单元上。
该USB Type-C接口包含第一CC管脚以及传输管脚组;其中,该传输管脚组包括CC1/CC2管脚,SBU1管脚,SBU2管脚,D+管脚,D-管脚,第一CC管脚(图示中CC1管脚)及各传输管脚均连接到USB切换组件的开关组件上。
现结合图3和图4以及本申请提供的数据调试方法对图6、7中组织结构运行时的工作原理进行说明。
USB Type-C接口规范定义检测到电缆接2个下拉电阻时进入调试模式,基于该规范,在接收到调试消息VDM之前,USB切换组件(USB_SWITCH)默认为非调试模式,该USB切换组件内部的开关组件(switch)和SOC侧JTAG模块上的调试管脚(图6、7所示中TCK管脚、TMS管脚、TDI管脚、TDO管脚、TRST_N管脚)之间是断开的。
图6或图7示出的结构图中还列举了一种JTAG各调试管脚与USB Type-C接口各管脚可能的连接对应关系。例如TCK管脚对应SBU2管脚,TMS管脚对应SBU1管脚,TDI管脚对应D+管脚,TDO管脚对应D-管脚,TRST_N管脚对应CC1管脚或CC2管脚(图7中,USB切换组件控制内部开关组件将调试通道闭合后,TRST_N管脚在开关组件内跟CC1管脚连接,还是CC2管脚连接,取决于手机是正插、还是反插。外接调试板若通过CC1管脚来发送VDM消息,另外一个(CC2管脚)就用作调试管脚。
下面介绍调试模式下图6或图7所示结构的工作状态。例如,当USB切换组件通过USB Type-C接口的CC2管脚接收到外接调试板发送的VDM消息后,该USB切换组件的PD芯片对该VDM消息进行识别,通过开关组件控制TRST_N管脚与CC1管脚、TCK管脚与SBU2管脚,TMS管脚与SBU1管脚,TDI管脚与D+管脚,TDO管脚与D-管脚处于闭合状态,进入调试模式,如图 7所示。同时,基于PD协议将接收到的VDM消息转化为内部可读取的命令,并生成对应的配置指令,由USB切换组件内部的控制单元将生成的配置指令通过JTAG模块上的配置管脚输入给该JTAG模块。该JTAG模块根据该配置指令输出调试数据,该调试数据经调试管脚与USB Type-C接口各管脚之间建立的传输通道传输至外部调试板,从而通过PC机对该调试数据进行调试。
进一步的,在USB切换组件侧,USB切换组件根据接收到的VDM消息生成配置指令,具体可参考如下实现方式。USB切换组件根据接收到的VDM消息来设置跟SOC侧JTAG模块相连的配置管脚(以下简称配置pin)的配置指令。例如两个配置pin,则对应4种配置指令,即:00,01,10,11。
而按调试功能细分,可能存在多达几十种调试模式,如:
JTAG有片上调试和跟踪(Coresight)的调试,数字信号处理的调试等。
UART有应用处理器的调试,低功耗模块的调试等。
外设功能管脚信号有显示器的调试,照相机的调试,照相机的调试等。
所以,上述4种配置指令对应的调试模式中,取其中3种作为优先级很高调试功能,直接用硬线配置,不依赖于系统运行状态,剩下一种模式,可以通过软件配置扩展、切换到其它调试功能,例如,调试功能定义如下:
1、当VDM消息指示进入的调试模式为传输调试数据模式时,控制单元向第一配置管脚输出低电平,并向第二配置管脚输出低电平,JTAG模块从SOC中获取传输调试数据模式对应的调试数据。例如,配置pin输入配置指令00,且调试配置寄存器值为0(默认值为0),定义为输出为查看UART的应用处理器AP运行状态打印日志。
2、当VDM消息指示进入的调试模式为片上调试和跟踪模式时,控制单元向第一配置管脚输出低电平,并向第二配置管脚输出高电平,JTAG模块从SOC中获取片上调试和跟踪模式对应的调试数据。例如,配置pin输入配置指令01,定义为调试应用处理器AP的Coresight。
3、当VDM消息指示进入的调试模式为自定义JTAG模式时,控制单元向第一配置管脚输出高电平,并向第二配置管脚输出低电平;JTAG模块通过传输管脚组接收自定义JTAG向量时序信息,并根据自定义JTAG向量时序信息切换至目的调试模式;其中,自定义JTAG向量时序信息为SOC芯片可识 别的信息,目的调试模式包括UART控制模块调试模式或外设控制模块调试模式。例如,配置pin输入配置指令10,定义为基于JTAG设计的自定义调试模式,该模式通过软件配置可以切换到其它调试功能。
4、当VDM消息指示进入的调试模式为JTAG安全认证模式时,控制单元向第一配置管脚输出高电平,并向所述第二配置管脚输出高电平,所述JTAG模块还用于从所述SOC芯片中获取所述JTAG安全认证模式对应的调试数据。例如,配置pin输入配置指令11,定义为安全认证JTAG(安全认证后才能用JTAG)。
基于上述4种调试功能的定义,定义5种调试VDM消息,由外接调试板上的PD芯片发送给测试功能组件侧。测试功能组件侧的USB切换组件收到后,生成的配置指令或输出可参考表1中的对应关系:
注:表格中jtag_sel1/0为JTAG模块的2个配置pin。
表1
Figure PCTCN2016078151-appb-000002
基于上表1中的描述,如图7所示,当USB切换组件接收到调试用的VDM0,VDM2,VDM4消息后,USB切换组件连通SOC侧JTAG模块上的各调试pin,并直接进入设置SOC对应的调试模式(如上表1中描述的VDM所对应的功能,不同的功能对应不同的调试模式)。
当接收到调试用的VDM3后,该调试模式为自定义JTAG调试模式,可以通过软件配置扩展、切换到其它调试模式,先配置jtag_sel[1:0]=10,使SOC进入基于JTAG设计的自定义调试功能模式。通过外接调试板的调试debug5pin发送SOC能够识别的自定义时序,用于设置调试模式配置寄存器,切换到其它的调试模式,如查看安全子系统串口打印。再通过外接调试板发送VDM0,配置jtag[1:0]=00,让SOC侧输出调试数据、信号。关于该功能下自定义JTAG的调试模式的时序流程图可参考图8。过程如下:
1.1~1.2、外接调试板发送VDM3,进入自定义JTAG调试模式。USB切换组件收到VDM3后,连通调试通道,并设置jtag_sel1/0=10,并发送指令jtag_sel1/0=10至JTAG模块;
2、SOC侧的JTAG模块收到该配置指令jtag_sel1/0=10后切换到自定义JTAG调试模式;
3、外接调试板上的MCU通过调试管脚debug 5pin发送自定义JTAG时序信息发送给USB切换组件;
4、保持jtag_sel1/0=10,由USB切换组件将自定义JTAG时序信息透传给JTAG模块去设置系统寄存器,以切换到其他调试模式;
5.1~5.2、外接调试板发送VDM0,USB切换组件设置jtag_sel1/0=00,发送指令jtag_sel1/0=00至JTAG模块;
6、SOC侧的JTAG模块收到该配置指令jtag_sel1/0=00后切换到目的调试模式;
7.1~7.2、在该目的调试模式下开始调试数据,进行数据的传输。
基于图2所示的调试系统,本申请提供了一种数据调试方法,本申请提供的测试功能组件在运行时执行该方法,其流程示意图如图9所示。
601、通用同步总线USB切换组件通过第一配置通道CC管脚接收用于指示进入调试模式的第一厂商定义消息VDM。
602、所述USB切换组件将调试管脚组中的各调试管脚与传输管脚组中的各传输管脚对应连接,并根据所述第一VDM生成对应的配置指令。
603、所述USB切换组件将所述配置指令通过配置管脚组发送至联合测试工作组JTAG模块。
604、所述JTAG模块通过所述调试管脚组输出与所述配置指令对应的调试数据。
可选的,所述配置管脚组包括第一配置管脚以及第二配置管脚;上述测试功能组件还执行如下步骤:
当所述第一VDM指示进入的调试模式为传输调试数据模式时,所述USB切换组件向所述第一配置管脚输出低电平,并向所述第二配置管脚输出低电平,所述JTAG模块从系统芯片SOC中获取所述传输调试数据模式对应的调试数据;
或,
当所述第一VDM指示进入的调试模式为片上调试和跟踪模式时,所述USB切换组件向所述第一配置管脚输出低电平,并向所述第二配置管脚输出高电平,所述JTAG模块从系统芯片SOC中获取所述片上调试和跟踪模式对应的调试数据;
或,
当所述第一VDM指示进入的调试模式为JTAG安全认证模式时,所述USB切换组件向所述第一配置管脚输出高电平,并向所述第二配置管脚输出高电平,所述JTAG模块从系统芯片SOC中获取所述JTAG安全认证模式对应的调试数据。
可选的,上述测试功能组件还执行如下步骤:
当所述第一VDM指示进入的调试模式为自定义JTAG模式时,所述USB切换组件向所述第一配置管脚输出高电平,并向所述第二配置管脚输出低电平;
所述JTAG模块通过所述传输管脚组接收自定义JTAG时序信息,并根据所述自定义JTAG时序信息切换至目的调试模式,所述自定义JTAG时序信息为所述SOC可识别的信息,所述目的调试模式包括通用异步收发UART控制 模块调试模式或外设控制模块调试模式。
可选的,上述测试功能组件还执行如下步骤:
所述USB切换组件通过所述第一CC管脚接收用于指示结束调试模式的第二VDM;
所述USB切换组件根据所述第二VDM将所述第一配置管脚以及所述第二配置管脚设置为高阻;
所述USB切换组件根据所述第二VDM将所述调试管脚组中的各调试管脚与所述传输管脚组中的各传输管脚对应断开。
上述数据调试方法的相关描述可以对应参阅测试功能组件的装置实施例部分的相关描述和效果进行理解,本处不做过多赘述。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售 或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。
本领域技术人员应该可以意识到,在上述一个或多个示例中,本申请所描述的功能可以用硬件或软件来实现。当使用软件实现时,可以将这些功能存储在计算机可读介质中或者作为计算机可读介质上的一个或多个指令或代码进行传输。存储介质可以是通用或专用计算机能够存取的任何可用介质。
以上所述,以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。

Claims (12)

  1. 一种测试功能组件,其特征在于,包括:
    系统芯片SOC、通用串行总线USB切换组件以及USB Type-C接口;
    所述SOC包含联合测试工作组JTAG模块,所述JTAG模块引出调试管脚组和配置管脚组,所述调试管脚组中的各调试管脚用于传输调试数据,所述配置管脚组中的各配置管脚用于传输配置指令;
    所述USB Type-C接口包含第一配置通道CC管脚以及传输管脚组;
    所述JTAG模块的调试管脚组和配置管脚组均与所述USB切换组件相连;
    所述USB Type-C接口的第一CC管脚以及传输管脚组均与所述USB切换组件相连;
    所述USB切换组件用于当通过所述第一CC管脚接收到用于指示进入调试模式的第一厂商定义消息VDM时,将所述调试管脚组中的各调试管脚与所述传输管脚组中的各传输管脚对应连接,并根据所述第一VDM生成对应的配置指令;
    所述JTAG模块用于当通过所述配置管脚组接收到所述配置指令时,通过所述调试管脚组输出与所述配置指令对应的调试数据。
  2. 根据权利要求1所述的测试功能组件,其特征在于,
    所述传输管脚组包括第一边带使用SBU1管脚、第二边带使用SBU2管脚、第一数据D+管脚、第二数据D-管脚以及第二CC管脚;
    所述调试管脚组包括测试时钟TCK管脚、测试模式选择TMS管脚、测试数据输入TDI管脚、测试数据输出TDO管脚以及测试复位输入TRST_N管脚。
  3. 根据权利要求2所述的测试功能组件,其特征在于,
    所述SBU1管脚与所述TMS管脚对应;
    所述SBU2管脚与所述TCK管脚对应;
    所述D+管脚与所述TDI管脚对应;
    所述D-管脚与所述TDO管脚对应;
    所述第二CC管脚与所述TRST_N管脚对应。
  4. 根据权利要求1至3中任一项所述的测试功能组件,其特征在于,所述USB切换组件包括:
    功率输出PD芯片、控制单元以及开关组件;
    所述PD芯片与所述控制单元相连;
    所述PD芯片与所述开关组件相连;
    所述PD芯片用于通过所述第一CC管脚接收用于指示进入调试模式的第一VDM,并将所述第一VDM发送给控制单元;
    所述控制单元用于根据所述第一VDM生成对应的配置指令,并向所述JTAG模块的配置管脚组发送所述配置指令;
    所述开关组件用于根据所述第一VDM将各调试管脚与各传输管脚对应连接。
  5. 根据权利要求4所述的测试功能组件,其特征在于,所述配置管脚组包括第一配置管脚以及第二配置管脚;
    当所述第一VDM指示进入的调试模式为传输调试数据模式时,所述控制单元具体用于向所述第一配置管脚输出低电平,并向所述第二配置管脚输出低电平,所述JTAG模块还用于从所述SOC中获取所述传输调试数据模式对应的调试数据;
    或,
    当所述第一VDM指示进入的调试模式为片上调试和跟踪模式时,所述控制单元具体用于向所述第一配置管脚输出低电平,并向所述第二配置管脚输出高电平,所述JTAG模块还用于从所述SOC中获取所述片上调试和跟踪模式对应的调试数据;
    或,
    当所述第一VDM指示进入的调试模式为JTAG安全认证模式时,所述控制单元具体用于向所述第一配置管脚输出高电平,并向所述第二配置管脚输出高电平,所述JTAG模块还用于从所述SOC芯片中获取所述JTAG安全认证模式对应的调试数据。
  6. 根据权利要求5所述的测试功能组件,其特征在于,
    当所述第一VDM指示进入的调试模式为自定义JTAG模式时,所述控制单元具体用于向所述第一配置管脚输出高电平,并向所述第二配置管脚输出低电平;
    所述JTAG模块还用于当通过所述传输管脚组接收到自定义JTAG时序信息时,根据所述自定义JTAG时序信息切换至目的调试模式,所述自定义JTAG时序信息为所述SOC芯片可识别的信息。
  7. 根据权利要求6所述的测试功能组件,其特征在于,
    所述SOC芯片还包括:通用异步收发UART控制模块以及外设控制模块;
    所述UART控制模块以及所述外设控制模块通过JTAG的数据选择器MUX与所述JTAG模块连接;
    所述目的调试模式包括UART控制模块调试模式或外设控制模块调试模式;
    所述UART控制模块向所述JTAG模块提供UART控制模块调试模式对应的调试数据;
    所述外设控制模块用于向所述JTAG模块提供外设控制模块调试模式对应的调试数据。
  8. 根据权利要求5至7中任一项所述的测试功能组件,其特征在于,
    所述PD芯片还用于通过所述第一CC管脚接收用于指示结束调试模式的第二VDM;
    所述控制单元还用于根据所述第二VDM将所述第一配置管脚以及所述第二配置管脚设置为高阻;
    所述开关组件还用于根据所述第二VDM将所述调试管脚组中的各调试管脚与所述传输管脚组中的各传输管脚对应断开。
  9. 一种数据调试方法,其特征在于,所述方法应用于如权1至8中任一项所述的测试功能组件,所述方法包括:
    通用同步总线USB切换组件通过第一配置通道CC管脚接收用于指示进入调试模式的第一厂商定义消息VDM;
    所述USB切换组件将调试管脚组中的各调试管脚与传输管脚组中的各传输管脚对应连接,并根据所述第一VDM生成对应的配置指令;
    所述USB切换组件将所述配置指令通过配置管脚组发送至联合测试工作组JTAG模块;
    所述JTAG模块通过所述调试管脚组输出与所述配置指令对应的调试数 据。
  10. 根据权利要求9所述的数据调试方法,其特征在于,所述配置管脚组包括第一配置管脚以及第二配置管脚;所述方法还包括:
    当所述第一VDM指示进入的调试模式为传输调试数据模式时,所述USB切换组件向所述第一配置管脚输出低电平,并向所述第二配置管脚输出低电平,所述JTAG模块从系统芯片SOC中获取所述传输调试数据模式对应的调试数据;
    或,
    当所述第一VDM指示进入的调试模式为片上调试和跟踪模式时,所述USB切换组件向所述第一配置管脚输出低电平,并向所述第二配置管脚输出高电平,所述JTAG模块从系统芯片SOC中获取所述片上调试和跟踪模式对应的调试数据;
    或,
    当所述第一VDM指示进入的调试模式为JTAG安全认证模式时,所述USB切换组件向所述第一配置管脚输出高电平,并向所述第二配置管脚输出高电平,所述JTAG模块从系统芯片SOC中获取所述JTAG安全认证模式对应的调试数据。
  11. 根据权利要求10所述的数据调试方法,其特征在于,所述方法还包括:
    当所述第一VDM指示进入的调试模式为自定义JTAG模式时,所述USB切换组件向所述第一配置管脚输出高电平,并向所述第二配置管脚输出低电平;
    所述JTAG模块通过所述传输管脚组接收自定义JTAG时序信息,并根据所述自定义JTAG时序信息切换至目的调试模式,所述自定义JTAG时序信息为所述SOC可识别的信息,所述目的调试模式包括通用异步收发UART控制模块调试模式或外设控制模块调试模式。
  12. 根据权利要求10或11所述的数据调试方法,其特征在于,所述方法还包括:
    所述USB切换组件通过所述第一CC管脚接收用于指示结束调试模式的 第二VDM;
    所述USB切换组件根据所述第二VDM将所述第一配置管脚以及所述第二配置管脚设置为高阻;
    所述USB切换组件根据所述第二VDM将所述调试管脚组中的各调试管脚与所述传输管脚组中的各传输管脚对应断开。
PCT/CN2016/078151 2016-03-31 2016-03-31 测试功能组件及数据调试方法 WO2017166211A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201680077024.4A CN108475227B (zh) 2016-03-31 2016-03-31 测试功能组件及数据调试方法
PCT/CN2016/078151 WO2017166211A1 (zh) 2016-03-31 2016-03-31 测试功能组件及数据调试方法

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2016/078151 WO2017166211A1 (zh) 2016-03-31 2016-03-31 测试功能组件及数据调试方法

Publications (1)

Publication Number Publication Date
WO2017166211A1 true WO2017166211A1 (zh) 2017-10-05

Family

ID=59963306

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/078151 WO2017166211A1 (zh) 2016-03-31 2016-03-31 测试功能组件及数据调试方法

Country Status (2)

Country Link
CN (1) CN108475227B (zh)
WO (1) WO2017166211A1 (zh)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019183787A1 (zh) * 2018-03-27 2019-10-03 华为技术有限公司 终端设备、调试卡及调试方法
CN110534988A (zh) * 2019-09-25 2019-12-03 上海爻火微电子有限公司 Type A-Type C线缆及其线缆芯片
CN111480152A (zh) * 2018-07-31 2020-07-31 华为技术有限公司 一种接口配置方法、终端设备及接口
CN112131109A (zh) * 2020-09-21 2020-12-25 上海华虹集成电路有限责任公司 基于Python的芯片自动化验证测试系统及方法
CN113934668A (zh) * 2021-11-22 2022-01-14 上海创远仪器技术股份有限公司 针对多fpga芯片电路系统实现下载调试控制的电路结构
CN113986614A (zh) * 2021-10-28 2022-01-28 深圳宏芯宇电子股份有限公司 数据备份与读取系统及其方法
CN114676089A (zh) * 2022-03-28 2022-06-28 歌尔科技有限公司 接口兼容系统、兼容控制方法、电子设备及可读存储介质
US11411582B1 (en) 2021-01-15 2022-08-09 SK Hynix Inc. Machine-learning based LLR generation without assist-read for early-stage soft decoding
CN115756980A (zh) * 2022-11-18 2023-03-07 苏州浪潮智能科技有限公司 一种用于服务器平台的自适应调试系统及方法
US11809355B2 (en) 2021-02-05 2023-11-07 SK Hynix Inc. UART aggregation and JTAG selection circuitry for a multi-solid state drive environment
CN118897222A (zh) * 2024-08-09 2024-11-05 苏州科瑞特奥精工科技有限公司 一种Type-C接口的功能测试电路板及装置

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020232582A1 (zh) * 2019-05-17 2020-11-26 华为技术有限公司 一种具有接口复用功能的集成电路及管脚切换方法
CN111045930A (zh) * 2019-11-18 2020-04-21 武汉光谷信息光电子创新中心有限公司 一种光模块代码下载调试的方法和系统
CN110888046A (zh) * 2019-11-25 2020-03-17 展讯通信(上海)有限公司 系统级芯片及其测试方法、存储介质、终端
CN113495860B (zh) * 2020-03-20 2024-04-19 合肥杰发科技有限公司 Soc设备的数据传输方法、soc设备及具有存储功能的装置
CN112162894B (zh) * 2020-09-25 2022-06-21 展讯通信(上海)有限公司 芯片及其调试组件、调试系统
CN112506727B (zh) * 2020-12-16 2024-07-02 珠海昇生微电子有限责任公司 一种芯片调试、测试以及固件更新的方法及其系统
CN113326057B (zh) * 2021-06-30 2023-04-14 安克创新科技股份有限公司 主控程序升级方法、装置、系统和电子设备
CN114138377B (zh) * 2022-02-08 2022-07-05 荣耀终端有限公司 电子设备及其控制方法、存储介质

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101102566A (zh) * 2007-06-25 2008-01-09 中兴通讯股份有限公司 一种手机jtag调试接口信号设计方法及其调试方法
CN101184310A (zh) * 2007-09-21 2008-05-21 北京天碁科技有限公司 手机测试装置
CN103226506A (zh) * 2013-04-28 2013-07-31 杭州士兰微电子股份有限公司 内嵌于芯片的usb转jtag调试装置及其调试方法

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6754852B2 (en) * 2000-03-02 2004-06-22 Texas Instruments Incorporated Debug trigger builder
US7047462B2 (en) * 2002-01-04 2006-05-16 Hewlett-Packard Development Company, Lp. Method and apparatus for providing JTAG functionality in a remote server management controller
US7149927B2 (en) * 2002-04-19 2006-12-12 Hewlett-Packard Development Company, L.P. Use of SMBus to provide JTAG support
CN201550285U (zh) * 2009-06-11 2010-08-11 大连交通大学 用于无线传感器网络线性组网的网关装置
US8140900B2 (en) * 2009-06-15 2012-03-20 Nokia Corporation Establishing a connection between a testing and/or debugging interface and a connector
CN202102420U (zh) * 2011-04-14 2012-01-04 青岛海信信芯科技有限公司 一种针对射频信号的soc调试工具
CN102214154A (zh) * 2011-05-31 2011-10-12 上海交通大学 基于usb的交流伺服驱动器通信模块及通信方法
CN103136138B (zh) * 2011-11-24 2015-07-01 炬力集成电路设计有限公司 一种芯片、芯片调试方法以及芯片与外部设备通信的方法
CN104391770B (zh) * 2014-10-23 2016-08-24 山东维固信息科技股份有限公司 一种嵌入式数据安全系统用soc芯片的在线调试及上位机通讯模块

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101102566A (zh) * 2007-06-25 2008-01-09 中兴通讯股份有限公司 一种手机jtag调试接口信号设计方法及其调试方法
CN101184310A (zh) * 2007-09-21 2008-05-21 北京天碁科技有限公司 手机测试装置
CN103226506A (zh) * 2013-04-28 2013-07-31 杭州士兰微电子股份有限公司 内嵌于芯片的usb转jtag调试装置及其调试方法

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111886585A (zh) * 2018-03-27 2020-11-03 华为技术有限公司 终端设备、调试卡及调试方法
WO2019183787A1 (zh) * 2018-03-27 2019-10-03 华为技术有限公司 终端设备、调试卡及调试方法
CN111480152B (zh) * 2018-07-31 2022-04-22 华为技术有限公司 一种接口配置方法、终端设备及接口
CN111480152A (zh) * 2018-07-31 2020-07-31 华为技术有限公司 一种接口配置方法、终端设备及接口
CN110534988A (zh) * 2019-09-25 2019-12-03 上海爻火微电子有限公司 Type A-Type C线缆及其线缆芯片
CN112131109A (zh) * 2020-09-21 2020-12-25 上海华虹集成电路有限责任公司 基于Python的芯片自动化验证测试系统及方法
US11411582B1 (en) 2021-01-15 2022-08-09 SK Hynix Inc. Machine-learning based LLR generation without assist-read for early-stage soft decoding
US11809355B2 (en) 2021-02-05 2023-11-07 SK Hynix Inc. UART aggregation and JTAG selection circuitry for a multi-solid state drive environment
CN113986614A (zh) * 2021-10-28 2022-01-28 深圳宏芯宇电子股份有限公司 数据备份与读取系统及其方法
CN113934668A (zh) * 2021-11-22 2022-01-14 上海创远仪器技术股份有限公司 针对多fpga芯片电路系统实现下载调试控制的电路结构
CN114676089A (zh) * 2022-03-28 2022-06-28 歌尔科技有限公司 接口兼容系统、兼容控制方法、电子设备及可读存储介质
CN115756980A (zh) * 2022-11-18 2023-03-07 苏州浪潮智能科技有限公司 一种用于服务器平台的自适应调试系统及方法
CN118897222A (zh) * 2024-08-09 2024-11-05 苏州科瑞特奥精工科技有限公司 一种Type-C接口的功能测试电路板及装置

Also Published As

Publication number Publication date
CN108475227A (zh) 2018-08-31
CN108475227B (zh) 2020-07-21

Similar Documents

Publication Publication Date Title
WO2017166211A1 (zh) 测试功能组件及数据调试方法
US7231560B2 (en) Apparatus and method for testing motherboard having PCI express devices
US9535117B2 (en) System debug using an all-in-one connector
US10634723B2 (en) Method and system for acquisition of test data
EP3274836B1 (en) System and method to enable closed chassis debug control interface using a usb type-c connector
US9251036B2 (en) High speed interchip HSIC USB monitoring
WO2018133242A1 (zh) 终端、调试系统和调试方法
US10824530B2 (en) System, apparatus and method for non-intrusive platform telemetry reporting using an all-in-one connector
CN112041827B (zh) 自动usb主机检测和端口配置方法及装置
US20150106544A1 (en) Connector interface pin mapping
CN105868140A (zh) 一种移动设备
CN108828426A (zh) 自动化硬件测试系统
US20200257601A1 (en) Device, method and system for performing closed chassis debug with a repeater
WO2016184170A1 (zh) Smi接口器件的调试装置及方法、存储介质
CN103795586A (zh) 切换式通信接口检测方法及其装置
TWI449926B (zh) 傳輸介面及判斷傳輸訊號之方法
CN111949538A (zh) 数据分析方法、设备及系统
CN106685588B (zh) 一种适配器、数据传输系统及方法
CN109254937B (zh) Usb集线器、usb设备枚举异常检测方法及计算机存储介质
TWI731295B (zh) 顯示裝置以及控制顯示裝置的方法
CN106371965B (zh) 一种超速片间串行总线的监控系统及方法
CN220340682U (zh) 一种使用外设功能接口进行串口调试的系统和设备
CN119292901A (zh) 用于调试设备的装置和方法
CN115454748A (zh) 一种测试板卡,一种节点选择方法及组件
CN108228504B (zh) 一种pcie设备的对接方法及pcie设备

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16895991

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 16895991

Country of ref document: EP

Kind code of ref document: A1