Atmel ARM-Based Evaluation Kit for SAM4S16C, 32-Bit ARM® Cortex® Microcontroller ATSAM4S-WPIR-RD ATSAM4S-WPIR-RD Data Sheet

Product codes
ATSAM4S-WPIR-RD
Page of 1231
835
SAM4S Series [DATASHEET]
Atmel-11100G-ATARM-SAM4S-Datasheet_27-May-14
The following triggers are common to both modes:
Software Trigger: Each channel has a software trigger, available by setting SWTRG in TC_CCR.
SYNC: Each channel has a synchronization signal SYNC. When asserted, this signal has the same effect as a 
software trigger. The SYNC signals of all channels are asserted simultaneously by writing TC_BCR (Block 
Control) with SYNC set.
Compare RC Trigger: RC is implemented in each channel and can provide a trigger when the counter value 
matches the RC value if CPCTRG is set in the TC_CMR.
The channel can also be configured to have an external trigger. In Capture Mode, the external trigger signal can be 
selected between TIOA and TIOB. In Waveform Mode, an external event can be programmed on one of the 
following signals: TIOB, XC0, XC1 or XC2. This external event can then be programmed to perform a trigger by 
setting bit ENETRG in the TC_CMR.
If an external trigger is used, the duration of the pulses must be longer than the master clock period in order to be 
detected.
37.6.7 Capture Operating Mode
This mode is entered by clearing the WAVE bit in the TC_CMR. 
Capture Mode allows the TC channel to perform measurements such as pulse timing, frequency, period, duty 
cycle and phase on TIOA and TIOB signals which are considered as inputs. 
shows the configuration of the TC channel when programmed in Capture Mode.
37.6.8 Capture Registers A and B 
Registers A and B (RA and RB) are used as capture registers. This means that they can be loaded with the 
counter value when a programmable event occurs on the signal TIOA. 
The LDRA field in the TC_CMR defines the TIOA selected edge for the loading of register A, and the LDRB field 
defines the TIOA selected edge for the loading of Register B.
RA is loaded only if it has not been loaded since the last trigger or if RB has been loaded since the last loading of 
RA.
RB is loaded only if RA has been loaded since the last trigger or the last loading of RB.
Loading RA or RB before the read of the last value loaded sets the Overrun Error Flag (LOVRS bit) in the TC_SR. 
In this case, the old value is overwritten.
37.6.9 Trigger Conditions
In addition to the SYNC signal, the software trigger and the RC compare trigger, an external trigger can be defined.
The ABETRG bit in the TC_CMR selects TIOA or TIOB input signal as an external trigger . The External Trigger 
Edge Selection parameter (ETRGEDG field in TC_CMR) defines the edge (rising, falling, or both) detected to 
generate an external trigger. If ETRGEDG = 0 (none), the external trigger is disabled.