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

DMA-based spi communication method, electronic equipment, storage medium, device

A communication method and SPI interface technology, applied in the computer field, can solve problems such as the inability to realize external chip SPI communication functions, low program communication speed and efficiency, and slow operation speed of single-chip microcomputers, so as to increase stability, save costs, and improve operation. speed effect

Active Publication Date: 2022-03-11
广州星雨光电设备有限公司
View PDF4 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

The program communication speed and efficiency of this method are very low, occupying a large amount of time resources of the single-chip microcomputer, causing the running speed of the single-chip microcomputer to slow down, and when the function of the product is more complicated or there are many transactions to be processed, the SPI communication with the external chip cannot be realized.

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
  • DMA-based spi communication method, electronic equipment, storage medium, device
  • DMA-based spi communication method, electronic equipment, storage medium, device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0030] Below, the present invention will be further described in conjunction with the accompanying drawings and specific implementation methods. It should be noted that, under the premise of not conflicting, the various embodiments described below or the technical features can be combined arbitrarily to form new embodiments. .

[0031] DMA-based SPI communication method, such as figure 1 shown, including the following steps:

[0032] Initialize the SPI interface, after the processor is powered on, the SPI interface is initialized; in the present embodiment, the processor is specifically a single-chip microcomputer, preferably, in the initialization SPI interface, the transmission mode, mode of operation, data bits, and Transmission speed, specifically, the processor configures the SPI interface as the host bidirectional two-wire mode, the working mode is 0, the data bit is 8 bits, and the transmission speed is 10M.

[0033] Initialize the DMA program, and the processor initi...

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 provides a DMA-based SPI communication method, comprising steps: after the processor is powered on, the SPI interface is initialized; the processor initializes the receiving and sending configuration of the DMA; When the data to be sent is reached, the DMA is started to send the data to be sent in parallel. When the data to be sent is sent, the DMA generates a transmission completion interrupt; the main program of the processor loops to detect the SPI interface. When the main program of the processor detects the data to be received, Start the DMA to receive the data to be received in parallel, and when the data to be received has been received, the DMA generates a receive completion interrupt. The invention relates to electronic equipment and a readable storage medium for executing the above method; the invention also relates to a DMA-based SPI communication device. The invention adopts the DMA technology and the interrupt generated by the DMA, so that the main program of the processor can quickly take and process the data in the interrupt service program, and obviously reduce the time resources occupied by the single-chip microcomputer.

Description

technical field [0001] The invention relates to the technical field of computers, in particular to a DMA-based SPI communication method, electronic equipment, storage media and devices. Background technique [0002] In the single-chip microcomputer system, there are usually many external chips connected to the single-chip microcomputer. These external chips can realize a specific function that the single-chip microcomputer cannot realize, such as data memory, temperature sensor, Ethernet network communication, etc. The single-chip microcomputer communicates with the external chip through a specific interface protocol, such as the SPI interface protocol, so as to achieve the purpose of controlling the external chip. Therefore, the speed and efficiency of the interface protocol for communicating with external chips is very important. [0003] At present, most single-chip microcomputers do not have integrated DMA function. The SPI communication method with external chips is us...

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 Patents(China)
IPC IPC(8): G06F13/30G06F13/42G06F13/38
CPCG06F13/30G06F13/385G06F13/4282G06F2213/3852G06F2213/0002
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