Offline batch SPI Flash burning device and system
By designing offline batch SPI Flash burning equipment and using time-sharing gating and batch writing technology between the main control chip and the burning chip array, the problem of complex and time-consuming batch writing operations of SPI Flash chips is solved, and efficient multi-processing is achieved. Chip programming and simplified operation.
Patent Information
- Application Number
- CN202420286292.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-06
- Publication Date
- 2024-10-08
- Estimated Expiration
- 2034-02-06
AI Technical Summary
In the existing technology, the batch writing operation of SPI Flash chips is complex and time-consuming, making it difficult to meet the efficient mass production needs of embedded systems.
An offline batch SPI Flash burning equipment and system is designed, including system memory, ISP circuit, TFT LCD, main control chip, independent buttons and decoder. Through the time-sharing strobe and Batch writing enables fast burning.
It realizes fast and convenient offline programming of multiple SPI Flash chips, significantly improves the programming efficiency and simplifies the operation process.
Smart Images

Figure CN221811910U_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical fields of single chip microcomputer principle and interface technology, electronic technology and the like, and in particular to an offline batch SPI Flash burning device and system. Background Art
[0002] As a basic component of embedded hardware, embedded memory is used to store programs and data running on embedded systems. From the inside to the outside, embedded memory can be divided into three levels: on-chip memory, off-chip memory, and external memory. On-chip memory and off-chip memory are generally fixedly installed in embedded systems, while external memory is usually located outside the embedded system.
[0003] The on-chip memory of embedded systems is generally very small. When the embedded system involves a large amount of data storage, it is necessary to expand the off-chip memory. Nor Flash with SPI interface is a good choice. It has large capacity, simple connection, fast read and write speed, and is widely used in text, image, voice, database and other scenarios. There are two ways to write batch data to SPI Flash memory: online and offline. Since SPI Flash chip is a massive storage compared to the on-chip memory of microcontroller, the online update method cannot write the stored data to SPI Flash chip at one time. The data to be written can only be stored in the PC first, and then the transmission channel between PC and microcontroller is built. The PC sends the data to the microcontroller in blocks, and the microcontroller writes the received data to SPI Flash in turn. The operation process is complicated and time-consuming. Another way is the offline method, that is, the data to be written is first downloaded to the offline burner, and then a group of SPI Flash chips are written in batches using the offline burner, and then the burned SPI Flash chips are installed in the mass-produced embedded system. For the mass production of embedded products, the offline method is more convenient and efficient. Summary of the invention
[0004] In view of the shortcomings of the prior art, an offline batch SPI Flash programming device and system are invented.
[0005] In order to solve the above-mentioned technical problems that the writing operation process of the microcontroller off-chip SPI Flash is complicated and time-consuming, the present invention adopts the following technical solutions:
[0006] An offline batch SPI Flash burning device and system, comprising a system memory, an ISP circuit, a TFT LCD, a main control chip, an independent button, a decoder, and a burning chip array, wherein the system memory, the ISP circuit, the TFT LCD, the independent button and the main control chip are connected, the main control chip address line is connected to the burning chip array chip selection signal via the decoder, and the burning chip array is connected to the main control chip.
[0007] Preferably, the system is divided into two states: data update and batch burning. When updating data, the PC sends the data file in blocks to the main control chip through the ISP circuit, and the main control chip writes the system memory in sectors; when batch burning, the main control chip loads data from the system memory in sequence, selects the chip and writes the data through the decoder in time-sharing, until all the data of all chips are burned.
[0008] Preferably, the main control chip is a STM32F407VET6 microcontroller, the main control chip and the TFTLCD are connected using a FSMC bus, and the TFT LCD is mounted on Bank1.Sector1 of the FSMC bus; the independent button is used to set system operating parameters and issue control instructions, and is connected to the GPIO port of the main control chip, and the port works in pull-up input mode.
[0009] Preferably, the ISP circuit uses a CH340G chip to implement the USB to serial port function, which is used to connect a PC and a main control chip, and has three functions: system power supply, program download and serial port communication.
[0010] Preferably, the system memory is used to store the data to be burned, and is a Nor Flash memory with an SPI interface, model W25Q128, connected to the SPI1 interface of the main control chip, forming a "one master and one slave" connection mode of the SPI interface, and the system memory and the main control chip adopt full-duplex, synchronous, serial communication.
[0011] Preferably, the decoder is a 4-16 decoder 74HC154, whose input terminals A0-A3 are connected to the 4-bit I / O port of the main control chip to form a 4-bit address line, and whose output terminals Y0-Y15 are connected to the chip select signal of the programming chip array, and the output signal low level selects the programming chip.
[0012] Preferably, the programming chip array is a group of programming chip bases, chips to be programmed and locking devices therebetween, and the programming chip pins are connected to the PCB substrate through the bases to facilitate circuit connection.
[0013] Preferably, the SCK, MISO, and MOSI of all SPI Flash chips installed in the burning chip array are connected in parallel to the SPI2 interface of the main control chip, and the chip select signals of the chips installed in the burning chip array are controlled by the decoder output signals Y0~Y15, forming a "one master and multiple slaves" connection mode of the SPI interface.
[0014] The above technical solution has the following beneficial effects: the device can burn multiple chips offline, and the burning speed is accelerated, so that the efficiency of chip burning is greatly improved, and the device is simple and easy to operate.
[0015] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention and implement it according to the contents of the specification, the following is a detailed description of the preferred embodiments of the present invention in conjunction with the accompanying drawings. The specific implementation of the present invention is given in detail by the following embodiments and their accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 It is a schematic diagram of the overall structure of an embodiment of the present invention.
[0017] Figure 2 TFT LCD circuit connection diagram of the embodiment of the present invention
[0018] Figure 3 This is a circuit connection diagram of a system memory according to an embodiment of the present invention.
[0019] Figure 4 This is a connection diagram of the ISP circuit according to an embodiment of the present invention.
[0020] Figure 5 It is a connection diagram of the burning circuit of an embodiment of the present invention. DETAILED DESCRIPTION
[0021] The preferred embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0022] like Figure 1 As shown, an offline batch SPI Flash burning device and system include a system memory, an ISP circuit, a TFT LCD, a main control chip, an independent button, a decoder, and a burning chip array, wherein the system memory, the ISP circuit, the TFT LCD, the independent button and the main control chip are connected, the main control chip address line is connected to the burning chip array chip select signal through the decoder, and the burning chip array is connected to the main control chip.
[0023] like Figure 2As shown, the main control chip is the powerful STM32F407VET6 microcontroller based on the ARM Cortex-M4 core. In order to facilitate users to understand the system operation status and set the operation parameters, the system is equipped with a 2.8-inch full-color TFT LCD, connected to the block 1 (Bank1) sub-area 1 (Sector1) of the FSMC (Flexible Static Memory Controller) bus of the microcontroller, FSMC_D[15:0] connects the LCD data line D[15:0], FSMC_NOE connects the LCD read signal RD, FSMC_NWE connects the LCD write signal WR, FSMC_NE1 connects the LCD chip select signal CS, and selects the address line FSMC_A16 of the FSMC bus to connect the LCD instruction / data selection pin RS. The above connection connects the LCD display memory to the FSMC bus and uses it as the memory connected to the FSMC bus. It is simple to control and has a fast reading and writing speed, which can meet the high-speed display requirements such as progress animation during system operation.
[0024] The independent buttons equipped in the system are ordinary mechanical buttons, which are used to set system operation parameters and issue control instructions. They are connected to the ordinary GPIO port of the STM32F407VET6 microcontroller, and the port works in pull-up input mode.
[0025] like Figure 3 As shown, the system memory is used to store data to be written by the offline burner. The specific model is W25Q128, which is a SPI Flash memory with a capacity of 128Mbit and is connected to the SPI1 interface of the main control chip STM32F407VET6. The CLK pin of W25Q128 is connected to the SPI1_SCK pin PB3 of the main control chip, the DI pin of W25Q128 is connected to the SPI1_MOSI pin PB5 of the main control chip, the DO pin of W25Q128 is connected to the SPI1_MISO pin PB4 of the main control chip, and the PB14 pin of the main control chip is selected to connect the chip select signal CS of W25Q128. The HOLD and WP pins of W25Q128 are connected to the power supply VDD, that is, the write protection and data retention functions are not used.
[0026] like Figure 4As shown in the figure, the ISP (In System Programming) circuit realizes the three-in-one functions of system power supply, program download and serial communication. The core of the ISP circuit is the CH340G chip, which is a USB bus adapter chip that realizes USB to serial port. The converted serial port output pin TXD pin and input pin RXD are cross-connected with the data receiving pin and data sending pin of USART1 of the main control chip. RTS and DTR are MODEM contact signal pins. RTS controls the BOOT0 pin signal through an external switch circuit, and DTR controls the RSET pin signal through an external switch circuit.
[0027] like Figure 5 As shown, the decoder selects the 4-16 decoder 74HC154, whose input terminals A0~A3 are connected to a group of I / O ports D0~D3 of the main control chip to form a 4-bit address line, and the decoder output terminals Y0~Y15 are connected to the chip select signal of the programming chip array, and the output signal low level selects the programming chip.
[0028] The SCK, MISO, and MOSI of all SPI Flash chips installed in the burning chip array are connected in parallel according to their names and are respectively connected to the SPI2_SCK pin PB13, SPI2_MISO pin PB14, and SPI2_MOSI pin PB15 of the SPI2 interface of the master chip. The chip select signal of the chip installed in the burning chip array is controlled by the decoder output signal Y0~Y15, forming a "one master and multiple slaves" connection mode of the SPI interface.
[0029] When programming SPI Flash, the main control chip sends out 4-bit binary code D0~D3, corresponding to the value n, which is sent to the decoder address input terminals A0~A3. After being decoded by 74HC154, only Y n Output low level, select the burning chip numbered n, and connect it to the SPI2 interface of the main control chip. The main control chip writes data to it under the control of the burning program, changes the binary code value, selects and writes other chips, and completes batch burning of all burning chips.
[0030] The system is divided into two states: data update and batch burning. When updating data, the PC sends the data file to the main control chip in blocks through the ISP circuit, and the main control chip writes it to the system memory in sectors. When burning in batches, the main control chip loads data from the system memory in sequence, selects the chip and writes data through the decoder in time-sharing, until all data of all chips are burned. The system can realize offline and batch burning of SPI Flash chips, with the advantages of stability, reliability, convenience and efficiency.
[0031] The above is a detailed introduction to an offline batch SPI Flash programming device and system provided by an embodiment of the present invention. For a person skilled in the art, according to the idea of the embodiment of the present invention, there may be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation of the invention, and any changes made according to the design idea of the present invention are within the protection scope of the present invention.
Claims
1. An offline batch SPI Flash burning device and system, characterized in that: It includes system memory, ISP circuit, TFT LCD, main control chip, independent buttons, decoder, and burning chip array, wherein the system memory, ISP circuit, TFT LCD, independent buttons and main control chip are connected, the main control chip address line is connected to the burning chip array chip select signal through the decoder, and the burning chip array is connected to the main control chip.
2. A kind of offline batch SPI Flash burning equipment and system according to claim 1, it is characterized in that, The system is divided into two states: data update and batch burning. During data update, the PC sends the data file in blocks to the main control chip through the ISP circuit, and the main control chip writes it into the system memory in units of sectors. During batch burning, the main control chip loads data from the system memory in sequence, selects the chip through the decoder in time-sharing, and writes data until all data on all chips are burned.
3. A kind of offline batch SPI Flash burning equipment and system according to claim 1, it is characterized in that, The main control chip uses an STM32F407VET6 microcontroller, the main control chip and the TFT LCD are connected using a FSMC bus, and the TFT LCD is mounted on Bank1.Sector1 of the FSMC bus; the independent button is used to set system operating parameters and issue control instructions, and is connected to the GPIO port of the main control chip, and the port works in a pull-up input mode.
4. A kind of offline batch SPI Flash burning equipment and system according to claim 1, it is characterized in that, The ISP circuit adopts CH340G chip to realize USB to serial port function, which is used to connect PC and main control chip, and has three functions of system power supply, program download and serial port communication.
5. A kind of offline batch SPI Flash burning equipment and system according to claim 1, it is characterized in that, The system memory is used to store the data to be burned. It is a Nor Flash memory with an SPI interface, model W25Q128, which is connected to the SPI1 interface of the main control chip to form a "one master and one slave" connection mode of the SPI interface. The system memory and the main control chip adopt full-duplex, synchronous, serial communication.
6. A kind of offline batch SPI Flash burning equipment and system according to claim 1, it is characterized in that, The decoder is a 4-16 decoder 74HC154, whose input terminals A0-A3 are connected to the 4-bit I / O ports of the main control chip to form a 4-bit address line, and whose output terminals Y0-Y15 are connected to the chip selection signal of the programming chip array, and the output signal at a low level selects the programming chip.
7. A kind of offline batch SPI Flash burning equipment and system according to claim 1, it is characterized in that, The programming chip array is a group of programming chip bases, chips to be programmed and locking devices therebetween. The programming chip pins are connected to the PCB substrate through the bases to facilitate circuit connection.
8. A kind of offline batch SPI Flash burning equipment and system according to claim 1, it is characterized in that, The SCK, MISO, and MOSI of all SPI Flash chips installed in the burning chip array are connected in parallel to the SPI2 interface of the master chip, and the chip select signals of the chips installed in the burning chip array are controlled by the decoder output signals Y0~Y15, forming a "one master and multiple slaves" connection mode of the SPI interface.
Citation Information
Cited By
Self-adaptive Flash burning system and method based on machine learning
CN120950097A
