A programming test device for programmable chip

By designing a programming test device that integrates CPU, SPI, power conversion protection and function switching modules, the problems of troublesome operation, high cost and low efficiency in the microcontroller programming method are solved, and fast, accurate and batch program writing is achieved, which is suitable for mass production programming.

CN110032518BActive Publication Date: 2025-03-14QI AUTOMOTIVE CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN201910309052.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-04-17
Publication Date
2025-03-14
Estimated Expiration
2039-04-17

AI Technical Summary

Technical Problem

The existing microcontroller programming methods have problems such as troublesome operation, high cost, low efficiency and high complexity, making it difficult to achieve fast, accurate, batch program writing.

Method used

A programming test device for programmable chips is designed, including CPU module, SPI module, power conversion protection module, function switching module and LED indicator module, which communicates directly with the target chip through the SPI interface to achieve rapid programming and testing.

Benefits of technology

The device simplifies the operation process, reduces costs, significantly improves programming speed and efficiency, can support batch programming tests of multiple chips, and is suitable for mass production programming.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN110032518B_ABST
    Figure CN110032518B_ABST
Patent Text Reader

Abstract

The present invention proposes a programming and testing device for a chip, comprising a CPU module, an SPI module, a power conversion protection module, a function switching module, an LED indication module, a USB transmission module, and a keyboard control module, and two or more SPI interfaces to realize batch burning of multiple chips. The programming and testing device for a programmable chip provided by the present invention does not need to repeatedly plug and unplug the chip, simplifies the steps of manual operation, and does not need to use a computer. It completely replaces the original burner, and can automatically perform programming and testing programs when connected to a power supply. It does not need to use a serial port or a parallel port to simulate SPI communication, but directly uses an SPI interface to program the chip, and the speed can reach up to 20Mbps. At the same time, it can support up to 17 chips to perform programming tests at the same time, greatly improving programming efficiency, and is suitable for batch production testing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of single-chip computer development, and in particular to a programming test device for a programmable chip. Background Art

[0002] At present, in the field of single-chip microcomputer development, the following methods are generally used: one is the program burner method, and the other is the serial port / parallel port SPI simulation programming method.

[0003] The program burner method requires the use of a separate burner. When the source program needs to be modified, the microcontroller chip needs to be unplugged from the target board, and then the updated target code needs to be re-solidified into the microcontroller chip. In this process, the chip often needs to be repeatedly plugged and unplugged, which is cumbersome to operate and affects the life of the chip. In addition, program burners are generally expensive and have high production costs.

[0004] The serial / parallel SPI simulation programming method generally uses the serial or parallel port to simulate the SPI timing to program the chip. This technology no longer requires the use of a programmer, but has poor error correction capabilities. Once an error such as data misalignment or buffer error occurs, the computer needs to be restarted; the efficiency is low, and the burning speed is only about 1.6kbps. It takes about 15 seconds to burn a 2K program, which seriously affects the progress of batch burning.

[0005] The original programming implementation method is to use the host computer to send a signal agreed upon by the chip to put the chip into the programming state. If there is no agreed signal, the chip enters the normal operating state for testing; thus, a restart is required when switching between the programming state and the normal operating test state, and the two states need to be switched multiple times during programming, which is inefficient and complex. How to quickly, accurately, and batch write programs into the microcontroller in the design and development stage and the mass production stage is an important technical problem faced by technicians in this field. Summary of the invention

[0006] In view of the above shortcomings of the prior art, an object of the present invention is to provide a batch programming test device which overcomes the above shortcomings, has high speed, low cost, strong stability, and can perform complex programming test verification.

[0007] The present invention provides a programming test device for a programmable chip, comprising the following modules:

[0008] CPU module, used to control the entire device to perform logical operations and program downloads, and to read, test, analyze and verify operating parameters;

[0009] SPI module, used to establish communication between the CPU module and the target chip, determine the current chip status, program the chip and connect the programmed chip to enter the test phase;

[0010] The power conversion protection module is used to provide power supply. When the chip programming and running states are switched, the chip and CPU module are protected by power supply. By detecting the current and voltage of the chip and CPU module, it is determined whether there is a short circuit and overcurrent, or whether there is overvoltage or undervoltage. When the detection value is greater than the preset value, the power connection of the target board is disconnected and an error is indicated;

[0011] Function switching module, which switches between command operation mode and normal operation mode by controlling power switching, including two different working modes for research stage and mass production stage;

[0012] The LED indicator module prompts the status during programming preparation, programming process and testing process.

[0013] As a further improvement of the present invention, the CPU module adopts a 32-bit high-performance ARM Cortex-M4 processor STM32F407VGT6 single-chip microcomputer.

