![Maxim Integrated MAX32660 Скачать руководство пользователя страница 127](http://html1.mh-extra.com/html/maxim-integrated/max32660/max32660_user-manual_1744484127.webp)
MAX32660 User Guide
Maxim Integrated
Page 127 of 195
11.2
Usage
Utilizing the watchdog timer in the application software is straightforward. As early as possible in the application software,
enable the watchdog timer interrupt and watchdog timer reset. Periodically the application software must write to the
register to reset the watchdog counter. If program execution becomes lost, the watchdog timer interrupt will
ccur, giving th syst m a “last chanc ” t r c v r fr m what v r circumstanc caus th impr p r c x cuti n. h
interrupt routine may either attempt to repair the situation or allow the watchdog timer reset to occur. In the event of a
system software failure, the interrupt will not be executed, and the watchdog system reset will recover operation.
As soon as possible after a reset, the application software should interrogate the
.rst_flag
to determine if the
reset event resulted from a watchdog timer reset. If so, application software should assume that there was a program
execution error and take whatever steps necessary to guard against a software corruption issue.
11.3
Interrupt and Reset Period Timeout Configuration
Each watchdog timer supports two independent timeout periods, the interrupt period timeout and reset period timeout.
Interrupt Period Timeout (WDT_CTRL0.int_period)
- Sets the number of PCLK cycles until a watchdog timer interrupt is
generated. This period must be less than the Reset Period Timeout for the watchdog timer interrupt to occur.
Reset Period Timeout (WDT_CTRL0.rst_period)
–
Sets the number of PCLK cycles until a system reset event occurs.
The interrupt and reset period timeouts are calculated using
and
𝑓
𝑃𝐶𝐿𝐾
=
𝑓
𝑆𝑌𝑆𝐶𝐿𝐾
2
⁄
shows example interrupt period timeout calculations for several
.int_period
settings with the System Clock set as the 96MHz High-Frequency Internal Oscillator.
Equation 11-1: Watchdog Timer Interrupt Period
𝑇
𝐼𝑁𝑇_𝑃𝐸𝑅𝐼𝑂𝐷
= (
1
𝑓
𝑃𝐶𝐿𝐾
) × 2
(31−𝑊𝐷𝑇0_𝐶𝑇𝑅𝐿.𝑖𝑛𝑡_𝑝𝑒𝑟𝑖𝑜𝑑)
Equation 11-2. Watchdog Timer Reset Period
𝑇
𝑅𝑆𝑇_𝑃𝐸𝑅𝐼𝑂𝐷
= (
1
𝑓
𝑃𝐶𝐿𝐾
) × 2
(31−𝑊𝐷𝑇0_𝐶𝑇𝑅𝐿.𝑟𝑠𝑡_𝑝𝑒𝑟𝑖𝑜𝑑)
Table 11-1: Watchdog Timer Interrupt Period with f
SYSCLK
= 96MHz and f
PCLK
= 48MHz
WDT0_CTRL
int_period
T
INT_PERIOD
(seconds)
15
0.001
14
0.002
13
0.004
12
0.009
11
0.018
10
0.035
9
0.070
8
0.140
Содержание MAX32660
Страница 4: ...MAX32660 User Guide Maxim Integrated Page 4 of 195 8 UART 84 9 Real Time Clock RTC 96 10 Timers 105...
Страница 7: ...MAX32660 User Guide Maxim Integrated Page 7 of 195 15 Trademarks 195 16 Revision History 195...
Страница 14: ...MAX32660 User Guide Maxim Integrated Page 14 of 195 Figure 2 1 MAX32660 High Level Block Diagram...