Communication interface, communication device and communication method

By integrating synchronous data and communication data transmission in the communication interface between the microcontroller and the system-on-a-chip, the problems of high transmission cost and low efficiency are solved, and efficient and flexible data transmission is achieved.

CN121098438APending Publication Date: 2025-12-09ANYSMART TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511225583.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-29
Publication Date
2025-12-09

AI Technical Summary

Technical Problem

The communication interface between microcontrollers and system-on-a-chip (SoC) has limited functionality, resulting in high data transmission costs, low efficiency, and limited flexibility.

Method used

A communication interface is provided for transmitting synchronization data between a target communication device and an external device, and transmitting communication data under clock synchronization. The interface integrates the transmission of synchronization data and communication data in the same way. It includes a clock module, a storage module and a trigger module, and supports sleep, burst and continuous modes.

Benefits of technology

It achieves low-cost data transmission efficiency improvement and increased flexibility, reduces the number of communication interfaces, supports full-duplex communication, and has a high transmission rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121098438A_ABST
    Figure CN121098438A_ABST
Patent Text Reader

Abstract

The invention discloses a communication interface, a communication device and a communication method, the communication interface is arranged on a target communication device, synchronous data is transmitted between the target communication device and an external device through the communication interface, and the target communication device and the external device can perform clock synchronization according to the synchronous data. And synchronous serial communication is carried out through a communication interface under the condition of clock synchronization. According to the communication interface provided by the embodiment of the invention, the synchronous data and the communication data are fused in the same communication interface for transmission, so that the number of communication interfaces in the target communication equipment can be reduced, and the cost of the communication interfaces is reduced; due to the fact that the communication interface can achieve synchronous serial communication, the transmission rate is high, and flexibility is good.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of communication transmission, in particular to a communication interface, a communication device and a communication method. BACKGROUND

[0002] The communication interface is a hardware device arranged on a device for data transmission. Different communication interfaces can be arranged for different types of data transmission, and different communication interfaces can set different data transmission rates and different data transmission formats. At present, the communication interface between the microcontroller (MCU) and the system on chip (SOC) has single function, and occupies more pins for different types of data transmission, resulting in high cost, low transmission efficiency and low flexibility of the existing data transmission. SUMMARY

[0003] The communication interface, the communication device and the communication method provided by the embodiments of the present application can improve the data transmission efficiency at low cost and have high flexibility.

[0004] In a first aspect, the embodiments of the present application provide a communication interface, which is arranged on a target communication device, and is configured to: transmit synchronization data between the target communication device and an external device, and transmit communication data when the target communication device and the external device are clock-synchronized; wherein the synchronization data is used to synchronize the clock of the target communication device with the clock of the external device.

[0005] In some embodiments of the present application, the communication interface is further configured to: transmit the synchronization data between the target communication device and the external device when the target communication device and the external device are connected for the first time.

[0006] In some embodiments of the present application, the synchronization data includes a synchronization clock signal, and the communication interface includes: a clock module configured to synchronize a sampling clock signal of the target communication device with the synchronization clock signal to obtain a synchronized target clock signal; a storage module configured to transmit the communication data under the control of the target clock signal; and a trigger module configured to wake up the communication interface when the communication interface is in a sleep state.

[0007] In some embodiments of the present application, the clock module includes: a clock keeper configured to generate the sampling clock signal; and a clock synchronizer connected to the clock keeper, and configured to synchronize the sampling clock signal with the synchronization clock signal to obtain the target clock signal.

[0008] In some embodiments of the present application, the storage module comprises a shift register and a data buffer connected to the shift register, wherein the shift register is configured to shift and store the received communication data in the data buffer according to the target clock signal, or shift and send the communication data stored in the data buffer to the external device according to the target clock signal.

