AT91M40400-25C ATMEL Corporation, AT91M40400-25C Datasheet - Page 87

no-image

AT91M40400-25C

Manufacturer Part Number
AT91M40400-25C
Description
16/32-bit Microcontroller, 2.7V to 3.6V Operating Range
Manufacturer
ATMEL Corporation
Datasheet
Capture Operating Mode
This mode is entered by clearing the WAVE parameter in
TC_CMR (Channel Mode Register). 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 inputs.
Figure 44 shows the configuration of the TC Channel when
programmed in Capture Mode.
Capture Registers A and B (RA and RB)
Registers A and B 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 parameter LDRA in TC_CMR defines the TIOA edge
for the loading of register A, and the parameter LDRB
defines the TIOA 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 trig-
ger or the last loading of RB.
Loading RA or RB before the read of the last value loaded
sets the Overrun Error Flag (LOVRS) in TC_SR (Status
Register). In this case, the old value is overwritten.
Trigger Conditions
In addition to the SYNC signal, the software trigger and the
RC compare trigger, an external trigger can be defined.
Bit ABETRG in TC_CMR selects input signal TIOA or TIOB
as an external trigger. Parameter ETRGEDG defines the
edge (rising, falling or both) detected to generate an exter-
nal trigger. If ETRGEDG = 0 (none), the external trigger is
disabled.
Status Register
The following bits in the status register are significant in
Capture Operating Mode.
CPCS: RC Compare Status
COVFS: Counter Overflow Status
LOVRS: Load Overrun Status
LDRAS: Load RA Status
LDRBS: Load RB Status
ETRGS: External Trigger Status
There has been an RC Compare match at least once
since the last read of the status
The counter has attempted to count past $FFFF since
the last read of the status
RA or RB has been loaded at least twice without any
read of the corresponding register, since the last read
of the status
RA has been loaded at least once without any read,
since the last read of the status
RB has been loaded at least once without any read,
since the last read of the status
An external trigger on TIOA or TIOB has been detected
since the last read of the status
AT91M40400
87

Related parts for AT91M40400-25C