Electronic equipment and data transmission control method

By setting up a GPIO port between AP and CP and managing signal transmission, the data transmission conflict between AP and CP in electronic devices is solved, and the data transmission efficiency is improved.

CN120045481APending Publication Date: 2025-05-27SPREADTRUM COMM SHENZHEN CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510114513.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-23
Publication Date
2025-05-27

AI Technical Summary

Technical Problem

In electronic devices, data transmission conflicts often occur between application processors (APs) and communication processors (CPs), affecting data transmission efficiency.

Method used

By setting two sets of GPIO ports between AP and CP, these GPIO ports are used to transmit request signals and confirmation signals, ensuring that when the priority of AP is higher than CP, CP only sends confirmation signals when the transmission data interface between AP and CP is in an idle state, so as to notify AP to transmit data.

Benefits of technology

It effectively resolves the data transmission conflict between AP and CP, and improves the data transmission efficiency between AP and CP.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120045481A_ABST
    Figure CN120045481A_ABST
Patent Text Reader

Abstract

The invention discloses an electronic device and a data transmission control method, which can solve the data transmission conflict between an AP and a CP and improve the data transmission efficiency between the AP and the CP, the electronic device comprises the AP and the CP, and a first group of GPIO ports where a first GPIO port and a second GPIO port are located, a third GPIO port and a second group of GPIO ports where a fourth GPIO port is located are arranged between the AP and the CP. The CP can respond to the condition that the receiving time of the first request signal is the same as the sending time of the second request signal and the priority of the AP is higher than that of the CP, and a first confirmation signal responding to the first request signal is sent to the AP through the second GPIO port; the AP can respond to the first confirmation signal to send first data to the CP, and respond to the completion of sending of the first data, a second confirmation signal responding to the second request signal is sent to the CP through the fourth GPIO port, and the CP can respond to the second confirmation signal to send second data to the AP.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technologies, and in particular, to an electronic device and a data transmission control method. Background Art

[0002] During the communication between the Application Processor (AP) and the Communication Processor (CP) in an electronic device, there are often situations where the AP needs to transmit data to the CP, and at the same time, the CP needs to transmit data to the AP, that is, there is a data transmission conflict between the AP and the CP. This conflict will greatly affect the data transmission efficiency between the AP and the CP. Therefore, how to solve the data transmission conflict between the AP and the CP is a technical problem to be solved urgently. Summary of the Invention

[0003] This application provides an electronic device and a data transmission control method, which can solve the data transmission conflict between the AP and the CP and improve the data transmission efficiency between the AP and the CP.

[0004] In a first aspect, this application provides an electronic device. The electronic device includes an Application Processor (AP) and a Communication Processor (CP). The connection interface between the AP and the CP includes a first group of GPIO ports and a second group of GPIO ports. The first group of GPIO ports includes a first GPIO port and a second GPIO port. The first GPIO port is used to transmit a request signal, and the second GPIO port is used to transmit an acknowledgment signal. The second group of GPIO ports includes a third GPIO port and a fourth GPIO port. The third GPIO port is used to transmit a request signal, and the fourth GPIO port is used to transmit an acknowledgment signal. The CP is configured to, in response to the reception time of a first request signal being the same as the transmission time of a second request signal, and the priority of the AP being higher than the priority of the CP, send a first acknowledgment signal to the AP through the second GPIO port. Wherein, the first request signal is the request signal transmitted by the first GPIO port, which is used to indicate that the AP requests to transmit data to the CP, and the second request signal is the request signal transmitted by the third GPIO port, which is used to indicate that the CP requests to transmit data to the AP. The first acknowledgment signal is used to respond to the first request signal and indicate that the CP acknowledges the received data. The AP is configured to, in response to the first acknowledgment signal, send the first data to the CP; in response to the completion of the transmission of the first data, send a second acknowledgment signal to the CP through the fourth GPIO port. Wherein, the second acknowledgment signal is used to respond to the second request signal and indicate that the AP acknowledges the received data. The CP is further configured to, in response to the second acknowledgment signal, send the second data to the AP, so as to solve the data transmission conflict between the AP and the CP and improve the data transmission efficiency between the AP and the CP.

[0005] In a possible implementation, the connection interface between the AP and the CP further includes a first interface, and the first interface is used for transmitting data; the CP is further configured to obtain the status of the first interface in response to the reception time of the first request signal being the same as the transmission time of the second request signal, and the priority of the AP being higher than the priority of the CP; in response to the first interface being in an idle state, update the status of the first interface to a busy state; and in response to the update of the status of the first interface being completed, send a first confirmation signal to the AP through the second GPIO port.

[0006] It can be seen that after a data transmission conflict exists between the AP and the CP and the priority of the AP is higher than the priority of the CP, the CP can send the first confirmation signal to the AP through the second GPIO port only when it determines that the interface for transmitting data between the AP and the CP is in an idle state, so as to notify the AP to send data.

[0007] In a possible implementation, the connection interface between the AP and the CP further includes a first interface, and the first interface is used for transmitting data; the CP is further configured to, in response to the reception time of the first request signal being the same as the transmission time of the second request signal, and the priority of the AP being higher than the priority of the CP, before sending the first confirmation signal to the AP through the second GPIO port, the CP is further configured to obtain the status of the first interface in response to a first transmission instruction; in response to the first interface being in an idle state, send a second request signal to the AP through the third GPIO port, and record the transmission time of the second request signal, where the first transmission instruction is used to indicate that the CP needs to transmit data to the AP.

[0008] It can be seen that in this way, the CP can first determine that the interface for transmitting data between the AP and the CP is in an idle state, and then send the second request signal to the AP through the third GPIO port, so as to inform the AP to prepare to receive data.

[0009] In a possible implementation, the CP is further configured to, in response to the reception time of the first request signal being the same as the transmission time of the second request signal, and the priority of the AP being higher than the priority of the CP, update the status of the first interface to a busy state; and in response to the update of the status of the first interface being completed, send a first confirmation signal to the AP through the second GPIO port.

