Unlock instant, AI-driven research and patent intelligence for your innovation.

Method, system and device for achieving SPI slave function through GPIO and medium

A functional method and equipment technology, applied in the direction of instrumentation, electrical digital data processing, etc., can solve problems such as troublesome and high cost

Pending Publication Date: 2020-02-07
GENEW TECH
View PDF6 Cites 10 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] The technical problem to be solved in the present invention is, provide a kind of CPU-based GPIO to realize SPI slave function method and system, computer equipment, readable storage medium, aim to solve the CPU that does not support SPI slave function in the prior art On the other hand, it is very troublesome and costly to implement the SPI slave function

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
  • Method, system and device for achieving SPI slave function through GPIO and medium
  • Method, system and device for achieving SPI slave function through GPIO and medium
  • Method, system and device for achieving SPI slave function through GPIO and medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0050] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only It is a part of embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.

[0051] Various non-limiting embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings.

[0052] The inventor found through research that most of the existing main control CPUs can only perform the SPI master function. If the SPI slave function is to be implemented on a CPU that does not s...

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 method, system and device for achieving an SPI slave function through GPIO, and a medium. The method comprises the steps: an MCU sends an interrupt to a CPU through a GPIO3pin when the MCU enables a clock signal to be valid, and the CPU enters an interrupt processing program; when the CPU enters an interrupt processing program and judges that the enable signal of the slave device is valid, the MCU sends a bit of data to the CPU; the CPU reads a master output slave input signal of the GPIO1 pin in an interrupt program and reads data from the MCU; when an interruptedclock signal is generated each time, the CPU reads one bit data sent by the MCU and sends a response bit data to the MCU; and when the CPU reads each byte of bit data, the read bit data forms one byte. Through the method, the SPI slave function can be realized on the CPU which does not support the SPI slave function, and the structure is simple, and the realization is easy, and the cost is low.

Description

technical field [0001] The present application relates to the field of embedded drivers, in particular to a CPU-based GPIO method for realizing SPI slave functions, a system, computer equipment, and a readable storage medium. Background technique [0002] SPI (Serial Peripheral Interface) serial peripheral interface is a high-speed, full-duplex, synchronous communication bus, and only occupies four wires on the pins of the chip, saving the pins of the chip and providing PCB The layout saves space and provides convenience. It is because of this easy-to-use feature that more and more chips integrate this communication protocol. [0003] In the prior art, most of the main control CPUs can only perform the SPI master function, and a very small number of CPUs support the SPI slave function, but they are all implemented by hardware, and the scalability is not good. If you want to implement the SPI slave function on a CPU that does not support the SPI slave function, it is very tr...

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/4291
Inventor 杨超孟庆晓吴闽华
Owner GENEW TECH