[0009] In some embodiments of the present application, the working mode of the communication interface comprises a sleep mode, a burst mode and a continuous mode, wherein: when the working mode of the communication interface is the sleep mode, only the trigger module in the communication interface is in working state; when the working mode of the communication interface is the burst mode, the trigger module in the communication interface and the clock synchronizer in the clock module are in working state; when the working mode of the communication interface is the continuous mode, the clock module and the storage module in the communication interface are in working state.

[0010] In some embodiments of the present application, the data frame transmitted by the communication interface comprises synchronization clock data, start data, target data, check data and stop data, wherein the first clock length of the synchronization clock data transmitted by the communication interface in the burst mode is greater than the second clock length of the synchronization clock data transmitted by the communication interface in the continuous mode.

[0011] In some embodiments of the present application, the communication interface comprises an input interface and an output interface, wherein: the input interface is configured to, in the case of first connection with a first external device, receive first synchronization data sent by the first external device, so that the input interface realizes clock synchronization according to the first synchronization data, and receives first communication data sent by the first external device in the case of clock synchronization; the output interface is configured to, in the case of first connection with a second external device, send second synchronization data to the second external device, so that the second external device realizes clock synchronization according to the second synchronization data, and sends second communication data to the second external device in the case of clock synchronization.

[0012] In the second aspect, embodiments of the present application provide a communication device, comprising the communication interface provided in the first aspect, and the communication device transmits data through the communication interface.

[0013] In a third aspect, the embodiments of the present application provide a communication method applied to the communication device provided in the second aspect, and the method comprises: transmitting synchronization data between the target communication device and an external device, and transmitting communication data when the target communication device is clock-synchronized with the external device; wherein the synchronization data is used to clock-synchronize the target communication device with the external device.

[0014] In summary, the technical scheme provided by the embodiments of the present application provides a communication interface, which is arranged on a target communication device, and transmits synchronization data between the target communication device and an external device through the communication interface, so that the target communication device and the external device can be clock-synchronized according to the synchronization data, and synchronous serial communication can be performed through the communication interface when the clock is synchronized. The communication interface of the embodiments of the present application fuses the synchronization data and the communication data in the same communication interface for transmission, which can save the number of communication interfaces in the target communication device and reduce the cost of the communication interface. Since the communication interface of the embodiments of the present application can realize synchronous serial communication, the transmission rate is high and the flexibility is good. BRIEF DESCRIPTION OF DRAWINGS

[0015] In order to more clearly illustrate the technical scheme in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0016] Figure 1 is a structural schematic diagram of a communication interface provided by the embodiments of the present application;

[0017] Figure 2 is a structural schematic diagram of another communication interface provided by the embodiments of the present application;

[0018] Figure 3 is a timing diagram in a burst mode provided by the embodiments of the present application;

[0019] Figure 4 is a timing diagram in a continuous mode provided by the embodiments of the present application;

[0020] Figure 5 is a structural schematic diagram of a communication device provided by the embodiments of the present application;

[0021] Figure 6 is a structural schematic diagram of another communication device provided by the embodiments of the present application;

[0022] Figure 7 is a flowchart of a communication method provided by the embodiments of the present application. DETAILED DESCRIPTION

[0023] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the protection scope of the present application.

[0024] In the following description, specific embodiments of the present application will be described with reference to steps and symbolic representations of operations that are performed by one or more computers. Unless specifically stated otherwise, as is apparent from the following discussions, it is appreciated that throughout the specification, discussions utilizing terms such as "processing," "computing," "calculating," "determining," "displaying," and / or "determining," involve the actions and / or processes of a computer system, or similar electronic computing device.

[0025] The term "module" or "unit" used herein can be regarded as a software object executed on the operating system. Different components, modules, engines and services described herein can be regarded as implemented objects on the operating system. The apparatus and method described herein are preferably implemented in software, but can also be implemented in hardware, both of which are within the scope of the present application.

[0026] Those skilled in the art can understand that, unless specifically stated, the singular forms "a", "an" and "the" used herein can also include plural forms. It should be further understood that the use of the term "include" in the specification of the present application means that the stated features, integers, steps, operations, elements, and / or components are present, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. It should be understood that when an element is "connected" or "coupled" to another element, it can be directly connected or coupled to the other element, or there can be intervening elements. In addition, "connected" or "coupled" used herein can include wireless connection or wireless coupling. The phrase "and / or" used herein includes all or any one of the associated listed items and all combinations thereof.

[0027] Currently, the communication interfaces between a microcontroller unit (MCU) and a system on chip (SOC) include universal asynchronous receiver / transmitter (UART), serial peripheral interface (SPI), inter-integrated circuit (I2C), controller area network (CAN) interface, secure digital input output (SDIO) interface, peripheral component interconnect express (PCIe) interface, and the like. Among them, the communication interfaces such as UART, SPI, I2C and CAN are mainly used for low-speed communication, and the communication interfaces such as SDIO and PCIe are mainly used for high-speed communication. The UART and CAN can realize asynchronous communication, and the SPI, I2C, SDIO and PCIe can realize synchronous communication. However, the conventional communication interfaces have single function and low flexibility, and cannot balance the transmission efficiency and hardware cost.

[0028] Therefore, the embodiments of the present application provide a communication interface, a communication device and a communication method, which can improve the data transmission efficiency at low cost and have high flexibility.

[0029] The embodiments of the present application provide a communication interface. The communication interface is arranged on a target communication device. The communication interface is configured to: transmit synchronous data between the target communication device and an external device, and transmit communication data when the target communication device and the external device are clock-synchronized; and the synchronous data is used to synchronize the clock of the target communication device and the external device.

[0030] The communication interface is a channel for transmitting data between different systems or devices, and the communication data represents the data transmitted between different systems or devices. The target communication device is a device provided with the communication interface, and the external device is an external device relative to the target communication device. The target communication device can transmit data with the external device through the communication interface. When the target communication device and the external device transmit data, the data includes two transmission directions. When the data is transmitted from the target communication device to the external device, the target communication device is the data sending end and the external device is the data receiving end. When the data is transmitted from the external device to the target communication device, the target communication device is the data receiving end and the external device is the data sending end.

[0031] The synchronization data is data transmitted between the target communication device and the external device, used to control the clock synchronization of the target communication device and the external device. In the case that the target communication device is a data sending end, the synchronization data is sent from the target communication device to the external device, so as to synchronize the clock of the external device with the clock of the target communication device through the synchronization data; in the case that the target communication device is a data receiving end, the synchronization data is sent from the external device to the target communication device, so as to synchronize the clock of the target communication device with the clock of the external device through the synchronization data. Exemplarily, the synchronization data can be a synchronization clock signal, and the target communication device and the external device can realize clock synchronization through calibration of the synchronization clock signal.

[0032] After the clock synchronization of the target communication device and the external device, the synchronous transmission of the communication data between the target communication device and the external device can be realized, that is, the target communication device and the external device share the clock signal, and the communication data can be synchronously sent and received according to a predetermined time interval. The synchronous transmission of the communication data means that the communication data can be continuously transmitted, which is suitable for the high-speed transmission scene of data. The target communication device and the external device can realize the serial transmission of the communication data through the communication interface, and the hardware requirement is not high, and the transmission efficiency of the communication data can be improved at low cost.

[0033] The communication interface of the embodiment of the present application is only used for data transmission between the target communication device and the external device, and the setting of the communication interface does not need to distinguish the master device and the slave device. In the case that the data transmission direction is determined, the synchronization data and the communication data transmitted between the target communication device and the external device are fused in the same communication interface for transmission, which can save the number of communication interfaces in the target communication device and reduce the cost of the communication interface. Since the communication interface of the embodiment of the present application can realize synchronous serial communication, the transmission rate is high, and the flexibility is good.

