Microcontroller test method, device and system

By using multiple peripheral circuits and debugging tools in the fixed device for microcontroller testing, the problems of low testing efficiency, poor adaptability and high cost in the prior art are solved, and efficient, flexible and economical testing results are achieved.

CN119414810AInactive Publication Date: 2025-02-11CHONGQING LANSHAN AUTOMOTIVE ELECTRONICS CO LTD
View PDF 11 Cites 0 Cited by

Patent Information

Application Number
CN202411499800.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-25
Publication Date
2025-02-11
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing microcontroller testing technologies have problems such as low testing efficiency, poor adaptability and high testing costs.

Method used

Provide a microcontroller testing method and system, using fixed devices and multiple peripheral circuits, establish a communication connection with the microcontroller through debugging tools, receive functional test commands, and connect corresponding peripheral circuits to perform functions through multiplexer. test.

Benefits of technology

Improves testing efficiency, enhances test adaptability, reduces testing costs, and achieves efficient, flexible and economical microcontroller testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119414810A_ABST
    Figure CN119414810A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of electronic device testing, and discloses a microcontroller testing method, device and system. The method comprises the steps that when a microcontroller to be tested is arranged in a fixing device and the microcontroller is powered on, whether communication connection is established between the microcontroller and a debugging tool or not is detected; when the microcontroller establishes communication connection with the debugging tool, the debugging tool sends a function test command; and according to the function test command, connecting a pin of the microcontroller to a corresponding peripheral circuit so as to perform a function test. According to the scheme, the testing efficiency can be effectively improved, the testing adaptability is enhanced, the testing cost is reduced, and an efficient, flexible and economical solution is provided for testing of the microcontroller.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of electronic device testing, and in particular to a microcontroller testing method, device and system. Background Art

[0002] In the design and manufacturing process of microcontroller units (MCUs), sample testing is crucial to ensuring product performance and quality. The related art generally uses a multi-board solution for sample testing, and each board implements partial functional testing of the MCU pins. If more functional verification is required, the more boards are required. Another method used by the related art for sample testing is to use a dedicated automatic test equipment (ATE) test machine to perform batch testing of the chip at the CP / FT (Chip Probing / Final Testing) stage.

[0003] In the process of implementing the embodiments of the present application, the inventors found that the related technology has at least the following problems: the switching of multiple board solutions leads to low test efficiency and poor adaptability; the dedicated ATE test machine has the problem of high equipment procurement and maintenance costs, which increases the test cost. Summary of the invention

[0004] One purpose of the embodiments of the present application is to provide a microcontroller testing method, device and system to solve the technical problem of how to improve testing efficiency, enhance testing adaptability and reduce testing costs.

[0005] To solve the above technical problems, a technical solution adopted in the implementation mode of the present application is: to provide a microcontroller testing method, which is applied to a microcontroller testing system, wherein the microcontroller testing system includes a fixing device, multiple peripheral circuits and a microcontroller to be tested, wherein the fixing device is used to adapt to microcontrollers of different packaging types, and the method includes: when the microcontroller to be tested is arranged in the fixing device and the microcontroller is powered on, detecting whether a communication connection is established between the microcontroller and a debugging tool; when a communication connection is established between the microcontroller and the debugging tool, receiving a functional test command sent by the debugging tool; and according to the received functional test command, connecting the pins of the microcontroller to the corresponding peripheral circuits to perform a functional test.

[0006] Optionally, the debugging tool includes a JTAG debugger and a USB debugger, and the multiple peripheral circuits include a JTAG connector, a USB interface circuit and a multiplexer; the detecting whether the microcontroller has established a communication connection with the debugging tool includes: when the JTAG connector is connected to the JTAG debugger and the USB interface circuit is connected to the USB debugger, providing a preset power supply voltage to the microcontroller through the multiplexer; receiving commands or data sent by the JTAG debugger or the USB debugger; detecting whether the microcontroller can respond to the commands or data; if it can respond to the commands or the data according to preset requirements, it is determined that the microcontroller has established a communication connection with the debugging tool, otherwise, the microcontroller has not established a communication connection with the debugging tool.

[0007] Optionally, connecting the pin of the microcontroller to the corresponding peripheral circuit for functional testing according to the received functional test command includes: determining the function that currently needs to be tested according to the received functional test command; selecting the pin to be tested to the interface of the peripheral circuit corresponding to the function through the multiplexer, wherein the pin is disconnected from the interface of the peripheral circuit corresponding to other functions except the function; receiving the functional test command again to trigger the microcontroller to execute the functional operation corresponding to the functional test command; monitoring the communication between the microcontroller and the peripheral circuit to evaluate the result of the functional test.

[0008] Optionally, the peripheral circuit includes a power chip and a multiplexer, the microcontroller test system also includes a current detection device, the current detection device is used to connect to the power chip and the microcontroller, the multiplexer is connected to the power chip, and the method also includes: when the power consumption test environment corresponding to the microcontroller is determined, the voltage is selected through the multiplexer, and the voltage is used as the power supply voltage of the microcontroller; the power supply voltage is output to the microcontroller through the power chip to make the microcontroller work; when the microcontroller is working, the current of the microcontroller is obtained through the current detection device to perform power consumption testing.

