Data Sheet

675
Atmel | SMART SAM D21 [DATASHEET]
Atmel-42181G–SAM-D21_Datasheet–09/2015
In CAPT operation, capture is performed on each capture event. MCx interrupt flag is set on each new capture. In
CAPTMIN and CAPTMAX operation, capture is performed only when a new lower (for CAPTMIN) and new higher (for
CAPTMAX) value is detected. MCx interrupt flag is set on each new capture.
In LOCMIN and LOCMAX operation, capture is performed on each capture event. MCx interrupt flag is set only when the
captured value is lower (for LOCMIN) and higher (for LOCMAX) values respectively than the previous captured value.
DERIV0 is equivalent to a OR function of (LOCMIN, LOCMAX).
In CAPTMIN and CAPTMAX operation CCx keeps the extremum values respectively, as show in Figure 30-28, while in
LOCMIN, LOCMAX or DERIV0 operations, CCx follow the counter value at fault time, as show in Figure 30-29.
Figure 30-28.Capture Action “CAPTMAX”
Figure 30-29.Capture Action “DERIV0”
z Hardware halt action can be configured using Faultn Halt mode bits in Recoverable Faultn configuration
register (FCTRLn.HALT = HW). When hardware halt action is enabled (FCTRLn.HALT = HW), the
timer/counter is halted and the cycle is extended as long as the corresponding fault is present. Figure 30-30
shows an example where restart and hardware halt actions are enabled for Fault A. The compare channel 0
output is clamped to inactive level as long as the timer/counter is halted. The timer/counter resumes the
counting operation as soon as the fault condition is no longer present. If the restart action is enabled, the
timer/counter is halted as long as the fault condition is present and restarted when the fault condition is no
longer present, as shown in Figure 30-31. Note that in RAMP2 and RAMP2A operations, when a new
timer/counter cycle starts, the cycle index will automatically change.
COUNT
"match"
ZERO
"clear" update
FaultA Input
TOP
CC0
CC0 Event/
Interrupt
COUNT
"match"
ZERO
"update"
FaultA Input
TOP
CC0
CC0 Event/
Interrupt