Test method and device

By directly entering the test mode when the electronic device is powered on, the problem of time-consuming and affecting the test efficiency is solved, and efficient testing process compatibility is achieved.

CN118916224APending Publication Date: 2024-11-08UNIGROUP SPREADTRUM COMM HUIZHOU CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410962733.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-17
Publication Date
2024-11-08

AI Technical Summary

Technical Problem

The existing electronic equipment testing methods need to be turned on first, which will cause time-consuming startup and affect the testing efficiency.

Method used

By directly entering the test mode when the electronic device is powered on or after powering on, there is no need to enter the power-on state. Use command line instructions or information in the storage device to trigger the peripheral device to enter the test mode, including MMI mode, sleep mode, aging mode or power-on mode, without entering the power-on state. .

Benefits of technology

It reduces the boot delay, improves testing efficiency, and is compatible with multi-button, single-button, and no-button electronic devices, and supports diverse test scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118916224A_ABST
    Figure CN118916224A_ABST
Patent Text Reader

Abstract

The invention discloses a test method and device, and relates to the technical field of computers.The method comprises the steps that electronic equipment is powered on, and peripheral equipment of the electronic equipment is initialized; acquiring a command line instruction, and triggering the peripheral equipment to enter a test mode based on the command line instruction; or acquiring the first information from the storage equipment connected with the electronic equipment, and triggering the peripheral equipment to enter the test mode based on the first information; wherein the test mode comprises a man-machine interface (MMI) mode, a sleep mode, an aging mode or a startup mode. Therefore, the electronic equipment enters the test mode to be tested when being powered on or after being powered on, and does not need to enter a power-on state, so that the time delay caused by power-on is reduced, and the test efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computers, and in particular to a testing method and device. Background Art

[0002] Currently, electronic devices need to be tested before they are put on the market to verify whether their functions are working properly.

[0003] Generally speaking, when testing electronic equipment, it is necessary to turn it on first and then test it. However, this method of turning it on first and then testing it will consume time to turn it on, thus affecting the test efficiency. Summary of the invention

[0004] The embodiments of the present application provide a testing method and device, in which the electronic device enters a test mode for testing when or after it is powered on, without entering the power-on state, thereby reducing the delay caused by the power-on and improving the testing efficiency.

[0005] In a first aspect, an embodiment of the present application provides a testing method, including: powering on an electronic device and initializing peripheral devices of the electronic device; obtaining command line instructions, and triggering the peripheral devices to enter a test mode based on the command line instructions; or, obtaining first information from a storage device connected to the electronic device, and triggering the peripheral devices to enter a test mode based on the first information; wherein the test mode includes a human-machine interface MMI mode, a sleep mode, an aging mode, or a power-on mode.

[0006] Based on the method provided in the first aspect, the electronic device enters the test mode for testing when it is powered on or after it is powered on, without entering the power-on state, reducing the delay caused by the power-on, thereby improving the test efficiency. At the same time, the test mode can be entered through a storage device connected to the electronic device, without entering the test mode through a combination of keys, that is, in this method, multi-button, single-button, and buttonless electronic devices can be compatible. In this way, the diversification of electronic devices and test scenarios can be supported, and the test efficiency can also be improved.

[0007] In one possible implementation, a command line instruction is used to instruct a peripheral device to enter a test mode, and triggering the peripheral device to enter the test mode based on the command line instruction includes: the command line instruction includes operating parameters of the peripheral device, or, obtaining the operating parameters of the peripheral device associated with the test mode from the memory of the electronic device; the peripheral device enters the test mode, and the peripheral device is operated based on the operating parameters of the peripheral device.

[0008] In one possible implementation, the first information is used to instruct the peripheral device to enter a test mode, and triggering the peripheral device to enter the test mode based on the first information includes: the first information includes operating parameters of the peripheral device, or obtaining the operating parameters of the peripheral device associated with the test mode from the memory of the electronic device; the peripheral device enters the test mode, and the peripheral device is operated based on the operating parameters of the peripheral device.

[0009] In one possible implementation, before obtaining the first information from a storage device connected to the electronic device, the method also includes: calling a first function to obtain second information from the storage device, the second information being used to indicate that a connection has been established between the storage device and the electronic device; loading a driver file corresponding to the storage device into a memory configured by a file allocation table (FAT), and running the driver file corresponding to the storage device to perform data transmission with the storage device.

[0010] In a possible implementation, the second function may be called to determine whether there is abnormal information in the memory associated with the second function; calling the first function includes: calling the first function when there is no abnormal information in the memory associated with the second function. By implementing this possible implementation, the electronic device calls the first function only when there is no abnormal information in the memory associated with the second function, ensuring that there is no abnormal information in the memory, thereby improving security and reliability.

[0011] In a possible implementation, prompt information may also be output, the prompt information being used to indicate the test result of the peripheral device in the test mode. By implementing this possible implementation, the user may clearly understand the test result, which is helpful for the user to find a better solution.

[0012] In a possible implementation, outputting prompt information includes: determining the test result when the peripheral device completes the test in the test mode; and outputting prompt information when the test result includes the result of an error in the operation of the peripheral device. By implementing this possible implementation, the user can better understand the test result when the test result includes the result of an error in the operation of the peripheral device of the electronic device, which is helpful for the user to better understand the solution to the erroneous test result, and the number of times the prompt information is output can be reduced, which is helpful for improving efficiency.

[0013] In a second aspect, an embodiment of the present application provides a testing device, which includes a unit for executing the method of the first aspect.

[0014] In a third aspect, the present application provides a chip comprising a processor and a communication interface, the processor being configured to enable the chip to execute the method of the first aspect or the second aspect mentioned above, and the communication interface being configured to receive signals from other devices outside the chip and transmit them to the processor or to send signals from the processor to other devices outside the chip.