[0014] As another improvement of the present invention, the function switching module includes a 3-bit analog switch, namely, analog switch S1, analog switch S2, and analog switch S3. In the research stage, the analog switch is used to control the state of the chip. When the analog switch S1 is closed, the power conversion protection circuit 12V connected in series with S1 supplies the chip to enter the programming state, thereby setting various parameters inside the chip, and reading the normal operating parameter calibration value for CRC verification. When the analog switch S2 is closed, the power conversion circuit 5V connected in series with the analog switch S2 supplies the chip to the normal operating state, automatically calculates the verification deviation, and indicates that the burning failed if an error occurs. In the mass production stage, the power switching is controlled by a script program, thereby automatically calibrating the programmable chip at the zero point, reading and judging data in the normal mode, and displaying an LED indication.

[0015] As a further improvement of the present invention, two or more SPI interfaces are also included to realize batch programming of multiple chips.

[0016] As a further improvement of the power switching circuit of the present invention, the power switching circuit includes two different power supply modes: 5V and 12V.

[0017] As a further improvement of the power switching circuit of the present invention, it also includes a liquid crystal display screen and a keyboard control module for displaying the status during programming preparation, programming process and testing process.

[0018] Beneficial effects of the present invention

[0019] Compared with the prior art, the present invention has the following beneficial effects:

[0020] 1. Simple operation. This device completely replaces the original burner and adds a function switching module. It does not require manual connection operations, burning, switching power, CRC verification and other operations. It automatically burns and verifies after connecting the power supply, completely liberating manual work and suitable for mass production programming.

[0021] 2. Low cost, no need to use a burner, completely independent of computers and manual operation.

[0022] 3. Fast speed. Normal operation requires using the serial port or parallel port to simulate SPI communication to perform logical judgment and enter the programming mode. This device completely uses the SPI interface to program the chip. Compared with the original programming speed of 1.6kbps, the speed can reach up to 20Mbps, which greatly improves the programming efficiency.

[0023] 4. The protection mechanism is perfect, which can provide perfect protection against overvoltage, undervoltage, overcurrent, burning errors, automatic verification, automatic verification of written data, etc. It does not require manual operation, reduces unnecessary errors, and has high stability. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 It is a module schematic diagram of the programming test device of the programmable chip of the present invention,

[0025] Figure 2 The present invention is a flowchart of the programming test device for a programmable chip. DETAILED DESCRIPTION

[0026] Below, the present invention is further described in conjunction with the accompanying drawings and specific implementation methods. The content is sufficient to enable any technical personnel in the field to understand the technical content of the present invention and implement it accordingly. According to the claims, description and drawings disclosed in the present invention, the technical personnel in the field can easily understand the relevant objectives and advantages of the present invention.

[0027] Figure 1 It is a module schematic diagram of the programming test device of the programmable chip of the present invention, which includes a CPU module, an SPI module, a function switching module, a power conversion protection module, an LED indication module, a liquid crystal display module, a keyboard control module, a USB transmission module and a test chip to be burned, etc.

[0028] The CPU module is implemented with the STM32F407VGT6 microcontroller. The STM32F407VGT6 is a 32-bit high-performance ARMCortex-M4 processor with a maximum clock of 168MHz. It can actually be overclocked a little bit. It supports FPU, i.e. floating-point operations and DSP instructions, 144 pins and 114 I / O ports, and a memory capacity of 1024K FLASH flash memory and 192K SRAM access memory. It has a low-power mode and up to 17 communication interfaces, of which the three-way SPI rate can reach the fastest 20Mpbs.

[0029] The function switching module includes a 3-bit analog switch, which uses the input and output pins of the CPU to control three NPN transistors to achieve the function switching. The NPN transistor uses NXP's 2N3904, and the collector and emitter are connected by controlling the base to achieve the switch control function. In the mass production process, the function switching module controls the power switching through the script program, and can realize the switching between the command operation mode and the normal operation mode without manually switching the switch. The script program is used to automatically calibrate the zero point of the programmable angle sensor, read and judge the data in the normal mode, and display the LED indication, and supports secondary programming.

[0030] The power conversion protection circuit includes two different power supply modes, 5V and 12V. Different voltages are used for power supply, and the chip enters different modes. The CPU is used to control the on and off of the transistor to achieve the switching voltage, and then the timing control of SCK and SDO is used to control the mode of the chip. The programmable angle sensor chip involved in the present invention has two working modes, namely the command operation mode and the normal operation mode. The working voltage of the command operation mode is 12V, and the working voltage of the normal operation mode is 5V. By controlling the power switching, this angle sensor enters the corresponding working mode. When S1 is closed, 12V is supplied to the programmable chip for zero position calibration in the command operation mode; when S2 is closed, 5V is supplied to the programmable chip for real-time reading of angle data in the normal operation mode.

[0031] The liquid crystal display module adopts a universal LCD display screen, the keyboard control module adopts a universal 24-key keyboard, and the USB transmission module adopts the universal serial bus interface in the prior art. The above-mentioned technologies all belong to the existing general technologies, and technicians in this field can choose to use them according to their needs.