[0010] It can be seen that in this way, based on the data transmission instruction, the CP can first determine that the interface for transmitting data between the AP and the CP is in an idle state, and then, after determining that the reception time of the first request signal is the same as the transmission time of the second request signal and the priority of the AP is higher than the priority of the CP, directly update the interface for transmitting data between the AP and the CP to an idle state, and then send the first confirmation signal to the AP through the second GPIO port. After receiving the data transmission instruction, it will first occupy the first interface to improve the efficiency of data transmission.

[0011] In a possible implementation, the CP is specifically configured to call a first reading function in response to the completion of the status update of the first interface; and in response to the call of the first reading function, send a first confirmation signal to the AP through a second GPIO port, where the first reading function is used to read the data transmitted by the first interface.

[0012] It can be seen that the CP can call the first reading function to read the data transmitted by the first interface, so as to read the data transmitted by the first interface.

[0013] In a possible implementation, the CP is further configured to receive a second confirmation signal through a fourth GPIO port in response to the reception time of the first request signal being the same as the transmission time of the second request signal and the priority of the AP being lower than that of the CP; in response to the second confirmation signal, send third data to the AP; in response to the completion of the transmission of the third data, send a first confirmation signal to the AP through the second GPIO port; and the AP is further configured to send fourth data to the CP in response to the first confirmation signal.

[0014] It can be seen that the CP can solve the data transmission conflict between the AP and the CP when the priority of the AP is lower than that of the CP, and improve the data transmission efficiency between the AP and the CP.

[0015] In a second aspect, the present application provides a data transmission control method, which is applied to an electronic device. The electronic device includes an application processor AP and a communication processor CP. The connection interface between the AP and the CP includes a first group of GPIO ports, a second group of GPIO groups, and a first interface. The first group of GPIO ports includes a first GPIO port and a second GPIO port. The first GPIO port is used to transmit a request signal, and the second GPIO port is used to transmit a confirmation signal. The second group of GPIO ports includes a third GPIO port and a fourth GPIO port. The third GPIO port is used to transmit a request signal, and the fourth GPIO port is used to transmit a confirmation signal. The method includes: controlling the CP to send a first confirmation signal to the AP through the second GPIO port in response to the reception time of the first request signal being the same as the transmission time of the second request signal and the priority of the AP being higher than that of the CP; where the first request signal is the request signal transmitted by the first GPIO port and is used to instruct the AP to request to transmit data to the CP, the second request signal is the request signal transmitted by the third GPIO port and is used to instruct the CP to request to transmit data to the AP, and the first confirmation signal is used to respond to the first request signal and indicate that the CP confirms the received data; controlling the AP to send first data to the CP based on the first confirmation signal; in response to the completion of the transmission of the first data, controlling the CP to send a second confirmation signal to the CP through the fourth GPIO port; where the second confirmation signal is used to respond to the second request signal and indicate that the AP confirms the received data; controlling the CP to send second data to the AP based on the second confirmation signal.

[0016] In a possible implementation, the connection interface between the AP and the CP further includes a first interface for transmitting data. The method further includes: obtaining the status of the first interface in response to the reception time of the first request signal being the same as the transmission time of the second request signal and the priority of the AP being higher than that of the CP; updating the status of the first interface to a busy state in response to the first interface being in an idle state; and controlling the CP to send a first confirmation signal to the AP through a second GPIO port in response to the status update of the first interface being completed.

[0017] In a possible implementation, the connection interface between the AP and the CP further includes a first interface for transmitting data. Before sending a first confirmation signal to the AP through a second GPIO port in response to the reception time of the first request signal being the same as the transmission time of the second request signal and the priority of the AP being higher than that of the CP, the method further includes: obtaining the status of the first interface in response to a first transmission instruction; controlling the CP to send a second request signal to the AP through a third GPIO port and recording the transmission time of the second request signal in response to the first interface being in an idle state, where the first transmission instruction is used to indicate that the CP needs to transmit data to the AP.

[0018] In a possible implementation, the method further includes: updating the status of the first interface to a busy state in response to the reception time of the first request signal being the same as the transmission time of the second request signal and the priority of the AP being higher than that of the CP; and controlling the CP to send a first confirmation signal to the AP through a second GPIO port in response to the status update of the first interface being completed.

[0019] In a possible implementation, the method further includes: calling a first read function in response to the status update of the first interface being completed; and sending a first confirmation signal to the AP through a second GPIO port in response to the call of the first read function, where the first read function is used to read the data transmitted by the first interface.

[0020] In a possible implementation, the method further includes: controlling the CP to receive a second confirmation signal through a fourth GPIO port in response to the reception time of the first request signal being the same as the transmission time of the second request signal and the priority of the AP being lower than that of the CP; controlling the CP to send third data to the AP in response to the second confirmation signal; controlling the CP to send a first confirmation signal to the AP through a second GPIO port in response to the third data transmission being completed; and controlling the AP to send fourth data to the CP in response to the first confirmation signal.

[0021] In a third aspect, the present application provides a data transmission control device, which is applied to an electronic device. The electronic device includes an application processor AP and a communication processor CP. The connection interface between the AP and the CP includes a first GPIO port, a second GPIO port, a third GPIO port, a fourth GPIO port, and a first interface. The device includes:

[0022] A first response unit, configured to control the CP to send a first confirmation signal to the AP through the second GPIO port in response to the reception time of a first request signal being the same as the transmission time of a second request signal, and the priority of the AP being higher than that of the CP. The first request signal is a request signal transmitted through the first GPIO port, used to indicate that the AP requests to transmit data to the CP. The second request signal is a request signal transmitted through the third GPIO port, used to indicate that the CP requests to transmit data to the AP. The first confirmation signal is used to respond to the first request signal and indicate that the CP confirms receiving the data.

[0023] A first control unit, configured to control the AP to send first data to the CP based on the first confirmation signal.

[0024] A second response unit, configured to control the CP to send a second confirmation signal to the CP through the fourth GPIO port in response to the completion of sending the first data. The second confirmation signal is used to respond to the second request signal and indicate that the AP confirms receiving the data.

[0025] A second control unit, configured to control the CP to send second data to the AP based on the second confirmation signal.

[0026] In a fourth aspect, the present application provides an electronic device, including a processor, a memory, and a computer program or instruction stored in the memory. The processor is characterized by executing the computer program or instruction to implement the steps of the method in the first aspect or any one of its possible implementation manners.

[0027] In a fifth aspect, the present application provides a chip, which includes at least one processor, and the processor is configured to execute program instructions to implement the steps of the method in the first aspect or any one of its possible implementation manners.

[0028] In a sixth aspect, the present application provides a chip module, which includes a communication interface and a chip. Specifically, the communication interface is used for in-module communication or for communication between the chip module and an external device. The chip is configured to execute program instructions to implement the steps of the method in the first aspect or any one of its possible implementation manners.

[0029] In a seventh aspect, the present application provides a computer-readable storage medium storing a computer program including program instructions that, when executed by a processor, cause the processor to perform the steps of the method in the first aspect or any possible implementation thereof described above.

[0030] In an eighth aspect, the present application provides a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, causing the computer device to perform the steps of the method in the first aspect or any possible implementation thereof described above. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 It is a schematic diagram of a data transmission conflict;

[0032] Figure 2 It is an architecture diagram of a data transmission control system provided by an embodiment of the present application;

[0033] Figure 3 It is a schematic structural diagram of a CIT module provided by an embodiment of the present application;

[0034] Figure 4 It is a schematic diagram of GPIO ports between an AP and a CP provided by an embodiment of the present application;

[0035] Figure 5 It is a schematic diagram of a data frame structure;

[0036] Figure 6 It is a schematic flowchart of a data transmission control method provided by an embodiment of the present application;

[0037] Figure 7 It is a schematic structural diagram of a data transmission control device provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0038] Next, the technical solutions in the present application will be clearly and completely described with reference to the accompanying drawings in the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art without creative efforts based on the embodiments in the present application belong to the scope of protection of the present application.

[0039] The terms used in the following embodiments of the present application are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in the specification and appended claims of the present application, the singular forms "a", "an", "the", "above-mentioned", "said", and "this" are also intended to include the plural forms, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used in the present application refers to and includes any or all possible combinations of one or more of the listed items.

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

[0041] For the convenience of introducing the solutions of the embodiments of the present application, some professional terms related to the embodiments of the present application are introduced below:

[0042] I. Application Processor (AP)

[0043] The AP is a very large scale integrated circuit that extends audio and video functions and dedicated interfaces on the basis of a central processing unit. The AP integrates multiple components such as a Central Processing Unit / Processor (CPU), a Graphics Processing Unit (GPU), an Image Signal Processor (ISP), and a Digital Signal Processor (DSP). It is a high-performance processor that can handle complex computing tasks, graphics rendering, etc. to support various advanced functions on electronic devices, such as games, video playback, multitasking, etc.

[0044] II. Communication Processor (CP)

[0045] CP is an integrated circuit specifically designed for processing data transmission and communication protocols. It is responsible for handling network-related communication tasks, including but not limited to phone calls, text message sending and receiving, data transmission, etc. It communicates with the base station through wireless communication technologies (such as 4G LTE, 5G, etc.) to achieve functions such as mobile Internet access.

[0046] III. General-Purpose Input / Output (GPIO) Ports

[0047] GPIO is a flexible interface that can implement various functions, including digital input, digital output, analog input, and analog output, etc. In an embedded system, GPIO usually acts as a bridge between the chip pins and the external circuit. Through GPIO, the status of external devices can be read or the status of external devices can be controlled. In this application, a GPIO port is set between the AP and the CP, and signal transmission between the AP and the CP can be achieved through the GPIO port.

[0048] IV. Data Transmission Conflict

[0049] During the communication process between two chips (AP and CP) in an electronic device, there are often situations where the AP needs to transmit data to the CP, and at the same time, the CP needs to transmit data to the AP, that is, there is a data transmission conflict between the AP and the CP.

[0050] As Figure 1 shown, the electronic device includes an AP and a CP. If the AP needs to send the first voice signal to the CP, and at the same time, the CP needs to send the second voice signal to the AP, then there is a data transmission conflict between the AP and the CP. This conflict will cause the electronic device not to know which of the first voice signal and the second voice signal needs to be sent first, greatly affecting the data transmission efficiency between the AP and the CP. Therefore, the embodiments of this application provide a data transmission control method to solve the data transmission conflict between the AP and the CP and improve the data transmission efficiency between the AP and the CP.

[0051] Next, the data transmission control system for implementing the data transmission control method will be introduced first.

[0052] Please refer to Figure 2 , Figure 2 which is the architecture diagram of a data transmission control system provided by the embodiments of this application. As Figure 2 shown, the data transmission control system may include an AP and a CP.

[0053] Among them, the AP includes an application layer, a CIT module, and a bottom-layer driver module, and the CP includes an application layer, a CIT module, and a bottom-layer driver module. The communication interface between the AP and the CP may include, but is not limited to, a Serial Peripheral Interface (SPI), a Universal Synchronous / Asynchronous Receiver / Transmitter (UART) port, a General Purpose Input / Output (GPIO) port, etc. Correspondingly, the bottom-layer driver module may include, but is not limited to, an SPI driver and a UART driver. As the connection layer between the application layer and the bottom-layer driver module, the CIT module can be placed at both ends of the AP and the CP respectively, and is used to negotiate the data transmission negotiation synchronization between the AP and the CP, and to adapt to different bottom-layer driver modules.

[0054] Among them, please refer to Figure 3 , Figure 3 which is an architecture diagram of a CIT module provided by an embodiment of this application. As Figure 3 shown, the CIT module includes an initialization module, a sending and receiving service module, a cache management module, a general function module, a bottom-layer adaptation module, and an interface.

[0055] The bottom-layer adaptation module includes SPI driver adaptation, UART driver adaptation, GPIO driver adaptation, and system interface adaptation. The system interface adaptation includes the adaptation of system-level interfaces such as memory allocation, threads, and signals. The bottom-layer adaptation module is responsible for interacting with the bottom-layer driver module using the interface functions open, close, read, and write corresponding to the abstract interfaces. Among them, the adaptation of the SPI driver, UART driver, or other drivers will provide a unified call interface to the upper layer and shield the differences of the bottom-layer driver module.

