211
8331B–AVR–03/12
Atmel AVR XMEGA AU
16.6.2
Fault Restore Modes
How the AWeX and timer/counter return from the fault state to normal operation after a fault,
when the fault condition is no longer active, can be selected from one of two different modes:
• In latched mode, the waveform output will remain in the fault state until the fault condition is
no longer active and the fault detect flag has been cleared by software. When both of these
conditions are met, the waveform output will return to normal operation at the next UPDATE
condition.
• In cycle-by-cycle mode the waveform output will remain in the fault state until the fault
condition is no longer active. When this condition is met, the waveform output will return to
normal operation at the next UPDATE condition.
When returning from a fault state the DIR[7:0] bits corresponding to the enabled DTI channels
are restored. OUTOVEN is unaffected by the fault except that writing to the register from soft-
ware is blocked.
The UPDATE condition used to restore normal operation is the same as the one in the
timer/counter.
16.6.3
Change Protection
To avoid unintentional changes in the fault protection setup, all the control registers in the AWeX
extension can be protected by writing the corresponding lock bit in the advanced waveform
extension lock register. For more details, refer to
”I/O Memory Protection” on page 25
”AWEXLOCK – Advanced Waveform Extension Lock register” on page 49
.
When the lock bit is set, control register A, the output override enable register, and the fault
detection event mask register cannot be changed.
To avoid unintentional changes in the fault event setup, it is possible to lock the event system
channel configuration by writing the corresponding event system lock register. For more details,
refer to
”I/O Memory Protection” on page 25
and
”EVSYSLOCK – Event System Lock register”
16.6.4
On-Chip Debug
When fault detection is enabled, an on-chip debug (OCD) system receives a break request from
the debugger, which will by default function as a fault source. When an OCD break request is
received, the AWeX and corresponding timer/counter will enter a fault state, and the specified
fault action will be performed.
After the OCD exits from the break condition, normal operation will be started again. In cycle-by-
cycle mode, the waveform output will start on the first UPDATE condition after exit from break,
while in latched mode, the fault condition flag must be cleared in software before the output will
be restored. This feature guarantees that the output waveform enters a safe state during a
break.
It is possible to disable this feature.