[0015] In a fourth aspect, an embodiment of the present application provides a testing device, including a memory and a processor, the memory is used to store a computer program, the computer program includes program instructions, and the processor is configured to call the program instructions to execute the method of the first aspect above.

[0016] In a fifth aspect, the present application provides a computer-readable storage medium, in which computer-readable instructions are stored. When the computer-readable instructions are executed on a communication device, the communication device executes the method of the first aspect.

[0017] In a sixth aspect, the present application provides a computer program or a computer program product, comprising codes or instructions, which, when executed on a computer, enable the computer to execute the method of the first aspect described above. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application;

[0019] Figure 2 A schematic diagram of the software structure of an electronic device provided in an embodiment of the present application;

[0020] Figure 3 A flow chart of a testing method provided in an embodiment of the present application;

[0021] Figure 4 is a structural schematic diagram of a testing device provided in an embodiment of the present application;

[0022] Figure 5 It is a structural schematic diagram of a testing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0023] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0024] The terms used in the following embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to be used as limitations on the present application. As used in the specification and appended claims of the present application, the singular expressions "a", "a", "said", "above", "the" and "this" are intended to also include plural expressions, unless there is a clear indication to the contrary in the context.

[0025] In the embodiments of the present application, "and / or" describes the association relationship of the associated objects, indicating that three relationships may exist. For example, A and / or B can represent the following three situations: A exists alone; A and B exist at the same time; B exists alone. Among them, A and B can be singular or plural.

[0026] In the embodiment of the present application, the symbol “ / ” can indicate that the previously associated objects are in an “or” relationship.

[0027] In the embodiments of the present application, "at least one item" or similar expressions refer to any combination of these items, including any combination of single items or plural items, and refer to one or more, and multiple refers to two or more. For example, at least one item of a, b, or c can represent the following seven situations: a, b, c, a and b, a and c, b and c, a, b, and c. Among them, each of a, b, and c can be an element or a set containing one or more elements.

[0028] In the embodiments of the present application, "equal to" can be used in conjunction with greater than, and is applicable to the technical solution adopted when greater than, and can also be used in conjunction with less than, and is applicable to the technical solution adopted when less than. When equal to is used in conjunction with greater than, it is not used in conjunction with less than; when equal to is used in conjunction with less than, it is not used in conjunction with greater than.

[0029] It should be noted that the terms "first", "second", "third", etc. in the specification and claims of the present application and in the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the term "comprising" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product, or server that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products, or devices.

[0030] The relevant names or terms involved in this application are explained below to facilitate understanding by those skilled in the art.

[0031] 1. Peripheral equipment of electronic equipment

[0032] The peripheral devices of the electronic device may include at least one of the following: a touch screen, a button (such as a power button, a volume button, etc.), a sound device (such as a speaker or headphones), a camera, a sensor (such as a temperature sensor, an acceleration sensor, a proximity light sensor, an ambient light sensor, a fingerprint sensor, a touch sensor, etc.) or a display screen, etc.

[0033] A touch screen is also called a touch control screen, which is composed of a display screen and a touch sensor. The touch sensor can be set on the display screen. The touch sensor is used to detect touch operations on or near the touch screen.

[0034] 2. Man-machine interface (MMI) mode

[0035] The MMI mode may include at least one of the following: a touch screen test, a button test, a sound output test, a camera test, a sensor test, or a display screen test.

[0036] Touch screen testing refers to detecting whether the response speed, accuracy and multi-touch function of the touch screen of an electronic device are normal, including the accuracy and smoothness of single-point touch, sliding, zooming and other operations.

[0037] Key testing refers to testing the response performance of the keys of electronic devices, including the pressing and releasing operations of the keys, whether the keys work properly, etc.

[0038] Sound output testing refers to testing the audio quality, volume adjustment function, and whether the left and right channels are normal, etc., of the sound device output of the electronic device.

[0039] Camera testing refers to testing the working status, pixel quality, focus, color reproduction and functional characteristics of the camera of an electronic device, such as taking photos and recording videos.

[0040] Sensor testing refers to testing the working status and accuracy of each sensor of an electronic device.

[0041] Display screen testing refers to the detection of display effects, brightness, contrast, color accuracy, resolution, response time and other parameters of the display screen of electronic equipment.

[0042] 3. Sleep mode

[0043] Sleep mode refers to detecting whether the current of peripheral devices meets the standard when the electronic device is in sleep mode, whether the power of peripheral devices meets the standard when the electronic device is in sleep mode, etc. When the peripheral device is a display screen, sleep mode refers to detecting whether the display screen is always on when the electronic device is in sleep mode.

[0044] 4. Aging Mode

[0045] The aging mode refers to detecting whether the current of the peripheral device of the electronic device meets the standard after the electronic device repeatedly performs a certain function, and whether the power of the peripheral device meets the standard after the electronic device repeatedly performs a certain function. For example, when the peripheral device is a display screen, the aging mode refers to whether the current of the display screen of the electronic device meets the standard after the electronic device repeatedly performs the display function, and whether the power of the display screen meets the standard after the electronic device repeatedly performs the display function.

[0046] 5. Boot mode

[0047] The power-on mode refers to detecting the current of the peripheral device when the electronic device is in the power-on state, whether the power of the peripheral device meets the standard when it is in the power-on state, etc. For example, when the peripheral device is a camera, the power-on mode refers to detecting whether the current of the camera meets the standard when the electronic device is in the sleep state.

[0048] The method provided in the present application can be executed by any electronic device with a test function. For example, the electronic device can be a smart TV, a mobile phone, a vehicle, a roadside unit, a tablet computer, a computer with a wireless transceiver function, a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, a wireless terminal in industrial control, a vehicle-mounted terminal device, a wireless terminal in self-driving, a wireless terminal in remote medical, a wireless terminal in a smart grid, a wireless terminal in transportation safety, a wireless terminal in a smart city, a wireless terminal in a smart home, a wearable terminal device, and the like.