[0009] Optionally, the power consumption test environment corresponding to the microcontroller includes: determining the input power pin of the microcontroller; before performing the power consumption test, disconnecting the output end of the power chip from the input power pin of the microcontroller; determining that the current detection device is adjusted to the current test gear; determining that the positive pole of the current detection device is connected to the output end of the power chip, and the negative pole of the current detection device is connected to the input power pin of the microcontroller.

[0010] In order to solve the above technical problems, a technical solution adopted in the implementation mode of the present application is: providing a microcontroller testing device, including: a fixing device and a plurality of peripheral circuits, the fixing device is used to adapt to microcontrollers of different packaging types, and the peripheral circuit is used to connect to the microcontroller; when the microcontroller to be tested is arranged in the fixing device, the microcontroller testing device is used to perform a functional test on the microcontroller; when performing the functional test, the microcontroller is powered on, and the peripheral circuit includes a communication interface and a multiplexer, and the peripheral circuit is used to: establish a communication connection between the microcontroller and a debugging tool according to the communication interface; send the functional test command sent by the debugging tool to the microcontroller through the communication interface, so that the microcontroller determines the function that currently needs to be tested; select the pin to be tested to the interface of the peripheral circuit corresponding to the function through the multiplexer to perform a functional test, wherein the pin is disconnected from the interface of the peripheral circuit corresponding to other functions except the function.

[0011] Optionally, the peripheral circuit also includes a power chip, which is connected to the multiplexer. The microcontroller and the power chip are also respectively used to connect to a current detection device, the output end of the power chip is connected to the input end of the current detection device, and the output end of the current detection device is connected to an input power pin of the microcontroller; when the microcontroller to be tested is arranged in the fixing device, the microcontroller testing device is also used to perform a power consumption test on the microcontroller; when the power consumption test environment corresponding to the microcontroller is determined, the peripheral circuit is used to: select the voltage through the multiplexer and use the voltage as the power supply voltage of the microcontroller; output the power supply voltage to the microcontroller through the power chip to make the microcontroller work; when the microcontroller is working, the current detection device is used to detect the current of the microcontroller in real time to perform a power consumption test.

[0012] Optionally, the debugging tool includes a JTAG debugger and a USB debugger, and the communication interface includes a JTAG connector and a USB interface circuit; the JTAG connector is connected to the JTAG debugger, and the USB interface circuit is connected to the USB debugger; the peripheral circuit is used to establish a communication connection between the microcontroller and the debugging tool through the JTAG connector and the USB interface circuit.

[0013] Optionally, the power consumption test environment corresponding to the microcontroller includes: determining the input power pin of the microcontroller; before performing the power consumption test, disconnecting the output end of the power chip from the input power pin of the microcontroller; determining that the current detection device is adjusted to the current test gear; determining that the positive pole of the current detection device is connected to the output end of the power chip, and the negative pole of the current detection device is connected to the input power pin of the microcontroller.

[0014] In order to solve the above-mentioned technical problems, a technical solution adopted in the implementation mode of the present application is: to provide a microcontroller testing system, comprising: a microcontroller testing device as described above; a microcontroller to be tested; and a current detection device; when the microcontroller to be tested is arranged in the microcontroller testing device, the microcontroller testing device is used to perform a functional test on the microcontroller, and in combination with the current detection device, performs a power consumption test on the microcontroller.

[0015] The microcontroller testing method, device and system provided in the embodiments of the present application can reduce the steps and time required for testing by testing the microcontroller in a fixture, thereby improving the test efficiency. The fixture is adapted to microcontrollers of different packaging types, so that the test system has a wider adaptability, can be applied to a variety of microcontroller packages, and enhances the flexibility and adaptability of the test. By implementing partial functional testing in a fixture, the number of required single boards can be reduced, and the hardware cost and maintenance cost are reduced. Therefore, the microcontroller testing method, device and system provided in the embodiments of the present application can effectively improve the test efficiency, enhance the test adaptability and reduce the test cost, and provide an efficient, flexible and economical solution for the testing of microcontrollers. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative labor.

[0017] Figure 1 It is a structural schematic diagram of a microcontroller testing system provided in an embodiment of the present application;

[0018] Figure 2 is a schematic diagram of a microcontroller testing device provided in an embodiment of the present application;

[0019] Figure 3 Schematic diagram of an MCU multi-function test carrier provided in an embodiment of the present application;

[0020] Figure 4 It is a circuit schematic diagram of the MCU performing power consumption testing provided in an embodiment of the present application;

[0021] Figure 5 is a flow chart of a microcontroller testing method provided in an embodiment of the present application;

[0022] Figure 6 This is a flow chart of a microcontroller testing method provided in another embodiment of the present application. DETAILED DESCRIPTION

[0023] In order to make the purpose, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.

[0024] It should be noted that, if there is no conflict, the various features in the embodiments of the present application can be combined with each other, all within the scope of protection of the present application. In addition, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flow chart, in some cases, the steps shown or described can be performed in a different order than the module division in the device or the order in the flow chart.