[0034] In some embodiments, the communication interface includes an input interface and an output interface. The input interface is used to receive first synchronization data sent by a first external device in the case that the target communication device is connected to the first external device for the first time, so that the input interface realizes clock synchronization according to the first synchronization data, and receives first communication data sent by the first external device in the case of clock synchronization. The output interface is used to send second synchronization data to a second external device in the case that the target communication device is connected to the second external device for the first time, so that the second external device realizes clock synchronization according to the second synchronization data, and sends second communication data to the second external device in the case of clock synchronization.

[0035] The communication interface of the embodiment of the application comprises an input interface and an output interface. The target communication device receives the synchronization data and the communication data sent by the external device through the input interface, and sends the synchronization data and the communication data to the external device through the output interface. The embodiment of the application sets the input interface and the output interface on the target communication device respectively, so that the target communication device can simultaneously send data to the external device and receive data sent by the external device, thereby improving the transmission efficiency of the communication data.

[0036] The hardware structures of the input interface and the output interface are the same but the control logics are different. When the communication interface is set on the target communication device, the type of the communication interface is set, and the type of the communication interface cannot be changed after the definition is completed.

[0037] The first external device represents a device that sends data to the target communication device. The target communication device receives the data sent by the first external device through the input interface, including the first synchronization data and the first communication data. In the case that the target communication device is connected to the first external device for the first time, the first synchronization data from the first external device is received through the input interface first, so that the clock of the target communication device is synchronized with the clock of the first external device, and the first communication data from the first external device is received through the input interface after the clock is synchronized.

[0038] The second external device represents a device that receives data sent by the target communication device. The target communication device sends the data to the second external device through the output interface, including the second synchronization data and the second communication data. In the case that the target communication device is connected to the second external device for the first time, the second synchronization data is sent to the second external device through the output interface first, so that the clock of the target communication device is synchronized with the clock of the second external device, and the second communication data is sent to the second external device through the output interface after the clock is synchronized.

[0039] The first external device and the second external device can be two independent devices or the same external device. In the case that the first external device and the second external device are two independent communication devices, the first external device and the second external device perform unidirectional synchronization serial data transmission with the target communication device respectively. In the case that the first external device and the second external device are the same external device, full-duplex communication can be realized between the first external device / second external device and the target communication device. The full-duplex communication means that the target communication device and the first external device / second external device can simultaneously perform bidirectional transmission, that is, the target communication device simultaneously acts as a data sending end and a data receiving end, thereby improving the transmission efficiency of the communication data between the target communication device and the external device.

[0040] The communication interface of the embodiment of the present application can comprise an input interface and an output interface according to the transmission direction of data. In actual application, the type of the communication interface can be determined according to the communication requirement of the target communication device. In the case that the input interface and the output interface are both provided in the target communication device, the data transmission between the input interface and the output interface will not interfere with each other, and the input interface and the output interface can independently realize clock synchronization and data transmission, so that the target communication device can realize full-duplex communication and improve the data transmission efficiency of the target communication device.

[0041] In some embodiments, the communication interface is further configured to: in the case that the target communication device is connected to the external device for the first time, transmit the synchronization data between the target communication device and the external device.

[0042] The communication interface of the embodiment of the present application fuses the synchronization data and the communication data in the same communication interface for transmission. Different from the conventional clock synchronization interface and data transmission interface which are respectively provided, the embodiment of the present application can realize clock synchronization and data transmission through one interface.

[0043] The synchronization data is data used for controlling the clock synchronization between the target communication device and the external device. On the basis of the clock synchronization between the target communication device and the external device, the communication data can be transmitted in sequence according to the synchronized clock signal.

[0044] Therefore, in the case that the target communication device is connected to the external device for the first time, the embodiment of the present application first transmits the synchronization data between the communication interface and the external device, so as to synchronize the clock between the target communication device and the external device, and then transmits the communication data on the basis of the synchronized clock signal.

