333
SAM4CP [DATASHEET]
43051E–ATPL–08/14
20.4.9.1 Force Wake-up
The FWUP pin is enabled as a wake-up source by writing the FWUPEN bit to 1 in SUPC_WUMR. The FWUPDBC field in
the same register then selects the debouncing period, which can be selected between 3, 32, 512, 4,096 or 32,768 slow
clock cycles, corresponding to about 100
μ
s, about 1 ms, about 16 ms, about 128 ms and about 1 second, respectively
(for a typical slow clock frequency of 32 kHz). Programming FWUPDBC to 0x0 selects an immediate wake-up, i.e., the
FWUP must be low during at least one slow clock period to wake up the system.
If the FWUP pin is asserted for a time longer than the debouncing period, a system wake-up is started and the FWUP bit
in SUPC_SR is set and remains high until the register is read.
20.4.9.2 Wake-up Inputs
The wake-up inputs WKUPx can be programmed to perform a system wake-up. Each input can be enabled by writing to
1 the corresponding bit, WKUPENx, in the Wake-up Inputs register (SUPC_WUIR). The wake-up level can be selected
with the corresponding polarity bit, WKUPPLx, also located in SUPC_WUIR.
All the resulting signals are wired-ORed to trigger a debounce counter, which can be programmed with the WKUPDBC
field in SUPC_WUMR. The WKUPDBC field can select a debouncing period of 3, 32, 512, 4,096 or 32,768 slow clock
cycles. This corresponds respectively to about 100
μ
s, about 1 ms, about 16 ms, about 128 ms and about 1 second (for
a typical slow clock frequency of 32 kHz). Programming WKUPDBC to 0x0 selects an immediate wake-up, i.e., an
enabled WKUP pin must be active according to its polarity during a minimum of one slow clock period to wake up the
core power supply.
If an enabled WKUPx pin is asserted for a time longer than the debouncing period, a system wake-up is started and the
signals, WKUPx as shown in
Figure 20-4
, are latched in SUPC_SR. This allows the user to identify the source of the
wake-up, however, if a new wake-up condition occurs, the primary information is lost. No new wake-up can be detected
since the primary wake-up condition has disappeared.
20.4.9.3 Low-power Debouncer Inputs (Tamper Detection Pins)
Low-power debouncer inputs are dedicated to tamper detection. If the tamper sensor is biased through a resistor and
constantly driven by the power supply, this leads to power consumption as long as the tamper detection switch is in its
active state. To prevent power consumption when the switch is in active state, the tamper sensor circuitry can be
intermittently powered, thus, a specific waveform must be generated.
It is possible to generate a waveform (on pin RTCOUT0) in all modes (including backup mode). Refer to the RTC section
for waveform generation.
Two separate debouncers are embedded, one for WKUP0/TMP0 input and a shared one for WKUP10/TMP1,
WKUP14/TMP2, WKUP15/TMP3 inputs. See
Figure 20-4
.
The WKUP0/TMP0 and/or WKUP10/TMP1, WKUP14/TMP2, WKUP15/TMP3 inputs can be programmed to perform a
system wake-up with a debouncing done by RTCOUT0. This can be enabled by setting LPDBCEN0/1/2/3 bit in the
“Supply Controller Wake-up Mode Register”
(SUPC_WUMR).
These inputs can be also used when VDDCORE is powered to get tamper detection function with a low-power debounce
function and to raise an interrupt.
This mode of operation requires the RTC output (RTCOUT0) to be configured to generate a duty cycle programmable
pulse (i.e. OUT0 = 0x7 in RTC_MR) in order to create the sampling points of both debouncers. The sampling point is the
falling edge of the RTCOUT0 waveform.
Figure 20-5
shows an example of an application where two tamper switches are used. RTCOUT0 powers the external
pull-up used by the tampers.