Peripheral debugging method and device, equipment, storage medium and program product

By obtaining and sending the configuration information to be debugged and bus communication parameters of the target peripheral, the problem of the existing technology that the hardware motherboard can only be developed after it is ready is solved, and the hardware board and peripheral drivers are synchronized development is realized, which improves product development efficiency.

CN119597631APending Publication Date: 2025-03-11GOERTEK INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411718378.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-27
Publication Date
2025-03-11

AI Technical Summary

Technical Problem

During the existing product development process, the hardware motherboard needs to be ready before the peripheral driver can be developed, resulting in low product development efficiency.

Method used

By obtaining the configuration information to be debugged and bus communication parameters of the target peripheral, after connecting to the target peripheral, the configuration information to be debugged is sent to the target peripheral based on the bus communication parameters, receiving and displaying the debugging results, and after the target peripheral is running normally, the configuration information to be debugged is used as the target configuration information.

Benefits of technology

It realizes the independent development of drivers of peripheral devices from hardware boards, and sends configuration information to be debugged through bus communication parameters to test the operation of peripheral devices, which improves the efficiency of product development.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119597631A_ABST
    Figure CN119597631A_ABST
Patent Text Reader

Abstract

The invention discloses a peripheral debugging method and device, equipment, a storage medium and a program product, and relates to the technical field of product development, and the peripheral debugging method comprises the steps: obtaining to-be-debugged configuration information and bus communication parameters of a target peripheral; after being connected with the target peripheral, the to-be-debugged configuration information is sent to the target peripheral based on the bus communication parameters; and receiving and displaying a debugging result fed back by the target peripheral, and taking the to-be-debugged configuration information as target configuration information after the debugging result represents that the target peripheral operates normally. The technical problem that in the existing product development process, a peripheral drive program can be developed only after a hardware mainboard of a product is prepared, and consequently the product development efficiency is low is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of product development technology, and in particular to a peripheral debugging method, device, equipment, storage medium and program product. Background Art

[0002] In the actual product development process, some peripheral devices are often configured for the host device to assist the host device or provide additional functions.

[0003] In the current product development process, usually after the hardware board of the product has dealt with a series of hardware problems such as short circuit, missing patch, wrong patch, disconnected line, etc., the peripherals are connected to the hardware board of the product and the driver of the corresponding peripheral device is developed. In the process of developing the driver, the software configuration of the peripheral device may not be applicable, which requires repeated modification and debugging, thus seriously affecting the efficiency of product development.

[0004] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention

[0005] The main purpose of this application is to provide a peripheral debugging method, device, equipment, storage medium and program product, aiming to solve the technical problem that in the existing product development process, the peripheral driver can only be developed after the product's hardware motherboard is ready, resulting in low product development efficiency.

[0006] To achieve the above object, the present application proposes a peripheral debugging method, which comprises: Obtain the configuration information and bus communication parameters of the target peripheral to be debugged; After connecting with the target peripheral device, sending the configuration information to be debugged to the target peripheral device based on the bus communication parameters; The debugging result fed back by the target peripheral device is received and displayed, and after the debugging result indicates that the target peripheral device operates normally, the configuration information to be debugged is used as the target configuration information.

[0007] In one embodiment, after the step of receiving and displaying the debugging result fed back by the target peripheral device, the peripheral device debugging method further includes: After the debugging result fed back by the target peripheral device indicates that the target peripheral device is operating abnormally, obtaining a configuration modification operation for the debugging result; After the configuration information to be debugged is modified according to the configuration modification operation, new configuration information to be debugged is obtained, and the step of: sending the configuration information to be debugged to the target peripheral device based on the bus communication parameters.

[0008] In one embodiment, the step of obtaining the configuration information to be debugged of the target peripheral device includes: Obtaining pending register sets and pending configuration parameters of the target peripheral device; The pending register set and the pending configuration parameters are used as the configuration information to be debugged of the target peripheral device.

[0009] In one embodiment, the step of obtaining new configuration information to be debugged after modifying the configuration information to be debugged according to the configuration modification operation includes: Modify the pending register set and / or the pending configuration parameter according to the configuration modification operation; The modified pending register set and pending configuration parameters are used as new configuration information to be debugged.