[0049] It should be noted that the device for realizing the function of the electronic device can be the electronic device itself, or a device that can support the electronic device to realize the function, such as a chip system or a combination device or component that can realize the function of the electronic device, and the device can be installed in the electronic device. The embodiments of the present application do not limit the specific technology and specific device form adopted by the electronic device.

[0050] Figure 1 FIG. 1 shows a schematic diagram of the hardware structure of an electronic device. Figure 1 As shown, the electronic device may include but is not limited to a processor 11, a memory 12, a display screen 13, etc.

[0051] It is to be understood that the structure illustrated in the embodiments of the present invention does not constitute a specific limitation on the electronic device. In other embodiments of the present application, the electronic device may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0052] The processor 11 may include one or more processing units, for example, the processor 11 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, or a digital signal processor (DSP), etc. Different processing units may be independent devices or integrated into one or more processors.

[0053] DSP is used to process digital signals, such as digital image signals.

[0054] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.

[0055] The processor 11 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 11 is a cache memory. The memory may store instructions or data that the processor 11 has just used or cyclically used. If the processor 11 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 11, and thus improves the efficiency of the system.

[0056] In some embodiments, the processor 11 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0057] The MIPI interface can be used to connect the processor 11 with peripheral devices such as the display screen 13. The MIPI interface includes a display serial interface (DSI), etc. In some embodiments, the processor 11 and the display screen 13 communicate via the DSI interface to implement the display function of the electronic device.

[0058] The USB interface can be used to connect a storage device. Among them, the USB interface can be a USB2.0 interface, a USB3.0 interface, a Micro USB interface or a USB Type C interface, etc. The storage device can be a USB flash drive, a mobile hard disk, a memory card or an optical disk, etc. In some embodiments, when the storage device is a USB flash drive, the electronic device can be connected to the USB flash drive via a USB interface. For example, the electronic device can be connected to the USB flash drive by inserting the USB flash drive through a USB2.0 interface or a USB3.0 interface. Alternatively, the electronic device can be connected to the USB flash drive via a data exchange (on the go, OTG) line, that is, the electronic device can be connected to the USB flash drive via a Micro USB interface or a USB Type C interface when supporting the OTG function.

[0059] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present invention is only a schematic illustration and does not constitute a structural limitation of the electronic device. In other embodiments of the present application, the electronic device may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

[0060] The memory 12 may include a random access memory (RAM) and / or a non-volatile memory (NVM), etc. The random access memory may include at least one of the following: an internal random access memory (IRAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), or a double data rate synchronous dynamic random access memory (DDR SDRAM, such as the fifth generation DDR SDRAM is generally referred to as DDR5 SDRAM), etc. The non-volatile memory may include at least one of the following: a disk storage device, or a flash memory. Flash memory can be divided according to the operating principle, including at least one of the following: NOR FLASH, NAND FLASH, 3D NAND FLASH, etc., divided according to the potential level of the storage unit, including at least one of the following: single-level cell (SLC), multi-level cell (MLC), triple-level cell (TLC), quad-level cell (QLC), etc., divided according to the storage specification, including at least one of the following: universal flash storage (UFS), embedded multi media card (eMMC), etc. The random access memory can be directly read and written by the processor 11, and can be used to store executable programs (such as machine instructions) of the operating system or other running programs, and can also be used to store user and application data, etc. The non-volatile memory can also store executable programs and store user and application data, etc., and can be loaded into the random access memory in advance for direct reading and writing by the processor 11.

[0061] The electronic device realizes the display function through a GPU, a display screen 13, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 13 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 11 may include one or more GPUs, which execute program instructions to generate or change display information.

[0062] The display screen 13 is used to display images, videos, etc. The display screen 13 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device may include 1 or N display screens 13, where N is a positive integer greater than 1.

[0063] In the embodiment of the present application, the processor 11 can be used to initialize the peripheral device of the electronic device. The processor 11 can also trigger the peripheral device of the electronic device to enter a test mode (eg, MMI mode) according to a command line instruction or the first information.

[0064] The display screen 13 can be used to display prompt information. The display screen 13 can also be used to display the interface of the test mode.

[0065] Next, a schematic diagram of the software architecture provided by an embodiment of the present application is introduced.

[0066] The software system of the electronic device may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present invention takes a system with a layered architecture as an example to exemplify the software structure of the electronic device.

[0067] Figure 2 It is a software structure block diagram of the electronic device according to an embodiment of the present invention.

[0068] The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the system is divided into four layers, from top to bottom: application layer, application framework layer, runtime and system library, and kernel layer.

[0069] The application layer can include a series of application packages.

[0070] like Figure 2 As shown, the application package may include applications such as camera, calendar, map, WLAN, music, short message, gallery, call, navigation, video, setting, etc.

[0071] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.

[0072] like Figure 2 As shown, the application framework layer may include a window manager, a content provider, a view system, a USB service module, a resource manager, a notification manager, and the like.

[0073] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.

[0074] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.

[0075] The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.

[0076] The USB service module provides a rich set of communication protocol interfaces for implementing communication between electronic devices and storage devices.

[0077] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.

[0078] The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt sound is emitted, an electronic device vibrates, an indicator light flashes, etc.

[0079] The runtime can refer to all code libraries, frameworks, etc. required for the program to run. For example, for the C language, the runtime includes a series of function libraries required for the C program to run. For the Java language, the runtime includes the core library and the virtual machine. The core library may include the function functions that the Java language needs to call. The application layer and the application framework layer run in the virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.

