An RTOS's close cooperation with the watchdog

Source: Internet
Author: User

    watchdog technology has long been more and more into the microcontroller system. It has become a standard component in the embedded system so far.
    at the same time, the research on the application of watchdog technology has been greatly developed. Of course, in the most common front and rear systems, usually placed in the foreground of the main loop to feed the dog, to monitor all the other parts of the death cycle. Of course there are interruptions to feed the dog to monitor. For this system, do not repeat this.
    In addition, in the field of embedded systems, in recent years, RTOS has been more and more widely used in a slightly more complex system. I recently polished an OS to do experiments, accidental failures triggered the RTOS and the watchdog how close cooperation thinking.
    In fact, the traditional application of watchdog technology in the pre-backstage system has been found to be a serious problem after entering the OS.
    It is true that the purpose of using watchdog technology is to monitor the system for periods of time that should not be long. The key point of the watchdog technology use: is to be able to make all the super-long cycle can be found, of course, there is no long-time cycle should not be mistaken action . These requirements, in the former back-end system, using the main loop and a few known large time cycle (judging by the run-time evaluation) in the simple processing of feeding dogs is generally able to meet the requirements.
    However, after entering the OS, especially the preemptive OS, the situation becomes complicated.
    of course, the purpose of using a watchdog is still to find all the extra-long loops as much as possible, without the extra-long loops not supposed to malfunction.
    However, in a system that contains an OS, all the work is done with a number of tasks. This requires the watchdog to be able to monitor the cycle of each task over a long period of time, so we often add a dog-feeding instruction to each task cycle. But the result is that frequent high-priority task-feeding instructions can make it impossible for the watchdog to monitor the long-timeout cycle of low-priority tasks! Conversely, if you just put the dog feeding instructions in the lowest priority task, because the frequent high-priority tasks compete for control of the CPU, it is not necessary to run low-priority tasks for a long time but may cause the watchdog to act incorrectly!
    please talk about their solutions! Thank you


2 Floor: >> participate in the discussion
Author: Zhuph on 2006-1-9 18:34:00 Published:
--------------------------------------------------------------------------------
After the use of RTOS, whether to change the idea.
Like upstairs, there is never a head, and the system becomes more and more complex. There is a sense that it is possible to consider this problem from an architectural perspective, not just from the programming itself.


3 Floor: >> participate in the discussion
Author: avr1008 on 2006-1-10 10:18:00 Published:
--------------------------------------------------------------------------------
Each task is timed to the watchdog task method message
Each task is timed to the watchdog task method message, and if the watchdog task is receiving a message from all other missions within a certain time, feed the dog.


4 Floor: >> Participate in the discussion
Author: Eisenhower on 2006-1-10 10:38:00 released:
--------------------------------------------------------------------------------
Long experience.

5 Floor: >> Participate in the discussion
Author: 12864 on 2006-1-10 11:50:00 released:
--------------------------------------------------------------------------------
is the system task so full?

6 Floor: >> Participate in the discussion
Author: Airwill on 2006-1-10 22:22:00 Published:
--------------------------------------------------------------------------------
Feel the attention of several upstairs
To Zhuph: You can consider this from an architectural perspective, I suppose. But would you please tell me in detail how to consider it?

To avr1008: Your method is not a solution, but is not comprehensive, because as discussed above, because of frequent high-priority tasks for the control of the CPU, resulting in not requiring long-running low-priority tasks and therefore too late to send messages to the watchdog task, resulting in watchdog error action!
So the feeling is not a complete solution.

To 12864: In fact, the system is not always arranged so full, but we can not guarantee that the system will not be in a certain period of time will be so full of circumstances, or, the system software design and improve the requirements, right?

Thought for a long time, or confused. I would also like to invite you to discuss this together. Thank you!



7 Floor: >> Participate in the discussion
Author: Eisenhower on 2006-1-11 15:35:00 released:
--------------------------------------------------------------------------------
You don't always use dogs on any occasion.
It seems that you must use it. Industrial control.


8 Floor: >> Participate in the discussion
Author: Airwill on 2006-1-13 17:54:00 Published:
--------------------------------------------------------------------------------
Yes, industrial control.
It's not really about any application, I'm just like a public program interface, or a generic solution.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.