Data transmission method and electronic equipment
By adjusting the configuration information of the MIPI interface, the problem of mismatch in the signal driving capability of the MIPI interface was solved, improving the data transmission quality and stability, and reducing power consumption.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HONOR DEVICE CO LTD
- Filing Date
- 2024-11-08
- Publication Date
- 2026-05-08
AI Technical Summary
Different electronic devices or components have different requirements for the signal driving capability of the MIPI interface, which leads to poor data transmission quality of the MIPI interface and may cause problems such as abnormal frame output or increased power consumption.
By adjusting the configuration information of the MIPI interface, the signal driving capability is ensured to match the device requirements. This includes monitoring data transmission anomalies and adjusting the configuration information according to the anomaly type, thereby improving signal driving capability and reducing power consumption.
It improves the data transmission quality of the MIPI interface, avoids abnormal situations, reduces power consumption, and increases the stability of the module.
Smart Images

Figure CN121996592A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electronic technology, and in particular to a data transmission method and an electronic device. Background Technology
[0002] The Mobile Industry Processor Interface (MIPI) is a standardized hardware interface widely used in electronic devices to achieve high-speed data transmission.
[0003] Different electronic devices or components have different requirements for the signal driving capability of the MIPI interface. Due to factors such as differences in board-level design (e.g., trace length), differences in module driving capability, and differences in the capability parameters of the receiver corresponding to the MIPI interface, the signal driving capability of the MIPI interface applied to different electronic devices varies, thus affecting the quality of data transmitted through the MIPI interface. Summary of the Invention
[0004] This application provides a data transmission method and an electronic device for adjusting the configuration information of the MIPI interface to ensure the quality of data transmitted through the MIPI interface.
[0005] To achieve the above objectives, the embodiments of this application adopt the following technical solutions:
[0006] Firstly, a data transmission method is provided, applied to an electronic device. The electronic device includes a first module and a second module, wherein the first module transmits data to the second module via a Mobile Industry Processor (MIPI) interface. The method includes:
[0007] The first control module uses first configuration information to transmit data to the second module via the MIPI interface. If an anomaly occurs during data transmission, it indicates that the first configuration information is inappropriate for the first module to transmit data to the second module via the MIPI interface. In this case, the first control module uses second configuration information to transmit data to the second module via the MIPI interface. This adjusts the configuration information of the MIPI interface. The first and second configuration information represent different configurations for the MIPI interface, resulting in different transmission parameters when transmitting data via the MIPI interface. These parameters include current and signal quality. The MIPI interface configuration information characterizes the signal driving capability of the MIPI interface. Different configuration information results in different signal driving capabilities of the MIPI interface. Different signal driving capabilities lead to different current and signal quality during data transmission via the MIPI interface. Therefore, this scheme ensures that the signal driving capability of the MIPI interface matches the current data transmission requirements of the electronic device, preventing data transmission anomalies and improving the quality of data transmitted via the MIPI interface.
[0008] In one possible implementation of the first aspect, after the first module uses the second configuration information to transmit data to the second module via the MIPI interface, the electronic device can continue to monitor whether there are any anomalies in the data transmission from the first module to the second module via the MIPI interface. If data transmission anomalies still occur during the transmission of data from the first module to the second module via the MIPI interface using the second configuration information, the electronic device can adjust the second configuration information to other configuration information, such as the third configuration information. This process continues until the data transmission from the first module to the second module via the MIPI interface using the current configuration information no longer presents any anomalies.
[0009] In one possible implementation of the first aspect, the second current when transmitting data through the MIPI interface using the second configuration information is higher than the first current when transmitting data through the MIPI interface using the first configuration information. In other words, adjusting the configuration information used by the first module from the first configuration information to the second configuration information increases the current when the first module transmits data to the second module, thus improving the signal driving capability of the MIPI interface. In this scheme, the electronic device adjusts the configuration information used by the first module from small to large, which not only obtains the signal driving capability of the MIPI interface that meets the needs of the electronic device, but also reduces the power consumption of the electronic device and increases the stability of the second module.
[0010] In one possible implementation of the first aspect, the second signal quality when transmitting data via the MIPI interface using the second configuration information is higher than the first signal quality when transmitting data via the MIPI interface using the first configuration information. In other words, adjusting the configuration information used by the first module from the first configuration information to the second configuration information increases the current required for data transmission from the first module to the second module, thus improving the signal driving capability of the MIPI interface. In this scheme, the electronic device adjusts the configuration information used by the first module from small to large, which not only obtains the signal driving capability of the MIPI interface that meets the needs of the electronic device, but also reduces the power consumption of the electronic device and increases the stability of the second module.
[0011] In one possible implementation of the first aspect, the second current when transmitting data via the MIPI interface using the second configuration information is higher than the first current when transmitting data via the MIPI interface using the first configuration information. Furthermore, the second signal quality when transmitting data via the MIPI interface using the second configuration information is higher than the first signal quality when transmitting data via the MIPI interface using the first configuration information.
[0012] In one possible implementation of the first aspect, the first configuration information is the lowest configuration information among all configuration information. Specifically, all configuration information can refer to the optional configuration information of the MIPI interface stored in the electronic device. That is, in this scheme, when adjusting the configuration information of the MIPI interface used by the first module, the MIPI interface is gradually increased from its lowest signal drive capability. The method further includes: after controlling the first module to use the second configuration information and transmitting data to the second module through the MIPI interface, if there are still abnormalities in the transmitted data, the configuration information used by the first module is further adjusted. In this scheme, the electronic device adjusts the configuration information used by the first module from the lowest configuration information to the highest, that is, from the lowest signal drive capability of the MIPI interface to the highest. This not only obtains the signal drive capability of the MIPI interface that meets the needs of the electronic device, but also reduces the power consumption of the electronic device and increases the stability of the second module.
[0013] In one possible implementation of the first aspect, after determining that an anomaly exists in the transmitted data, the electronic device can first determine the anomaly type and then adjust the configuration information accordingly. Specifically, if the anomaly type is the first type, the second current when transmitting data through the MIPI interface using the second configuration information is higher than the first current when transmitting data through the MIPI interface using the first configuration information. Here, the first type indicates that the signal driving capability of the MIPI interface is less than a first threshold. In this way, adjusting the configuration information according to the anomaly type allows for more accurate adjustment, ensuring that the adjusted configuration information better meets the electronic device's requirements for the signal driving capability of the MIPI interface.
[0014] In one possible implementation of the first aspect, after determining that an anomaly exists in the transmitted data, the electronic device can first determine the anomaly type and then adjust the configuration information according to the anomaly type. Specifically, when the anomaly type corresponding to the transmitted data anomaly is the first type, the second signal quality when transmitting data through the MIPI interface using the second configuration information is higher than the first signal quality when transmitting data through the MIPI interface using the first configuration information. Here, the first type indicates that the signal driving capability of the MIPI interface is less than a first threshold. In this way, adjusting the configuration information according to the anomaly type allows for more accurate adjustment of the configuration information, making the adjusted configuration information more consistent with the electronic device's requirements for the signal driving capability of the MIPI interface.
[0015] In one possible implementation of the first aspect, when the anomaly type corresponding to the data transmission anomaly is the first type, the second current when transmitting data through the MIPI interface using the second configuration information is higher than the first current when transmitting data through the MIPI interface using the first configuration information; and the second signal quality when transmitting data through the MIPI interface using the second configuration information is higher than the first signal quality when transmitting data through the MIPI interface using the first configuration information.
[0016] In one possible implementation of the first aspect, the method further includes: when the anomaly type corresponding to the data transmission anomaly is the second type, the second current when transmitting data through the MIPI interface using the second configuration information is lower than the first current when transmitting data through the MIPI interface using the first configuration information. Here, the second type indicates that the signal driving capability of the MIPI interface is greater than a second threshold; the second threshold is greater than the first threshold. In this scheme, if it can be determined that the anomaly type is the second type, the configuration information used by the first module can also be adjusted from high to low. This allows for more accurate adjustment of the configuration information, making the adjusted configuration information more consistent with the electronic device's requirements for the signal driving capability of the MIPI interface.
[0017] In one possible implementation of the first aspect, the method further includes: when the anomaly type corresponding to the data transmission anomaly is the second type, the second signal quality when transmitting data through the MIPI interface using the second configuration information is lower than the first signal quality when transmitting data through the MIPI interface using the first configuration information. Here, the second type indicates that the signal driving capability of the MIPI interface is greater than a second threshold; the second threshold is greater than the first threshold. In this scheme, if it can be determined that the anomaly type is the second type, the configuration information used by the first module can also be adjusted from high to low. This allows for more accurate adjustment of the configuration information, making the adjusted configuration information more consistent with the electronic device's requirements for the signal driving capability of the MIPI interface.
[0018] In one possible implementation of the first aspect, the method further includes: when the exception type corresponding to the data transmission anomaly is the second type, the second current when transmitting data through the MIPI interface using the second configuration information is lower than the first current when transmitting data through the MIPI interface using the first configuration information; and the second signal quality when transmitting data through the MIPI interface using the second configuration information is lower than the first signal quality when transmitting data through the MIPI interface using the first configuration information.
[0019] In one possible implementation of the first aspect, the electronic device can determine the type of anomaly based on conditions that satisfy the transmission data anomaly.
[0020] In one possible implementation of the first aspect, the configuration information used by the first module to transmit data via the MIPI interface is stored in the corresponding register of the first module. In the event of an anomaly in the data transmission, controlling the first module to use the second configuration information to transmit data to the second module via the MIPI interface can specifically include: modifying the contents of the register corresponding to the first module from the first configuration information to the second configuration information in the event of an anomaly. Storing the configuration information currently used by the first module in register format facilitates maintenance.
[0021] In one possible implementation of the first aspect, before modifying the contents of the register corresponding to the first module from the first configuration information to the second configuration information, the method further includes: displaying a prompt message when there is an anomaly in the transmitted data; the prompt message is used to inquire whether to restart. Modifying the contents of the register corresponding to the first module from the first configuration information to the second configuration information specifically includes: in response to receiving a restart trigger operation based on the prompt message, modifying the contents of the register corresponding to the first module from the first configuration information to the second configuration information, and performing a restart operation. In this solution, deciding whether to restart based on user selection avoids situations where the user suddenly restarts the electronic device, restarts the application, or exits the application while using the electronic device.
[0022] In one possible implementation of the first aspect, the first module is a camera module, and the second module is a processor. Specifically, in the event of an anomaly in the transmitted data, controlling the first module to use the second configuration information to transmit data to the second module via the MIPI interface includes: in the event of an anomaly in the transmitted data, controlling the processor to send an adjustment command to the camera module, the adjustment command instructing the camera module to use the second configuration information to transmit data to the processor via the MIPI interface.
[0023] In one possible implementation of the first aspect, the first module is a camera module, and the second module is a processor. If an anomaly occurs in the transmitted data and the anomaly type is the first type, the processor sends a first adjustment command to the camera module. This adjustment command instructs the camera module to use second configuration information and transmit data to the processor via the MIPI interface.
[0024] In one possible implementation of the first aspect, the first module is a camera module, and the second module is a processor. If an exception occurs during data transmission and the exception type is type two, the processor sends a second adjustment instruction to the camera module. This adjustment instruction instructs the camera module to use second configuration information and transmit data to the processor via the MIPI interface.
[0025] In one possible implementation of the first aspect, the control processor sends adjustment commands to the camera module, including: the control processor sending adjustment commands to the camera via the internal integrated circuit IIC channel. In this way, sending the adjustment commands does not occupy the MIPI interface and does not affect data transmission via the MIPI interface.
[0026] In one possible implementation of the first aspect, the first module is a processor and the second module is a screen.
[0027] Secondly, this application also provides an electronic device. The electronic device may include a MIPI interface, a processor, and a memory. The memory stores computer-executed instructions, and when the electronic device is running, the processor executes the computer-executed instructions stored in the memory to cause the electronic device to perform the data transmission method as described in any of the first aspects above.
[0028] Thirdly, this application provides a computer-readable storage medium storing instructions that, when executed on a computer, enable the computer to perform the data transmission method described in any of the first aspects above.
[0029] Fourthly, a computer program product containing instructions is provided, which, when run on an electronic device, enables the electronic device to execute any of the data transmission methods described in the first aspect above.
[0030] Fifthly, an apparatus (e.g., a system-on-a-chip) is provided, comprising a processor for supporting an electronic device in performing the functions described in the first aspect above. In one possible design, the apparatus further comprises a memory for storing program instructions and data necessary for the electronic device. When the apparatus is a system-on-a-chip, it may be composed of chips or may include chips and other discrete devices.
[0031] The technical effects of any of the design methods in aspects two through five can be found in the technical effects of different design methods in aspect one, and will not be repeated here. Attached Figure Description
[0032] Figure 1 This is a schematic diagram illustrating the communication between the camera module and the processor provided in an embodiment of this application.
[0033] Figure 2 This is a schematic diagram illustrating the communication between the processor and the screen provided in an embodiment of this application;
[0034] Figure 3 A schematic diagram of the hardware structure of the electronic device provided in the embodiments of this application;
[0035] Figure 4 A flowchart illustrating a data transmission method provided in an embodiment of this application;
[0036] Figure 5 This application provides a schematic diagram of the flow of adjustment instructions issued by a processor in an embodiment of the present application.
[0037] Figure 6 A flowchart illustrating another data transmission method provided in an embodiment of this application;
[0038] Figure 7 A schematic diagram of a mobile phone interface provided in an embodiment of this application;
[0039] Figure 8 This is a framework diagram of a chip system provided in an embodiment of this application. Detailed Implementation
[0040] The MIPI interface standard covers various types of interfaces, including the camera serial interface (CSI) and the display serial interface (DSI). MIPI CSI is used to connect camera modules to the processor for high-resolution video capture. MIPI DSI is used to connect the screen to the processor to ensure high-quality image transmission.
[0041] Figure 1 The diagram illustrates communication between the camera module and the processor in some embodiments. Specifically, after acquiring image data, the camera module can transmit the acquired image data to the processor via a MIPI interface, such as a CSI interface. Upon receiving the image data, the processor can perform image processing, etc. In this scenario, the sending end corresponding to the MIPI interface is the camera module, and the receiving end corresponding to the MIPI interface is the processor.
[0042] Figure 2 The diagram illustrates communication between the processor and the screen in some embodiments. In some scenarios, the processor transmits the image to be displayed to the screen via a MIPI interface, such as a DSI interface. In this scenario, the processor is the sending end corresponding to the MIPI interface, and the screen is the receiving end corresponding to the MIPI interface.
[0043] Different electronic devices or components have varying requirements for the signal drive capability of the MIPI interface. The signal drive capability of a MIPI interface primarily refers to its ability to drive load devices. Higher signal drive capability translates to higher data transmission capacity. However, due to limitations in board-level design (such as trace length), module drive capability, and receiver parameters, the signal drive capability of MIPI interfaces applied to different electronic devices varies, thus affecting the quality of data transmission via the MIPI interface.
[0044] Take the transmission of image data via the MIPI interface as an example. Insufficient signal drive capability of the MIPI interface used in electronic devices may lead to frame loss or stuttering in the image data received by the receiver. Conversely, excessively high signal drive capability of the MIPI interface can increase power consumption and lead to waste, and may also cause signal overshoot, affecting the stability of the general purpose input / output (GPIO) interface of the receiver. Signal overshoot refers to the phenomenon where the instantaneous value of a signal exceeds its final stable value when the signal transitions from one state to another. This usually occurs at the rising or falling edge of the signal, especially in digital circuits, where signal overshoot typically occurs when the signal transitions from low (0) to high (1) or from high (1) to low. In other words, if the signal drive capability of the MIPI interface used in electronic devices does not match the needs of the electronic devices, data transmission via the MIPI interface is prone to abnormalities.
[0045] Based on this, this application proposes a data transmission method applied to an electronic device, which includes a first module and a second module. The first module transmits data to the second module through a MIPI interface; that is, the first module is the transmitter corresponding to the MIPI interface, and the second module is the receiver corresponding to the MIPI interface. The method includes the following steps: controlling the first module to use first configuration information to transmit data to the second module through the MIPI interface. If an anomaly occurs in the transmitted data, it indicates that using the first configuration information to transmit data from the first module to the second module through the MIPI interface is inappropriate. In this case, controlling the first module to use second configuration information to transmit data to the second module through the MIPI interface. This achieves adjustment of the MIPI interface configuration information. The first and second configuration information are different configuration information for the MIPI interface, resulting in different transmission parameters when transmitting data through the MIPI interface using different configuration information. Transmission parameters may include current and signal quality. The MIPI interface configuration information characterizes the signal driving capability of the MIPI interface. Different configuration information results in different signal driving capabilities of the MIPI interface. Different signal driving capabilities of the MIPI interface lead to different current and signal quality when transmitting data through the MIPI interface. Therefore, the above solution ensures that the signal driving capability of the MIPI interface matches the current data transmission requirements of the electronic device, avoids abnormal data transmission situations, and thus improves the quality of data transmitted through the MIPI interface.
[0046] Understandably, after the first module adjusts to use the second configuration information to transmit data to the second module via the MIPI interface, the electronic device can continue to monitor for any anomalies in the transmitted data. If, under the second configuration information, anomalies still occur in the data transmission from the first module to the second module via the MIPI interface, the electronic device can further adjust the configuration information used by the first module. In this way, the electronic device can adjust the configuration information used by the first module to transmit data to the second module via the MIPI interface to a configuration information that better suits the needs of the electronic device.
[0047] The electronic device can be any electronic device including a MIPI interface. For example, the electronic device can be a mobile phone, tablet computer, personal computer (PC), smart screen, desktop, laptop, handheld computer, notebook computer, ultra-mobile personal computer (UMPC), netbook, wearable devices such as smartwatches, artificial intelligence (AI) speakers, and in-vehicle devices. It can also be various teaching aids (such as learning machines and early education machines), smart toys, portable robots, personal digital assistants (PDAs), augmented reality (AR) / virtual reality (VR) devices, media players, etc. Furthermore, it can be a device with mobile office capabilities, a device with smart home capabilities, a device with audio-visual entertainment capabilities, or a device supporting smart travel. This application does not impose any special limitations on the specific form of the electronic device.
[0048] like Figure 3 The diagram shown is a structural schematic of an electronic device 100 provided in an embodiment of this application. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, antenna 1, antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a sensor module 180, buttons 190, a motor 191, a camera module 192, a screen 193, and a subscriber identification module (SIM) card interface 194, etc. The sensor module 180 may include a pressure sensor 180A, a touch sensor 180B, etc.
[0049] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0050] Processor 110 may include one or more processing units, such as a central processing unit (CPU), a system-on-chip (SoC) application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU). Different processing units may be independent devices or integrated into one or more processors. For example, processor 110 is used to execute the data transmission method in the embodiments of this application.
[0051] The controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to the instruction opcode and timing signals to complete the control of fetching and executing instructions.
[0052] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0053] In some embodiments, the processor 110 may include one or more interfaces. These interfaces may include an inter-integrated circuit (IIC) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a MIPI interface, a GPIO interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc. In embodiments of this application, the processor 110 can connect to modules such as the wireless communication module 160, the audio module 170, the sensor module 180, the camera module 192, and the screen 193 through at least one of these interfaces, such as the MIPI interface. Additionally, in embodiments of this application, the processor 110 can also connect to the camera module 192 via the IIC interface, and the processor 110 can send adjustment commands to the camera module 192 through the channel corresponding to the IIC interface.
[0054] USB interface 130 is an interface that conforms to the USB standard specification, specifically it can be a Mini USB interface, Micro USB interface, USB Type C interface, etc. USB interface 130 can be used to connect a charger to charge electronic device 100, and it can also be used for data transfer between electronic device 100 and peripheral devices.
[0055] The external storage interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external storage interface 120 to perform data storage functions. For example, music, video, and other files can be saved on the external memory card.
[0056] Internal memory 121 can be used to store executable program code, which includes instructions. Processor 110 executes various functional applications and data processing of electronic device 100 by running the instructions stored in internal memory 121. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system and at least one application program required for a given function (such as sound playback, image playback, etc.).
[0057] In addition, the internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.
[0058] The charging management module 140 is used to receive charging input from the charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 can receive charging input from the wired charger via the USB interface 130.
[0059] The power management module 141 is used to connect the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140 to power the processor 110, internal memory 121, external memory, screen 193, camera module 192, and wireless communication module 160, etc.
[0060] In some other embodiments, the power management module 141 may also be located within the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may also be located in the same device.
[0061] The wireless communication function of electronic device 100 can be realized through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor, etc.
[0062] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with tuning switches.
[0063] The mobile communication module 150 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G, applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1.
[0064] The wireless communication module 160 can provide solutions for wireless communication applications on the electronic device 100, including wireless local area networks (WLAN) (such as Wi-Fi), Bluetooth, Global Navigation Satellite System (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR). The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signal, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.
[0065] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, so that electronic device 100 can communicate with networks and other devices through wireless communication technology.
[0066] Electronic device 100 can implement audio functions through audio module 170 and application processor, such as music playback and recording.
[0067] The audio module 170 is used to convert digital audio signals into analog audio signals for output, and also to convert analog audio inputs into digital audio signals. The audio module 170 can also be used for encoding and decoding audio signals. In some embodiments, the audio module 170 may be located in the processor 110, or some functional modules of the audio module 170 may be located in the processor 110.
[0068] Pressure sensor 180A is used to sense pressure signals and convert them into electrical signals. In some embodiments, pressure sensor 180A can be disposed on screen 193. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors. A capacitive pressure sensor may include at least two parallel plates with conductive material. When force is applied to pressure sensor 180A, the capacitance between the electrodes changes. Electronic device 100 determines the pressure intensity based on the change in capacitance. When a touch operation is applied to screen 193, electronic device 100 detects the touch operation intensity based on pressure sensor 180A. Electronic device 100 can also calculate the touch position based on the detection signal from pressure sensor 180A.
[0069] Touch sensor 180B, also known as a "touch panel," can be located on screen 193. The touch sensor 180B and screen 193 together form a touchscreen, also known as a "touch display." Touch sensor 180B detects touch operations applied to or near it. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through screen 193. In other embodiments, touch sensor 180B may also be located on the surface of electronic device 100, in a different position than screen 193.
[0070] Buttons 190 include a power button, volume buttons, etc. Buttons 190 can be mechanical buttons or touch-sensitive buttons. Electronic device 100 can receive button input and generate key signal inputs related to user settings and function control of electronic device 100.
[0071] Motor 191 can generate vibration alerts. Motor 191 can be used for incoming call vibration alerts or for touch vibration feedback.
[0072] The camera module 192 is used to capture still images or videos. In some embodiments, the electronic device 100 may include one or N camera modules 192, where N is a positive integer greater than 1.
[0073] Electronic device 100 implements display functions through a GPU, screen 193, and application processor. The GPU is a microprocessor for image processing, connecting the screen 193 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0074] Screen 193 is used to display images, videos, etc. In some embodiments, electronic device 100 may include one or N screens 193, where N is a positive integer greater than 1.
[0075] The SIM card interface 194 is used to connect a SIM card. The SIM card can be inserted into or removed from the SIM card interface 194 to achieve contact and separation with the electronic device 100. The electronic device 100 can support one or N SIM card interfaces, where N is a positive integer greater than 1.
[0076] The data transmission methods described in the following embodiments can all be implemented in the electronic device 100 having the above-described hardware structure.
[0077] The data transmission method proposed in the embodiments of this application will be described in detail below with reference to the accompanying drawings. In the following embodiments, the electronic device is a mobile phone, which includes a first module and a second module, and the first module and the second module transmit image data through a MIPI interface as an example.
[0078] Figure 4 A flowchart illustrating the data transmission method in some embodiments is shown.
[0079] S401. Power on the phone.
[0080] S402. The first module of the mobile phone control uses the first configuration information to transmit data to the second module through the MIPI interface.
[0081] For example, the first module described above can be a processor, and the second module can be a screen. Currently, electronic devices with screens typically display an interface on the screen after the electronic device is powered on. Therefore, in scenarios where the processor sends image data to the screen via the MIPI interface, S402 can be executed after the phone is powered on. In some embodiments, S402 may specifically include: in response to the phone being powered on, the phone controls the processor to use first configuration information to transmit data to the screen via the MIPI interface.
[0082] For example, the first module described above can be a camera module, and the second module can be a processor. Data transmission from the camera module to the processor typically occurs after the camera module is started, such as after the camera application is launched. In other embodiments, S402 may specifically include: in response to the camera application launching, the mobile phone controls the camera module to use first configuration information to transmit data to the processor via the MIPI interface.
[0083] The initial configuration information can be the same or different in different scenarios. For example, the initial configuration information used by the processor when transmitting data to the screen through the MIPI interface can be the same as or different from the initial configuration information used by the camera module when transmitting data to the processor through the MIPI interface.
[0084] The first configuration information specifically refers to the configuration information of the MIPI interface. The configuration information of the MIPI interface can be used to characterize the signal driving capability of the MIPI interface.
[0085] In addition, the aforementioned S402 can be executed by the phone's processor.
[0086] S403. The mobile phone determines whether there is any abnormality in the data transmission from the first module to the second module through the MIPI interface.
[0087] As explained above, insufficient signal drive capability of the MIPI interface may lead to frame outage issues in the image data transmitted through it. Conversely, excessively high signal drive capability of the MIPI interface may result in signal overshoot.
[0088] In response to frame outages in image data, the phone can determine whether an anomaly has occurred based on the frame information of the image data transmitted through the MIPI interface. Specifically, in the example where the first module is the camera module and the second module is the processor, the phone can determine whether the data transmission through the MIPI interface is abnormal based on the frame information of the image data received by the processor from the camera module. In the example where the first module is the processor and the second module is the screen, the phone can determine whether the data transmission through the MIPI interface is abnormal based on the frame information of the image data transmitted by the processor to the screen (or the image data received by the screen from the processor). In other words, the phone can determine whether the signal driving capability of the MIPI interface is insufficient based on the frame information of the image data transmitted through the MIPI interface.
[0089] To address the anomaly of signal overshoot in MIPI interface transmission, the signal quality of the image data received by the second module through the MIPI interface can be used to determine whether there is an anomaly in the data transmission via the MIPI interface. In other words, the mobile phone can determine whether the signal driving capability of the MIPI interface is too high based on the signal quality of the image data received by the second module through the MIPI interface.
[0090] In some embodiments, S403 may specifically include: the mobile phone determining whether there is an anomaly in the data transmitted through the MIPI interface based on the frame information of the image data transmitted through the MIPI interface and the signal quality corresponding to the image data received by the second module through the MIPI interface. It is understood that determining whether there is an anomaly in the MIPI interface data transmission based on the frame information of the image data transmitted through the MIPI interface, and / or determining whether there is an anomaly in the MIPI interface data transmission based on the signal quality corresponding to the image data received by the second module through the MIPI interface, both indicate that the judgment result of S403 is yes.
[0091] The mobile phone can determine whether there is an anomaly in the data transmitted through the MIPI interface by using the frame information of the image data, which can be achieved in any way.
[0092] For example, frame information can specifically be the frame information of a single data frame. The frame information of a single data frame can include a frame header, data information, and checksum information. Based on the frame information of the image data transmitted through the MIPI interface, the mobile phone can perform a cyclic redundancy check (CRC check) to determine if there are any anomalies in the transmitted data. Specifically, if the CRC check fails based on the frame information, it indicates that there is an anomaly in the transmitted data. If the CRC check succeeds, it indicates that there is no anomaly in the transmitted data. CRC check is a data transmission error detection technique used to detect whether errors occur during data transmission. The above-mentioned comparison of the image data transmitted through the MIPI interface based on the frame information can also be described as comparing the process of transmitting data through the MIPI interface with the standard MIPI interface protocol based on the frame information.
[0093] For example, since the data transmitted through the MIPI interface is image data, the aforementioned frame information can be the frame count (or frame rate). In the example where the first module is a camera module and the second module is a processor, the mobile phone can determine whether there is an anomaly in the transmission of image data from the camera module to the processor by judging whether the frame count (or frame rate) of the image data received by the processor from the camera module within a preset time reaches a frame count threshold (or frame rate threshold). Specifically, if the frame count (or frame rate) does not reach the frame count threshold (or frame rate threshold) within the preset time, it can be determined that the signal driving capability of the MIPI interface is insufficient when the camera module transmits image data to the processor through the MIPI interface. Similarly, in the example where the first module is a processor and the second module is a screen, the mobile phone can determine whether there is an anomaly in the transmission of image data from the processor to the screen by judging whether the frame count (or frame rate) of the image data sent by the processor to the screen (or the image data received by the screen from the processor) within a preset time reaches a frame count threshold (or frame rate threshold). If the number of frames (or frame rate) does not reach the frame number threshold (or frame rate threshold) within the preset time, it can be determined that the signal driving capability of the MIPI interface is insufficient when the processor transmits image data to the screen through the MIPI interface.
[0094] For another example, since the data transmitted through the MIPI interface is image data, the aforementioned frame information can also be the frame interval. In the example where the first module is a camera module and the second module is a processor, the mobile phone can determine whether there is an anomaly in the transmission of image data from the camera module to the processor by judging whether the frame interval of the image data received by the processor from the camera module is greater than a frame interval threshold. Specifically, if the frame interval is greater than the frame interval threshold, it can be determined that the signal driving capability of the MIPI interface is insufficient when the camera module transmits image data to the processor through the MIPI interface. Similarly, in the example where the first module is a processor and the second module is a screen, the mobile phone can determine whether there is an anomaly in the transmission of image data from the processor to the screen by judging whether the frame interval of the image data sent by the processor to the screen is greater than a frame interval threshold. If the frame interval is greater than the frame interval threshold, it can be determined that the signal driving capability of the MIPI interface is insufficient when the processor transmits image data to the screen through the MIPI interface.
[0095] It should be noted that in other embodiments, the mobile phone can also determine whether there is an anomaly in the data transmission by using the frame information of the image data in other ways.
[0096] The mobile phone determines whether there is an anomaly in the data transmission via the MIPI interface by judging the signal quality corresponding to the image data received by the second module through the MIPI interface. This can be achieved in any way. For example, the mobile phone can plot a signal waveform based on the signal corresponding to the image data received by the second module, determine the signal quality based on the signal waveform, and then determine whether signal overshoot has occurred. If the signal quality determined based on the signal waveform indicates that signal overshoot has occurred, then it is determined that there is an anomaly in the data transmission. In other embodiments, the mobile phone can also use other methods to determine whether signal overshoot has occurred, and thus determine whether there is an anomaly in the data transmission via the MIPI interface.
[0097] The method described in the above embodiments can be used to determine whether there are any abnormalities in the data transmitted through the MIPI interface.
[0098] If the S403 judgment result is negative, it indicates that the current data transmission via the MIPI interface is normal. In other words, it's appropriate for the first module to use the first configuration information to transmit data via the MIPI interface, and no adjustment is needed. In this case, the phone can remain silent, and the first module continues to use the first configuration information to transmit data to the second module via the MIPI interface. This judgment branch occurs in... Figure 4 Not shown in the image.
[0099] If the result of S403 is yes, it means that an abnormality has been detected in the data transmission through the MIPI interface, and S404 can be executed at this time.
[0100] In addition, the aforementioned S403 can be executed by the phone's processor.
[0101] S404. Mobile phone determines the type of error.
[0102] As explained above, data transmission via the MIPI interface can lead to anomalies if the MIPI interface's signal drive capability is insufficient or excessive. In some embodiments, the anomaly types for data transmission via the MIPI interface include a first type and a second type. The first type indicates that the MIPI interface's signal drive capability is less than a minimum threshold; the second type indicates that the MIPI interface's signal drive capability is greater than a maximum threshold. That is, the first type indicates insufficient signal drive capability of the MIPI interface, and the second type indicates excessively high signal drive capability. The maximum threshold corresponds to the second threshold, the minimum threshold corresponds to the first threshold, and the second threshold is greater than the first threshold. The first and second thresholds can be set according to actual conditions.
[0103] As can be seen from the above embodiments, when a mobile phone determines whether there is an anomaly in the transmitted data, different judgment conditions are typically used for the two anomaly types: insufficient or excessive signal driving capability of the MIPI interface. Therefore, in this embodiment, the mobile phone can determine the anomaly type by combining information that meets the conditions for an anomaly in the transmitted data. For example, in S403 above, if the mobile phone determines that there is an anomaly in the transmitted data based on the frame information of the image data transmitted through the MIPI interface, then in S404 above, the mobile phone can determine that the anomaly type is insufficient signal driving capability of the MIPI interface, i.e., the first type. As another example, in S403 above, if the mobile phone determines that there is an anomaly in the transmitted data based on the signal quality corresponding to the image data received by the second module through the MIPI interface, then in S404 above, the mobile phone can determine that the anomaly type is excessive signal driving capability of the MIPI interface, i.e., the second type.
[0104] In the technical solutions proposed in the above embodiments, the anomaly type can be determined by combining information that meets the conditions for abnormal transmission data, which is simple and convenient. In other embodiments, the mobile phone can also determine the anomaly type in other ways, which are not limited in the embodiments of this application.
[0105] In addition, the aforementioned S404 can be executed by the phone's processor.
[0106] S405. The mobile phone adjusts the configuration information of the MIPI interface used when the first module transmits data to the second module through the MIPI interface according to the type of abnormality.
[0107] Mobile phones can pre-store configuration information for multiple different MIPI interfaces. Different configurations result in different transmission parameters when transmitting data via the MIPI interface. These parameters can include current and signal quality. In other words, different configurations correspond to different signal driving capabilities of the MIPI interface. Different signal driving capabilities result in different current and / or signal quality when transmitting data via the MIPI interface. For example, a higher signal driving capability corresponds to a higher current and better signal quality when transmitting data via the MIPI interface. Conversely, a lower signal driving capability corresponds to a lower current and worse signal quality when transmitting data via the MIPI interface.
[0108] In some embodiments, in S405, the configuration information of the MIPI interface used by the mobile phone control first module is changed from first configuration information to second configuration information.
[0109] As an example, after a mobile phone leaves the factory, it typically has default configuration information for the MIPI interface. This default configuration information can be the lowest possible configuration; that is, the default configuration information corresponds to the lowest signal driving capability of the MIPI interface. In other words, in this solution, the trend in adjusting the MIPI interface configuration information of the electronic device is to gradually increase the signal driving capability of the MIPI interface from the lowest level. Based on the above explanation, it can be seen that different configuration information results in different data transmission parameters through the MIPI interface. For example, using the lowest configuration information results in less current during transmission than using any other configuration information. Furthermore, using the lowest configuration information results in less signal quality during transmission than using any other configuration information. Moreover, using the lowest configuration information results in less current during transmission and less signal quality during transmission than using any other configuration information. In this way, the signal driving capability of the MIPI interface that meets the needs of the mobile phone can be obtained. Furthermore, since lower signal drive capability of the MIPI interface results in lower power consumption for the phone, adjusting the MIPI interface's signal drive capability from low to high during the process of finding suitable configuration information can also reduce the phone's power consumption. Additionally, excessively high signal drive capability of the MIPI interface can easily lead to signal overshoot, which can affect the stability of the GPIO interface of the second module. Therefore, the above solution can also increase the stability of the second module.
[0110] As another example, as described in the above embodiments, there are two types of anomalies: one type indicates insufficient signal driving capability of the MIPI interface, and the other type indicates excessively high signal driving capability of the MIPI interface. Therefore, the adjustment direction for the MIPI interface configuration information may differ depending on the type of anomaly. When the anomaly type indicates insufficient signal driving capability of the MIPI interface (the first type mentioned above), it means that the signal driving capability of the MIPI interface needs to be increased. In this case, the mobile phone can adjust the MIPI interface configuration information to a higher configuration. The higher the configuration information, the higher the corresponding signal driving capability of the MIPI interface. Conversely, the lower the configuration information, the lower the corresponding signal driving capability of the MIPI interface. That is, the signal driving capability of the MIPI interface corresponding to the second configuration information is higher than that corresponding to the first configuration information. Specifically, the second current when transmitting data through the MIPI interface using the second configuration information is higher than the first current when transmitting data through the MIPI interface using the first configuration information. Or, the second signal quality when transmitting data through the MIPI interface using the second configuration information is higher than the first signal quality when transmitting data through the MIPI interface using the first configuration information. Alternatively, the second current when transmitting data through the MIPI interface using the second configuration information is higher than the first current when transmitting data through the MIPI interface using the first configuration information; and the second signal quality when transmitting data through the MIPI interface using the second configuration information is higher than the first signal quality when transmitting data through the MIPI interface using the first configuration information.
[0111] Conversely, when the anomaly type indicates that the signal driving capability of the MIPI interface is too high (the second type mentioned above), it means that the signal driving capability of the MIPI interface needs to be reduced. In this case, the mobile phone can adjust the configuration information of the MIPI interface to a configuration information with a lower signal driving capability. That is, the signal driving capability of the MIPI interface corresponding to the second configuration information is lower than the signal driving capability of the MIPI interface corresponding to the first configuration information. Specifically, the second current when transmitting data through the MIPI interface using the second configuration information is lower than the first current when transmitting data through the MIPI interface using the first configuration information. Or, the second signal quality when transmitting data through the MIPI interface using the second configuration information is lower than the first signal quality when transmitting data through the MIPI interface using the first configuration information. Or, the second current when transmitting data through the MIPI interface using the second configuration information is lower than the first current when transmitting data through the MIPI interface using the first configuration information; and the second signal quality when transmitting data through the MIPI interface using the second configuration information is lower than the first signal quality when transmitting data through the MIPI interface using the first configuration information.
[0112] The configuration information for different MIPI interfaces can be stored in different tiers on the mobile phone. Specifically, the mobile phone can pre-store configuration information for multiple different MIPI interfaces, as well as the corresponding tier information for each configuration. In this embodiment, the first configuration information in the above embodiment belongs to one of the tiers. In some embodiments, S405 may specifically include: adjusting the tier of the configuration information used by the mobile phone when the first module transmits data to the second module through the MIPI interface according to the type of exception.
[0113] Furthermore, S405 may specifically include: when the exception type is type 2, the mobile phone controls to lower the configuration level of the MIPI interface of the current first module. When the exception type is type 1, the mobile phone controls to raise the configuration level of the MIPI interface of the current first module. Type 2 indicates that the signal driving capability of the MIPI interface is too high, and Type 1 indicates that the signal driving capability of the MIPI interface is insufficient. It should be noted that the higher the configuration level of the MIPI interface, the higher the signal driving capability of the MIPI interface; conversely, the lower the configuration level of the MIPI interface, the lower the signal driving capability of the MIPI interface.
[0114] Taking an electronic device storing configuration information for four different MIPI interface levels as an example: Level 1, Level 2, Level 3, and Level 4. The signal driving capability of the MIPI interface increases progressively with each level. Specifically, in the case of the second type of anomaly, the mobile phone controls the reduction of the level of the current first module's MIPI interface configuration information. This can be achieved by: querying the level 2 of the MIPI interface configuration information used by the current first module; querying the level information corresponding to different configuration information to obtain the configuration information for level 3, which is higher than level 2; and then updating the current configuration information list to the configuration information for level 3. In the case of the first type of anomaly, the mobile phone controls the reduction of the level of the current first module's MIPI interface configuration information. This can be achieved by: querying the level 2 of the MIPI interface configuration information used by the current first module. The phone queries the corresponding gear information for different configuration settings and retrieves the configuration information for gear 1, which is lower than gear 2. Then, the phone updates the current configuration information list to reflect the configuration information for gear 1.
[0115] The configuration information of the MIPI interface is typically stored in the sending end corresponding to the MIPI interface, i.e., the first module mentioned above. As described in the above embodiments, S402-S404 can all be executed by the phone's processor, and S405 can also be executed by the phone's processor. In embodiments where the first module is a camera module and the second module is a processor, the adjustment of configuration information in S405 can be specifically achieved by sending an adjustment command to the camera module. For example, in the event of an anomaly in data transmission, the processor sends an adjustment command to the camera module. This adjustment command instructs the camera module to adopt second configuration information and transmit data to the processor via the MIPI interface. Specifically, in the case of the second type of anomaly, the phone controls the reduction of the current MIPI interface configuration information level of the first module. This can include: in the case of the second type of anomaly, the phone, such as the phone's processor, sends a second adjustment command to the camera module; this second adjustment command triggers the camera module to reduce the current MIPI interface configuration information level. Similarly, when the exception type is type 1, the mobile phone control to increase the configuration level of the MIPI interface of the current first module may specifically include: when the exception type is type 1, the mobile phone, such as the mobile phone's processor, sends a first adjustment command to the camera module; the first adjustment command is used to trigger the camera module to increase the configuration level of the currently used MIPI interface.
[0116] In a mobile phone, such as when the processor sends adjustment commands to the camera module, this can be achieved through the IIC channel. IIC is also known as I... 2 IIC is a serial communication bus. In mobile phones, such as when the processor sends adjustment commands to the camera module, it does not occupy the MIPI interface; data is transmitted through the MIPI interface.
[0117] Figure 5 This diagram illustrates the flow of adjustment commands issued by the processor in a scenario where the camera module transmits image data to the processor. Specifically, in this scenario, the camera module is the transmitter corresponding to the MIPI interface, and the processor is the receiver corresponding to the MIPI interface. Therefore, in order to adjust the signal driving capability of the MIPI interface, the processor needs to send adjustment commands to the transmitter corresponding to the MIPI interface, i.e., the camera module, to trigger the camera module to adjust the configuration information of the MIPI interface used when transmitting image data to the processor via the MIPI interface.
[0118] In an embodiment where the first module is a processor and the second module is a screen, in the above S405, the processor can directly adjust the configuration information used when the processor transmits data to the screen through the MIPI interface.
[0119] Furthermore, the first module can be configured with a corresponding register to store the configuration information of the MIPI interface used when the first module transmits data to the second module via the MIPI interface. A register is a high-speed storage unit inside the CPU used for temporary data storage. In a computer system, the address of a register typically refers to its identifier or number within the CPU or a specific hardware device. This address is used to distinguish different registers, enabling the CPU to correctly access and operate on them. Specifically, S405 can include: modifying the contents of the register corresponding to the first module from the first configuration information to the second configuration information, based on the exception type.
[0120] In some embodiments, after S405, the mobile phone can control the first module to immediately adopt the adjusted configuration information, such as the second configuration information, and transmit the data to the second module through the MIPI interface.
[0121] In other embodiments, after the mobile phone adjusts the configuration information of the MIPI interface according to the type of exception, the mobile phone can perform a restart operation to make the adjusted MIPI interface configuration information, such as the second configuration information, take effect. In some embodiments, after S405, the above method further includes: the mobile phone performing a restart operation. After restarting, the mobile phone controls the first module to transmit data to the second module through the MIPI interface using the adjusted configuration information, such as the second configuration information.
[0122] In an embodiment where the camera module transmits image data to the processor, as an example, after S405, the phone can perform a phone restart operation. After restarting, the phone can control the camera module to use adjusted MIPI interface configuration information, such as the second configuration information, to transmit image data to the processor via the MIPI interface. As another example, after S405, the phone can also perform a camera module restart operation, specifically restarting the camera application or restarting the shooting function. After restarting, the phone can control the camera module to use adjusted MIPI interface configuration information, such as the second configuration information, to transmit image data to the processor via the MIPI interface.
[0123] In an embodiment where the processor transmits image data to the screen, after step S405, the phone can perform a restart operation. After restarting, the phone can control the processor to transmit image data to the screen using adjusted MIPI interface configuration information, such as the second configuration information, via the MIPI interface.
[0124] In addition, to ensure a good user experience and avoid issues such as shutdown, restart, or application exit during phone use, the phone can display a prompt message before performing a restart operation. This prompt message asks the user whether they need to restart immediately. In this embodiment, the user may choose to restart or not. However, the phone can only control the adjusted configuration information, such as the second configuration information, after performing a restart operation. Therefore, in this embodiment, if the user chooses to restart, the phone can adjust the configuration information of the MIPI interface used by the first module to transmit data to the second module through the MIPI interface according to the type of exception. That is, if the judgment result of S403 is yes, before S405, the above method further includes: the phone displays a prompt message asking the user whether they need to restart immediately. S405 specifically includes: the phone responding to the restart trigger operation received based on the prompt message, adjusting the configuration information of the MIPI interface used by the first module to transmit data to the second module through the MIPI interface according to the type of exception. And the phone can perform a restart operation. After restarting, the first module of the phone control uses the adjusted configuration information, such as the second configuration information, to transmit data to the second module via the MIPI interface. This allows the user to choose whether to restart, preventing unexpected restarts of the phone, applications, or app exits during electronic device use.
[0125] Understandably, in some embodiments, the phone will not restart if the user does not choose to restart. Accordingly, in this embodiment, in response to receiving a trigger operation to not restart based on a prompt message, the phone does not adjust the configuration information of the MIPI interface used by the first module when transmitting data to the second module via the MIPI interface. Afterwards, the first module still uses the first configuration information to transmit data to the second module via the MIPI interface. Thus, deciding whether to restart based on the user's choice avoids situations where the user suddenly restarts the phone, restarts an application, or exits an application while using the electronic device.
[0126] Furthermore, after S405, the mobile phone controls the first module to use the adjusted configuration information, such as the second configuration information, to transmit data to the second module via the MIPI interface. The mobile phone can continue to monitor whether there are any anomalies in the data transmission of the first module through the MIPI interface. That is, after S405, the mobile phone can adjust the configuration information used by the first module again in the manner of S402-S405. In this embodiment, if adjusting the configuration information of the MIPI interface used by the first module once still cannot meet the mobile phone's requirements for the driving capability of the MIPI interface, the mobile phone can continue to adjust the configuration information of the MIPI interface used by the first module until the configuration information of the MIPI interface used by the first module meets the mobile phone's requirements for the driving capability of the MIPI interface.
[0127] In some embodiments, the default configuration information can be the configuration information with the lowest driving capability corresponding to the MIPI interface. Taking an electronic device storing configuration information for four levels (level 1, level 2, level 3, and level 4), where the signal driving capability of the MIPI interface increases progressively from level 1 to level 4, the default configuration information could be the configuration information for level 1. This allows the phone to start with the configuration information with the lowest driving capability and gradually try configuration information with higher driving capabilities to determine the most suitable MIPI interface configuration information. This not only reduces phone power consumption but also increases the stability of the GPIO of the corresponding receiver end after finding the appropriate MIPI interface configuration information.
[0128] In other embodiments, the default configuration information can also be the configuration information corresponding to the highest driving capability of the MIPI interface. For example, if an electronic device stores configuration information for four gears (gear 1, gear 2, gear 3, and gear 4), and the signal driving capability of the MIPI interface increases progressively from gear 1 to gear 4, the default configuration information could be the configuration information for gear 4. Alternatively, the default configuration information can be any configuration information.
[0129] In the technical solution proposed in this application embodiment, no hardware circuit modifications are required; instead, adaptive adjustment of the MIPI interface configuration information is achieved solely through software. When an anomaly is detected in the data transmission of the MIPI interface, the configuration information level of the MIPI interface can be adjusted up or down according to the type of anomaly, thereby changing the signal driving capability of the MIPI interface to better meet the needs of the electronic device. Furthermore, the above method can obtain the minimum driving capability required by the electronic device, which not only reduces the power consumption of the electronic device but also increases the stability of the GPIO of the receiving end corresponding to the MIPI interface.
[0130] Figure 6 The diagram illustrates the specific process of a camera module transmitting image data to a processor in some embodiments.
[0131] S501. Power on the phone.
[0132] S502. Launch the camera application on your phone.
[0133] S503. The mobile phone controls the camera module using the first configuration information and transmits data to the processor through the MIPI interface.
[0134] A mobile phone may have multiple camera modules, but usually only one camera module is currently in use. In the S503 mentioned above, the mobile phone specifically controls the currently displayed camera module to use the first configuration information to transmit data to the processor through the MIPI interface.
[0135] Different camera modules can use the same or different configuration information. The default configuration information set for different camera modules can also be the same or different.
[0136] S504. The mobile phone determines whether there is any abnormality in the data transmission from the first module to the second module through the MIPI interface.
[0137] If the S504 judgment result is negative, the phone will not adjust the MIPI interface configuration information. Figure 6 Not shown in the diagram. If the result of S504 is yes, then S505 is executed.
[0138] The S505 phone displays a prompt message.
[0139] This message indicates that a restart is imminent and asks the user if they wish to restart immediately. Figure 7 As shown, the phone can display a prompt message 60. This prompt message 60 includes a first option 60a and a second option 60b. The first option 60a indicates agreement to restart, and the second option 60b indicates disagreement to restart.
[0140] S506. The mobile phone determines whether it has received a restart trigger operation based on the prompt message.
[0141] exist Figure 7 In the example shown, if the mobile phone detects that the user has triggered the first option in the prompt message 60, it means that the user agrees to restart, and the corresponding judgment result of S506 is yes.
[0142] If the S506 judgment result is negative, the configuration information for the target gear will not take effect immediately, and the transmitter corresponding to the MIPI interface will still transmit data based on the configuration information of the MIPI interface before the adjustment. This judgment branch is not in Figure 6 This is reflected in the text.
[0143] If the result of S506 is yes, then S507-S509 are executed.
[0144] S507. The mobile phone determines the type of abnormality.
[0145] S508. The mobile phone adjusts the configuration information of the MIPI interface used when the camera module transmits data to the processor via the MIPI interface according to the type of anomaly.
[0146] S509. The phone will restart.
[0147] As one example, a reboot operation could specifically be the operation of rebooting the phone. As another example, a reboot operation could specifically be the operation of rebooting the camera app.
[0148] After restarting, when the phone launches the camera application again, the camera module will transmit images to the processor based on the configuration information of the adjusted MIPI interface in S508.
[0149] The specific implementation of S501-S509 can be found in the detailed description in the above embodiments, and will not be repeated here.
[0150] After S509, the phone can restart the camera application and continue to check for any anomalies in the data transmission from the camera module to the processor via the MIPI interface. If an anomaly is found, the MIPI interface configuration information will be adjusted again. In other words, after S509, it is possible to return and re-execute S502-S509.
[0151] In the technical solution provided in the embodiments of this application, a prompt message is sent to the user before restarting. This avoids problems such as sudden shutdown, restart, or application exit during phone use, thus improving the user experience. Furthermore, allowing the user to choose whether to restart makes phone use more in line with their habits.
[0152] Additionally, upon detecting an anomaly during data transmission via the MIPI interface, the mobile phone can report this anomaly to the server. This helps device manufacturers gather more information for better device debugging. In some embodiments, the mobile phone reports anomaly information to the server after detecting an anomaly in the transmitted data. This anomaly information may include the time and location of the anomaly.
[0153] In some embodiments, to enable the mobile phone to report to the server when it detects an anomaly in the data transmission from the first module to the second module via the MIPI interface, the mobile phone needs to register a corresponding client after powering on and add an anomaly detection function to the error branch of the code. When the mobile phone detects an anomaly in the data transmission from the first module to the second module via the MIPI interface, it can record the error information and report it to the server. This process can be recorded as upload anomaly tracking.
[0154] Other embodiments of this application provide an electronic device (such as a mobile phone). The electronic device may include a MIPI interface, a memory, and one or more processors. The memory is coupled to the processors. The memory is also used to store computer program code, which includes computer instructions. When the processor executes the computer instructions, the electronic device can perform various functions or steps performed by the mobile phone in the above method embodiments. The structure of the electronic device can be referred to... Figure 3 The structure of the electronic device 100 shown.
[0155] This application also provides a chip system, such as... Figure 8 As shown, the chip system 90 includes at least one processor 901 and at least one interface circuit 902. The processor 901 and the interface circuit 902 are interconnected via lines. For example, the interface circuit 902 can be used to receive signals from other devices (e.g., a computer's memory). As another example, the interface circuit 902 can be used to send signals to other devices (e.g., the processor 901). Exemplarily, the interface circuit 902 can read instructions stored in memory and send those instructions to the processor 901. When the instructions are executed by the processor 901, the computer can perform the steps in the above embodiments. Of course, the chip system may also include other discrete devices, and this application embodiment does not specifically limit this.
[0156] This application also provides a computer-readable storage medium including computer instructions that, when executed on the aforementioned electronic device (such as a mobile phone), cause the electronic device to perform various functions or steps performed by the mobile phone in the above method embodiments.
[0157] This application also provides a computer program product that, when run on a computer, causes the computer to perform the various functions or steps performed by the mobile phone in the above method embodiments. The computer can be an electronic device, such as a mobile phone.
[0158] Through the above description of the embodiments, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0159] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0160] The units described as separate components may or may not be physically separate. A component shown as a unit can be one or more physical units; that is, it can be located in one place or distributed in multiple different locations. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0161] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0162] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0163] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A data transmission method, characterized in that, The method is applied to an electronic device, which includes a first module and a second module, wherein the first module transmits data to the second module via a Mobile Industry Processor (MIPI) interface; the method includes: The first module is controlled to use the first configuration information to transmit data to the second module through the MIPI interface; In the event of an anomaly in the transmitted data, the first module is controlled to use the second configuration information to transmit data to the second module through the MIPI interface. The first configuration information and the second configuration information are different configuration information of the MIPI interface. The transmission parameters are different when transmitting data through the MIPI interface using different configuration information; the transmission parameters include current and signal quality.
2. The method according to claim 1, characterized in that, The second current when transmitting data through the MIPI interface using the second configuration information is higher than the first current when transmitting data through the MIPI interface using the first configuration information; and / or, the second signal quality when transmitting data through the MIPI interface using the second configuration information is higher than the first signal quality when transmitting data through the MIPI interface using the first configuration information.
3. The method according to claim 2, characterized in that, The first configuration information is the lowest configuration information among all configuration information; The method further includes: after the first module uses the second configuration information to transmit data to the second module through the MIPI interface, if there is still an anomaly in the transmitted data, then the configuration information used by the first module is further adjusted.
4. The method according to claim 2 or 3, characterized in that, When the anomaly type corresponding to the abnormality in the transmitted data is the first type, the second current when transmitting data through the MIPI interface using the second configuration information is higher than the first current when transmitting data through the MIPI interface using the first configuration information; and / or, when the anomaly type corresponding to the abnormality in the transmitted data is the first type, the second signal quality when transmitting data through the MIPI interface using the second configuration information is higher than the first signal quality when transmitting data through the MIPI interface using the first configuration information; The first type indicates that the signal driving capability of the MIPI interface is less than a first threshold.
5. The method according to claim 4, characterized in that, The method further includes: When the anomaly type corresponding to the abnormality in the transmitted data is the second type, the second current when transmitting data through the MIPI interface using the second configuration information is lower than the first current when transmitting data through the MIPI interface using the first configuration information; and / or, when the anomaly type corresponding to the abnormality in the transmitted data is the second type, the second signal quality when transmitting data through the MIPI interface using the second configuration information is lower than the first signal quality when transmitting data through the MIPI interface using the first configuration information; The second type indicates that the signal driving capability of the MIPI interface is greater than a second threshold; the second threshold is greater than the first threshold.
6. The method according to any one of claims 1-5, characterized in that, The configuration information used by the first module to transmit data through the MIPI interface is stored in the register corresponding to the first module. In the event of an anomaly in the transmitted data, controlling the first module to use the second configuration information to transmit data to the second module through the MIPI interface includes: In the event of an anomaly in the transmission of data, the contents of the register corresponding to the first module will be modified from the first configuration information to the second configuration information.
7. The method according to claim 6, characterized in that, Before modifying the contents of the register corresponding to the first module from the first configuration information to the second configuration information, the method further includes: If there is an anomaly in the data transmission, a prompt message will be displayed; the prompt message is used to ask whether to restart. The step of modifying the contents of the register corresponding to the first module from the first configuration information to the second configuration information includes: In response to receiving a restart trigger operation based on the prompt information, the contents of the register corresponding to the first module are modified from the first configuration information to the second configuration information, and a restart operation is performed.
8. The method according to any one of claims 1-7, characterized in that, The first module is a camera module, and the second module is a processor; In the event of an anomaly in the transmitted data, controlling the first module to use the second configuration information to transmit data to the second module through the MIPI interface includes: In the event of an anomaly in the transmitted data, the processor is controlled to send an adjustment command to the camera module. The adjustment command is used to instruct the camera module to use the second configuration information and transmit data to the processor through the MIPI interface.
9. The method according to claim 8, characterized in that, The process of controlling the processor to send adjustment commands to the camera module includes: The processor controls the sending of adjustment commands to the camera via the internal integrated circuit IIC channel.
10. The method according to any one of claims 1-7, characterized in that, The first module is a processor, and the second module is a screen.
11. An electronic device, characterized in that, The electronic device includes: a MIPI interface, a processor, a memory, and a computer program stored in the memory; the memory is coupled to the processor. When the electronic device is running, the processor executes the computer program to implement the method as described in any one of claims 1-10.
12. A computer-readable storage medium, characterized in that, The device contains a computer program that, when executed by a processor of an electronic device, implements the method as described in any one of claims 1-10.
13. A computer program product, characterized in that, It includes a computer program, which, when executed by a processor, implements the method as described in any one of claims 1-10.