Communication device based on SPI communication interface and communication method thereof

A technology of SPI interface and communication device, which is applied in the field of communication and can solve the problems of inability to communicate between the master and the master and the slave and the slave, no one provides the clock signal, and the communication cannot be completed.

Pending Publication Date: 2021-03-16
成都鼎安华智慧物联网股份有限公司
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] When the general hardware device uses SPI communication, it is master-slave communication, and it is impossible to communicate between the master and the slave and the slave.
Mainly because if both devices are masters, the clock signals will collide and communication will not be possible
If both devices are slaves, no one provides a clock signal, and communication cannot be completed

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 device based on SPI communication interface and communication method thereof
  • Communication device based on SPI communication interface and communication method thereof
  • Communication device based on SPI communication interface and communication method thereof

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0026] Such as figure 1 As shown, the communication device based on the SPI communication interface includes a single-chip microcomputer and two SPI hardware peripheral interfaces;

[0027] Such as figure 2 As shown, when communicating between two slave devices, the two SPI hardware interfaces are initialized in master mode.

[0028] The two SPI hardware peripheral interfaces are a serial bus communication mode.

[0029] The single-chip microcomputer is connected with two SPI hardware peripheral interfaces and is connected with the SPI hardware peripheral interface through the SPI interface on the single-chip microcomputer.

[0030] The single-chip microcomputer model is STM32F103RCT6.

[0031] Such as image 3 As shown, both SPI hardware interfaces shown are initialized in slave mode when communication between the two master devices occurs.

[0032] The two SPI hardware peripheral interfaces are a serial bus communication mode.

[0033] The single-chip microcomputer is...

Embodiment 2

[0037] Such as Figure 4 As shown, the communication method of the communication device based on the SPI interface includes: two SPI hardware peripheral interfaces perform data transmission and reception control between two slave devices or two master devices, and the two SPI hardware peripheral interfaces are controlled by the CPU. Data copying and rate conversion. When the two SPI hardware peripheral interfaces carried out data exchange between the slave equipment and the slave equipment, the two SPI hardware peripheral interfaces all used the master mode, and the slave equipment A received the read data command from SPI1, and the reception of the SPI1 interface The buffer area receives the data sent from device A, and the CPU copies the data from the receiving buffer area of ​​the SPI1 interface, and sets the sending rate of the SPI2 interface, and sends the data to the sending buffer area of ​​the SPI2 interface to send data to the slave device B; Device B receives the re...

Embodiment 3

[0039] Such as Figure 5 As shown, the communication method of the communication device based on the SPI interface includes: two SPI hardware peripheral interfaces perform data transmission and reception control between two slave devices or two master devices, and the two SPI hardware peripheral interfaces are controlled by the CPU. Data copying and rate conversion. .

[0040]Two SPI hardware peripheral interfaces exchange data between the master device and the master device. Both SPI hardware peripheral interfaces use the slave mode. The SPI1 interface receives the write and fetch data command from the master device A, and the receiving buffer area of ​​the SPI1 interface To receive the data sent by the master device A, the CPU copies the data from the receiving buffer of the SPI1 interface to the sending buffer of the SPI2 interface, the master device B sends a read data command to SPI2, and SPI2 returns the sending buffer data to the master device B; SPI2 The interface re...

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 a communication device based on an SPI (Serial Peripheral Interface) communication interface and a communication method of the communication device, belonging to the field ofcommunication; two different SPI hardware peripheral interfaces are connected to the SPI interface of a single chip microcomputer, the SPI hardware peripheral interfaces are in a serial bus communication mode, and the two different SPI hardware interfaces can use a slave mode or a master mode at the same time. Mutual communication between the master devices and between the slave devices can be realized.

Description

technical field [0001] The present application relates to the communication field, in particular to a communication control device based on an SPI communication interface and a communication method thereof. Background technique [0002] SPI is a full-duplex synchronous serial bus. The SPI bus generally uses 4 lines: serial clock SCK, master input / slave output data line MISO, master output / slave input data line MOSI and active low Slave select line SS. During transmission, the clock signal is generated from the host, so communication must be performed in a master-slave mode. [0003] When hardware devices usually use SPI communication, they are all master-slave communication, and communication between the master and the slave and the slave cannot be performed. Mainly because if both devices are masters, the clock signals will collide and communication will not be possible. If both devices are slaves, neither can provide a clock signal and communication cannot be completed....

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
Patent Type & Authority Applications(China)
IPC IPC(8): G06F13/42
CPCG06F13/4282
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