•
Non-recoverable fault
The TCC can take the following actions on counter Event 0 (TCCx EV0):
•
Counter re-trigger
•
Count on event (increment or decrement, depending on counter direction)
•
Counter start - start counting on the event rising edge. Further events will not restart the counter;
the counter will keep on counting using prescaled GCLK_TCCx, until it reaches TOP or ZERO,
depending on the direction.
•
Counter increment on event. This will increment the counter, irrespective of the counter direction.
•
Count during active state of an asynchronous event (increment or decrement, depending on
counter direction). In this case, the counter will be incremented or decremented on each cycle of
the prescaled clock, as long as the event is active.
•
Non-recoverable fault
The counter Event Actions are available in the Event Control registers (EVCTRL.EVACT0 and
EVCTRL.EVACT1). For further details, refer to
.
Writing a '1' ('0') to an Event Input bit in the Event Control register (EVCTRL.MCEIx or EVCTRL.TCEIx)
enables (disables) the corresponding action on input event.
Note:
When several events are connected to the TCC, the enabled action will apply for each of the
incoming events. Refer to
EVSYS – Event System
for details on how to configure the event system.
Related Links
36.6.5. Sleep Mode Operation
The TCC can be configured to operate in any sleep mode. To be able to run in standby the RUNSTDBY
bit in the Control A register (CTRLA.RUNSTDBY) must be '1'. The MODULE can in any sleep mode wake
up the device using interrupts or perform actions through the Event System.
36.6.6. Synchronization
Due to asynchronicity between the main clock domain and the peripheral clock domains, some registers
need to be synchronized when written or read.
The following bits are synchronized when written:
•
Software Reset and Enable bits in Control A register (CTRLA.SWRST and CTRLA.ENABLE)
The following registers are synchronized when written:
•
Control B Clear and Control B Set registers (CTRLBCLR and CTRLBSET)
•
Status register (STATUS)
•
Pattern and Pattern Buffer registers (PATT and PATTBUF)
•
Waveform register (WAVE)
•
Count Value register (COUNT)
•
Period Value and Period Buffer Value registers (PER and PERBUF)
•
Compare/Capture Channel x and Channel x Compare/Capture Buffer Value registers (CCx and
CCBUFx)
The following registers are synchronized when read:
•
Control B Clear and Control B Set registers (CTRLBCLR and CTRLBSET)
•
Count Value register (COUNT): synchronization is done on demand through READSYNC command
(CTRLBSET.CMD)
Atmel SAM L22G / L22J / L22N [DATASHEET]
Atmel-42402E-SAM L22G / L22J / L22N_Datasheet_Complete-07/2016
829