[0045] The embodiment of the present application transmits the synchronization data through the communication interface in the case that the target communication device is connected to the external device for the first time, so as to realize clock synchronization. In the case that the clock of the target communication device and the external device is synchronized, the target communication device or the external device can initiate data transmission at any time through the communication interface, which not only simplifies the communication time of the target communication device and the external device and improves the data transmission efficiency, but also saves the number of communication interfaces on the target communication device and reduces the cost of the communication interface.

[0046] In some embodiments, please refer to Figure 1 , Figure 1 is a structural schematic diagram of a communication interface provided by the embodiment of the present application. As Figure 1As shown, the synchronization data includes a synchronization clock signal, and the communication interface includes a clock module 100, a storage module 200 and a trigger module 300. The clock module 100 is configured to synchronize a sampling clock signal of the target communication device with the synchronization clock signal to obtain a synchronized target clock signal. The storage module 200 is configured to transmit communication data under control of the target clock signal. The trigger module 300 is configured to wake up the communication interface in a case where the communication interface is in a sleep state.

[0047] The synchronization data includes a synchronization clock signal. In a case where the target communication device is a data receiving end, the target communication device can synchronize a clock of the communication interface with an external device according to the synchronization clock signal. In a case where the target communication device is a data sending end, the target communication device can transmit the synchronization clock signal through the communication interface to synchronize a clock of the external device with the target communication device.

[0048] Please continue to refer to Figure 1 The communication interface of the embodiment of the present application includes a clock module 100, a storage module 200 and a trigger module 300 connected with the interface end respectively. The clock module 100 is configured to transmit or receive a synchronization clock signal through the communication interface, and synchronize a sampling clock signal in the clock module 100 with the synchronization clock signal to realize clock synchronization between the target communication device and the external device. The clock signal after the clock synchronization between the target communication device and the external device is used as a target clock signal.

[0049] The storage module 200 is configured to transmit communication data through the communication interface according to the target clock signal after the clock synchronization between the target communication device and the external device. For example, data in the storage module 200 is transmitted to the external device through the communication interface according to the target clock signal, or communication data transmitted by the external device is received through the communication interface.

[0050] The trigger module 300 can wake up the communication interface in a case where the communication interface is in a sleep state. The communication interface can enter a low-power sleep state when no data transmission is performed for a period of time, so as to save energy and prolong the service life of the device. In the sleep state of the communication interface, the trigger module 300 is always in a working state, so as to wake up the communication interface when data transmission is needed.

[0051] In some embodiments, please refer to Figure 2 , Figure 2 is another structural schematic diagram of a communication interface provided by the embodiment of the present application. As shown, Figure 2 The clock module 100 includes a clock holder and a clock synchronizer, and the clock synchronizer is connected with the clock holder. The clock holder generates a sampling clock signal, and the clock synchronizer synchronizes the sampling clock signal generated by the clock holder with a synchronization clock signal to obtain a target clock signal.

[0052] The clock holder generates a sampling clock signal, which is used to sample the data transmitted by the communication interface, so as to avoid the error code caused by the noise or jitter in the data transmission process. The clock synchronizer is connected with the clock holder and receives the sampling clock signal generated by the clock holder. The clock synchronizer also transmits the synchronization clock signal between the communication interface and the external device. After the clock synchronizer obtains the sampling clock signal and the synchronization clock signal, the clock synchronizer synchronizes the sampling clock signal and the synchronization clock signal, so as to maintain the accuracy of the data transmitted by the communication interface. The clock signal obtained after the target communication device is clock-synchronized with the external device is taken as the target clock signal.

[0053] Exemplarily, in the case that the target communication device is a data sending end, the clock synchronizer transmits the synchronization clock signal of the target communication device to the external device through the communication interface, so as to clock-synchronize the external device with the target communication device. The clock signal after the synchronization is taken as the target clock signal. In the case that the target communication device is a data receiving end, the clock synchronizer synchronizes the synchronization clock signal received through the communication interface with the sampling clock signal of the clock holder, so as to clock-synchronize the target communication device with the external device. The clock signal after the synchronization is taken as the target clock signal.