[0056] The general function module mainly includes a Cyclic Redundancy Check (CRC) module and an encryption and decryption module. Among them, the CRC module is mainly used to verify the transmitted data, and the encryption and decryption module is mainly used to encrypt the transmitted data. The calculation method greatly affects the transmission rate. Compared with the fast calculation method, this general function module can use the look-up table method to calculate the crc value in order to provide a faster verification rate.

[0057] The initialization module is a prerequisite for calling all other external interfaces. If you need to use the module functions, first call the initialization module to complete the initialization of the underlying driver module, the initialization of global resources, etc. In addition, to reduce memory consumption when the dual-core communication is disconnected, an anti-initialization module can also be provided to reduce resource occupancy or release resources for other modules to use.

[0058] The sending and receiving module includes a receiving thread and a receiving callback thread, which are used to upload the received data to the application layer. The sending of data is called by the interface function of the application layer. The CIT module provides a data sending interface upward, and this data sending interface can be cit_link_send(). The application layer will call this interface to send data, and the whole process is a synchronous sending process. The receiving thread puts the received data into the buffer or ring buffer of the loop management module, and then the receiving callback thread continuously fetches data from the buffer / ring buffer and calls the callback interface provided by the application layer to upload the data to the application layer. This callback interface can be cit_data_coming().

[0059] Based on the above system architecture and module design, two groups of GPIO ports are set between the AP and the CP. When there is a data transmission conflict between the AP and the CP, the AP and the CP can call these two groups of GPIO ports to resolve the data transmission conflict.

[0060] Next, combined with Figure 4 , the GPIO ports between the AP and the CP will be introduced.

[0061] As Figure 4 shown, the AP and the CP include two groups of GPIO ports. The two groups of GPIO ports include the first group of GPIO ports 41 and the second group of GPIO ports 42. The first group of GPIO ports 41 includes the first GPIO port 411 and the second GPIO port 412, and the second group of GPIO ports 42 includes the third GPIO port 421 and the fourth GPIO port 422.

[0062] Among them, the first GPIO port 411 is used to transmit a request signal, and the second GPIO port 412 is used to transmit an acknowledgment signal. The third GPIO port 421 is used to transmit a request signal, and the fourth GPIO port 422 is used to transmit an acknowledgment signal. The request signal is sent from the data sending end (hereinafter referred to as the sending end) to the data receiving end (hereinafter referred to as the receiving end) through the GPIO port, and indicates that the sending end requests the receiving end to receive data. The acknowledgment signal is sent from the receiving end to the sending end through the GPIO port, and indicates that the receiving end acknowledges receiving the data. The data sending end refers to the end that sends data during the data transmission process, and the data receiving end refers to the end that receives data during the data transmission process. For example, when the AP transmits data to the CP, the AP is the sending end and the CP is the receiving end.

[0063] In some embodiments, the request signal indicating that the AP sends data to the CP and the acknowledgment signal indicating that the CP acknowledges receiving the data can be transmitted through one GPIO in each group of GPIO ports respectively, and the request signal indicating that the CP sends data to the AP and the acknowledgment signal indicating that the AP acknowledges receiving the data can be transmitted through one GPIO in the other group of GPIO ports respectively. For example, the first GPIO port 411 transmits the request signal indicating that the AP sends data to the CP, the second GPIO port 412 transmits the acknowledgment signal indicating that the CP acknowledges receiving the data, the third GPIO port 421 transmits the request signal indicating that the CP sends data to the AP, and the fourth GPIO port 422 transmits the acknowledgment signal indicating that the AP acknowledges receiving the data. In this case, regardless of whether there is a data transmission conflict between the AP and the CP, the corresponding signals are transmitted by the corresponding interfaces, which can ensure the smoothness of the data transmission negotiation process between the AP and the CP and improve the efficiency of data transmission control.

[0064] In some embodiments, when there is no data transmission conflict between the AP and the CP, the request signals (the request signal indicating that the AP sends data to the CP and the request signal indicating that the CP sends data to the AP) can be transmitted through any one of the first GPIO port 411 and the third GPIO port 421. The confirmation signals (including the confirmation signal indicating that the CP confirms receiving the data and the confirmation signal indicating that the AP confirms receiving the data) can be transmitted through any one of the second GPIO port 412 and the fourth GPIO port 422. When there is a data transmission conflict between the AP and the CP, the request signal indicating that the AP sends data to the CP and the confirmation signal indicating that the CP confirms receiving the data can be respectively transmitted through one GPIO in one group of GPIO ports, and the request signal indicating that the CP sends data to the AP and the confirmation signal indicating that the AP confirms receiving the data can be respectively transmitted through one GPIO in the other group of GPIO ports. If there is a data transmission conflict between the AP and the CP, by transmitting the request signal indicating that the AP sends data to the CP and the request signal indicating that the CP sends data to the AP through different GPIO ports, it is ensured that the transmission process of the request signal indicating that the AP sends data to the CP and the request signal indicating that the CP sends data to the AP is smooth, and the efficiency of data transmission control is improved.

[0065] Based on the above description, the data transmission control method provided by the present application will be described in detail. This method is applied to an electronic device, and the electronic device includes an AP and a CP as shown in Figure 4 The transmission interface between the AP and the CP includes two groups of GPIO ports, which are the first group of GPIO ports and the second group of GPIO ports respectively. The first group of GPIO ports includes a first GPIO port and a second GPIO port. The first GPIO port is used to transmit request signals, and the second GPIO port is used to transmit confirmation signals. The second group of GPIO ports includes a third GPIO port and a fourth GPIO port. The third GPIO port is used to transmit request signals, and the fourth GPIO port is used to transmit confirmation signals.

[0066] As shown in Figure 5 The data transmission control method includes but is not limited to the following steps:

[0067] S501. In response to the reception time of the first request signal being the same as the transmission time of the second request signal, and the priority of the AP being higher than the priority of the CP, the CP sends a first confirmation signal to the AP through the second GPIO port.

