09.12.2012 Views

RM0090: Reference manual - STMicroelectronics

RM0090: Reference manual - STMicroelectronics

RM0090: Reference manual - STMicroelectronics

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Window watchdog (WWDG) <strong>RM0090</strong><br />

case, the corresponding interrupt service routine (ISR) should reload the WWDG counter to<br />

avoid the WWDG reset, then trigger the required actions.<br />

The EWI interrupt is cleared by writing '0' to the EWIF bit in the WWDG_SR register.<br />

Note: When the EWI interrupt cannot be served, e.g. due to a system lock in a higher priority task,<br />

the WWDG reset will eventually be generated.<br />

19.4 How to program the watchdog timeout<br />

You can use the formula in Figure 200 to calculate the WWDG timeout.<br />

Warning: When writing to the WWDG_CR register, always write 1 in the<br />

T6 bit to avoid generating an immediate reset.<br />

Figure 200. Window watchdog timing diagram<br />

The formula to calculate the timeout value is given by:<br />

× 2 WDGTB<br />

= × × ( t[ 5:0]<br />

+ 1)<br />

( ms)<br />

where:<br />

T[6:0] CNT downcounter<br />

W[6:0]<br />

0x3F<br />

T6 bit<br />

RESET<br />

t WWDG: WWDG timeout<br />

Refresh not allowed<br />

t WWDG t PCLK1 4096<br />

t PCLK1: APB1 clock period measured in ms<br />

Refresh allowed<br />

Refer to the table below for the minimum and maximum values of the T WWDG.<br />

539/1416 Doc ID 018909 Rev 3<br />

Time<br />

ai17101b

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

Saved successfully!

Ooh no, something went wrong!