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

SPI communication method and device and storage medium

A communication method and cache technology, applied in duplex signal operation, instrumentation, electrical digital data processing, etc., can solve the problems of pin occupation, multi-PCB space, increase the complexity of chip hardware design and implementation, etc., to ensure data, Simple layout and stable transmission effect

Pending Publication Date: 2022-01-28
山东云海国创云计算装备产业创新中心有限公司
View PDF1 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Increasing the pins of the SPI control chip will inevitably increase the complexity of chip hardware design and implementation, and when the SPI chip is laid out on the PCB, the extra pins will take up more PCB space

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 communication method and device and storage medium
  • SPI communication method and device and storage medium
  • SPI communication method and device and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0046] refer to figure 1 As shown, the embodiment of the present application provides a SPI communication method including:

[0047] S100, the SPI sending end transmits information to the SPI receiving end with the first message in the preset data format. The first message includes: valid data and valid data check code; Whether there is data that needs to be sent to the target SPI receiver, and if there is, the data is encapsulated into a corresponding first message according to the preset data format of the first message. refer to figure 2 As shown, the content of the first message includes but is not limited to: valid data length, valid data and valid data check code, wherein, in the preset data format of the first message, the valid data length and valid data check code The verification codes are configured with a fixed number of digits, and the valid data length, valid data and valid data check codes are arranged in sequence. A feasible way is to set an 8-bit valid dat...

Embodiment 2

[0071] combined reference Figure 6 and Figure 7 As shown, the embodiment of the present application provides an apparatus for realizing the SPI communication method, including an SPI sending end and an SPI receiving end.

[0072] The SPI sending end and the SPI receiving end are connected through MOSI signal line, MISO signal line, SCLK clock line and SS chip select line. Among them, the MOSI signal line connects the Tx channel of the SPI sending end and the Rx channel of the SPI receiving end, and transmits the data sent by the SPI sending end to the SPI receiving end; the MISO signal line connects the Rx channel of the SPI sending end and the Tx channel of the SPI receiving end, and the transmission is received by the SPI The data sent by the end to the SPI sender. The SCLK clock line is used to transmit the clock signal sent by the SPI transmitter to the SPI receiver, and the clock signal is used to control the data transmission between the SPI transmitter and the SPI r...

Embodiment 3

[0083]The present application provides a storage medium for implementing the SPI communication method. The storage medium for implementing the SPI communication method stores at least one instruction, and the instruction is read and executed to implement the SPI communication method.

[0084] In this application, the SPI receiving end calculates the check value of the valid data of the first message, and judges the valid data received by the SPI receiving end by comparing the check value of the valid data with the valid data check code contained in the first message integrity. The error checking of valid data in the first message in the SPI communication process is realized.

[0085] The SPI receiving end forms a second message according to the valid data verification situation and the state that the FIFO buffer of the SPI receiving end can continue to receive the first message, and sends the second message to the SPI sending end using the MISO signal line. Realize the commun...

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 relates to an SPI communication method and device and a storage medium. In the application, an SPI sending end transmits information to an SPI receiving end in the form of a first message in a preset data format, wherein the first message comprises valid data and a valid data check code; the SPI sending end sends an end mark signal after sending a first message; and when the SPI receiving end receives the first message, calculating a verification value of effective data in the first message, whether the verification value of the effective data is the same as the verification code of the effective data is compared, if so, a second message containing a response state to the SPI sending end is fed back by the SPI receiving end through the MISO signal line. Otherwise, the SPI receiving end feeds back a second message containing a non-response state to the SPI sending end through the MISO signal line, and discards the corresponding first message; and the SPI sending end controls data transmission between the SPI sending end and the SPI receiving end according to the second message content. Response in the SPI communication process, the verification of effective data and the control of the SPI data transmission process are realized under the condition of not adding GPIO (General Purpose Input / Output).

Description

technical field [0001] The present application relates to the field of SPI communication, in particular to an SPI communication method, device and storage medium. Background technique [0002] SPI (serial peripheral interface) is a synchronous serial communication protocol. In point-to-point communication, the SPI interface does not require addressing operations, and it is full-duplex communication, which is simple and efficient. The standard SPI only uses 4 pins for control and data transmission, which saves the number of pins on the chip and saves space on the layout of the PCB. [0003] It is precisely because of this easy-to-use feature that more and more chips have integrated SPI technology. The SPI interface is mainly used between EEPROM, Flash, real-time clock (RTC), digital-to-analog converter (ADC), digital signal processor (DSP) and digital signal decoder. The advantage of SPI communication is that there are fewer signal lines, the protocol is simple, and the rel...

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): H04L5/14H04L1/00G06F13/42
CPCH04L5/1461H04L1/0061G06F13/4282
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