29.01.2015 Views

STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and ...

STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and ...

STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Window watchdog (WWDG)<br />

RM0008<br />

18 Window watchdog (WWDG)<br />

Low-density devices are <strong>STM32F101xx</strong>, <strong>STM32F102xx</strong> <strong>and</strong> <strong>STM32F103xx</strong><br />

microcontrollers where the Flash memory density ranges between 16 <strong>and</strong> 32 Kbytes.<br />

Medium-density devices are <strong>STM32F101xx</strong>, <strong>STM32F102xx</strong> <strong>and</strong> <strong>STM32F103xx</strong><br />

microcontrollers where the Flash memory density ranges between 64 <strong>and</strong> 128 Kbytes.<br />

High-density devices are <strong>STM32F101xx</strong> <strong>and</strong> <strong>STM32F103xx</strong> microcontrollers where the<br />

Flash memory density ranges between 256 <strong>and</strong> 512 Kbytes.<br />

Connectivity line devices are <strong>STM32F105xx</strong> <strong>and</strong> STM32F107xx microcontrollers.<br />

This section applies to the whole STM32F10xxx family, unless otherwise specified.<br />

18.1 WWDG introduction<br />

The window watchdog is used to detect the occurrence of a software fault, usually<br />

generated by external interference or by unforeseen logical conditions, which causes the<br />

application program to ab<strong>and</strong>on its normal sequence. The watchdog circuit generates an<br />

MCU reset on expiry of a programmed time period, unless the program refreshes the<br />

contents of the downcounter before the T6 bit becomes cleared. An MCU reset is also<br />

generated if the 7-bit downcounter value (in the control register) is refreshed before the<br />

downcounter has reached the window register value. This implies that the counter must be<br />

refreshed in a limited window.<br />

18.2 WWDG main features<br />

●<br />

●<br />

●<br />

Programmable free-running downcounter<br />

Conditional reset<br />

– Reset (if watchdog activated) when the downcounter value becomes less than 40h<br />

– Reset (if watchdog activated) if the downcounter is reloaded outside the window<br />

(see Figure 160)<br />

Early wakeup interrupt (EWI): triggered (if enabled <strong>and</strong> the watchdog activated) when<br />

the downcounter is equal to 40h. Can be used to reload the counter <strong>and</strong> prevent<br />

WWDG reset<br />

18.3 WWDG functional description<br />

If the watchdog is activated (the WDGA bit is set in the WWDG_CR register) <strong>and</strong> when the<br />

7-bit downcounter (T[6:0] bits) rolls over from 0x40 to 0x3F (T6 becomes cleared), it initiates<br />

a reset. If the software reloads the counter while the counter is greater than the value stored<br />

in the window register, then a reset is generated.<br />

404/995 Doc ID 13902 Rev 9

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!