[0010] In one embodiment, the step of sending the configuration information to be debugged to the target peripheral device based on the bus communication parameters after connecting with the target peripheral device comprises: After connecting with the target peripheral device, based on the bus communication parameters, converting the configuration information to be debugged into a bus communication signal matching the bus communication parameters; The bus communication signal is sent to the target peripheral device, so that the target peripheral device loads the configuration information to be debugged.

[0011] In one embodiment, after the debugging result indicates that the target peripheral device is operating normally, before the step of using the configuration information to be debugged as the target configuration information, the method includes: Obtaining a benchmark operating indicator of the target peripheral device; If each debugging operation index in the debugging result matches the benchmark operation index, it is determined that the debugging result indicates that the target peripheral device is operating normally; If each debugging operation index in the debugging result does not match the benchmark operation index, it is determined that the debugging result indicates that the target peripheral device is operating abnormally.

[0012] In addition, to achieve the above-mentioned purpose, the present application also proposes a peripheral debugging device, the peripheral debugging device comprising: a host computer and a slave computer; The host computer comprises a first communication module, which is used to obtain the configuration information to be debugged and the bus communication parameters of the target peripheral device, and send the configuration information to be debugged and the bus communication parameters to the slave computer; The lower computer includes a signal processing module, which is used to send the configuration information to be debugged to the target peripheral device based on the bus communication parameters after being connected to the target peripheral device, and receive the debugging result fed back by the target peripheral device; The lower computer also includes a second communication module, which is used to send the debugging result fed back by the target peripheral device to the upper computer; The host computer further includes a visualization module for displaying the debugging result fed back by the target peripheral device, and after the debugging result indicates that the target peripheral device operates normally, the configuration information to be debugged is used as the target configuration information.

[0013] In addition, to achieve the above objectives, the present application also proposes a peripheral debugging device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the peripheral debugging method described above.

[0014] In addition, to achieve the above objectives, the present application also proposes a storage medium, which is a computer-readable storage medium, and stores a computer program on the storage medium. When the computer program is executed by a processor, the steps of the peripheral debugging method described above are implemented.

[0015] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the peripheral debugging method described above are implemented.

[0016] One or more technical solutions proposed in this application have at least the following technical effects: This application obtains the configuration information to be debugged and the bus communication parameters of the target peripheral device; after connecting to the target peripheral device, based on the bus communication parameters, the configuration information to be debugged is sent to the target peripheral device; the debugging result fed back by the target peripheral device is received and displayed, and after the debugging result indicates that the target peripheral device is running normally, the configuration information to be debugged is used as the target configuration information. Thus, this application separates the driver development work of the peripheral device from the hardware board of the product, so that the configuration information to be debugged is sent to the target peripheral device with the help of the bus communication parameters of the target peripheral device to test whether the target peripheral device can run normally under the configuration information to be debugged. After the debugging result indicates that the target peripheral device is running normally, the configuration information to be debugged is used as the target configuration information, which can be directly incorporated into the driver program for driving the target peripheral device to run normally. Therefore, compared with the existing product development process, which requires the hardware motherboard of the product to be ready before the driver program of the peripheral device can be developed, this application can simultaneously develop the product hardware board and the peripheral driver program, effectively improving the efficiency of product development. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0018] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0019] Figure 1 A flowchart of the first embodiment of the peripheral debugging method of the present application is provided; Figure 2 A schematic diagram of a scenario of connection with a target peripheral device involved in an embodiment of the present application; Figure 3 A flowchart of the second embodiment of the peripheral debugging method of the present application is provided; Figure 4 A flowchart of the third embodiment of the peripheral debugging method of the present application is provided; Figure 5 This is a schematic diagram of the module structure of the peripheral debugging device according to an embodiment of the present application; Figure 6 Schematic diagram of the device structure of the hardware operating environment involved in the peripheral debugging method in the embodiment of the present application.

[0020] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0021] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.

[0022] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0023] The main solution of the embodiment of the present application is: obtaining the configuration information to be debugged and the bus communication parameters of the target peripheral device; after connecting to the target peripheral device, sending the configuration information to be debugged to the target peripheral device based on the bus communication parameters; receiving and displaying the debugging results fed back by the target peripheral device, and after the debugging results indicate that the target peripheral device is operating normally, using the configuration information to be debugged as the target configuration information.

