A watchdog circuit and a dog feeding method and device

By designing a watchdog circuit that includes coupling modules, transistors and Schmitt flip-flops, the problem of system clock abnormality cannot be reset and high cost is solved, and the maximum dog feeding time and cost reduction effect is achieved with flexible configuration.

CN112084054BActive Publication Date: 2024-12-03INSPUR NETWORK TECH (SHANDONG) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010827886.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-08-17
Publication Date
2024-12-03
Estimated Expiration
2040-08-17

AI Technical Summary

Technical Problem

The existing watchdog circuit cannot be reset when the system clock is abnormal, and the independent external watchdog chip is costly and the maximum feeding time cannot be configured.

Method used

A watchdog circuit including coupling module, transistor and Schmitt flip-flop was designed, using an independent external timer, and the maximum feeding time is configured by modifying the resistor and capacitance values ​​to ensure that the system can be used in the event of clock abnormality. Reset and reduce hardware costs.

Benefits of technology

It realizes the reset capability when the system clock is abnormal, reduces the cost of the watchdog chip, and can flexibly configure the maximum dog feeding time, improving the reliability and economics of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112084054B_ABST
    Figure CN112084054B_ABST
Patent Text Reader

Abstract

The present application discloses a watchdog circuit and a dog feeding method and device. The circuit includes: a coupling module, including a first capacitor, an input end receiving a dog feeding signal sent by a corresponding program, and an output end connected to the base of a transistor; a transistor, a collector connected to the input end of a Schmitt trigger, and the collector is also connected to a second capacitor and then grounded; a Schmitt trigger, an input end connected to a second capacitor and then grounded, an output end for outputting a reset signal, and a first resistor is also connected in parallel. Compared with the built-in watchdog chip, the present application has an independent external timer, which does not need to be co-sourced with the system clock, and a reset operation can be performed even if the system clock is abnormal. Compared with the external watchdog chip, the overall price is lower than the existing external watchdog chip because the components used are of lower cost. And the charging speed of C2 can be increased or decreased by modifying the values ​​of R1 and C2, so as to configure the maximum feeding time of the watchdog circuit.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of watchdogs, and in particular to a watchdog circuit and a dog feeding method and device. Background Art

[0002] The watchdog circuit is used to monitor the program running status. When the program runs normally, the watchdog outputs a high-low changing level signal. When the program runs abnormally, the output signal level remains unchanged. When the level remains unchanged for more than the maximum dog feeding time interval, the watchdog circuit generates a low level. This signal is usually connected to the reset pin of the system to reset the system and exit the abnormal state.

[0003] Currently, commonly used watchdog circuits are divided into chip-based and independent external ones, but the existing watchdog circuits still have some problems:

[0004] For the chip-based type, the built-in watchdog has the same source as the system clock, and there is a risk that it cannot be reset when the system clock is abnormal. For the independent external type, the dedicated external watchdog chip is usually more expensive, resulting in high costs, and the maximum feeding time cannot be configured. Summary of the invention

[0005] In order to solve the above problems, the present application proposes a watchdog circuit, including a coupling module, a transistor, and a Schmitt trigger; the coupling module includes a first capacitor, the input end of the coupling module is used to receive a dog feeding signal sent by a corresponding program, and the output end is connected to the base of the transistor; the transistor, the collector is connected to the input end of the Schmitt trigger, the collector is also connected to the second capacitor and then grounded, and the emitter is grounded; the Schmitt trigger, the input end is connected to the second capacitor and then grounded, the output end is used to output a reset signal, and the Schmitt trigger is also connected in parallel with a first resistor.

[0006] In one example, the collector of the transistor is connected to the second resistor and then to the input end of the Schmitt trigger; the Schmitt trigger outputs a reset signal through a third resistor and is connected to a power supply through the third resistor and a fourth resistor.

[0007] In an example, the resistance value of the second resistor is much smaller than the resistance values ​​of the first resistor, the third resistor, and the fourth resistor, where “much smaller than” means that the resistance values ​​are not of the same order of magnitude.

[0008] In one example, the corresponding program is U-boot.

[0009] On the other hand, the present application also proposes a dog feeding method for a watchdog circuit, which is applied to a watchdog circuit as described in any of the above examples, and the method includes: initializing a counter, setting the current dog feeding number to the maximum dog feeding number; executing a virtual dog feeding action, and decrementing the current dog feeding number according to the virtual dog feeding action; after the timer is delayed and interrupted by a timeout, monitoring whether the current dog feeding number is 0 or the maximum dog feeding number in this timer cycle through an interrupt service program; if so, the level of the dog feeding signal is not reversed, and the actual dog feeding action is not performed; otherwise, the level of the dog feeding signal is reversed, and the actual dog feeding action is performed.

