CN104750568A - Abnormal forced resetting type watchdog circuit of microcontroller - Google Patents
Abnormal forced resetting type watchdog circuit of microcontroller Download PDFInfo
- Publication number
- CN104750568A CN104750568A CN201510174696.4A CN201510174696A CN104750568A CN 104750568 A CN104750568 A CN 104750568A CN 201510174696 A CN201510174696 A CN 201510174696A CN 104750568 A CN104750568 A CN 104750568A
- Authority
- CN
- China
- Prior art keywords
- pin
- circuit
- counter module
- mcu
- module
- 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
Links
Abstract
The invention discloses an abnormal forced resetting type watchdog circuit of a microcontroller. The watchdog circuit comprises a first CD4017 counter module, a second CD4017 counter module, a 555 oscillator circuit module and a level conversion circuit module. The abnormal forced returning type watchdog circuit can overcome the shortages of simple feeding condition and easy error feeding of the common watchdog; the pulse cycle can be independently adjusted to achieve long-time power-off forced resetting function; the circuit is a practical and an effective MCU monitoring circuit; the phenomena of program runaway and dead locking can be effectively solved.
Description
Technical field
The present invention relates to microcontroller in embedded system (MCU) software and run reset when flying and the forced resetting circuit under hardware deadlock situation.
Background technology
Microcontroller (MCU) is because being subject to external interference or other cause influence in embedded systems, often there will be the phenomenon of deadlock or program fleet, causes product cisco unity malfunction.Industry uses watchdog technique to solve this problem, and system reset deadlock or race flown by house dog also makes it normally work.House dog is divided into microcontroller house dog and outer watchdog.Inner house dog utilizes MCU internal resource to realize, and comprises internal proprietary house dog or uses timer internal to realize watchdog function.Open after watchdog function, MCU will by software regular to timer again initialize or clearing (feeding dog), once MCU is abnormal, timer will overflow, and internal hardware meeting carry out reset operation to MCU automatically.Outer watchdog refers to the situation increasing watchdog chip or circuit realiration watchdog function in MCU outside.Substantially all use external dedicated watchdog chip at present, pole individual product can use the watchdog circuit of outside designed, designed.Because watchdog chip can meet reset demand during conventional MCU exception.Outer watchdog is opened when powering on, and MCU needs to realize feeding dog function, once MCU is abnormal by the level change of IO pin, feed dog control pin change time-out, outer watchdog will produce reset signal, and reset signal is added to the external reset pin of MCU, makes system reset.
External special watchdog chip or circuit are actually a special timer, when timing then, send overflow pulse, this Puled input on the external reset pin of single-chip microcomputer, thus realizes system reset.Software in time performs dog feeding operation (removing outer watchdog by controlling pin change) in main program cycle, and when guarantee system is normally run, house dog is not overflowed; And when system cloud gray model is abnormal, house dog time-out sends overflow pulse, makes monolithic processor resetting by the RESET pin of single-chip microcomputer.This mode compares internal hardware house dog and software watchdog is more reliable, does not exist and causes because of electrification reset failure the possibility that inner house dog and software watchdog lost efficacy, and shortcoming needs outer distribution chip or circuit.Integrated watchdog circuit conventional is at present a lot, as DS1232, MAX705 ~ 708, MAX791 etc.Fig. 1 is the circuit diagram of DS1232 chip and AT89C52 chip, and single-chip microcomputer is by the feeding-dog signal of P3.3 foot control DS1232, and this feeding-dog signal provided in the opportune moment of master routine, and ensure that DS1232 chip does not overflow, RST pin then remains low level; When single chip microcomputer halt, P3.3 pin no longer provides feeds dog pulse, then after when DS1232 is timed to, RST pin exports high level pulse by monolithic processor resetting.
, there is following defect in existing watchdog circuit:
1, the inner house dog of MCU when this function is not opened by software by inoperative.Inner house dog will be lost efficacy when MCU deadlock.
2, outer watchdog is fed dog pin to be designed to Low level effective or high level effective, and when MCU crashes, the state of hello dog pin is indefinite.If consistent with the significant level that outer watchdog feeds dog pin, outer watchdog will be caused to lose efficacy.
3, to feed dog condition simple for outer watchdog, is generally low and high level and changes, system be interfered or MCU software anomaly time easy mistake generation hello dog condition, make outer watchdog cisco unity malfunction.
4, outer watchdog reset signal is directly connected on the resetting pin of MCU, and when MCU deadlock, MCU internal protection gets up, can not normal reset MCU by this pin.
5, outer watchdog be with MCU resetting pin with the use of, reset level is all shorter for effective time, generally at Millisecond, is not suitable for carrying out power-off restoration.All contain larger electric capacity in system, the electric quantity consumption of storage can not effectively fall by the power failure of Millisecond, therefore can not realize power-off restoration.
Summary of the invention
The object of the present invention is to provide the watchdog circuit of the abnormal forced resetting of a kind of reliable microcontroller, make MCU no matter fly, with under deadlock situation, all can effectively reset to system in software race, thus the reliability service of the system of guarantee, product.
The watchdog circuit of the abnormal forced resetting of microcontroller of the present invention, comprises a CD4017 counter module, the 2nd CD4017 counter module, 555 pierce circuit modules and level shifting circuit module;
Described level shifting circuit, voltage transitions for the feeding-dog signal inputted by MCU becomes the voltage with a CD4017 counters match, its input end connects the output pin of MCU feeding-dog signal, its output terminal connects the Puled input pin (CLK pin) of a CD4017 counter module, and the feeding-dog signal after level shifting circuit conversion is input to a CD4017 counter module;
Described 555 pierce circuit modules, for the pulse signal of generating period, and are transported to the resetting pin (RST pin) of a CD4017 counter module and the Puled input pin (CLK pin) of the 2nd CD4017 counter module by the pulse signal of generation;
A described CD4017 counter module, its Puled input pin (CLK pin) connects the output terminal of level switch module, resetting pin (RST pin) is then connected with the output terminal of 555 pierce circuit modules, and its data output pin Q8 pin is then connected to the resetting pin (RST pin) of the 2nd CD4017 counter module; It feeds dog pulse by ten, changes into a pulse signal and is supplied to the second counter as reset signal;
2nd CD4017 counter module, its frequency input pin (CLK pin) connects the output terminal of 555 pierce circuit modules, its resetting pin (RST pin) connects the data output pin Q8 of a CD4017 technology device module, its data output pin Q9 is then connected to the power circuit that control MCU works, by power circuit control to the power supply of MCU and power failure; It receives the pulse signal of 555 vibrator circuit modules and the reset signal of a CD4017 counter module, the power supply of control MCU and power failure.
555 pierce circuit modules, the pulse signal in any dutycycle and cycle can be produced, this pulse signal provides Puled input for the 2nd CD4017 counter module, one CD4017 counter module resets by the high level of each pulse simultaneously, and the RST pin high level of a CD4017 counter module is effective.
When the resetting pin (RST) of the 2nd CD4017 counter module remains low level, when namely not performing effective hello dog, continuous 9 pulses that 555 pierce circuit modules produce can make the data output pin Q9 of the 2nd CD4017 counter module become high level from low level, now MCU power circuit can turn off the power supply of MCU, and house dog performs power down function.After time delay to the one-period of 555 pierce circuit modules, the 10th pulse produced can make the data output pin Q9 of the 2nd CD4017 counter module become low level from high level, now MCU power circuit will re-power MCU and other element, and now house dog executes power-off restoration function.Feeding-dog signal input pin (WatchDog) to be continued through within the time of 555 pierce circuit module output low levels when MCU normally runs and input 10 pulses to watchdog circuit, the data output pin Q8 of a CD4017 counter module is made to produce 1 high level pulse, the resetting pin (RST) that this high level pulse is applied to the 2nd CD4017 counter module makes the 2nd CD4017 counter module reset (again counting), is once effectively feed dog like this.As long as performed 1 time effectively feed dog in front 8 pulses of 555 pierce circuit modules, the 2nd CD4017 counter module just can count again, which decreases the complexity of MCU program.
Watchdog circuit of the present invention, overcome common house dog and feed dog condition simply, easily fed the shortcoming of dog, simultaneously because the recurrence interval can from Row sum-equal matrix by mistake, can realize the power-off forced resetting function of long period, be very practical and effective MCU monitoring circuit.Application testing in commercial production, proves effective settlement procedure race to fly and deadlock situation.
Watchdog circuit of the present invention, hello dog level demand continuous 10 pulse signals within the set time are just effective.Improve and feed the complicacy of dog, the level change of feeding dog pin that abnormal and interference is caused can not be consistent with effective feeding-dog signal, thus avoid producing and miss hello dog phenomenon, and house dog was lost efficacy.
Meanwhile, its house dog is performed when resetting and is not resetted by the reset pin of MCU, but adopts direct power-off, time delay, the forced resetting mode that re-powers.To be so no matter that software race flies or deadlock situation, effective reset can be realized.
Accompanying drawing explanation
Fig. 1 is a kind of schematic diagram of existing watchdog circuit.
Fig. 2 is the schematic diagram of watchdog circuit of the present invention.
Fig. 3 is LM2575-3.3 voltage regulator module circuit diagram.
Embodiment
As Fig. 2, a kind of watchdog circuit, comprises a CD4017 counter module, the 2nd CD4017 counter module, 555 pierce circuit modules and level shifting circuit module; Described level shifting circuit, voltage transitions for the feeding-dog signal inputted by MCU becomes the voltage matched with a CD4017 counter module, its input end connects the output pin of MCU feeding-dog signal, its output terminal connects the Puled input pin (CLK pin) of a CD4017 counter module, and the feeding-dog signal after level shifting circuit conversion is input to a CD4017 counter module; Described 555 pierce circuit modules, for production burst signal, and are transported to the resetting pin (RST pin) of a CD4017 counter module and the Puled input pin (CLK pin) of the 2nd CD4017 counter module by the pulse signal of generation; A described CD4017 counter module, its Puled input pin (CLK pin) connects level switch module and obtains output terminal, resetting pin (RST pin) is then connected with the output terminal of 555 pierce circuit modules, and its data output pin Q8 pin is then connected to the resetting pin (RST pin) of the 2nd CD4017 counter module; 2nd CD4017 counter module, its Puled input pin (CLK pin) connects the output terminal of 555 pierce circuit modules, its resetting pin (RST pin) connects the data output pin Q8 of a CD4017 technology device module, its data output pin Q9 is then connected to the power circuit that control MCU works, and controls the power supply to MCU by power circuit.
Described 555 pierce circuit modules are 555 basic pierce circuits, it comprises ICM7555 chip, electric capacity C602 is connected between the 5th pin (Cvolt) and GND end of ICM7555 chip, electric capacity C601 is connected between THR end is held with GND, to hold with VCC at R end and be connected, TRIG end is held with THR and is connected, and is connected R602 at DIS end with between GND, between DIS end is held with VCC, be connected R601.The pulse in any dutycycle and cycle can be produced by the parameter adjusting R601, R602, C601.
Described level shifting circuit module is switch triode circuit, during Watch_Dog input low level, exports as high level+12V, matches with a CD4017 counter power supply; During Watch_Dog input high level, export as low level.
The data output pin Q9 of the 2nd CD4017 counter module can connect the 5th pin of LM2575-3.3 voltage stabilizer, by the power supply of LM2575-3.3 voltage regulator module control MCU, as Fig. 3.When the data output pin Q9 output level of the 2nd CD4017 counter module is high level, perform turn-off function, turned off by+3.3V voltage, the MCU now powered by+3.3V and other element will have a power failure, and now house dog performs power failure function.
When after time delay to the one-period of 555 pierce circuit modules, the 10th pulse produced can make the data output pin Q9 of the 2nd CD4017 counter module become low level from high level, now the 5th pin of LM2575-3.3 is low level, its turn-off function lost efficacy, continuation is powered by+3.3V voltage, powered operation again incited somebody to action by the MCU now powered by+3.3V and other element, and now house dog executes power-off restoration function.
Claims (1)
1. a watchdog circuit for the abnormal forced resetting of microcontroller, comprises a CD4017 counter module, the 2nd CD4017 counter module, 555 pierce circuit modules and level shifting circuit module;
Described level shifting circuit, voltage transitions for the feeding-dog signal inputted by MCU becomes the voltage with a CD4017 counters match, its input end connects the output pin of MCU feeding-dog signal, its output terminal connects the Puled input pin (CLK pin) of a CD4017 counter module, and the feeding-dog signal after level shifting circuit conversion is input to a CD4017 counter module;
Described 555 pierce circuit modules, for the pulse signal of generating period, and are transported to the resetting pin (RST pin) of a CD4017 counter module and the Puled input pin (CLK pin) of the 2nd CD4017 counter module by the pulse signal of generation;
A described CD4017 counter module, its Puled input pin (CLK pin) connects the output terminal of level switch module, resetting pin (RST pin) is then connected with the output terminal of 555 pierce circuit modules, and its data output pin Q8 pin is then connected to the resetting pin (RST pin) of the 2nd CD4017 counter module; It feeds dog pulse by ten, changes into a pulse signal and is supplied to the second counter as reset signal;
2nd CD4017 counter module, its frequency input pin (CLK pin) connects the output terminal of 555 pierce circuit modules, its resetting pin (RST pin) connects the data output pin Q8 of a CD4017 technology device module, its data output pin Q9 is then connected to the power circuit that control MCU works, by power circuit control to the power supply of MCU and power failure; It receives the pulse signal of 555 vibrator circuit modules and the reset signal of a CD4017 counter module, the power supply of control MCU and power failure.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510174696.4A CN104750568B (en) | 2015-04-14 | 2015-04-14 | A kind of watchdog circuit of microcontroller exception forced resetting |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510174696.4A CN104750568B (en) | 2015-04-14 | 2015-04-14 | A kind of watchdog circuit of microcontroller exception forced resetting |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104750568A true CN104750568A (en) | 2015-07-01 |
CN104750568B CN104750568B (en) | 2019-03-26 |
Family
ID=53590308
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510174696.4A Active CN104750568B (en) | 2015-04-14 | 2015-04-14 | A kind of watchdog circuit of microcontroller exception forced resetting |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104750568B (en) |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105045673A (en) * | 2015-08-17 | 2015-11-11 | 浙江众合科技股份有限公司 | Watchdog circuit suitable for safety output |
CN107340763A (en) * | 2016-05-26 | 2017-11-10 | 上海拿森汽车电子有限公司 | Electric boosting steering system and its control method based on outer watchdog |
CN107463460A (en) * | 2017-08-15 | 2017-12-12 | 深圳科士达科技股份有限公司 | A kind of electric supply system and method for supplying power to based on hardware watchdog |
CN110173803A (en) * | 2019-05-10 | 2019-08-27 | 广东美的制冷设备有限公司 | Air conditioner and its communication control method, device and electronic equipment |
CN112564680A (en) * | 2020-12-09 | 2021-03-26 | 杭州乾龙电器有限公司 | Power-on time delay hardware automatic reset circuit |
CN112965412A (en) * | 2021-02-02 | 2021-06-15 | 广州大学华软软件学院 | MCU unit resetting method and system and CAN anti-interference communication device |
CN114860493A (en) * | 2022-05-16 | 2022-08-05 | 深圳市诚金晖精密机械有限公司 | Monitoring circuit for core board of intelligent container |
CN115658376A (en) * | 2022-12-28 | 2023-01-31 | 北京蓝色星际科技股份有限公司 | Reset circuit, electronic equipment, monitoring camera and hard disk video recorder |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100036517A1 (en) * | 2008-08-06 | 2010-02-11 | Asm Japan K.K. | Semiconductor manufacturing apparatus |
CN203535627U (en) * | 2013-09-29 | 2014-04-09 | 深圳市邦彦信息技术有限公司 | Watchdog circuit |
CN204515759U (en) * | 2015-04-14 | 2015-07-29 | 广州市智博光辉电气科技有限公司 | The watchdog circuit of the abnormal forced resetting of a kind of microcontroller |
-
2015
- 2015-04-14 CN CN201510174696.4A patent/CN104750568B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100036517A1 (en) * | 2008-08-06 | 2010-02-11 | Asm Japan K.K. | Semiconductor manufacturing apparatus |
CN203535627U (en) * | 2013-09-29 | 2014-04-09 | 深圳市邦彦信息技术有限公司 | Watchdog circuit |
CN204515759U (en) * | 2015-04-14 | 2015-07-29 | 广州市智博光辉电气科技有限公司 | The watchdog circuit of the abnormal forced resetting of a kind of microcontroller |
Non-Patent Citations (1)
Title |
---|
郑锋等: "《51单片机应用系统典型模块开发大全第三版》", 30 November 2013, 中国铁道出版社 * |
Cited By (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105045673A (en) * | 2015-08-17 | 2015-11-11 | 浙江众合科技股份有限公司 | Watchdog circuit suitable for safety output |
CN107340763B (en) * | 2016-05-26 | 2023-08-08 | 上海拿森汽车电子有限公司 | Electric power steering system based on external watchdog and control method thereof |
CN107340763A (en) * | 2016-05-26 | 2017-11-10 | 上海拿森汽车电子有限公司 | Electric boosting steering system and its control method based on outer watchdog |
CN107463460A (en) * | 2017-08-15 | 2017-12-12 | 深圳科士达科技股份有限公司 | A kind of electric supply system and method for supplying power to based on hardware watchdog |
CN107463460B (en) * | 2017-08-15 | 2024-01-30 | 深圳科士达科技股份有限公司 | Power supply system and power supply method based on hardware watchdog |
CN110173803A (en) * | 2019-05-10 | 2019-08-27 | 广东美的制冷设备有限公司 | Air conditioner and its communication control method, device and electronic equipment |
CN112564680A (en) * | 2020-12-09 | 2021-03-26 | 杭州乾龙电器有限公司 | Power-on time delay hardware automatic reset circuit |
CN112564680B (en) * | 2020-12-09 | 2023-10-20 | 杭州乾龙电器有限公司 | Automatic reset circuit for power-on time-delay hardware |
CN112965412B (en) * | 2021-02-02 | 2022-02-22 | 广州大学华软软件学院 | MCU unit resetting method and system and CAN anti-interference communication device |
CN112965412A (en) * | 2021-02-02 | 2021-06-15 | 广州大学华软软件学院 | MCU unit resetting method and system and CAN anti-interference communication device |
CN114860493A (en) * | 2022-05-16 | 2022-08-05 | 深圳市诚金晖精密机械有限公司 | Monitoring circuit for core board of intelligent container |
CN115658376B (en) * | 2022-12-28 | 2023-04-07 | 北京蓝色星际科技股份有限公司 | Reset circuit, electronic equipment, surveillance camera and digital video recorder |
CN115658376A (en) * | 2022-12-28 | 2023-01-31 | 北京蓝色星际科技股份有限公司 | Reset circuit, electronic equipment, monitoring camera and hard disk video recorder |
Also Published As
Publication number | Publication date |
---|---|
CN104750568B (en) | 2019-03-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104750568A (en) | Abnormal forced resetting type watchdog circuit of microcontroller | |
CN204515759U (en) | The watchdog circuit of the abnormal forced resetting of a kind of microcontroller | |
CN105468470B (en) | A kind of D triggering house dog MCU monitoring circuit and its application method | |
US9612893B2 (en) | Peripheral watchdog timer | |
CN102163071B (en) | Control circuit and power control method during reset thereof | |
CN112306752B (en) | Automatic power-down restarting circuit and corresponding gateway of Internet of things | |
CN102866928A (en) | Watchdog circuit with power supply managing function | |
CN207115391U (en) | A kind of automatic reset circuit | |
CN104572331B (en) | The monitoring module enabled with power monitoring and delayed | |
CN114116270A (en) | Novel embedded system monitoring method | |
CN105446446A (en) | Power supply control device and method of hardware watchdog | |
CN205263730U (en) | Novel IO riser integrated circuit board based on POWER platform | |
CN104461756A (en) | Watchdog circuit for low-power-consumption equipment | |
CN208316365U (en) | A kind of power down time extends circuit and power control circuit | |
CN216485106U (en) | Power-saving acoustic Doppler current profiler | |
CN104333359B (en) | Restart protection circuit suitable for the microprocessing systems many condition of Intelligent bracelet | |
CN203746007U (en) | Microprocessor management circuit for self-powered microprocessor protection device | |
CN203386143U (en) | Remote machine reset device | |
CN202615379U (en) | Watchdog resetting circuit | |
CN109032883A (en) | A kind of software and hardware house dog structure and implementation method applied to stand module | |
CN107783859B (en) | Watchdog circuit capable of configuring reset duration and timing duration | |
CN207067727U (en) | Wireless awakening SCM system | |
CN203535627U (en) | Watchdog circuit | |
CN201181443Y (en) | Time-delay reset control circuit | |
CN206270937U (en) | A kind of hardware watchdog circuit suitable for operating system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
TA01 | Transfer of patent application right | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20180822 Address after: 511450 No. 26 Jin Yu Street, lotus road, Sha Chung Village, Panyu District, Guangzhou, Guangdong Applicant after: GUANGDONG CORRECTITUDE POWER CURRENCY ELECTRIC CO., LTD. Address before: 511450 two, 26 Jin Yu Street, lotus road, Sha Chung Village, Panyu District, Guangzhou, Guangdong. Applicant before: The rich radiance of Guangzhou intelligence electrically Science and Technology Ltd. |
|
GR01 | Patent grant | ||
GR01 | Patent grant |