[0054] In some embodiments, please refer to Figure 2 The storage module 200 includes a data buffer and a shift register, and the shift register is connected with the data buffer. The shift register transfers and stores the received communication data in the data buffer according to the target clock signal, or transfers and transmits the communication data stored in the data buffer to the external device according to the target clock signal.

[0055] The shift register can be a digital circuit for storing and moving binary data. After the target communication device is clock-synchronized with the external device and obtains the target clock signal, the shift register controls the bit-by-bit movement of the communication data through the target clock signal. Exemplarily, the shift register can move the communication data transmitted by the communication interface into the data buffer for storage according to the target clock signal after the clock synchronization.

[0056] In some embodiments, the working mode of the communication interface includes a sleep mode, a burst mode and a continuous mode. In the case that the working mode of the communication interface is the sleep mode, only the trigger module 300 in the communication interface is in the working state. In the case that the working mode of the communication interface is the burst mode, the trigger module 300 in the communication interface and the clock synchronizer in the clock module 100 are in the working state. In the case that the working mode of the communication interface is the continuous mode, the clock module 100 and the storage module 200 in the communication interface are in the working state.

[0057] The communication interface of the embodiment of the present application comprises multiple working modes, such as a sleep mode, a burst mode, and a continuous mode. In the sleep mode, the communication interface does not perform data transmission, only the trigger module 300 in the communication interface is in a working state, and most of the modules are in a sleep state, so as to reduce the overall power consumption of the communication interface. In the connection mode, the communication interface realizes continuous multiple communication data transmission, most of the modules in the communication interface are in a working state, and only the trigger module 300 is in a sleep state.

[0058] In the burst mode, the communication interface does not currently perform data transmission, but will perform data transmission after a period of time, that is, the communication interface does not continuously realize communication data transmission in the burst mode, at this time, the communication interface will adjust the working state of part of the modules to make part of the functions sleep. In the case that the communication interface is in the burst mode, the trigger module 300 in the communication interface is in a working state, and the clock synchronizer in the clock module 100 is also in a working state, so that the communication data can be transmitted through the target clock signal in the clock synchronizer in the clock module 100 in the case of needing to transmit the communication data.

[0059] In some embodiments of the present application, the data frame of the communication interface for data transmission comprises: synchronization clock data, start data, target data, check data, and stop data. The first clock length of the synchronization clock data transmitted by the communication interface in the burst mode is greater than the second clock length of the synchronization clock data transmitted by the communication interface in the continuous mode.

[0060] Please refer to Figure 3 , Figure 3 is a timing diagram in the burst mode provided by the embodiment of the present application. As shown in Figure 3 , when the target communication device transmits data through the communication interface, the data frame comprises, in sequence, synchronization clock data, start data, target data, check data, and stop data. The synchronization clock data is a target clock signal, which is used for the receiving device of the communication data to restore the sampling clock and synchronize the sampling clock. Since the target communication device needs to wake up from the sleep state when receiving the synchronization clock data in the burst mode, the first clock length of the synchronization clock data in the burst mode is three sampling clock lengths. The start data is a high-level signal of two preset sampling clock lengths. The check data is a check data of a preset length after the target data, and the check data can be a CRC check or other check mode according to the application scenario. The stop data is a low-level signal of one preset sampling clock length after the check data.

[0061] The target data is target data transmitted between the target communication device and the external device. The data length of the target data can be 8 bits or 16 bits, and the data length can be set between the target communication device and the external device before the target data is transmitted. The target data is represented by high and low levels, and when the target data is transmitted, the shift register can read the target data according to the target clock signal, for example, a bit of target data is read through the communication interface when the clock pulse of the target clock signal is formed.

[0062] The embodiment of the present application sets a general data frame for data transmission, which can ensure the reliability of the communication data transmission between the target communication device and the external device, and can also reduce unnecessary data transmission and improve transmission efficiency.

