Timers; Watchdog; Rtc Watchdog For Reseting Waspmote - Libelium Waspmote Technical Manual

Hide thumbs Also See for Waspmote:
Table of Contents

Advertisement

Architecture and system

5.2. Timers

Waspmote uses a quartz oscillator which works at a frequency of 14.7456 MHz as a system clock. In this way, every
125ns the microcontroller runs a low level (machine language) instruction. It must be taken into account that each
line of C++ code of a program compiled by Waspmote includes several instructions in machine language.
Waspmote is a device prepared for operation in adverse conditions with regards to noise and electromagnetic
contamination, for this reason, to ensure stable communication at all times with the different modules connected
through a serial line to the UARTs (communication modules and USB) a maximum transmission speed of 115200
bps has been set for the communication modules and the USB port, and 4800 for the GPS, so that the success
rate in received bits is 100%.

5.2.1. Watchdog

The ATmega1281 microcontroller has an internal Enhanced Watchdog Time – WDT. The WDT precisely counts
the clock cycles generated by a 128 kHz oscillator. The WDT generates an interruption signal when the counter
reaches the set value. This interruption signal can be used to wake the microcontroller from the Sleep mode or
to generate an internal alarm when it is running in on mode, which is very useful when developing programs with
timed interruptions.
The WDT allows the microcontroller to wake up from a low consumption Sleep mode by generating an interruption.
For this reason, this clock is used as a time-based alarm associated with the microcontroller's Sleep mode. This
allows very precise control of small time intervals: 16 ms, 32 ms, 64 ms, 128 ms, 256 ms, 500 ms, 1 s, 2 s, 4 s, 8
s. For intervals over 8 s (Deep Sleep mode), the RTC is used and not the microcontroller.
More information about the interruptions generated by the Watchdog can be found in the "Energy system" chapter.
Related API libraries: WaspPWR.h, WaspPWR.cpp
All information about their programming and operation can be found in the
Interrupt Programming
Guide.
All the documentation is located in the
Development section
in the Libelium website.

5.2.2. RTC Watchdog for reseting Waspmote

One of the alarms of the RTC (Alarm 2) is connected to a Watchdog reset circuit that is able to reset the microcontroller
of Waspmote when the alarm is generated. This Watchdog has been implemented for reseting Waspmote if it gets
stuck. That periodical reset avoids erratic behaviour. This is highly recommended for applications that need to be
very robust and can never stop working. The use of the Watchdog feature enssures us that our Waspmote will
never stop working.
The Watchdog feature requires the physical watchdog switch to be put in "enable" position.
Figure: RTC Watchdog switch
Related API libraries: WaspRTC.h, WaspRTC.cpp
All information about the RTC programming and operation can be found in the
RTC Programming
Guide.
All the documentation is located in the
Development section
in the Libelium website.
-65-
v8.2

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Waspmote and is the answer not in the manual?

Subscribe to Our Youtube Channel

Table of Contents