[0025] In the design and manufacturing process of microcontrollers (MCUs), the sample test phase before mass production is a key step to ensure product performance and quality. The sample test phase can verify the accuracy of the microcontroller design, including whether the functional implementation meets the specification requirements and whether the electrical characteristics meet the design specifications. By testing the samples, design problems can be discovered and corrected early to ensure that the product has met the design requirements before mass production. Sample testing can also evaluate the performance stability and reliability of the microcontroller, including stability under different working conditions, reliability over long periods of time, etc. This helps to discover potential performance problems or life problems, and make timely improvements and optimizations. Therefore, sample testing plays a vital role in the design and manufacturing process of microcontrollers. Sample testing can ensure product performance and quality, reduce production risks, improve product reliability and stability, and lay a solid foundation for mass production of products.

[0026] With the increasing complexity and integration of MCU functions, traditional MCU testing methods have gradually become insufficient in terms of functionality and efficiency and cannot meet the current rapidly developing market needs. Traditional MCU testing devices have the following limitations: Insufficient test coverage. Traditional MCU testing methods may require multiple test devices or media to cover various functions and performance tests of the MCU. Increased development costs and cycles. In order to meet complex testing requirements, traditional MCU testing devices may require customized development or purchase of multiple test equipment, which will significantly increase development costs and cycles. Therefore, traditional MCU testing methods are difficult to cope with the challenges of current MCU functional complexity and integration.

[0027] Based on this, the embodiment of the present application provides a microcontroller test method, device and system, which realizes the functional test and power consumption test of MCU through components such as fixtures, peripheral circuits, and debugging tools, and can be extended to MCU functional performance test under different working voltages. The microcontroller test system of the present application includes components such as fixtures, peripheral circuits, and debugging tools, which can adapt to microcontrollers of different package types. Multiplexers, power supply chips and other components are used to connect the microcontroller to be tested and the peripheral circuits, and adjust the supply voltage. Send a functional test command through the debugging tool, connect the pins of the microcontroller to the corresponding peripheral circuit according to the command, and perform a functional test; evaluate the functional test results by monitoring the communication between the microcontroller and the peripheral circuit, and verify the functional performance of the MCU. Under a specific power consumption test environment, the debugging tool sends a power consumption test command, determines the voltage through the multiplexer, and performs a power consumption test; supplies power through the power supply chip and uses the current detection device to obtain the current of the microcontroller for power consumption testing. In addition, the debugging tool can send a command to require the MCU to be functionally tested at different working voltages; adjust the supply voltage to different levels, connect the test pins, perform functional tests, and monitor the communication conditions, thereby evaluating the performance of the MCU at different voltages.

[0028] The solution of the embodiment of the present application tests the MCU through a fixture, which improves the test efficiency, adaptability and reduces the test cost, and provides an efficient, flexible and economical solution for MCU testing. The integrated design of this system, the adaptation of MCUs of different packaging types and the reduction of the number of required boards help to improve test efficiency and reduce costs, which is of great significance for the production and quality control of MCUs. For chip manufacturers and system integrators, the system of the embodiment of the present application can improve the efficiency and quality of product development and reduce R&D costs.

[0029] The microcontroller testing method, device and system of the embodiments of the present application are described in detail below through specific examples.

[0030] See also Figure 1 , Figure 1 1 is a schematic diagram of a microcontroller test system provided in an embodiment of the present application. The microcontroller test system 100 comprises: a microcontroller test device and a microcontroller 30 to be tested. Figure 1 As shown, the microcontroller test device includes a fixture 10 and a peripheral circuit 20 .

[0031] The fixture 10 is used to adapt to microcontrollers of different package types, and the microcontroller 30 to be tested can be arranged in the fixture 10. The fixture 10 refers to a device or system for adapting microcontrollers of different package types and can accommodate the microcontroller to be tested. The function of this fixture 10 is to provide a stable platform during the test process so that the microcontroller can be easily connected to an external test device or circuit. In the embodiment of the present application, the external test device or circuit refers to the peripheral circuit 20. The fixture 10 is designed to accommodate and adapt to microcontrollers of various different package types, rather than being limited to microcontrollers of a specific type or package form. This flexibility can ensure that the fixture 10 has versatility and adaptability when handling various microcontrollers. For example, the size of the fixture 10 can be adjusted or adapted to microcontrollers of different package sizes, which can be achieved by a retractable support or clamp to ensure that the microcontroller can be firmly installed in an appropriate position. For example, the fixture 10 is designed to be modular, allowing users to replace or adjust specific modules to adapt to microcontrollers of different package types. For example, the fixture 10 also provides a standard interface or connection method to connect with the peripheral circuit 20, which may include a standard plug socket, connector or interface board to ensure compatibility with various test equipment. In addition, the fixture 10 supports multiple pin configurations and can support microcontroller pin layouts of different package types, so that the fixture 10 can adapt to microcontrollers with different pin configurations to ensure correct connection and stability.