[0024] In this embodiment, for the convenience of description, the following description is made with the external debugging device as the execution subject.

[0025] In the existing product development process, usually after the hardware board of the product has dealt with a series of hardware problems such as short circuit, missing patch, wrong patch, disconnected line, etc., the peripherals are connected to the hardware board of the product and the driver of the corresponding peripheral device is developed. In the process of developing the driver, the software configuration of the peripheral device may not be applicable, which requires repeated modification and debugging, thus seriously affecting the efficiency of product development.

[0026] The present application provides a solution, by separating the driver development work of the peripheral device from the hardware board of the product, so that the configuration information to be debugged is sent to the target peripheral with the help of the bus communication parameters of the target peripheral, so as to test whether the target peripheral can operate normally under the configuration information to be debugged. After the debugging result indicates that the target peripheral operates normally, the configuration information to be debugged is used as the target configuration information, which can be directly incorporated into the driver to drive the target peripheral to operate normally. Therefore, compared with the existing product development process, which requires the hardware motherboard of the product to be ready before the driver of the peripheral can be developed, the present application can simultaneously develop the product hardware board and the peripheral driver, effectively improving the efficiency of product development.

[0027] Based on this, the present application embodiment provides a peripheral debugging method, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the peripheral debugging method of the present application.

[0028] In this embodiment, the peripheral debugging method includes steps S10 to S40: Step S10, obtaining the configuration information to be debugged and bus communication parameters of the target peripheral device; It should be noted that the executor of this embodiment is a peripheral debugging device, which can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, personal computer, mobile phone and other electronic devices that can realize the above functions.

[0029] It should be noted that the target peripheral is a peripheral device for which configuration information debugging is desired. The configuration information to be debugged is configuration information required for the operation of the target peripheral, including at least a register set and configuration parameters.

[0030] In addition, it should be noted that the bus communication parameters are related parameters for configuring the bus communication of the target peripheral device, such as bus type, data format, communication protocol, baud rate, etc.

[0031] This embodiment can receive the configuration information to be debugged and bus communication parameters input by the user, or the target peripheral selected by the user, and then query the configuration information to be debugged and bus communication parameters of the target peripheral from the predetermined storage space. The register set in the configuration information to be debugged is used to control the function implementation of the target peripheral, and the configuration parameters are used to configure the specific values ​​used by each register in the register set to determine the working mode of the target peripheral. The bus communication parameters can be determined according to the bus and device type of the target peripheral.

[0032] Step S20, after connecting with the target peripheral device, sending the configuration information to be debugged to the target peripheral device based on the bus communication parameters; In this embodiment, after the peripheral debugging device is connected to the target peripheral device, based on the bus communication parameters, the configuration information to be debugged is converted into a bus communication signal that matches the bus communication parameters, and then the bus communication signal is sent to the target peripheral device, so that the target peripheral device loads the configuration information to be debugged and runs under the configuration information to be debugged. In this embodiment, the target peripheral device can be connected to the target peripheral device through a docking module on the peripheral debugging device, and the docking module includes a plurality of signal lines for electrically connecting to the bus of the target peripheral device. The number of the signal lines can be determined according to the bus type of the target peripheral device to be connected. For example, Figure 2 As shown, the docking module includes 4 signal lines, namely signal line 1, signal line 2, signal line 3 and signal line 4. For a target peripheral with an I2C (Inter-Integrated Circuit) bus or a UART (Universal Asynchronous Receiver / Transmitter) bus, this embodiment requires connecting signal line 1 and signal line 2 to the target peripheral. For a target peripheral with an SPI (Serial Peripheral Interface) bus, signal line 1, signal line 2, signal line 3 and signal line 4 are all required to be connected to the target peripheral. Figure 2 VCC is the power supply line, and GND is the ground line. Therefore, this embodiment can reuse the signal lines to achieve compatibility with target peripherals of various bus types. Compared with the method that requires multiple different types of data lines to be replaced, the method of connecting the docking module with multiple signal lines to the target peripheral in this embodiment has a wider range of application and stronger compatibility.

[0033] In a feasible implementation, step S20 may include steps S21-S22: Step S21, after connecting with the target peripheral device, based on the bus communication parameters, converting the configuration information to be debugged into a bus communication signal matching the bus communication parameters; Step S22, sending the bus communication signal to the target peripheral device, so that the target peripheral device loads the configuration information to be debugged.

[0034] In this embodiment, after the peripheral debugging device is connected to the target peripheral, based on the bus communication parameters, the configuration information to be debugged can be converted into a bus communication signal that matches the bus communication parameters. Then the bus communication signal is sent to the target peripheral so that the target peripheral loads the configuration information to be debugged and runs under the configuration information to be debugged. Exemplarily, this embodiment can perform data encoding and checksum generation on the configuration information to be debugged according to the communication protocol and data format in the bus communication parameters, and convert it into data to be transmitted that conforms to the above communication protocol and data format. Then the data to be transmitted is converted into an electrical signal (i.e., a bus communication signal) suitable for bus transmission by signal modulation. Then the timing control is performed according to the communication protocol and baud rate, and the bus communication signal is sent to the target peripheral.

[0035] Step S30, receiving and displaying the debugging result fed back by the target peripheral device, and after the debugging result indicates that the target peripheral device operates normally, using the configuration information to be debugged as the target configuration information.

[0036] It should be noted that the debugging result may include debugging operation indicators describing the operation status of the target peripheral device, such as state parameters and performance parameters, under the configuration information to be debugged.

[0037] In this embodiment, after the target peripheral device loads the configuration information to be debugged and runs under the configuration information to be debugged, it will feedback the debugging result describing its running state. In this embodiment, after receiving the debugging result fed back by the target peripheral device, the debugging result can be visualized and the debugging result after visualization can be displayed. In this embodiment, the user can directly view the debugging result after visualization, and select the debugging result to represent that the target peripheral device is running normally or to represent that the target peripheral device is running abnormally. In this embodiment, after receiving the normal device instruction issued by the user for the debugging result, it can be determined that the debugging result represents that the target peripheral device is running normally. After receiving the abnormal device instruction issued by the user for the debugging result, it can be determined that the debugging result represents that the target peripheral device is running abnormally. Of course, as another example, it is also possible to obtain the benchmark operating index of the target peripheral device, wherein the benchmark operating index is a parameter index when the target peripheral device is in a normal operating state. If each debugging operating index in the debugging result matches the benchmark operating index, it can be determined that the debugging result represents that the target peripheral device is running normally; if each debugging operating index in the debugging result does not match the benchmark operating index, it is determined that the debugging result represents that the target peripheral device is running abnormally. Therefore, this embodiment can quickly and automatically identify whether the target peripheral runs abnormally under the configuration information to be debugged. After the debugging result indicates that the target peripheral runs normally, the configuration information to be debugged is used as the target configuration information.

[0038] The first embodiment of the present application provides a peripheral debugging method, by obtaining the configuration information to be debugged and the bus communication parameters of the target peripheral; after connecting to the target peripheral, based on the bus communication parameters, the configuration information to be debugged is sent to the target peripheral; receiving and displaying the debugging result fed back by the target peripheral, and after the debugging result indicates that the target peripheral is running normally, the configuration information to be debugged is used as the target configuration information. Thus, this embodiment separates the driver development work of the peripheral device from the hardware board of the product, so that the configuration information to be debugged is sent to the target peripheral with the help of the bus communication parameters of the target peripheral to test whether the target peripheral can run normally under the configuration information to be debugged. After the debugging result indicates that the target peripheral is running normally, the configuration information to be debugged is used as the target configuration information, which can be directly incorporated into the driver to drive the target peripheral to run normally. Therefore, compared with the existing product development process, in which the hardware motherboard of the product is ready before the driver of the peripheral can be developed, this embodiment can simultaneously develop the product hardware board and the peripheral driver, effectively improving the efficiency of product development.

[0039] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Figure 3 After the step of receiving and displaying the debugging result fed back by the target peripheral device in step S30, the peripheral device debugging method further includes steps S40 to S50: Step S40, after the debugging result fed back by the target peripheral device indicates that the target peripheral device is operating abnormally, obtaining a configuration modification operation for the debugging result; Step S50, after the configuration information to be debugged is modified according to the configuration modification operation, new configuration information to be debugged is obtained, and the step of: sending the configuration information to be debugged to the target peripheral device based on the bus communication parameters.