[0068] In the embodiment of the present application, the CP can send a first confirmation signal to the AP through the second GPIO port when the reception time of the first request signal is the same as the transmission time of the second request signal, and the priority of the AP is higher than the priority of the CP.

[0069] Among them, the first request signal is the request signal transmitted by the first GPIO port, which is used to indicate that the AP requests to transmit data to the CP. The reception time of the first request signal refers to the time when the AP transmits the first request signal to the CP through the first GPIO port and the CP receives the first request signal from the AP. The second request signal is the request signal transmitted by the third GPIO port, which is used to indicate that the CP requests to transmit data to the AP. The transmission time of the second request signal refers to the start time when the CP transmits the second request signal to the AP through the second GPIO port. Among them, the first acknowledgment signal is used to respond to the first request signal and indicate that the CP acknowledges the received data.

[0070] Among them, the priority is used to determine which chip's data to transmit first when a data transmission conflict occurs between the AP and the CP. The data of the chip with a higher priority is transmitted first. Correspondingly, the data of the chip with a lower priority is transmitted later. In a specific implementation, the sorted priority results of the AP and the CP can be stored in the CP in advance for subsequent direct use by the CP, or the priority order between the AP and the CP can be determined based on the data type, data size, etc. of the data to be transmitted. For example, the priority of data with a smaller size is higher than that of data with a larger size, and the priority of image data is higher than that of text data. The specific determination method of the priority order between the AP and the CP is not specifically limited.

[0071] In some embodiments, the AP can send the first request signal to the CP by pulling up the first GPIO port. At this time, the reception time of the first request signal is the initial time when the CP detects a high level after the AP pulls up the first GPIO port. The AP can also send the first request signal to the CP by pulling down the first GPIO port. At this time, the reception time of the first request signal is the initial time when the CP detects a low level after the AP pulls down the first GPIO port. In the embodiments of the present application, pulling up or pulling down the GPIO means programming to control the GPIO pin to output a high level or a low level. The high level can be 3.3V, and the low level can be 0V.

[0072] In some embodiments, the connection interface between the AP and the CP may further include a first interface, and the first interface is used to transmit data. The first interface can be an SPI port, a UART port, etc., and the interface type of the first interface is not limited. In this case, the sending of the first acknowledgment signal can be determined in combination with the state of the first interface, and the specific implementation methods may include the following.

[0073] Method 1: After the CP determines that the reception time of the first request signal is the same as the transmission time of the second request signal and the priority of the AP is higher than that of the CP, the CP can obtain the status of the first interface. The interface status of the first interface includes an idle state and a busy state. The first interface being in the idle state means that during the communication between the AP and the CP, the first interface is not currently used by any process or service and is in a standby state, ready to be called for new data transmission at any time. The first interface being in the busy state means that during the communication between the AP and the CP, the first interface is processing a data transmission task and cannot immediately respond to or accept a new data transmission request. If the first interface is in the idle state, the CP can update the status of the first interface to the busy state. Furthermore, when the status update of the first interface is completed, the CP can send a first confirmation signal to the AP through the second GPIO port. If the first interface is in the busy state, the CP can wait for the first interface to be released until the first interface is in the idle state.

[0074] It can be seen that in this method, after there is a data transmission conflict between the AP and the CP and the priority of the AP is higher than that of the CP, the CP can send a first confirmation signal to the AP through the second GPIO port only after determining that the interface for transmitting data between the AP and the CP is in the idle state, so as to notify the AP to send data.

[0075] Method 2: Before the CP sends a first confirmation signal to the AP through the second GPIO port when the reception time of the first request signal is the same as the transmission time of the second request signal and the priority of the AP is higher than that of the CP, the CP can respond to the first transmission instruction and obtain the status of the first interface. The first transmission instruction refers to a command for data transmission inside a computer, used to trigger the copying of data from the AP to the CP. When the first interface is in the idle state, the CP sends a second request signal to the AP through the third GPIO port and records the transmission time of the second request signal. It can be seen that in this method, the CP can first determine that the interface for transmitting data between the AP and the CP is in the idle state, and then send a second request signal to the AP through the third GPIO port, so as to inform the AP to prepare to receive data.

[0076] In the second mode, the CP can update the status of the first interface to the busy state in response to the reception time of the first request signal being the same as the transmission time of the second request signal and the priority of the AP being higher than that of the CP. Subsequently, the CP can send a first confirmation signal to the AP through the second GPIO port when the status update of the first interface is completed. It can be seen that in this scenario, the CP can first determine that the interface for transmitting data between the AP and the CP is in the idle state based on the first transmission instruction, and then directly update the interface for transmitting data between the AP and the CP to the busy state after determining that the reception time of the first request signal is the same as the transmission time of the second request signal and the priority of the AP is higher than that of the CP. After that, it sends a first confirmation signal to the AP through the second GPIO port. After receiving the data transmission instruction, it first occupies the first interface to improve the data transmission efficiency.

[0077] In some embodiments, the CP can update the interface status of the first interface to the busy state in response to the completion of the status update of the first interface and call the first reading function. The first reading function is the reading function of the first interface of the abstract driver interface adapted at the bottom layer and is used to read the data transmitted on the first interface. For example, when the first interface is an SPI port, the first reading function is the reading function of the SPI port adapted at the bottom layer. When the first interface is a UART port, the first reading function is the reading function of the UART port adapted at the bottom layer. The CP can send a first confirmation signal to the AP through the second GPIO port in response to the call of the first reading function. The CP can call the first reading function to read the data transmitted on the first interface so as to read the data transmitted on the first interface. Optionally, the CP can send a first confirmation signal to the AP by pulling up or pulling down the second GPIO port.

[0078] In the embodiments of the present application, the CP updating the interface status of the first interface to the busy state and calling the first reading function are the preparatory work done by the CP before receiving data. Among them, the CP updating the interface status of the first interface to the busy state can prevent the AP from calling the first interface to transmit data. The CP calls the first reading function to facilitate reading the data transmitted on the first interface subsequently.