[0032] The peripheral circuit 20 is a circuit for testing the functions of the MCU. The peripheral circuit 20 includes various functional modules, such as CAN (Controller Area Network), LIN (Local Interconnect Network), RS232 (serial communication interface), RS485 (serial communication interface), buttons, indicator lights, clocks, etc., which are used to test various functions and interfaces of the MCU. The main function of the peripheral circuit 20 is to simulate external devices or environmental conditions to ensure that the various functions of the MCU in actual applications can work normally. By connecting the peripheral circuit 20 to different pins on the MCU, different input and output conditions can be simulated, so as to comprehensively test and verify the functions of the MCU. The peripheral circuit 20 may include the following components and functions: CAN / LIN / RS232 / RS485 interface module: used to test the communication interface function of the MCU. Button and indicator light module: used to test the input and output functions of the MCU. Clock module: used to test the clock module function of the MCU. Analog switch chip: used to switch the connection of different functions. Transceiver chip: used to process the sending and receiving of communication signals. Debug interface: provides the interface and functions required for debugging the MCU. LED module: used to indicate the test status or results. Crystal oscillator and crystal: used to provide clock signal. Dip switch: used to set specific configuration or parameters; etc. By using these peripheral circuits 20, combined with analog switches to quickly switch the functional connection of MCU pins, efficient MCU functional testing can be achieved to ensure that the MCU functions normally under various circumstances. This design makes single board functional testing more cost-effective and efficient, while having high coverage and adaptability.

[0033] The number of peripheral circuits 20 can be multiple, and the specific number depends on the functional complexity of the MCU to be tested and the diversity of test requirements. Figure 1 As shown, in the microcontroller test system 100, multiple peripheral circuits 20 are included, and each peripheral circuit 20 is used to test different functions or interfaces, such as communication interface, digital input and output, analog input and output, timer, interrupt, etc. By combining multiple peripheral circuits 20, various functions of the MCU can be fully covered.

[0034] In this embodiment, the number of peripheral circuits 20 can be expanded or reduced as needed to meet the test requirements of different models or types of MCUs. At the same time, by using technologies such as analog switches, different peripheral circuits 20 can be flexibly switched and connected, thereby achieving an efficient and flexible functional test process.

[0035] Figure 2 Schematic diagram of a microcontroller testing device provided in an embodiment of the present application. Figure 2As shown, SCOKET-MCU indicates that a microcontroller 30 to be tested is placed in the fixture 10. Others indicate peripheral circuits 20, including: input power and protection circuit, power test circuit (pin header / test ring / terminal), BUCK circuit*1, LDO circuit*5, JTAG connector, reset circuit (button / test ring), clock circuit (crystal / SMA), USB2UART interface circuit (PHY / pin header / connector), RS232 / RS485 interface circuit (PHY / pin header), CAN / LIN interface circuit (PHY / pin header)*4, CAN / LIN / UART / SPI / I2C / PWM / FLEXIO test pin header, ADC / CMP / DAC test circuit (pin header / SMA connector / test ring), clock test circuit (pin header / SMA connector) and LED indication / button / dip switch / test ring. Figure 2 The peripheral circuits shown are only for illustration, and related peripheral circuits 20 may be increased or decreased.

[0036] In the embodiment of the present application, the microcontroller testing system 100 tests the microcontroller 30 to be tested by using a microcontroller testing device.

[0037] Among them, the microcontroller 30 to be tested can be functionally tested by the microcontroller testing device. When the microcontroller to be tested is set in the fixing device 10, the microcontroller testing device is used to perform functional tests on the microcontroller; when performing functional tests, the microcontroller is powered on, and the peripheral circuit 20 includes a communication interface and a multiplexer, and the peripheral circuit 20 is specifically used to: establish a communication connection between the microcontroller and the debugging tool according to the communication interface; send the functional test command sent by the debugging tool to the microcontroller through the communication interface, so that the microcontroller determines the function currently to be tested; select the interface of the peripheral circuit corresponding to the pin to be tested through the multiplexer to perform functional tests, wherein the pin is disconnected from the interface of the peripheral circuit corresponding to other functions except the function.

[0038] When performing the functional test of the above-mentioned microcontroller 30, first, the microcontroller 30 is ready, that is, the microcontroller 30 to be tested is placed in the fixture 10. Then, functional test preparation is performed, including powering on the microcontroller 30 and starting functional test preparation; and the communication interface in the peripheral circuit establishes a communication connection with the debugging tool to send a functional test command to the microcontroller. Among them, the debugging tool includes a JTAG debugger and a USB debugger, the communication interface includes a JTAG connector and a USB interface circuit, the JTAG connector is connected to the JTAG debugger, the USB interface circuit is connected to the USB debugger, and the peripheral circuit 20 is used to establish a communication connection between the microcontroller and the debugging tool through the JTAG connector and the USB interface circuit. Specifically, when the JTAG connector is connected to the JTAG debugger and the USB interface circuit is connected to the USB debugger, a preset power supply voltage is provided to the microcontroller through a multiplexer; commands or data sent by the JTAG debugger or the USB debugger are received; whether the microcontroller can respond to the command or data is detected; if the command or data can be responded to according to the preset requirements, it is determined that the microcontroller has established a communication connection with the debugging tool, otherwise, the microcontroller has not established a communication connection with the debugging tool. In the functional test preparation stage, it includes powering on the microcontroller, establishing a communication connection, sending commands through the JTAG debugger and the USB debugger, and detecting the response of the microcontroller to ensure that the microcontroller has established a correct communication connection with the debugging tool. In this embodiment, the microcontroller 30 is powered on and the preparations for the functional test are started, including the initialization of the peripheral circuit 20 and the configuration of the communication interface. Through the JTAG connector and the USB interface circuit, the microcontroller 30 establishes a communication connection with the debugging tool (JTAG debugger and USB debugger), the JTAG connector is connected to the JTAG debugger, and the USB interface circuit is connected to the USB debugger to ensure that the debugging tool can communicate with the microcontroller 30. A preset power supply voltage is also provided. The multiplexer in this process plays a key role in providing a preset power supply voltage for the microcontroller 30 to ensure that the microcontroller 30 can operate normally during the functional test. The JTAG debugger or USB debugger sends commands or data to the microcontroller to start the functional test or transmit test data. Finally, a response detection is performed. The peripheral circuit 20 detects whether the microcontroller 30 can respond to the received command or data. If the microcontroller 30 can respond to the command or data according to the preset requirements, it can be determined that the microcontroller 30 has established a correct communication connection with the debugging tool; if the microcontroller 30 fails to respond to the command or data correctly, it may indicate that there is a problem with the communication connection, which requires further investigation and repair.

[0039] Through the above process, it is ensured that the microcontroller 30 can correctly establish a communication connection with the debugging tool before the functional test and can respond to commands or data from the debugging tool. This helps to ensure the accuracy and reliability of the functional test, so that the test process can proceed smoothly, potential problems can be discovered and repaired.

[0040] Next, perform a functional test. Receive a functional test command sent by the debugging tool; determine the function that needs to be tested currently according to the received functional test command; select the interface of the peripheral circuit corresponding to the pin to be tested to the function through a multiplexer, wherein the pin is disconnected from the interface of the peripheral circuit corresponding to other functions except the function; receive the functional test command again to trigger the microcontroller to perform the functional operation corresponding to the functional test command; monitor the communication between the microcontroller and the peripheral circuit connected to the pin to be tested to evaluate the result of the functional test. Among them, the debugging tool sends a functional test command to the microcontroller to indicate the functional test operation that needs to be performed currently. According to the received functional test command, determine the function that needs to be tested currently, so as to set the test conditions and perform the test for the function. Through the multiplexer, connect the pin to be tested to the peripheral circuit interface of the corresponding function, and disconnect the peripheral circuit interface corresponding to other functions at the same time, to ensure that the test only involves the function that needs to be tested currently. Receive the functional test command again, trigger the microcontroller to perform the operation corresponding to the functional test command for the function, so as to verify the correctness and stability of the function. Monitor the communication between the microcontroller and the peripheral circuits connected to the pins to be tested, including signal transmission and response. By evaluating the communication and test results, the effectiveness of the functional test and the performance of the microcontroller under the tested function can be determined. Through this process, it is ensured that the required functional tests can be accurately performed during the functional test phase, and the functions of the microcontroller can be verified by monitoring the communication and evaluating the test results.

[0041] For example, a pin of a microcontroller (MCU) has multiple functions, including CAN, LIN and SPI interfaces. Now it is necessary to test the CAN interface function of the pin to ensure that the CAN communication works properly, and at the same time, it is necessary to disconnect the connection with the LIN and SPI interfaces to ensure the accuracy of the test. When performing a functional test, it includes: the debugging tool sends a functional test command to the microcontroller, indicating that the function of the CAN interface needs to be tested; after the microcontroller receives the corresponding functional test command, it determines that the function of the CAN interface needs to be tested; through the multiplexer, the pin is selected to the CAN test interface to ensure that the CAN communication works properly, and at the same time, the pin is disconnected from the LIN and SPI interfaces to avoid interfering with the CAN interface test; the functional test command of the CAN interface is received again, and the microcontroller performs the corresponding operation to verify the function and stability of the CAN communication; finally, the communication between the pin and the CAN test interface is monitored to ensure that the CAN communication works properly, and the results of the functional test are evaluated, including the accuracy of data transmission and the stability of communication.

[0042] The above embodiment provides a process for functional testing of the MCU. The process of the above embodiment can be repeated as needed to perform multi-function testing on each pin of the MCU to evaluate the function of each pin. In this way, the different functions of each pin can be verified one by one to ensure that each interface and function of the entire system is fully verified. Figure 3 As shown, Figure 3 : is a schematic diagram of the MCU multi-function test carrier provided in an embodiment of the present application, which shows the main board-level components / connectors and their connection relationships, wherein "LQFP144 / L1FP100 / LQFP64" is used to describe different types of MCU packages. A suitable MCU can be selected according to the specific package and placed on the corresponding fixture (SOCKET_MCU) for multi-function testing.

[0043] In some embodiments, the microcontroller test system 100 also includes a current detection device, and the microcontroller test device and the current detection device can be used to perform a power consumption test on the microcontroller 30 to be tested. Wherein, the peripheral circuit also includes a power chip, the power chip is connected to the above-mentioned multiplexer, and the microcontroller and the power chip are also used to connect to the current detection device respectively, and the current detection device can be specifically a multimeter. Wherein, the output end of the power chip is connected to the input end of the current detection device, and the output end of the current detection device is connected to the input power pin of the microcontroller. When the microcontroller to be tested is set in a fixing device, the microcontroller test device is also used to perform a power consumption test on the microcontroller.

