CN115562912A - Data redundancy monitoring method - Google Patents
Data redundancy monitoring method Download PDFInfo
- Publication number
- CN115562912A CN115562912A CN202211285077.9A CN202211285077A CN115562912A CN 115562912 A CN115562912 A CN 115562912A CN 202211285077 A CN202211285077 A CN 202211285077A CN 115562912 A CN115562912 A CN 115562912A
- Authority
- CN
- China
- Prior art keywords
- spi
- data
- slave device
- spi slave
- monitoring method
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/16—Error detection or correction of the data by redundancy in hardware
- G06F11/1608—Error detection by comparing the output signals of redundant hardware
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Hardware Redundancy (AREA)
Abstract
The invention discloses a data redundancy monitoring method, which adopts SPI slave device 2 and SPI master device to perform redundancy receiving on data sent by SPI slave device 1; the SPI master device and the SPI slave device 2 carry out redundant data interaction in a serial communication mode. The invention realizes the redundant data monitoring function effectively by adding the SPI slave device, receiving the data of the prior SPI slave device in a redundant way and comparing the redundant data to finish data diagnosis.
Description
Technical Field
The invention relates to the field of serial communication, in particular to a data redundancy monitoring method.
Background
In the existing Serial communication application, a Serial Peripheral Interface (SPI for short) is a high-speed, full-duplex, synchronous communication bus, and only four lines are occupied on pins of a chip, so that the pins of the chip are saved, and space is saved in the layout of a PCB, which provides convenience. And the SPI adopts a Master-Slave mode (Master-Slave) control mode, and the SPI specifies that communication between two SPI devices must be controlled by a Master device. As shown in fig. 1. A master device can control a plurality of Slave devices by providing a Clock signal (Clock) and chip Select (Slave Select) to the Slave devices, the SPI protocol further provides that the Clock signal of the Slave devices is provided to the Slave devices by the master device through the SCK pin, the Slave devices themselves cannot generate or control the Clock signal, the Slave devices cannot normally operate without the Clock signal, and there is no response mechanism to confirm whether the SPI devices receive data and whether the received data is correct, so there is a certain loss in data reliability, and the Slave device data can only be transmitted to the MISO pin of the master device through the MISO pin, and the received data cannot be effectively monitored.
Disclosure of Invention
In order to solve the above problems, the present invention provides a data redundancy monitoring method, which can implement redundancy monitoring and diagnosis functions on received data, effectively improve stability and accuracy of the received data, and has the advantages of simple implementation, reduced cost, improved system reliability, and the like.
The purpose of the invention can be realized by the following technical scheme:
a data redundancy monitoring method, the data redundancy monitoring method adopts SPI slave unit 2 and SPI master unit to carry on the redundant reception to the data that SPI slave unit 1 sends; the SPI master device and the SPI slave device 2 carry out redundant data interaction in a serial communication mode.
The invention realizes the redundant data monitoring function by adding the SPI slave device, performing redundant reception on the data of the conventional SPI slave device and comparing the redundant data to finish data diagnosis.
Further, the SPI master device and the SPI slave device 2 communicate through a serial bus; the SPI master device and the SPI slave device 2 receive data of the SPI slave device 1 through a MISO data line, the SPI slave device 1 receives data of the SPI master device through a MOSI, the SPI slave device 1 and the SPI slave device 2 receive clock signals of the SPI master device through an SCK data line, and the SPI slave device 1 and the SPI slave device 2 receive chip selection signals of the SPI master device through an NSS data line.
Compared with the prior art, the invention has the following advantages:
1. the connection of one slave device is added in the connection of the existing SPI master-slave device, but the newly-added SPI slave device does not receive the data of the SPI master device but receives the data of the existing SPI slave device, and the SPI master device and the existing SPI slave device jointly complete the redundant reception of the data of the existing SPI slave device, so that the function of data redundant reception is realized in a simple, ingenious, low-cost and easy-to-operate mode.
2. The redundancy monitoring mode is simple and effective, and whether the data of the SPI slave device 1 is effective or not can be processed and diagnosed through the exchange of redundancy data between the SPI master device and the SPI slave device 2, so that the stability and the accuracy of received data are greatly improved.
Drawings
FIG. 1 is a diagram of a conventional SPI master-slave device connection;
FIG. 2 is a diagram of the SPI master-slave device connection of the present invention.
Detailed Description
The invention is described in further detail below with reference to the figures and the specific embodiments.
The technical solutions in the embodiments of the present invention will be clearly and completely described below, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, shall fall within the protection scope of the present invention.
The invention provides a data redundancy monitoring method, as shown in fig. 2, the method is characterized in that an SPI slave device 2 is added between an SPI master device and an SPI slave device 1 and is respectively connected with the SPI master device and the SPI slave device 1, specifically, an SCK pin of the SPI slave device 2 is connected to an SCK pin of the master device and is used for receiving a clock signal sent by the SPI master device, a MISO pin of the SPI slave device 2 is connected to a MISO pin of the SPI slave device 1 and is used for receiving data sent by the SPI slave device 1, and an NSS pin of the SPI slave device 2 is connected to an NSS pin of the SPI master device and is used for receiving a chip select signal of the SPI master device. The SPI main equipment and the SPI auxiliary equipment 2 carry out redundant data interaction in a serial communication mode.
When the SPI master sends a chip select on the NSS pin, both SPI slave 1 and SPI slave 2 will receive the chip select signal and be selected. When the SPI communication starts, the same clock signals exist on the SCK pins of all the master and slave devices for communication data synchronization, and then the SPI master device sends data through the MOSI pin and is received by the SPI slave device 1, and then the SPI slave device 1 sends the data through the MISO pin, and at this time, the SPI master device and the SPI slave device 2 receive the data of the SPI slave device 1 from the MISO pin at the same time, thereby realizing a redundant receiving function of sending data to the SPI slave device 1.
After receiving the redundant data, the SPI master device and the SPI slave device 2 interact with the redundant data in a serial communication manner, and perform data diagnosis by comparing the redundant data to perform a monitoring function on the redundant data.
The foregoing is only a preferred embodiment of this invention and it should be noted that modifications can be made by those skilled in the art without departing from the principle of the invention and these modifications should also be considered as the protection scope of the invention.
Claims (3)
1. A data redundancy monitoring method is characterized in that the data redundancy monitoring method adopts SPI slave equipment 2 and SPI master equipment to carry out redundancy receiving on data sent by SPI slave equipment 1; the SPI master device and the SPI slave device 2 carry out redundant data interaction in a serial communication mode.
2. The data redundancy monitoring method of claim 1, wherein the SPI slave 2 and SPI master receive the data of SPI slave 1 through MISO data lines.
3. The data redundancy monitoring method according to claim 2, wherein the SPI master device and SPI slave device 2 communicate via a serial bus; the SPI slave device 1 receives data of the SPI master device through an MOSI data line, the SPI slave device 1 and the SPI slave device 2 receive a clock signal of the SPI master device through an SCK data line, and the SPI slave device 1 and the SPI slave device 2 receive a chip selection signal of the SPI master device through an NSS data line.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211285077.9A CN115562912A (en) | 2022-10-20 | 2022-10-20 | Data redundancy monitoring method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211285077.9A CN115562912A (en) | 2022-10-20 | 2022-10-20 | Data redundancy monitoring method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115562912A true CN115562912A (en) | 2023-01-03 |
Family
ID=84746440
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211285077.9A Pending CN115562912A (en) | 2022-10-20 | 2022-10-20 | Data redundancy monitoring method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115562912A (en) |
-
2022
- 2022-10-20 CN CN202211285077.9A patent/CN115562912A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10552366B2 (en) | Method of communication for master device and slave device on synchronous data bus wherein master and slave devices are coupled in parallel | |
EP1690186B1 (en) | Protective bus interface and method | |
CN107832250B (en) | Master-slave communication time sequence method based on SPI | |
CN201604665U (en) | Communication interface equipment of train control center | |
EP3029884A1 (en) | Commissioning method, master control board, and service board | |
US6973103B2 (en) | Communication system and communication control method | |
CN103729333A (en) | Backplane bus structure sharing multiple channel time slots and implementation method thereof | |
CN103210384A (en) | Method and circuit arrangement for transmitting data between processor modules | |
CN112995070B (en) | Double-card switching system and method | |
CN111858459B (en) | Processor and computer | |
JPS6410977B2 (en) | ||
CN218772141U (en) | Dual-processor circuit and control mainboard of distributed control system | |
CN115562912A (en) | Data redundancy monitoring method | |
CN113900985B (en) | IO and SPI multiplexing chip, multiplexing auxiliary chip and data interaction method | |
JP2024508592A (en) | USB interface multiplexing method, circuit, electronic equipment and storage medium | |
WO1982001607A1 (en) | Data communication bus structure | |
CN216850741U (en) | Laser optical module control circuit and laser | |
CN220933481U (en) | Serial communication time-sharing multiplexing circuit | |
CN114338265B (en) | Program downloading system and method based on TTP/C bus | |
CN114942866B (en) | LIN main testing device | |
CN217509042U (en) | Wireless transmission system | |
CN220419954U (en) | Multi-serial-port double-backup data storage processing system | |
CN209842384U (en) | Reinforced CAN and exchange card | |
CN210899197U (en) | Single-wire bidirectional communication circuit | |
CN100478932C (en) | Electronic apparatus |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |