The 28 registers of TCC0 (Timer/Counter for Control Applications), from 0x42001800, with their reset value and every field. The PIC32CM1216PL10048 has 702 registers in 32 peripherals, one page each.
TCC0 Timer/Counter for Control Applications
CTRLAControl A
Address
0x42001800
Reset
0x00000000
Access
read/write
Size
32-bit
12 fields
Field
Bits
What it does
CPTEN3
27
Capture Channel 3 Enable
CPTEN2
26
Capture Channel 2 Enable
CPTEN1
25
Capture Channel 1 Enable
CPTEN0
24
Capture Channel 0 Enable
DMAOS
23
DMA One-Shot Trigger Mode
FCYCLE
16
Full Cycle Enable
ALOCK
14
Auto Lock
PRESCSYNC
13:12
Prescaler and Counter Synchronization
0 Reload or reset Counter on the next GCLK
1 Reload or reset Counter on the next prescaler clock
2 Reload or reset Counter on the next GCLK and reset prescaler counter
RUNSTDBY
11
Run in Standby
PRESCALER
10:8
Prescaler
0 Prescaler: GCLK_TCC
1 Prescaler: GCLK_TCC/2
2 Prescaler: GCLK_TCC/4
3 Prescaler: GCLK_TCC/8
4 Prescaler: GCLK_TCC/16
5 Prescaler: GCLK_TCC/64
6 Prescaler: GCLK_TCC/256
7 Prescaler: GCLK_TCC/1024
ENABLE
1
Enable
SWRST
0
Software Reset
CTRLBCLRControl B Clear
Address
0x42001804
Reset
0x00
Access
read/write
7CMD2
6CMD1
5CMD0
4IDXCMD1
3IDXCMD0
2ONESHOT
1LUPD
0DIR
5 fields
Field
Bits
What it does
CMD
7:5
TCC Command
IDXCMD
4:3
Ramp Index Command
ONESHOT
2
One-Shot
LUPD
1
Lock Update
DIR
0
Counter Direction
CTRLBSETControl B Set
Address
0x42001805
Reset
0x00
Access
read/write
7CMD2
6CMD1
5CMD0
4IDXCMD1
3IDXCMD0
2ONESHOT
1LUPD
0DIR
5 fields
Field
Bits
What it does
CMD
7:5
TCC Command
0 No action
1 Force start, restart or retrigger
2 Force stop
3 Force update of double buffered registers
4 Force a read synchronization of COUNT
5 One-shot DMA trigger
IDXCMD
4:3
Ramp Index Command
0 Command disabled: IDX toggles between cycles A and B
1 Set IDX: Cycle B will be forced in the next cycle
2 Clear IDX: Cycle A will be forced in next cycle
3 Hold IDX: The next cycle will be the same as the current cycle
ONESHOT
2
One-Shot
LUPD
1
Lock Update
DIR
0
Counter Direction
SYNCBUSYSynchronization Busy
Address
0x42001808
Reset
0x00000000
Access
read only
Size
32-bit
12 fields
Field
Bits
What it does
CC3
11
Compare/Capture Channel 3 Synchronization Busy
CC2
10
Compare/Capture Channel 2 Synchronization Busy
CC1
9
Compare/Capture Channel 1 Synchronization Busy
CC0
8
Compare/Capture Channel 0 Synchronization Busy
PER
7
PER Synchronization Busy
WAVE
6
WAVE Synchronization Busy
PATT
5
PATT Synchronization Busy
COUNT
4
COUNT Synchronization Busy
STATUS
3
STATUS Synchronization Busy
CTRLB
2
CTRLB Synchronization Busy
ENABLE
1
ENABLE Synchronization Busy
SWRST
0
SWRST Synchronization Busy
FCTRLARecoverable Fault Control #
Address
0x4200180C
Reset
0x00000000
Access
read/write
Size
32-bit
11 fields
Field
Bits
What it does
FILTERVAL
27:24
Recoverable Fault Filter Value
BLANKVAL
23:16
Recoverable Fault Blanking Value
BLANKPRESC
15
Recoverable Fault Blanking Value Prescaler
CAPTURE
14:12
Recoverable Fault Capture Action
0 Capture on valid recoverable Fault is disabled
1 On the rising edge of a valid recoverable fault, the counter value is captured on the channel selected by CHSEL[1:0]The INTFLAG.FAULTn flag is set on each new captured value.
2 On the rising edge of a valid recoverable fault, the counter value is captured on the channel selected by CHSEL[1:0] if the COUNT value is lower than the last stored capture value (CC).The INTFLAG.FAULTn flag is set on each local minimum detection.
3 On the rising edge of a valid recoverable fault, the counter value is captured on the channel selected by CHSEL[1:0] if the COUNT value is higher than the last stored capture value (CC).The INTFLAG.FAULTn flag is set on each local maximun detection.
4 On the rising edge of a valid recoverable fault, the counter value is captured on the channel selected by CHSEL[1:0].The INTFLAG.FAULTn flag is set on each local minimum value detection.
5 On the rising edge of a valid recoverable fault, the counter value is captured on the channel selected by CHSEL[1:0].The INTFLAG.FAULTn flag is set on each local maximun detection.
6 On the rising edge of a valid recoverable fault, the counter value is captured on the channel selected by CHSEL[1:0].The INTFLAG.FAULTn flag is set on each local maximun or minimum detection.
7 Capture with the ramp index as the MSB value
CHSEL
11:10
Recoverable Fault Capture Channel
0 The captured value stored in CC0
1 The captured value stored in CC1
2 The captured value stored in CC2
3 The captured value stored in CC3
HALT
9:8
Recoverable Fault Halt Operation
0 Halt action disabled
1 Hardware halt action
2 Software halt action
3 Non-recoverable fault
RESTART
7
Recoverable Fault Restart
BLANK
6:5
Recoverable Fault Blanking Operation
0 Blanking is applied from the start of the ramp period
1 Blanking is applied from the rising edge of the waveform output
2 Blanking is applied from the falling edge of the waveform output
3 Blanking is applied from each toggle of the waveform output
QUAL
4
Recoverable Fault Qualification
KEEP
3
Recoverable Fault Keep
SRC
1:0
Recoverable Fault Source
0 Fault input disabled
1 MCEn (n = 0,1) event input
2 Inverted MCEn (n = 0,1) event input
3 Alternate fault (A or B) state at the end of the previous period.
FCTRLBRecoverable Fault Control #
Address
0x42001810
Reset
0x00000000
Access
read/write
Size
32-bit
11 fields
Field
Bits
What it does
FILTERVAL
27:24
Recoverable Fault Filter Value
BLANKVAL
23:16
Recoverable Fault Blanking Value
BLANKPRESC
15
Recoverable Fault Blanking Value Prescaler
CAPTURE
14:12
Recoverable Fault Capture Action
0 Capture on valid recoverable Fault is disabled
1 On the rising edge of a valid recoverable fault, the counter value is captured on the channel selected by CHSEL[1:0]The INTFLAG.FAULTn flag is set on each new captured value.
2 On the rising edge of a valid recoverable fault, the counter value is captured on the channel selected by CHSEL[1:0] if the COUNT value is lower than the last stored capture value (CC).The INTFLAG.FAULTn flag is set on each local minimum detection.
3 On the rising edge of a valid recoverable fault, the counter value is captured on the channel selected by CHSEL[1:0] if the COUNT value is higher than the last stored capture value (CC).The INTFLAG.FAULTn flag is set on each local maximun detection.
4 On the rising edge of a valid recoverable fault, the counter value is captured on the channel selected by CHSEL[1:0].The INTFLAG.FAULTn flag is set on each local minimum value detection.
5 On the rising edge of a valid recoverable fault, the counter value is captured on the channel selected by CHSEL[1:0].The INTFLAG.FAULTn flag is set on each local maximun detection.
6 On the rising edge of a valid recoverable fault, the counter value is captured on the channel selected by CHSEL[1:0].The INTFLAG.FAULTn flag is set on each local maximun or minimum detection.
7 Capture with the ramp index as the MSB value
CHSEL
11:10
Recoverable Fault Capture Channel
0 The captured value stored in CC0
1 The captured value stored in CC1
2 The captured value stored in CC2
3 The captured value stored in CC3
HALT
9:8
Recoverable Fault Halt Operation
0 Halt action disabled
1 Hardware halt action
2 Software halt action
3 Non-recoverable fault
RESTART
7
Recoverable Fault Restart
BLANK
6:5
Recoverable Fault Blanking Operation
0 Blanking is applied from the start of the ramp period
1 Blanking is applied from the rising edge of the waveform output
2 Blanking is applied from the falling edge of the waveform output
3 Blanking is applied from each toggle of the waveform output
QUAL
4
Recoverable Fault Qualification
KEEP
3
Recoverable Fault Keep
SRC
1:0
Recoverable Fault Source
0 Fault input disabled
1 MCEn (n = 0,1) event input
2 Inverted MCEn (n = 0,1) event input
3 Alternate fault (A or B) state at the end of the previous period.
WEXCTRLWaveform Extension Control
Address
0x42001814
Reset
0x00000000
Access
read/write
Size
32-bit
1 field
Field
Bits
What it does
OTMX
1:0
Output Matrix
DRVCTRLDriver Control
Address
0x42001818
Reset
0x00000000
Access
read/write
Size
32-bit
14 fields
Field
Bits
What it does
FILTERVAL0
27:24
Non-Recoverable Fault Input 0 Filter Value
INVEN3
19
Waveform Output 3 Inversion
INVEN2
18
Waveform Output 2 Inversion
INVEN1
17
Waveform Output 1 Inversion
INVEN0
16
Waveform Output 0 Inversion
NRV3
11
Non-Recoverable State 3 Output Value
NRV2
10
Non-Recoverable State 2 Output Value
NRV1
9
Non-Recoverable State 1 Output Value
NRV0
8
Non-Recoverable State 0 Output Value
NRE3
3
Non-Recoverable State 3 Output Enable
NRE2
2
Non-Recoverable State 2 Output Enable
NRE1
1
Non-Recoverable State 1 Output Enable
NRE0
0
Non-Recoverable State 0 Output Enable
FILTERVAL1
31:28
Non-Recoverable Fault Input 1 Filter Value
DBGCTRLDebug control
Address
0x4200181E
Reset
0x00
Access
read/write
7–
6–
5–
4–
3–
2FDDBD
1–
0DBGRUN
2 fields
Field
Bits
What it does
FDDBD
2
Fault Detection on Debug Break Detection
DBGRUN
0
Debug Running State
EVCTRLEvent Control
Address
0x42001820
Reset
0x00000000
Access
read/write
Size
32-bit
18 fields
Field
Bits
What it does
MCEO3
27
Match or Capture Channel 3 Event Output Enable
MCEO2
26
Match or Capture Channel 2 Event Output Enable
MCEO1
25
Match or Capture Channel 1 Event Output Enable
MCEO0
24
Match or Capture Channel 0 Event Output Enable
MCEI3
19
Match or Capture Channel 3 Event Input Enable
MCEI2
18
Match or Capture Channel 2 Event Input Enable
MCEI1
17
Match or Capture Channel 1 Event Input Enable
MCEI0
16
Match or Capture Channel 0 Event Input Enable
TCEI1
15
Timer/Counter Event Input 1 Enable
TCEI0
14
Timer/Counter Event Input 0 Enable
TCINV1
13
Timer/Counter Event 1 Invert Enable
TCINV0
12
Timer/Counter Event 0 Invert Enable
CNTEO
10
Timer/Counter Event Output Enable
TRGEO
9
Retrigger Event Output Enable
OVFEO
8
Overflow/Underflow Event Output Enable
CNTSEL
7:6
Timer/Counter Interrupt and Event Output Selection
0 An interrupt/event is generated at the beginning of each counter cycle
1 An interrupt/event is generated at the end of each counter cycle
3 An interrupt/event is generated at the beginning of the first counter cycle, and at the end of last counter cycle
EVACT1
5:3
Timer/Counter Event Input 1 Action
0 Event action disabled
1 Restart or retrigger TCC on event
2 Direction control
3 Stop TCC on event
4 Decrement TCC on event
6 Period captured into CC1 Pulse Width on CC0
7 Non-recoverable fault
EVACT0
2:0
Timer/Counter Event Input 0 Action
0 Event action disabled
1 Restart or retrigger TCC on event
2 Count on event
3 Start TCC on event
4 Increment TCC on event
5 Count on the active state of an asynchronous event
6 Capture Time-stamp (overflow)
7 Non-recoverable fault
INTENCLRInterrupt Enable Clear
Address
0x42001824
Reset
0x00000000
Access
read/write
Size
32-bit
14 fields
Field
Bits
What it does
MC3
19
Match or Capture Channel 3 Interrupt Enable
MC2
18
Match or Capture Channel 2 Interrupt Enable
MC1
17
Match or Capture Channel 1 Interrupt Enable
MC0
16
Match or Capture Channel 0 Interrupt Enable
FAULT1
15
Non-Recoverable Fault 1 Interrupt Enable
FAULT0
14
Non-Recoverable Fault 0 Interrupt Enable
FAULTB
13
Recoverable Fault B Interrupt Enable
FAULTA
12
Recoverable Fault A Interrupt Enable
DFS
11
Non-Recoverable Debug Fault Interrupt Enable
UFS
10
Non-Recoverable Update Fault Interrupt Enable
ERR
3
Error Interrupt Enable
CNT
2
Counter Interrupt Enable
TRG
1
Retrigger Interrupt Enable
OVF
0
Overflow Interrupt Enable
INTENSETInterrupt Enable Set
Address
0x42001828
Reset
0x00000000
Access
read/write
Size
32-bit
14 fields
Field
Bits
What it does
MC3
19
Match or Capture Channel 3 Interrupt Enable
MC2
18
Match or Capture Channel 2 Interrupt Enable
MC1
17
Match or Capture Channel 1 Interrupt Enable
MC0
16
Match or Capture Channel 0 Interrupt Enable
FAULT1
15
Non-Recoverable Fault 1 Interrupt Enable
FAULT0
14
Non-Recoverable Fault 0 Interrupt Enable
FAULTB
13
Recoverable Fault B Interrupt Enable
FAULTA
12
Recoverable Fault A Interrupt Enable
DFS
11
Non-Recoverable Debug Fault Interrupt Enable
UFS
10
Non-Recoverable Update Fault Interrupt Enable
ERR
3
Error Interrupt Enable
CNT
2
Counter Interrupt Enable
TRG
1
Retrigger Interrupt Enable
OVF
0
Overflow Interrupt Enable
INTFLAGInterrupt Flag Status and Clear
Address
0x4200182C
Reset
0x00000000
Access
read/write
Size
32-bit
14 fields
Field
Bits
What it does
MC3
19
Match or Capture Channel 3 Interrupt Flag
MC2
18
Match or Capture Channel 2 Interrupt Flag
MC1
17
Match or Capture Channel 1 Interrupt Flag
MC0
16
Match or Capture Channel 0 Interrupt Flag
FAULT1
15
Non-Recoverable Fault 1 Interrupt Flag
FAULT0
14
Non-Recoverable Fault 0 Interrupt Flag
FAULTB
13
Recoverable Fault B Interrupt Flag
FAULTA
12
Recoverable Fault A Interrupt Flag
DFS
11
Non-Recoverable Debug Fault State Interrupt Flag
UFS
10
Non-Recoverable Update Fault
ERR
3
Error Interrupt Flag
CNT
2
Counter Interrupt Flag
TRG
1
Retrigger Interrupt Flag
OVF
0
Overflow Interrupt Flag
STATUSStatus
Address
0x42001830
Reset
0x00000001
Access
read/write
Size
32-bit
22 fields
Field
Bits
What it does
CMP3
27
Compare Channel 3 Value
CMP2
26
Compare Channel 2 Value
CMP1
25
Compare Channel 1 Value
CMP0
24
Compare Channel 0 Value
CCBUFV3
19
Compare/Capture Channel 3 Buffer Valid
CCBUFV2
18
Compare/Capture Channel 2 Buffer Valid
CCBUFV1
17
Compare/Capture Channel 1 Buffer Valid
CCBUFV0
16
Compare/Capture Channel 0 Buffer Valid
FAULT1
15
Non-recoverable Fault 1 State
FAULT0
14
Non-recoverable Fault 0 State
FAULTB
13
Recoverable Fault B State
FAULTA
12
Recoverable Fault A State
FAULT1IN
11
Non-Recoverable Fault 1 Input
FAULT0IN
10
Non-Recoverable Fault 0 Input
FAULTBIN
9
Recoverable Fault B Input
FAULTAIN
8
Recoverable Fault A Input
PERBUFV
7
Period Buffer Valid
PATTBUFV
5
Pattern Generator Value Buffer Valid
DFS
3
Debug Fault State
UFS
2
Non-recoverable Update Fault State
IDX
1
Ramp Index
STOP
0
Stop
COUNTCounter
Address
0x42001834
Reset
0x00000000
Access
read/write
Size
32-bit
1 field
Field
Bits
What it does
COUNT
15:0
Counter Value
PATTPattern
Address
0x42001838
Reset
0x0000
Access
read/write
Size
16-bit
8 fields
Field
Bits
What it does
PGV3
11
Pattern Generation Output 3 Value
PGV2
10
Pattern Generation Output 2 Value
PGV1
9
Pattern Generation Output 1 Value
PGV0
8
Pattern Generation Output 0 Value
PGE3
3
Pattern Generation Output 3 Enable
PGE2
2
Pattern Generation Output 2 Enable
PGE1
1
Pattern Generation Output 1 Enable
PGE0
0
Pattern Generation Output 0 Enable
WAVEWaveform
Address
0x4200183C
Reset
0x00000000
Access
read/write
Size
32-bit
19 fields
Field
Bits
What it does
POL3
19
Channel 3 Polarity
0 Compare output is initialized to ~DIR, set to DIR when TCC counter matches CCn value and set to ~DIR when TCC counter matches CC[n+WO_NUM/2] value.
1 Compare output is initialized to DIR, set to ~DIR when TCC counter matches CCn value and set to DIR when TCC counter matches CC[n+WO_NUM/2] value.
POL3
19
Channel 3 Polarity
0 Compare output is set to ~DIR when TCC counter matches CCn value
1 Compare output is set to DIR when TCC counter matches CCn value.
POL3
19
Channel 3 Polarity
0 Compare output is initialized to ~DIR and set to DIR when TCC counter matches CCn value.
1 Compare output is initialized to DIR and set to ~DIR when TCC counter matches CCn value.
POL2
18
Channel 2 Polarity
0 Compare output is initialized to ~DIR, set to DIR when TCC counter matches CCn value and set to ~DIR when TCC counter matches CC[n+WO_NUM/2] value.
1 Compare output is initialized to DIR, set to ~DIR when TCC counter matches CCn value and set to DIR when TCC counter matches CC[n+WO_NUM/2] value.
POL2
18
Channel 2 Polarity
0 Compare output is set to ~DIR when TCC counter matches CCn value
1 Compare output is set to DIR when TCC counter matches CCn value.
POL2
18
Channel 2 Polarity
0 Compare output is initialized to ~DIR and set to DIR when TCC counter matches CCn value.
1 Compare output is initialized to DIR and set to ~DIR when TCC counter matches CCn value.
POL1
17
Channel 1 Polarity
0 Compare output is initialized to ~DIR, set to DIR when TCC counter matches CCn value and set to ~DIR when TCC counter matches CC[n+WO_NUM/2] value.
1 Compare output is initialized to DIR, set to ~DIR when TCC counter matches CCn value and set to DIR when TCC counter matches CC[n+WO_NUM/2] value.
POL1
17
Channel 1 Polarity
0 Compare output is set to ~DIR when TCC counter matches CCn value
1 Compare output is set to DIR when TCC counter matches CCn value.
POL1
17
Channel 1 Polarity
0 Compare output is initialized to ~DIR and set to DIR when TCC counter matches CCn value.
1 Compare output is initialized to DIR and set to ~DIR when TCC counter matches CCn value.
POL0
16
Channel 0 Polarity
0 Compare output is initialized to ~DIR, set to DIR when TCC counter matches CCn value and set to ~DIR when TCC counter matches CC[n+WO_NUM/2] value.
1 Compare output is initialized to DIR, set to ~DIR when TCC counter matches CCn value and set to DIR when TCC counter matches CC[n+WO_NUM/2] value.
POL0
16
Channel 0 Polarity
0 Compare output is set to ~DIR when TCC counter matches CCn value
1 Compare output is set to DIR when TCC counter matches CCn value.
POL0
16
Channel 0 Polarity
0 Compare output is initialized to ~DIR and set to DIR when TCC counter matches CCn value.
1 Compare output is initialized to DIR and set to ~DIR when TCC counter matches CCn value.