Communication method, device and equipment for SPI (Serial Peripheral Interface) bus and storage medium

A technology of SPI bus and communication method, which is applied in the field of communication, can solve problems such as low efficiency, and achieve the effect of efficient and reliable communication

Active Publication Date: 2022-07-15
苏州联讯仪器股份有限公司
View PDF8 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

When writing data, the MCU first calculates the CRC_MCU of the data sent this time and appends it to the data. After the FPGA receives it, it calculates the CRC_FPGA of the received data. If the CRC_MCU and CRC_FPGA are equal, the data received by the FPGA is correct; However, at this time, the MCU does not know whether the FPGA has received the data normally, so the MCU needs to start the data reading process to read the data back. If the read value is equal to the w

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
  • Communication method, device and equipment for SPI (Serial Peripheral Interface) bus and storage medium
  • Communication method, device and equipment for SPI (Serial Peripheral Interface) bus and storage medium
  • Communication method, device and equipment for SPI (Serial Peripheral Interface) bus and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0049] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0050] The present invention provides a communication method for SPI bus, such as figure 1 shown, including the following steps:

[0051] S101, the MCU performs a CRC operation on the target data of the data packet to obtain a first check value;

[0052] It should be noted that the application scenario of the present invention is that the MCU wants to write the target data in the data packet, and the target data is DATA and the lengt...

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 a communication method, device and equipment for an SPI bus and a storage medium, and the method comprises the steps: carrying out the CRC operation of target data of a data package, and obtaining a first verification value; starting SPI communication, and sequentially sending each byte data in the target data to the FPGA, so that the FPGA performs CRC operation again on the received current byte data and a second check value obtained by performing CRC operation on the received previous byte data to update the second check value; after the target data is sent, receiving a second verification value updated by the FPGA, and judging whether the first verification value is consistent with the updated second verification value or not; if yes, determining that the target data received by the FPGA is valid; and if not, restarting the operation of SPI communication until the target data received by the FPGA is judged to be valid. According to the communication method, whether writing succeeds or not can be known only through one communication process, and then efficient and reliable communication can be achieved.

Description

technical field [0001] The present invention relates to the field of communication technologies, and in particular, to a communication method, apparatus, device and storage medium for an SPI bus. Background technique [0002] A Microcontroller Unit (MCU) and a Field Programmable Gate Array (FPGA) communicate through a Serial Peripheral Interface (SPI) bus, the MCU acts as a communication master, and the FPGA acts as a communication slave. When the MCU reads data through the SPI bus, it does not know whether the read data is correct or has errors; when the MCU writes data through the SPI bus, it does not know whether the FPGA of the opposite end has received the correct data, and the FPGA of the opposite end does not know whether it has received the correct data. Whether the data is correct, which leads to unreliable communication. [0003] At present, in order to solve the above problems, the existing method is to add a Cyclic Redundancy Check (Cyclic Redundancy Check, CRC)...

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/00
CPCH04L1/0061Y02D10/00
Inventor 闫亚超曹勋
Owner 苏州联讯仪器股份有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products