Atmel Xplained Pro Evaluation Kit for the ATSAMD21J18A Microcontroller ATSAMD21-XPRO ATSAMD21-XPRO Fiche De Données

Codes de produits
ATSAMD21-XPRO
Page de 1018
654
Atmel | SMART SAM D21 [DATASHEET]
Atmel-42181C–SAM-D21_Datasheet–07/2014
Figure 30-15.Changing the Period Using Buffering
30.6.2.7  Capture Operations
To enable and use capture operations, the Match or Capture Channel x Event Input Enable (MCEIx) bit must be enabled 
in the Event Control register (EVCTRL.MCEIx). The capture channels to be used must also be enabled in the Capture 
Channel x Enable bit in the Control A register (CTRLA.CPTENx) before capture can be performed.
Event Capture Action
The capture channels can be used to capture the COUNT value upon reception of any event. Since there is one event 
line per capture channel, multiple capture operations can be enabled at the same time.
 shows four capture events for one capture channel.
Figure 30-16.Input Capture Timing
For input capture, the buffer register and the corresponding CCx act like a FIFO. When CCx is empty or read, any 
content in CCBx is transfered to CCx. The buffer valid flag is passed to set the CCx interrupt flag (IF) and generate the 
optional interrupt, event or DMA request.
COUNT
New value written to 
PERB that is higher than 
current COUNT
New value written to 
PERB that is lower 
than current COUNT
"reload" update
"write"
PER is updated with 
PERB value.
MAX
ZERO
events
COUNT
MAX
ZERO
Capture 0
Capture 1
Capture 2
Capture 3