[0040] This embodiment obtains the configuration modification operation performed by the user on the debugging result after the debugging result fed back by the target peripheral indicates that the target peripheral is operating abnormally. In addition, this embodiment can modify the configuration information to be debugged according to the configuration modification operation to obtain new configuration information to be debugged, and execute the steps: based on the bus communication parameters, the configuration information to be debugged is sent to the target peripheral. Thereby, the target peripheral loads the new configuration information to be debugged and operates under the new configuration information to be debugged. Until the debugging result indicates that the target peripheral is operating normally, the configuration information to be debugged is used as the target configuration information.

[0041] In a feasible implementation, step S10 may include steps S11-S12: Step S11, obtaining a pending register set and pending configuration parameters of the target peripheral device; Step S12: Using the pending register set and the pending configuration parameters as the configuration information to be debugged of the target peripheral.

[0042] The register sets and configuration parameters that need to be configured for different types of peripherals are also different. For example, for UART bus peripherals: the register set includes a receive buffer register, a send hold register, a line status register, a line control register, a baud rate divisor register, etc., and the configuration parameters include baud rate, data bit, stop bit, check, flow control, etc. For SPI bus peripherals: the register set includes a data register, a status register, and a control register, and the configuration parameters include clock polarity, clock phase, data frame size, master-slave mode selection, clock rate, etc. For I2C bus peripherals: the register set includes a data register, a status register, a control register, etc., and the configuration parameters include address mode, clock rate, response mode, etc. Of course, due to differences in hardware platforms and manufacturers, more or less registers may be included in the register set, and more or less parameters may be included in the configuration parameters. Therefore, this embodiment can obtain the pending register set and pending configuration parameters of the target peripheral input or selected by the user, and use the pending register set and pending configuration parameters as the configuration information to be debugged of the target peripheral, so as to provide for subsequent testing of whether the pending register set and pending configuration parameters in the configuration information to be debugged can support the normal operation of the target peripheral.

[0043] In a feasible implementation manner, the step of obtaining new configuration information to be debugged after modifying the configuration information to be debugged according to the configuration modification operation in step S50 may include steps S51-S52: Step S51, modifying the pending register set and / or pending configuration parameters according to the configuration modification operation; Step S52: Use the modified pending register set and pending configuration parameters as new configuration information to be debugged.

[0044] In this embodiment, the configuration modification operation may modify only the pending register set, or may modify only the pending configuration parameters, or may modify both the pending register set and the pending configuration parameters. Therefore, in the case where the configuration modification operation only modifies the pending register set, the present embodiment may modify the pending register set according to the configuration modification operation, and use the pending configuration parameters and the modified pending register set as new configuration information to be debugged. In the case where the configuration modification operation only modifies the pending configuration parameters, the present embodiment may modify the pending configuration parameters according to the configuration modification operation, and use the pending register set and the modified pending configuration parameters as new configuration information to be debugged. In the case where the configuration modification operation modifies both the pending register set and the pending configuration parameters, the present embodiment may modify the pending configuration parameters and the pending register set according to the configuration modification operation, and use the modified pending configuration parameters and the pending register set as new configuration information to be debugged. It can be understood that the way to modify the pending register set is to modify the registers in the register set, and the way to modify the pending configuration parameters is to modify the specific values ​​of the configuration parameters in the pending configuration parameters.

[0045] The second embodiment of the present application provides a peripheral debugging method, after the debugging result fed back by the target peripheral indicates that the target peripheral is running abnormally, a configuration modification operation for the debugging result is obtained. Then, after the configuration information to be debugged is modified according to the configuration modification operation, new configuration information to be debugged is obtained, and the steps are executed; based on the bus communication parameters, the configuration information to be debugged is sent to the target peripheral. Until the debugging result indicates that the target peripheral is running normally, the configuration information to be debugged is used as the target configuration information. Therefore, after the debugging result fed back by the target peripheral indicates that the target peripheral is running abnormally, this embodiment gradually modifies the configuration information to be debugged until the configuration information to be debugged that can make the target peripheral run normally is obtained as the target configuration information.