[0080] The system library can include multiple functional modules. For example: surface manager, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), function libraries, etc. The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications. The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, synthesis, and layer processing. The 2D graphics engine is a drawing engine for 2D drawing. The function library provides developers with API interfaces for multiple services, which facilitates developers to quickly integrate and implement various functions. Among them, the function library includes function libraries for managing and controlling storage devices. These function libraries provide high-level API interfaces that allow applications to operate storage devices through simple function calls.

[0081] The kernel layer is the layer between hardware and software. The kernel layer can be used for peripheral devices of electronic devices to run in test mode to perform operations such as hardware function testing, performance evaluation, system stability testing, etc. These operations are helpful to ensure that the quality and performance of electronic devices during production and testing meet the expected requirements.

[0082] The kernel layer at least includes a display driver, a camera driver, a USB driver, an audio driver, and a sensor driver. In the embodiment of the present application, the USB driver can provide an OTG function so that the electronic device and the storage device can be connected to each other for data transmission.

[0083] like Figure 2 As shown, when the electronic device is connected to the storage device or thereafter, the USB driver of the kernel layer can pass a message indicating the insertion of the storage device to the function library in the system library. The function library in the system library can provide an API interface, allowing the application to call to manage and control the storage device. The USB service module of the application framework layer uses the API interface provided by the system library to process the connection event and data communication of the storage device, and provides various storage device-related functions for the application, such as data transmission.

[0084] Currently, in an actual testing process, the electronic device needs to be powered on before testing (ie, enter a test mode), and the power-on time delay is relatively large, resulting in low testing efficiency.

[0085] Based on this, the embodiments of the present application provide Figure 3 The test method shown is used to improve test efficiency.

[0086] The following is an introduction to the testing method provided in the embodiments of the present application.

[0087] See also Figure 3 , Figure 3 It is a flow chart of a testing method provided in an embodiment of the present application, and the testing method includes steps S301 and S302. Figure 3 The method shown may be executed by an electronic device, or the subject may be a chip in the electronic device. Figure 3 The method execution subject shown is an electronic device as an example.

[0088] S301: The electronic device is powered on, and the electronic device initializes peripheral devices of the electronic device.

[0089] For example, when or after the electronic device is powered on, the electronic device initializes the peripheral devices of the electronic device.

[0090] Optionally, the electronic device initializing the peripheral device of the electronic device includes the following steps S1 and S2, wherein:

[0091] Step S1: The electronic device loads a first image file from a first memory into a second memory for execution, so as to initialize a third memory.

[0092] The first image file may be a second program loader (SPL) image file. The SPL image file is used to initialize the third memory. The first memory may be a flash memory, the second memory may be an IRAM, and the third memory may be a DDR SDRAM.

[0093] Optionally, the electronic device loads the first image file from the first memory into the second memory for execution, including: the electronic device executes a read-only memory code (Romcode) to load the first image file from the first memory into the second memory for execution.

[0094] For example, the electronic device runs Romcode to perform signature verification on the first image file. When the first image file passes the signature verification, the first image file is loaded from the first memory to the second memory for execution. Based on this method, the electronic device first performs a signature security check on the first image file, and can only execute the first image file after passing the signature verification, so as to ensure that the first image file has not been tampered with, thereby improving security.

[0095] Romcode is the first code executed by an electronic device when it is powered on or after it is powered on. The code is stored in a read-only memory (ROM).

[0096] Optionally, the electronic device performs signature verification on the first image file, including: the electronic device performs signature verification on the signature in the first image file. The signature in the first image file can be determined based on a Rivest-Shamir-Adleman (RSA) asymmetric encryption algorithm. Optionally, the signature in the first image file can be located at a software header, a software footer, or other location of the first image file, etc., which is not limited in this application.

[0097] The initialization of the third memory is introduced below.

[0098] For example, initializing the third memory can be understood as: performing power initialization (to ensure that the third memory is provided with appropriate power supply voltage and current) and / or clock initialization (i.e., initializing the clock frequency and clock delay used by the third memory), etc. on the third memory. In this way, it can be ensured that the third memory can work reliably in the system.

[0099] Step S2: The electronic device loads the second image file from the first memory into the third memory for execution, so as to initialize the peripheral devices of the electronic device.

[0100] The second image file may be a third-level boot loader (universal boot loader, Uboot) image file, and the Uboot image file is used to initialize peripheral devices of the electronic device.

[0101] Optionally, initializing the peripheral devices of the electronic device can be understood as at least one of the following: power initialization of the peripheral devices of the electronic device (to ensure that the peripheral devices of the electronic device can receive the correct power supply, including the stability of voltage and current), clock initialization (i.e., configuring the clock frequency and clock source required by the peripheral devices of the electronic device), or communication interface initialization (i.e., setting the communication protocol, baud rate, number of data bits, check bits and other parameters to ensure that the electronic device can correctly communicate with other devices), etc. Optionally, when the peripheral device is a display screen, initializing the peripheral devices of the electronic device can also be understood as: initializing the display screen of the electronic device (i.e., setting parameters such as resolution, refresh rate, brightness and contrast).

[0102] S302, the electronic device obtains a command line instruction, and triggers the peripheral device to enter a test mode based on the command line instruction. Alternatively, the electronic device obtains first information from a storage device connected to the electronic device, and triggers the peripheral device to enter a test mode based on the first information. The test mode includes an MMI mode, a sleep mode, an aging mode, or a power-on mode.

[0103] The following is a detailed introduction on how the peripheral devices of electronic equipment enter the test mode.

[0104] Solution 1: An electronic device triggers a peripheral device to enter a test mode based on a command line instruction, including: the command line instruction includes an operating parameter of the peripheral device, the peripheral device enters the test mode, and the electronic device operates the peripheral device based on the operating parameter of the peripheral device. Among them, the operating parameter of the peripheral device may not be associated with the test mode, and the command line instruction also includes test mode indication information, and the test mode indication information is used to indicate that the peripheral device enters the test mode. That is, the electronic device can know the test mode that should be entered through the test mode indication information. In this case, the command line instruction includes the operating parameter of the peripheral device and the test mode indication information. Alternatively, the operating parameter of the peripheral device may be associated with the test mode, that is, the electronic device can know the test mode that should be entered through the operating parameter of the peripheral device. That is, the operating parameter of the peripheral device is used to indicate that the peripheral device enters the test mode. In this case, the command line instruction only includes the operating parameter of the peripheral device. It should be understood that "the command line instruction includes the operating parameter of the peripheral device and the test mode indication information" and "the command line instruction only includes the operating parameter of the peripheral device" can be regarded as a command line instruction used to indicate that the peripheral device of the electronic device enters the test mode.

[0105] Among them, the operating parameters of the peripheral device may include at least one of the following: operating parameters of the touch screen, operating parameters of the buttons, operating parameters of the sound device, operating parameters of the camera, operating parameters of the sensor, or operating parameters of the display screen, etc.

[0106] Solution 2: The electronic device triggers the peripheral device to enter the test mode based on the command line instruction, including: the command line instruction is used to instruct the peripheral device of the electronic device to enter the test mode. The operating parameters of the peripheral device associated with the test mode are obtained from the memory of the electronic device, or the operating parameters of the peripheral device associated with the test mode are obtained from the storage device connected to the electronic device. The peripheral device of the electronic device enters the test mode, and the peripheral device is operated based on the operating parameters of the peripheral device.

[0107] The command line instruction is used to instruct the peripheral device of the electronic device to enter the test mode, which can be understood as: the command line instruction only includes the test mode indication information, and the test mode indication information is used to instruct the peripheral device of the electronic device to enter the test mode.

[0108] Among them, the memory of the electronic device refers to a register or other types of memory. Optionally, the memory of the electronic device may be one or more registers, and the present application does not limit the number of memories of the electronic device. A register may include some or all operating parameters of a peripheral device under different test modes. Alternatively, a register includes some or all operating parameters of a peripheral device under one test mode, and another register includes some or all operating parameters of a peripheral device under another test mode. That is, different memories may include some or all operating parameters of a peripheral device under different test modes.

[0109] Optionally, the electronic device may first obtain the operating parameters of the peripheral device associated with the test mode from the storage device. If the operating parameters of the peripheral device are not obtained from the storage device, the electronic device then obtains the operating parameters of the peripheral device associated with the test mode from the memory of the electronic device.

[0110] Solution 3: The electronic device triggers the peripheral device to enter the test mode based on the first information, including: the first information includes the operating parameters of the peripheral device, the peripheral device enters the test mode, and the electronic device operates the peripheral device based on the operating parameters of the peripheral device. Among them, the operating parameters of the peripheral device may not be associated with the test mode, and the first information also includes test mode indication information, and the test mode indication information is used to indicate that the peripheral device enters the test mode. That is, the electronic device can know the test mode to be entered through the test mode indication information obtained from the storage device. In this case, the first information includes the operating parameters of the peripheral device and the test mode indication information. Alternatively, the operating parameters of the peripheral device may be associated with the test mode, that is, the electronic device can know the test mode to be entered through the operating parameters of the peripheral device. That is, the operating parameters of the peripheral device are used to indicate that the peripheral device enters the test mode. In this case, the first information only includes the operating parameters of the peripheral device. It should be understood that "the first information includes the operating parameters of the peripheral device and the test mode indication information" and "the first information only includes the operating parameters of the peripheral device" can be regarded as the first information used to indicate that the peripheral device of the electronic device enters the test mode.

[0111] In a possible embodiment, the electronic device may also send a query request to a storage device connected to the electronic device, and the query request is used to request the storage device to detect whether a specific file exists in the storage device. When the specific file exists in the storage device, the storage device may send the first information to the electronic device. Each test mode has a corresponding specific file. For example, the MMI mode corresponds to specific file 1, the sleep mode corresponds to specific file 2, the aging mode corresponds to specific file 3, the boot mode corresponds to specific file 4, and the like.

[0112] Optionally, the storage device may determine the test mode that the electronic device should enter according to one or more of the file format of the specific file, the file name of the specific file, or the file content of the specific file, i.e., generate the test mode indication information. For example, the file format of the specific file may be a cvt file, indicating that the test mode indication information is used to instruct the peripheral device to enter the MMI mode.

[0113] The specific file may include operating parameters of the peripheral device.

[0114] Solution 4: The electronic device triggers a peripheral device to enter a test mode based on first information, including: the first information is used to instruct the peripheral device of the electronic device to enter the test mode. The operating parameters of the peripheral device associated with the test mode are obtained from the memory of the electronic device, and the peripheral device is operated based on the operating parameters of the peripheral device. That is, the first information only includes the test mode indication information, and the test mode indication information is used to instruct the peripheral device of the electronic device to enter the test mode.

[0115] Optionally, when or after the electronic device initializes the peripheral device of the electronic device, the electronic device can detect whether there is input of a command line instruction within a preset time. In the case where the electronic device obtains the command line instruction within the preset time, the command line instruction includes the operating parameters of the peripheral device, and the first solution is executed. The command line instruction only includes the test mode indication information, and the second solution is executed. In the case where the electronic device does not obtain the command line instruction within the preset time, the electronic device obtains the first information from the storage device connected to the electronic device, the first information includes the operating parameters of the peripheral device, and the third solution is executed. The first information only includes the test mode indication information, and the fourth solution is executed.

[0116] The preset time is a value greater than 0, and the unit can be seconds. For example, the preset time can be 30 seconds. It should be understood that the preset time can be adjusted according to actual conditions, and the present application does not limit the specific value of the preset time.