[0032] The program target code and programming rules to be burned and tested are downloaded from a general computer to the device through a USB interface. Therefore, when the target chip to be burned and tested is burned, there is no need to operate the computer, and all programming and testing work can be completed directly on the device.

[0033] During normal mass production, in order to ensure that the chip can work normally, the chip needs to be burned and tested.

[0034] like Figure 2 As shown in the figure, in the normal state of the device, 5V and 12V power supplies are required to control different operation modes; after the device is powered on, insert the test chip to be burned, and the device will enter the verification stage to scan the value of the RAM inside the chip and determine whether the chip can operate normally. If it is normal, the chip will be connected; if the read value is incorrect or the connection fails, the chip will be automatically judged as abnormal, indicating an error and the red LED will be always on;

[0035] If the normal operation mode is entered, the green LED will be always on, and the chip will be initialized to copy the EEPROM data to the RAM. This process requires 45μs to wait until the data is completely written to the RAM. Then the RAM data is read to determine whether the data is reasonable. If the data is reasonable, the green indicator light will flash and the power supply will be switched to 12V input. If the data is abnormal, an error message will be displayed and the red LED will flash.

[0036] After normal, it enters the specific command mode through different voltages and the timing control of SCK and SDO, starts to enter the programming mode, writes the calibration value into the chip, and automatically performs CRC check, compares it with the CRC value automatically calculated inside the chip, and confirms that the programming is correct; if an error occurs, it indicates an error and the red and green LEDs flash alternately;

[0037] After the above programming is completed, the chip enters the test mode through different voltages and the timing control of SCK and SDA, and the calibrated zero point is compared with the normal value. If it is within the error range, the automatic programming test is completed; if there is an abnormality, the zero point offset value needs to be automatically calculated and reprogrammed.

[0038] The programming and testing device for programmable chips provided by the present invention does not need to repeatedly plug and unplug the chip, simplifies the steps of manual operation, and does not need to use a computer. It completely replaces the original burner and can automatically perform programming and testing programs when connected to a power supply. In addition, it is no longer necessary to use a serial port or parallel port to simulate SPI communication to enter the programming mode, but directly use the SPI interface to program the chip, with a maximum speed of 20Mbps, which is 12,500 times the original programming speed. At the same time, it can support multiple chips to perform programming tests at the same time, greatly improving programming efficiency, and is suitable for batch production testing.

[0039] The above-mentioned embodiments are only preferred embodiments of the present invention and cannot be used to limit the scope of protection of the present invention. Any non-substantial changes and substitutions made by technicians in this field on the basis of the present invention shall fall within the scope of protection required by the present invention.

Claims

1. A programming test device for a programmable chip, characterized in that: Includes the following modules: CPU module, used to control the entire device to perform logical operations and program downloads, and to read, test, analyze and verify operating parameters; SPI module, used to establish communication between the CPU module and the target chip, determine the current chip status, program the chip and connect the programmed chip to enter the test phase; The power conversion protection module is used to provide power supply. When the chip programming and running states are switched, the chip and CPU module are protected by power supply. By detecting the current and voltage of the chip and CPU module, it is determined whether there is a short circuit and overcurrent, or whether there is overvoltage or undervoltage. When the detection value is greater than the preset value, the power connection of the target board is disconnected and an error is indicated; The function switching module switches between the command operation mode and the normal operation mode by controlling the power switching, including two different working modes in the research stage and the mass production stage; the function switching module includes a 3-bit analog switch, namely, analog switch S1, analog switch S2, and analog switch S3. In the research stage, the analog switch is used to control the state of the chip. When the analog switch S1 is closed, the power conversion protection circuit 12V connected in series with S1 supplies the chip to enter the programming state, realizes the setting of various parameters inside the chip, and reads the normal operation parameter calibration value for CRC verification. When the analog switch S2 is closed, the power conversion circuit 5V connected in series with the analog switch S2 supplies the chip to the normal operation state, automatically calculates the verification deviation, and indicates that the burning fails if an error occurs; in the mass production stage, the power switching is controlled by a script program, so as to automatically perform zero point calibration, data reading and judgment in the normal mode, and LED indication display on the programmable chip; The LED indicator module is used to indicate the status during programming preparation, programming process and testing process.

2. The programming test device according to claim 1, characterized in that: The CPU module adopts a 32-bit high-performance ARMCortex-M4 processor STM32F407VGT6 single-chip microcomputer.

3. The programming test device according to claim 1, characterized in that: It also includes two or more SPI interfaces for batch programming of multiple chips.

4. The programming test device according to any one of claims 1 to 3, characterized in that: The power switching circuit includes two different power supply modes: 5V and 12V.

5. The programming test device according to any one of claims 1 to 3, characterized in that: It also includes a liquid crystal display screen and a keyboard control module for displaying the status during programming preparation, programming process and testing process.

Citation Information

Patent Citations

  • Programming test device of programmable chip

    CN209708118U