[0079] S502. The AP sends the first data to the CP in response to the first confirmation signal. Correspondingly, the CP receives the first data from the AP.

[0080] In the embodiment of the present application, the AP may send the first data to the CP when receiving the first confirmation signal. Herein, the first data refers to the data that the electronic device needs to transmit to the external device through the CP. The data format of the first data is the data format supported by the CP. That is to say, the AP will convert the data format of the data to be sent into the data format supported by the CP to obtain the first data, and then send the first data to the CP. After receiving the first data from the AP, the CP will send the first data to the external device so that the external device can obtain the first data.

[0081] Among them, the first data may be a voice signal. For example, during the voice communication between user A and other users through the electronic device, the electronic device collects voice through a recording device (such as a microphone) to obtain the first voice signal. The recording device transmits the first voice signal to the AP. After receiving the first voice signal, the AP performs format conversion on the first voice signal to obtain the second voice signal. The data format of the second voice signal is the data format supported by the CP, and the second voice signal is the first data. The first data may be video data. For example, during the video sharing between user A and other users through the electronic device, the first data is the initial video data shared by user A to user B of the external device through the electronic device. The AP may perform format conversion on the initial video data to obtain the processed video data. The data format of the processed video data is the data format supported by the CP, and the processed video data is the first data. It should be understood that the above examples are not limitations of the embodiments of the present application. The first data is not limited to voice signals and video data for communication between the electronic device and the external device, and may also include other data with information.

[0082] In some embodiments, data transmission between the AP and the CP may be in the form of frames. Each frame is a data packet, and the size of a packet may be 256 bytes, such as Figure 6As shown in the figure, the data frame structure of the data packet transmitted between AP and CP may include a packet header (including a frame start flag (flag), the length of the actually transmitted data (data_len), a first reserved bit (reserver1), and a second reserved bit (reserver2)), the actually transmitted data (content), and the crc value (pkt_crc) calculated excluding the flag bit. For example, flag: occupies one byte, binary is "10101011", hexadecimal "0xAB". data_len, reserver1, and reserver2 each occupy two bytes. Content occupies 247 bytes. pkt_crc occupies two bytes. If the data to be transmitted is greater than 256 bytes, the sending ends in AP and CP can perform packet splitting on the data to be transmitted to obtain multiple data packets, and then send the multiple data packets in sequence. After receiving the data packets, the receiving ends in AP and CP can parse the packet header of the packet data based on the data frame format and verify the crc value. If the parsing is incorrect, the packet is directly discarded. If the parsing is correct, the correctly parsed data can be provided for other modules in the electronic device. For example, the correctly parsed data is written into the ringbuff, and other modules in the electronic device can obtain the correctly parsed data from the ringbuff.

[0083] In the embodiment of the present application, CP can update the interface state of the first interface to the idle state when the first data is sent. CP can also stop calling the first read function when the first data is sent.

[0084] S503. In response to the completion of the first data transmission, AP sends a second confirmation signal to CP through the fourth GPIO port. Correspondingly, CP receives the second confirmation signal from AP through the fourth GPIO port.

[0085] Among them, the second confirmation signal is used to respond to the second request signal and indicate that AP has confirmed the received data. Optionally, AP can send the second confirmation signal to CP by pulling up or pulling down the fourth GPIO port.

[0086] Optionally, AP can monitor the interface state of the first interface after the first data is sent. When the first interface is in the idle state, update the state of the first interface to the busy state. Then, when the state update of the first interface is completed, AP can send a second confirmation signal to CP through the fourth GPIO port. After the first data is sent, it can be seen that AP updates the interface state of the data transmission interface (the first interface) between AP and CP to the busy state, and then sends a second confirmation signal to CP through the fourth GPIO port. That is, after the first data is sent, AP will first occupy the first interface to improve the data transmission efficiency.

[0087] Optionally, after the first data is sent, the AP can monitor the interface status of the first interface. When the first interface is in the idle state, the AP can update the interface status of the first interface to the busy state and call the first reading function. In response to the call of the first reading function, the AP can send a second confirmation signal to the CP through the fourth GPIO port.

[0088] S504. In response to the second confirmation signal, the CP sends second data to the AP. Correspondingly, the AP receives the second data from the CP.

[0089] Among them, the second data refers to the data that the external device needs to transmit to the electronic device through the CP. The data format of the second data is the data format supported by the AP. That is to say, the electronic device receives data from the external device (hereinafter referred to as remote data) through the CP. The CP converts the data format of the received remote data into the data format supported by the AP to obtain the second data, and then sends the second data to the AP. After receiving the second data from the CP, the AP sends the second data to other modules of the electronic device so that other modules can use the second data.

[0090] Similarly, the second data can be a voice signal. For example, during the voice communication between user A and user B through the electronic device, the external device used by user B collects voice through a recording device (such as a microphone) to obtain a third voice signal. The recording device transmits the third voice signal to the CP. After receiving the third voice signal, the CP performs format conversion on the third voice signal to obtain a fourth voice signal. The data format of the fourth voice signal is the data format supported by the AP, and the fourth voice signal is the second data. The second data can be video data. For example, during the video sharing between user A and user B through the electronic device, the second data is the initial video data shared by user B to user A of the electronic device through the external device. The CP can perform format conversion on the initial video data to obtain the processed video data, and then convert the data format of the processed video data into the data format supported by the AP. The CP can send the processed video data to the AP, and the processed video data is the second data. It should be understood that the above examples are not limitations of the embodiments of the present application. The second data is not limited to voice signals and video data for communication between the electronic device and the external device, and may also include other data with information content.

[0091] Case 2: The priority of the AP is lower than that of the CP. In this case, the data transmission control method includes but is not limited to the following steps: The CP can receive the second confirmation signal through the fourth GPIO port in response to the same reception time of the first request signal and the transmission time of the second request signal, and the priority of the AP is lower than that of the CP. The CP sends the third data to the AP in response to the second confirmation signal. Correspondingly, the AP receives the third data from the CP. The CP sends the first confirmation signal to the AP through the second GPIO port in response to the completion of the third data transmission. Correspondingly, the AP sends the fourth data to the CP in response to the first confirmation signal. The data transmission control method in this case is similar to that in Case 1. The difference is that when the priority of the AP is lower than that of the CP, the CP sends data to the AP first, and after the CP finishes sending the data, the AP sends data to the CP. Please refer to the description of the data transmission control method in Case 1, which will not be elaborated here.