[0117] In a possible embodiment, before the electronic device obtains the first information from the storage device connected to the electronic device, it also includes: the electronic device can call the first function to obtain the second information from the storage device, so that the driver file corresponding to the storage device can be loaded into the memory configured by the FAT, and the driver file corresponding to the storage device can be run to perform data transmission with the storage device. The second information is used to indicate that the storage device has established a connection with the electronic device. Based on this method, the electronic device establishes a connection with the storage device and establishes data transmission with the storage device, so as to facilitate the subsequent acquisition of the first information from the storage device.

[0118] Optionally, when the electronic device calls the first function, it determines whether the storage device is successfully connected to the electronic device by whether the second information is received. If the second information is not obtained, the electronic device can output a prompt message that the electronic device is not connected to the storage device, and the prompt message can include but is not limited to text prompt messages, image prompt messages, animation prompt messages, and voice prompt messages, etc. For example, the prompt message can be a text prompt message: "The electronic device is not connected to the storage device."

[0119] Optionally, the electronic device may also call the second function to determine whether there is abnormal information in the memory associated with the second function. The electronic device calls the first function, including: calling the first function when there is no abnormal information in the memory associated with the second function. Based on this method, the electronic device calls the first function only when there is no abnormal information in the memory associated with the second function, ensuring that there is no abnormal information in the memory, thereby improving security and reliability.

[0120] Wherein, when there is abnormal information in the memory associated with the second function, the electronic device is reset. Resetting the electronic device can be understood as: initializing the electronic device, including at least one of hardware power-on, self-test, loading software into memory or chip, and software initialization.

[0121] In a possible embodiment, when or after resetting the electronic device, the electronic device calls the first function. The specific implementation of "the electronic device calls the first function" can refer to the relevant description in the above embodiment to perform data transmission with the storage device, which will not be repeated here.

[0122] Optionally, when or after resetting the electronic device, the electronic device may call the second function again to determine whether there is abnormal information in the memory associated with the second function. If there is no abnormal information in the memory associated with the second function, the first function is called.

[0123] Optionally, the first function and the second function may be located in an array, and the first function is located before the second function in the array. Part or all of the functions in the array have associated memories of electronic devices, for example, part or all of the functions in the array have corresponding registers. Different registers may include operating parameters of peripheral devices in different test modes.

[0124] Optionally, the electronic device may traverse the array in a predefined traversal order. The predefined traversal order may be obtained according to the order of importance levels associated with each function in the array (i.e., the position of each function in the array). It should be understood that the predefined traversal order may be adjusted according to actual conditions, and the present application does not limit the specific order of the predefined traversal order.

[0125] In a possible embodiment, the electronic device may further output prompt information, where the prompt information is used to indicate a test result of the peripheral device in the test mode. For example, when the peripheral device completes the test in the test mode, the electronic device determines the test result, thereby outputting the prompt information. The test result refers to one or more test results of the electronic device in the test mode.

[0126] As an example, when the test results only include the results that the peripheral devices of the electronic device are operating correctly, or when the test results include the results that the peripheral devices of the electronic device are operating correctly and the results that the peripheral devices of the electronic device are operating incorrectly, the electronic device outputs a prompt message. The prompt message may include, but is not limited to, text prompt messages, image prompt messages, animation prompt messages, and voice prompt messages, etc. For example, the prompt message may be a text prompt message: "The contrast of the display screen in MMI mode is not up to standard", "The power button in MMI mode does not work properly", and "The test result of the camera in MMI mode is correct", etc.

[0127] As another example, when the test results only include the results of errors in the operation of peripheral devices of the electronic device, the electronic device outputs the prompt information. The prompt information may include, but is not limited to, text prompt information, image prompt information, animation prompt information, and voice prompt information, etc. For example, the prompt information may be text prompt information: "The current of the display screen of the electronic device in sleep mode does not meet the standard" and the like. Based on this method, the user can better understand the test results when the test results only include the results of errors in the operation of peripheral devices of the electronic device, which is helpful for the user to better understand the solution to the wrong test results later, and the number of times the prompt information is output can be reduced, which is helpful to improve efficiency.

[0128] It can be seen that based on Figure 3 The described method allows the electronic device to enter the test mode for testing when it is powered on or after it is powered on, without the need to enter the power-on state, thus reducing the delay caused by the power-on state, thereby improving the test efficiency. At the same time, the test mode can be entered through a storage device connected to the electronic device, without the need to enter the test mode through a combination of keys, that is, the method is compatible with multi-key, single-key, and buttonless electronic devices. In this way, the diversification of electronic devices and test scenarios can be supported, and the test efficiency can also be improved.

[0129] See also Figure 4 , Figure 4 1 is a schematic diagram of the structure of a test device provided in an embodiment of the present application. The test device can be used to perform some or all functions of the electronic device in the above method embodiment. The device can be an electronic device, or a device in an electronic device, or a device that can be used in combination with an electronic device. The test device can also be a chip system. Figure 4 The test device shown includes a communication unit 401 and a processing unit 402. The communication unit 401 is used to send and receive data. The communication unit 401 integrates a receiving unit and a sending unit. The communication unit 401 can also be called a transceiver unit. Alternatively, the communication unit 401 can also be split into a receiving unit and a sending unit. The processing unit 402 is used to process data. Among them:

[0130] The processing unit 402 is used to: power on the test device and initialize the peripheral devices of the test device; the communication unit 401 is used to: obtain command line instructions, or obtain first information from a storage device connected to the test device; the processing unit 402 is also used to: trigger the peripheral device to enter the test mode based on the command line instructions, or trigger the peripheral device to enter the test mode based on the first information; wherein the test mode includes the human-machine interface MMI mode, the sleep mode, the aging mode or the power-on mode.

