Data Sheet
671
Atmel | SMART SAM D21 [DATASHEET]
Atmel-42181G–SAM-D21_Datasheet–09/2015
Figure 30-21.RAMP2 Alternate Operation
30.6.3.5 Recoverable Faults
Recoverable faults can restart or halt the timer/counter. Two faults, called Fault A and Fault B, can trigger recoverable
fault actions on compare channels CC0 and CC1 from the timer/counter. The compare channels outputs can be clamped
to inactive state as long as the fault condition is present, or from the first valid fault condition detection and until the end
of the timer/counter cycle.
Fault Inputs
The first two channel input events (MC0 and TCCxMC1) can be used as Fault A and Fault B inputs respectively. Event
system channel connected to these fault inputs must be configured as asynchronous. In two ramp (RAMP2, RAMP2A)
operation.
Fault Filtering
Three filtering types are available. The recoverable faults can use all three filters independently or various filter
combinations.
z Input filtering: By default, the event detection is asynchronous. When the event occurs, the fault system will
immediately and asynchronously performs the selected fault action on the compare channel output,
including system power modes where the clock is not available. To avoid false fault detection on external
events (e.g. a glitch on I/O port) a digital filter can be enabled and set in FILTERVAL bits in the
corresponding recoverable Fault Control n register (FCTRLn.FILTERVAL). In this case, the event will be
delayed by the FILTERVAL value clock cycles. If the event width is less than the FILTERVAL, then the event
will be discarded.
z Fault blanking: Provides a way to disable fault input just after a selected waveform output edge to prevent
false fault triggering because of signal bouncing on fault signal, as shown in Figure 30-22. Blanking can be
enabled by writing the edge triggering configuration to the Faultn Blanking Mode bits in the Recoverable
FaultnConfiguration register (FCTRLn.BLANK), and the number of clock cycles to blank is written to the
Faultn Blanking Time bits in the Recoverable Faultn Configuration register (FCTRLn.BLANKVAL). The
maximum blanking time is:
256 / (96 ×10
6
) = 2.66us for 96MHz peripheral clock frequency (GCLK_TCCx)
256 / (1x10
6
) = 256us for 1MHz peripheral clock frequency (GCLK_TCCx)
COUNT
"match"
ZERO
"clear" update
A B A BRamp
WO[0]
WO[1]
TOP(A)
TOP(B)
CC0(A)
CC0(B)
TOP(B)
CC0(A)
CC0(B)
Retrigger
on
FaultA
CIPEREN = 1
POL0 = 1
CICCEN0 = 1
FaultA input
Keep on FaultB
FaultB input