[0063] Please refer to Figure 4 , Figure 4 is a timing diagram in a continuous mode provided by the embodiment of the present application. As shown in Figure 4 , the timing diagram in the continuous mode is basically the same as that in the burst mode, and the difference is that the second clock length of the synchronization clock data in the continuous mode is one sampling clock length. Since part of the modules of the communication interface in the burst mode are in a sleep state, three sampling clock length synchronization clock signals are needed to wake up the clock keeper, the data buffer and the shift register in the sleep state, while in the continuous mode, since the communication data is continuously transmitted, only one sampling clock length synchronization clock signal is needed, that is, the first clock length of the synchronization clock data of the communication interface in the burst mode is greater than the second clock length of the synchronization clock data of the communication interface in the continuous mode.

[0064] The embodiment of the present application proposes a new serial synchronous interface, which integrates synchronization data and communication data in one communication interface transmission, saves the number of communication interfaces in the target communication device, and reduces the cost of the communication interface. Since the communication interface of the embodiment of the present application can realize synchronous serial communication, the transmission rate is high and the flexibility is good.

[0065] In a second aspect, the embodiment of the present application further provides a communication device, which comprises the communication interface provided by the above-mentioned embodiment, and the communication device transmits data through the communication interface.

[0066] Please refer to Figure 5 , Figure 5 is a structural schematic diagram of a communication device provided by the embodiment of the present application. As shown in Figure 5 , device A and device B are both communication devices, and the communication interfaces provided by the embodiment of the present application are arranged on the two communication devices, and the communication data transmission is realized through the communication interfaces. The communication interface arranged on device A is taken as a first communication interface, and the communication interface arranged on device B is taken as a second communication interface, and the first communication interface and the second communication interface are connected through a communication channel. Figure 5In the shown communication device structure, general data is sent from device A to device B. In the case of first connection between device A and device B, device A sends synchronization data to device B first to synchronize the clock of device B with device A, and in the case of clock synchronization between the two communication devices, device A sends communication data to device B.

[0067] In some embodiments, referring to Figure 6 , Figure 6 is another structure schematic diagram of a communication device provided by the embodiments of the present application. As shown in Figure 6 , device A and device B are both communication devices, and both of the two communication devices are provided with two communication interfaces provided by the embodiments of the present application. The first output interface on device A is connected with the second input interface on device B, so that device A outputs synchronization data and communication data through the first output interface, and device B receives the synchronization data and communication data sent by device A through the second input interface; the first input interface on device A is connected with the second output interface on device B, so that device B outputs synchronization data and communication data through the second output interface, and device A receives the synchronization data and communication data sent by device B through the first input interface, to realize full-duplex communication between device A and device B. At this time, the communication data between device A and device B is independent of each other and does not interfere with each other.

[0068] In a third aspect, referring to Figure 7 , Figure 7 is a flowchart of a communication method provided by the embodiments of the present application. As shown in Figure 7 , the embodiments of the present application provide a communication method, which is applied to the communication device as described in the above embodiments, and the communication method comprises the following step S700.

[0069] Step S700, transmitting synchronization data between the target communication device and the external device, and transmitting communication data in the case of clock synchronization between the target communication device and the external device; wherein the synchronization data is used to synchronize the clock of the target communication device with the external device.

[0070] It should be understood that the above communication method is a method embodiment corresponding to the above communication interface and communication device, and the detailed introduction and description of each step in the communication method and its beneficial effects can be referred to the embodiments of the above communication interface or communication device, which will not be described here.

[0071] Those skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructions, or by controlling related hardware by instructions, which can be stored in a computer readable storage medium and loaded and executed by a processor.

[0072] To this end, an embodiment of the present application provides a computer readable storage medium, which stores a computer program. The computer program is loaded by a processor to execute steps in any one of the communication methods provided by the embodiments of the present application. The computer readable storage medium can include a read only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0073] Due to the computer program stored in the computer readable storage medium, the steps in any one of the communication methods provided by the embodiments of the present application can be executed, thus the beneficial effects of any one of the communication methods provided by the embodiments of the present application can be achieved. Details are described in the foregoing embodiments, which will not be repeated here.