[0131] In one possible embodiment, a command line instruction is used to instruct a peripheral device to enter a test mode. When the peripheral device is triggered to enter the test mode based on the command line instruction, the processing unit 402 is used to: the command line instruction includes operating parameters of the peripheral device, or, obtain the operating parameters of the peripheral device associated with the test mode from the memory of the test device; the processing unit 402 is also used to: the peripheral device enters the test mode, and operates the peripheral device based on the operating parameters of the peripheral device.

[0132] In a possible embodiment, the first information is used to instruct the peripheral device to enter the test mode. When the peripheral device of the test device is triggered to enter the test mode based on the first information, the processing unit 402 is used to: the first information includes the operating parameters of the peripheral device, or, obtain the operating parameters of the peripheral device associated with the test mode from the memory of the test device; the processing unit 402 is also used to: the peripheral device enters the test mode, and operates the peripheral device based on the operating parameters of the peripheral device.

[0133] In a possible embodiment, before obtaining the first information from the storage device connected to the test device, the processing unit 402 is used to: call the first function to obtain second information from the storage device, and the second information is used to indicate that a connection has been established between the storage device and the test device; the processing unit 402 is also used to: load the driver file corresponding to the storage device into the memory configured by FAT, and run the driver file corresponding to the storage device to transfer data with the storage device.

[0134] In a possible embodiment, the processing unit 402 is used to: call the second function and determine whether there is exception information in the memory associated with the second function; when calling the first function, the processing unit 402 is used to: call the first function if there is no exception information in the memory associated with the second function.

[0135] In a possible embodiment, the communication unit 401 is used to: output prompt information, where the prompt information is used to indicate a test result of the peripheral device in the test mode.

[0136] In a possible embodiment, when outputting prompt information, the processing unit 402 is used to: determine the test result when the peripheral device completes the test in the test mode; the communication unit 401 is used to: output the prompt information when the test result includes the result of an error in the operation of the peripheral device of the test device.

[0137] The present application also provides a chip that can execute the steps of the electronic device in the above method embodiment. The chip includes a processor and a communication interface.

[0138] The processor is configured to enable the chip to perform the following operations: power on the electronic device where the chip is located and initialize the peripheral devices of the electronic device; obtain command line instructions, and trigger the peripheral devices to enter a test mode based on the command line instructions; or obtain first information from a storage device connected to the electronic device, and trigger the peripheral devices to enter a test mode based on the first information; wherein the test mode includes a human-machine interface MMI mode, a sleep mode, an aging mode, or a power-on mode.

[0139] In one possible embodiment, a command line instruction is used to instruct a peripheral device to enter a test mode. When the peripheral device is triggered to enter the test mode based on the command line instruction, the processor is configured to cause the chip to perform the following operations: the command line instruction includes operating parameters of the peripheral device, or the operating parameters of the peripheral device associated with the test mode are obtained from the memory of the electronic device; the peripheral device enters the test mode, and the peripheral device is operated based on the operating parameters of the peripheral device.

[0140] In a possible embodiment, the first information is used to instruct the peripheral device to enter a test mode. When the peripheral device of the electronic device is triggered to enter the test mode based on the first information, the processor is configured to cause the chip to perform the following operations: the first information includes operating parameters of the peripheral device, or the operating parameters of the peripheral device associated with the test mode are obtained from the memory of the electronic device; the peripheral device enters the test mode, and the peripheral device is operated based on the operating parameters of the peripheral device.

[0141] In a possible embodiment, before obtaining the first information from a storage device connected to the electronic device, the processor is configured to cause the chip to perform the following operations: calling a first function to obtain second information from the storage device, where the second information is used to indicate that a connection has been established between the storage device and the electronic device; loading a driver file corresponding to the storage device into a memory configured by FAT, and running the driver file corresponding to the storage device to transfer data with the storage device.

[0142] In one possible embodiment, the processor is configured to cause the chip to perform the following operations: call the second function and determine whether there is exception information in the memory associated with the second function; when calling the first function, the processor is configured to cause the chip to perform the following operations: call the first function if there is no exception information in the memory associated with the second function.

[0143] In a possible embodiment, the processor is configured to enable the chip to perform the following operation: output prompt information, where the prompt information is used to indicate a test result of the peripheral device in the test mode.

[0144] In a possible embodiment, when outputting prompt information, the processor is configured to cause the chip to perform the following operations: determine the test result when the peripheral device completes the test in the test mode; and output the prompt information when the test result includes the result that the peripheral device of the electronic device operates incorrectly.

[0145] Optionally, the above-mentioned chip includes at least one processor, at least one first memory and at least one second memory; wherein, the aforementioned at least one first memory and the aforementioned at least one processor are interconnected via lines, and instructions are stored in the aforementioned first memory; the aforementioned at least one second memory and the aforementioned at least one processor are interconnected via lines, and the aforementioned second memory stores data that needs to be stored in the aforementioned method embodiment.

[0146] For each device or product applied to or integrated in the chip, each module contained therein can be implemented in the form of hardware such as circuits, or at least some of the modules can be implemented in the form of software programs, which run on a processor integrated inside the chip, and the remaining (if any) modules can be implemented in the form of hardware such as circuits.

[0147] See also Figure 5 , Figure 5 5 is a schematic diagram of a test device provided in an embodiment of the present application. The test device may include a memory 501 and a processor 502. Optionally, it also includes a communication interface 503. The memory 501, the processor 502 and the communication interface 503 are connected via one or more communication buses. The communication interface 503 is controlled by the processor 502 to send and receive information.

[0148] The memory 501 may include a read-only memory and a random access memory, and provides instructions and data to the processor 502. A portion of the memory 501 may also include a nonvolatile random access memory.

[0149] The communication interface 503 is used to receive or send data.

