Data transmission method and apparatus, electronic device, and medium

CN115729863BActive Publication Date: 2026-08-28ZHEJIANG UNIVIEW TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110986507.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-26
Publication Date
2026-08-28
Estimated Expiration
2041-08-26

AI Technical Summary

Technical Problem

[0004]为了解决上述问题,目前采用的方式为每次SPI通信仅传输一个传输周期的数据,在大数据量传输时就需要循环传输多次,会给主机侧造成过多的中断,增加主机CPU负载

Benefits of technology

[0018]本申请实施例中,确定向通信主机待传输的目标通信数据;通过至少两次数据传输过程向所述通信主机发送所述目标通信数据;第一次传输的目标通信数据的字节长度小于所述通信主机的传输周期对应传输数据字节长度且为奇数,通信从机中用于传输数据的移位寄存器位数大于或等于16位,从而解决了对于按照传输周期多次传输数据导致主机侧过多的中断以及多次封包消耗时间传输效率低,以及降低了时钟速率传输时降低了数据传输速率的问题,从而在保证有足够的延时时间使通信从机进行数据准备的同时,实现数据的高效快速传输。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115729863B_ABST
    Figure CN115729863B_ABST
Patent Text Reader

Abstract

Embodiments of the application disclose a data transmission method and device, electronic equipment and medium. The method comprises: determining target communication data to be transmitted to a communication host; sending the target communication data to the communication host through at least two data transmission processes; the byte length of the target communication data transmitted for the first time is an odd number smaller than the byte length of the transmission data corresponding to the transmission period of the communication host, and the bit number of the shift register used for transmitting data in the communication slave is greater than or equal to 16 bits. The above scheme solves the problem that the byte delay is lost when transmitting data at a time, and the communication slave has no preparation time to transfer data to the shift register. Through at least two transmissions and the byte length of the target communication data transmitted for the first time being an odd number smaller than the byte length of the transmission data corresponding to the transmission period of the communication host, efficient transmission of large data is realized without the need for cyclic transmission of a large number of times or the need for reducing the clock rate.
Need to check novelty before this filing date? Find Prior Art

Claims

1. A data transmission method, characterized in that, The method, executed by the communication slave device, includes: Determine the target communication data to be transmitted to the communication host; The target communication data is sent to the communication host through at least two data transmission processes; In the first transmission of target communication data, the length of the target communication data is less than the length of the data transmitted during the transmission cycle of the communication host and is odd. The number of bits in the shift register used for data transmission in the communication slave is greater than or equal to 16 bits. During the second transmission of target communication data, the time between the transmission cycles is located at the moment when the communication slave has transmitted the first byte of data out of the two bytes to the shift register.

2. The method according to claim 1, characterized in that, Sending the target communication data to the communication host through at least two data transmission processes includes: If the length of the target communication data is greater than the length of the data transmitted during the transmission cycle of the communication host, the target communication data is sent to the communication host through at least two data transmission processes.

3. The method according to claim 1, characterized in that, Sending the target communication data to the communication host through at least two data transmission processes includes: According to the clock signal of the communication host, a preset number of target communication data is sent to the communication host; wherein, the preset number is less than the number of bytes of data transmitted corresponding to the transmission cycle of the communication host and is an odd number of bytes; If the preset number of data to be transmitted is completed, the untransmitted target communication data is sent to the communication host according to the clock signal generated after the communication host restarts, so as to realize the transmission of the target communication data.

4. The method according to claim 3, characterized in that, Based on the clock signal of the communication host, a preset amount of target communication data is sent to the communication host, including: Based on the transmission cycle of the communication host, determine the preset quantity of target communication data to be transmitted for the first time; Within a transmission cycle, a preset amount of target communication data is sent to the communication host in a single transmission based on the clock signal of the communication host.

5. The method according to claim 3, characterized in that, If the preset number of data to be transmitted is completed, then based on the clock signal generated after the communication host restarts, the untransmitted target communication data is sent to the communication host, including: If a preset number of data to be transmitted is completed, then at the start of the next transmission cycle of the communication host, the untransmitted target communication data is sent to the communication host according to the clock signal of the communication host.

6. The method according to any one of claims 1-5, characterized in that, The method further includes: The shift register of the control communication slave device is used to transfer the target communication data to the shift register of the communication master device, so that the target communication data is transferred to the communication master device through the shift register of the communication master device.

7. The method according to any one of claims 1-5, characterized in that, The process of sending target communication data includes: If the shift register of the communication host is 8 bits, the target communication data is sent based on the least significant bit first transmission mode.

8. A data transmission device, characterized in that, The device includes: The data determination module is used to determine the target communication data to be transmitted to the communication host. The data sending module is used to send the target communication data to the communication host through at least two data transmission processes; In the first transmission of target communication data, the length of the target communication data is less than the length of the data transmitted during the transmission cycle of the communication host and is odd. The number of bits in the shift register used for data transmission in the communication slave is greater than or equal to 16 bits. During the second transmission of target communication data, the time between the transmission cycles is located at the moment when the communication slave has transmitted the first byte of data out of the two bytes to the shift register.

9. An electronic device, characterized in that, The electronic device includes: One or more processors; Memory, used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the data transmission method as described in any one of claims 1-7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the data transmission method as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Data receiving device, data transfer controlling device, and data transfer system

    JP2012155670A

  • Serial peripheral interface daisy chain mode system and apparatus

    US20180276157A1