[0010] In one example, the method further includes: resetting the current dog feeding times corresponding to the counter to the maximum dog feeding times through the interrupt service program; and reinstalling the timer to re-execute the virtual dog feeding action.

[0011] In one example, before initializing the counter, the method further includes: enabling CPU interrupts, and configuring a timer period, interrupt priority, and interrupt vector, the CPU being the CPU of a system that resets the watchdog circuit, and the timer period being less than 1 / 2 of a maximum feeding time of the watchdog circuit.

[0012] In one example, before enabling the CPU interrupt and configuring the timer period, interrupt priority and interrupt vector, the method further includes: initializing the dog feeding pin to a push-pull output.

[0013] In one example, the method is performed based on U-boot.

[0014] On the other hand, the present application also proposes a dog feeding device for a watchdog circuit, which is applied in a watchdog circuit as described in any of the above examples, and the device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute: initializing a counter and setting the current number of dog feeding times to the maximum number of dog feeding times; performing a virtual dog feeding action, and decrementing the current number of dog feeding times according to the virtual dog feeding action; after the timer is delayed and interrupted by a timeout, monitoring whether the current number of dog feeding times in this timer cycle is 0 or the maximum number of dog feeding times through an interrupt service program; if so, the level of the dog feeding signal is not reversed, and the actual dog feeding action is not performed; otherwise, the level of the dog feeding signal is reversed, and the actual dog feeding action is performed.

[0015] The watchdog circuit and the dog feeding method proposed in this application can bring the following beneficial effects:

[0016] Compared with the built-in watchdog chip, the present application has an independent external timer, which does not need to be co-sourced with the system clock. Even if the system clock is abnormal, a reset operation can be performed. Compared with the external watchdog chip, the overall price is lower than the existing external watchdog chip because the components used are of lower cost. And by modifying the values ​​of the first resistor R1 and the second capacitor C2, the charging speed of C2 can be increased or decreased, and the maximum feeding time of the watchdog circuit can be configured, which is very convenient. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0018] Figure 1 A schematic diagram of a flow chart of a dog feeding method of a watchdog circuit in an embodiment of the present application;

[0019] Figure 2 A schematic diagram of a dog feeding device of a watchdog circuit in an embodiment of the present application;

[0020] Figure 3 A circuit diagram of a watchdog circuit in an embodiment of the present application;

[0021] Figure 4 This is a specific flow chart of the dog feeding method of the watchdog circuit in the embodiment of the present application. DETAILED DESCRIPTION

[0022] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.

[0023] The technical solutions provided by various embodiments of the present application are described in detail below in conjunction with the accompanying drawings.

[0024] like Figure 3 As shown, an embodiment of the present application provides a watchdog circuit, including: a coupling module, a triode, and a Schmitt trigger.

[0025] Among them, the coupling module can be an RC coupling circuit, which may include a fifth resistor R5 and a capacitor C1, one end of the fifth resistor R5 is used to receive the dog feeding signal FEED_DOG sent by the corresponding program, the other end of the fifth resistor R5 is connected to the capacitor C1, the other end of the capacitor C1 is connected to the base of the transistor Q1, and the other end of the capacitor C1 is also grounded after passing through the sixth resistor R6.

[0026] The transistor Q1 can be of any suitable type, such as Figure 3 The 2N3904 shown in the figure can of course be other models. The base of the transistor Q1 is connected to the other end of the capacitor C1, the emitter is grounded, and the collector is connected to the input end of the Schmitt trigger U. The collector of the transistor Q1 is also connected to the second capacitor C2 and then grounded. Of course, the collector of the transistor can be connected to the input end of the Schmitt trigger after connecting the second resistor R2.

[0027] The Schmitt trigger, also known as the Schmitt inverter, is an inverter with a Schmitt trigger function, and the trigger level thresholds for the positive and negative transitions of its input terminal are different. The input terminal of the Schmitt trigger is connected to the second capacitor C2 and then grounded, and the output terminal is used to output the reset signal SYS_RESET. The Schmitt trigger is also connected in parallel with the first resistor R1. The Schmitt trigger can also output a reset signal through the third resistor R3, and is connected to the power supply through the third resistor R3 and the fourth resistor R4, and the output terminal is grounded after passing through the third capacitor C3. Utilizing the characteristics of the Schmitt trigger, combined with the input capacitor C2 and the feedback resistor R5, a periodic low-level signal can be generated at the output terminal of the Schmitt trigger. The dog feeding signal is connected to the input terminal of the Schmitt trigger through the RC coupling circuit. By periodically charging and discharging the input capacitor C2 of the Schmitt trigger, the input terminal of the Schmitt trigger can be maintained below the positive transition threshold to ensure that the output terminal does not generate a low-level signal.