[0046] Based on the first embodiment of the present application, in the third embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Figure 4 , after the debugging result indicates that the target peripheral device is operating normally in step S30, before the step of using the configuration information to be debugged as the target configuration information, the method includes steps S31 to S33: Step S31, obtaining a benchmark operating index of a target peripheral device; Step S32, if each debugging operation index in the debugging result matches the reference operation index, it is determined that the debugging result indicates that the target peripheral device is operating normally; Step S32: If the debugging operation indicators in the debugging result do not match the reference operation indicators, it is determined that the debugging result indicates that the target peripheral device is operating abnormally.

[0047] It should be noted that the benchmark operating index is a parameter index when the target peripheral device is in a normal operating state.

[0048] This embodiment can obtain the benchmark operating indicators of the target peripheral device, and then determine whether each debugging operating indicator in the debugging result matches the benchmark operating indicator. If each debugging operating indicator in the debugging result matches the benchmark operating indicator, it means that the target peripheral device is in a normal operating state, and it can be determined that the debugging result indicates that the target peripheral device is operating normally; if each debugging operating indicator in the debugging result does not match the benchmark operating indicator, it means that the target peripheral device is not in a normal operating state, and it can be determined that the debugging result indicates that the target peripheral device is operating abnormally.

[0049] The second embodiment of the present application provides a peripheral debugging method, whereby this embodiment obtains the benchmark operating indicators of the target peripheral; if each debugging operating indicator in the debugging result matches the benchmark operating indicator, then the debugging result is determined to indicate that the target peripheral is operating normally; if each debugging operating indicator in the debugging result does not match the benchmark operating indicator, then the debugging result is determined to indicate that the target peripheral is operating abnormally. Thus, it is possible to quickly and automatically identify whether the target peripheral is operating abnormally under the configuration information to be debugged. After the debugging result indicates that the target peripheral is operating normally, the configuration information to be debugged is used as the target configuration information.

[0050] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the peripheral debugging method of the present application. More simple transformations based on this technical concept are all within the protection scope of the present application.

[0051] This application also provides a peripheral debugging device, please refer to Figure 4 , the peripheral debugging device includes: a host computer 10 and a slave computer 20; The host computer 10 includes a first communication module 11, which is used to obtain the configuration information to be debugged and the bus communication parameters of the target peripheral device 30, and send the configuration information to be debugged and the bus communication parameters to the slave computer 20; The lower computer 20 includes a signal processing module 21, which is used to send the configuration information to be debugged to the target peripheral device 30 based on the bus communication parameters after being connected to the target peripheral device 30, and receive the debugging result fed back by the target peripheral device; The lower computer 20 further includes a second communication module 22 for sending the debugging result fed back by the target peripheral device 30 to the upper computer 10; The host computer 10 further includes a visualization module 12 for displaying the debugging result fed back by the target peripheral device 30 , and after the debugging result indicates that the target peripheral device 30 operates normally, the configuration information to be debugged is used as the target configuration information.

[0052] In addition, the docking module on the signal processing module 21 is connected to the target peripheral device 30, and the docking module includes a plurality of signal lines for electrically connecting to the bus of the target peripheral device 30. The number of the signal lines can be determined according to the bus type of the target peripheral device 30 to be connected. Figure 4 As shown, the docking module includes 4 signal lines, namely signal line 1, signal line 2, signal line 3 and signal line 4. For a target peripheral 30 with an I2C bus or a UART bus, this embodiment requires that signal line 1 and signal line 2 be connected to the target peripheral 30. For a target peripheral 30 with an SPI bus, signal line 1, signal line 2, signal line 3 and signal line 4 are all required to be connected to the target peripheral 30. Therefore, this embodiment can reuse the signal lines to achieve compatibility with target peripherals 30 of multiple bus types. Compared with the method that requires multiple different types of data lines to be replaced, the method of connecting a docking module with multiple signal lines to the target peripheral 30 in this embodiment has a wider range of application and stronger compatibility.