[0044] Before conducting a power consumption test, first determine the power consumption test environment corresponding to the microcontroller, including: determining the input power pin of the microcontroller; before conducting a power consumption test, disconnect the output end of the power chip from the input power pin of the microcontroller; determine that the current detection device is adjusted to the current test position; determine that the positive pole of the current detection device is connected to the output end of the power chip, and the negative pole of the current detection device is connected to the input power pin of the microcontroller. Among them, confirm that the input power pin used by the microcontroller can be divided into digital power supply and analog power supply. Before conducting a power consumption test, it is necessary to disconnect the connection between the output end of the power chip and the input power pin of the microcontroller, which can be achieved by removing the shorting jumper cap to ensure that only the external current detection device provides power. It is also necessary to ensure that the external current detection device (such as a multimeter) has been correctly adjusted to the current test position to accurately measure the current value. Finally, connect the positive pole of the current detection device to the output end of the power chip, and connect the negative pole of the current detection device to the input power pin of the microcontroller, so that the power consumption of the microcontroller can be monitored in real time through the current detection device. Through these steps, a correct test environment can be established for the power consumption test of the microcontroller to ensure accurate measurement of the power consumption of the microcontroller.

[0045] When the power consumption test environment corresponding to the microcontroller is determined, the peripheral circuit is then used to: select the voltage through the multiplexer and use the voltage as the power supply voltage of the microcontroller; output the power supply voltage to the microcontroller through the power chip to make the microcontroller work; when the microcontroller is working, the current detection device is used to detect the current of the microcontroller in real time to perform power consumption testing. Among them, the selection path of the multiplexer can be controlled by a physical button or switch to directly provide the power supply voltage to the microcontroller. The physical button or switch can also be regarded as a part of the peripheral circuit. In this embodiment, the design of the peripheral circuit can effectively support the power consumption test of the microcontroller, and provides flexibility and adjustability to meet the power supply requirements of the microcontroller under different test requirements and working conditions.

[0046] In some embodiments, the power consumption test command sent by the debugging tool can also be sent to the microcontroller through the communication interface, so that the microcontroller determines the voltage corresponding to the power consumption test command; then the voltage is selected through the multiplexer, and the voltage is used as the power supply voltage of the microcontroller; finally, the power supply voltage is output to the microcontroller through the power chip, so that the current detection device obtains the current of the microcontroller to perform power consumption test. Wherein, the appropriate voltage value is selected by the multiplexer to provide power to the MCU. The logic here is that the debugging tool communicates with the MCU through the communication interface (JTAG connector or USB interface circuit), sends the command to the MCU, and the MCU parses the command to obtain the voltage to be tested. Then, the MCU gives the voltage to be tested to the multiplexer in the form of a command, and the multiplexer thereby selects the voltage. Through the power chip, the MCU can be powered by the voltage, and at the same time, the current detection device (multimeter) can detect the corresponding current. In some embodiments, the debugging tool can directly send a command to the multiplexer, which contains the voltage to be tested, and then the multiplexer selects the voltage, and the voltage is provided to the MCU through the power chip, and at the same time, the current detection device (multimeter) can detect the corresponding current.

[0047] Among them, Figure 4 As shown, the power chip can use multiple LDO (Low Dropout Regulator) power chips and quickly adjust the output voltage through an external multiplexer. Using multiple LDO power chips means that multiple independent voltage outputs can be achieved, and each LDO is responsible for outputting a specific voltage. The power chip can also use a BUCK (Buck Converter) converter to achieve voltage step-down and voltage regulation for devices such as microcontrollers to meet their operating voltage requirements. The external multiplexer is used to select different voltage divider resistor values ​​to determine which LDO power chip to output the voltage. By selecting different voltage divider resistor values, different output voltages can be achieved to meet the power supply requirements of different circuit components. In addition, the selection of different voltage divider resistor values ​​by the multiplexer can cause the corresponding LDO power chip to output a specific voltage. By adjusting the selection of the multiplexer, the output voltage can be quickly adjusted without directly adjusting the LDO power chip. In addition, the output path of the power chip is designed to support power consumption testing, which means that the output can be connected to the power consumption test equipment for power consumption measurement; at the same time, the output path also supports the selection of input sources, and different input power supplies can be flexibly switched to ensure stable power supply of the system. Therefore, the embodiment of the present application adopts a design of multiple LDO power chips and an external multiplexer, so that the system can flexibly and stably adjust the output voltage, while supporting power consumption testing and input source selection, providing a high degree of controllability and adaptability for the system's power management.

[0048] In some embodiments, it can be extended to MCU functional performance testing under different operating voltages, that is, evaluating the functional performance and performance characteristics of the MCU under different voltage supply conditions. This test helps to understand the performance of the MCU in terms of stability, power consumption, timing characteristics, etc. under various voltage conditions.

[0049] For example, determine the voltage range to be tested, including the voltage values ​​from the lowest to the highest, and then formulate test steps, including the process of gradually increasing or decreasing from one voltage value to the next voltage value. Next, perform a series of functional performance tests at each voltage value, including but not limited to: clock frequency test, communication interface test, ADC / DAC test, memory read and write test, peripheral function test, etc. Next, perform power consumption test at each voltage value, record the power consumption characteristics of MCU at different operating voltages, and evaluate the energy efficiency performance of MCU at different voltages through power consumption test, and optimize it. The stability of MCU at different voltages can also be tested, including stability evaluation under conditions such as long-term operation and temperature changes, so as to ensure that MCU can operate normally and have good stability under various operating voltage conditions. During the whole process, test data can be collected, sorted and analyzed to compare the functional performance of MCU at different voltages. Finally, identify potential problems or room for improvement, and make optimization suggestions. Therefore, the embodiment of the present application can comprehensively evaluate the functional performance of MCU at different operating voltages, and provide an important reference basis for system design and optimization.

[0050] The microcontroller test system provided by the embodiment of the present application tests the microcontroller in a fixture, and this integrated method can reduce the steps and time required for testing, thereby improving the test efficiency. The fixture is adapted to microcontrollers of different packaging types, so that the test system has a wider adaptability, can be applied to a variety of microcontroller packages, and enhances the flexibility and adaptability of the test. By implementing partial functional testing in a fixture, the number of required single boards can be reduced, and the hardware cost and maintenance cost are reduced. Therefore, the microcontroller test system provided by the embodiment of the present application can effectively improve test efficiency, enhance test adaptability and reduce test costs, and provides an efficient, flexible and economical solution for the testing of microcontrollers.

[0051] The microcontroller testing device provided in the embodiment of the present application also has the beneficial effects of the above-mentioned microcontroller testing system.

[0052] like Figure 5 As shown, the embodiment of the present application also provides a microcontroller testing method, which is applied to the microcontroller testing system in the above embodiment, and the method includes:

[0053] S11 . When the microcontroller to be tested is placed in the fixing device and the microcontroller is powered on, detecting whether a communication connection is established between the microcontroller and a debugging tool.

[0054] S12: When the microcontroller establishes a communication connection with the debugging tool, receive a function test command sent by the debugging tool.

[0055] S13. According to the received functional test command, connect the pins of the microcontroller to the corresponding peripheral circuits to perform a functional test.

[0056] Among them, the debugging tool includes a JTAG debugger and a USB debugger, and the multiple peripheral circuits include a JTAG connector, a USB interface circuit and a multiplexer; the detecting whether the microcontroller has established a communication connection with the debugging tool includes: when the JTAG connector is connected to the JTAG debugger and the USB interface circuit is connected to the USB debugger, providing a preset power supply voltage to the microcontroller through the multiplexer; receiving a command or data sent by the JTAG debugger or the USB debugger; detecting whether the microcontroller can respond to the command or data; if it can respond to the command or the data according to preset requirements, it is determined that the microcontroller has established a communication connection with the debugging tool, otherwise, the microcontroller has not established a communication connection with the debugging tool.

[0057] Among them, according to the received functional test command, connecting the pin of the microcontroller to the corresponding peripheral circuit to perform a functional test includes: determining the function that currently needs to be tested according to the received functional test command; selecting the pin to be tested to the interface of the peripheral circuit corresponding to the function through the multiplexer, wherein the pin is disconnected from the interface of the peripheral circuit corresponding to other functions except the function; receiving the functional test command again to trigger the microcontroller to execute the functional operation corresponding to the functional test command; monitoring the communication between the microcontroller and the peripheral circuit to evaluate the result of the functional test.

[0058] In some embodiments, the peripheral circuit includes a power chip and a multiplexer, and the microcontroller test system further includes a current detection device, the current detection device is used to connect with the power chip and the microcontroller, and the multiplexer is connected with the power chip, such as Figure 6 As shown, a microcontroller testing method is also provided. Figure 6 and Figure 5 The difference is that the method further comprises:

[0059] S14. When the power consumption test environment corresponding to the microcontroller is determined, select a voltage through the multiplexer and use the voltage as the power supply voltage of the microcontroller.

[0060] S15. Output the supply voltage to the microcontroller through the power chip to enable the microcontroller to operate.

[0061] S16. When the microcontroller is working, the current of the microcontroller is obtained through the current detection device to perform a power consumption test.

[0062] Among them, the power consumption test environment corresponding to the microcontroller includes: determining the input power pin of the microcontroller; before performing the power consumption test, disconnecting the output end of the power chip from the input power pin of the microcontroller; determining that the current detection device is adjusted to the current test gear; determining that the positive pole of the current detection device is connected to the output end of the power chip, and the negative pole of the current detection device is connected to the input power pin of the microcontroller.

[0063] It should be noted that the microcontroller testing method provided in the embodiments of the present application can be applied to the above-mentioned microcontroller testing system and microcontroller testing device, has the same inventive concept as the system and device in the above-mentioned embodiments, and can produce the same beneficial effects. The detailed details of the embodiments of the present application can refer to the above-mentioned embodiments.

[0064] The above disclosure is only the preferred embodiment of the present application, which certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.

Claims

1. A microcontroller testing method, characterized in that: Applied to a microcontroller test system, the microcontroller test system includes a fixture, a plurality of peripheral circuits and a microcontroller to be tested, the fixture is used to adapt to microcontrollers of different packaging types, and the method includes: When the microcontroller to be tested is arranged in the fixing device and the microcontroller is powered on, detecting whether a communication connection is established between the microcontroller and the debugging tool; When the microcontroller establishes a communication connection with the debugging tool, receiving a function test command sent by the debugging tool; According to the received functional test command, the pins of the microcontroller are connected to the corresponding peripheral circuits to perform a functional test.

2. The method according to claim 1, characterized in that: The debugging tool includes a JTAG debugger and a USB debugger, and the plurality of peripheral circuits include a JTAG connector, a USB interface circuit and a multiplexer; The detecting whether the microcontroller has established a communication connection with the debugging tool comprises: When the JTAG connector is connected to the JTAG debugger and the USB interface circuit is connected to the USB debugger, a preset power supply voltage is provided to the microcontroller through the multiplexer; Receiving commands or data sent by the JTAG debugger or the USB debugger; Detecting whether the microcontroller can respond to the command or data; If the command or the data can be responded to according to the preset requirement, it is determined that the microcontroller has established a communication connection with the debugging tool; otherwise, the microcontroller has not established a communication connection with the debugging tool.

