The Role and Difference Between Software Watchdog and Hardware Watchdog
Industrial cellular routers, as very important devices in wireless networking, have insight into customer application scenarios. As long as it is related to the reliability of wireless networking, even the most subtle technical applications should be excellent, such as guard dogs. Why do Industrial cellular routers attach so much importance to hardware and software watchdog, today we will take a look at the similarities between these devices.
A watchdog, also called a watchdog timer, is a timer circuit, Generally has an input, called feed the dog, an output to the MCU RST end, MCU normal work, and every once in a while output a signal to feed the dog end, to clear WDT, if exceed the specified time not to feed the dog (generally in the program to run away), WDT timing exceed, will give a reset signal to MCU, make MCU reset. Prevent the MCU from shutting down. The watchdog is there to keep the program from going into a loop or running away.
Working principle: After the system is running, the watchdog counter is started, and the watchdog begins to count automatically. If the watchdog is not cleared within a certain time, then the watchdog counter will overflow and cause the watchdog to interrupt, causing the system to reset. So the use of a watchdog chip to pay attention to clear the watchdog.
The hardware watchdog uses a timer to monitor the running of the main program, which means that during the running of the main program, we have to reset the timer before the timer expires if there is an endless loop, or the PC pointer doesn't come back. Then when the timing time is up, it will reset the MCU.
The principle of software watchdog technology is similar to this, but it is realized by software. We still use the 51 series. We know that there are two timers in 51 microcontrollers, and we can use these two timers to monitor the operation of the main program. We can set a certain timing time for T0, when the timing interrupt occurs, to assign a value to a variable, and this variable has an initial value at the beginning of the main program running, here we want to set a fixed time value less than the running time of the main program, so that at the end of the main program to judge the value of the variable if the value has changed as expected, It means that the T0 interrupt is normal, and if there is no change, the program will be reset.
For T1 we use to monitor the operation of the main program, we set a certain timing time for T1, and reset it in the main program. If it cannot be reset in a certain time, the timing interrupt of T1 will reset the MCU. Here, the timing time of T1 should be set to be larger than the running time of the main program, leaving a certain margin for the main program. And T1 interrupt normal or not we by T0 timing interrupt subroutine to monitor. This is enough to become a cycle, T0 monitors T1, T1 monitors the main program, and the main program monitors T0, so as to ensure the stable operation of the system.
The main similarities and differences between software and hardware watchdog.
The similarities are as follows:
1) Both are achieved by timer; Reset the timer without feeding the dog.
2) It is necessary to feed the dog within the specified time.
3) Both rely on software to feed dogs.
The main differences are as follows:
1) Additional features: Hardware watchdog chips generally come with delayed reset and power testing capabilities, but the software does not.
2) Shielding method: The software watchdog is easy to mask off, only need to modify the register, and the hardware watchdog once started power can not stop.
3) Startup mode: software watchdog is easy to start, just modify the register in it. The hardware is generally started after receiving the first signal to feed the dog.
4) Initialization: hardware watchdog completes initialization when it receives the first feeding pulse after power-on, while the software watchdog needs to configure relevant registers (or call relevant watchdog subroutines).
Industrial router watchdog design
Industrial cellular routers and Industrial cellular modems have dual watchdogs, including software watchdogs and hardware watchdogs. They will wake up intelligently when the terminals are in trouble or restart automatically. Ensuring smooth wireless networking and wireless data transmission in real-time.
Software watchdog includes a process of kicking the dog or servicing the dog. The dog feeding process performs the dog feeding operation on a certain period, which is less than or equal to the period of the timer. Specifically, when the system is working normally, every once in a while output a signal to the dog feeding end, to reset the timer; If the dog is not fed beyond the specified time and the timer times out, a reset signal will be output to the system to reset the system to prevent the system from crashing.
The hardware watchdog is not restricted by the software. When the device is powered on, it can rely on the high pulse provided by the pull-up resistor to start the watchdog. As long as the software does not feed the dog in time, it will be reset, which is unconditional. The so-called "you get what you pay for" is also applicable to electronic products.
The main difference between software and hardware watchdog lies in the timing of opening the watchdog. Software watchdog must be initialized (configured) before it can be used. If the software watchdog is an API interface in the SDK provided by the manufacturer, the developer has no ability to modify the underlying uboot and kernel, and can not open and feed the dog in the uboot and kernel stage, The time to open the watchdog is very late, the program may not run to the watchdog initialization on the hang, in the middle are not controlled.
- |
- +1 赞 0
- 收藏
- 评论 0
本文由Vicky转载自usr News,原文标题为:The role and difference between software watchdog and hardware watchdog,本站所有转载文章系出于传递更多信息之目的,且明确注明来源,不希望被转载的媒体或个人可与我们联系,我们将立即进行删除处理。
相关推荐
The Value of Lte 4g Router in the Field of Wind Power Generation
Lte 4g Router have broad application prospects and tremendous value in the field of wind power generation. Leveraging their powerful network connectivity, data processing, and security capabilities, Lte 4g Router provide robust support for the stable operation, efficient management, and safety of wind power generation, driving the sustained and healthy development of the industry.
技术探讨 发布时间 : 2024-04-20
Distinguishing POE Power Supply in Lte 4G Router from Conventional Routers
The PoE power supply in lte 4g router differs significantly from that of conventional routers. lte 4g router are designed to meet the unique demands of industrial environments, offering higher power ratings, advanced power management, enhanced durability and reliability, and additional safety features.
技术探讨 发布时间 : 2024-03-22
DDNS Function in Industrial Routers: Deep Analysis and Application Practice
An IP address is a numerical label used to uniquely identify each device on a network. The most widely used version of IPv4 addresses consists of 32-bit binary numbers, usually divided into four groups of eight bits each, separated by dots. Each group is represented by a decimal number ranging from 0 to 255. For example, 192.168.1.1 is an IPv4 address.
技术探讨 发布时间 : 2024-07-27
有人物联(usr)工业路由器选型指南
目录- Company Profile High performance 4G industrial VPN router Dual module 4G cellular router Dual Ethernet with serial port 4G router Dual Ethernet 4G industrial router Small business 4G industrial router 5G Gigabit industrial cellular router Solutions and applications PUSR cloud
型号- USR-G781-A,USR-G781-43,USR-G806-EAU,USR-G781-E,G810,USR-SDR160,USR-IO424T,USR-G810,USR-G808-33,USR-G808-AA,USR-G808-EE,USR-G809-EAU,USR-G810-E,USR-0781,USR-G805-ECAUX,USR-G806,USR-G806W,USR-G809,USR-G808,USR-G805-ECEUX,USR-G806S,USR-G808-AU,G781,USR-G781,USR-G809-E,USR-G806S-EAU,USR-G806-G,USR-G806-AU,USR-G806-E,G808,USR-G806-43,USR-G806-A,USR-TCP232-410S,G806S,USR-G805,USR-G781-AU,USR-G806S-43
Looking Forward to The Future Development Trend of 5g Industrial Routers
In the rapidly developing field of industrial Internet of Things (IIoT), 5G industrial routers are gradually becoming the core devices for connecting devices and driving digital transformation. With the continuous maturity and wide application of 5G technology, 5G industrial routers will show a broader development prospect and trend in the future.1. Higher data transmission speed and lower latency5G network provides unprecedented data transmission capacity for industrial IoT with its ultra-high speed and low latency characteristics.
设计经验 发布时间 : 2024-10-31
How 5g Industrial Routers Can Give Wings to Intelligent Manufacturing
5G industrial routers play an irreplaceable role in intelligent manufacturing with their unique advantages. It can not only achieve real-time collection and transmission of production data, provide strong support for production decisions, but also support remote operation and maintenance and multiple industrial protocol analysis, promoting the deep integration of intelligent manufacturing systems.
技术探讨 发布时间 : 2024-10-30
The Role of Subnet Mask
The setting principle of the subnet mask for Industrial Router involves network planning, subnet mask selection, configuration, and verification. By deeply understanding these principles and making reasonable settings based on actual needs, it can ensure the stable, efficient, and secure operation of the Industrial IoT network.
技术探讨 发布时间 : 2024-07-28
Starting from The Needs, Tailor The 4G Industrial Router Purchase Plan for The Enterprise
Starting from the needs, the purchase plan for 4G industrial routers tailored for enterprises needs to consider multiple aspects such as application scenarios, performance requirements, durability and environmental adaptability, network security and manageability, as well as after-sales service and technical support. By selecting routers scientifically and reasonably, enterprises can build a stable, efficient and secure network infrastructure, providing strong support for digital transformation.
设计经验 发布时间 : 2024-10-29
5G Industrial Router Helps Industrial Applications
With the rapid development of intelligent manufacturing and intelligent factory applications, more and more machinery and equipment are transformed into digital, information, and network, and the traditional manufacturing operation mode has not met the needs of modern industrial development.
应用方案 发布时间 : 2023-04-08
How to Choose Industrial Routers in The Era of Industry 4.0
In the era of Industry 4.0, selecting the right industrial router is the key to ensuring stable and efficient operation of networking applications. By clarifying the application scenarios, evaluating performance parameters, focusing on protection levels and reliability, considering network security, paying attention to management and maintenance, focusing on protocol support and interface richness, and considering redundancy and scalability, we can help you better choose the right industrial router and provide strong support for the intelligent upgrade of enterprises.
设计经验 发布时间 : 2024-10-28
4G Cellular Router: The Key to Unclok Smart Factories
4G Cellular Router play a pivotal role in transforming traditional factories into smart factories. They provide reliable and high-speed wireless connectivity, enable real-time data collection and analysis, and offer scalability and security for future growth. By deploying these routers, factories can unlock the full potential of IIoT technologies and achieve significant improvements in efficiency, productivity, and competitiveness.
原厂动态 发布时间 : 2024-03-17
The Distinction Between Cellular Router and Cellular Gateway In Industrial IoT Applications
In the rapidly evolving world of Industrial Internet of Things (IIoT), Cellular Router and Cellular Gateway play pivotal roles in connecting devices, systems, and networks. Both devices enable wireless communication and data transmission, but they differ significantly in their functionalities, applications, and deployment scenarios. This article aims to delve into the fundamental differences between Cellular Router and Cellular Gateway, highlighting their unique characteristics and use cases in industrial settings.
技术探讨 发布时间 : 2024-03-31
Remote Communication Solutions for 4G Industrial Routers Bring Many Conveniences to the Industrial Field
With the rapid development of the Industrial Internet of Things, 4G industrial routers, as a new type of industrial communication solution, are gradually showing their great potential. This type of router not only supports 4G wireless communication but also has multiple communication methods such as Ethernet and Wi-Fi, which can flexibly respond to various complex industrial communication needs.
技术探讨 发布时间 : 2024-10-27
电子商城
登录 | 立即注册
提交评论