[0053] In one embodiment, the visualization module 12 is further configured to: After the debugging result fed back by the target peripheral device indicates that the target peripheral device is operating abnormally, obtaining a configuration modification operation for the debugging result; After the configuration information to be debugged is modified according to the configuration modification operation, new configuration information to be debugged is obtained, and the step of: sending the configuration information to be debugged to the target peripheral device based on the bus communication parameters.

[0054] In one embodiment, the first communication module [Zhang Fangfang 1] is further used for: Obtaining pending register sets and pending configuration parameters of the target peripheral device; The pending register set and the pending configuration parameters are used as the configuration information to be debugged of the target peripheral device.

[0055] In one embodiment, the visualization module is further configured to: Modify the pending register set and / or the pending configuration parameter according to the configuration modification operation; The modified pending register set and pending configuration parameters are used as new configuration information to be debugged.

[0056] In one embodiment, the signal processing module is further used for: After connecting with the target peripheral device, based on the bus communication parameters, converting the configuration information to be debugged into a bus communication signal matching the bus communication parameters; The bus communication signal is sent to the target peripheral device, so that the target peripheral device loads the configuration information to be debugged.

[0057] In one embodiment, the visualization module is further configured to: Obtaining a benchmark operating indicator of the target peripheral device; If each debugging operation index in the debugging result matches the benchmark operation index, it is determined that the debugging result indicates that the target peripheral device is operating normally; If each debugging operation index in the debugging result does not match the benchmark operation index, it is determined that the debugging result indicates that the target peripheral device is operating abnormally.

[0058] The peripheral debugging device provided by the present application adopts the peripheral debugging method in the above embodiment, which can solve the technical problem that the driver program of the peripheral device can only be developed after the hardware motherboard of the product is ready in the existing product development process, resulting in low product development efficiency. Compared with the prior art, the beneficial effects of the peripheral debugging device provided by the present application are the same as the beneficial effects of the peripheral debugging method provided by the above embodiment, and the other technical features in the peripheral debugging device are the same as the features disclosed in the above embodiment method, which will not be repeated here.

[0059] The present application provides a peripheral debugging device, which includes: at least one processor; and a memory that is communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the peripheral debugging method in the above-mentioned embodiment 1.

[0060] Reference below Figure 5 , which shows a schematic diagram of the structure of a peripheral debugging device suitable for implementing the embodiment of the present application. The peripheral debugging device in the embodiment of the present application may include but is not limited to terminal devices such as smart phones, laptops, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions: tablet computers), desktop computers, etc. Figure 5 The peripheral debugging device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0061] like Figure 5As shown, the peripheral debugging device may include a processing device 1001 (such as a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the peripheral debugging device are also stored. The processing device 1001, ROM1002 and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the peripheral debugging device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows a peripheral debugging device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.

[0062] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.

[0063] The peripheral debugging device provided by the present application adopts the peripheral debugging method in the above embodiment, which can solve the technical problem that the driver program of the peripheral device can only be developed after the hardware motherboard of the product is ready in the existing product development process, resulting in low product development efficiency. Compared with the prior art, the beneficial effects of the peripheral debugging device provided by the present application are the same as the beneficial effects of the peripheral debugging method provided by the above embodiment, and the other technical features in the peripheral debugging device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.

[0064] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0065] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0066] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, wherein the computer-readable program instructions are used to execute the peripheral debugging method in the above-mentioned embodiment.

[0067] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM: Random Access Memory), a read-only memory (ROM: Read Only Memory), an erasable programmable read-only memory (EPROM: Erasable Programmable Read Only Memory or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM: CD-Read Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency: Radio Frequency), etc., or any suitable combination of the above.

[0068] The computer-readable storage medium may be included in the peripheral debugging device; or may exist independently without being assembled into the peripheral debugging device.

[0069] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the peripheral debugging device, the peripheral debugging device: obtains the configuration information to be debugged and the bus communication parameters of the target peripheral; after connecting with the target peripheral, sends the configuration information to be debugged to the target peripheral based on the bus communication parameters; receives and displays the debugging result fed back by the target peripheral, and after the debugging result indicates that the target peripheral is running normally, uses the configuration information to be debugged as the target configuration information.

[0070] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0071] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0072] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.

