From SensorScope Wireless Distributed Sensing System for Environmental Monitoring

Jump to: navigation, search

Contents

Description

This is a watchdog component for TinyOS 2.x. Such component is used to make sure that the embedded software is still running correctly. If that's not the case, the mote reboots automatically.

The code compiles fine against the latest TinyOS version (CVS) as of July 1, 2008. It should work on all MSP430-based platforms, and has been successfully tested on:

  • TinyNode motes
  • Tmote Sky motes


Issues

The hardware watchdog must be reseted every second, regardless of the deadlines provided to this module. This is done by using a timer. If there is a function/task in your code that takes a long time to execute, it may prevent the timer from being executed in time, resulting in unexpected reboots, independent of the deadlines.

Note that this component should not be used for deadlines below one second.


Usage

A sample application is provided in the archive. To compile it, use the command line for your platform, e.g.:

make tmote install.1 bsl,/dev/ttyUSB0

The watchdog can be disabled by defining DISABLE_WATCHDOG. There is an .extra file in the archive that defines it:

make tmote disable-watchdog install.1 bsl,/dev/ttyUSB0


License

Our code is available under a BSD-like license. The following copyright is included in all files, please respect it.

Copyright (c) 2007, Ecole Polytechnique Fédérale de Lausanne (EPFL),
Audiovisual Communications Laboratory, 1015 Lausanne, Switzerland.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

    * Redistributions of source code must retain the above copyright
       notice, this list of conditions and the following disclaimer.

    * Redistributions in binary form must reproduce the above copyright
       notice, this list of conditions and the following disclaimer in the
       documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
THE POSSIBILITY OF SUCH DAMAGE.


Download

v1.2 (July 2, 2008)

File Size MD5
watchdog-1.2.tar.gz 4.4KB f549102bc0dc2f1f1a489173c41adfdc


ChangeLog

v1.2 (July 2, 2008)

  • Slightly changed internals to be a bit more "TinyOS-like"


v1.1 (July 2, 2008)

  • Added a fired() event, signaled when a deadline has been missed and the mote is about to reboot
  • Added extra checks before rebooting the mote
  • DISABLE_WATCHDOG can now be defined


v1.0 (July 1, 2008)

  • First public release


Back to Downloads