[0028] When the watchdog circuit in the embodiment of the present application works, the specific working process may be:

[0029] When there is no dog feeding signal input, the base level of transistor Q1 is 0, and transistor Q1 works in the cut-off state.

[0030] When there is no dog feeding signal input, the initial value of the voltage across the second capacitor C2 is 0. At this time, the output end of the Schmitt trigger U is at a high level of 3.3V. This voltage drives the fourth resistor R4, the third resistor R3, and the first resistor R1 to generate a current to charge the second capacitor C2, and the voltage across the second capacitor C2 gradually increases. When the voltage of the second capacitor C2 reaches the positive transition threshold voltage of the Schmitt trigger U input end, the output end level jumps to 0. At this time, the two ends of the second capacitor C2 still maintain a high voltage. This voltage drives the first resistor R1 to discharge, and the voltage of the second capacitor C2 begins to decrease. When the voltage of the second capacitor C2 is lower than the negative transition threshold voltage of the Schmitt trigger, the output end of the Schmitt trigger U outputs a high level again. Under this condition, the Schmitt trigger operates in an oscillating output state, the output end periodically outputs a low level signal, and the system will reset periodically.

[0031] When there is a dog feeding signal input, the FEED_DOG signal passes through the RC coupling circuit and generates a square wave at the base of the transistor Q1. The square wave signal is in phase with the FEED_DOG signal. When the FEED_DOG input is low, the transistor Q1 is cut off, the circuit works in the above-mentioned oscillation output state, and the second capacitor C2 is periodically charged and discharged. When the FEED_DOG input is high, the transistor Q1 is saturated and turned on, and the second capacitor C2 is discharged through the second resistor R2 and the transistor Q1, which prevents the voltage across the second capacitor C2 from rising, so that the output terminal SYS_RESET of the Schmitt trigger maintains a high level. At this time, the resistance value of the second resistor R2 can be set to be much smaller than the fourth resistor R4, the third resistor R3, and the first resistor R1, so that the second capacitor C2 can be discharged slowly and charged quickly. As long as the FEED_DOG duty cycle is greater than a specific value, the voltage of the second capacitor C2 will be maintained below the positive jump threshold, the SYS_RESET signal will maintain a high level, and the system will not reset. The much smaller than here means that the resistance values ​​are not of the same order of magnitude.

[0032] When the dog feeding signal stops inputting, FEED_DOG will maintain high level, low level or high impedance state. After passing through the RC coupling circuit, the base voltage of transistor Q1 is always 0V and is in the cut-off state. The Schmitt trigger U re-enters the oscillation output state and the system resets periodically.

[0033] When using the ordinary feeding method, the duty cycle of FEED_DOG is difficult to control. When it is lower than a specific value, the charging time of C2 is too long and the discharging time is too short. The voltage across C2 cannot be maintained below the positive transition threshold, and the inverter output outputs a low level to SYS_RESET, which will cause the system to reset. In the embodiment of the present application, by modifying the value of the first resistor R1 and the second capacitor C2, the charging speed of C2 can be increased or decreased, and the maximum feeding time of the watchdog circuit can be configured. Among them, when the first resistor R1 and the second capacitor C2 increase, the maximum feeding time increases; conversely, when the first resistor R1 and the second capacitor C2 decrease, the maximum feeding time decreases.

[0034] In the embodiment of the present application, Figure 3 As shown, the parameters of each component are set as follows: the resistance of the fifth resistor R5 is set to 1K, the resistance of the sixth resistor R6 is set to 10K, the resistance of the second resistor is set to 300, the resistance of the third resistor is set to 2K, the resistance of the fourth resistor is set to 10K, and the resistance of the first resistor is set to 1M. The capacity of the first capacitor C1 is set to 1uF, the capacity of the second capacitor C2 is set to 4.7uF, and the capacity of the third capacitor C3 is set to 1nF. Of course, this is just an example in the embodiment of the present application, and the specific set values ​​can be changed accordingly according to the actual working conditions.