[0073] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned peripheral debugging method, and can solve the technical problem that the driver program of the peripheral device can only be developed after the hardware motherboard of the product is ready in the existing product development process, resulting in low product development efficiency. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the peripheral debugging method provided by the above-mentioned embodiment, and will not be repeated here.

[0074] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned peripheral debugging method when executed by a processor.

[0075] The computer program product provided by the present application can solve the technical problem that the driver program of the peripheral device can only be developed after the hardware motherboard of the product is ready in the existing product development process, resulting in low product development efficiency. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as the beneficial effects of the peripheral device debugging method provided by the above embodiment, and will not be repeated here.

[0076] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.

Claims

1. A peripheral debugging method, characterized in that: The peripheral debugging method comprises: Obtain the configuration information and bus communication parameters of the target peripheral to be debugged; After connecting with the target peripheral device, sending the configuration information to be debugged to the target peripheral device based on the bus communication parameters; The debugging result fed back by the target peripheral device is received and displayed, and after the debugging result indicates that the target peripheral device operates normally, the configuration information to be debugged is used as the target configuration information.

2. The peripheral debugging method according to claim 1, characterized in that: After the step of receiving and displaying the debugging result fed back by the target peripheral device, the peripheral device debugging method further includes: After the debugging result fed back by the target peripheral device indicates that the target peripheral device is operating abnormally, obtaining a configuration modification operation for the debugging result; After the configuration information to be debugged is modified according to the configuration modification operation, new configuration information to be debugged is obtained, and the step of: sending the configuration information to be debugged to the target peripheral device based on the bus communication parameters.

3. The peripheral debugging method according to claim 2, characterized in that: The step of obtaining the configuration information to be debugged of the target peripheral device includes: Obtaining pending register sets and pending configuration parameters of the target peripheral device; The pending register set and the pending configuration parameters are used as the configuration information to be debugged of the target peripheral device.

4. The peripheral debugging method according to claim 3, characterized in that: The step of obtaining new configuration information to be debugged after modifying the configuration information to be debugged according to the configuration modification operation includes: Modify the pending register set and / or the pending configuration parameter according to the configuration modification operation; The modified pending register set and pending configuration parameters are used as new configuration information to be debugged.

5. The peripheral debugging method according to claim 1, characterized in that: The step of sending the configuration information to be debugged to the target peripheral device based on the bus communication parameters after connecting with the target peripheral device comprises: After connecting with the target peripheral device, based on the bus communication parameters, converting the configuration information to be debugged into a bus communication signal matching the bus communication parameters; The bus communication signal is sent to the target peripheral device, so that the target peripheral device loads the configuration information to be debugged.

6. The peripheral debugging method according to any one of claims 1 to 5, characterized in that: After the debugging result indicates that the target peripheral device is operating normally, before the step of using the configuration information to be debugged as the target configuration information, the method includes: Obtaining a benchmark operating indicator of the target peripheral device; If each debugging operation index in the debugging result matches the benchmark operation index, it is determined that the debugging result indicates that the target peripheral device is operating normally; If each debugging operation index in the debugging result does not match the benchmark operation index, it is determined that the debugging result indicates that the target peripheral device is operating abnormally.

7. A peripheral debugging device, characterized in that: The peripheral debugging device comprises: an upper computer and a lower computer; The host computer comprises a first communication module, which is used to obtain the configuration information to be debugged and the bus communication parameters of the target peripheral device, and send the configuration information to be debugged and the bus communication parameters to the slave computer; The lower computer includes a signal processing module, which is used to send the configuration information to be debugged to the target peripheral device based on the bus communication parameters after being connected to the target peripheral device, and receive the debugging result fed back by the target peripheral device; The lower computer also includes a second communication module, which is used to send the debugging result fed back by the target peripheral device to the upper computer; The host computer further includes a visualization module for displaying the debugging result fed back by the target peripheral device, and after the debugging result indicates that the target peripheral device operates normally, the configuration information to be debugged is used as the target configuration information.

8. A peripheral debugging device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the peripheral debugging method according to any one of claims 1 to 6.

9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the peripheral debugging method according to any one of claims 1 to 6 are implemented.

10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the peripheral debugging method according to any one of claims 1 to 6 are implemented.