Atmel Xplained Pro Evaluation Kit for the ATSAMD21J18A Microcontroller ATSAMD21-XPRO ATSAMD21-XPRO Data Sheet

Product codes
ATSAMD21-XPRO
Page of 1018
205
Atmel | SMART SAM D21 [DATASHEET]
Atmel-42181C–SAM-D21_Datasheet–07/2014
The window mode operation is illustrated in 
.
Figure 17-3. Window-Mode Operation
17.6.3 Additional Features
17.6.3.1  Always-On Mode
The always-on mode is enabled by writing a one to the Always-On bit in the Control register (CTRL.ALWAYSON). When 
the always-on mode is enabled, the WDT runs continuously, regardless of the state of CTRL.ENABLE. Once written, the 
Always-On bit can only be cleared by a power-on reset. The Configuration (CONFIG) and Early Warning Control 
(EWCTRL) registers are read-only registers while the CTRL.ALWAYSON bit is set. Thus, the time period configuration 
bits (CONFIG.PER, CONFIG.WINDOW, EWCTRL.EWOFFSET) of the WDT cannot be changed.
Enabling or disabling window-mode operation by writing the Window Enable bit (CTRL.WEN) is allowed while in the 
always-on mode, but note that CONFIG.PER cannot be changed.
The Interrupt Clear and Interrupt Set registers are accessible in the always-on mode. The Early Warning interrupt can still 
be enabled or disabled while in the always-on mode, but note that EWCTRL.EWOFFSET cannot be changed.
 shows the operation of the WDT when CTRL.ALWAYSON is set.
Table 17-2. WDT Operating Modes With Always-On
17.6.4 Interrupts
The WDT has the following interrupt sources: 
z
Early Warning (EW): this is an asynchronous interrupt and can be used to wake-up the device from any sleep 
mode.
Each interrupt source has an interrupt flag associated with it. The interrupt flag in the Interrupt Flag Status and Clear 
register (INTFLAG) is set when the interrupt condition occurs. Each interrupt can be individually enabled by writing a one 
to the corresponding bit in the Interrupt Enable Set register (INTENSET), and disabled by writing a one to the 
t [ms]
WDT Count
5
10
15
20
25
30
35
WINDOW[3:0]=0
PER[3:0]=0
Timely WDT Clear
C
los
ed
TO
WDTW
O
pen
TO
WDT
Early WDT Clear
WDT Timeout
Early Warning Interrupt
CTRL.WEN
INTENSET.EW
Mode
0
0
Always-on and normal mode
0
1
Always-on and normal mode with Early Warning interrupt
1
0
Always-on and window mode
1
1
Always-on and window mode with Early Warning interrupt