[0035] In one embodiment, the corresponding program for triggering the dog feeding signal can be U-boot. U-boot is a boot loader mainly used for embedded systems, which can support a variety of different computer system structures. For an external watchdog, the commonly used dog feeding method under U-boot is to estimate the time interval in the sequentially executed code, and perform a level inversion operation on the dog feeding pin. At the same time, in the code that is executed in a loop and has a long time, each cycle performs a level flip on the dog feeding pin. In the case of frequent code jumps, the level flip frequency and high and low level duty cycle of the actual dog feeding pin show a certain randomness. In a system based on an existing watchdog circuit, when the duty cycle is too low, that is, the invalid dog feeding time is greater than a certain proportion of the effective dog feeding time, the system will reset, resulting in an unexpected restart. And through the watchdog circuit in the embodiment of the present application, due to the characteristics of the Schmitt trigger, the system reliability can be effectively improved. And it is equivalent to an external watchdog chip that can reduce hardware costs, and can also flexibly configure the maximum dog feeding interval time, which is particularly suitable for the watchdog circuit under U-boot.

[0036] like Figure 1 and Figure 4 As shown, the present application also proposes a method for feeding a watchdog circuit, which is applied to the watchdog circuit as described in any one of the above embodiments, and the method includes:

[0037] S101, initializing a counter, and setting the current dog feeding times to the maximum dog feeding times.

[0038] When feeding the dog, you can first initialize the dog feeding pin, that is, initialize the dog feeding GPIO, and initialize the dog feeding pin to a push-pull output. Then after enabling the CPU interrupt, configure the timer period, interrupt priority, interrupt vector, etc. accordingly to facilitate the subsequent dog feeding action. Among them, the CPU here refers to the CPU of the system that the watchdog circuit is used to reset. And when setting the timer period, the timer period can be set to be less than 1 / 2 of the maximum dog feeding time of the watchdog circuit, so that it can be ensured that the dog feeding action can be performed normally when the CPU is operating normally.

[0039] Then, when the dog feeding action is executed, the counter can be initialized first, and then the current dog feeding times counter is set to the maximum dog feeding times max. The counter here is usually independent and external, and the setting of the maximum dog feeding times max has the following requirements: when the program (U-boot is used as an example in the embodiment of the present application) is running normally, the actual dog feeding times in each timer cycle must be less than the maximum dog feeding times max.

[0040] S102: Execute a virtual dog feeding action, and decrement the current dog feeding times according to the virtual dog feeding action.

[0041] After the corresponding configuration is completed, the timer interrupt can be enabled first to perform a virtual dog feeding action within the current timer cycle. The virtual dog feeding action here means that it is not the actual execution of the dog feeding action, but it is assumed that the dog feeding action has actually been executed. When executing the virtual dog feeding action, it can be run through the U-boot main function, and the virtual dog feeding action can be performed in the normal way. While executing the virtual dog feeding action, the current dog feeding times counter is decremented. During the sequential execution and cyclic execution of the U-boot code (such as decompressing the kernel, reading or other time-consuming cyclic operations required), the virtual dog feeding operation is performed. The reading, decompression and other operations here can all be implemented by the built-in program in U-boot, which will not be repeated here.

[0042] S103, after the timer is delayed and interrupted by timeout, monitor through the interrupt service program whether the current dog feeding times in this timer cycle is 0 or the maximum dog feeding times.

[0043] After the timer has a certain delay, when it reaches and exceeds the preset time, the timer will be interrupted, and the current timer cycle ends. The interrupt service program can be used to determine whether the counter is equal to 0 or max. The interrupt service program here can be a program, script, code, etc. that can play a corresponding function. The interrupt service program can be built into U-boot or a separate program, which will not be described here.

[0044] It should be noted that when the timer is an independent external device, an abnormality in the system clock will not affect the timer, and the system can be reset normally. When the timer is built into the CPU, even if the timer is built into the CPU and may have the same source as the system clock, when the system clock abnormality causes the timer abnormality, the CPU will not execute the timer interrupt service program, that is, it will not perform the actual dog feeding operation, so the system can also be reset normally.

[0045] S104: If yes, the level of the dog feeding signal is not inverted, and the actual dog feeding action is not performed.

[0046] S105, otherwise, invert the level of the dog feeding signal and perform the actual dog feeding action.

[0047] If counter is 0, it means that the number of virtual dog feedings in the current timer cycle that has ended exceeds max, indicating that the program execution order is beyond expectations, and the FEED_DOG signal level is not reversed, that is, the actual dog feeding action is not performed. If counter is max, it means that no virtual dog feeding has been performed in the current timer cycle that has ended, and the FEED_DOG signal level is not reversed at this time, that is, the actual dog feeding action is not performed.

[0048] If counter is another value, the actual hardware dog feeding operation Feed_Dog() can be executed, inverting the FEED_DOG signal level in the circuit and performing the actual dog feeding action.

[0049] After the end of this round of timer cycle, the current dog feeding times counter of the counter can be reset to the maximum dog feeding times max through the interrupt service program, and then the timer is reloaded to re-execute the virtual dog feeding action to perform the next round of dog feeding action.