3. The method according to claim 2, characterized in that The step of connecting the pin of the microcontroller to a corresponding peripheral circuit according to the received functional test command to perform a functional test comprises: Determine the function that needs to be tested currently according to the received function test command; Selecting the interface of the pin to be tested to the peripheral circuit corresponding to the function through the multiplexer, wherein the pin is disconnected from the interface of the peripheral circuit corresponding to other functions except the function; Receiving the functional test command again to trigger the microcontroller to execute the functional operation corresponding to the functional test command; The communication between the microcontroller and the peripheral circuit is monitored to evaluate the result of the functional test.

4. The method according to any one of claims 1 to 3, characterized in that: The peripheral circuit includes a power chip and a multiplexer, the microcontroller test system also includes a current detection device, the current detection device is used to connect with the power chip and the microcontroller, the multiplexer is connected with the power chip, and the method also includes: When the power consumption test environment corresponding to the microcontroller is determined, a voltage is selected through the multiplexer, and the voltage is used as a power supply voltage of the microcontroller; Outputting the supply voltage to the microcontroller through the power chip to enable the microcontroller to operate; When the microcontroller is working, the current of the microcontroller is obtained through the current detection device to perform power consumption testing.

5. The method according to claim 4, characterized in that The power consumption test environment corresponding to the microcontroller includes: Determining an input power pin of the microcontroller; Before performing the power consumption test, disconnecting the output end of the power chip from the input power pin of the microcontroller; Determine that the current detection device is adjusted to a current test position; It is determined that the positive pole of the current detection device is connected to the output end of the power chip, and the negative pole of the current detection device is connected to the input power pin of the microcontroller.

6. A microcontroller testing device, characterized in that: include: A fixture and a plurality of peripheral circuits, wherein the fixture is used to adapt to microcontrollers of different packaging types, and the peripheral circuits are used to connect to the microcontroller; When the microcontroller to be tested is arranged in the fixing device, the microcontroller testing device is used to perform a functional test on the microcontroller; When performing a functional test, the microcontroller is powered on, and the peripheral circuit includes a communication interface and a multiplexer, and the peripheral circuit is used to: Establishing a communication connection between the microcontroller and the debugging tool according to the communication interface; Sending the function test command sent by the debugging tool to the microcontroller through the communication interface, so that the microcontroller determines the function that currently needs to be tested; The pin to be tested is selected through the multiplexer to connect the interface of the peripheral circuit corresponding to the function to perform a functional test, wherein the pin is disconnected from the interface of the peripheral circuit corresponding to other functions except the function.

7. The microcontroller testing device according to claim 6, characterized in that: The peripheral circuit further includes a power chip, which is connected to the multiplexer. The microcontroller and the power chip are also respectively used to connect to a current detection device, an output end of the power chip is connected to an input end of the current detection device, and an output end of the current detection device is connected to an input power pin of the microcontroller; When the microcontroller to be tested is arranged in the fixing device, the microcontroller testing device is also used to perform a power consumption test on the microcontroller; When the power consumption test environment corresponding to the microcontroller is determined, the peripheral circuit is used to: Selecting a voltage through the multiplexer and using the voltage as a supply voltage for the microcontroller; Outputting the supply voltage to the microcontroller through the power chip to enable the microcontroller to operate; When the microcontroller is working, the current detection device is used to detect the current of the microcontroller in real time to perform power consumption testing.

8. The microcontroller testing device according to claim 6, characterized in that: The debugging tool includes a JTAG debugger and a USB debugger, and the communication interface includes a JTAG connector and a USB interface circuit; The JTAG connector is connected to the JTAG debugger, and the USB interface circuit is connected to the USB debugger; The peripheral circuit is used to establish a communication connection between the microcontroller and the debugging tool through the JTAG connector and the USB interface circuit.

9. The microcontroller testing device according to claim 7, characterized in that: The power consumption test environment corresponding to the microcontroller includes: Determining an input power pin of the microcontroller; Before performing the power consumption test, disconnecting the output end of the power chip from the input power pin of the microcontroller; Determine that the current detection device is adjusted to a current test position; It is determined that the positive pole of the current detection device is connected to the output end of the power chip, and the negative pole of the current detection device is connected to the input power pin of the microcontroller.

10. A microcontroller testing system, characterized in that: include: The microcontroller testing device according to any one of claims 6 to 9; The microcontroller to be tested; and, a current detection device; When the microcontroller to be tested is arranged in the microcontroller testing device, the microcontroller testing device is used to perform a functional test on the microcontroller, and perform a power consumption test on the microcontroller in combination with the current detection device.

Citation Information

Patent Citations

  • Single board, electronic apparatus and method for channel selection

    CN108431788A

  • Functional module for chip testing and chip testing method, device and system

    CN115032522A

  • Method and system for testing power consumption of chip function sub-module

    CN115598496A

  • Single board testing machine system

    CN117572201A

  • Automatic configuration test system and method of microcontroller

    CN118642898A