CN113590520B - Control method for automatically writing data in SPI system and SPI system - Google Patents

Control method for automatically writing data in SPI system and SPI system Download PDF

Info

Publication number
CN113590520B
CN113590520B CN202110659535.XA CN202110659535A CN113590520B CN 113590520 B CN113590520 B CN 113590520B CN 202110659535 A CN202110659535 A CN 202110659535A CN 113590520 B CN113590520 B CN 113590520B
Authority
CN
China
Prior art keywords
data
fifo
spi
data buffer
spi system
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.)
Active
Application number
CN202110659535.XA
Other languages
Chinese (zh)
Other versions
CN113590520A (en
Inventor
请求不公布姓名
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhuhai Amicro Semiconductor Co Ltd
Original Assignee
Zhuhai Amicro Semiconductor Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Zhuhai Amicro Semiconductor Co Ltd filed Critical Zhuhai Amicro Semiconductor Co Ltd
Priority to CN202110659535.XA priority Critical patent/CN113590520B/en
Publication of CN113590520A publication Critical patent/CN113590520A/en
Application granted granted Critical
Publication of CN113590520B publication Critical patent/CN113590520B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
    • G06F13/4291Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus using a clocked protocol

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Systems (AREA)
  • Communication Control (AREA)

Abstract

The invention discloses a control method for automatically writing data in an SPI system and the SPI system, wherein the method comprises the following steps: the SPI system starts to write the data of the data buffer into the TX FIFO according to the enabling signal, and sends the data in the TX FIFO; the SPI system determines whether to send out the refreshing interrupt of the data buffer zone according to the relation between the total amount of written data and the capacity of the data buffer zone and the refreshing interrupt frequency of the data buffer zone, the CPU responds to the refreshing interrupt of the data buffer zone and fills the next batch of data to be sent into the data buffer zone, and the SPI system continues to execute the flow after receiving the signal of the refreshing completion interrupt of the CPU; or the SPI system writes the data in the data buffer area into the TX FIFO, and finishes the work after the data in the TX FIFO is sent. In the whole data writing process, the CPU only needs to respond to the refresh interrupt of the data buffer area with lower interrupt frequency, thereby greatly reducing the occupancy rate of the CPU.

Description

Control method for automatically writing data in SPI system and SPI system
Technical Field
The invention relates to the technical field of data transmission, in particular to a control method for automatically writing data in an SPI system and the SPI system.
Background
The SPI protocol is used as a peripheral interface protocol with wide application, and is applied to reading/writing Flash device data, gyroscope device data, data exchange between master SPI chips and slave SPI chips and the like. Different from other applications, the corresponding data amount is huge and the consumed hardware resources are the largest in the process of reading/writing the Flash device data.
In the existing Flash device, after the CPU responds to the interrupt bit of the SPI controller, the data is written into the TX FIFO or the DMA controller is operated to write the data into the TX FIFO, and the command to be sent and the data to be written are written into the TX FIFO together. The disadvantage of this approach is apparent in that when the amount of data to be written into the Flash device is very large, but the TX FIFO depth of the SPI controller is limited, the CPU or dma will frequently respond to the state interrupt of the SPI controller to carry the data, which will greatly lose the efficiency of the system.
Disclosure of Invention
In order to solve the problems, the invention discloses a control method for automatically writing data in an SPI system and the SPI system, and the data to be written in the SPI system is cached by setting a data cache region, so that a CPU only needs to respond to the refresh interrupt of the data cache region with lower interrupt frequency in the whole data writing process, and the occupancy rate of the CPU is greatly reduced. The specific technical scheme is as follows:
A control method for automatically writing data in an SPI system comprises the following steps: s1: the SPI system starts to write the data of the data buffer into the TX FIFO according to the enabling signal, records the total amount of the written data, then sends the data in the TX FIFO, and enters step S2; s2: the SPI system determines whether to send out the data buffer refreshing interrupt according to the relation between the total amount of the written data and the capacity of the data buffer and the number of times of sending out the data buffer refreshing interrupt, if the data buffer refreshing interrupt meets the requirement, the step S3 is entered, and if the data refreshing interrupt does not meet the requirement, the step S4 is entered; s3: the SPI system sends out refreshing interrupt of the data cache area, so that the CPU responds to the refreshing interrupt of the data cache area, data is filled into the data cache area, and the SPI system enters step S1 after receiving a signal that the CPU finishes refreshing completion interrupt; s4: if the data does not meet the requirements, the SPI system writes the data in the data cache area into the TX FIFO, and finishes the work after the data in the TX FIFO is sent.
Compared with the prior art, the SPI system of the scheme continuously carries the data to be transmitted from the data buffer area to the TX FIFO in the data transmission process, and the capacity of the data buffer area can greatly exceed the depth of the TX FIFO of the SPI system, so that the CPU only needs to respond to the refresh interrupt of the data buffer area with lower interrupt frequency in the whole data writing process, the occupation rate of the CPU is greatly reduced, the load of the CPU is reduced, and the running efficiency of the system is improved.
Further, before the SPI system starts writing data, the CPU divides the data buffer area, fills the data to be sent into the data buffer area, and configures the data reading initial address, the data buffer area capacity and the data buffer area required refreshing times of the SPI system through the ahb slave module, and then configures the SPI system to enable. The data buffer area is divided by the CPU before the SPI system starts working, the size of the data buffer area can be changed according to actual conditions, and the flexibility is high.
Further, the CPU fills the data to be transmitted into the data cache area and configures the number of times of refreshing the data cache area of the SPI system according to the relation between the total amount of the data to be transmitted and the capacity of the data cache area.
Further, in step S1, the control module in the SPI system starts ahb master the enabling module according to the enabling signal, so that ahb master reads the data in the data buffer according to the data start address, and then writes the data into the TX FIFO, and records the total amount of the written data.
Further, in steps S1 and S4, during the process of transmitting the data in the TX FIFO, if the remaining data in the TX FIFO is less than or equal to the set value, the TX FIFO sends a water level trigger interrupt to trigger ahb master the module to continuously write the data in the data buffer into the TX FIFO. When the residual data in the TX FIFO is at a set value, a water level trigger interrupt is sent out, so that the SPI system writes data into the TX FIFO again, the situation that the capacity in the TX FIFO is small, all effective data read by a ahb master module cannot be received, and the effective data is lost is avoided.
Further, the SPI system completes the transmission by SPI INTERFACE module converting the data in the TX FIFO into a corresponding SPI protocol stimulus.
Further, in step S2, when the total amount of the read data is equal to the capacity of the data buffer, the SPI system determines that the relationship between the number of times of refreshing and interrupting the data buffer has been sent out, and if the number of times of refreshing and interrupting the data buffer has been sent out is smaller than the number of times of refreshing and interrupting the data buffer, the step S3 is entered; if the number of times of sending the data buffer refresh interrupt is equal to the number of times of the data buffer refresh interrupt, step S4 is entered.
Further, in step S3, after receiving the signal of finishing the refresh completion interrupt from the CPU, the SPI system sets the total amount of data read by the ahb master module to zero, and then proceeds to step S1.
The SPI system executes the control method for automatically writing data in the SPI system, and comprises SPI controllers, a CPU and a data cache area which are connected in pairs, wherein the SPI controllers are used for converting data in the data cache area into excitation meeting an SPI protocol, the CPU is used for filling the data to be written into the data cache area, and the data cache area is used for storing the data. The SPI system is used for caching the data to be written in by setting the data cache region, so that the CPU only needs to respond to the refresh interrupt of the data cache region with lower interrupt frequency in the whole data writing process, the occupancy rate of the CPU is greatly reduced, and the running efficiency of the system is improved.
Further, the SPI controller includes: the control module, the ahb master module, the SPI INTERFACE module, the TX FIFO, the RX FIFO and the ahb slave module, wherein the control module is connected with the ahb master module and the ahb slave module and is used for controlling the SPI controller to read data of the cache area; the ahb master module is connected with the control module and the TX FIFO and is used for reading the data of the data cache area and writing the data into the TX FIFO; the ahb slave module is connected with the control module, the SPI INTERFACE module, the TX FIFO and the RX FIFO and is used for configuring an internal register of the SPI system; the SPI INTERFACE module is connected with the ahb slave module, the TX FIFO and the RX FIFO and is used for converting data in the TX FIFO into corresponding SPI protocol excitation and storing data received by the SPI INTERFACE module in the RX FIFO; the TX FIFO is used for storing data to be transmitted; the RX FIFO is used to store accepted data.
Drawings
FIG. 1 is a flow chart of a control method for automatically writing data by an SPI system according to one embodiment of the present invention;
FIG. 2 is a diagram showing the effect of the SPI system automatically writing data according to one embodiment of the present invention;
Fig. 3 is a schematic diagram of an SPI controller according to an embodiment of the present invention.
Detailed Description
The present application will be described and illustrated with reference to the accompanying drawings and examples in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application. All other embodiments, which can be made by a person of ordinary skill in the art based on the embodiments provided by the present application without making any inventive effort, are intended to fall within the scope of the present application.
SPI is an abbreviation for serial peripheral interface (SERIAL PERIPHERAL INTERFACE). SPI is a high-speed, full duplex, synchronous communication bus to only occupy four lines on the pin of chip, practiced thrift the pin of chip, save space for the overall arrangement of PCB simultaneously, provide convenience. The communication principle of SPI is simple and works in master-slave mode, which usually has one master and one or more slaves, requiring at least 4 wires, in fact 3 (in unidirectional transmission). Also common to all SPI-based devices, they are MISO (master data in), MOSI (master data out), SCLK (clock), CS (chip select). MISO-Master Input Slave Output, master device data input, slave device data output; MOSI-Master Output Slave Input, master device data out, slave device data in; SCLK-Serial Clock, clock signal, generated by the master device; CS-CHIP SELECT, slave enable signal, controlled by the master. The CS is a control signal indicating whether the slave chip is selected by the master chip, that is, the master chip is effective for the operation of the slave chip only when the chip selection signal is a predetermined enable signal (high potential or low potential). This makes it possible to connect multiple SPI devices on the same bus. The data transfer between SPI devices is also called data exchange because the SPI protocol specifies that an SPI device cannot function as only a "sender" or "Receiver" during data communication. In each Clock cycle, the SPI device will send and receive one bit size data, which corresponds to the device having one bit size data being swapped. The FIFO is an abbreviation of english FIRST IN FIRST Out, which is a first-in first-Out data buffer, and is different from a normal memory in that there is no external read-write address line, so that the use is very simple, but the disadvantage is that only data can be written in sequentially, data can be read Out sequentially, the data address is completed by automatically adding 1 by an internal read-write pointer, and a specified address cannot be read or written in by the address line as in the normal memory. TX FIFO is a transmit FIFO, RX FIFO is a receive FIFO.
As shown in fig. 1, a control method for automatically writing data in an SPI system includes the steps of: s1: the SPI system starts to write the data of the data buffer into the TX FIFO according to the enabling signal, records the total amount of the written data, then sends the data in the TX FIFO, and enters step S2; s2: the SPI system determines whether to send out the data buffer refreshing interrupt according to the relation between the total amount of the written data and the capacity of the data buffer and the number of times of sending out the data buffer refreshing interrupt, if the data buffer refreshing interrupt meets the requirement, the step S3 is entered, and if the data refreshing interrupt does not meet the requirement, the step S4 is entered; s3: the SPI system sends out refreshing interrupt of the data cache area, the CPU responds to the refreshing interrupt of the data cache area and fills the next batch of data to be sent into the data cache area, and the SPI system enters step S1 after receiving a signal that the CPU finishes refreshing completion interrupt; s4: if the data does not meet the requirements, the SPI system writes the data in the data cache area into the TX FIFO, and finishes the work after the data in the TX FIFO is sent. Compared with the prior art, the SPI system of the scheme is characterized in that data to be transmitted is continuously taken out from the data buffer area for writing and transmitting, and the capacity of the data buffer area can greatly exceed the TX FIFO depth of the SPI system, so that a CPU only needs to respond to the refreshing interrupt of the data buffer area with lower interrupt frequency in the whole data writing process, the occupation rate of the CPU is greatly reduced, the load of the CPU is reduced, and the running efficiency of the system is improved.
Further, before the SPI system starts writing data, the CPU divides the data buffer area, fills the data to be sent into the data buffer area, and configures the data reading initial address, the data buffer area capacity and the number of times that the data buffer area needs to be refreshed of the SPI system through the ahb slave module, and then configures the SPI system to enable. The data buffer area is divided by the CPU before the SPI system starts working, the size of the data buffer area can be changed according to actual conditions, and the flexibility is high. And the CPU fills the data to be transmitted into the data cache area and configures the refreshing times of the data cache area of the SPI system according to the relation between the total amount of the data to be transmitted and the capacity of the data cache area.
In one embodiment, in step S1, the control module in the SPI system starts ahb master the enabling module according to the enabling signal, so that ahb master reads the data in the data buffer according to the data start address, writes the data into the TX FIFO, and records the total amount of the written data. In steps S1 and S4, during the process of transmitting the data in the TX FIFO, if the remaining data in the TX FIFO is less than or equal to the set value, the TX FIFO sends out a water level trigger interrupt to make the SPI system continuously write the data in the data buffer into the TX FIFO. When the residual data in the TX FIFO is at a set value, a water level trigger interrupt is sent out, so that the SPI system writes data into the TX FIFO again, the situation that the capacity in the TX FIFO is small, all effective data read by a ahb master module cannot be received, and the effective data is lost is avoided. The SPI system converts the data in the TX FIFO to the corresponding SPI protocol stimulus via the SPI INTERFACE module to complete the transmission.
In step S2, when the total amount of written data is equal to the capacity of the data buffer, the SPI system determines that the number of data buffer refresh interrupts has been sent, and if the number of data buffer refresh interrupts is less than the number of data buffer refresh interrupts, the step S3 is entered; if the number of times of sending out the data buffer refresh interrupt is greater than or equal to the number of times of the data buffer refresh interrupt, the step S4 is entered. In step S3, after receiving the signal that the CPU completes the refresh completion interrupt, the SPI system sets the total amount of data that has been read by the ahb master module to zero, and then proceeds to step S1. In step S4, the SPI system may determine that the data in the data buffer has been read when the total amount of the written data is equal to the capacity of the data buffer, or may determine whether the data in the data buffer has been read according to whether the SPI system can read the data from the data buffer.
The SPI system executes the control method for automatically writing data in the SPI system, the SPI system comprises SPI controllers, a CPU and a data cache region which are connected in pairs, the SPI controllers are used for converting data in the data cache region into excitation conforming to an SPI protocol, the CPU is used for filling the data to be written into the data cache region, the data cache region is used for storing the data, and the CPU opens up and refreshes a larger storage region from a ddr or sram region to serve as the data cache region. The SPI system is used for caching the data to be written in by setting the data cache region, so that the CPU only needs to respond to the refresh interrupt of the data cache region with lower interrupt frequency in the whole data writing process, the occupancy rate of the CPU is greatly reduced, and the running efficiency of the system is improved. The SPI controller includes: the control module, the ahb master module, the SPI INTERFACE module, the TX FIFO, the RX FIFO and the ahb slave module, wherein the control module is connected with the ahb master module and the ahb slave module and is used for controlling the SPI controller to read data in a cache area; the ahb master module is connected with the control module and the TX FIFO and is used for reading the data of the data cache area and writing the data into the TX FIFO; the ahb slave module is connected with the control module, the SPI INTERFACE module, the TX FIFO and the RX FIFO and is used for configuring an internal register of the SPI system; the SPI INTERFACE module is connected with the ahb slave module, the TX FIFO and the RX FIFO and is used for converting data in the TX FIFO into corresponding SPI protocol excitation and storing data received by SPI INTERFACE in the RX FIFO; the TX FIFO is used for storing data to be transmitted; the RX FIFO is used to store accepted data.
As shown in fig. 2, taking TX FIFO depth of 64 layers as an example, the total amount of data to be transmitted is 4K. Assuming that the data to be written by the SPI system is 4K and the capacity of the data buffer is 2K, the number of interrupts required to be refreshed by the CPU in response to the data buffer is 4/2=1 times during the data writing process. Before starting writing data, a CPU in the SPI system fills 2K in 4K data to be written into a data buffer area, then configures three variables of a read data starting address, data buffer area capacity and data buffer area refreshing frequency of the SPI system, configures a water level trigger value of a TX FIFO as 32, and then starts SPI enabling. Firstly, a control module in the SPI system starts ahb master to enable, a ahb master module reads the first 64 data of the data buffer area according to the data starting address and writes the data into the TX FIFO, and then starts SPI INTERFACE to enable, so that a SPI INTERFACE module converts the 64 data in the TX FIFO into corresponding SPI protocol excitation according to a clock signal. When the control module determines ahb master that the total amount of data read from the data buffer is not equal to the capacity of the data buffer, it indicates ahb master that the control module has not read all the data in the data buffer, and at this time, the control module responds to the water level trigger interrupt sent by the TX FIFO to enable the ahb master module to read 32 data from the data buffer and write the 32 data into the TX FIFO. When the control module determines ahb master that the total amount of data read from the data buffer area by the module is equal to the capacity of the data buffer area, it indicates ahb master that the module has already read all data of the data buffer area, at this time, the control module may determine whether the number of times the data buffer area has been refreshed is equal to the number of times the configured data buffer area needs to be refreshed, if the number of times the data buffer area has not reached the number of times the configured data buffer area needs to be refreshed, that is, the CPU needs to respond to the number of times the data buffer area needs to be refreshed, the control module may control ahb master module to issue a data buffer area refresh request interrupt, clear ahb master the total amount counter of data read or written in the module to enter the next cycle determination, and increment the current number of times of data buffer area refresh by 1, after all data in the TX FIFO is converted by SPI INTERFACE module, wait for the CPU to respond to the data buffer area refresh interrupt. After receiving the interruption of the data cache refreshing request, the CPU fills the remaining 2K data into the data cache and sends the interruption of the data cache refreshing completion to the SPI controller. The SPI automatically enters the data writing cycle of the next round after receiving the interrupt. When the control module determines that the number of times the data buffer is refreshed is equal to the number of times the configured data buffer is refreshed, it indicates that the data to be transmitted is all loaded into the data buffer, and the remaining data in the TX FIFO is the last data to be transmitted. The control module waits SPI INTERFACE for the last data to be sent, and then turns off the enabling of ahb master module and SPI INTERFACE module, and the automatic writing process is finished.
As shown in fig. 3, the ahb slave module is used for the CPU to configure internal registers of the SPI system, such as a read data start address, a data buffer capacity, and a data buffer refresh number in the control module. The control module is used for judging whether the ahb master module reads the complete data cache area and whether the current refreshing frequency of the data cache area reaches the configured refreshing frequency required when the TX FIFO water level trigger interrupt is generated, and controlling ahb master module to read data from the data cache area or send out the data cache area refreshing interrupt or end the process to close each module to enable according to the two judging results; the SPI INTERFACE module translates the data in the TX FIFO into corresponding SPI protocol stimulus according to the configuration values in the ahb slave module.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing embodiments are merely representative of several embodiments of the application, which are described in more detail and are not to be construed as limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application.

Claims (9)

1. The control method for automatically writing data in the SPI system is characterized by comprising the following steps:
S1: the SPI system starts to write the data of the data buffer into the TX FIFO according to the enabling signal, records the total amount of the written data, then sends the data in the TX FIFO, and enters step S2;
S2: the SPI system determines whether to send out the data buffer refreshing interrupt according to the relation between the total amount of the written data and the capacity of the data buffer and the number of times of sending out the data buffer refreshing interrupt, if the data buffer refreshing interrupt meets the requirement, the step S3 is entered, and if the data refreshing interrupt does not meet the requirement, the step S4 is entered;
s3: the SPI system sends out refreshing interrupt of the data cache area, so that the CPU responds to the refreshing interrupt of the data cache area, data is filled into the data cache area, and the SPI system enters step S1 after receiving a signal that the CPU finishes refreshing completion interrupt;
S4: if the data is not in accordance with the requirements, the SPI system writes the data in the data cache area into the TX FIFO, and finishes the work after the data in the TX FIFO is transmitted;
In the step S2, when the total amount of the read data is equal to the capacity of the data buffer, the SPI system determines that the relationship between the number of times of refreshing and interrupting the data buffer has been sent out, and if the number of times of refreshing and interrupting the data buffer has been sent out is smaller than the number of times of refreshing and interrupting the data buffer, the step S3 is entered; if the number of times of sending the data buffer refresh interrupt is equal to the number of times of the data buffer refresh interrupt, step S4 is entered.
2. The method for automatically writing data in an SPI system according to claim 1, wherein the CPU divides the data buffer before the SPI system starts writing data, fills the data to be transmitted into the data buffer, and configures the SPI system to enable after the data buffer is configured with a read data start address, a data buffer capacity, and a number of times the data buffer needs to be refreshed by means of ahb slave.
3. The control method for automatically writing data in an SPI system according to claim 2, wherein the CPU fills data to be transmitted into the data buffer and configures the number of times the data buffer of the SPI system needs to be refreshed according to a relationship between the total amount of data to be transmitted and the capacity of the data buffer.
4. The method according to claim 1, wherein in step S1, the control module in the SPI system starts ahb master the enabling module according to the enabling signal, and causes ahb master to read the data in the data buffer according to the data start address, then write the data into the TX FIFO, and record the total amount of the written data.
5. The method according to claim 1, wherein in steps S1 and S4, if the remaining data in the TX FIFO is less than or equal to the set value during the process of transmitting the data in the TX FIFO, the TX FIFO sends a water level trigger interrupt to trigger ahb master the module to continuously write the data in the data buffer into the TX FIFO.
6. The method for automatically writing data to an SPI system of claim 5, wherein the SPI system performs the transmitting by means of SPIINTERFACE module converting the data in the TX FIFO into a corresponding SPI protocol stimulus.
7. The method for controlling automatic data writing in an SPI system according to claim 1, wherein in step S3, after receiving a signal indicating that the CPU completes the refresh completion interrupt, the SPI system resets the total amount of data that has been read by the ahb master module, and then proceeds to step S1.
8. An SPI system performing the control method of automatically writing data by the SPI system according to any one of claims 1 to 7, said SPI system comprising: the SPI controller is used for converting data in the data cache area into excitation meeting SPI protocol, the CPU is used for filling data to be written into the data cache area, and the data cache area is used for storing the data.
9. The SPI system of claim 8, wherein the SPI controller comprises: control module, ahb master module, SPIINTERFACE module, TX FIFO, RX FIFO and ahb slave module, wherein,
The control module is connected with the ahb master module and the ahb slave module and is used for controlling the SPI controller to read data of the cache area;
The ahb master module is connected with the control module and the TX FIFO and is used for reading the data of the data cache area and writing the data into the TX FIFO;
the ahb slave module is connected with the control module, the SPIINTERFACE module, the TX FIFO and the RX FIFO and is used for configuring an internal register of the SPI system;
The SPIINTERFACE module is connected with the ahb slave module, the TX FIFO and the RX FIFO and is used for converting data in the TX FIFO into corresponding SPI protocol excitation and storing data received by the SPIINTERFACE module in the RX FIFO;
the TX FIFO is used for storing data to be transmitted;
the RX FIFO is used to store the received data.
CN202110659535.XA 2021-06-15 2021-06-15 Control method for automatically writing data in SPI system and SPI system Active CN113590520B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110659535.XA CN113590520B (en) 2021-06-15 2021-06-15 Control method for automatically writing data in SPI system and SPI system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110659535.XA CN113590520B (en) 2021-06-15 2021-06-15 Control method for automatically writing data in SPI system and SPI system

Publications (2)

Publication Number Publication Date
CN113590520A CN113590520A (en) 2021-11-02
CN113590520B true CN113590520B (en) 2024-05-03

Family

ID=78243768

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110659535.XA Active CN113590520B (en) 2021-06-15 2021-06-15 Control method for automatically writing data in SPI system and SPI system

Country Status (1)

Country Link
CN (1) CN113590520B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114637709A (en) * 2022-02-23 2022-06-17 杭州中科微电子有限公司 Method and module for directly executing serial FLASH program through SPI control interface

Citations (58)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4700330A (en) * 1985-10-30 1987-10-13 Digital Equipment Corporation Memory for a digital data processing system including circuit for controlling refresh operations during power-up and power-down conditions
US4958277A (en) * 1987-07-24 1990-09-18 Motorola, Inc. Queued serial peripheral interface for use in a data processing system
EP0665502A1 (en) * 1994-01-27 1995-08-02 Sun Microsystems, Inc. Asynchronous serial control circuit
WO1996016371A1 (en) * 1994-11-22 1996-05-30 Monolithic System Technology, Inc. Method and structure for utilizing a dram array as second level cache memory
US5568443A (en) * 1995-09-08 1996-10-22 Smithills Multimedia Systems, Inc. Combination dual-port random access memory and multiple first-in-first-out (FIFO) buffer memories
US5615355A (en) * 1992-10-22 1997-03-25 Ampex Corporation Method and apparatus for buffering a user application from the timing requirements of a DRAM
KR970011888B1 (en) * 1993-05-28 1997-07-18 인터내셔널 비지네스 머신즈 코포레이션 Bus-to-bus bridge for optimising data transfers between a system bus and a peripheral bus
EP0828217A1 (en) * 1996-09-09 1998-03-11 Kabushiki Kaisha Toshiba Cache flush apparatus and computer system having the same
KR19990075990A (en) * 1998-03-26 1999-10-15 김영환 Data processing systems
KR20010019050A (en) * 1999-08-24 2001-03-15 서평원 Read/Write Cancelable and Variable Depth First In First Out Communication System
KR20010054137A (en) * 1999-12-03 2001-07-02 윤종용 Bus control method capable of improving system efficiency
KR20010062770A (en) * 1999-12-27 2001-07-07 모리시타 요이찌 Data transfer apparatus
JP2001216110A (en) * 2000-02-02 2001-08-10 Canon Inc Method for controlling cache, printing controller using the method, character processor, and its method
CN1474568A (en) * 2002-08-06 2004-02-11 华为技术有限公司 Direct internal storage access system and method of multiple path data
CN1512373A (en) * 2002-12-26 2004-07-14 华为技术有限公司 Method for multiple CPU communication
JP2006331134A (en) * 2005-05-26 2006-12-07 Matsushita Electric Ind Co Ltd Reproduction device
JP2006338194A (en) * 2005-05-31 2006-12-14 Kyocera Mita Corp Data processing system, data processing program, and data processing method
KR20070056864A (en) * 2005-11-30 2007-06-04 삼성전자주식회사 Method and apparatus for reconfigurable tx/rx fifo using in a wide-band stereo codec interface
CN1983230A (en) * 2005-12-14 2007-06-20 联发科技股份有限公司 String peripheral interface device
CN101034384A (en) * 2007-04-26 2007-09-12 北京中星微电子有限公司 DMA controller and transmit method capable of simultaneously carrying out read-write operation
JP2007249667A (en) * 2006-03-16 2007-09-27 Sony Corp Data transfer device, and data transfer system
KR100787220B1 (en) * 2006-09-08 2007-12-21 삼성전자주식회사 Electronic apparatus with device possible to both read and write simultaneously and method thereof
KR20080066463A (en) * 2007-01-12 2008-07-16 엠텍비젼 주식회사 Multimedia storage device and control method of the same
CN101446932A (en) * 2008-12-24 2009-06-03 北京中星微电子有限公司 Method and device for transmitting audio data
JP2009157549A (en) * 2007-12-26 2009-07-16 Yokogawa Electric Corp Sdram refresh control device
CN101702147A (en) * 2009-11-17 2010-05-05 华为技术有限公司 Data transmission method and high speed data transmission interface device
CN102097122A (en) * 2009-12-10 2011-06-15 上海华虹集成电路有限责任公司 NAND flash controller circuit of multi-channel shared data cache region
CN102103490A (en) * 2010-12-17 2011-06-22 曙光信息产业股份有限公司 Method for improving memory efficiency by using stream processing
CN103064805A (en) * 2012-12-25 2013-04-24 深圳先进技术研究院 Serial Peripheral Interface (SPI) controller and communication method
CN104050121A (en) * 2014-06-13 2014-09-17 四川亚美动力技术有限公司 Double-receiving double-emitting programmable ARINC 429 communication interface chip
CN104506379A (en) * 2014-12-12 2015-04-08 北京锐安科技有限公司 Method and system for capturing network data
KR20150039142A (en) * 2015-02-16 2015-04-09 주식회사 이노와이어리스 Serial peripheral interface with control logic for system performance improvement, and method therefor
CN104750433A (en) * 2015-03-26 2015-07-01 浪潮集团有限公司 Cache design method based on SCST
GB201510552D0 (en) * 2015-06-16 2015-07-29 Nordic Semiconductor Asa Data processing
CN104866438A (en) * 2014-02-20 2015-08-26 联想(北京)有限公司 Storage device, storage device control method and electronic equipment
CN205038640U (en) * 2015-09-25 2016-02-17 河南思维自动化设备股份有限公司 Solve SPI bus communication delayed SPI equipment
CN105393236A (en) * 2014-05-16 2016-03-09 华为技术有限公司 Fast data read/write method and apparatus
CN106528454A (en) * 2016-11-04 2017-03-22 中国人民解放军国防科学技术大学 Memory system cache mechanism based on flash memory
CN106874224A (en) * 2017-02-17 2017-06-20 杭州朔天科技有限公司 The multi-thread SPI Flash controllers of automatic transporting and adaptation device
CN106873725A (en) * 2015-12-11 2017-06-20 广达电脑股份有限公司 Component carrying device, change-over panel and the method for refreshing memory cache
CN107018087A (en) * 2016-01-28 2017-08-04 长城汽车股份有限公司 Data communications method and system
CN107704407A (en) * 2017-11-02 2018-02-16 郑州云海信息技术有限公司 A kind of system and method for being used for data processing between SPI and UART
CN107967227A (en) * 2017-12-22 2018-04-27 苏州国芯科技有限公司 A kind of communication means and SPI hosts, SPI slaves based on SPI
CN108427894A (en) * 2018-03-27 2018-08-21 中国农业银行股份有限公司 A kind of data communications method and device
CN108932207A (en) * 2017-05-23 2018-12-04 珠海全志科技股份有限公司 SDIO-WIFI data transmission method and system with buffer area
CN109344111A (en) * 2018-10-15 2019-02-15 北京电子工程总体研究所 A kind of data transmission system and method for the SOC based on double-core ARM
CN109597769A (en) * 2018-12-04 2019-04-09 郑州云海信息技术有限公司 A kind of data cached write-back method, system, device and readable storage medium storing program for executing
CN110765058A (en) * 2019-09-12 2020-02-07 深圳震有科技股份有限公司 Method, system, equipment and medium for realizing SPI slave function by GPIO
CN111124997A (en) * 2019-12-25 2020-05-08 海光信息技术有限公司 Data sending method, data receiving method, data sending device, data receiving device, processor chip and server
CN111143264A (en) * 2019-12-30 2020-05-12 山东方寸微电子科技有限公司 APB bridge for realizing synchronous mode, APB bridge for realizing asynchronous mode and control method thereof
CN111739569A (en) * 2020-06-19 2020-10-02 西安微电子技术研究所 SDRAM (synchronous dynamic random access memory) control system and control method for reading and writing simultaneously
CN111782578A (en) * 2020-05-29 2020-10-16 西安电子科技大学 Cache control method, system, storage medium, computer equipment and application
CN111782400A (en) * 2020-07-09 2020-10-16 中车株洲电力机车有限公司 Rail transit vehicle display system and CPU load balancing optimization method thereof
CN112131156A (en) * 2020-09-03 2020-12-25 山东云海国创云计算装备产业创新中心有限公司 Data transmission method, system, electronic equipment and storage medium
CN112199071A (en) * 2020-10-26 2021-01-08 中国兵器工业集团第二一四研究所苏州研发中心 Address-controllable asynchronous buffer and asynchronous buffering method
CN112328523A (en) * 2020-10-28 2021-02-05 深圳市宏旺微电子有限公司 Method, device and system for transmitting double-rate signal
CN112612740A (en) * 2020-12-21 2021-04-06 中国科学院微电子研究所 Serial data transparent transmission system based on SPI bus protocol
WO2021068567A1 (en) * 2019-10-12 2021-04-15 平安科技(深圳)有限公司 Blockchain block distribution method, apparatus, computer device and storage medium

Family Cites Families (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7076610B2 (en) * 2000-11-22 2006-07-11 Integrated Device Technology, Inc. FIFO memory devices having multi-port cache memory arrays therein that support hidden EDC latency and bus matching and methods of operating same
US6715000B2 (en) * 2001-03-16 2004-03-30 Texas Instruments Incorporated Method and device for providing high data rate for a serial peripheral interface
JP4721650B2 (en) * 2004-03-25 2011-07-13 株式会社日立製作所 Solid polymer fuel cell power generation system and household distributed power supply system
US7266661B2 (en) * 2004-05-27 2007-09-04 Silverbrook Research Pty Ltd Method of storing bit-pattern in plural devices
US20060132518A1 (en) * 2004-05-27 2006-06-22 Silverbrook Research Pty Ltd Printhead module having interleaved shift registers
CN100423081C (en) * 2004-12-03 2008-10-01 深圳迈瑞生物医疗电子股份有限公司 Hardware acceleration display horizontal line section device and method
JP4813843B2 (en) * 2005-08-04 2011-11-09 株式会社日立製作所 Storage device, disk cache control method, and disk cache capacity allocation method
US7533106B2 (en) * 2005-09-09 2009-05-12 Quickfilter Technologies, Inc. Data structures and circuit for multi-channel data transfers using a serial peripheral interface
US7606952B2 (en) * 2006-11-06 2009-10-20 Elite Semiconductor Memory Technology, Inc. Method for operating serial flash memory
JP2008287600A (en) * 2007-05-18 2008-11-27 Seiko Epson Corp Host device, information processor, electronic equipment, program and read control method
EP2570931A1 (en) * 2011-09-14 2013-03-20 VEGA Grieshaber KG Method for asynchronous-serial data transfer over a synchronous-serial interface
KR20180010951A (en) * 2016-07-22 2018-01-31 삼성전자주식회사 Method of achieving low write latency in a data starage system
CN109725840B (en) * 2017-10-30 2022-04-05 伊姆西Ip控股有限责任公司 Throttling writes with asynchronous flushing

Patent Citations (58)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4700330A (en) * 1985-10-30 1987-10-13 Digital Equipment Corporation Memory for a digital data processing system including circuit for controlling refresh operations during power-up and power-down conditions
US4958277A (en) * 1987-07-24 1990-09-18 Motorola, Inc. Queued serial peripheral interface for use in a data processing system
US5615355A (en) * 1992-10-22 1997-03-25 Ampex Corporation Method and apparatus for buffering a user application from the timing requirements of a DRAM
KR970011888B1 (en) * 1993-05-28 1997-07-18 인터내셔널 비지네스 머신즈 코포레이션 Bus-to-bus bridge for optimising data transfers between a system bus and a peripheral bus
EP0665502A1 (en) * 1994-01-27 1995-08-02 Sun Microsystems, Inc. Asynchronous serial control circuit
WO1996016371A1 (en) * 1994-11-22 1996-05-30 Monolithic System Technology, Inc. Method and structure for utilizing a dram array as second level cache memory
US5568443A (en) * 1995-09-08 1996-10-22 Smithills Multimedia Systems, Inc. Combination dual-port random access memory and multiple first-in-first-out (FIFO) buffer memories
EP0828217A1 (en) * 1996-09-09 1998-03-11 Kabushiki Kaisha Toshiba Cache flush apparatus and computer system having the same
KR19990075990A (en) * 1998-03-26 1999-10-15 김영환 Data processing systems
KR20010019050A (en) * 1999-08-24 2001-03-15 서평원 Read/Write Cancelable and Variable Depth First In First Out Communication System
KR20010054137A (en) * 1999-12-03 2001-07-02 윤종용 Bus control method capable of improving system efficiency
KR20010062770A (en) * 1999-12-27 2001-07-07 모리시타 요이찌 Data transfer apparatus
JP2001216110A (en) * 2000-02-02 2001-08-10 Canon Inc Method for controlling cache, printing controller using the method, character processor, and its method
CN1474568A (en) * 2002-08-06 2004-02-11 华为技术有限公司 Direct internal storage access system and method of multiple path data
CN1512373A (en) * 2002-12-26 2004-07-14 华为技术有限公司 Method for multiple CPU communication
JP2006331134A (en) * 2005-05-26 2006-12-07 Matsushita Electric Ind Co Ltd Reproduction device
JP2006338194A (en) * 2005-05-31 2006-12-14 Kyocera Mita Corp Data processing system, data processing program, and data processing method
KR20070056864A (en) * 2005-11-30 2007-06-04 삼성전자주식회사 Method and apparatus for reconfigurable tx/rx fifo using in a wide-band stereo codec interface
CN1983230A (en) * 2005-12-14 2007-06-20 联发科技股份有限公司 String peripheral interface device
JP2007249667A (en) * 2006-03-16 2007-09-27 Sony Corp Data transfer device, and data transfer system
KR100787220B1 (en) * 2006-09-08 2007-12-21 삼성전자주식회사 Electronic apparatus with device possible to both read and write simultaneously and method thereof
KR20080066463A (en) * 2007-01-12 2008-07-16 엠텍비젼 주식회사 Multimedia storage device and control method of the same
CN101034384A (en) * 2007-04-26 2007-09-12 北京中星微电子有限公司 DMA controller and transmit method capable of simultaneously carrying out read-write operation
JP2009157549A (en) * 2007-12-26 2009-07-16 Yokogawa Electric Corp Sdram refresh control device
CN101446932A (en) * 2008-12-24 2009-06-03 北京中星微电子有限公司 Method and device for transmitting audio data
CN101702147A (en) * 2009-11-17 2010-05-05 华为技术有限公司 Data transmission method and high speed data transmission interface device
CN102097122A (en) * 2009-12-10 2011-06-15 上海华虹集成电路有限责任公司 NAND flash controller circuit of multi-channel shared data cache region
CN102103490A (en) * 2010-12-17 2011-06-22 曙光信息产业股份有限公司 Method for improving memory efficiency by using stream processing
CN103064805A (en) * 2012-12-25 2013-04-24 深圳先进技术研究院 Serial Peripheral Interface (SPI) controller and communication method
CN104866438A (en) * 2014-02-20 2015-08-26 联想(北京)有限公司 Storage device, storage device control method and electronic equipment
CN105393236A (en) * 2014-05-16 2016-03-09 华为技术有限公司 Fast data read/write method and apparatus
CN104050121A (en) * 2014-06-13 2014-09-17 四川亚美动力技术有限公司 Double-receiving double-emitting programmable ARINC 429 communication interface chip
CN104506379A (en) * 2014-12-12 2015-04-08 北京锐安科技有限公司 Method and system for capturing network data
KR20150039142A (en) * 2015-02-16 2015-04-09 주식회사 이노와이어리스 Serial peripheral interface with control logic for system performance improvement, and method therefor
CN104750433A (en) * 2015-03-26 2015-07-01 浪潮集团有限公司 Cache design method based on SCST
GB201510552D0 (en) * 2015-06-16 2015-07-29 Nordic Semiconductor Asa Data processing
CN205038640U (en) * 2015-09-25 2016-02-17 河南思维自动化设备股份有限公司 Solve SPI bus communication delayed SPI equipment
CN106873725A (en) * 2015-12-11 2017-06-20 广达电脑股份有限公司 Component carrying device, change-over panel and the method for refreshing memory cache
CN107018087A (en) * 2016-01-28 2017-08-04 长城汽车股份有限公司 Data communications method and system
CN106528454A (en) * 2016-11-04 2017-03-22 中国人民解放军国防科学技术大学 Memory system cache mechanism based on flash memory
CN106874224A (en) * 2017-02-17 2017-06-20 杭州朔天科技有限公司 The multi-thread SPI Flash controllers of automatic transporting and adaptation device
CN108932207A (en) * 2017-05-23 2018-12-04 珠海全志科技股份有限公司 SDIO-WIFI data transmission method and system with buffer area
CN107704407A (en) * 2017-11-02 2018-02-16 郑州云海信息技术有限公司 A kind of system and method for being used for data processing between SPI and UART
CN107967227A (en) * 2017-12-22 2018-04-27 苏州国芯科技有限公司 A kind of communication means and SPI hosts, SPI slaves based on SPI
CN108427894A (en) * 2018-03-27 2018-08-21 中国农业银行股份有限公司 A kind of data communications method and device
CN109344111A (en) * 2018-10-15 2019-02-15 北京电子工程总体研究所 A kind of data transmission system and method for the SOC based on double-core ARM
CN109597769A (en) * 2018-12-04 2019-04-09 郑州云海信息技术有限公司 A kind of data cached write-back method, system, device and readable storage medium storing program for executing
CN110765058A (en) * 2019-09-12 2020-02-07 深圳震有科技股份有限公司 Method, system, equipment and medium for realizing SPI slave function by GPIO
WO2021068567A1 (en) * 2019-10-12 2021-04-15 平安科技(深圳)有限公司 Blockchain block distribution method, apparatus, computer device and storage medium
CN111124997A (en) * 2019-12-25 2020-05-08 海光信息技术有限公司 Data sending method, data receiving method, data sending device, data receiving device, processor chip and server
CN111143264A (en) * 2019-12-30 2020-05-12 山东方寸微电子科技有限公司 APB bridge for realizing synchronous mode, APB bridge for realizing asynchronous mode and control method thereof
CN111782578A (en) * 2020-05-29 2020-10-16 西安电子科技大学 Cache control method, system, storage medium, computer equipment and application
CN111739569A (en) * 2020-06-19 2020-10-02 西安微电子技术研究所 SDRAM (synchronous dynamic random access memory) control system and control method for reading and writing simultaneously
CN111782400A (en) * 2020-07-09 2020-10-16 中车株洲电力机车有限公司 Rail transit vehicle display system and CPU load balancing optimization method thereof
CN112131156A (en) * 2020-09-03 2020-12-25 山东云海国创云计算装备产业创新中心有限公司 Data transmission method, system, electronic equipment and storage medium
CN112199071A (en) * 2020-10-26 2021-01-08 中国兵器工业集团第二一四研究所苏州研发中心 Address-controllable asynchronous buffer and asynchronous buffering method
CN112328523A (en) * 2020-10-28 2021-02-05 深圳市宏旺微电子有限公司 Method, device and system for transmitting double-rate signal
CN112612740A (en) * 2020-12-21 2021-04-06 中国科学院微电子研究所 Serial data transparent transmission system based on SPI bus protocol

Non-Patent Citations (10)

* Cited by examiner, † Cited by third party
Title
CH378主机方式USB存储设备写入速度提升方法研究;李爱佳;崔建峰;邓泽平;刘慧丰;;电子器件(第02期);全文 *
Xilinx MIG IP核的研究及大容量数据缓冲区的实现;王红兵;强景;周珍龙;;电子产品世界(第08期);全文 *
一种新的环形缓冲区设计与实现方法;杨凯乔;;电脑知识与技术(第09期);全文 *
主机与存储器之间的缓存专利技术分析;吴海旋;;河南科技(第11期);全文 *
基于CH378嵌入式存储***设计;邓星星;王锋;焦国太;赵河明;;计算机测量与控制(第02期);全文 *
基于DDR3 SDRAM的大容量异步FIFO缓存***的设计与实现;孙冬雪;王竹刚;;电子设计工程(第09期);全文 *
基于DDR3 SDRAM的高速大容量数据缓存设计;马其琪;鲍爱达;;计算机测量与控制(第09期);全文 *
基于SDRAM大容量缓存FIFO控制器的设计与实现;李丽斯;杨立杰;殷晔;安佰岳;刘康丽;;计算机测量与控制(第08期);全文 *
基于闪存阵列的缓存容量确定方法;张娟娟;蒲南江;;电子测试(第08期);全文 *
缓存技术在管理信息***中的应用;王丽平, 张钢;河北建筑科技学院学报(第01期);全文 *

Also Published As

Publication number Publication date
CN113590520A (en) 2021-11-02

Similar Documents

Publication Publication Date Title
US4016541A (en) Memory unit for connection to central processor unit and interconnecting bus
US3940743A (en) Interconnecting unit for independently operable data processing systems
US7543114B2 (en) System and controller with reduced bus utilization time
CN112802518B (en) Data writing method, system-on-chip and computer readable storage medium
CN101398793A (en) Memory control device and semiconductor processing apparatus
CN101944075B (en) Bus system and method and device for reading and writing low-speed bus device
CN113590520B (en) Control method for automatically writing data in SPI system and SPI system
US9015272B2 (en) Microcomputer
KR100476895B1 (en) Interface device having variable data transfer mode and operating method thereof
CN113760792A (en) AXI4 bus control circuit for image access based on FPGA and data transmission method thereof
CN116776781B (en) Register parameter management method, system, equipment and storage medium
US20150177816A1 (en) Semiconductor integrated circuit apparatus
US6671752B1 (en) Method and apparatus for bus optimization in a PLB system
JP2001282704A (en) Device, method and system for processing data
CN114996184B (en) Compatible implementation SPI or I 2 Interface module of slave C and data transmission method
US20080320178A1 (en) DMA transfer apparatus
CN113419985A (en) Control method for SPI system to automatically read data and SPI system
JP4346506B2 (en) First-in first-out memory and storage medium control device using the same
CN102591820B (en) IDMA (interleave division multiple access) bus bridge device
JP3206585B2 (en) Bus control device, master device, slave device, and bus control method
CN101261610B (en) Method and apparatus for multi-main apparatus non-violating access slave apparatus
US20050144331A1 (en) On-chip serialized peripheral bus system and operating method thereof
WO2024017337A1 (en) Fifo storage control circuit and method, chip, and electronic device
CN114641763B (en) Protocol converter module system and method for using the same
CN114896183B (en) ZYNQ-based serial port data transmission method

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
GR01 Patent grant
GR01 Patent grant