[0050] like Figure 2 As shown, the embodiment of the present application further provides a dog feeding device for a watchdog circuit, which is applied to the watchdog circuit as described in any one of the above embodiments, and the device includes:

[0051] at least one processor; and,

[0052] a memory communicatively connected to the at least one processor; wherein,

[0053] The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to execute:

[0054] Initialize the counter and set the current number of times of feeding the dog to the maximum number of times of feeding the dog;

[0055] Execute a virtual dog feeding action, and decrement the current dog feeding times according to the virtual dog feeding action;

[0056] After the timer is delayed and interrupted by timeout, the interrupt service program is used to monitor whether the current number of dog feeding times in this timer cycle is 0 or the maximum number of dog feeding times;

[0057] If yes, the level of the dog feeding signal will not be inverted, and the actual dog feeding action will not be performed;

[0058] Otherwise, the level of the dog feeding signal is inverted to perform the actual dog feeding action.

[0059] Each embodiment in this application is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device and medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0060] The devices and media provided in the embodiments of the present application correspond one-to-one to the methods. Therefore, the devices and media also have similar beneficial technical effects as the corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the devices and media will not be repeated here.

[0061] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0062] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0063] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0064] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0065] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0066] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0067] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0068] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0069] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims

1. A watchdog circuit, characterized in that: Including coupling module, triode, Schmitt trigger; The coupling module comprises a first capacitor, the input end of the coupling module is used to receive a dog feeding signal sent by a corresponding program, and the output end is connected to the base of the transistor; The transistor has a collector connected to the input end of the Schmitt trigger, the collector is also connected to the second capacitor and then grounded, and the emitter is grounded; The Schmitt trigger has an input end connected to the second capacitor and then grounded, and an output end used to output a reset signal, and the Schmitt trigger is also connected in parallel with a first resistor; The collector of the transistor is connected to the second resistor and then connected to the input end of the Schmitt trigger; The Schmitt trigger outputs a reset signal after passing through the third resistor, and is connected to a power supply after passing through the third resistor and the fourth resistor.

2. The circuit according to claim 1, characterized in that The resistance value of the second resistor is much smaller than the resistance values ​​of the first resistor, the third resistor, and the fourth resistor, and “much smaller than” means that the resistance values ​​are not of the same order of magnitude.

3. The circuit according to claim 1, characterized in that The corresponding program is U-boot.

4. A method for feeding a watchdog circuit, characterized in that: Applied in the watchdog circuit as claimed in any one of claims 1 to 3, the method comprises: Initialize the counter and set the current number of times of feeding the dog to the maximum number of times of feeding the dog; Execute a virtual dog feeding action, and decrement the current dog feeding times according to the virtual dog feeding action; After the timer is delayed and interrupted by timeout, the interrupt service program is used to monitor whether the current number of dog feeding times in this timer cycle is 0 or the maximum number of dog feeding times; If yes, the level of the dog feeding signal will not be inverted, and the actual dog feeding action will not be performed; Otherwise, the level of the dog feeding signal is inverted to perform the actual dog feeding action.

5. The method according to claim 4, characterized in that The method further comprises: Resetting the current dog feeding times corresponding to the counter to the maximum dog feeding times through the interrupt service program; The timer is reinstalled to facilitate re-execution of the virtual dog feeding action.

6. The method according to claim 4, characterized in that Before initializing the counter, the method further includes: Enable CPU interrupt, and configure the timer period, interrupt priority and interrupt vector, the CPU is the CPU of the system for resetting the watchdog circuit, and the timer period is less than 1 / 2 of the maximum feeding time of the watchdog circuit.

7. The method according to claim 6, characterized in that Before enabling CPU interrupts and configuring the timer period, interrupt priority, and interrupt vector, the method further includes: Initialize the dog feeding pin as push-pull output.

8. The method according to claim 4, characterized in that The method is executed based on U-boot.

9. A dog feeding device for a watchdog circuit, characterized in that: Applied in the watchdog circuit as claimed in any one of claims 1 to 3, the device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to execute: Initialize the counter and set the current number of times of feeding the dog to the maximum number of times of feeding the dog; Execute a virtual dog feeding action, and decrement the current dog feeding times according to the virtual dog feeding action; After the timer is delayed and interrupted by timeout, the interrupt service program is used to monitor whether the current number of dog feeding times in this timer cycle is 0 or the maximum number of dog feeding times; If yes, the level of the dog feeding signal will not be inverted, and the actual dog feeding action will not be performed; Otherwise, the level of the dog feeding signal is inverted to perform the actual dog feeding action.