CN112198865B - Testing method, device and system for MCU low-power mode switching - Google Patents

Testing method, device and system for MCU low-power mode switching Download PDF

Info

Publication number
CN112198865B
CN112198865B CN202011048695.2A CN202011048695A CN112198865B CN 112198865 B CN112198865 B CN 112198865B CN 202011048695 A CN202011048695 A CN 202011048695A CN 112198865 B CN112198865 B CN 112198865B
Authority
CN
China
Prior art keywords
mcu
tested
power consumption
consumption mode
low
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011048695.2A
Other languages
Chinese (zh)
Other versions
CN112198865A (en
Inventor
徐琴
钱斌
常夕阳
王瀚正
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Cetc Haikang Wuxi Technology Co ltd
Original Assignee
Cetc Haikang Wuxi Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Cetc Haikang Wuxi Technology Co ltd filed Critical Cetc Haikang Wuxi Technology Co ltd
Priority to CN202011048695.2A priority Critical patent/CN112198865B/en
Publication of CN112198865A publication Critical patent/CN112198865A/en
Application granted granted Critical
Publication of CN112198865B publication Critical patent/CN112198865B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B23/00Testing or monitoring of control systems or parts thereof
    • G05B23/02Electric testing or monitoring
    • G05B23/0205Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults
    • G05B23/0218Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults characterised by the fault detection method dealing with either existing or incipient faults
    • G05B23/0256Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults characterised by the fault detection method dealing with either existing or incipient faults injecting test signals and analyzing monitored process response, e.g. injecting the test signal while interrupting the normal operation of the monitored system; superimposing the test signal onto a control signal during normal operation of the monitored system
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/20Pc systems
    • G05B2219/24Pc safety
    • G05B2219/24065Real time diagnostics

Abstract

The invention relates to the technical field of MCU (microprogrammed control Unit) testing, and particularly discloses a testing method for switching a low-power-consumption mode of an MCU, wherein the testing method comprises the following steps: sending a control signal for entering a low power consumption mode test mode to the MCU to be tested according to a test instruction of the upper computer; acquiring a first state detection signal of a MCU to be tested in a low power consumption mode; sending a wake-up signal to the MCU to be tested, wherein the wake-up signal is used for enabling the MCU to be tested to exit from a low power consumption mode; acquiring a second state detection signal of the MCU to be tested which exits from the low power consumption mode; judging whether the low-power mode switching of the MCU to be tested is normal or not according to the comparison of the first state detection signal and the second state detection signal, and obtaining a judgment result; and sending the judgment result to the upper computer for displaying. The invention also discloses a testing device and a system for the MCU low-power mode switching. The testing method for the MCU low-power mode switching can realize automatic integrated testing.

Description

Testing method, device and system for MCU low-power mode switching
Technical Field
The invention relates to the technical field of MCU (microprogrammed control unit) testing, in particular to a testing method for MCU low-power-consumption mode switching, a testing device for MCU low-power-consumption mode switching and a testing system for MCU low-power-consumption mode switching.
Background
In the application scenarios of the present MCU (microcontroller), many of them need low power consumption considerations, i.e. the lower the power consumption of the MCU chip and its scheme in working and standby or sleep states, the better. The design of the MCU can be combined with different application scenes to design low power consumption modes with different power consumption levels, and the low power consumption modes can be mainly divided into a normal working mode, a sleep mode, a stop mode, a turn-off mode and the like. In practical application, the low power consumption of the MCU can be realized by various methods such as stopping running programs, switching low-frequency system clocks, closing part of peripheral modules or closing clocks. At present, the normal working current consumption of the MCU is about dozens of milliamperes, and the current consumption of the low-power-consumption mode is at least hundreds of nanoamperes.
Because the low-power mode designed by the MCU can relate to the states of a plurality of core control modules such as a clock, a reset, a FLASH (FLASH memory) and the like, if the low-power mode switching cannot be effectively, reasonably and completely verified and tested, the MCU cannot be switched back to a normal working mode due to functional defects of the designed MCU, and accordingly the overall design of the MCU fails. Therefore, in the early stage of MCU design, the designed low power mode switching needs to be verified completely to ensure the integrity of the designed low power mode switching function.
At present, verification and test of MCU low-power-consumption mode switching are mainly performed by manual configuration and manual observation, and automatic integrated verification and test are realized by no existing device or scheme. This results in a lot of time spent on verification and testing and the integrity of verification and testing cannot be guaranteed.
Disclosure of Invention
The invention provides a testing method for MCU low-power mode switching, a testing device for MCU low-power mode switching and a testing system for low-power mode switching, which solve the problem that automatic integrated testing cannot be performed in the related technology.
As a first aspect of the present invention, a method for testing MCU low power mode switching is provided, wherein the method comprises:
sending a control signal for entering a low power consumption mode test mode to the MCU to be tested according to a test instruction of the upper computer;
acquiring a first state detection signal of a MCU to be tested in a low power consumption mode;
sending a wake-up signal to the MCU to be tested, wherein the wake-up signal is used for enabling the MCU to be tested to exit from a low power consumption mode;
acquiring a second state detection signal of the MCU to be tested which exits from the low power consumption mode;
judging whether the low-power mode switching of the MCU to be tested is normal or not according to the comparison of the first state detection signal and the second state detection signal, and obtaining a judgment result;
and sending the judgment result to the upper computer for displaying.
Further, according to the design specification of the MCU to be tested, the MCU to be tested comprises a plurality of low power consumption modes, and the control signal entering the low power consumption mode test mode is sent to the MCU to be tested according to the test instruction of the upper computer, and comprises the following steps:
sending a control signal entering a first low-power-consumption mode test mode to the MCU to be tested according to a test instruction of the upper computer, sending a control signal entering a second low-power-consumption mode test mode to the MCU to be tested after obtaining a judgment result in the first low-power-consumption mode test mode, repeating the test process in the first low-power-consumption mode test mode, and repeating the process until the test process of a plurality of preset low-power-consumption modes is completed.
Further, the acquiring a first state detection signal of the MCU to be tested in the low power consumption mode includes:
the method comprises the steps of obtaining a first working state signal of a kernel and/or peripheral equipment of the MCU to be tested in a low power consumption mode.
Further, the acquiring a second state detection signal of the MCU to be tested exiting the low power consumption mode includes:
and acquiring a second working state signal of the kernel and/or the peripheral equipment of the MCU to be tested, which exits from the low power consumption mode.
Further, the determining whether the low power consumption mode switching of the MCU to be tested is normal according to the comparison between the first state detection signal and the second state detection signal and obtaining a determination result includes:
comparing whether the first working state signal is the same as the second working state signal;
if the first working state signal is the same as the second working state signal, judging that the low-power-consumption mode of the MCU to be tested is abnormally switched;
and if the first working state signal is different from the second working state signal, judging that the low-power-consumption mode of the MCU to be tested is switched normally.
Further, the acquiring a first state detection signal of the MCU to be tested in the low power consumption mode includes:
the method includes the steps that first current power consumption of the MCU to be tested in a low power consumption mode is obtained.
Further, the acquiring a second state detection signal of the MCU to be tested exiting the low power consumption mode includes:
and acquiring second current power consumption of the MCU to be tested which exits from the low power consumption mode.
Further, the determining whether the low power consumption mode switching of the MCU to be tested is normal according to the comparison between the first state detection signal and the second state detection signal and obtaining a determination result includes:
comparing whether the first current power consumption is smaller than the second current power consumption;
if the first current power consumption is smaller than the second current power consumption, judging that the low-power-consumption mode of the MCU to be tested is switched normally;
and if the first current power consumption is not less than the second current power consumption, judging that the low-power-consumption mode of the MCU to be tested is abnormally switched.
As another aspect of the present invention, a testing apparatus for MCU low power mode switching is provided, which includes:
the first sending module is used for sending a control signal for entering a low-power-consumption mode test mode to the MCU to be tested according to a test instruction of the upper computer;
the first acquisition module is used for acquiring a first state detection signal of the MCU to be tested in the low power consumption mode;
the second sending module is used for sending a wake-up signal to the MCU to be tested, and the wake-up signal is used for enabling the MCU to be tested to exit from a low power consumption mode;
the second acquisition module is used for acquiring a second state detection signal of the MCU to be tested, which exits from the low power consumption mode;
the comparison and judgment module is used for judging whether the low-power-consumption mode switching of the MCU to be tested is normal or not according to the comparison of the first state detection signal and the second state detection signal and obtaining a judgment result;
and the third sending module is used for sending the judgment result to the upper computer for displaying.
As another aspect of the present invention, a test system for switching a low power consumption mode of an MCU is provided, which includes: the testing device comprises an upper computer, an analog switch, a current acquisition module, a DC power supply and the testing device for switching the MCU low-power-consumption mode, wherein the analog switch and the current acquisition module are in communication connection with the testing device for switching the MCU low-power-consumption mode, the DC power supply is electrically connected with the current acquisition module, and the testing device for switching the MCU low-power-consumption mode is in communication connection with the upper computer.
The invention provides a testing method for switching a low-power-consumption mode of an MCU (microprogrammed control Unit), which is characterized in that a control signal entering the low-power-consumption mode testing mode is sent to the MCU to be tested according to a testing instruction of an upper computer, a state detection signal of the MCU to be tested in the low-power-consumption mode is obtained, then the MCU to be tested is awakened to enter a normal working mode, the state detection signal in the normal working mode is obtained, judgment is carried out according to the detection signals obtained twice, a judgment result whether the low-power-consumption mode of the MCU to be tested is switched to be normal is obtained, and the judgment result is fed back to the upper computer to be displayed. The testing method for the low-power mode switching of the MCU can realize the testing of the different low-power mode switching of different types of MCUs, does not depend on manpower at all, can automatically and integrally verify and test, and has the advantages of high testing effect and high testing precision.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the principles of the invention and not to limit the invention.
Fig. 1 is a flowchart of a testing method for MCU low power mode switching provided in the present invention.
Fig. 2 is a flowchart of a specific implementation process of the MCU low power mode switching test method provided in the present invention.
FIG. 3 is a block diagram of the testing system for switching the MCU low power consumption mode provided by the invention.
Detailed Description
It should be noted that the embodiments and features of the embodiments may be combined with each other without conflict. The present invention will be described in detail below with reference to the embodiments with reference to the attached drawings.
In order to make those skilled in the art better understand the technical solution of the present invention, the technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged under appropriate circumstances in order to facilitate the description of the embodiments of the invention herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In this embodiment, a method for testing MCU low power mode switching is provided, and fig. 1 is a flowchart of a method for testing MCU low power mode switching according to an embodiment of the present invention, as shown in fig. 1, including:
s110, sending a control signal for entering a low power consumption mode test mode to the MCU to be tested according to a test instruction of the upper computer;
s120, acquiring a first state detection signal of the MCU to be tested in a low power consumption mode;
s130, sending a wake-up signal to the MCU to be tested, wherein the wake-up signal is used for enabling the MCU to be tested to exit from a low power consumption mode;
s140, acquiring a second state detection signal of the MCU to be tested, which exits from the low power consumption mode;
s150, judging whether the low-power-consumption mode switching of the MCU to be tested is normal or not according to the comparison of the first state detection signal and the second state detection signal, and obtaining a judgment result;
and S160, sending the judgment result to the upper computer for displaying.
According to the testing method for the switching of the low-power-consumption mode of the MCU, the control signal entering the low-power-consumption mode testing mode is sent to the MCU to be tested according to the testing instruction of the upper computer, the state detection signal of the MCU to be tested in the low-power-consumption mode is obtained, then the MCU to be tested is awakened to enter the normal working mode, the state detection signal in the normal working mode is obtained, the judgment result of whether the switching of the low-power-consumption mode of the MCU to be tested is normal or not is obtained according to the detection signals obtained twice, and the judgment result is fed back to the upper computer to be displayed. The testing method for the low-power mode switching of the MCU can realize the testing of the different low-power mode switching of different types of MCUs, does not depend on manpower at all, can automatically and integrally verify and test, and has the advantages of high testing effect and high testing precision.
Specifically, according to the design specification of the MCU to be tested, the MCU to be tested includes a plurality of low power consumption modes, the MCU to be tested sends a control signal entering the low power consumption mode test mode to the MCU to be tested according to the test instruction of the upper computer, including:
sending a control signal entering a first low-power-consumption mode test mode to the MCU to be tested according to a test instruction of the upper computer, sending a control signal entering a second low-power-consumption mode test mode to the MCU to be tested after obtaining a judgment result in the first low-power-consumption mode test mode, repeating the test process in the first low-power-consumption mode test mode, and repeating the process until the test process of a plurality of preset low-power-consumption modes is completed.
The following describes in detail a specific implementation process of the MCU low power mode switching test method according to the embodiment of the present invention with reference to fig. 2.
As mentioned above, the MCU to be tested has different design specifications and different low power consumption modes, so that the low power consumption modes of each MCU to be tested are related to the design specifications of the MCU to be tested. The tests of the multiple low power consumption modes of the MCU to be tested can be selected as required, all tests can be selected, or a part of the tests can be selected as required, which is not limited herein.
The embodiment of the invention takes the example that the MCU to be tested has N low power consumption modes, and the N low power consumption modes are all tested.
Before sending a control signal entering a low-power-consumption mode test mode to the MCU to be tested according to the test instruction of the upper computer, whether the test instruction of the upper computer is received or not needs to be judged, the step of sending the control signal can be executed only after the test instruction of the upper computer is received, and if the test instruction of the upper computer is not received, the MCU is always in a state of detecting whether the test instruction of the upper computer exists or not.
After receiving a test instruction of the upper computer, testing according to the test instruction and a preset sequence, namely sending a control signal entering a first low-power-consumption mode test mode to the MCU to be tested, and testing in the first power-consumption mode test mode.
Specifically, the acquiring a first state detection signal of the MCU to be tested in the low power consumption mode includes:
the method comprises the steps of obtaining a first working state signal of a kernel and/or peripheral equipment of the MCU to be tested in a low power consumption mode.
It can be understood that, when the MCU to be tested is in the first low power consumption mode test mode, the first operating state signal in the first low power consumption mode test mode is obtained, which may be an operating state signal of a kernel of the MCU to be tested or an operating state signal of a peripheral device of the MCU to be tested, and this is related to the setting of the first low power consumption mode.
When the working state detection signal in the low power consumption mode is acquired, a wake-up signal needs to be sent to the MCU to be tested, so that the MCU to be tested enters a normal working mode.
Specifically, the acquiring a second state detection signal of the MCU to be tested exiting the low power consumption mode includes:
and acquiring a second working state signal of the kernel and/or the peripheral equipment of the MCU to be tested, which exits from the low power consumption mode.
After the MCU to be tested enters a normal working mode, a state detection signal of the MCU to be tested in the normal working mode is obtained, and a kernel, peripheral equipment and the like of the MCU to be tested are also obtained, wherein the state detection signal is the same as an obtained object in a low power consumption mode.
Specifically, the determining whether the low power consumption mode switching of the MCU to be tested is normal according to the comparison between the first state detection signal and the second state detection signal and obtaining a determination result includes:
comparing whether the first working state signal is the same as the second working state signal;
if the first working state signal is the same as the second working state signal, judging that the low-power-consumption mode of the MCU to be tested is abnormally switched;
and if the first working state signal is different from the second working state signal, judging that the low-power-consumption mode of the MCU to be tested is switched normally.
It can be understood that whether the low power consumption mode switching of the MCU to be tested is normal can be determined by comparing the difference between the first operating state signal and the second operating state signal.
For example, a working state signal of the peripheral device is acquired, if the peripheral device does not output a working signal in the low power consumption mode and outputs a normal working signal in the normal working mode, it is determined that the low power consumption mode of the MCU to be tested is normally switched, and if the peripheral device does output a working signal in the low power consumption mode, that is, if the peripheral device outputs a working signal in the normal working mode, that is, if the peripheral device outputs a working signal in the same manner as in the normal working mode, it is determined that the low power consumption mode of the MCU to be tested is not normally switched, that is, the MCU to be tested is not switched to the low power consumption mode.
Specifically, the acquiring a first state detection signal of the MCU to be tested in the low power consumption mode includes:
the method includes the steps that first current power consumption of the MCU to be tested in a low power consumption mode is obtained.
Specifically, the acquiring a second state detection signal of the MCU to be tested exiting the low power consumption mode includes:
and acquiring second current power consumption of the MCU to be tested which exits from the low power consumption mode.
Because the current power consumption in the low power consumption mode is different from the current power consumption in the normal working mode, whether the low power consumption mode switching of the MCU to be tested is normal or not can be judged by judging the difference between the first current power consumption and the second current power consumption.
Specifically, the determining whether the low power consumption mode switching of the MCU to be tested is normal according to the comparison between the first state detection signal and the second state detection signal and obtaining a determination result includes:
comparing whether the first current power consumption is smaller than the second current power consumption;
if the first current power consumption is smaller than the second current power consumption, judging that the low-power-consumption mode of the MCU to be tested is switched normally;
and if the first current power consumption is not less than the second current power consumption, judging that the low-power-consumption mode of the MCU to be tested is abnormally switched.
After the judgment result in the first low-power-consumption mode is fed back to the upper computer, the test in the second low-power-consumption mode is started, the test process is the same as the test process in the first low-power-consumption mode, the test in the Nth low-power-consumption mode is carried out in the same way, all test results are fed back to the upper computer, and the upper computer can display which low-power-consumption mode of the MCU to be tested can not be normally switched to a user or whether the MCU to be tested can realize the normal switching of all the low-power-consumption modes.
The following describes an implementation procedure of the MCU low power mode switching test method according to an embodiment of the present invention.
(1) Firstly, burning a low-power-consumption mode switching test program into an MCU to be tested through the device; the program burning interfaces of the MCU to be tested are generally two, namely a self-developed special burning interface (such as an ICP interface) or a universal SWD interface;
(2) then, the master control MCU in the device controls several groups of GPIO combination switching to enable the MCU to be tested to enter different low power consumption modes;
(3) observing state information of the MCU to be tested under different low power consumption modes, observing the state of an MCU interface to be tested through the GPIO, capturing clock output by the TIMER module, sampling the current of the MCU to be tested by the ADC and the like;
(4) the master control MCU wakes up the MCU to be tested through GPIO, external reset or other means, and the MCU to be tested exits the low power consumption mode and enters a normal working mode;
(5) the MCU to be tested can be subjected to current power consumption real-time acquisition monitoring in a working mode and a low power consumption mode through the current acquisition module.
As another embodiment of the present invention, a testing apparatus for MCU low power mode switching is provided, which includes:
the first sending module is used for sending a control signal for entering a low-power-consumption mode test mode to the MCU to be tested according to a test instruction of the upper computer;
the first acquisition module is used for acquiring a first state detection signal of the MCU to be tested in the low power consumption mode;
the second sending module is used for sending a wake-up signal to the MCU to be tested, and the wake-up signal is used for enabling the MCU to be tested to exit from a low power consumption mode;
the second acquisition module is used for acquiring a second state detection signal of the MCU to be tested, which exits from the low power consumption mode;
the comparison and judgment module is used for judging whether the low-power-consumption mode switching of the MCU to be tested is normal or not according to the comparison of the first state detection signal and the second state detection signal and obtaining a judgment result;
and the third sending module is used for sending the judgment result to the upper computer for displaying.
According to the testing device for switching the low-power-consumption mode of the MCU, provided by the embodiment of the invention, a control signal entering the low-power-consumption mode testing mode is sent to the MCU to be tested according to a testing instruction of the upper computer, a state detection signal of the MCU to be tested in the low-power-consumption mode is obtained, then the MCU to be tested is awakened to enter a normal working mode, the state detection signal in the normal working mode is obtained, judgment is carried out according to the detection signals obtained twice, a judgment result whether the low-power-consumption mode of the MCU to be tested is switched to be normal is obtained, and the judgment result is fed back to the upper computer to be displayed. The testing device for the low-power mode switching of the MCU can realize the testing of different low-power mode switching of different types of MCUs, does not depend on manual work at all, can automatically and integrally verify and test, and has the advantages of high testing effect and high testing precision.
As another embodiment of the present invention, a testing system for switching a low power consumption mode of an MCU is provided, where as shown in fig. 3, the testing system includes: the testing device comprises an upper computer, an analog switch, a current acquisition module, a DC power supply and the testing device for switching the MCU low-power-consumption mode, wherein the analog switch and the current acquisition module are in communication connection with the testing device for switching the MCU low-power-consumption mode, the DC power supply is electrically connected with the current acquisition module, and the testing device for switching the MCU low-power-consumption mode is in communication connection with the upper computer.
The testing system for switching the low-power-consumption mode of the MCU provided by the embodiment of the invention adopts the testing device for switching the low-power-consumption mode of the MCU in the foregoing, sends a control signal for entering the testing mode of the low-power-consumption mode to the MCU to be tested according to a testing instruction of the upper computer, acquires a state detection signal of the MCU in the low-power-consumption mode, wakes up the MCU to be tested to enter a normal working mode, acquires the state detection signal in the normal working mode, judges according to the detection signals acquired twice, obtains a judgment result whether the switching of the low-power-consumption mode of the MCU to be tested is normal, and feeds the judgment result back to the upper computer for displaying. The testing system for the switching of the low-power-consumption modes of the MCU can realize the testing of the switching of different low-power-consumption modes of the MCUs of different types, does not depend on manual work at all, can automatically and integrally verify and test, and has the advantages of high testing effect and high testing precision.
It should be noted that the testing device for switching the MCU low power consumption mode may specifically be a main control MCU.
It should be noted that the main control MCU is used to implement the reset module, which is generally a 32-bit general MCU, and the modules applied in the present invention mainly include: GPIO (general purpose input output interface, DAC (digital to analog conversion), TIMER (clock), ADC (analog to digital conversion), etc.
The I2C/SPI (inter-integrated circuit bus/serial-parallel interface bus) interface module is mainly used for data reception of an external current collection module.
The download interface is mainly used for burning the test program into the MCU to be tested through the special download interface or the universal download interface.
GPIO 1: the general IO (input/output) input pin is generally a combination of a plurality of IOs and can be used for receiving and identifying different states (judged by partial peripheral working states) of the MCU to be tested in different low power consumption modes. Other functional module interfaces, such as TIMER, SPI, I2C, etc., may be multiplexed into the IO.
GPIO 2: the general IO output pins are generally a plurality of IO combinations and used for outputting different level combinations, and the MCU to be tested identifies different control signal states and enters different low power consumption modes.
GPIO 3: the general IO output pin is generally a combination of a plurality of IOs, and the MCU to be tested is awakened from the low power consumption mode through the outside to exit and enter a normal working mode.
An analog switch: the device is used for opening or closing the communication connection between the MCU to be tested and the device, and prevents the extra power consumption of the MCU to be tested caused by IO false triggering or IO electric leakage of the device. The leakage current of the analog switch is generally nano-ampere level, and the influence on the power consumption of the MCU to be tested can be ignored.
The current acquisition module: the sampling circuit generally comprises an external ADC, a sampling resistor and an operational amplifier, wherein the sampling current range is controlled to be hundreds of nanoamperes to ampere level, and different gears can be selected for switching.
DC direct current power supply: the power supply for the device is generally input direct current 5V or direct current 12V.
MCU power input to be tested: and the power supply is used for supplying power to the MCU to be tested.
The MCU program downloading interface to be tested: for downloading the test program to the MCU to be tested.
The test state detection interface to be tested: the MCU interface to be tested has different functional states in different low power consumption modes, state information can be fed back to the main control MCU, and the main control MCU judges the current state information through identification so as to judge whether the MCU to be tested operates normally in different modes.
The mode switching control interface to be tested: and the MCU to be tested runs a test program and enters different low power consumption modes according to the level combination of the current mode switching pin.
Wake-up control interface to be tested: after the MCU to be tested enters the low power consumption mode, the main control MCU can wake up the MCU to be tested from the low power consumption mode and enter a normal working mode through an external wake-up or reset mode.
The specific working principle of the MCU low power mode switching test system provided in the embodiment of the present invention may refer to the description of the MCU low power mode switching test method, and is not described herein again.
In summary, the testing method for MCU low power mode switching provided by the present invention has the following advantages:
(1) the invention can be used for the design verification stage of the MCU chip, and can be used for verifying the function of switching the low-power-consumption mode of the MCU design to ensure the low power consumption
(2) The function of power consumption mode switching is correct and complete, and the failure of the whole chip design caused by the re-finding of the function defect of a low power consumption mechanism in later chip production test is avoided.
(3) The invention can also be used for the testing stage of the MCU chip to further test the switching of the low power consumption mode of the MCU design, thereby avoiding the irretrievable loss caused by the bug of the function found again in the market application of mass-produced products.
(4) The invention integrates the low power consumption mode switching and multi-mode testing on one testing system, can select a single mode to verify and test, and can also verify and test a plurality of modes according to any sequence.
(5) The test result can be displayed in real time through the display screen or the indicator lamp, and the test result judgment process is simplified.
It will be understood that the above embodiments are merely exemplary embodiments taken to illustrate the principles of the present invention, which is not limited thereto. It will be apparent to those skilled in the art that various modifications and improvements can be made without departing from the spirit and substance of the invention, and these modifications and improvements are also considered to be within the scope of the invention.

Claims (7)

1. A test method for MCU low power consumption mode switching is characterized by comprising the following steps:
sending a control signal for entering a low power consumption mode test mode to the MCU to be tested according to a test instruction of the upper computer;
acquiring a first state detection signal of a MCU to be tested in a low power consumption mode;
sending a wake-up signal to the MCU to be tested, wherein the wake-up signal is used for enabling the MCU to be tested to exit from a low power consumption mode;
acquiring a second state detection signal of the MCU to be tested which exits from the low power consumption mode;
judging whether the low-power mode switching of the MCU to be tested is normal or not according to the comparison of the first state detection signal and the second state detection signal, and obtaining a judgment result;
sending the judgment result to the upper computer for displaying;
according to the design specification of the MCU to be tested, the MCU to be tested comprises a plurality of low power consumption modes, and the control signal for entering the low power consumption mode test mode is sent to the MCU to be tested according to the test instruction of the upper computer, and comprises the following steps:
sending a control signal entering a first low-power-consumption mode test mode to the MCU to be tested according to a test instruction of the upper computer, sending a control signal entering a second low-power-consumption mode test mode to the MCU to be tested after obtaining a judgment result in the first low-power-consumption mode test mode, repeating the test process in the first low-power-consumption mode test mode, and repeating the process until the test process of a plurality of preset low-power-consumption modes is completed;
the acquiring a first state detection signal of the MCU to be tested in the low power consumption mode includes:
acquiring a first working state signal of a kernel and/or peripheral equipment of the MCU to be tested in a low power consumption mode; alternatively, the first and second electrodes may be,
the acquiring of the first state detection signal of the MCU to be tested in the low power consumption mode includes:
the method includes the steps that first current power consumption of the MCU to be tested in a low power consumption mode is obtained.
2. The method for testing the switching of the MCU low power consumption mode according to claim 1, wherein the obtaining of the second state detection signal of the MCU to be tested exiting the low power consumption mode comprises:
and acquiring a second working state signal of the kernel and/or the peripheral equipment of the MCU to be tested, which exits from the low power consumption mode.
3. The method for testing the switching of the MCU low power consumption mode according to claim 2, wherein the step of judging whether the switching of the MCU to be tested in the low power consumption mode is normal according to the comparison between the first state detection signal and the second state detection signal and obtaining a judgment result comprises the steps of:
comparing whether the first working state signal is the same as the second working state signal;
if the first working state signal is the same as the second working state signal, judging that the low-power-consumption mode of the MCU to be tested is abnormally switched;
and if the first working state signal is different from the second working state signal, judging that the low-power-consumption mode of the MCU to be tested is switched normally.
4. The method for testing the switching of the MCU low power consumption mode according to claim 1, wherein the obtaining of the second state detection signal of the MCU to be tested exiting the low power consumption mode comprises:
and acquiring second current power consumption of the MCU to be tested which exits from the low power consumption mode.
5. The method for testing the switching of the MCU low power consumption mode according to claim 4, wherein the step of judging whether the switching of the MCU to be tested in the low power consumption mode is normal according to the comparison between the first state detection signal and the second state detection signal and obtaining a judgment result comprises the steps of:
comparing whether the first current power consumption is smaller than the second current power consumption;
if the first current power consumption is smaller than the second current power consumption, judging that the low-power-consumption mode of the MCU to be tested is switched normally;
and if the first current power consumption is not less than the second current power consumption, judging that the low-power-consumption mode of the MCU to be tested is abnormally switched.
6. A testing device for MCU low power consumption mode switching, which is used for realizing the testing method for MCU low power consumption mode switching of any claim 1 to 5, and is characterized by comprising:
the first sending module is used for sending a control signal for entering a low-power-consumption mode test mode to the MCU to be tested according to a test instruction of the upper computer;
the first acquisition module is used for acquiring a first state detection signal of the MCU to be tested in the low power consumption mode;
the second sending module is used for sending a wake-up signal to the MCU to be tested, and the wake-up signal is used for enabling the MCU to be tested to exit from a low power consumption mode;
the second acquisition module is used for acquiring a second state detection signal of the MCU to be tested, which exits from the low power consumption mode;
the comparison and judgment module is used for judging whether the low-power-consumption mode switching of the MCU to be tested is normal or not according to the comparison of the first state detection signal and the second state detection signal and obtaining a judgment result;
and the third sending module is used for sending the judgment result to the upper computer for displaying.
7. A test system for MCU low power consumption mode switching is characterized by comprising: the test device comprises an upper computer, an analog switch, a current acquisition module, a DC power supply and the test device for switching the MCU low power consumption mode of claim 6, wherein the analog switch and the current acquisition module are both in communication connection with the test device for switching the MCU low power consumption mode, the DC power supply is electrically connected with the current acquisition module, and the test device for switching the MCU low power consumption mode is in communication connection with the upper computer.
CN202011048695.2A 2020-09-29 2020-09-29 Testing method, device and system for MCU low-power mode switching Active CN112198865B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011048695.2A CN112198865B (en) 2020-09-29 2020-09-29 Testing method, device and system for MCU low-power mode switching

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011048695.2A CN112198865B (en) 2020-09-29 2020-09-29 Testing method, device and system for MCU low-power mode switching

Publications (2)

Publication Number Publication Date
CN112198865A CN112198865A (en) 2021-01-08
CN112198865B true CN112198865B (en) 2022-03-25

Family

ID=74007859

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011048695.2A Active CN112198865B (en) 2020-09-29 2020-09-29 Testing method, device and system for MCU low-power mode switching

Country Status (1)

Country Link
CN (1) CN112198865B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112882422A (en) * 2021-01-26 2021-06-01 广州巨晟微电子股份有限公司 MCU mode control circuit, control method and MCU
CN113848783A (en) * 2021-09-26 2021-12-28 上汽通用五菱汽车股份有限公司 User connection unit dormancy awakening method, device and computer readable storage medium
CN113847973B (en) * 2021-10-22 2023-12-26 重庆智慧水务有限公司 Water meter working current testing tool and testing method
CN116148644B (en) * 2023-04-21 2023-08-01 上海励驰半导体有限公司 Test circuit, chip, test system and test method

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102937928A (en) * 2011-08-16 2013-02-20 鸿富锦精密工业(深圳)有限公司 Main board sleeping and waking device
CN105551192A (en) * 2016-01-28 2016-05-04 沈阳时尚实业有限公司 Device of tracking alarm for realizing low power consumption and falling detection and mutual switching method of low power consumption and falling detection
CN106488515A (en) * 2015-08-28 2017-03-08 联芯科技有限公司 A kind of intervalometer, baseband chip and its sleep state changing method
CN108362992A (en) * 2018-01-16 2018-08-03 奇酷互联网络科技(深圳)有限公司 Motherboard test method, device, readable storage medium storing program for executing and test terminal
CN108496156A (en) * 2018-04-17 2018-09-04 深圳市汇顶科技股份有限公司 Awakening method, the apparatus and system of operating system
CN109002416A (en) * 2018-06-26 2018-12-14 北京中电华大电子设计有限责任公司 A kind of emulator and method for supporting chip low-power consumption debugging
CN110109789A (en) * 2019-05-05 2019-08-09 无锡矽杰微电子有限公司 A kind of novel OTP MCU test method
CN110297171A (en) * 2019-06-14 2019-10-01 合肥格易集成电路有限公司 A kind of the power consumption test system and equipment of chip
CN209708118U (en) * 2019-04-17 2019-11-29 青岛建邦供应链股份有限公司 A kind of programming and testing device of programmable chip
CN111025129A (en) * 2019-12-25 2020-04-17 中电海康无锡科技有限公司 FPGA-based SOC chip automatic test tool and test method
CN111564838A (en) * 2020-04-30 2020-08-21 南京南瑞继保工程技术有限公司 Feeder terminal with dynamically-changed power consumption and power consumption control method

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AUPP398798A0 (en) * 1998-06-09 1998-07-02 Silverbrook Research Pty Ltd Image creation method and apparatus (ij43)
EP1121249B1 (en) * 1998-10-16 2007-07-25 Silverbrook Research Pty. Limited Process of forming a nozzle for an inkjet printhead
US7441131B2 (en) * 2005-09-30 2008-10-21 Silicon Laboratories Inc. MCU with power saving mode
US20150212152A1 (en) * 2014-01-24 2015-07-30 Texas Instruments Incorporated Testing of integrated circuits during at-speed mode of operation
CN107357609A (en) * 2017-06-26 2017-11-17 珠海格力电器股份有限公司 A kind of upgrade method and device based on MCU emulators

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102937928A (en) * 2011-08-16 2013-02-20 鸿富锦精密工业(深圳)有限公司 Main board sleeping and waking device
CN106488515A (en) * 2015-08-28 2017-03-08 联芯科技有限公司 A kind of intervalometer, baseband chip and its sleep state changing method
CN105551192A (en) * 2016-01-28 2016-05-04 沈阳时尚实业有限公司 Device of tracking alarm for realizing low power consumption and falling detection and mutual switching method of low power consumption and falling detection
CN108362992A (en) * 2018-01-16 2018-08-03 奇酷互联网络科技(深圳)有限公司 Motherboard test method, device, readable storage medium storing program for executing and test terminal
CN108496156A (en) * 2018-04-17 2018-09-04 深圳市汇顶科技股份有限公司 Awakening method, the apparatus and system of operating system
CN109002416A (en) * 2018-06-26 2018-12-14 北京中电华大电子设计有限责任公司 A kind of emulator and method for supporting chip low-power consumption debugging
CN209708118U (en) * 2019-04-17 2019-11-29 青岛建邦供应链股份有限公司 A kind of programming and testing device of programmable chip
CN110109789A (en) * 2019-05-05 2019-08-09 无锡矽杰微电子有限公司 A kind of novel OTP MCU test method
CN110297171A (en) * 2019-06-14 2019-10-01 合肥格易集成电路有限公司 A kind of the power consumption test system and equipment of chip
CN111025129A (en) * 2019-12-25 2020-04-17 中电海康无锡科技有限公司 FPGA-based SOC chip automatic test tool and test method
CN111564838A (en) * 2020-04-30 2020-08-21 南京南瑞继保工程技术有限公司 Feeder terminal with dynamically-changed power consumption and power consumption control method

Also Published As

Publication number Publication date
CN112198865A (en) 2021-01-08

Similar Documents

Publication Publication Date Title
CN112198865B (en) Testing method, device and system for MCU low-power mode switching
CN107656856B (en) CPLD-based system state display method and device
US8074114B2 (en) Motherboard error detection system
CN106771972B (en) Automatic testing device, system and method for POS machine mainboard
CN109683054B (en) Battery pack voltage acquisition wire harness sequence diagnosis device and method
CN107677166B (en) Full-electronic trigger fuze tester and testing method thereof
WO2022007710A1 (en) Method for testing generator of vehicle, and battery tester
CN110658400B (en) Embedded test method, microcontroller and system
US20120131385A1 (en) Testing mehtod for unit under test
CN110850274A (en) Vehicle-mounted platform comprehensive test platform and method
US11119876B2 (en) Device and method for testing computer system
CN103914361B (en) Detection jig and detection method of computer device
CN112595956A (en) Test system of intelligence lock PCBA board
CN106354592A (en) Computer automatic startup and shutdown testing device
US20140223236A1 (en) Device for testing a graphics card
CN109885437A (en) Baseboard management controller BMC, terminal and power-up state diagnotic module, method
CN215867583U (en) Controller fault diagnosis test system
CN113824611A (en) Current consumption testing method, device, equipment and storage medium of wireless communication module
CN102214131A (en) Server power supply test system and method for performing power supply test on server
CN105954770B (en) Statistical method based on GNSS receiver differential data accuracy
CN216622550U (en) Power-on and power-off testing device
CN219936682U (en) SSD forced power down test equipment
CN212460245U (en) Liquid crystal module test system
CN112986789A (en) Circuit board function test system and method thereof
TWI675293B (en) A host boot detection method and its system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant