Micro control chip unit burning and detecting device, system and method
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-10
- Publication Date
- 2026-08-11
AI Technical Summary
[0003]本发明提供了一种微控制芯片单元烧录与检测装置、系统及方法,解决了微控制芯片单元烧录检验需要贴片、工作效率较低的问题
[0053]本发明的上述方案实现了微控制芯片单元的免贴片烧录与一体化检验,通过设置多种封装规格的芯片安装座,无需贴片焊接即可完成电气连接,省去焊接与拆焊工序,避免焊接过程对芯片和电路板造成损伤,降低物料与人工成本。通过集成调试接口与收发接口,在同一装置上完成固件烧录与运行状态检验,无需多台设备配合。支持多种封装微控制芯片单元的兼容测试,通过接口并联设计实现共享接口,降低治具开发与库存成本。配备带过压保护的总线电源与双复位控制单元,提升装置运行稳定性与操作便捷性。整体缩短了微控制芯片单元来料检验周期,提高了生产效率,适配多品种、小批量的柔性生产需求。
Smart Images

Figure CN122546005A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of digital integrated circuit testing technology, and in particular to a microcontroller chip cell programming and testing device, system and method. Background Technology
[0002] In the manufacturing of microcontroller chips and the development of electronic products, incoming material inspection and firmware programming are crucial steps to ensure chip quality and functional integrity. Currently, the mainstream method for incoming material inspection and programming of microcontroller chips typically involves surface mounting the chip to be tested onto a dedicated test motherboard or product motherboard, followed by programming and functional verification via an onboard debugging interface. This method relies on a complete surface mount production process, including solder paste printing, surface mount technology (SMT), and reflow soldering. Furthermore, for microcontroller chips with different package types (such as TSSOP20 and LQFP48), the test motherboard requires different printed circuit board (PCB) layouts, making it difficult to share test resources. In actual mass production, incoming chips may have defects such as pin short circuits, missing internal programs, or functional abnormalities. If these defects are only discovered after direct mounting to the motherboard, it not only wastes materials on the motherboard and other mounted components but also increases rework processes and labor costs, severely impacting production efficiency. Summary of the Invention
[0003] This invention provides a microcontroller chip unit programming and testing device, system and method, which solves the problems of microcontroller chip unit programming and testing requiring surface mount technology and low work efficiency.
[0004] To solve the above-mentioned technical problems, the technical solution of the present invention is as follows:
[0005] This invention provides a microcontroller chip unit programming and testing device, comprising:
[0006] Printed circuit boards;
[0007] Multiple chip mounting bases of different package sizes are disposed on the printed circuit board and electrically connected to the printed circuit board. The chip mounting bases are used to carry the microcontroller chip unit to be tested according to the corresponding package size. The microcontroller chip unit to be tested is electrically connected to the printed circuit board through the corresponding chip mounting base.
[0008] A debugging interface, wherein the first connection end of the debugging interface is electrically connected to each of the chip mounting sockets, and the second connection end of the debugging interface is electrically connected to an external programming device;
[0009] The transceiver interface has a first connection terminal electrically connected to each of the chip mounting sockets, and a second connection terminal electrically connected to a host computer.
[0010] The first reset signal sent by the external programming device is received through the second connection terminal of the debugging interface and sent to the microcontroller chip unit under test. The microcontroller chip unit under test clears the original data in the microcontroller chip unit under test according to the first reset signal.
[0011] The debugging interface receives firmware data sent by an external programming device and sends it to the microcontroller chip unit under test for firmware data writing.
[0012] The debugging interface receives a second reset signal sent by an external programming device and sends it to the microcontroller chip unit under test, causing the microcontroller chip unit under test to run the firmware data and generate running status data according to the second reset signal; the running status data is sent to the transceiver interface and then sent to the host computer through the second connection end of the transceiver interface for running status analysis of the microcontroller chip unit under test.
[0013] Optionally, the chip mounting base includes:
[0014] A first mounting base and a second mounting base electrically connected to the printed circuit board;
[0015] The contact terminals of the first mounting base are electrically connected to the pins of the first microcontroller chip unit to be tested;
[0016] The contact terminals of the second mounting base are electrically connected to the pins of the second microcontroller chip unit to be tested.
[0017] Optionally, the first connection end of the debugging interface includes:
[0018] First data pin and first reset pin;
[0019] The first data pin is electrically connected to the debugging pins of the first mounting base and the second mounting base, respectively, and is used to receive firmware data sent by an external programming device;
[0020] The first reset pin is electrically connected to the second reset pin of the first mounting base and the third reset pin of the second mounting base, respectively, and is used to receive the first reset signal or the second reset signal sent by the external programming device.
[0021] Optionally, the transceiver interface includes:
[0022] Serial port conversion circuit;
[0023] The first connection terminal of the serial port conversion circuit is electrically connected to the host computer and is used to send the operating status data to the host computer or receive the control data sent by the host computer.
[0024] The second connection terminal of the serial port conversion circuit is electrically connected to the first mounting base and the second mounting base respectively, and is used to receive the operating status data or send the control data.
[0025] Optionally, the second connection terminal of the serial port conversion circuit includes:
[0026] First serial receiver and first serial transmitter;
[0027] The first serial transmitting end of the serial port conversion circuit is electrically connected to the second serial receiving end of the first mounting base through a first resistor, and is electrically connected to the third serial receiving end of the second mounting base through a second resistor, for sending the control data to the first mounting base and the second mounting base.
[0028] The first serial receiving end of the serial port conversion circuit is electrically connected to the second serial transmitting end of the first mounting base through a third resistor, and is electrically connected to the third serial transmitting end of the second mounting base through a fourth resistor, for receiving the operating status data sent by the first mounting base and the second mounting base.
[0029] Optionally, the microcontroller chip unit programming and testing device further includes:
[0030] A bus power supply electrically connected to the chip mounting base, the debug interface, and the transceiver interface, respectively, the bus power supply comprising:
[0031] Power conversion unit and overvoltage protection unit;
[0032] The input terminal of the overvoltage protection unit is connected to an external power source to receive electrical energy sent by the external power source.
[0033] The output terminal of the overvoltage protection unit is connected to the input terminal of the power conversion unit; the power conversion unit converts the voltage of the input electrical energy into a preset operating voltage and outputs it to the chip mounting base, debugging interface and transceiver interface.
[0034] Optionally, the microcontroller chip unit programming and testing device further includes:
[0035] A reset control unit electrically connected to the second reset pin and the third reset pin respectively, the reset control unit comprising:
[0036] First reset switch and second reset switch;
[0037] The first terminal of the first reset switch is grounded, and the second terminal of the first reset switch is electrically connected to the second reset pin and the third reset pin respectively, for sending a first reset signal or a second reset signal to the second reset pin and the third reset pin;
[0038] The first terminal of the second reset switch is grounded, and the second terminal of the second reset switch is electrically connected to the enable terminal of the bus power supply, which is used to pull down the enable terminal level to turn off the power output when triggered.
[0039] Optionally, the microcontroller chip unit programming and testing device further includes:
[0040] A power indicator circuit, comprising a light-emitting diode and a current-limiting resistor, wherein the anode of the light-emitting diode is electrically connected to the output terminal of the bus power supply, and the cathode of the light-emitting diode is grounded through the current-limiting resistor.
[0041] This invention also provides a microcontroller chip unit programming and testing system, comprising:
[0042] A microcontroller chip unit programming and testing device, wherein the microcontroller chip unit programming and testing device is the aforementioned microcontroller chip unit programming and testing device;
[0043] An external programming device electrically connected to the microcontroller chip unit programming and testing device is used to send a first reset signal, a second reset signal, or firmware data to the microcontroller chip unit programming and testing device.
[0044] The host computer, which is electrically connected to the microcontroller chip unit programming and testing device, is used to receive the operating status data sent by the microcontroller chip unit programming and testing device.
[0045] This invention also provides a method for programming and testing microcontroller chip units, applied to the aforementioned microcontroller chip unit programming and testing device, the method comprising:
[0046] The first reset signal sent by the external programming device is received through the second connection terminal of the debugging interface and sent to the microcontroller chip unit to be tested;
[0047] The microcontroller chip unit to be tested clears the original data in the microcontroller chip unit to be tested according to the first reset signal;
[0048] The debugging interface receives firmware data sent by an external programming device and sends it to the microcontroller chip unit under test for writing.
[0049] The debugging interface receives a second reset signal sent by an external programming device and sends it to the microcontroller chip unit under test.
[0050] The microcontroller chip unit to be tested runs the firmware data and generates running status data according to the second reset signal;
[0051] The running status data is sent to the transceiver interface and then sent to the host computer through the second connection end of the transceiver interface.
[0052] The technical solution of the present invention has at least the following effects:
[0053] The above-described solution of this invention achieves surface-mount-free programming and integrated inspection of microcontroller chip units. By setting up chip mounting bases of various package specifications, electrical connections can be completed without surface-mount soldering, eliminating soldering and desoldering processes, avoiding damage to chips and circuit boards during the soldering process, and reducing material and labor costs. Through integrated debugging and transceiver interfaces, firmware programming and operational status inspection can be completed on the same device, eliminating the need for multiple devices. It supports compatibility testing of microcontroller chip units in various packages, and achieves shared interfaces through parallel interface design, reducing fixture development and inventory costs. Equipped with a bus power supply with overvoltage protection and a dual reset control unit, it improves the stability and ease of operation of the device. Overall, it shortens the incoming inspection cycle of microcontroller chip units, improves production efficiency, and adapts to the flexible production needs of multi-variety, small-batch production. Attached Figure Description
[0054] Figure 1 This is a schematic diagram of the microcontroller chip unit programming and detection system provided in an embodiment of the present invention;
[0055] Figure 2 This is a schematic diagram of the circuit structure of the first mounting base provided in an embodiment of the present invention;
[0056] Figure 3 This is a schematic diagram of the circuit structure of the second mounting base provided in an embodiment of the present invention;
[0057] Figure 4 This is a schematic diagram of the debugging interface circuit structure provided in an embodiment of the present invention;
[0058] Figure 5 This is a schematic diagram of the transceiver interface circuit structure provided in an embodiment of the present invention;
[0059] Figure 6 This is a schematic diagram of the overvoltage protection unit and universal serial bus socket structure provided in the embodiments of the present invention;
[0060] Figure 7 This is a schematic diagram of the power conversion unit circuit structure provided in an embodiment of the present invention;
[0061] Figure 8 This is a schematic diagram of the first reset switch circuit structure provided in an embodiment of the present invention;
[0062] Figure 9 This is a schematic diagram of the second reset switch circuit structure provided in an embodiment of the present invention;
[0063] Figure 10 This is a schematic diagram of the power indicator circuit structure provided in an embodiment of the present invention;
[0064] Figure 11 This is a flowchart of the microcontroller chip unit programming and testing method provided in the embodiments of the present invention. Detailed Implementation
[0065] Exemplary embodiments of the invention will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this invention will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
[0066] like Figure 1 As shown, an embodiment of the present invention provides a microcontroller chip unit programming and testing device, comprising:
[0067] Printed circuit boards;
[0068] Multiple chip mounting bases of different package sizes are disposed on the printed circuit board and electrically connected to the printed circuit board. The chip mounting bases are used to carry the microcontroller chip unit to be tested according to the corresponding package size. The microcontroller chip unit to be tested is electrically connected to the printed circuit board through the corresponding chip mounting base.
[0069] A debugging interface, wherein the first connection end of the debugging interface is electrically connected to each of the chip mounting sockets, and the second connection end of the debugging interface is electrically connected to an external programming device;
[0070] The transceiver interface has a first connection terminal electrically connected to each of the chip mounting sockets, and a second connection terminal electrically connected to a host computer.
[0071] The first reset signal sent by the external programming device is received through the second connection terminal of the debugging interface and sent to the microcontroller chip unit under test. The microcontroller chip unit under test clears the original data in the microcontroller chip unit under test according to the first reset signal.
[0072] The debugging interface receives firmware data sent by an external programming device and sends it to the microcontroller chip unit under test for firmware data writing.
[0073] The debugging interface receives a second reset signal sent by an external programming device and sends it to the microcontroller chip unit under test, causing the microcontroller chip unit under test to run the firmware data and generate running status data according to the second reset signal; the running status data is sent to the transceiver interface and then sent to the host computer through the second connection end of the transceiver interface for running status analysis of the microcontroller chip unit under test.
[0074] In this embodiment, multiple chip mounting sockets with different package sizes are used to achieve electrical connection by closely contacting the pins of the microcontroller chip unit under test. The first connection terminal of the debugging interface is electrically connected in parallel to multiple chip mounting sockets with different package sizes; the second connection terminal of the debugging interface, i.e., its pin header interface, is used to connect an external programming device. The second connection terminal of the transceiver interface is electrically connected to the host computer to realize bidirectional conversion between USB protocol and serial port protocol.
[0075] In use, first place the microcontroller unit under test into the chip mounting socket of the corresponding package specification according to the pin markings, and press down the flip cover to lock the automatic clamping structure, ensuring reliable conduction between all pins and contact terminals. Connect the external programming device to the second connection terminal of the debugging interface via a ribbon cable, and connect the host computer to the second connection terminal of the transceiver interface via a USB cable. The external programming device first sends a first reset signal through the reset pin of the debugging interface. This signal is transmitted to the reset pin of the microcontroller unit under test via the common reset signal line MCU_RST, and the microcontroller unit under test clears the original data in its internal memory accordingly. Subsequently, the external programming device sends firmware data through the debugging interface, and the microcontroller unit under test receives the firmware data and writes it into its internal program memory. After writing is complete, the external programming device sends a second reset signal through the reset pin again. The microcontroller unit under test runs the newly written firmware program from the starting address according to the second reset signal, generating running status data. The operating status data is output through the serial port transmit pin of the microcontroller chip unit under test, and transmitted to the serial receiving end of the serial port conversion circuit through the serial port pin of the chip mounting base. The serial port conversion circuit converts the serial port protocol data into USB protocol data, and then sends it to the host computer through the second connection end of the transceiver interface. The host computer displays the operating log information.
[0076] The technical solution described in this embodiment achieves direct, surface-mount-free programming and testing of microcontroller chip units with various package specifications by setting up multiple chip mounting sockets with different package specifications and using a parallel electrical connection. This eliminates the need for designing a separate test board for each chip, reducing testing costs. During use, the device receives reset signals and firmware data from an external programming device through a debugging interface, sequentially completing data clearing, program writing, and reset operation. The entire process requires no manual intervention, simplifying the operation process. After programming, the microcontroller chip unit under test automatically runs the firmware program. The generated operating status data is converted to USB protocol via a serial port conversion circuit in the transceiver interface and sent to the host computer, enabling real-time display and online monitoring of the operating log. The entire device integrates power input, program programming, serial port printing, and reset control, offering convenient operation and reliable communication, effectively improving the efficiency of incoming material inspection and firmware programming.
[0077] like Figure 2 and Figure 3 As shown, in an optional embodiment of the present invention, the chip mounting base includes:
[0078] A first mounting base and a second mounting base electrically connected to the printed circuit board;
[0079] The contact terminals of the first mounting base are electrically connected to the pins of the first microcontroller chip unit to be tested;
[0080] The contact terminals of the second mounting base are electrically connected to the pins of the second microcontroller chip unit to be tested.
[0081] In this embodiment, the first mounting base is a TSSOP20 package chip mount, with triangular or dotted positioning marks for the positioning pins on its upper surface. Twenty elastic metal contact terminals are arranged on both sides of the base, with the spacing between the contact terminals matching the pin spacing of the TSSOP20 package. The second mounting base is an LQFP48 package chip mount, with 12 elastic metal contact terminals on each of its four sides, totaling 48. A positioning mark for the positioning pins is located at one corner of the base. Both the first and second mounting bases employ a flip-top automatic clamping structure, which includes a base and a flip-top cover. An elastic pressure pad is located on the inner side of the cover. When the cover is closed, the elastic pressure pad presses downwards against the surface of the microcontroller chip unit to be tested, causing its pins to tightly contact the corresponding contact terminals and generate elastic deformation, forming a low-resistance electrical path. Both the first and second mounting bases have soldering pins at the tail of the contact terminals for soldering to the corresponding signal network on the circuit board. Debugging-related pins are connected in parallel, while serial port-related pins are led out through optional resistors.
[0082] In use, the operator first identifies the package type of the microcontroller chip unit to be tested. If it is a TSSOP20 package, the first mounting bracket is selected; if it is an LQFP48 package, the second mounting bracket is selected. Observe the positioning markings on the positioning pins of the mounting bracket, and simultaneously observe the dot or notch markings on the chip surface. Align the chip's positioning pins with the positioning pins of the mounting bracket, and place the chip into the recessed area of the bracket, ensuring that all pins are aligned with their corresponding contact terminals. Then, press down the flip-top cover to lock it. At this point, the elastic pads apply even pressure, creating a stable elastic contact between the chip pins and the contact terminals. To remove the chip, simply flip the cover to unlock it; the chip will automatically pop out or can be easily removed. Throughout the process, no soldering or additional fixing tools are required, achieving rapid loading and reliable electrical connection of the microcontroller chip unit under test.
[0083] like Figure 4 As shown, in an optional embodiment of the present invention, the first connection end of the debugging interface includes:
[0084] First data pin and first reset pin;
[0085] The first data pin is electrically connected to the debugging pins of the first mounting base and the second mounting base, respectively, and is used to receive firmware data sent by an external programming device;
[0086] The first reset pin is electrically connected to the second reset pin of the first mounting base and the third reset pin of the second mounting base, respectively, and is used to receive the first reset signal or the second reset signal sent by the external programming device.
[0087] In this embodiment, the debugging interface is a CON4-2.54 pin header interface. Its first connection terminal includes a first data pin and a first reset pin MCU_RST3. Specifically, the first data pin includes a serial debug data pin SWDIO3 and a serial debug clock pin SWCLK3. The SWDIO3 pin of the first data pin is electrically connected in parallel to the debug data pin SWDIO1 of the first mounting bracket and the debug data pin SWDIO2 of the second mounting bracket via circuit board traces. The SWCLK3 pin is electrically connected in parallel to the debug clock pins SWCLK1 of the first mounting bracket and SWCLK2 of the second mounting bracket. The first reset pin MCU_RST3 is electrically connected in parallel to the second reset pin MCU_RST1 of the first mounting bracket and the third reset pin MCU_RST2 of the second mounting bracket via a common reset signal line MCU_RST. This common reset signal line MCU_RST is also connected to the output terminal of the bus power supply through a pull-up resistor R5 to ensure that the reset pin remains at a high level when not triggered. The second connection end of the debugging interface is a pin header plug, which is used to connect the standard IDC cable of the external programming device, thereby establishing a physical path for all debugging signals between the external programming device and the device.
[0088] During use, the operator connects the external programming device (such as ST-Link, J-Link, or DAP-Link) to the second connection terminal of the debug interface via an IDC cable, ensuring that the positioning pins of the cable are aligned with the marked positions on the interface. After the external programming device is powered on, its internal driver first attempts to establish a communication connection with the microcontroller unit under test (MCU) through the SWDIO3 and SWCLK3 pins. At the start of the programming process, the external programming device actively pulls the common reset signal line MCU_RST low through the first reset pin MCU_RST3, generating a first reset signal. This signal is simultaneously transmitted to the second reset pin MCU_RST1 of the first mounting base and the third reset pin MCU_RST2 of the second mounting base. However, since only one chip mounting base contains the MCU under test, only that chip responds to the reset operation, clearing its original program or data. Subsequently, the external programming device sends firmware data through the SWDIO3 and SWCLK3 pins, and the MCU under test receives the data through its debug pin and writes it into its internal flash memory. After the writing is complete, the external programming device sends a second reset signal again through the first reset pin MCU_RST3, causing the microcontroller unit under test to exit the reset state and start executing the newly written firmware from the program start address. Throughout the process, because the first data pin and the first reset pin are connected in parallel, the signal lines of the two chip mounting sockets are always connected, but only the socket where the chip is actually placed generates a valid electrical response. The other socket, which is not in use, does not move because its chip pins are floating, thus achieving compatible control of a single programming interface for dual chip sockets.
[0089] like Figure 5 As shown, in an optional embodiment of the present invention, the transceiver interface includes:
[0090] Serial port conversion circuit;
[0091] The first connection terminal of the serial port conversion circuit is electrically connected to the host computer and is used to send the operating status data to the host computer or receive the control data sent by the host computer.
[0092] The second connection terminal of the serial port conversion circuit is electrically connected to the first mounting base and the second mounting base respectively, and is used to receive the operating status data or send the control data.
[0093] The second connection terminal of the serial port conversion circuit includes:
[0094] First serial receiver and first serial transmitter;
[0095] The first serial transmitting end of the serial port conversion circuit is electrically connected to the second serial receiving end of the first mounting base through a first resistor, and is electrically connected to the third serial receiving end of the second mounting base through a second resistor, for sending the control data to the first mounting base and the second mounting base.
[0096] The first serial receiving end of the serial port conversion circuit is electrically connected to the second serial transmitting end of the first mounting base through a third resistor, and is electrically connected to the third serial transmitting end of the second mounting base through a fourth resistor, for receiving the operating status data sent by the first mounting base and the second mounting base.
[0097] In this embodiment, the transceiver interface includes a serial port conversion circuit. This serial port conversion circuit uses a USB-to-serial chip, specifically the PL2303GS. The first connection terminal of the serial port conversion circuit is a USB differential data pin, used to form a physical connection and protocol interaction with the host computer's USB interface. The second connection terminal of the serial port conversion circuit includes a first serial transmitter (TXD-TC) and a first serial receiver (RXD-RC), responsible for outputting the converted serial data and receiving serial data from the chip mounting base, respectively. The first serial transmitter (TXD-TC) is simultaneously connected to the first terminal of the first resistor R1 and the first terminal of the second resistor R2. The second terminal of the first resistor R1 is connected to the second serial receiver (RXD1) of the first mounting base, and the second terminal of the second resistor R2 is connected to the third serial receiver (RXD2) of the second mounting base. The first serial receiver (RXD-RC) is simultaneously connected to the first terminal of the third resistor R3 and the first terminal of the fourth resistor R4. The second terminal of the third resistor R3 is connected to the second serial transmitter (TXD1) of the first mounting base, and the second terminal of the fourth resistor R4 is connected to the third serial transmitter (TXD2) of the second mounting base.
[0098] During use, the operator determines which chip mounting socket's serial communication function to enable based on the package type of the microcontroller chip unit under test. If the chip under test is a TSSOP20 package and placed in the first mounting socket, the first serial transmitting terminal TXD-TC of the serial port conversion circuit is only connected to the second serial receiving terminal RXD1 of the first mounting socket, and the first serial receiving terminal RXD-RC is only connected to the second serial transmitting terminal TXD1 of the first mounting socket, forming a complete serial transceiver loop. After connecting the host computer to the first connection terminal of the serial port conversion circuit via a USB cable, when the microcontroller chip unit under test runs the firmware program, it outputs running status data through the second serial transmitter TXD1. This data is transmitted to the first serial receiver RXD-RC of the serial port conversion circuit via the corresponding zero-ohm resistor. The serial port conversion circuit converts the serial protocol data into USB protocol data and sends it to the host computer. The serial port debugging software in the host computer can then display the running log. If it is necessary to send instructions or upgrade programs (i.e., control data) from the host computer to the microcontroller chip unit under test, the control data sent by the host computer is converted into serial port data by the serial port conversion circuit, output by the first serial transmitter TXD-TC, and transmitted to the serial receiver of the corresponding chip mounting base via the corresponding zero-ohm resistor, and then sent to the microcontroller chip unit under test.
[0099] like Figures 6 to 10 As shown, in an optional embodiment of the present invention, the microcontroller chip unit programming and detection device further includes:
[0100] A bus power supply electrically connected to the chip mounting base, the debug interface, and the transceiver interface, respectively, the bus power supply comprising:
[0101] Power conversion unit and overvoltage protection unit;
[0102] The input terminal of the overvoltage protection unit is connected to an external power source to receive electrical energy sent by the external power source.
[0103] The output terminal of the overvoltage protection unit is connected to the input terminal of the power conversion unit; the power conversion unit converts the voltage of the input electrical energy into a preset operating voltage and outputs it to the chip mounting base, debugging interface and transceiver interface.
[0104] A reset control unit electrically connected to the second reset pin and the third reset pin respectively, the reset control unit comprising:
[0105] First reset switch and second reset switch;
[0106] The first terminal of the first reset switch is grounded, and the second terminal of the first reset switch is electrically connected to the second reset pin and the third reset pin respectively, for sending a first reset signal or a second reset signal to the second reset pin and the third reset pin;
[0107] The first terminal of the second reset switch is grounded, and the second terminal of the second reset switch is electrically connected to the enable terminal of the bus power supply, which is used to pull down the enable terminal level to turn off the power output when triggered.
[0108] A power indicator circuit, comprising a light-emitting diode and a current-limiting resistor, wherein the anode of the light-emitting diode is electrically connected to the output terminal of the bus power supply, and the cathode of the light-emitting diode is grounded through the current-limiting resistor.
[0109] In this embodiment, such as Figure 6 and Figure 7 As shown, the bus power supply includes a power conversion unit and an overvoltage protection unit. The overvoltage protection unit uses an ST5VFD322 overvoltage protection chip, whose input is connected to the external power supply UP-VBUS. It automatically cuts off the power output to protect the downstream circuit when the input voltage exceeds the 5.5V threshold. At the same time, the enable terminal EN of the overvoltage protection chip is used to control whether it outputs. The power conversion unit uses a low dropout linear regulator. Its input is connected to the output terminal SYS_5V of the overvoltage protection unit, which converts the input 5V voltage to a preset operating voltage of 3.3V. Its output terminal MCU_3V3 is electrically connected to the power terminal of the chip mounting base, the power pin of the debugging interface, and the power pin of the transceiver interface, respectively, to provide a stable DC operating power supply for each module.
[0110] like Figure 8 and Figure 9 As shown, the reset control unit includes a first reset switch KEY1 and a second reset switch KEY2. One end of the first reset switch KEY1 is grounded, and the other end is electrically connected to the reset pin of each chip mounting base through a common reset signal line MCU_RST. This common reset signal line MCU_RST is also connected to the output terminal MCU_3V3 of the bus power supply through a pull-up resistor R5, so that the reset signal is kept high when the switch is not triggered. One end of the second reset switch KEY2 is grounded, and the other end is electrically connected to the enable terminal of the overvoltage protection chip in the bus power supply through pin FW2, which is used to pull down the enable terminal level to turn off the power output when triggered.
[0111] like Figure 10 As shown, the power indicator circuit includes a light-emitting diode D1 and a current-limiting resistor R6. The anode of the light-emitting diode D1 is electrically connected to the output terminal MCU_3V3 of the power conversion unit of the bus power supply, and the cathode of the light-emitting diode is grounded through the current-limiting resistor R6. When the power conversion unit outputs a normal 3.3V operating voltage, the light-emitting diode D1 lights up to indicate the power status.
[0112] In use, first connect a 5V DC power supply via an external power supply UP-VBUS. The overvoltage protection unit detects the input voltage; if the voltage is normal, it sends it to the power conversion unit, which outputs a 3.3V operating voltage. The LED D1 in the power indicator circuit then lights up, indicating that the device is powered on normally. Next, place the microcontroller chip unit under test into the corresponding chip mounting socket and press it firmly. When data clearing or program writing is required, the external programming device actively pulls the common reset signal line MCU_RST low through the first reset pin MCU_RST3 of the debugging interface, generating a reset signal that is sent to the microcontroller chip unit under test via the second reset pin MCU_RST1. If a manual software reset is required, the operator presses the first reset switch KEY1, which directly grounds the common reset signal line MCU_RST, similarly generating a reset signal sent to the microcontroller chip unit under test. The microcontroller chip unit under test clears its internal data or re-runs the program based on this reset signal. When the device experiences an abnormal crash or requires a complete restart, the operator presses the second reset switch KEY2. This switch pulls the enable terminal EN of the linear regulator low to ground, stopping the power conversion unit from outputting the 3.3V operating voltage, and powering off the entire device. Releasing the second reset switch KEY2 restores the enable terminal EN to a high level, the power conversion unit resumes outputting 3.3V, the device is powered on and reset, and all modules return to their initial state. Throughout the process, LED D1 continuously reflects the power status; it remains lit when the device is powered on normally and turns off when the second reset switch KEY2 is pressed, allowing the operator to visually assess the device's power supply status.
[0113] In an optional embodiment of the present invention, a universal serial bus socket can also be provided between the external power supply UP-VBUS and the overvoltage protection unit. The +5V DC power input from the external power supply UP-VBUS is output through the output terminal VBUS_5V after passing through the anti-reverse current diode D2. The data ports DM and DP of the universal serial bus socket are connected to the transceiver interface. The serial debugging data pin B8 of the universal serial bus socket is electrically connected to the debugging data pin SWDIO1 of the first mounting base and the debugging data pin SWDIO2 of the second mounting base, respectively. The serial debugging clock pin A8 of the serial bus socket is electrically connected to the debugging clock pin SWCLK1 of the first mounting base and the debugging clock pin SWCLK2 of the second mounting base, respectively.
[0114] In this embodiment, the Universal Serial Bus (USB) socket can be directly connected to an external power supply and programming signal to enable firmware data programming and testing of the microcontroller chip unit via a host computer. The +5V DC power input from the external power supply UP-VBUS passes through a voltage protection unit and is output from the VBUS_5V output terminal via an anti-reverse current diode D2. Diode D2 prevents current from flowing back into the power input terminal, thus avoiding damage to the preceding circuitry. The USB data port DM and data port DP of the USB socket are connected to the transceiver interface for data communication between the device and the external host computer. The serial debug data pin B8 of the USB socket is electrically connected to the debug data pin SWDIO1 of the first mounting base and the debug data pin SWDIO2 of the second mounting base, respectively, to achieve simultaneous distribution of debug data signals. The serial debug clock pin A8 of the USB socket is electrically connected to the debug clock pin SWCLK1 of the first mounting base and the debug clock pin SWCLK2 of the second mounting base, respectively, to achieve simultaneous distribution of debug clock signals. The first and second mounting brackets are used to mount the microcontroller chip unit to be programmed or tested, respectively. The programming and debugging operations of the microcontroller chip unit are completed through the debugging data pin and the debugging clock pin.
[0115] In use, connect the external power supply UP-VBUS to the Universal Serial Bus (USB) socket. The +5V DC power is fed through the USB socket to the overvoltage protection unit for overvoltage detection and protection, and then through the anti-backflow diode D2 before being output from the VBUS_5V terminal to power the various power modules of the device. Install the microcontroller chip unit to be programmed or tested in the first or second mounting bracket, ensuring good contact between the debugging data pin and debugging clock pin of the mounting bracket and the corresponding debugging interface of the microcontroller chip unit. Establish a communication connection between the external host computer and the transceiver interface through the DM and DP data ports of the USB socket. The programming commands and programming data issued by the host computer are processed by the transceiver interface and transmitted through the serial debugging data pin B8 of the USB socket to SWDIO1 of the first mounting bracket or SWDIO2 of the second mounting bracket. The debugging clock signal is transmitted through the serial debugging clock pin A8 to SWCLK1 of the first mounting bracket or SWCLK2 of the second mounting bracket. Under the synchronous control of the clock signal, the host computer performs a program burning operation on the microcontroller chip unit on the mounting base. After all the firmware data is written into the internal program memory of the microcontroller unit under test, the host computer sends a read command to the microcontroller unit under test through the debugging interface via an external burning device to read the firmware data already written into the internal program memory. After responding to the read command, the microcontroller unit under test sequentially transmits the data in the specified address range of its internal program memory back to the host computer through the debugging interface. The host computer compares the actual data read back with the expected data in the original firmware file byte by byte. If the two are completely consistent, the burning is considered successful; if there is a difference, the burning is considered a failure. Specifically, the host computer can use checksum comparison or cyclic redundancy check (CRUD) to verify data integrity. In the checksum comparison method, the host computer calculates the accumulated check value of the read back data and compares the check value with the check value of the original firmware file; in the CRUD method, the host computer calculates the CRUD code of the read back data and compares it with the CRUD code of the original firmware file. Both methods can effectively detect whether data errors or omissions occur during the programming process. After the comparison is completed, the host computer generates corresponding prompts based on the comparison results. If the verification passes, it displays "programming successful"; if the verification fails, it displays "programming failed" and reports the error address. At this point, the host computer completes the verification of the microcontroller unit's programming results, thus achieving the verification of the microcontroller unit's operating status.
[0116] like Figure 1 As shown, this embodiment of the invention also provides a microcontroller chip unit programming and testing system, including:
[0117] A microcontroller chip unit programming and testing device, wherein the microcontroller chip unit programming and testing device is the aforementioned microcontroller chip unit programming and testing device;
[0118] An external programming device electrically connected to the microcontroller chip unit programming and testing device is used to send a first reset signal, a second reset signal, or firmware data to the microcontroller chip unit programming and testing device.
[0119] The host computer, which is electrically connected to the microcontroller chip unit programming and testing device, is used to receive the operating status data sent by the microcontroller chip unit programming and testing device.
[0120] In this embodiment, the microcontroller unit programming and testing system comprises three main parts: a microcontroller unit programming and testing device, an external programming device, and a host computer. The microcontroller unit programming and testing device is the same as described in the preceding embodiments. Its second connection terminal of the debugging interface is electrically connected to the debugging port of the external programming device via an IDC cable, used to transmit reset signals, clock signals, and firmware data. The first connection terminal of its transceiver interface's serial port conversion circuit is electrically connected to the USB port of the host computer via a USB cable, used to realize bidirectional conversion and data transmission between serial and USB protocols. The external programming device can be a commercially available debugger supporting the SWD protocol, such as ST-Link, J-Link, or DAP-Link. It integrates a USB interface circuit and a control chip for communication with the host computer, used to respond to programming commands issued by the host computer and generate corresponding reset timing and data streams. The host computer is a computer or embedded host with programming software and serial port debugging software installed. It establishes communication links with the device and external programming device through USB interface. The link with external programming device is used to send firmware files and control commands, and the link with serial port conversion circuit in the device is used to receive operating status data and send online upgrade commands.
[0121] In use, first connect the external programming device to the device's debugging interface via an IDC cable, and connect the host computer to the first connection terminal of the serial port conversion circuit of the transceiver interface via a USB cable. Then, place the microcontroller unit under test into the chip mounting socket of the corresponding package size and press it firmly. Power on the device through the external power interface. The operator opens the programming software on the host computer, loads the firmware file to be programmed, and clicks the programming button. The external programming device sends a first reset signal to the microcontroller unit under test through the first reset pin of the debugging interface to clear the original data. Subsequently, it writes the firmware data to the internal memory of the microcontroller unit under test through the data pin and clock pin. After writing is complete, the external programming device sends a second reset signal through the reset pin, causing the microcontroller unit under test to start running the newly written firmware program. During operation, the microcontroller unit under test continuously outputs running status data through the serial port pin. This data is converted to USB protocol by the serial port conversion circuit and uploaded to the host computer. The operator can view the log information in real time in the serial port debugging software interface of the host computer to determine whether the firmware is running normally. If any abnormality is found during the inspection, the operator can recompile the firmware in the host computer and perform the flashing again through an external flashing device until the inspection is passed. Then, the chip mounting base is opened and the chip is removed, completing the entire flashing and testing process.
[0122] The microcontroller chip unit programming and testing system described in this embodiment achieves direct programming and functional testing of the microcontroller chip unit under test without surface mounting through the coordinated operation of the microcontroller chip unit programming and testing device, external programming equipment, and host computer. The system utilizes the device's debugging interface to establish a reset signal and firmware data transmission channel between the external programming equipment and the chip mounting socket. Combined with the serial port conversion circuit in the transceiver interface, it establishes a running status data feedback channel between the host computer and the chip mounting socket, forming a complete programming, testing, and log feedback chain. During use, the operator only needs to place the chip into the corresponding chip mounting socket and complete the entire process of data clearing, firmware writing, reset operation, and log viewing with a single click on the host computer. There is no need to surface mount the chip onto the motherboard, avoiding material waste and rework costs due to defective incoming materials. Simultaneously, the system's reset control unit can respond to reset signals sent by the external programming equipment through the debugging interface, and can also achieve software reset and hardware power reset through the first and second reset switches respectively. This dual-path reset mechanism effectively ensures the system's recovery capability in case of programming abnormalities. The above solution significantly improves the efficiency and reliability of incoming material inspection and firmware burning for microcontroller chip units, making it suitable for batch incoming material inspection scenarios in the electronics manufacturing industry.
[0123] like Figure 11As shown, this embodiment of the invention also provides a method for programming and testing microcontroller chip units, applied to the aforementioned microcontroller chip unit programming and testing device, the method comprising:
[0124] Step 111: Receive the first reset signal sent by the external programming device through the second connection terminal of the debugging interface, and send it to the microcontroller chip unit to be tested;
[0125] Step 112: The microcontroller chip unit to be tested clears the original data in the microcontroller chip unit to be tested according to the first reset signal;
[0126] Step 113: Receive firmware data sent by an external programming device through the debugging interface, and send it to the microcontroller chip unit under test for writing operation;
[0127] Step 114: Receive the second reset signal sent by the external programming device through the debugging interface, and send it to the microcontroller chip unit under test;
[0128] Step 115: The microcontroller chip unit under test runs the firmware data and generates running status data according to the second reset signal;
[0129] Step 116: Send the running status data to the transceiver interface, and then send it to the host computer through the second connection end of the transceiver interface.
[0130] In step 111 of this embodiment, a first reset signal sent by an external programming device is received through the second connection terminal of the debugging interface, and the first reset signal is transmitted to the second reset pin of the microcontroller chip unit under test via the first reset pin and the common reset signal line of the debugging interface. The first reset signal is a low-level pulse generated by the external programming device actively pulling down the common reset signal line. Its pulse width is set by the external programming device according to the reset timing requirements of the microcontroller chip unit under test, and is usually not less than 1 millisecond to ensure that the microcontroller chip unit under test can reliably identify the reset level.
[0131] In step 112, after the second reset pin of the microcontroller chip unit under test detects the low-level pulse of the first reset signal, its internal reset circuit triggers the global reset process, clears the program counter, restores each peripheral register to its default state, and performs a chip erase operation on the internal flash memory controller, thereby clearing the original firmware data and configuration parameters in the memory, ensuring that the firmware data written subsequently is not interfered with by residual programs.
[0132] In step 113, firmware data sent by an external programming device is received through the debugging interface. After releasing the first reset signal, the external programming device transmits the firmware data in the form of data packets to the debugging pin of the microcontroller unit under test through the first data pin and clock pin of the debugging interface, according to the serial line debugging protocol. After receiving the data packets, the flash memory controller inside the microcontroller unit under test writes the firmware data into the specified address range of the internal program memory according to the flash programming timing. After each data packet is written, a verification result is returned. If the verification fails, the data is retransmitted until all data is written.
[0133] In step 114, after all firmware data has been written, the external programming device sends a second reset signal again through the second connection terminal of the debugging interface. This second reset signal is transmitted to the second reset pin of the microcontroller chip unit under test via the same path. The second reset signal is a low-level pulse, just like the first reset signal, and its pulse width is also not less than 1 millisecond. However, after the second reset signal is triggered, the external programming device will no longer intervene in subsequent operations, and the microcontroller chip unit under test will gain complete system control.
[0134] In step 115, the microcontroller chip unit under test executes a power-on reset or system reset procedure according to the second reset signal. After the reset is completed, it automatically executes the newly written firmware program sequentially starting from the starting address of the program memory. After the firmware program runs normally, it generates running status data through its internal serial communication peripherals. The running status data includes key information such as firmware version number, system initialization status, and self-test results of each peripheral.
[0135] In step 116, the microcontroller chip unit under test sends its operating status data to the serial port transmitter of the chip mounting base through its serial port transmit pin. The data is then transmitted to the first serial receiver of the serial port conversion circuit in the transceiver interface through the corresponding resistor of the selection connection unit. The serial port conversion circuit converts the serial port protocol data into USB protocol data and sends it to the host computer through the first connection terminal of the serial port conversion circuit. The host computer receives and displays the operating status data so that the operator can judge whether the firmware is running normally.
[0136] The technical solution described in this embodiment clears the original data in the microcontroller chip unit under test through a first reset signal, writes firmware data through a debugging interface, and then uses a second reset signal to make the microcontroller chip unit under test run the firmware and generate running status data. Finally, the running status data is sent to the host computer through a transceiver interface. This realizes a complete burning and testing process from data clearing, program burning, reset and running to log feedback. The entire process does not require chip mounting to the motherboard, simplifying the operation steps of incoming material inspection and firmware burning.
[0137] The above are preferred embodiments of the present invention. It should be noted that, for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A microcontroller chip unit programming and testing device, characterized in that, include: Printed circuit boards; Multiple chip mounting bases of different package sizes are disposed on the printed circuit board and electrically connected to the printed circuit board. The chip mounting bases are used to carry the microcontroller chip unit to be tested according to the corresponding package size. The microcontroller chip unit to be tested is electrically connected to the printed circuit board through the corresponding chip mounting base. A debugging interface, wherein the first connection end of the debugging interface is electrically connected to each of the chip mounting sockets, and the second connection end of the debugging interface is electrically connected to an external programming device; The transceiver interface has a first connection terminal electrically connected to each of the chip mounting sockets, and a second connection terminal electrically connected to a host computer. The first reset signal sent by the external programming device is received through the second connection terminal of the debugging interface and sent to the microcontroller chip unit under test. The microcontroller chip unit under test clears the original data in the microcontroller chip unit under test according to the first reset signal. The debugging interface receives firmware data sent by an external programming device and sends it to the microcontroller chip unit under test for firmware data writing. The debugging interface receives a second reset signal sent by an external programming device and sends it to the microcontroller chip unit under test, causing the microcontroller chip unit under test to run the firmware data and generate running status data according to the second reset signal; the running status data is sent to the transceiver interface and then sent to the host computer through the second connection end of the transceiver interface for running status analysis of the microcontroller chip unit under test.
2. The microcontroller chip unit programming and testing device according to claim 1, characterized in that, The chip mounting base includes: A first mounting base and a second mounting base electrically connected to the printed circuit board; The contact terminals of the first mounting base are electrically connected to the pins of the first microcontroller chip unit to be tested; The contact terminals of the second mounting base are electrically connected to the pins of the second microcontroller chip unit to be tested.
3. The microcontroller chip unit programming and testing device according to claim 2, characterized in that, The first connection end of the debugging interface includes: First data pin and first reset pin; The first data pin is electrically connected to the debugging pins of the first mounting base and the second mounting base, respectively, and is used to receive firmware data sent by an external programming device; The first reset pin is electrically connected to the second reset pin of the first mounting base and the third reset pin of the second mounting base, respectively, and is used to receive the first reset signal or the second reset signal sent by the external programming device.
4. The microcontroller chip unit programming and testing device according to claim 3, characterized in that, The transceiver interface includes: Serial port conversion circuit; The first connection terminal of the serial port conversion circuit is electrically connected to the host computer and is used to send the operating status data to the host computer or receive the control data sent by the host computer. The second connection terminal of the serial port conversion circuit is electrically connected to the first mounting base and the second mounting base respectively, and is used to receive the operating status data or send the control data.
5. The microcontroller chip unit programming and testing device according to claim 4, characterized in that, The second connection terminal of the serial port conversion circuit includes: A first serial receiver and a first serial transmitter; The first serial transmitting end of the serial port conversion circuit is electrically connected to the second serial receiving end of the first mounting base through a first resistor, and is electrically connected to the third serial receiving end of the second mounting base through a second resistor, for sending the control data to the first mounting base and the second mounting base. The first serial receiving end of the serial port conversion circuit is electrically connected to the second serial transmitting end of the first mounting base through a third resistor, and is electrically connected to the third serial transmitting end of the second mounting base through a fourth resistor, for receiving the operating status data sent by the first mounting base and the second mounting base.
6. The microcontroller chip unit programming and testing device according to claim 4, characterized in that, Also includes: A bus power supply electrically connected to the chip mounting base, the debug interface, and the transceiver interface, respectively, the bus power supply comprising: Power conversion unit and overvoltage protection unit; The input terminal of the overvoltage protection unit is connected to an external power source to receive electrical energy sent by the external power source. The output terminal of the overvoltage protection unit is connected to the input terminal of the power conversion unit; the power conversion unit converts the voltage of the input electrical energy into a preset operating voltage and outputs it to the chip mounting base, debugging interface and transceiver interface.
7. The microcontroller chip unit programming and testing device according to claim 6, characterized in that, Also includes: A reset control unit electrically connected to the second reset pin and the third reset pin respectively, the reset control unit comprising: First reset switch and second reset switch; The first terminal of the first reset switch is grounded, and the second terminal of the first reset switch is electrically connected to the second reset pin and the third reset pin respectively, for sending a first reset signal or a second reset signal to the second reset pin and the third reset pin; The first terminal of the second reset switch is grounded, and the second terminal of the second reset switch is electrically connected to the enable terminal of the bus power supply, which is used to pull down the enable terminal level to turn off the power output when triggered.
8. The microcontroller chip unit programming and testing device according to claim 6, characterized in that, Also includes: A power indicator circuit includes a light-emitting diode (LED) and a current-limiting resistor. The anode of the LED is electrically connected to the output terminal of the bus power supply, and the cathode of the LED is grounded through the current-limiting resistor.
9. A microcontroller chip unit programming and testing system, characterized in that, include: A microcontroller chip unit programming and testing device, wherein the microcontroller chip unit programming and testing device is the microcontroller chip unit programming and testing device as described in any one of claims 1 to 8; An external programming device electrically connected to the microcontroller chip unit programming and testing device is used to send a first reset signal, a second reset signal, or firmware data to the microcontroller chip unit programming and testing device. The host computer, which is electrically connected to the microcontroller chip unit programming and testing device, is used to receive the operating status data sent by the microcontroller chip unit programming and testing device.
10. A method for programming and detecting microcontroller chip units, characterized in that, The method, applied to the microcontroller chip unit programming and testing apparatus as described in any one of claims 1 to 8, comprises: The first reset signal sent by the external programming device is received through the second connection terminal of the debugging interface and sent to the microcontroller chip unit to be tested; The microcontroller chip unit to be tested clears the original data in the microcontroller chip unit to be tested according to the first reset signal; The debugging interface receives firmware data sent by an external programming device and sends it to the microcontroller chip unit under test for writing. The debugging interface receives a second reset signal sent by an external programming device and sends it to the microcontroller chip unit under test. The microcontroller chip unit to be tested runs the firmware data and generates running status data according to the second reset signal; The running status data is sent to the transceiver interface and then sent to the host computer through the second connection end of the transceiver interface.