Vault 7: Projects
This publication series is about specific projects related to the Vault 7 main publication.
© 2010 Microchip Technology Inc. DS39697B-page 9-5
Section 9. Watchdog Timer (WDT)
Watchdog Timer
(WDT)
9
9.2.4 WDT Prescaler and Timer Period
The WDT clock source is the LPRC oscillator, which has a nominal frequency of 31 kHz. This
feeds a prescaler that can be configured for either 5-bit (divide-by-32) or 7-bit (divide-by-128)
operation. The prescaler is set by the FWPSA Configuration bit (CW1<4>). With a 31 kHz input,
the prescaler yields a nominal WDT time-out period (T
WDT) of 1 ms when WDTPRE is clear, or
4 ms when WDTPRE is set.
A variable postscaler divides down the WDT prescaler output and allows for a wide range of
time-out periods. The postscaler is controlled by the WDTPPOST<3:0> Configuration bits
(CW1<3:0>), which allows the selection of a total of 16 settings, from 1:1 to 1:32.768. The
WDTPOST bits are configured initially during device programming. Using the prescaler and
postscaler, time-out periods ranging from 1 ms to 131 seconds (nominal) can be achieved.
The WDT time-out value can be calculated as shown in Equation 9-1. A complete list of prescaler
values and the associated WDT time-out periods is shown in Table 9-2.
Equation 9-1: WDT Time-out Period
Table 9-2: WDT Configuration and Time-out Period
Postscaler Setting
(WDTPS3:WDTPS0)
Postscaler Ratio
(1/Postscaler
Factor)
Time-out Period
5-bit Prescaler
(FWPSA = 0)
7-bit Prescaler
(FWPSA = 1)
0000 1:1 1 ms 4 ms
0001 1:2 2 ms 8 ms
0010 1:4 4 ms 16 ms
0011 1:8 8 ms 32 ms
0100 1:16 16 ms 64 ms
0101 1:32 32 ms 128 ms
0110 1:64 64 ms 256 ms
0111 1:128 128 ms 512 ms
1000 1:256 256 ms 1.024s
1001 1:512 512 ms 2.048s
1010 1:1024 1.024s 4.096s
1011 1:2048 2.048s 8.192s
1100 1:4096 4.096s 16.384s
1101 1:8192 8.192s 32.768s
1110 1:16384 16.384s 65.536s
1111 1:32768 32.768s 131.072s
WDT Period (ms) = Prescaler Factor x Postscaler Factor
where:
Prescaler Factor = 1 for WDTPRE is ‘0’
4 for WDTPRE is ‘1’
Postscaler Factor = 1/Postscaler Ratio
Note: The WDT time-out period is directly related to the frequency of the LPRC oscillator,
which in turn, may vary as a function of device operating voltage and temperature.
Please refer to the appropriate PIC24F device data sheet for LPRC clock frequency
specifications.
Protego_Release_01_05-Related-OEM-Documentation-PIC24FJ32MC10X-Reference_Manual-Section9-Watchdog_Timer.pdf