CN1543097A - Function testing method and system for hardware watchdog - Google Patents

Function testing method and system for hardware watchdog Download PDF

Info

Publication number
CN1543097A
CN1543097A CNA2003101031460A CN200310103146A CN1543097A CN 1543097 A CN1543097 A CN 1543097A CN A2003101031460 A CNA2003101031460 A CN A2003101031460A CN 200310103146 A CN200310103146 A CN 200310103146A CN 1543097 A CN1543097 A CN 1543097A
Authority
CN
China
Prior art keywords
mcu
dongle
function
hardware watchdog
external ram
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.)
Granted
Application number
CNA2003101031460A
Other languages
Chinese (zh)
Other versions
CN1323500C (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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CNB2003101031460A priority Critical patent/CN1323500C/en
Publication of CN1543097A publication Critical patent/CN1543097A/en
Application granted granted Critical
Publication of CN1323500C publication Critical patent/CN1323500C/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Landscapes

  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

This invention discloses a function test method and system for a hardware- watching dog including 1 starting the test system 2 initializing MCU 3 fetching content of outside RAM definite N address units 4 comparing if the fetched data are the same with the pre-designed data 5 writing the pre-designed data in the definite N address units if not the same 6. MCU stops the feeding operation, a delay time T should be larger than the limit feeding time of the watching dog chip 7 a write storage recording the hardware dog function lost to finish after instructing or reporting the test result. 8. If they are the same, the write storage registers the normal function of the dog and finishes after reporting the test results.

Description

The function test method of hardware watchdog and system thereof
Technical field
The present invention relates to field tests, relate in particular to method of testing and system thereof the hardware watchdog chip.
Background technology
In the application system design of CPU or MCU, for improving reliability of system operation, in its external Design, add the hardware watchdog unit, anti-locking system " deadlock " through regular meeting.At present, external hardware watchdog chip technology comparative maturity, this type of special chip is many, as MAX706 of MAXIM company etc.Electronic Design and manufacturing enterprise in research and development designs, with the hardware watchdog chip design on the CPU of veneer mini system, in order to guarantee the stability of cpu system.When cpu system is debugged and veneer when producing, to test the function of hardware watchdog usually, be normal to guarantee its function.
Number of patent application is that 01279116.4 Chinese patent application has proposed " control logic circuit of a kind of house dog ", and this circuit is arranged between CPU and the hardware watchdog.Its core concept is to utilize crystal oscillator and EPLD to carry out frequency division, generation periodicity " hello dog " signal, when this circuit worked, Dongle can not make cpu system reset, when this circuit is inoperative, hardware watchdog can make cpu reset, and veneer will restart.Use this circuit, can play the effect of shielding house dog when the veneer cpu system is debugged, whether the function that also can test out Dongle is normal.But the deficiency that this patent application exists is: in the time of debugging and testing hardware watchdog function, need the additional firmware circuit, as crystal oscillator and EPLD, testing cost is higher; Secondly, the technical scheme of this patent application only is applicable to the debugging of veneer cpu system, to then seem too complicated in the production process concerning the Dongle chip carries out the batch functional test.
Summary of the invention
It is simple that purpose of the present invention proposes a kind of technology exactly, and lower-cost being used for carried out the function test method and the system thereof of the hardware watchdog of functional test in batches to the hardware watchdog chip.
A kind of function test method of hardware watchdog comprises the following steps:
First step test macro electrifying startup;
The MCU initialization of second step comprises each register that the MCU operation is set;
The 3rd goes on foot the content of N address location of the appointment of reading external RAM;
The 4th step with data that read and the data of being scheduled to relatively judged whether unanimity;
If the 5th step is inconsistent then predetermined data are write in N the address location of appointment;
The 6th step MCU stops " feed dog " operation, time of delay T, described time T must be greater than the limit dog feeding time of watchdog chip;
The 7th step was write register, and the disabler of record Dongle finishes after indicating or report test result;
If the 8th step is consistent, then write register, record Dongle function is normal, finishes after indicating or report test result.
A kind of function test system of realizing the hardware watchdog of above-mentioned method of testing, but comprise 102, one Dongle chip carrier sockets of 101, one volatibility external RAMs of microcontroller or deck 103 and an indicating member 104 of an inside programming program; Described microcontroller 101 is connected with volatibility external RAM 102, Dongle chip carrier socket or deck 103 and indicating member 104 respectively; Described microcontroller 101 is used for volatibility external RAM 102 is carried out read-write operation, finishes the described judgement executable operations of claim 1, and control indicating member 104 carries out the demonstration of test result.
Method and system proposed by the invention, compared with prior art, technology is simple and reliable, and testing cost is low, is applicable to the Incoming Quality Control that the hardware watchdog bulk quantity of chips is carried out functional test and bulk quantity of chips.
Description of drawings
Fig. 1 is the flow chart of method of testing proposed by the invention.
Fig. 2 is a structured flowchart of realizing the test macro of method of testing of the present invention.
Embodiment
The present invention is described in further detail below in conjunction with drawings and Examples.
Fig. 1 is the flow chart of method of testing proposed by the invention.As shown in Figure 1, the function test method of the hardware watchdog that the present invention proposes comprises the following steps: the first step, test macro electrifying startup.Second step, MCU initialization comprise each register that the MCU operation is set.The 3rd step, read the content of N address location of the appointment of external RAM.The 4th goes on foot, data that read and the data of being scheduled to is compared, and judges whether unanimity; If the 5th step is inconsistent then predetermined data are write in N the address location of appointment.The 6th step, MCU stop " feed dog " operation, time of delay T, described time T must be greater than the limit dog feeding time of watchdog chip.The 7th step, write register, the disabler of record Dongle finishes after indicating or report test result.If the 8th step is consistent, then write register, record Dongle function is normal, finishes after indicating or report test result.
The basic principle of method of testing proposed by the invention is described below: when the test macro electrifying startup, MCU goes to read the data in N the unit of external RAM of appointment, data in the external RAM are chaotic irregular (during the Board Power up cold start-up at this moment, the probability that occurs these particular datas in the RAM is minimum), therefore, in the judgement in the 4th step, its result must be inconsistent, carried out for the 5th step this moment, MCU is with predetermined data such as 0x55,0xaa, 0x5a, x0a5 etc. write in N the address location of appointment, next carried out for the 6th step, MCU stops " feed dog " operation, time of delay T, described time T need surpass the limit of watchdog chip and " feed dog " time, is 1.6 seconds as MAX706; Different house dogs, the limit " hello the dog " time may be different, adjusts in practice to get final product.At this moment, if the function of house dog is normal, MCU is resetted, veneer restarts; The current startup is warm start, because system does not have power down, data still exist in the external RAM, program begins to carry out again, MCU reads the data of designated external unit once more, and reading this moment is exactly the 0x55 that writes in the 5th step, 0xaa, 0x5a, data such as x0a5, when re-executing the judgement in the 4th step, the comparative result of this moment should be consistent, and then carried out for the 8th step, MCU control indicating member 104 shows that watchdog function is normal.If the disabler of watchdog chip, then surpass after T time of delay, MCU can not be reset yet, program can not start anew to carry out, and can not move once more yet and read this step of designated external ram cell, according to the proposed method, further carried out for the 7th step, write register, the disabler of record Dongle, MCU control indicating member 104 shows that watchdog function lost efficacy.Whole test process finishes.
Fig. 2 is a structured flowchart of realizing the test macro of method of testing of the present invention.As shown in Figure 2, realize the function test system of the hardware watchdog of method of testing of the present invention, but 102, one Dongle chip carrier sockets of 101, one volatibility external RAMs of microcontroller or deck 103 and an indicating member 104 of comprising an inside programming program; Described microcontroller 101 is connected with volatibility external RAM 102, Dongle chip carrier socket or deck 103 and indicating member 104 respectively; Described microcontroller 101 is used for volatibility external RAM 102 is carried out read-write operation, finishes the described judgement executable operations of claim 1, and control indicating member 104 carries out the demonstration of test result.
Wherein microcontroller 101 is MCU mini system unit, the code programming of house dog method of testing correspondence MCU with inside FLASH in, MCU selects according to the actual design situation.The volatibility RAM chip of serial or parallel or the chip with this character can be selected according to the practical application needs in volatibility external RAM Unit 102, and inner data of preserving will be lost behind the system cut-off, and MCU can carry out readable and write operation to it.The indicating member that indicating member 104 can be made up of the light-emitting diode of MCU pin control in one embodiment of the invention, uses two light-emitting diodes, and a green is used to indicate MCU to move; One is the red and green color luminous tube, is used to indicate the watchdog function test status, if test is passed through, then green indicating lamp is bright, otherwise red colored lamp is bright.Dongle chip carrier socket or deck 103 are the unit that are used to place with the connection hardware watchdog chip.If before the chip dress is soldered to veneer, need test to bulk quantity of chips, then need to be used to place watchdog chip to be tested according to Chip Packaging form design respective socket, if watchdog chip is the DIP packing forms, then use the socket fixed chip; If remaining packing forms then generally can use deck to fix.Described microcontroller 101 is carried out method proposed by the invention, and the hardware watchdog chip in Dongle chip carrier socket or the deck 103 is carried out functional test.Structure formed by the hardware of whole test system and the design of veneer original system is consistent, and does not need to change any original design.
In an embodiment of the present invention, both can independently form testing apparatus, carry out functional test, indicate test result with the indicator light on the veneer to adorning the hardware watchdog that is soldered on the veneer; Also can combine with PC, adopt the RS232 mouth and the MCU of PC to carry out communication, PC issues test command and receives the test result of MCU repayment, and test result directly is presented on the PC interface, and is simple, quick, practical.

Claims (4)

1, a kind of function test method of hardware watchdog is characterized in that comprising the following steps:
First step test macro electrifying startup;
The MCU initialization of second step comprises each register that the MCU operation is set;
The 3rd goes on foot the content of N address location of the appointment of reading external RAM;
The 4th step with data that read and the data of being scheduled to relatively judged whether unanimity;
If the 5th step is inconsistent then predetermined data are write in N the address location of appointment;
The 6th step MCU stops " feed dog " operation, time of delay T, described time T must be greater than the limit dog feeding time of watchdog chip;
The 7th step was write register, and the disabler of record Dongle finishes after indicating or report test result;
If the 8th step is consistent, then write register, record Dongle function is normal, finishes after indicating or report test result.
2, a kind of function test system of realizing the hardware watchdog of the described method of testing of claim 1, but it is characterized in that comprising the microcontroller (101) of an inside programming program, a volatibility external RAM (102), Dongle chip carrier socket or a deck (103) and an indicating member (104); Described microcontroller (101) is connected with volatibility external RAM (102), Dongle chip carrier socket or deck (103) and indicating member (104) respectively; Described microcontroller (101) is used for volatibility external RAM (102) is carried out read-write operation, finishes the described judgement executable operations of claim 1, and control indicating member (104) carries out the demonstration of test result.
3, the function test system of hardware watchdog according to claim 2 is characterized in that described indicating member (104) is the light-emitting diode by the pin control of microcontroller (101).
4, the function test system of hardware watchdog according to claim 2 is characterized in that described volatibility external RAM (102) is serial.
CNB2003101031460A 2003-11-05 2003-11-05 Function testing method and system for hardware watchdog Expired - Lifetime CN1323500C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2003101031460A CN1323500C (en) 2003-11-05 2003-11-05 Function testing method and system for hardware watchdog

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2003101031460A CN1323500C (en) 2003-11-05 2003-11-05 Function testing method and system for hardware watchdog

Publications (2)

Publication Number Publication Date
CN1543097A true CN1543097A (en) 2004-11-03
CN1323500C CN1323500C (en) 2007-06-27

Family

ID=34333213

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2003101031460A Expired - Lifetime CN1323500C (en) 2003-11-05 2003-11-05 Function testing method and system for hardware watchdog

Country Status (1)

Country Link
CN (1) CN1323500C (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100524114C (en) * 2006-08-21 2009-08-05 株式会社东芝 Control apparatus with fast i/o function, and control method for control data thereof
CN102642472A (en) * 2011-02-17 2012-08-22 上海航鼎电子科技发展有限公司 Method and device for power management and deadlock protective control of vehicle-mounted positioning and tracking equipment
CN102736967A (en) * 2011-04-13 2012-10-17 鸿富锦精密工业(深圳)有限公司 Test system and method of watchdog timer
CN101957790B (en) * 2009-11-26 2012-11-07 上海大学 Implementation method of multi-source watchdog of microcontroller
CN102999039A (en) * 2011-09-14 2013-03-27 株式会社京滨 Electronic control device
CN108205490A (en) * 2016-12-19 2018-06-26 比亚迪股份有限公司 Software watchdog test method and device
CN109086154A (en) * 2018-07-26 2018-12-25 郑州云海信息技术有限公司 One kind is for detecting BIOS watchdog function inverse timing device and method
CN109960599A (en) * 2017-12-14 2019-07-02 佛山市顺德区美的电热电器制造有限公司 Chip system and its house dog self checking method, electrical equipment

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN2519335Y (en) * 2001-12-24 2002-10-30 华为技术有限公司 Controlling logic circuit of gate keeper dog

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100524114C (en) * 2006-08-21 2009-08-05 株式会社东芝 Control apparatus with fast i/o function, and control method for control data thereof
CN101957790B (en) * 2009-11-26 2012-11-07 上海大学 Implementation method of multi-source watchdog of microcontroller
CN102642472A (en) * 2011-02-17 2012-08-22 上海航鼎电子科技发展有限公司 Method and device for power management and deadlock protective control of vehicle-mounted positioning and tracking equipment
CN102642472B (en) * 2011-02-17 2014-06-25 上海航鼎电子科技发展有限公司 Method and device for power management and deadlock protective control of vehicle-mounted positioning and tracking equipment
CN102736967A (en) * 2011-04-13 2012-10-17 鸿富锦精密工业(深圳)有限公司 Test system and method of watchdog timer
CN102999039A (en) * 2011-09-14 2013-03-27 株式会社京滨 Electronic control device
US8996927B2 (en) 2011-09-14 2015-03-31 Keihin Corporation Electronic control device with watchdog timer and processing unit to diagnose malfunction of watchdog timer
CN102999039B (en) * 2011-09-14 2015-11-18 株式会社京滨 Electronic-controlled installation
CN108205490A (en) * 2016-12-19 2018-06-26 比亚迪股份有限公司 Software watchdog test method and device
CN109960599A (en) * 2017-12-14 2019-07-02 佛山市顺德区美的电热电器制造有限公司 Chip system and its house dog self checking method, electrical equipment
CN109086154A (en) * 2018-07-26 2018-12-25 郑州云海信息技术有限公司 One kind is for detecting BIOS watchdog function inverse timing device and method
CN109086154B (en) * 2018-07-26 2022-02-18 郑州云海信息技术有限公司 Device and method for detecting countdown of BIOS watchdog function

Also Published As

Publication number Publication date
CN1323500C (en) 2007-06-27

Similar Documents

Publication Publication Date Title
CN105261329B (en) More LED display modules management methods
CN1543097A (en) Function testing method and system for hardware watchdog
CN100511148C (en) CPU system starting method and system
US20080046784A1 (en) Method, system and programming language for device diagnostics and validation
CN105653330A (en) SD card based NorFlash programming system and method
CN219512630U (en) MCU multichannel burning device
CN101377538B (en) Microprocessor aging test system and test method
CN101950265B (en) Method for CPU board card program downloading and hardware online detection and plug-in connector
CN1740992A (en) The BIOS on-line rewriting method
CN108563452A (en) A kind of method and system of embedded scm automatic online programming program
CN106354598A (en) One-time programmable microcontroller debugging method based on flash memory
CN109933385A (en) A kind of page loading method, device, system and medium
CN105357799A (en) LED display module management apparatus
CN109739783A (en) Read and/or write simultaneously the device of more optical module EEPROM
CN106919525A (en) A kind of USB device clustered control apparatus and system
CN113315675A (en) White box switch U-Boot automatic testing method, system and storage medium
CN101354673B (en) SPD chip error information simulation apparatus of memory
CN101030159A (en) Apparatus and system for testing host slot
CN103389438B (en) A kind of for the welding detection system with cpu pcb and method
CN103823662A (en) Programming mode entry switching control method and programming mode entry switching control device
CN103309787A (en) Detection method of nonstandard USB protocol compatibility
CN113238767A (en) Interface multiplexing method, air conditioner external unit and readable storage medium
CN109634534B (en) Method for quickly judging capacity of memory chip
EP1117046B1 (en) Real time internal bus state monitoring system and method
CN113436671B (en) SPI NOR FLASH test platform, test method, test device and electronic equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CX01 Expiry of patent term

Granted publication date: 20070627

CX01 Expiry of patent term