Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

SPI data transmission method

A data transmission method and data technology, applied in the field of communication, can solve problems such as data packet loss

Pending Publication Date: 2022-07-08
成都创科升电子科技有限责任公司
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0006] In order to overcome the above-mentioned defects, the present invention aims to provide a SPI data transmission method, which is used for master equipment and slave equipment to communicate through SPI, which can solve the problem of data packet loss in existing SPI communication, and improve the correctness and stability of communication

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • SPI data transmission method
  • SPI data transmission method

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0032] like figure 1 As shown, this embodiment discloses an SPI data transmission method, which is used for communication between a master device and a slave device through SPI, and includes the following steps:

[0033] a. The master device sends the first data to the slave device, and locally stores the first data in the master device;

[0034] b. After receiving the received value of the first data from the slave device, send the second data associated with the received value of the first data to the master device; The rule calculation generates the third data, and sends the third data to the master device;

[0035] c. After receiving the received value of the second data and the received value of the third data, the master device calculates the received value of the first data and the second data according to the predetermined arithmetic rule to generate the fourth data;

[0036] d. Comparing the received value of the third data with the fourth data, when the received va...

Embodiment 2

[0042] The difference between this embodiment and Embodiment 1 is that the predetermined operation rules adopted are as follows:

[0043] The result generated after the 8-bit data is XORed with the upper 8 bits and the lower 8 bits of the 16-bit data, respectively, is ANDed with 0x400.

Embodiment 3

[0045] like figure 2 As shown, on the basis of Embodiment 2, this embodiment discloses an example of SPI data transmission, which is as follows:

[0046] Master A and slave B communicate through SPI, using the same clock, master A sends 8bit required register information reg_num to slave B, and master A saves the sent information locally, after slave B receives the 8bit information reg_num~, Send the register information required by host A to the host 16bit-value, and then calculate a checksum check_sum by itself and send it to host A. The specific calculation method is as follows:

[0047] The 8-bit information reg_num received by slave B~ XOR the upper 8 bits of the value, then XOR the lower 8 bits of the value, and finally add 0x400 as the label bit, as follows:

[0048] check_sum=(reg_num~⊕valueH8⊕valueL8)&0x400

[0049] In the above formula: valueH8 is the upper 8 bits of the value, and valueL8 is the lower 8 bits of the value.

[0050] After the host receives the 16b...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses an SPI (Serial Peripheral Interface) data transmission method, which is used for communication between master equipment and slave equipment through an SPI and comprises the following steps of: a, sending data; b, generating a slave device end checksum; c, generating a primary equipment end checksum; and d, comparing the checksum of the main equipment end with the checksum of the equipment end, and judging the correctness of transmission according to a comparison result. According to the method, data transmission errors can be effectively detected, the problem of data packet loss in existing SPI communication is solved, and the correctness and stability of communication are improved.

Description

technical field [0001] The invention relates to communication technology, in particular to an SPI data transmission verification method. Background technique [0002] SPI (Serial Peripheral Interfacer) is a synchronous serial communication interface introduced by Motorola, which is used for serial connection between microprocessor and controller and peripheral expansion chip. [0003] SPI, is a high-speed, full-duplex, synchronous communication bus, and only occupies four lines on the pins of the chip, saving the pins of the chip, saving space on the PCB layout, providing convenience, positive It is because of this ease of use that more and more chips today integrate this communication protocol. [0004] The SPI interface is a synchronous serial data transmission between the CPU and peripheral low-speed devices. Under the shift pulse of the master device, the data is transmitted bit by bit, the high bit is first, and the low bit is behind, which is full-duplex communication...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): H04L1/00H04L1/16H04L1/18G06F13/42G06F13/40
CPCH04L1/009H04L1/0091H04L1/1607H04L1/1867G06F13/4282G06F13/4068
Inventor 古秋翔徐飞飞何丹邱玺
Owner 成都创科升电子科技有限责任公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products