[0092] Please refer to Figure 7 , Figure 7 is a schematic structural diagram of a data transmission control device provided by an embodiment of the present invention. Specifically, it is applied to an electronic device, which includes an application processor AP and a communication processor CP. The connection interface between the AP and the CP includes a first GPIO port, a second GPIO port, a third GPIO port, a fourth GPIO port, and a first interface; the data transmission control device 700 includes units for executing the above method embodiments. For example, the data transmission control device 700 includes:

[0093] The first response unit 701 is configured to control the CP to send the first confirmation signal to the AP through the second GPIO port in response to the same reception time of the first request signal and the transmission time of the second request signal, and the priority of the AP is higher than that of the CP; wherein, the first request signal is a request signal transmitted through the first GPIO port for instructing the AP to request to transmit data to the CP, the second request signal is a request signal transmitted through the third GPIO port for instructing the CP to request to transmit data to the AP, and the first confirmation signal is used to respond to the first request signal and indicate that the CP acknowledges receiving the data;

[0094] The first control unit 702 is configured to control the AP to send the first data to the CP based on the first confirmation signal;

[0095] The second response unit 703 is configured to control the CP to send the second confirmation signal to the CP through the fourth GPIO port in response to the completion of the first data transmission; wherein, the second confirmation signal is used to respond to the second request signal and indicate that the AP acknowledges receiving the data;

[0096] The second control unit 704 is configured to control the CP to send the second data to the AP based on the second confirmation signal.

[0097] An embodiment of the present application further provides an electronic device, including a processor, a memory, and a computer program or instruction stored in the memory. It is characterized in that the processor executes the computer program or instruction to implement the steps of the method in the above method embodiment or any possible implementation manner thereof.

[0098] An embodiment of the present application further provides a chip, which includes at least one processor, and the processor is used to execute program instructions to execute the steps of the method in the above method embodiment or any possible implementation manner thereof.

[0099] An embodiment of the present application further provides a chip module, which includes a communication interface and a chip, wherein: the communication interface is used for in-module communication or for communication between the chip module and an external device; the chip is used to execute program instructions to execute the steps of the method in the above method embodiment or any possible implementation manner thereof.

[0100] An embodiment of the present application further provides a computer-readable storage medium (Memory). The computer-readable storage medium is a memory device of an electronic device and is used to store programs and data. It can be understood that the computer-readable storage medium here can include both an electronic device or an internal storage medium of the electronic device, and of course can also include an extended storage medium supported by the electronic device or the electronic device. The computer-readable storage medium provides a storage space, and this storage space stores the operating system of the electronic device or the electronic device. And, one or more computer programs suitable for being loaded and executed by the processor or the processor are also stored in this storage space. It should be noted that the computer storage medium here can be a high-speed RAM memory or a non-volatile memory, such as at least one disk memory; optionally, it can also be at least one computer-readable storage medium located far from the aforementioned processor.

[0101] Based on the same inventive concept, for the principle and beneficial effects of the computer-readable storage medium provided in the embodiments of the present application to solve problems, reference can be made to the principle and beneficial effects of the microcontroller data transmission control method. For the sake of brevity, it will not be elaborated here.

[0102] The above computer-readable storage medium may be the electronic device provided in any of the foregoing embodiments or the internal storage unit of the above computer device, such as the hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the computer device. Further, the computer-readable storage medium may also include both the internal storage unit and the external storage device of the computer device. The computer-readable storage medium is used to store the computer program and other programs and data required by the computer device. The computer-readable storage medium may also be used to temporarily store the data that has been output or is to be output. The computer-readable storage medium stores a computer program, and the computer program includes program instructions. When the program instructions are executed by a processor, the processor executes the steps of the method in the above method embodiment or any possible implementation manner thereof.

[0103] This application provides a computer program product or a computer program. The computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the Figure 3 description of the above microcontroller data transmission control method in the corresponding embodiments described above. Therefore, details will not be repeated here. In addition, the description of the beneficial effects of using the same method will not be repeated. For the technical details not disclosed in the embodiments of the computer-readable storage medium involved in this application, please refer to the description of the method embodiments of this application.

[0104] The terms "first", "second", etc. in the description, claims, and drawings of the embodiments of this application are used to distinguish different objects, rather than to describe a specific order. In addition, the term "comprising" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, device, product, or equipment that includes a series of steps or units is not limited to the steps or modules listed, but may optionally further include steps or modules not listed, or may optionally further include other step units inherent to these processes, methods, devices, products, or equipment.

[0105] Those of ordinary skill in the art will appreciate that the units and algorithm steps of the examples described in connection with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the components and steps of the examples have been generally described in terms of function in the above description. Whether these functions are executed in hardware or software depends on the specific application and design constraints of the technical solution. A person skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.

[0106] The methods and related devices provided by the embodiments of this application are described with reference to the method flowcharts and / or structural schematic diagrams provided by the embodiments of this application. Specifically, each process and / or block of the method flowchart and / or structural schematic diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable electronic devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable electronic devices generate a device for implementing the functions specified in one process Figure 1 one process or multiple processes and / or structural schematic Figure 1 one block or multiple blocks. These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable electronic device to work in a specific manner, such that the instructions stored in the computer-readable memory generate a manufactured article including an instruction device that implements the functions specified in one process Figure 1 one process or multiple processes and / or structural schematic Figure 1 one block or multiple blocks. These computer program instructions can also be loaded onto a computer or other programmable electronic device, such that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one process Figure 1 one process or multiple processes and / or structural schematic one block or multiple blocks.

[0107] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some or all of the technical features. These modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

Claims

