40.7.10 Event Control

Table 40-19. Register Bit Attribute Legend
SymbolDescriptionSymbolDescriptionSymbolDescription
RReadable bitHCCleared by Hardware(Grey cell)Unimplemented
WWritable bitHSSet by HardwareXBit is unknown at Reset
KWrite to clearSSoftware settable bit
Name: EVCTRL
Offset: 0x20
Reset: 0x00000000
Property: RW

Bit 3130292827262524 
 MCEO[7:0] 
Access  
Reset 00000000 
Bit 2322212019181716 
 MCEI[7:0] 
Access  
Reset 00000000 
Bit 15141312111098 
 TCEI[1:0]TCINV[1:0] CNTEOTRGEOOVFEO 
Access  
Reset 0000000 
Bit 76543210 
 CNTSEL[1:0]EVACT1[2:0]EVACT0[2:0] 
Access  
Reset 00000000 

Bits 31:24 – MCEO[7:0] Match or Capture Channel x Event Output Enable

Bits 23:16 – MCEI[7:0] Match or Capture Channel x Event Input Enable

Bits 15:14 – TCEI[1:0] Timer/counter Event x Input Enable

Bits 13:12 – TCINV[1:0] Inverted Event x Input Enable

Bit 10 – CNTEO Timer/counter Output Event Enable

This bit is used to enable the counter cycle event. When enabled, an event will be generated on begin or end of counter cycle depending of on EVCTRL.CNTSEL(EVCTRL<7:6>) settings.

ValueDescription
0Counter cycle output event is disabled and will not be generated.
1Counter cycle output event is enabled and will be generated depending on EVCTRL.CNTSEL(EVCTRL<7:6>) value.

Bit 9 – TRGEO Retrigger Output Event Enable

This bit is used to enable the counter retrigger event. When enabled, an event will be generated when the counter retriggers operation.

ValueDescription
0Counter retrigger event is disabled and will not be generated.
1Counter retrigger event is enabled and will be generated for every counter retrigger.

Bit 8 – OVFEO Overflow/Underflow Output Event Enable

This bit is used to enable the overflow/underflow event. When enabled an event will be generated when the counter reaches the TOP or the ZERO value.

ValueDescription
0Overflow/underflow counter event is disabled and will not be generated.
1Overflow/underflow counter event is enabled and will be generated for every counter overflow/underflow.

Bits 7:6 – CNTSEL[1:0] Timer/counter Output Event Mode

These bits define on which part of the counter cycle the counter event output is generated.

ValueNameDescription
0STARTAn interrupt/event is generated when a new counter cycle starts
1ENDAn interrupt/event is generated when a counter cycle ends
2BETWEENAn interrupt/event is generated when a counter cycle ends, except for the first and last cycles
3BOUNDARYAn interrupt/event is generated when a new counter cycle starts or a counter cycle ends

Bits 5:3 – EVACT1[2:0] Timer/counter Input Event1 Action

These bits define the action the TCC will perform on TCE1 event input.

ValueNameDescription
0OFFEvent action disabled
1RETRIGGERRe-trigger counter on event
2DIRDirection control
3STOPStop counter on event
4DECDecrement counter on event
5PPWPeriod capture value in CC0 register, pulse width capture value in CC1 register
6PWPPeriod capture value in CC1 register, pulse width capture value in CC0 register
7FAULTNon-recoverable fault

Bits 2:0 – EVACT0[2:0] Timer/counter Input Event0 Action

These bits define the action the TCC will perform on TCE0 event input 0.

ValueNameDescription
0OFFEvent action disabled
1RETRIGGERStart, restart or re-trigger counter on event
2COUNTEVCount on event
3STARTStart counter on event
4INCIncrement counter on event
5COUNTCount on active state of asynchronous event
6STAMPStamp capture
7FAULTNon-recoverable fault