CN103823724A - Method for monitoring channel polling and CAN communication through hardware watchdog - Google Patents
Method for monitoring channel polling and CAN communication through hardware watchdog Download PDFInfo
- Publication number
- CN103823724A CN103823724A CN201410099002.0A CN201410099002A CN103823724A CN 103823724 A CN103823724 A CN 103823724A CN 201410099002 A CN201410099002 A CN 201410099002A CN 103823724 A CN103823724 A CN 103823724A
- Authority
- CN
- China
- Prior art keywords
- dog
- hardware watchdog
- communication
- letter
- hardware
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Landscapes
- Debugging And Monitoring (AREA)
Abstract
The invention discloses a method for monitoring channel polling and CAN communication through a hardware watchdog. The method includes the following steps that a system acquires rotating speed signals input by channels in turn to achieve channel polling, and the system and a computer conduct data exchange in a CAN communication mode to judge whether channel polling and CAN communication are successfully conducted every time; if both channel switching and CAN communication are successfully conducted, the dog is fed one time through programs; if channel switching or CAN communication is not successfully conducted, the programs stop feeding the dog; when the dog feeding stop time exceeds preset time, the hardware water dog automatically sends out reset signals, and then a single-chip microcomputer receives the reset signals to reset and restart the system. The hardware watchdog can not be affected by a software system, the function of the hardware watchdog can still be achieved even when the software system crashes without being interfered by external factors, hardware automatically generates the reset signals, a device can have good self-repairing capability, and stability and high reliability of the multi-channel rotating speed monitoring system are guaranteed.
Description
Technical field
The invention belongs to a kind of digital supervision method, be specifically related to a kind of method of utilizing hardware watchdog monitor channel to patrol and examine and communicate by letter with CAN.
Background technology
This technology of house dog is widely used in control system at present, its principle is exactly that system is in the time of normal operation, what energy was regular exports zero clearing order to house dog, this process is referred to as to feed dog, if system breaks down, exceedes setting-up time not to house dog output zero clearing order, house dog can overtimely be overflowed, now it can send a low level reset signal, and monolithic processor resetting is restarted, thereby plays the effect of recovery system operation.
House dog is divided into again hardware watchdog and software watchdog, hardware watchdog is to utilize an independently timer circuit, application program in the process of implementation, often needs, by central processing unit, timer is carried out to zero clearing at regular intervals, and watchdog circuit is not overflowed.Therefore program, can be in time to timer zero clearing in the time of normal work, guarantees that watchdog circuit does not overflow; If program breaks down, just can not be in time to timer zero clearing, this will cause watchdog circuit to overflow, and produce reset signal, make monolithic processor resetting.Typical hardware house dog (Watchdog) comprises hello dog input pin (WDI, Watch Dog Input) and house dog output pin (WDO, Watch Dog Output), single-chip microcomputer generally can be regularly to house dog input pin WDI input feeding-dog signal, corresponding house dog output pin WDO can export high level, if house dog input pin WDI does not regularly receive feeding-dog signal, house dog output pin WDO meeting output low level, and the hand-reset pin of WDO pin single-chip microcomputer (MR, Manual Reset) be connected, now single-chip microcomputer will be reset.
Software watchdog, to replace and adopt hard-wired timer regularly to carry out dog feeding operation with the internal clocking of central processing unit, simplify hardware circuit design, work as the system failure, not do not carry out and feed dog, when house dog is overflowed, also can output low level reset signal to hand-reset pin (MR, Manual Reset), monolithic processor resetting is restarted.
Software watchdog is in the process using, if applied environment is comparatively severe, on-the-spot interference may cause it malfunctioning, the in the situation that of system crash, the self-recovery of single-chip microcomputer be can not guarantee, thereby stability and the reliability of operation for embedded system affected to a great extent.
For the hyperchannel rotational speed measuring device of research and development, its major function is to carry out hyperchannel to patrol and examine and will record with the data of calculating by the CAN interference of conventional software watchdog due to site of deployment and system of communicating by letter, malfunctioning situation may be there is, stability and the high reliability of hyperchannel rotation speed monitoring system can not be met.
Summary of the invention
The present invention is for a kind of method of utilizing hardware watchdog monitor channel to patrol and examine and communicate by letter with CAN that provides is provided.
Technical scheme of the present invention is: a kind of method of utilizing hardware watchdog monitor channel to patrol and examine and communicate by letter with CAN, comprises the following steps:
(I) supervising device run duration, system gathers the tach signal of each passage input in turn, realizes passage and patrols and examines, and the mode of also communicating by letter by CAN with computing machine is carried out data exchange (S1) simultaneously;
(II) judges that every subchannel patrols and examines the whether success (S2) of communicating by letter with CAN;
(III), if passage switches all successes of communicating by letter with CAN, program is just fed once (S3) of dog;
(IV), if passage switches or not success of CAN communication, program just stops feeding dog (S4);
(V) exceedes setting-up time when stopping feeding dog, and hardware watchdog 2 just sends reset signal (S5) automatically;
(VI) single-chip microcomputer receives reset signal and will reset and restart system (S6);
The model of described hardware watchdog 2 is STWD100.
The present invention can make watchdog function not affected by software systems, even if software systems collapse still can realize reset function, is not disturbed by extraneous factor, and hardware produces reset signal automatically, thereby makes device have good self-repairing capability.Stability and the high reliability of its system of hyperchannel rotational speed measuring device are guaranteed.
Accompanying drawing explanation
Fig. 1 is the connection layout of hardware watchdog of the present invention and single-chip microcomputer;
Fig. 2 is the circuit diagram of reseting switch circuit of the present invention;
To be the present invention patrol and examine and the process flow diagram of CAN communication monitoring passage Fig. 3.
Wherein:
1 single-chip microcomputer 2 hardware watchdogs
3 reseting switch circuits.
Embodiment
Below, with reference to drawings and Examples, a kind of method of utilizing hardware watchdog monitor channel to patrol and examine and communicate by letter with CAN of the present invention is elaborated:
As shown in Figure 1, a kind of method of utilizing hardware watchdog monitor channel to patrol and examine and communicate by letter with CAN, wherein hardware watchdog 2 is arranged in hyperchannel rotation speed monitor, and concrete connected mode is:
An I/O pin of single-chip microcomputer 1 is connected to the WDI pin of hardware watchdog 2, and the WDO pin of hardware watchdog 2 is connected to the input end of reseting switch circuit, and the output terminal of reseting switch circuit is connected to the RESET pin of single-chip microcomputer.
At system normal operation period, the I/O pin of single-chip microcomputer 1 is the WDI pin output feeding-dog signal to hardware watchdog 2 regularly, at this moment the WDO pin of hardware watchdog 2 keeps the input end of output high level to reseting switch circuit, makes the output terminal of reseting switch circuit also keep exporting the RESET pin of high level to single-chip microcomputer.
If system operation is broken down, the I/O pin of single-chip microcomputer 1 stops the WDI pin output feeding-dog signal to hardware watchdog 2, when the timer of overtime initiation hardware watchdog 2 overflows, make the WDO pin output low level of hardware watchdog 2 to the input end of reseting switch circuit, the output terminal of reseting switch circuit also output low level, to the RESET pin of single-chip microcomputer, is restarted single-chip microcomputer thereby reset.
Wherein, the model of single-chip microcomputer 1 is C8051F040, and the model of hardware watchdog is STWD100.
As shown in Figure 2, reseting switch circuit structure, the WDO pin of hardware watchdog 2 is connected to the input end of reseting switch circuit, in the time being input as high level, the output terminal of reseting switch circuit is also exported high level, in the time being input as low level, and also output low level of the output terminal of reseting switch circuit.
As shown in Figure 3, a kind of method of utilizing hardware watchdog monitor channel to patrol and examine and communicate by letter with CAN of the present invention, comprises the following steps:
(I) supervising device run duration, system gathers the tach signal of each passage input in turn, realizes passage and patrols and examines, and the mode of also communicating by letter by CAN with computing machine is carried out data exchange (S1) simultaneously;
(II) judges that every subchannel patrols and examines the whether success (S2) of communicating by letter with CAN;
(III), if passage switches all successes of communicating by letter with CAN, program is just fed once (S3) of dog;
(IV), if passage switches or not success of CAN communication, program just stops feeding dog (S4);
(V) exceedes setting-up time when stopping feeding dog, and hardware watchdog 2 just sends reset signal (S5) automatically;
(VI) single-chip microcomputer receives reset signal and will reset and restart system (S6);
After restarting, hyperchannel rotational speed measuring device recovers patrolling and examining and communicating by letter with the CAN of computing machine each passage.
The present invention can make watchdog function not affected by software systems, even if software systems collapse still can realize reset function, is not disturbed by extraneous factor, and hardware produces reset signal automatically, thereby makes device have good self-repairing capability.Stability and the high reliability of its system of hyperchannel rotational speed measuring device are guaranteed.
Claims (2)
1. utilize hardware watchdog monitor channel to patrol and examine a method of communicating by letter with CAN, it is characterized in that: comprise the following steps:
(I) supervising device run duration, system gathers the tach signal of each passage input in turn, realizes passage and patrols and examines, and the mode of also communicating by letter by CAN with computing machine is carried out data exchange (S1) simultaneously;
(II) judges that every subchannel patrols and examines the whether success (S2) of communicating by letter with CAN;
(III), if passage switches all successes of communicating by letter with CAN, program is just fed once (S3) of dog;
(IV), if passage switches or not success of CAN communication, program just stops feeding dog (S4);
(V) exceedes setting-up time when stopping feeding dog, and hardware watchdog (2) just sends reset signal (S5) automatically;
(VI) single-chip microcomputer receives reset signal and will reset and restart system (S6).
2. the method for utilizing hardware watchdog monitor channel to patrol and examine and communicate by letter with CAN according to claim 1, is characterized in that: the model of described hardware watchdog (2) is STWD100.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410099002.0A CN103823724B (en) | 2014-03-18 | 2014-03-18 | Method for monitoring channel polling and CAN communication through hardware watchdog |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410099002.0A CN103823724B (en) | 2014-03-18 | 2014-03-18 | Method for monitoring channel polling and CAN communication through hardware watchdog |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103823724A true CN103823724A (en) | 2014-05-28 |
CN103823724B CN103823724B (en) | 2017-02-15 |
Family
ID=50758806
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410099002.0A Active CN103823724B (en) | 2014-03-18 | 2014-03-18 | Method for monitoring channel polling and CAN communication through hardware watchdog |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103823724B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112783070A (en) * | 2021-01-20 | 2021-05-11 | 深圳市雷能混合集成电路有限公司 | Singlechip power-on processing method and device |
CN113946148A (en) * | 2021-09-29 | 2022-01-18 | 浙江零跑科技股份有限公司 | MCU chip awakening system based on multi-ECU cooperative control |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN201885737U (en) * | 2010-12-15 | 2011-06-29 | 河南光彩电器有限公司 | Digital display instrument |
CN202153352U (en) * | 2011-07-06 | 2012-02-29 | 上海渠瀚实业有限公司 | Watchdog device capable of preventing computer control system from failure |
US20120130968A1 (en) * | 2010-11-18 | 2012-05-24 | Sling Media Pvt Ltd | Automated searching for solutions to support self-diagnostic operations of web-enabled devices |
-
2014
- 2014-03-18 CN CN201410099002.0A patent/CN103823724B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120130968A1 (en) * | 2010-11-18 | 2012-05-24 | Sling Media Pvt Ltd | Automated searching for solutions to support self-diagnostic operations of web-enabled devices |
CN201885737U (en) * | 2010-12-15 | 2011-06-29 | 河南光彩电器有限公司 | Digital display instrument |
CN202153352U (en) * | 2011-07-06 | 2012-02-29 | 上海渠瀚实业有限公司 | Watchdog device capable of preventing computer control system from failure |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112783070A (en) * | 2021-01-20 | 2021-05-11 | 深圳市雷能混合集成电路有限公司 | Singlechip power-on processing method and device |
CN112783070B (en) * | 2021-01-20 | 2024-05-07 | 深圳市雷能混合集成电路有限公司 | Singlechip power-on processing method and device |
CN113946148A (en) * | 2021-09-29 | 2022-01-18 | 浙江零跑科技股份有限公司 | MCU chip awakening system based on multi-ECU cooperative control |
CN113946148B (en) * | 2021-09-29 | 2023-11-10 | 浙江零跑科技股份有限公司 | MCU chip awakening system based on multi-ECU cooperative control |
Also Published As
Publication number | Publication date |
---|---|
CN103823724B (en) | 2017-02-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111352338B (en) | Dual-redundancy flight control computer and redundancy management method | |
US9612893B2 (en) | Peripheral watchdog timer | |
CN103064382B (en) | Optical proximity correction (OPC) embedded-type remote data collecting system and method based on ARM framework | |
CN111831488B (en) | TCMS-MPU control unit with safety level design | |
CN105446851A (en) | Processor monitoring method and system and MCU (Microprogrammed Control Unit) for monitoring processor | |
WO2015196365A1 (en) | Fault processing method, related device and computer | |
CN106952464A (en) | Intelligent data acqusition system and acquisition method | |
CN102891762B (en) | The system and method for network data continuously | |
CN102761439A (en) | Device and method for detecting and recording abnormity on basis of watchdog in PON (Passive Optical Network) access system | |
CN103853625A (en) | Realizing device and method for multi-task watchdog | |
CN204926065U (en) | Trouble self -resuming device under CPU system degree of depth park mode | |
CN104615472A (en) | Method for preventing BIOS+ME FW online refresh failure | |
CN105242980A (en) | Complementary watchdog system and complementary watchdog monitoring method | |
CN103580941B (en) | Network watchdog and its implementation | |
CN111796954A (en) | Watchdog control method, device, equipment and storage medium based on JVM | |
CN104572331A (en) | Monitoring module with power monitoring and electrifying delay enable | |
CN113360347A (en) | Server and control method thereof | |
CN103365267B (en) | A kind of spacing layer device for transformer station and its implementation with self-recovering function | |
CN103823724A (en) | Method for monitoring channel polling and CAN communication through hardware watchdog | |
CN101901168A (en) | Watchdog resetting system and resetting method thereof | |
CN104731736A (en) | Time synchronization device, method and system | |
CN107026759A (en) | The firmware and its development approach of a kind of remote management BBU modules based on BMC | |
CN110502369A (en) | A kind of method, apparatus and storage medium of equipment crash recovery | |
CN105527914A (en) | Double-CPU reliably-designed base station power environment monitoring device and method | |
CN112084053A (en) | Watchdog module |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant |