1112 views|2 replies

4817

Posts

4

Resources
The OP
 

Notes on using watchdog in embedded software development [Copy link]

 
  1. Set an appropriate count value: According to the real-time requirements of the system and the running time of the program, the count value of the watchdog needs to be set reasonably. If the count value is set too small, it may trigger a reset too early; if it is set too large, program abnormalities may not be detected in time. Usually, it needs to be adjusted according to the specific application scenario and system requirements.

  2. Feeding interval: In order to avoid being reset, the watchdog needs to be fed periodically before the watchdog count value reaches the threshold. The feeding interval should be short enough, but not too frequent to avoid adding extra burden to the system. It is generally recommended to feed the watchdog between half and two-thirds of the count value.

  3. Handling abnormal situations: If the program is abnormal or enters an infinite loop or other unresponsive state, it will not be able to feed the dog in time and will eventually trigger a reset. In order to ensure the stability of the program, it is necessary to handle various possible abnormal situations in the code to avoid situations where the program cannot run normally.

  4. Ensure the reliability of feeding the dog: To ensure the punctuality and reliability of feeding the dog, you can use a hardware timer or a software timer to feed the dog regularly. The hardware timer can provide higher accuracy and stability, but in some systems there may be no hardware timer available, in which case it can be achieved through a software timer.

Latest reply

We really need to consider the application of watchdogs. They were rarely used before.   Details Published on 2023-7-1 17:03
 

1462

Posts

0

Resources
2
 
A good summary of the precautions for using watchdogs in embedded software development
 
 
 

5998

Posts

6

Resources
3
 

We really need to consider the application of watchdogs. They were rarely used before.

 
Personal signature

在爱好的道路上不断前进,在生活的迷雾中播撒光引

 
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list