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.4 How to program the watchdog timeout<br />

Figure 160 shows the linear relationship between the 6-bit value to be loaded in the<br />

watchdog counter (CNT) <strong>and</strong> the resulting timeout duration in milliseconds. This can be<br />

used for a quick calculation without taking the timing variations into account. If more<br />

precision is needed, use the formulae in Figure 160.<br />

Warning:<br />

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

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

Figure 160. Window watchdog timing diagram<br />

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

W[6:0]<br />

3Fh<br />

Refresh not allowed<br />

T6 bit<br />

Refresh window<br />

time<br />

Reset<br />

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

T = T 4096 2 WDGTB T5:0<br />

+ 1<br />

;ms<br />

WWDG PCLK1<br />

where:<br />

T WWDG : WWDG timeout<br />

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

Min-max timeout value @36 MHz (PCLK1)<br />

WDGTB Min timeout value Max timeout value<br />

0 113 µs 7.28 ms<br />

1 227 µs 14.56 ms<br />

2 455 µs 29.12 ms<br />

3 910 µs 58.25 ms<br />

18.5 Debug mode<br />

When the microcontroller enters debug mode (Cortex-M3 core halted), the WWDG counter<br />

either continues to work normally or stops, depending on DBG_WWDG_STOP configuration<br />

bit in DBG module. For more details, refer to Section 29.16.2: Debug support for timers,<br />

watchdog, bxCAN <strong>and</strong> I 2 C.<br />

406/995 Doc ID 13902 Rev 9

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

Saved successfully!

Ooh no, something went wrong!