[0074] The embodiments of the present application further provide a computer program product or a computer program, which includes computer instructions stored in a computer readable storage medium. A processor of a terminal device reads the computer instructions from the computer readable storage medium. The processor executes the computer instructions, so that the terminal device executes the method provided in various optional implementation manners in the above embodiments.

[0075] The above describes in detail a communication interface, a communication device and a communication method provided by the embodiments of the present application. The principles and implementation manners of the present application are described by applying specific examples. The above embodiment descriptions are only used to help understand the method of the present application and its core idea. Meanwhile, for those skilled in the art, according to the idea of the present application, the specific implementation manners and application ranges can be changed. In summary, the content of the present description should not be understood as a limitation of the present application.

Claims

1. A communication interface, characterized in that, A communication interface is installed on the target communication device, and the communication interface is used to: transmit synchronization data between the target communication device and an external device, and transmit communication data when the clocks of the target communication device and the external device are synchronized; The synchronization data is used to synchronize the clock between the target communication device and the external device.

2. The communication interface according to claim 1, characterized in that, The communication interface is also used for: When the target communication device and the external device are connected for the first time, synchronization data is transmitted between the target communication device and the external device.

3. The communication interface according to claim 1, characterized in that, The synchronization data includes a synchronization clock signal, and the communication interface includes: A clock module is used to synchronize the sampling clock signal of the target communication device with the synchronization clock signal to obtain a synchronized target clock signal. A storage module is used to transmit the communication data under the control of the target clock signal; A trigger module is used to wake up the communication interface when the communication interface is in sleep mode.

4. The communication interface according to claim 3, characterized in that, The clock module includes: A clock hold circuit is used to generate the sampled clock signal; A clock synchronizer, connected to the clock hold, is used to synchronize the sampled clock signal with the synchronization clock signal to obtain the target clock signal.

5. The communication interface according to claim 4, characterized in that, The storage module includes: a shift register and a data buffer connected to the shift register, wherein: The shift register is used to: transfer and store the received communication data in the data buffer according to the target clock signal, or transfer and send the communication data stored in the data buffer to the external device according to the target clock signal.

6. The communication interface according to claim 3, characterized in that, The communication interface operates in three modes: sleep mode, burst mode, and continuous mode. When the communication interface is in sleep mode, only the trigger module is active in the communication interface. When the communication interface is in burst mode, the trigger module in the communication interface and the clock synchronizer in the clock module are in working state. When the communication interface is in continuous mode, the clock module and the storage module in the communication interface are in working state.

7. The communication interface according to claim 6, characterized in that, The data frames transmitted via the communication interface include: synchronization clock data, start data, target data, check data, and stop data; Wherein, the first clock length of the synchronous clock data transmitted by the communication interface in burst mode is greater than the second clock length of the synchronous clock data transmitted by the communication interface in continuous mode.

8. The communication interface according to claim 1, characterized in that, The communication interface includes an input interface and an output interface, wherein: The input interface is used to: receive first synchronization data sent by the first external device when the target communication device is first connected to the first external device, so that the input interface can realize clock synchronization according to the first synchronization data, and receive first communication data sent by the first external device when the clock is synchronized; The output interface is used to: send second synchronization data to the second external device when the target communication device and the second external device are connected for the first time, so that the second external device can achieve clock synchronization according to the second synchronization data, and send second communication data to the second external device when the clock is synchronized.

9. A communication device, characterized in that, include: The communication interface as described in any one of claims 1 to 8, wherein the communication device transmits data through the communication interface.

10. A communication method, characterized in that, Applied to the communication device as described in claim 9, the method includes: Synchronization data is transmitted between the target communication device and the external device, and communication data is transmitted when the clocks of the target communication device and the external device are synchronized; wherein, the synchronization data is used to synchronize the clocks of the target communication device and the external device.