[0150] The processor 502 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor, and optionally, the processor 502 may also be any conventional processor, etc. Among them:

[0151] The memory 501 is used to store program instructions.

[0152] The processor 502 is used to call the program instructions stored in the memory 501.

[0153] The processor 502 calls the program instructions stored in the memory 501 to enable the test device 500 to execute the method executed by the electronic device in the above method embodiment.

[0154] It should be noted that Figure 5 For the contents not mentioned in the corresponding embodiments and the specific implementation methods of each step, please refer to the contents of the method embodiments, which will not be repeated here.

[0155] An embodiment of the present application also provides a computer-readable storage medium, in which instructions are stored. When the computer-readable storage medium is executed on a processor, the method flow of the above method embodiment is implemented.

[0156] The embodiment of the present application also provides a computer program product, in which computer-readable instructions are stored. When the computer-readable instructions are executed on a computer, the computer executes the method flow of the above method embodiment.

[0157] Regarding the various modules / units included in the various devices and products described in the above embodiments, they can be software modules / units, or hardware modules / units, or they can be partially software modules / units and partially hardware modules / units. For example, for various devices and products applied to or integrated in a chip, the various modules / units included therein can all be implemented in the form of hardware such as circuits, or at least some of the modules / units can be implemented in the form of software programs, which run on the integrated processor inside the chip, and the remaining (if any) modules / units can be implemented in the form of hardware such as circuits; for various devices and products applied to or integrated in a chip module, the various modules / units included therein can all be implemented in the form of hardware such as circuits, and different modules / units can be located in the same part of the chip module (such as a chip, circuit module, etc.) or in different components, or at least some of the modules / units can be implemented in the form of software programs. The software programs run on the integrated processor inside the chip, and the remaining (if any) modules / units can be implemented in the form of hardware such as circuits. It can be implemented in the form of a software program, which runs on a processor integrated inside the chip module, and the remaining (if any) modules / units can be implemented in the form of hardware such as circuits; for various devices and products applied to or integrated in the terminal, the modules / units contained therein can all be implemented in the form of hardware such as circuits, and different modules / units can be located in the same component (for example, chip, circuit module, etc.) or in different components in the terminal, or, at least some modules / units can be implemented in the form of a software program, which runs on a processor integrated inside the terminal, and the remaining (if any) modules / units can be implemented in the form of hardware such as circuits.

[0158] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain operations can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0159] The descriptions of the various embodiments provided in this application can refer to each other, and the descriptions of the various embodiments have different focuses. For parts that are not described in detail in a certain embodiment, refer to the relevant descriptions of other embodiments. For the convenience and simplicity of description, for example, the functions of the various devices and equipment provided in the embodiments of this application and the operations performed can refer to the relevant descriptions of the method embodiments of this application, and the various method embodiments and the various device embodiments can also refer to, combine or quote each other.

[0160] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A testing method, characterized in that: include: Powering on the electronic device and initializing peripheral devices of the electronic device; Obtaining a command line instruction, and triggering the peripheral device to enter a test mode based on the command line instruction; Alternatively, obtaining first information from a storage device connected to the electronic device, and triggering the peripheral device to enter the test mode based on the first information; The test mode includes a man-machine interface (MMI) mode, a sleep mode, an aging mode or a power-on mode.

2. The method according to claim 1, characterized in that The command line instruction is used to instruct the peripheral device to enter the test mode, and triggering the peripheral device to enter the test mode based on the command line instruction includes: The command line instruction includes the operating parameters of the peripheral device, or the operating parameters of the peripheral device associated with the test mode are obtained from the memory of the electronic device; The peripheral device enters the test mode and operates the peripheral device based on the operating parameters of the peripheral device.

3. The method according to claim 1, characterized in that The first information is used to instruct the peripheral device to enter the test mode, and the step of triggering the peripheral device to enter the test mode based on the first information includes: The first information includes operating parameters of the peripheral device, or the operating parameters of the peripheral device associated with the test mode are obtained from a memory of the electronic device; The peripheral device enters the test mode and operates the peripheral device based on the operating parameters of the peripheral device.

4. The method according to claim 1 or 3, characterized in that: Before acquiring the first information from the storage device connected to the electronic device, the method further includes: Calling a first function to obtain second information from the storage device, where the second information is used to indicate that a connection has been established between the storage device and the electronic device; The driver file corresponding to the storage device is loaded into the memory configured by the file configuration table FAT, and the driver file corresponding to the storage device is run to perform data transmission with the storage device.

5. The method according to claim 4, characterized in that The method further comprises: Calling the second function to determine whether there is abnormal information in the memory associated with the second function; The calling of the first function comprises: In a case where there is no exception information in the memory associated with the second function, the first function is called.

6. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: Outputting prompt information, where the prompt information is used to indicate a test result of the peripheral device in the test mode.

7. The method according to claim 6, characterized in that The output prompt information includes: In a case where the peripheral device completes the test in the test mode, determining the test result; When the test result includes a result that the peripheral device has an operation error, the prompt information is output.

8. A testing device, characterized in that: Unit for performing the method according to any one of claims 1 to 7.

9. A chip, characterized in that: The invention comprises a processor and a communication interface, wherein the processor is configured to execute the method as described in any one of claims 1 to 7, and the communication interface is used to receive a signal from other devices outside the chip and transmit it to the processor or send a signal from the processor to other devices outside the chip.

10. A testing device, characterized in that: The method comprises a memory and a processor, wherein the memory is used to store a computer program, the computer program comprises program instructions, and the processor is configured to call the program instructions to execute the method according to any one of claims 1 to 7.

11. A computer-readable storage medium, characterized in that: The computer storage medium stores computer-readable instructions, and when the computer-readable instructions are executed on a computer, the computer is enabled to execute the method according to any one of claims 1 to 7.