1. An electronic device, characterized in that: The electronic device includes an application processor AP and a communication processor CP, the connection interface between the AP and the CP includes a first group of GPIO ports and a second group of GPIO ports, the first group of GPIO ports includes a first GPIO port and a second GPIO port, the first GPIO port is used to transmit a request signal, and the second GPIO port is used to transmit a confirmation signal; the second group of GPIO ports includes a third GPIO port and a fourth GPIO port, the third GPIO port is used to transmit a request signal, and the fourth GPIO port is used to transmit a confirmation signal; The CP is used to send a first confirmation signal to the AP through the second GPIO port in response to the fact that the reception time of the first request signal is the same as the sending time of the second request signal, and the priority of the AP is higher than the priority of the CP; wherein the first request signal is a request signal transmitted by the first GPIO port, and is used to indicate that the AP requests to transmit data to the CP, the second request signal is a request signal transmitted by the third GPIO port, and is used to indicate that the CP requests to transmit data to the AP, and the first confirmation signal is used to respond to the first request signal and indicate that the CP confirms receiving the data; The AP is configured to send first data to the CP in response to the first confirmation signal; in response to completion of sending the first data, send a second confirmation signal to the CP through the fourth GPIO port; wherein the second confirmation signal is used to respond to the second request signal and instruct the AP to confirm receiving the data; The CP is further configured to send second data to the AP in response to the second confirmation signal.

2. The electronic device according to claim 1, characterized in that: The connection interface between the AP and the CP further includes a first interface, where the first interface is used to transmit data; The CP is further configured to obtain the state of the first interface in response to the reception time of the first request signal being the same as the sending time of the second request signal and the priority of the AP being higher than the priority of the CP; In response to the first interface being in an idle state, updating the state of the first interface to a busy state; in response to the state update of the first interface being completed, sending a first confirmation signal to the AP through the second GPIO port.

3. The electronic device according to claim 1, characterized in that: The connection interface between the AP and the CP further includes a first interface, wherein the first interface is used to transmit data; The CP is also used to, in response to the fact that the reception time of the first request signal is the same as the sending time of the second request signal and the priority of the AP is higher than the priority of the CP, before sending the first confirmation signal to the AP through the second GPIO port, the CP is also used to obtain the state of the first interface in response to the first transmission instruction; in response to the first interface being in an idle state, send the second request signal to the AP through the third GPIO port and record the sending time of the second request signal, and the first transmission instruction is used to indicate that the CP needs to transmit data to the AP.

4. A data transmission control method, characterized in that: The method is applied to an electronic device, the electronic device includes an application processor AP and a communication processor CP, the connection interface between the AP and the CP includes a first group of GPIO ports, a second group of GPIO ports and a first interface, the first group of GPIO ports includes a first GPIO port and a second GPIO port, the first GPIO port is used to transmit a request signal, and the second GPIO port is used to transmit a confirmation signal; the second group of GPIO ports includes a third GPIO port and a fourth GPIO port, the third GPIO port is used to transmit a request signal, and the fourth GPIO port is used to transmit a confirmation signal; the method includes: In response to the fact that the reception time of the first request signal is the same as the sending time of the second request signal, and the priority of the AP is higher than the priority of the CP, controlling the CP to send a first confirmation signal to the AP through the second GPIO port; wherein the first request signal is a request signal transmitted by the first GPIO port, used to indicate that the AP requests to transmit data to the CP, the second request signal is a request signal transmitted by the third GPIO port, used to indicate that the CP requests to transmit data to the AP, and the first confirmation signal is used to respond to the first request signal and instruct the CP to confirm receiving the data; Control the AP to send first data to the CP based on the first confirmation signal; in response to the first data being sent, control the CP to send a second confirmation signal to the CP through the fourth GPIO port; wherein the second confirmation signal is used to respond to the second request signal and instruct the AP to confirm receiving the data; The CP is controlled to send second data to the AP based on the second confirmation signal.

5. The method according to claim 4, characterized in that The connection interface between the AP and the CP further includes a first interface, and the first interface is used to transmit data; the method further includes: In response to the reception time of the first request signal being the same as the sending time of the second request signal, and the priority of the AP being higher than the priority of the CP, the state of the first interface is obtained; in response to the first interface being in an idle state, the state of the first interface is updated to a busy state; in response to the state update of the first interface being completed, the CP is controlled to send a first confirmation signal to the AP through the second GPIO port.

6. The method according to claim 4, characterized in that The connection interface between the AP and the CP further includes a first interface, and the first interface is used to transmit data; in response to the fact that the reception time of the first request signal is the same as the sending time of the second request signal, and the priority of the AP is higher than the priority of the CP, before sending the first confirmation signal to the AP through the second GPIO port, the method further includes: In response to a first transmission instruction, the status of the first interface is obtained; in response to the first interface being in an idle state, the CP is controlled to send the second request signal to the AP through the third GPIO port, and the sending time of the second request signal is recorded, wherein the first transmission instruction is used to indicate that the CP needs to transmit data to the AP.

7. The method according to claim 6, characterized in that The method further comprises: In response to the fact that the reception time of the first request signal is the same as the sending time of the second request signal, and the priority of the AP is higher than the priority of the CP, the state of the first interface is updated to a busy state; in response to the completion of the state update of the first interface, the CP is controlled to send a first confirmation signal to the AP through the second GPIO port.

8. The method according to claim 5 or 7, characterized in that: The method further comprises: In response to the status update of the first interface being completed, calling a first read function; in response to the calling of the first read function, sending a first confirmation signal to the AP through the second GPIO port, the first read function being used to read data transmitted by the first interface.

9. The method according to any one of claims 4 to 8, characterized in that: The method further comprises: In response to the fact that the reception time of the first request signal is the same as the sending time of the second request signal, and the priority of the AP is lower than the priority of the CP, controlling the CP to receive the second confirmation signal through the fourth GPIO port; In response to the second confirmation signal, controlling the CP to send third data to the AP; in response to completion of sending the third data, controlling the CP to send the first confirmation signal to the AP through the second GPIO port; In response to the first confirmation signal, the AP is controlled to send fourth data to the CP.

10. An electronic device comprising a processor, a memory and a computer program or instruction stored in the memory, characterized in that: The processor executes the computer program or instructions to implement the steps of the method according to any one of claims 4 to 9.