CN118245266B - Watchdog circuit and control method thereof - Google Patents
Watchdog circuit and control method thereof Download PDFInfo
- Publication number
- CN118245266B CN118245266B CN202410627973.1A CN202410627973A CN118245266B CN 118245266 B CN118245266 B CN 118245266B CN 202410627973 A CN202410627973 A CN 202410627973A CN 118245266 B CN118245266 B CN 118245266B
- Authority
- CN
- China
- Prior art keywords
- control unit
- watchdog
- pin
- signal
- reset
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 23
- 230000002159 abnormal effect Effects 0.000 claims description 2
- 238000010586 diagram Methods 0.000 description 10
- 238000006243 chemical reaction Methods 0.000 description 7
- 239000003990 capacitor Substances 0.000 description 6
- 101100233916 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) KAR5 gene Proteins 0.000 description 5
- 239000013072 incoming material Substances 0.000 description 4
- 101001121408 Homo sapiens L-amino-acid oxidase Proteins 0.000 description 3
- 102100026388 L-amino-acid oxidase Human genes 0.000 description 3
- 101100012902 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) FIG2 gene Proteins 0.000 description 2
- 101100489713 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) GND1 gene Proteins 0.000 description 2
- 238000001514 detection method Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 101000827703 Homo sapiens Polyphosphoinositide phosphatase Proteins 0.000 description 1
- 102100023591 Polyphosphoinositide phosphatase Human genes 0.000 description 1
- 101100489717 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) GND2 gene Proteins 0.000 description 1
- 230000033228 biological regulation Effects 0.000 description 1
- 230000005672 electromagnetic field Effects 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 230000009191 jumping Effects 0.000 description 1
- 230000002045 lasting effect Effects 0.000 description 1
- 230000006641 stabilisation Effects 0.000 description 1
- 238000011105 stabilization Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/0703—Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
- G06F11/0751—Error or fault detection not based on redundancy
- G06F11/0754—Error or fault detection not based on redundancy by exceeding limits
- G06F11/0757—Error or fault detection not based on redundancy by exceeding limits by exceeding a time limit, i.e. time-out, e.g. watchdogs
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F1/00—Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
- G06F1/24—Resetting means
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F1/00—Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
- G06F1/26—Power supply means, e.g. regulation thereof
- G06F1/266—Arrangements to supply power to external peripherals either directly from the computer or under computer control, e.g. supply of power through the communication port, computer controlled power-strips
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Debugging And Monitoring (AREA)
Abstract
本发明公开了一种看门狗电路及其控制方法,属于电子电路技术领域。看门狗电路包括看门狗芯片;看门狗芯片包括第一引脚、第二引脚和第三引脚;第一引脚连接主控单元的喂狗信号输出端,第一引脚用于接收主控单元发出的喂狗信号;第二引脚连接主控单元的复位端;看门狗芯片用于在看门狗功能开启的情况下,在第一引脚在第一预设时间内未接收到喂狗信号时,控制第二引脚发送第一复位信号至主控单元的复位端,使主控单元复位;第三引脚接入控制信号,看门狗芯片还用于根据控制信号确定是否关闭看门狗功能。本发明实施例提供的看门狗电路结构简单,控制逻辑简单易用,功能实现简单,极大的减少了占用的电路资源和成本。
The present invention discloses a watchdog circuit and a control method thereof, and belongs to the technical field of electronic circuits. The watchdog circuit includes a watchdog chip; the watchdog chip includes a first pin, a second pin and a third pin; the first pin is connected to the dog feeding signal output end of the main control unit, and the first pin is used to receive the dog feeding signal sent by the main control unit; the second pin is connected to the reset end of the main control unit; the watchdog chip is used to control the second pin to send a first reset signal to the reset end of the main control unit when the first pin does not receive the dog feeding signal within a first preset time when the watchdog function is turned on, so as to reset the main control unit; the third pin is connected to a control signal, and the watchdog chip is also used to determine whether to turn off the watchdog function according to the control signal. The watchdog circuit provided by the embodiment of the present invention has a simple structure, simple and easy-to-use control logic, simple function implementation, and greatly reduces the occupied circuit resources and costs.
Description
技术领域Technical Field
本发明实施例涉及电子电路技术领域,尤其涉及一种看门狗电路及其控制方法。The embodiments of the present invention relate to the technical field of electronic circuits, and in particular to a watchdog circuit and a control method thereof.
背景技术Background Art
在计算机控制系统中,常常会受到来自外界电磁场的干扰,造成计算机控制系统中程序的跑飞,而陷入死循环。出于对计算机中主控系统运行状态进行实时监测的考虑,便产生了一种专门用于监测主控系统程序运行状态的芯片,俗称看门狗。In computer control systems, interference from external electromagnetic fields often occurs, causing the program in the computer control system to run away and fall into an infinite loop. In order to monitor the running status of the main control system in the computer in real time, a chip specifically used to monitor the running status of the main control system program was developed, commonly known as a watchdog.
看门狗能够在系统或电路在受到干扰的情况下,使主控系统自动进行复位,重新启动并正常工作,从而保证系统从软、硬件错误中恢复正常的运行,防止系统工作异常。然而,现有技术中看门狗电路中所需的管脚较多,电路实现繁琐,功能实现复杂,看门狗电路占用电路资源较多,成本较高。The watchdog can automatically reset the main control system, restart and work normally when the system or circuit is disturbed, thereby ensuring that the system recovers normal operation from software and hardware errors and preventing the system from working abnormally. However, in the prior art, the watchdog circuit requires many pins, the circuit implementation is cumbersome, the function implementation is complex, the watchdog circuit occupies more circuit resources, and the cost is high.
发明内容Summary of the invention
本发明提供一种看门狗电路及其控制方法,以简化看门狗电路结构,使看门狗电路的控制逻辑简单易用,极大的减少了电路资源和成本。The present invention provides a watchdog circuit and a control method thereof, so as to simplify the structure of the watchdog circuit, make the control logic of the watchdog circuit simple and easy to use, and greatly reduce circuit resources and costs.
第一方面,本发明实施例提供了一种看门狗电路,包括看门狗芯片;所述看门狗芯片包括第一引脚、第二引脚和第三引脚;In a first aspect, an embodiment of the present invention provides a watchdog circuit, including a watchdog chip; the watchdog chip includes a first pin, a second pin, and a third pin;
所述第一引脚连接主控单元的喂狗信号输出端,所述第一引脚用于接收所述主控单元发出的喂狗信号;The first pin is connected to the dog feeding signal output terminal of the main control unit, and the first pin is used to receive the dog feeding signal sent by the main control unit;
所述第二引脚连接所述主控单元的复位端;所述看门狗芯片用于在看门狗功能开启的情况下,在所述第一引脚在第一预设时间内未接收到所述喂狗信号时,控制所述第二引脚发送第一复位信号至所述主控单元的复位端,使所述主控单元复位;以及,所述看门狗芯片用于在所述看门狗功能关闭的情况下,控制所述第二引脚停止输出所述第一复位信号;The second pin is connected to the reset end of the main control unit; the watchdog chip is used to control the second pin to send a first reset signal to the reset end of the main control unit when the first pin does not receive the dog feeding signal within a first preset time when the watchdog function is turned on, so as to reset the main control unit; and the watchdog chip is used to control the second pin to stop outputting the first reset signal when the watchdog function is turned off;
所述第三引脚接入控制信号,所述看门狗芯片还用于根据所述控制信号确定是否关闭所述看门狗功能。The third pin is connected to a control signal, and the watchdog chip is further used to determine whether to turn off the watchdog function according to the control signal.
进一步的,看门狗电路还包括:电压控制单元;所述电压控制单元的第一输入端接入第一电源信号,所述电压控制单元的第二输入端接入第二电源信号,所述电压控制单元的输出端连接所述第三引脚;所述电压控制单元用于将所述第一电源信号或所述第二电源信号作为所述控制信号输出;所述第一电源信号与所述第二电源信号的电压不同;Furthermore, the watchdog circuit further includes: a voltage control unit; a first input end of the voltage control unit is connected to a first power supply signal, a second input end of the voltage control unit is connected to a second power supply signal, and an output end of the voltage control unit is connected to the third pin; the voltage control unit is used to output the first power supply signal or the second power supply signal as the control signal; the voltage of the first power supply signal is different from that of the second power supply signal;
其中,所述看门狗芯片用于在所述第三引脚接收所述第一电源信号时开启所述看门狗功能,在所述第三引脚接收所述第二电源信号时关闭所述看门狗功能。The watchdog chip is used to enable the watchdog function when the third pin receives the first power signal, and to disable the watchdog function when the third pin receives the second power signal.
进一步的,所述电压控制单元包括:跳帽和第一电阻;Further, the voltage control unit includes: a jumper cap and a first resistor;
所述第一电阻的第一端连接所述电压控制单元的第一输入端,所述跳帽的第一端连接所述电压控制单元的第二输入端,所述跳帽的第二端分别连接所述第一电阻的第二端和所述电压控制单元的输出端。The first end of the first resistor is connected to the first input end of the voltage control unit, the first end of the jumper cap is connected to the second input end of the voltage control unit, and the second end of the jumper cap is respectively connected to the second end of the first resistor and the output end of the voltage control unit.
进一步的,所述第三引脚还与所述主控单元的信号接收端连接;Furthermore, the third pin is also connected to a signal receiving end of the main control unit;
所述看门狗芯片还用于在上电后,检测到所述第三引脚接收的所述控制信号持续第三预设时间为所述第二电源信号时,控制所述第三引脚发送方波信号至所述主控单元的信号接收端;其中,所述主控单元用于在接收到所述方波信号时,判定所述看门狗芯片内的看门狗程序正常,所述看门狗芯片能够执行所述看门狗功能。The watchdog chip is also used to control the third pin to send a square wave signal to the signal receiving end of the main control unit when it detects that the control signal received by the third pin continues to be the second power signal for a third preset time after power-on; wherein, the main control unit is used to determine that the watchdog program in the watchdog chip is normal when receiving the square wave signal, and the watchdog chip can execute the watchdog function.
进一步的,所述看门狗芯片还包括第四引脚;Furthermore, the watchdog chip further includes a fourth pin;
所述第四引脚与电源控制单元的控制端连接,所述电源控制单元用于对所述主控单元供电;所述看门狗芯片还用于在所述看门狗功能开启的情况下,在所述第二引脚发送至少两次所述第一复位信号至所述主控单元后,在第二预设时间内检测到所述第一引脚仍未收到所述喂狗信号时,通过所述第四引脚发送重启控制信号至所述电源控制单元,使所述电源控制单元根据所述重启控制信号控制所述主控单元断电并重启;其中,所述第二预设时间大于所述第一预设时间。The fourth pin is connected to the control end of the power control unit, and the power control unit is used to supply power to the main control unit; the watchdog chip is also used to, when the watchdog function is turned on, after the second pin sends the first reset signal to the main control unit at least twice, when it is detected that the first pin still does not receive the dog feeding signal within a second preset time, send a restart control signal to the power control unit through the fourth pin, so that the power control unit controls the main control unit to power off and restart according to the restart control signal; wherein, the second preset time is greater than the first preset time.
进一步的,看门狗电路还包括第三电阻,所述第三电阻的第一端连接所述主控单元的复位端,所述第三电阻的第二端接入第一电源信号。Furthermore, the watchdog circuit also includes a third resistor, a first end of the third resistor is connected to the reset end of the main control unit, and a second end of the third resistor is connected to the first power supply signal.
进一步的,看门狗电路还包括复位芯片;Furthermore, the watchdog circuit also includes a reset chip;
所述复位芯片的电源端接入第一电源信号,所述复位芯片的接地端接地,所述复位芯片的输出端连接所述主控单元的复位端;所述复位芯片用于在所述复位芯片上电时向所述主控单元的复位端发送第二复位信号,使所述主控单元复位。The power supply end of the reset chip is connected to the first power supply signal, the ground end of the reset chip is grounded, and the output end of the reset chip is connected to the reset end of the main control unit; the reset chip is used to send a second reset signal to the reset end of the main control unit when the reset chip is powered on, so as to reset the main control unit.
进一步的,看门狗电路还包括:看门狗电路电源,所述看门狗电路电源用于提供所述第一电源信号;Further, the watchdog circuit further comprises: a watchdog circuit power supply, the watchdog circuit power supply being used to provide the first power supply signal;
所述看门狗芯片还包括第五引脚和第六引脚,所述第五引脚接入所述第一电源信号,所述第六引脚接地。The watchdog chip further includes a fifth pin and a sixth pin, wherein the fifth pin is connected to the first power supply signal, and the sixth pin is grounded.
第二方面,本发明实施例还提供了一种看门狗电路控制方法,应用于本发明任一实施例中所述的看门狗电路,由所述看门狗芯片执行,所述看门狗电路控制方法包括:In a second aspect, an embodiment of the present invention further provides a watchdog circuit control method, which is applied to the watchdog circuit described in any embodiment of the present invention and is executed by the watchdog chip. The watchdog circuit control method includes:
根据控制信号判断是否关闭所述看门狗电路的看门狗功能;Determining whether to turn off the watchdog function of the watchdog circuit according to the control signal;
在所述看门狗功能开启的情况下,当第一引脚在第一预设时间内未接收到喂狗信号时,控制第二引脚发送第一复位信号至主控单元的复位端,使所述主控单元复位。When the watchdog function is turned on, when the first pin does not receive a dog feeding signal within a first preset time, the second pin is controlled to send a first reset signal to a reset end of the main control unit to reset the main control unit.
进一步的,所述看门狗芯片还包括第四引脚;所述看门狗电路控制方法还包括:Furthermore, the watchdog chip further includes a fourth pin; and the watchdog circuit control method further includes:
在所述看门狗功能开启的情况下,在所述第二引脚发送至少两次所述第一复位信号至所述主控单元后,在第二预设时间内检测到所述第一引脚仍未收到所述喂狗信号时,通过所述第四引脚发送重启控制信号至电源控制单元,使所述电源控制单元根据所述重启控制信号控制所述主控单元断电并重启;其中,所述第二预设时间大于所述第一预设时间;When the watchdog function is turned on, after the second pin sends the first reset signal to the main control unit at least twice, when it is detected that the first pin still does not receive the dog feeding signal within a second preset time, a restart control signal is sent to the power control unit through the fourth pin, so that the power control unit controls the main control unit to power off and restart according to the restart control signal; wherein the second preset time is greater than the first preset time;
所述通过所述第四引脚发送重启控制信号至电源控制单元,包括:The step of sending the restart control signal to the power control unit through the fourth pin includes:
控制所述第四引脚的输出电压为第一电压并持续第四预设时间后跳变为第二电压,使所述电源控制单元控制所述主控单元断电关机;Controlling the output voltage of the fourth pin to be the first voltage and then changing to the second voltage after the voltage lasts for a fourth preset time, so that the power control unit controls the main control unit to power off and shut down;
经过第五预设时间后,再控制所述第四引脚的输出电压为所述第一电压并持续第六预设时间后跳变为所述第二电压,使所述电源控制单元控制所述主控单元通电开机;其中,所述第六预设时间小于所述第四预设时间。After the fifth preset time, the output voltage of the fourth pin is controlled to be the first voltage and lasts for the sixth preset time before jumping to the second voltage, so that the power control unit controls the main control unit to power on; wherein the sixth preset time is less than the fourth preset time.
本发明提供了一种看门狗电路及其控制方法,看门狗电路包括看门狗芯片;看门狗芯片包括第一引脚、第二引脚和第三引脚;基于第三引脚接收的控制信号,看门狗芯片可以控制看门狗电路的看门狗功能是否启用,在必要时,例如主控单元进行固件烧录时,关闭看门狗功能可以有效避免主控单元被误重启,保证固件烧录等工作状态可以正常顺利进行。在看门狗功能开启的情况下,在第一引脚在第一预设时间内未接收到喂狗信号时,控制第二引脚发送第一复位信号至主控单元的复位端,使主控单元复位,可简便地实现看门狗电路的复位功能。因此,本发明实施例提供的看门狗电路,仅需要占用看门狗芯片的有限几个引脚,即可正常实现看门狗功能,并控制看门狗功能的打开或关闭。相比于现有技术,本发明实施例提供的看门狗电路结构简单,控制逻辑简单易用,功能实现简单,极大的减少了占用的电路资源和成本。The present invention provides a watchdog circuit and a control method thereof, wherein the watchdog circuit comprises a watchdog chip; the watchdog chip comprises a first pin, a second pin and a third pin; based on a control signal received by the third pin, the watchdog chip can control whether the watchdog function of the watchdog circuit is enabled, and when necessary, for example, when the main control unit is performing firmware burning, turning off the watchdog function can effectively prevent the main control unit from being restarted by mistake, and ensure that the working state such as firmware burning can proceed normally and smoothly. When the watchdog function is turned on, when the first pin does not receive a dog feeding signal within a first preset time, the second pin is controlled to send a first reset signal to the reset end of the main control unit, so that the main control unit is reset, and the reset function of the watchdog circuit can be easily realized. Therefore, the watchdog circuit provided in the embodiment of the present invention only needs to occupy a limited number of pins of the watchdog chip to normally realize the watchdog function and control the opening or closing of the watchdog function. Compared with the prior art, the watchdog circuit provided in the embodiment of the present invention has a simple structure, simple and easy-to-use control logic, and simple function implementation, which greatly reduces the occupied circuit resources and costs.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1为本发明实施例提供的一种看门狗电路的原理图。FIG1 is a schematic diagram of a watchdog circuit provided in an embodiment of the present invention.
图2为本发明实施例提供的一种看门狗芯片的结构示意图。FIG. 2 is a schematic diagram of the structure of a watchdog chip provided in an embodiment of the present invention.
图3是本发明实施例提供的另一种看门狗电路的结构示意图。FIG3 is a schematic diagram of the structure of another watchdog circuit provided by an embodiment of the present invention.
图4是本发明实施例提供的另一种看门狗电路的原理图。FIG. 4 is a schematic diagram of another watchdog circuit provided in an embodiment of the present invention.
图5为本发明实施例提供的一种看门狗电路电源的电路示意图。FIG5 is a circuit diagram of a watchdog circuit power supply provided in an embodiment of the present invention.
图6为本发明实施例提供的一种看门狗电路控制方法的流程图。FIG6 is a flow chart of a watchdog circuit control method provided by an embodiment of the present invention.
图7为本发明实施例提供的发送重启控制信号至电源控制单元的流程图。FIG. 7 is a flow chart of sending a restart control signal to a power control unit according to an embodiment of the present invention.
具体实施方式DETAILED DESCRIPTION
下面结合附图和实施例对本发明作进一步的详细说明。可以理解的是,此处所描述的具体实施例仅仅用于解释本发明,而非对本发明的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与本发明相关的部分而非全部结构。The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.
本发明实施例提供了一种看门狗电路。图1为本发明实施例提供的一种看门狗电路的原理图,图2为本发明实施例提供的一种看门狗芯片的结构示意图,如图1和图2所示,看门狗电路包括看门狗芯片110;看门狗芯片110包括第一引脚IOB1、第二引脚IOB2和第三引脚IOB3。第一引脚IOB1连接主控单元210的喂狗信号输出端WDI,第一引脚IOB1用于接收主控单元210发出的喂狗信号W1;第二引脚IOB2连接主控单元210的复位端RESET;看门狗芯片110用于在看门狗功能开启的情况下,在第一引脚IOB1在第一预设时间内未接收到喂狗信号W1时,控制第二引脚IOB2发送第一复位信号S1至主控单元210的复位端RESET,使主控单元210复位;以及,看门狗芯片110用于在看门狗功能关闭的情况下,控制第二引脚IOB2停止输出第一复位信号S1;第三引脚IOB3接入控制信号C1,看门狗芯片110还用于根据控制信号C1确定是否关闭看门狗功能。An embodiment of the present invention provides a watchdog circuit. FIG1 is a schematic diagram of a watchdog circuit provided by an embodiment of the present invention, and FIG2 is a schematic diagram of a structure of a watchdog chip provided by an embodiment of the present invention. As shown in FIG1 and FIG2, the watchdog circuit includes a watchdog chip 110; the watchdog chip 110 includes a first pin IOB1, a second pin IOB2, and a third pin IOB3. The first pin IOB1 is connected to the dog feeding signal output terminal WDI of the main control unit 210, and the first pin IOB1 is used to receive the dog feeding signal W1 sent by the main control unit 210; the second pin IOB2 is connected to the reset terminal RESET of the main control unit 210; the watchdog chip 110 is used to control the second pin IOB2 to send the first reset signal S1 to the reset terminal RESET of the main control unit 210 when the first pin IOB1 does not receive the dog feeding signal W1 within the first preset time when the watchdog function is turned on, so as to reset the main control unit 210; and the watchdog chip 110 is used to control the second pin IOB2 to stop outputting the first reset signal S1 when the watchdog function is turned off; the third pin IOB3 is connected to the control signal C1, and the watchdog chip 110 is also used to determine whether to turn off the watchdog function according to the control signal C1.
其中,看门狗芯片110可以是烧录有看门狗程序的单片机,例如为微控制器(MicroController Unit,MCU);第一引脚IOB1、第二引脚IOB2和第三引脚IOB3均为单片机上的引脚。主控单元210可以是计算机控制系统的主控系统,例如包括微处理器(Advanced RISCMachine,ARM)。示例性的,主控单元210为发光二极管行业发送卡系统。控制信号C1可以是高电平信号或低电平信号,可以由看门狗电路的中的相关控制硬件发送。喂狗信号W1可以是1Hz方波。第一预设时间可以根据主控单元210发出喂狗信号W1的时间间隔设置,可选的,第一预设时间大于主控单元210相邻两次发出喂狗信号W1的时间间隔,示例性的,第一预设时间为90s,本申请对此不做限定。Among them, the watchdog chip 110 can be a single-chip microcomputer with a watchdog program burned in it, such as a microcontroller (MicroController Unit, MCU); the first pin IOB1, the second pin IOB2 and the third pin IOB3 are all pins on the single-chip microcomputer. The main control unit 210 can be a main control system of a computer control system, for example, including a microprocessor (Advanced RISCMachine, ARM). Exemplarily, the main control unit 210 is a sending card system for the light-emitting diode industry. The control signal C1 can be a high-level signal or a low-level signal, which can be sent by the relevant control hardware in the watchdog circuit. The dog feeding signal W1 can be a 1Hz square wave. The first preset time can be set according to the time interval between the main control unit 210 sending the dog feeding signal W1. Optionally, the first preset time is greater than the time interval between two adjacent times when the main control unit 210 sends the dog feeding signal W1. Exemplarily, the first preset time is 90s, which is not limited in this application.
具体的,参考图1和图2,看门狗芯片110可以接收主控单元210发出的喂狗信号W1以及向主控单元210发送第一复位信号S1。在看门狗功能启用时,看门狗芯片110的第一引脚IOB1接收主控单元210发出的喂狗信号W1,在看门狗芯片110在第一预设时间内未接收到喂狗信号W1时,控制第二引脚IOB2发送第一复位信号S1至主控单元210的复位端RESET,使主控单元210复位,防止主控单元210程序跑飞。可以理解的是,看门狗芯片110每接收到一次喂狗信号W1时将前续的计时清零并重新开始计时。看门狗芯片110自接收到一次喂狗信号W1时开始计时,经过第一预设时间,仍未收到下一次喂狗信号W1,可判定主控单元210内部程序出现问题,无法按照规定的时间间隔有规律地发送喂狗信号W1,该情况下控制主控单元210复位,可有效防止主控单元210程序跑飞。Specifically, referring to FIG. 1 and FIG. 2 , the watchdog chip 110 can receive the dog-feeding signal W1 sent by the main control unit 210 and send the first reset signal S1 to the main control unit 210. When the watchdog function is enabled, the first pin IOB1 of the watchdog chip 110 receives the dog-feeding signal W1 sent by the main control unit 210. When the watchdog chip 110 does not receive the dog-feeding signal W1 within the first preset time, the second pin IOB2 is controlled to send the first reset signal S1 to the reset terminal RESET of the main control unit 210, so as to reset the main control unit 210 and prevent the program of the main control unit 210 from running away. It can be understood that each time the watchdog chip 110 receives the dog-feeding signal W1, the previous timing is cleared and the timing is restarted. The watchdog chip 110 starts timing when it receives a dog-feeding signal W1. If it does not receive the next dog-feeding signal W1 after a first preset time, it can be determined that there is a problem with the internal program of the main control unit 210 and the dog-feeding signal W1 cannot be sent regularly at the specified time interval. In this case, the main control unit 210 is controlled to reset, which can effectively prevent the program of the main control unit 210 from running away.
看门狗芯片110还可以自第三引脚IOB3接收控制信号C1,并根据控制信号C1确定是否关闭看门狗功能。具体地,在看门狗芯片110的第三引脚IOB3收到的控制信号C1为第二电平时,看门狗芯片110关闭看门狗功能,控制第二引脚IOB2停止发送第一复位信号S1,示例性的,第二电平为低电平。当第三引脚IOB3为低电平时,看门狗芯片110关闭看门狗功能,即使第一引脚IOB1在第一预设时间内未接收到喂狗信号W1,第二引脚IOB2也不发送第一复位信号S1。示例性地,在主控单元210进行调试、固件烧录或其他可能不能及时发送喂狗信号W1但需要维持较长时间的工作状态时,可以关闭看门狗芯片110的看门狗功能,防止主控单元210在上述工作状态时被看门狗芯片110误复位。看门狗芯片110仅需第一引脚IOB1、第二引脚IOB2和第三引脚IOB3即可实现看门狗功能和控制看门狗功能的打开或关闭,控制逻辑简单,极大的减少了占用的单片机资源。The watchdog chip 110 can also receive a control signal C1 from the third pin IOB3, and determine whether to turn off the watchdog function according to the control signal C1. Specifically, when the control signal C1 received by the third pin IOB3 of the watchdog chip 110 is at the second level, the watchdog chip 110 turns off the watchdog function and controls the second pin IOB2 to stop sending the first reset signal S1. For example, the second level is a low level. When the third pin IOB3 is at a low level, the watchdog chip 110 turns off the watchdog function, and even if the first pin IOB1 does not receive the dog feeding signal W1 within the first preset time, the second pin IOB2 does not send the first reset signal S1. For example, when the main control unit 210 is debugging, firmware burning or other working states that may not be able to send the dog feeding signal W1 in time but need to maintain a long time, the watchdog function of the watchdog chip 110 can be turned off to prevent the main control unit 210 from being reset by the watchdog chip 110 in the above working state. The watchdog chip 110 only needs the first pin IOB1, the second pin IOB2 and the third pin IOB3 to realize the watchdog function and control the opening or closing of the watchdog function. The control logic is simple, which greatly reduces the occupied microcontroller resources.
本发明实施例的技术方案提供一种看门狗电路,看门狗电路包括看门狗芯片110;看门狗芯片包括第一引脚IOB1、第二引脚IOB2和第三引脚IOB3;基于第三引脚IOB3接收的控制信号C1,看门狗芯片110可以控制看门狗电路的看门狗功能是否启用,在必要时,例如主控单元进210行固件烧录时,关闭看门狗功能可以有效避免主控单元210被误重启,保证固件烧录等工作状态可以正常顺利进行。在看门狗功能开启的情况下,在第一引脚IOB1在第一预设时间内未接收到喂狗信号W1时,控制第二引脚IOB2发送第一复位信号S1至主控单元210的复位端RESET,使主控单元210复位,可简便地实现看门狗电路的复位功能。因此,本发明实施例提供的看门狗电路,仅需要占用看门狗芯片110的有限几个引脚,即可正常实现看门狗功能,并控制看门狗功能的打开或关闭。相比于现有技术,本发明实施例提供的看门狗电路结构简单,控制逻辑简单易用,功能实现简单,极大的减少了占用的电路资源和成本。The technical solution of the embodiment of the present invention provides a watchdog circuit, the watchdog circuit includes a watchdog chip 110; the watchdog chip includes a first pin IOB1, a second pin IOB2 and a third pin IOB3; based on the control signal C1 received by the third pin IOB3, the watchdog chip 110 can control whether the watchdog function of the watchdog circuit is enabled. When necessary, for example, when the main control unit 210 performs firmware burning, turning off the watchdog function can effectively prevent the main control unit 210 from being restarted by mistake, and ensure that the working state such as firmware burning can proceed normally and smoothly. When the watchdog function is turned on, when the first pin IOB1 does not receive the dog feeding signal W1 within the first preset time, the second pin IOB2 is controlled to send a first reset signal S1 to the reset terminal RESET of the main control unit 210, so that the main control unit 210 is reset, and the reset function of the watchdog circuit can be simply realized. Therefore, the watchdog circuit provided by the embodiment of the present invention only needs to occupy a limited number of pins of the watchdog chip 110 to normally realize the watchdog function and control the opening or closing of the watchdog function. Compared with the prior art, the watchdog circuit provided by the embodiment of the present invention has a simple structure, simple and easy-to-use control logic, simple function implementation, and greatly reduces the occupied circuit resources and costs.
本发明实施例还提供了另一种看门狗电路,在上述实施例的基础上进行了改进,图3是本发明实施例提供的另一种看门狗电路的结构示意图,如图3所示,看门狗电路还包括:电压控制单元120;电压控制单元120的第一输入端接入第一电源信号,电压控制单元120的第二输入端接入第二电源信号,电压控制单元120的输出端连接第三引脚IOB3;电压控制单元120用于将第一电源信号或第二电源信号作为控制信号C1输出;第一电源信号与第二电源信号的电压不同;其中,看门狗芯片110用于在第三引脚IOB3接收第一电源信号时开启看门狗功能,在第三引脚IOB3接收第二电源信号时关闭看门狗功能。An embodiment of the present invention also provides another watchdog circuit, which is improved on the basis of the above embodiment. Figure 3 is a structural schematic diagram of another watchdog circuit provided by an embodiment of the present invention. As shown in Figure 3, the watchdog circuit also includes: a voltage control unit 120; the first input end of the voltage control unit 120 is connected to the first power supply signal, the second input end of the voltage control unit 120 is connected to the second power supply signal, and the output end of the voltage control unit 120 is connected to the third pin IOB3; the voltage control unit 120 is used to output the first power supply signal or the second power supply signal as the control signal C1; the voltage of the first power supply signal is different from that of the second power supply signal; wherein the watchdog chip 110 is used to turn on the watchdog function when the third pin IOB3 receives the first power supply signal, and turn off the watchdog function when the third pin IOB3 receives the second power supply signal.
其中,第一电源信号与第二电源信号的电压不同,第一电源信号可以是高电平信号,如图3所示,第一电源信号可以为为3.3V电源;第二电源信号为低电平信号,第一电源信号可以由看门狗芯片110的电源提供,通过电压控制单元120的第二输入端接地得到第二电源信号。或者,第一电源信号也可以是低电平信号,第二电源信号为高电平信号。The voltages of the first power signal and the second power signal are different. The first power signal may be a high-level signal. As shown in FIG3 , the first power signal may be a 3.3V power supply. The second power signal is a low-level signal. The first power signal may be provided by the power supply of the watchdog chip 110, and the second power signal is obtained by grounding the second input terminal of the voltage control unit 120. Alternatively, the first power signal may be a low-level signal, and the second power signal may be a high-level signal.
具体的,当电压控制单元120的第一输入端与输出端之间连通时,第三引脚IOB3接收到第一电源信号,看门狗芯片110开启看门狗功能。当电压控制单元120的第二输入端与输出端之间连通时,第三引脚IOB3接收到第二电源信号,看门狗芯片110关闭看门狗功能。电压控制单元120通过控制第三引脚IOB3为高电平或低电平,控制看门狗芯片110打开或关闭看门狗功能,实现通过看门狗芯片110的一个引脚对看门狗芯片110的看门狗功能进行主动控制,控制逻辑简单。Specifically, when the first input terminal and the output terminal of the voltage control unit 120 are connected, the third pin 10B3 receives the first power signal, and the watchdog chip 110 turns on the watchdog function. When the second input terminal and the output terminal of the voltage control unit 120 are connected, the third pin 10B3 receives the second power signal, and the watchdog chip 110 turns off the watchdog function. The voltage control unit 120 controls the watchdog chip 110 to turn on or off the watchdog function by controlling the third pin 10B3 to be high or low, thereby realizing active control of the watchdog function of the watchdog chip 110 through one pin of the watchdog chip 110, and the control logic is simple.
进一步的,如图3所示,电压控制单元120包括:跳帽1201和第一电阻R1;第一电阻R1的第一端连接电压控制单元120的第一输入端,跳帽1201的第一端连接电压控制单元120的第二输入端,跳帽1201的第二端分别连接第一电阻R1的第二端和电压控制单元120的输出端。Further, as shown in Figure 3, the voltage control unit 120 includes: a jumper cap 1201 and a first resistor R1; the first end of the first resistor R1 is connected to the first input end of the voltage control unit 120, the first end of the jumper cap 1201 is connected to the second input end of the voltage control unit 120, and the second end of the jumper cap 1201 is respectively connected to the second end of the first resistor R1 and the output end of the voltage control unit 120.
其中,跳帽1201的第一端连接电压控制单元120的第二输入端,电压控制单元120的第二输入端接入第二电源信号,即跳帽1201的第一端接入第二电源信号。可选的,如图3所示,跳帽1201的第一端接地,第二电源信号为低电平信号。跳帽1201的第二端连接第三引脚IOB3。需要说明的是,跳帽1201是一种连接器,当跳帽1201短接时,跳帽1201可以作为导线使跳帽1201的第一端和第二端导通,使第三引脚IOB3接收第二电源信号。第一电阻R1的第一端通过电压控制单元120的第一输入端接入第一电源信号,可选的,第一电源信号为高电平信号;那么,第一电阻相当于上拉电阻,在跳帽未短接时,通过第一电阻可以将第三引脚IOB3拉至高电平。Among them, the first end of the jumper cap 1201 is connected to the second input end of the voltage control unit 120, and the second input end of the voltage control unit 120 is connected to the second power supply signal, that is, the first end of the jumper cap 1201 is connected to the second power supply signal. Optionally, as shown in FIG3, the first end of the jumper cap 1201 is grounded, and the second power supply signal is a low-level signal. The second end of the jumper cap 1201 is connected to the third pin IOB3. It should be noted that the jumper cap 1201 is a connector. When the jumper cap 1201 is short-circuited, the jumper cap 1201 can be used as a wire to connect the first end and the second end of the jumper cap 1201, so that the third pin IOB3 receives the second power supply signal. The first end of the first resistor R1 is connected to the first power supply signal through the first input end of the voltage control unit 120. Optionally, the first power supply signal is a high-level signal; then, the first resistor is equivalent to a pull-up resistor. When the jumper cap is not short-circuited, the third pin IOB3 can be pulled to a high level through the first resistor.
具体的,跳帽1201的第一端和第二端之间处于断开状态时,第三引脚IOB3接收到第一电源信号,看门狗功能处于开启状态,看门狗芯片110正常工作。跳帽1201在进行短接时,可以使第三引脚IOB3接收到第二电源信号,关闭看门狗芯片110的看门狗功能。通过控制跳帽1201短接即可实现主动控制看门狗芯片110关闭看门狗功能,控制逻辑简单,电路硬件成本较低。Specifically, when the first end and the second end of the jumper cap 1201 are in a disconnected state, the third pin 10B3 receives the first power signal, the watchdog function is in an on state, and the watchdog chip 110 works normally. When the jumper cap 1201 is short-circuited, the third pin 10B3 can receive the second power signal, turning off the watchdog function of the watchdog chip 110. By controlling the jumper cap 1201 to be short-circuited, the watchdog function of the watchdog chip 110 can be actively controlled to be turned off, the control logic is simple, and the circuit hardware cost is low.
图4是本发明实施例提供的另一种看门狗电路的原理图,进一步的,结合图3和图4,第三引脚IOB3还与主控单元210的信号接收端WD_CTL连接;看门狗芯片110还用于在上电后,检测到第三引脚IOB3接收的控制信号C1持续第三预设时间为第二电源信号时,控制第三引脚IOB3发送方波信号WD1至主控单元210的信号接收端WD_CTL;其中,主控单元210用于在接收到方波信号WD1时,判定看门狗芯片110内的看门狗程序正常,看门狗芯片110能够执行看门狗功能。4 is a schematic diagram of another watchdog circuit provided by an embodiment of the present invention. Furthermore, in combination with FIG. 3 and FIG. 4 , the third pin IOB3 is also connected to the signal receiving terminal WD_CTL of the main control unit 210; the watchdog chip 110 is also used to control the third pin IOB3 to send a square wave signal WD1 to the signal receiving terminal WD_CTL of the main control unit 210 when it detects that the control signal C1 received by the third pin IOB3 is the second power signal for a third preset time after power-on; wherein the main control unit 210 is used to determine that the watchdog program in the watchdog chip 110 is normal and the watchdog chip 110 can perform the watchdog function when receiving the square wave signal WD1.
具体的,看门狗芯片110除了在第三引脚IOB3接收第一电源信号时开启看门狗功能,在第三引脚IOB3接收第二电源信号时关闭看门狗功能之外,还可以通过向信号接收端WD_CTL发送信号以使主控单元210判断看门狗芯片110内的看门狗程序是否正常。其判断原理如下:看门口程序中可配置以下功能:看门狗芯片110在上电后,若检测到第三引脚IOB3接收的控制信号C1持续第三预设时间为第二电源信号时,通过第三引脚IOB3向主控单元210发送方波信号WD1。在看门狗芯片110正常烧录了看门狗程序的情况下,若看门狗芯片110上电后第三引脚IOB3接收的控制信号C1符合上述规定,看门狗芯片110通过第三引脚IOB3发送方波信号WD1至主控单元210的信号接收端WD_CTL。主控单元210在接收到方波信号WD1时,则判定看门狗芯片110内的看门狗程序正常,即看门狗芯片110内已经烧录好看门狗程序,看门狗芯片110能够执行看门狗功能;若主控单元210未接收到方波信号WD1,则判断看门狗芯片110内的看门狗程序异常或看门狗芯片110内未烧录好看门狗程序。Specifically, in addition to turning on the watchdog function when the third pin IOB3 receives the first power signal, and turning off the watchdog function when the third pin IOB3 receives the second power signal, the watchdog chip 110 can also send a signal to the signal receiving terminal WD_CTL to allow the main control unit 210 to determine whether the watchdog program in the watchdog chip 110 is normal. The judgment principle is as follows: The following functions can be configured in the watchdog program: after the watchdog chip 110 is powered on, if it is detected that the control signal C1 received by the third pin IOB3 continues to be the second power signal for a third preset time, the square wave signal WD1 is sent to the main control unit 210 through the third pin IOB3. In the case that the watchdog chip 110 is normally burned with the watchdog program, if the control signal C1 received by the third pin IOB3 after the watchdog chip 110 is powered on meets the above regulations, the watchdog chip 110 sends the square wave signal WD1 to the signal receiving terminal WD_CTL of the main control unit 210 through the third pin IOB3. When the main control unit 210 receives the square wave signal WD1, it determines that the watchdog program in the watchdog chip 110 is normal, that is, the watchdog program has been burned into the watchdog chip 110, and the watchdog chip 110 can perform the watchdog function; if the main control unit 210 does not receive the square wave signal WD1, it determines that the watchdog program in the watchdog chip 110 is abnormal or the watchdog program has not been burned into the watchdog chip 110.
此外,跳帽1201在看门狗芯片110上电前短接,可以使第三引脚IOB3接收的控制信号C1持续第三预设时间为第二电源信号,即可以使第三引脚IOB3持续第三预设时间为低电平。看门狗芯片110的第三引脚IOB3通过向主控单元210的信号接收端WD_CTL发送信号,实现看门狗电路的来料烧录程序功能检测功能。可选的,方波信号WD1为1Hz方波,第三预设时间可以根据使用场景自行设置,示例性的,为尽快判断看门狗芯片110内是否烧录好看门狗程序,可以设置第三预设时间为10s,本申请在此不做限定。示例性地,看门狗芯片110只需在上电的时候判断一次是否通过第三引脚IOB3输出方波信号WD1,上电后,若系统运行中途出现第三引脚IOB3持续拉低的情况,只需适应性的关闭看门狗功能,无须再输出1Hz方波。In addition, the jumper cap 1201 is short-circuited before the watchdog chip 110 is powered on, so that the control signal C1 received by the third pin IOB3 can be the second power signal for a third preset time, that is, the third pin IOB3 can be low level for a third preset time. The third pin IOB3 of the watchdog chip 110 sends a signal to the signal receiving terminal WD_CTL of the main control unit 210 to realize the incoming material burning program function detection function of the watchdog circuit. Optionally, the square wave signal WD1 is a 1Hz square wave, and the third preset time can be set according to the usage scenario. For example, in order to determine whether the watchdog program is burned in the watchdog chip 110 as soon as possible, the third preset time can be set to 10s, which is not limited in this application. For example, the watchdog chip 110 only needs to determine once whether the square wave signal WD1 is output through the third pin IOB3 when it is powered on. After powering on, if the third pin IOB3 is continuously pulled low during the operation of the system, it is only necessary to adaptively turn off the watchdog function without outputting the 1Hz square wave.
在上述各实施方式的基础上,可选地,如图3和图4所示,看门狗芯片110还包括第四引脚IOB4;第四引脚IOB4与电源控制单元220的控制端PWRON连接,电源控制单元220用于对主控单元210供电;看门狗芯片110还用于在看门狗功能开启的情况下,在第二引脚IOB2发送至少两次第一复位信号S1至主控单元210后,在第二预设时间内检测到第一引脚IOB1仍未收到喂狗信号W1时,通过第四引脚IOB4发送重启控制信号PW1至电源控制单元220,使电源控制单元220根据重启控制信号PW1控制主控单元210断电并重启;其中,第二预设时间大于第一预设时间。On the basis of the above-mentioned embodiments, optionally, as shown in Figures 3 and 4, the watchdog chip 110 also includes a fourth pin IOB4; the fourth pin IOB4 is connected to the control end PWRON of the power control unit 220, and the power control unit 220 is used to power the main control unit 210; the watchdog chip 110 is also used to, when the watchdog function is turned on, after sending the first reset signal S1 to the main control unit 210 at least twice through the second pin IOB2, when it is detected that the first pin IOB1 still does not receive the dog feeding signal W1 within the second preset time, send a restart control signal PW1 to the power control unit 220 through the fourth pin IOB4, so that the power control unit 220 controls the main control unit 210 to power off and restart according to the restart control signal PW1; wherein the second preset time is greater than the first preset time.
其中,电源控制单元220可以为主控单元210供电,当电源控制单元220关机或切断向主控单元210的供电路径时,停止为主控单元210供电,使主控单元210断电关闭;当电源控制单元220开机或接通向主控单元210的供电路径时,为主控单元210供电,使主控单元210通电开启。第一预设时间是主控单元210发送喂狗信号W1的间隔时间,设置第二预设时间大于第一预设时间,保证第二引脚IOB2发送至少两次第一复位信号S1至主控单元210后,有足够的间隔时间接收到喂狗信号W1。The power control unit 220 can supply power to the main control unit 210. When the power control unit 220 is turned off or the power supply path to the main control unit 210 is cut off, the power supply to the main control unit 210 is stopped, so that the main control unit 210 is powered off and turned off; when the power control unit 220 is turned on or the power supply path to the main control unit 210 is connected, the power supply to the main control unit 210 is powered on, so that the main control unit 210 is powered on. The first preset time is the interval time for the main control unit 210 to send the dog feeding signal W1. The second preset time is set to be greater than the first preset time to ensure that after the second pin IOB2 sends the first reset signal S1 to the main control unit 210 at least twice, there is enough interval time to receive the dog feeding signal W1.
具体的,看门狗芯片110在看门狗功能开启的情况下,在第二引脚IOB2发送至少两次第一复位信号S1至主控单元210后,在第二预设时间内检测到第一引脚IOB1仍未收到喂狗信号W1时,表明主控单元210在收到至少两次第一复位信号S1后,仍未成功复位,进而表明主控单元210已出现程序跑飞或死机,导致主控单元210又经过第二预设时间仍未发送喂狗信号W1至第一引脚IOB1,此时可以对主控单元210进行强制断电重启,使主控单元210复位。示例性地,看门狗芯片110在第二预设时间内检测到第一引脚IOB1仍未收到喂狗信号W1时,发送重启控制信号PW1的过程包括:通过第四引脚IOB4发送低电平信号至电源控制单元220,拉低电源控制单元220控制端PWRON的电平维持第四预设时间,使电源控制单元220关机,停止为主控单元210供电;在第五预设时间后,再拉低电源控制单元220控制端PWRON的电平维持第六预设时间,使电源控制单元220开机,电源控制单元220控制端PWRON恢复高电平,电源控制单元220为主控单元210供电,从而实现对控制主控单元210进行断电并重启的过程,实现对主控单元210的强制复位。电源控制单元220例如为电源管理单元(PowerManagement Unit,PMU)。Specifically, when the watchdog function is turned on, after the second pin IOB2 sends the first reset signal S1 to the main control unit 210 at least twice, when it detects that the first pin IOB1 has not received the dog feeding signal W1 within the second preset time, it indicates that the main control unit 210 has not been successfully reset after receiving the first reset signal S1 at least twice, which further indicates that the main control unit 210 has a program runaway or crashed, resulting in the main control unit 210 still not sending the dog feeding signal W1 to the first pin IOB1 after the second preset time. At this time, the main control unit 210 can be forcibly powered off and restarted to reset the main control unit 210. Exemplarily, when the watchdog chip 110 detects that the first pin IOB1 has not received the dog feeding signal W1 within the second preset time, the process of sending the restart control signal PW1 includes: sending a low-level signal to the power control unit 220 through the fourth pin IOB4, pulling down the level of the control terminal PWRON of the power control unit 220 for the fourth preset time, so that the power control unit 220 is turned off and the power supply to the main control unit 210 is stopped; after the fifth preset time, the level of the control terminal PWRON of the power control unit 220 is pulled down again for the sixth preset time, so that the power control unit 220 is turned on, the control terminal PWRON of the power control unit 220 is restored to a high level, and the power control unit 220 supplies power to the main control unit 210, thereby realizing the process of powering off and restarting the main control unit 210, and realizing the forced reset of the main control unit 210. The power control unit 220 is, for example, a power management unit (Power Management Unit, PMU).
需要说明的是,第四预设时间、第五预设时间和第六预设时间是根据电源控制单元220的开关机程序进行设置的,示例性的,电源控制单元220在关机时,需要长按8秒关机,在开机时需要长按600ms,且关机和开机之间的间隔要大于500ms,则设置第四预设时间为8秒,第五预设时间为500ms,第六预设时间600ms,从而满足电源控制单元220的关机程序,使电源控制单元220重启。It should be noted that the fourth preset time, the fifth preset time and the sixth preset time are set according to the power on and off program of the power control unit 220. For example, when the power control unit 220 is turned off, it needs to be pressed for 8 seconds, and when it is turned on, it needs to be pressed for 600ms, and the interval between shutting down and starting up must be greater than 500ms. The fourth preset time is set to 8 seconds, the fifth preset time is set to 500ms, and the sixth preset time is set to 600ms, so as to meet the shutdown program of the power control unit 220 and restart the power control unit 220.
在上述各实施方式的基础上,可选的,如图3所示,看门狗电路中还包括:第三电阻R3,第三电阻R3的第一端连接主控单元210的复位端,第三电阻R3的第二端接入第一电源信号。示例性地,第一复位信号S1可以是低电平信号,看门狗芯片110的第一引脚IOB1在第一预设时间内未接收到喂狗信号W1时,控制第二引脚IOB2发送第一复位信号S1至主控单元210的复位端RESET,拉低预设复位时间的主控单元210的复位端RESET的电平,使主控单元210复位。第三电阻R3相当于复位端RESET的上拉电阻,在第二引脚IOB2未输出第一复位信号S1的情况下,通过第三电阻R3可以将复位端RESET的电位拉高。预设复位时间可以根据主控单元210的复位机制进行设置,例如为500ms。On the basis of the above-mentioned embodiments, optionally, as shown in FIG3 , the watchdog circuit further includes: a third resistor R3, the first end of the third resistor R3 is connected to the reset end of the main control unit 210, and the second end of the third resistor R3 is connected to the first power supply signal. Exemplarily, the first reset signal S1 can be a low-level signal. When the first pin IOB1 of the watchdog chip 110 does not receive the dog feeding signal W1 within the first preset time, the second pin IOB2 is controlled to send the first reset signal S1 to the reset end RESET of the main control unit 210, and the level of the reset end RESET of the main control unit 210 of the preset reset time is pulled down to reset the main control unit 210. The third resistor R3 is equivalent to a pull-up resistor of the reset end RESET. When the second pin IOB2 does not output the first reset signal S1, the potential of the reset end RESET can be pulled up by the third resistor R3. The preset reset time can be set according to the reset mechanism of the main control unit 210, for example, 500ms.
继续参见图3,可选地,在对看门狗芯片110进行调试的时候,还可以设置第二电阻R2,具体地,第二引脚IOB2连接第二电阻R2的第一端,第二电阻R2的第二端分别连接主控单元210的复位端RESET和第三电阻R3的第一端,第三电阻R3的第二端接入第一电源信号。其中,第二电阻R2可以是 0 欧电阻、跳线或者拨码开关。Continuing to refer to FIG. 3, optionally, when debugging the watchdog chip 110, a second resistor R2 may be further provided. Specifically, the second pin 10B2 is connected to the first end of the second resistor R2, the second end of the second resistor R2 is respectively connected to the reset end RESET of the main control unit 210 and the first end of the third resistor R3, and the second end of the third resistor R3 is connected to the first power supply signal. The second resistor R2 may be a 0 ohm resistor, a jumper or a dip switch.
可选的,如图3和图4所示,看门狗电路中还包括复位芯片130;复位芯片130的电源端VCC接入第一电源信号,复位芯片130的接地端GND2接地,复位芯片130的输出端连接主控单元210的复位端RESET;复位芯片130用于在复位芯片130上电时向主控单元210的复位端RESET发送第二复位信号S2,使主控单元210复位。Optionally, as shown in Figures 3 and 4, the watchdog circuit also includes a reset chip 130; the power supply terminal VCC of the reset chip 130 is connected to the first power supply signal, the ground terminal GND2 of the reset chip 130 is grounded, and the output terminal of the reset chip 130 is connected to the reset terminal RESET of the main control unit 210; the reset chip 130 is used to send a second reset signal S2 to the reset terminal RESET of the main control unit 210 when the reset chip 130 is powered on, so as to reset the main control unit 210.
其中,复位芯片130的电源端VCC与看门狗芯片110的第五引脚VDD接入相同的第一电源信号,复位芯片130和看门狗芯片110的供电电源相同。复位芯片130的供电电源和电源控制单元220由同一个总电源进行供电,当主控单元210上电时,复位芯片130也上电,因此复位芯片130相当于在主控单元210上电时对其进行一次复位操作。第二复位信号S2与第一复位信号S1的类型可以相同,可选的,第二复位信号S2与第一复位信号S1均为低电平信号,且低电平信号的持续时间为预设复位时间,预设复位时间可以根据主控单元210的复位机制进行设置。Among them, the power supply terminal VCC of the reset chip 130 and the fifth pin VDD of the watchdog chip 110 are connected to the same first power supply signal, and the reset chip 130 and the watchdog chip 110 have the same power supply. The power supply of the reset chip 130 and the power control unit 220 are powered by the same main power supply. When the main control unit 210 is powered on, the reset chip 130 is also powered on. Therefore, the reset chip 130 is equivalent to performing a reset operation on the main control unit 210 when it is powered on. The second reset signal S2 can be of the same type as the first reset signal S1. Optionally, the second reset signal S2 and the first reset signal S1 are both low-level signals, and the duration of the low-level signal is a preset reset time. The preset reset time can be set according to the reset mechanism of the main control unit 210.
具体的,复位芯片130仅在复位芯片130上电时向主控单元210的复位端RESET发送第二复位信号S2,使主控单元210一上电就复位,从而使主控单元210一上电就恢复初始化,保证主控单元210在通电期间能够向看门狗芯片110正常发送喂狗信号W1。复位芯片130在上电后向主控单元210的复位端RESET发送一次第二复位信号S2后,复位芯片130便不再向主控单元210的复位端RESET发送第二复位信号S2,在主控单元210的通电期间,通过看门狗芯片110对主控单元210复位。Specifically, the reset chip 130 sends the second reset signal S2 to the reset terminal RESET of the main control unit 210 only when the reset chip 130 is powered on, so that the main control unit 210 is reset as soon as it is powered on, so that the main control unit 210 is restored to initialization as soon as it is powered on, and it is ensured that the main control unit 210 can normally send the dog feeding signal W1 to the watchdog chip 110 during the power-on period. After the reset chip 130 sends the second reset signal S2 to the reset terminal RESET of the main control unit 210 once after power-on, the reset chip 130 will no longer send the second reset signal S2 to the reset terminal RESET of the main control unit 210, and the main control unit 210 is reset through the watchdog chip 110 during the power-on period of the main control unit 210.
在上述各实施方式的基础上,可选的,如图3和图4所示,看门狗电路还包括:看门狗电路电源140,看门狗电路电源140用于提供第一电源信号;看门狗芯片110还包括第五引脚VDD和第六引脚GND1,第五引脚VDD接入第一电源信号,第六引脚GND1接地。On the basis of the above embodiments, optionally, as shown in Figures 3 and 4, the watchdog circuit also includes: a watchdog circuit power supply 140, the watchdog circuit power supply 140 is used to provide a first power signal; the watchdog chip 110 also includes a fifth pin VDD and a sixth pin GND1, the fifth pin VDD is connected to the first power signal, and the sixth pin GND1 is grounded.
其中,如图3和图4所示,看门狗电路电源140可以为看门狗芯片110、电压控制单元120和复位芯片130的相应引脚提供第一电源信号,使看门狗芯片110、电压控制单元120和复位芯片130的相应引脚维持高电平,且看门狗电路电源140可以作为电源为看门狗芯片110和复位芯片130供电。看门狗电路电源140和电源控制单元220由所在系统的同一个总电源进行供电,当看门狗芯片110、电压控制单元120和复位芯片130上电时,主控单元210也上电。As shown in FIG3 and FIG4 , the watchdog circuit power supply 140 can provide a first power supply signal for the corresponding pins of the watchdog chip 110, the voltage control unit 120 and the reset chip 130, so that the corresponding pins of the watchdog chip 110, the voltage control unit 120 and the reset chip 130 maintain a high level, and the watchdog circuit power supply 140 can be used as a power supply to power the watchdog chip 110 and the reset chip 130. The watchdog circuit power supply 140 and the power control unit 220 are powered by the same main power supply of the system, and when the watchdog chip 110, the voltage control unit 120 and the reset chip 130 are powered on, the main control unit 210 is also powered on.
具体的,图5为本发明实施例提供的一种看门狗电路电源的电路示意图,如图5所示,看门狗电路电源140的电压转换芯片U1输入端VIN可接入5.5V电压,电压转换芯片U1的接地端接地,且在电压转换芯片U1的输入端VIN和接地端之间设置电容C1,在电压转换芯片U1的输出端VOUT和接地端之间设置电容C2和电容C3,通过电容C1、电容C2和电容C3进行滤波稳压,电压转换芯片U1将5.5V电压转换为3.3V电压作为第一电源信号从电压转换芯片U1输出端VOUT输出,实现为看门狗芯片110和复位芯片130供电,为看门狗芯片110、电压控制单元120和复位芯片130的相应引脚提供第一电源信号。可选的,电容C1的电容值为10uF,电容C2的电容值为10uF,电容C3的电容值为0.1uF。电压转换芯片U1可以是低压降稳压器(Lowdropout regulator,LDO)。Specifically, FIG5 is a circuit diagram of a watchdog circuit power supply provided by an embodiment of the present invention. As shown in FIG5, the input terminal VIN of the voltage conversion chip U1 of the watchdog circuit power supply 140 can be connected to a 5.5V voltage, the ground terminal of the voltage conversion chip U1 is grounded, and a capacitor C1 is set between the input terminal VIN and the ground terminal of the voltage conversion chip U1, and capacitors C2 and C3 are set between the output terminal VOUT and the ground terminal of the voltage conversion chip U1. The capacitors C1, C2 and C3 are used for filtering and voltage stabilization. The voltage conversion chip U1 converts the 5.5V voltage into a 3.3V voltage and outputs it from the output terminal VOUT of the voltage conversion chip U1 as a first power signal, thereby providing power to the watchdog chip 110 and the reset chip 130, and providing the first power signal to the corresponding pins of the watchdog chip 110, the voltage control unit 120 and the reset chip 130. Optionally, the capacitance value of the capacitor C1 is 10uF, the capacitance value of the capacitor C2 is 10uF, and the capacitance value of the capacitor C3 is 0.1uF. The voltage conversion chip U1 may be a low dropout regulator (LDO).
需要说明的是,本发明实施例中的看门狗芯片110仅具有6个引脚,可以采用6个引脚的单片机实现本发明实施例中的看门狗功能,极大减少了电路资源和成本,软件控制逻辑简单易用,有复位主控机制,额外增加复位芯片130保证主控复位时间充足,并且具有来料烧录程序功能检测功能。It should be noted that the watchdog chip 110 in the embodiment of the present invention has only 6 pins, and a 6-pin single-chip microcomputer can be used to implement the watchdog function in the embodiment of the present invention, which greatly reduces circuit resources and costs. The software control logic is simple and easy to use, and there is a reset master control mechanism. An additional reset chip 130 is added to ensure that the master control reset time is sufficient, and it has a function of detecting the function of burning the program for incoming materials.
本发明实施例的技术方案提供一种简易的看门狗电路,在看门狗芯片110第一引脚IOB1在第一预设时间内未接收到喂狗信号W1时,控制第二引脚IOB2发送第一复位信号S1至主控单元210的复位端RESET,使主控单元210复位,从而实现看门狗电路的复位功能;看门狗芯片110在看门狗功能关闭的情况下,控制第二引脚IOB2停止输出第一复位信号S1;第三引脚IOB3接入控制信号C1,看门狗芯片110根据控制信号C1确定是否关闭看门狗功能,从而使看门狗电路根据控制信号C1控制看门狗功能的关闭和打开,并通过第三引脚IOB3实现看门狗电路的来料烧录程序功能检测功能;通过看门狗芯片110的第四引脚控制主控单元210进行断电并重启,实现对主控单元210的强制复位。本发明的看门狗电路可以采用6个引脚的单片机实现本发明实施例中的看门狗功能,控制逻辑简单易用,功能实现简单,极大的减少了占用的单片机资源,从而减少了电路资源和成本。The technical solution of the embodiment of the present invention provides a simple watchdog circuit. When the first pin IOB1 of the watchdog chip 110 does not receive the dog feeding signal W1 within the first preset time, the second pin IOB2 is controlled to send the first reset signal S1 to the reset terminal RESET of the main control unit 210, so that the main control unit 210 is reset, thereby realizing the reset function of the watchdog circuit; when the watchdog function is turned off, the watchdog chip 110 controls the second pin IOB2 to stop outputting the first reset signal S1; the third pin IOB3 is connected to the control signal C1, and the watchdog chip 110 determines whether to turn off the watchdog function according to the control signal C1, so that the watchdog circuit controls the turning on and off of the watchdog function according to the control signal C1, and realizes the incoming material burning program function detection function of the watchdog circuit through the third pin IOB3; the main control unit 210 is controlled to be powered off and restarted through the fourth pin of the watchdog chip 110, so as to realize the forced reset of the main control unit 210. The watchdog circuit of the present invention can use a 6-pin single-chip microcomputer to implement the watchdog function in the embodiment of the present invention. The control logic is simple and easy to use, the function is simple to implement, and the occupied single-chip microcomputer resources are greatly reduced, thereby reducing circuit resources and costs.
本发明实施例还提供一种看门狗电路控制方法,应用于本发明任一实施例中的看门狗电路,由本发明任一实施例中的看门狗芯片执行,图6为本发明实施例提供的一种看门狗电路控制方法的流程图,参考图6,看门狗电路控制方法包括:The embodiment of the present invention further provides a watchdog circuit control method, which is applied to the watchdog circuit in any embodiment of the present invention and is executed by the watchdog chip in any embodiment of the present invention. FIG6 is a flow chart of a watchdog circuit control method provided by the embodiment of the present invention. Referring to FIG6, the watchdog circuit control method includes:
S110、根据控制信号判断是否关闭看门狗电路的看门狗功能。S110, judging whether to turn off the watchdog function of the watchdog circuit according to the control signal.
具体的,参考图2,看门狗芯片110的第三引脚IOB3可以接收控制信号C1,看门狗芯片110根据控制信号C1确定是否关闭看门狗功能,在看门狗芯片110收到控制信号C1的第二电平时,看门狗芯片110关闭看门狗功能,控制第二引脚IOB2停止发送第一复位信号S1,示例性的,第二电平为低电平,当第三引脚IOB3为低电平时,看门狗芯片110关闭看门狗功能,即使第一引脚IOB1在第一预设时间内未接收到喂狗信号W1,第二引脚IOB2也不发送第一复位信号S1,实现对看门狗芯片110的看门狗功能进行控制,以在主控单元210进行调试或其他工作状态时,可以关闭看门狗芯片110的看门狗功能,防止在主控单元210在进行调试时被看门狗芯片110误复位。Specifically, referring to Figure 2, the third pin IOB3 of the watchdog chip 110 can receive the control signal C1. The watchdog chip 110 determines whether to turn off the watchdog function according to the control signal C1. When the watchdog chip 110 receives the second level of the control signal C1, the watchdog chip 110 turns off the watchdog function and controls the second pin IOB2 to stop sending the first reset signal S1. Exemplarily, the second level is a low level. When the third pin IOB3 is a low level, the watchdog chip 110 turns off the watchdog function. Even if the first pin IOB1 does not receive the dog feeding signal W1 within the first preset time, the second pin IOB2 does not send the first reset signal S1, thereby controlling the watchdog function of the watchdog chip 110, so that when the main control unit 210 is debugged or in other working states, the watchdog function of the watchdog chip 110 can be turned off to prevent the main control unit 210 from being mistakenly reset by the watchdog chip 110 when debugging.
S120、在看门狗功能开启的情况下,当第一引脚在第一预设时间内未接收到喂狗信号时,控制第二引脚发送第一复位信号至主控单元的复位端,使主控单元复位。S120: When the watchdog function is enabled, when the first pin does not receive a dog feeding signal within a first preset time, the second pin is controlled to send a first reset signal to a reset terminal of the main control unit to reset the main control unit.
具体的,参考图2,在看门狗芯片110的看门狗功能开启的情况下,看门狗芯片110可以接收主控单元210发出的喂狗信号W1以及向主控单元210发送第一复位信号S1,看门狗芯片110的第一引脚IOB1接收主控单元210发出的喂狗信号W1,在看门狗芯片110在第一预设时间内未接收到喂狗信号W1时,控制第二引脚IOB2发送第一复位信号S1至主控单元210的复位端RESET,使主控单元210复位,防止主控单元210程序跑飞。Specifically, referring to Figure 2, when the watchdog function of the watchdog chip 110 is turned on, the watchdog chip 110 can receive the dog feeding signal W1 issued by the main control unit 210 and send a first reset signal S1 to the main control unit 210. The first pin IOB1 of the watchdog chip 110 receives the dog feeding signal W1 issued by the main control unit 210. When the watchdog chip 110 does not receive the dog feeding signal W1 within the first preset time, the second pin IOB2 is controlled to send the first reset signal S1 to the reset terminal RESET of the main control unit 210, so as to reset the main control unit 210 and prevent the program of the main control unit 210 from running away.
本发明实施例的技术方案提供一种看门狗电路控制方法,包括根据控制信号判断是否关闭看门狗电路的看门狗功能,从而使看门狗电路根据控制信号控制看门狗功能的关闭和打开;在看门狗功能开启的情况下,当第一引脚在第一预设时间内未接收到喂狗信号时,控制第二引脚发送第一复位信号至主控单元的复位端,使主控单元复位,从而实现看门狗电路的复位功能。本发明的看门狗电路控制方法简单易用,功能实现简单,极大的减少了占用的资源。The technical solution of the embodiment of the present invention provides a watchdog circuit control method, including judging whether to turn off the watchdog function of the watchdog circuit according to a control signal, so that the watchdog circuit controls the turning off and on of the watchdog function according to the control signal; when the watchdog function is turned on, when the first pin does not receive a dog feeding signal within a first preset time, the second pin is controlled to send a first reset signal to the reset end of the main control unit to reset the main control unit, thereby realizing the reset function of the watchdog circuit. The watchdog circuit control method of the present invention is simple and easy to use, has simple function implementation, and greatly reduces occupied resources.
可选的,在本发明的另一实施例中,参考图3,看门狗芯片110还包括第四引脚IOB4;看门狗电路控制方法还包括:在看门狗功能开启的情况下,在第二引脚IOB2发送至少两次第一复位信号S1至主控单元210后,在第二预设时间内检测到第一引脚IOB1仍未收到喂狗信号W1时,通过第四引脚IOB4发送重启控制信号PW1至电源控制单元220,使电源控制单元220根据重启控制信号PW1控制主控单元210断电并重启;其中,第二预设时间大于第一预设时间。Optionally, in another embodiment of the present invention, referring to Figure 3, the watchdog chip 110 also includes a fourth pin IOB4; the watchdog circuit control method also includes: when the watchdog function is turned on, after the second pin IOB2 sends the first reset signal S1 to the main control unit 210 at least twice, when it is detected that the first pin IOB1 still has not received the dog feeding signal W1 within the second preset time, a restart control signal PW1 is sent to the power control unit 220 through the fourth pin IOB4, so that the power control unit 220 controls the main control unit 210 to power off and restart according to the restart control signal PW1; wherein the second preset time is greater than the first preset time.
具体的,看门狗芯片110在看门狗功能开启的情况下,在第二引脚IOB2发送至少两次第一复位信号S1至主控单元210后,在第二预设时间内检测到第一引脚IOB1仍未收到喂狗信号时,表明主控单元210在收到至少两次第一复位信号S1后,仍未成功复位,主控单元210已出现程序跑飞或死机,导致主控单元210第二预设时间内仍未发送喂狗信号至第一引脚IOB1,此时可以对主控单元210进行强制断电重启,使主控单元210复位。Specifically, when the watchdog function is turned on, after the second pin IOB2 sends the first reset signal S1 to the main control unit 210 at least twice, when it detects that the first pin IOB1 still has not received the dog feeding signal within the second preset time, it indicates that the main control unit 210 has not been successfully reset after receiving the first reset signal S1 at least twice, and the main control unit 210 has a program runaway or crashed, resulting in the main control unit 210 still not sending the dog feeding signal to the first pin IOB1 within the second preset time. At this time, the main control unit 210 can be forcibly powered off and restarted to reset the main control unit 210.
可选的,图7为本发明实施例提供的发送重启控制信号至电源控制单元的流程图,继续参考图3和图7,通过第四引脚IOB4发送重启控制信号至电源控制单元220,包括:Optionally, FIG. 7 is a flowchart of sending a restart control signal to a power control unit provided in an embodiment of the present invention. Continuing to refer to FIG. 3 and FIG. 7 , sending a restart control signal to the power control unit 220 through the fourth pin IOB4 includes:
S210、控制第四引脚IOB4的输出电压为第一电压并持续第四预设时间后跳变为第二电压,使电源控制单元220控制主控单元210断电关机。S210, controlling the output voltage of the fourth pin IOB4 to be the first voltage and then changing to the second voltage after lasting for a fourth preset time, so that the power control unit 220 controls the main control unit 210 to power off and shut down.
其中,第一电压为低电平,第二电压为高电平。The first voltage is a low level, and the second voltage is a high level.
S220、经过第五预设时间后,再控制第四引脚IOB4的输出电压为第一电压并持续第六预设时间后跳变为第二电压,使电源控制单元220控制主控单元210通电开机;其中,第六预设时间小于第四预设时间。S220, after the fifth preset time, control the output voltage of the fourth pin IOB4 to be the first voltage and then change to the second voltage after the sixth preset time, so that the power control unit 220 controls the main control unit 210 to power on; wherein the sixth preset time is less than the fourth preset time.
具体的,看门狗芯片110在第二预设时间内检测到第一引脚IOB1仍未收到喂狗信号W1时,通过控制第四引脚IOB4发送低电平至电源控制单元220,拉低第电源控制单元220控制端PWRON的电平四预设时间,使电源控制单元220控制主控单元210断电关机,相当于长按关机效果;在第五预设时间后,再拉低电源控制单元220控制端PWRON的电平第六预设时间,使电源控制单元220开机,电源控制单元220控制端PWRON恢复高电平,使电源控制单元220控制主控单元210通电开机,相当于短按开机效果。基于此,可实现对控制主控单元210进行断电并重启的过程,实现对主控单元210的强制复位。Specifically, when the watchdog chip 110 detects that the first pin IOB1 has not received the dog feeding signal W1 within the second preset time, it controls the fourth pin IOB4 to send a low level to the power control unit 220, pulls down the level of the control terminal PWRON of the power control unit 220 for four preset times, and makes the power control unit 220 control the main control unit 210 to power off and shut down, which is equivalent to the effect of long pressing to shut down; after the fifth preset time, the level of the control terminal PWRON of the power control unit 220 is pulled down for the sixth preset time, so that the power control unit 220 is turned on, and the control terminal PWRON of the power control unit 220 returns to a high level, so that the power control unit 220 controls the main control unit 210 to power on and start up, which is equivalent to the effect of short pressing to start up. Based on this, the process of powering off and restarting the main control unit 210 can be realized, and the forced reset of the main control unit 210 can be realized.
需要说明的是,第四预设时间、第五预设时间和第六预设时间是根据电源控制单元220的开关机程序进行设置的,为满足电源控制单元220的开关机过程,可设置第六预设时间小于第四预设时间。示例性的,电源控制单元220在关机时,需要长按8秒关机,在开机时需要长按600ms,且关机和开机之间的间隔要大于500ms,则设置第四预设时间为8秒,第五预设时间为500ms,第六预设时间600ms,从而满足电源控制单元220的关机程序,使电源控制单元220重启。It should be noted that the fourth preset time, the fifth preset time and the sixth preset time are set according to the power on/off program of the power control unit 220. To meet the power on/off process of the power control unit 220, the sixth preset time can be set to be less than the fourth preset time. Exemplarily, when the power control unit 220 is turned off, it needs to be pressed for 8 seconds to turn off, and when it is turned on, it needs to be pressed for 600ms, and the interval between turning off and turning on is greater than 500ms. Then, the fourth preset time is set to 8 seconds, the fifth preset time is set to 500ms, and the sixth preset time is set to 600ms, so as to meet the shutdown program of the power control unit 220 and restart the power control unit 220.
本发明实施例的技术方案提供的看门狗电路控制方法,可以实现看门狗电路的复位控制功能,能够主动控制关闭看门狗电路的看门狗功能,具有看门狗电路的来料烧录程序是否良好的检测功能,具有对主控单元进行强制复位的功能,控制方法简单易用,功能实现简单,可以极大的减少电路资源和成本。The watchdog circuit control method provided by the technical solution of the embodiment of the present invention can realize the reset control function of the watchdog circuit, can actively control the watchdog function of shutting down the watchdog circuit, has the function of detecting whether the incoming material burning program of the watchdog circuit is good, and has the function of forcibly resetting the main control unit. The control method is simple and easy to use, the function is simple to implement, and the circuit resources and costs can be greatly reduced.
注意,上述仅为本发明的较佳实施例及所运用技术原理。本领域技术人员会理解,本发明不限于这里的特定实施例,对本领域技术人员来说能够进行各种明显的变化、重新调整和替代而不会脱离本发明的保护范围。因此,虽然通过以上实施例对本发明进行了较为详细的说明,但是本发明不仅仅限于以上实施例,在不脱离本发明构思的情况下,还可以包括更多其他等效实施例,而本发明的范围由所附的权利要求范围决定。Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims (5)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410627973.1A CN118245266B (en) | 2024-05-21 | 2024-05-21 | Watchdog circuit and control method thereof |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410627973.1A CN118245266B (en) | 2024-05-21 | 2024-05-21 | Watchdog circuit and control method thereof |
Publications (2)
Publication Number | Publication Date |
---|---|
CN118245266A CN118245266A (en) | 2024-06-25 |
CN118245266B true CN118245266B (en) | 2024-09-10 |
Family
ID=91560669
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202410627973.1A Active CN118245266B (en) | 2024-05-21 | 2024-05-21 | Watchdog circuit and control method thereof |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN118245266B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118656246B (en) * | 2024-08-20 | 2024-12-27 | 中国第一汽车股份有限公司 | External watchdog monitoring system of domain controller |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102214124A (en) * | 2011-06-08 | 2011-10-12 | 深圳市理邦精密仪器股份有限公司 | Watchdog reset control system |
CN114610514A (en) * | 2022-02-10 | 2022-06-10 | 深圳数影科技有限公司 | Watchdog Control Circuits and Devices |
CN217386347U (en) * | 2022-05-30 | 2022-09-06 | 西安中车永电捷通电气有限公司 | Watchdog system |
CN117234537A (en) * | 2023-08-15 | 2023-12-15 | 江苏安科瑞电器制造有限公司 | Burning interface circuit and working method thereof |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6839792B2 (en) * | 2000-12-15 | 2005-01-04 | Innovative Concepts, Inc. | Data modem |
CN214376409U (en) * | 2021-03-08 | 2021-10-08 | 苏州摩卡智行信息科技有限公司 | External watchdog control circuit for preventing program burning |
CN215376257U (en) * | 2021-06-30 | 2021-12-31 | 八方电气(苏州)股份有限公司 | Reset control circuit of hardware watchdog |
CN220651243U (en) * | 2023-09-01 | 2024-03-22 | 纵目科技(上海)股份有限公司 | Watchdog chip control circuit |
-
2024
- 2024-05-21 CN CN202410627973.1A patent/CN118245266B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102214124A (en) * | 2011-06-08 | 2011-10-12 | 深圳市理邦精密仪器股份有限公司 | Watchdog reset control system |
CN114610514A (en) * | 2022-02-10 | 2022-06-10 | 深圳数影科技有限公司 | Watchdog Control Circuits and Devices |
CN217386347U (en) * | 2022-05-30 | 2022-09-06 | 西安中车永电捷通电气有限公司 | Watchdog system |
CN117234537A (en) * | 2023-08-15 | 2023-12-15 | 江苏安科瑞电器制造有限公司 | Burning interface circuit and working method thereof |
Also Published As
Publication number | Publication date |
---|---|
CN118245266A (en) | 2024-06-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN118245266B (en) | Watchdog circuit and control method thereof | |
US8055889B2 (en) | BIOS management device and method for managing BIOS setting value | |
US8151130B2 (en) | Plural voltage level detection upon power drop for switching to standby mode with or without complete state saving interrupt processing | |
US20070106915A1 (en) | Reset circuit for automatically resetting an MCU upon turning on a power and the method thereof | |
CN110750374A (en) | Watchdog circuit and control method thereof | |
US20140115307A1 (en) | Method and System for Resetting a SoC | |
CN215729728U (en) | Hardware watchdog circuit | |
CN110794804B (en) | System, ECU, motor vehicle and method for flashing ECU | |
CN101436097B (en) | Electronic device and wake-up method thereof | |
CN220651243U (en) | Watchdog chip control circuit | |
CN102591407B (en) | Mainboard | |
CN117667487A (en) | Embedded device and self-recovery circuit thereof | |
CN217606356U (en) | Switching control circuit, mainboard and electronic equipment | |
CN217386347U (en) | Watchdog system | |
US20110307731A1 (en) | Method capable of preventing erroneous data writing and computer system | |
CN113342151A (en) | Watchdog control circuit and control method of relay protection device for preventing startup from being locked | |
CN221551187U (en) | Electronic equipment and abnormal restarting loop thereof | |
CN112269463A (en) | A power failure protection circuit, method and electric energy meter | |
CN221993885U (en) | A circuit and device for restarting an operating system after it crashes | |
CN114253381B (en) | Electronic device and abnormal reset circuit thereof | |
CN112114617B (en) | Device and method for realizing Feiteng ARM CPU Clear CMOS | |
CN212411040U (en) | Embedded intelligent mainboard | |
MXPA02011874A (en) | Watchdog arrangement. | |
CN218383941U (en) | Starting circuit based on double storage chips and computer equipment | |
CN114336534B (en) | Uncontrolled power supply short-circuit protection device, method, equipment, system and medium |
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 |