PIC32CM1216PL10064 TC2 registers The 29 registers of TC2 (Timer/Counter), from 0x42001400, with their reset value and every field. The PIC32CM1216PL10064 has 702 registers in 32 peripherals, one page each.
TC2 Timer/Counter CTRLAControl A
Address 0x42001400
Reset 0x00000000
Access read/write
Size 32-bit 15 fields
Field Bits What it does CAPTMODE1 28:27 Capture mode Channel 10 Default capture1 Minimum capture2 Maximum capture CAPTMODE0 25:24 Capture mode Channel 00 Default capture1 Minimum capture2 Maximum capture COPEN1 21 Capture On Pin 1 Enable COPEN0 20 Capture On Pin 0 Enable CAPTEN1 17 Capture Channel 1 Enable CAPTEN0 16 Capture Channel 0 Enable DMAOS 15 DMA One-Shot Trigger Mode ALOCK 11 Auto Lock PRESCALER 10:8 Prescaler0 Prescaler: GCLK_TC1 Prescaler: GCLK_TC/22 Prescaler: GCLK_TC/43 Prescaler: GCLK_TC/84 Prescaler: GCLK_TC/165 Prescaler: GCLK_TC/646 Prescaler: GCLK_TC/2567 Prescaler: GCLK_TC/1024 ONDEMAND 7 Clock On Demand RUNSTDBY 6 Run in Standby PRESCSYNC 5:4 Prescaler and Counter Synchronization0 Reload or reset the counter on next generic clock1 Reload or reset the counter on next prescaler clock2 Reload or reset the counter on next generic clock. Reset the prescaler counter. MODE 3:2 Timer Counter Mode0 Counter in 16-bit mode1 Counter in 8-bit mode2 Counter in 32-bit mode ENABLE 1 Enable SWRST 0 Software Reset
CTRLBCLRControl B Clear
Address 0x42001404
Reset 0x00
Access read/write 7 CMD2 6 CMD1 5 CMD0 4 – 3 – 2 ONESHOT 1 LUPD 0 DIR 4 fields
Field Bits What it does CMD 7:5 Command ONESHOT 2 One-Shot on Counter LUPD 1 Lock Update DIR 0 Counter Direction
CTRLBSETControl B Set
Address 0x42001405
Reset 0x00
Access read/write 7 CMD2 6 CMD1 5 CMD0 4 – 3 – 2 ONESHOT 1 LUPD 0 DIR 4 fields
Field Bits What it does CMD 7:5 Command0 No action1 Force a start, restart or retrigger2 Force a stop3 Force update of double buffered registers4 Force a read synchronization of COUNT5 One-shot DMA trigger ONESHOT 2 One-Shot on Counter LUPD 1 Lock Update DIR 0 Counter Direction
EVCTRLEvent Control
Address 0x42001406
Reset 0x0000
Access read/write
Size 16-bit 6 fields
Field Bits What it does MCEO1 13 Match or Capture Channel 1 Event Output Enable MCEO0 12 Match or Capture Channel 0 Event Output Enable OVFEO 8 Overflow/Underflow Event Output Enable TCEI 5 TC Event Input Enable TCINV 4 TC Inverted Event Input Polarity EVACT 2:0 Event Action0 Event action disabled1 Start, restart or retrigger TC on event2 Count on event3 Start TC on event4 Time stamp capture5 Period captured in CC0, pulse width in CC16 Period captured in CC1, pulse width in CC07 Pulse width capture
INTENCLRInterrupt Enable Clear
Address 0x42001408
Reset 0x00
Access read/write 7 – 6 – 5 MC1 4 MC0 3 – 2 – 1 ERR 0 OVF 4 fields
Field Bits What it does MC1 5 Match or Capture Channel 1 Interrupt Enable MC0 4 Match or Capture Channel 0 Interrupt Enable ERR 1 Error Interrupt Enable OVF 0 Overflow Interrupt Enable
INTENSETInterrupt Enable Set
Address 0x42001409
Reset 0x00
Access read/write 7 – 6 – 5 MC1 4 MC0 3 – 2 – 1 ERR 0 OVF 4 fields
Field Bits What it does MC1 5 Match or Capture Channel 1 Interrupt Enable MC0 4 Match or Capture Channel 0 Interrupt Enable ERR 1 Error Interrupt Enable OVF 0 Overflow Interrupt Enable
INTFLAGInterrupt Flag Status and Clear
Address 0x4200140A
Reset 0x00
Access read/write 7 – 6 – 5 MC1 4 MC0 3 – 2 – 1 ERR 0 OVF 4 fields
Field Bits What it does MC1 5 Match or Capture Channel 1 MC0 4 Match or Capture Channel 0 ERR 1 Error Interrupt Flag OVF 0 Overflow Interrupt Flag
STATUSStatus
Address 0x4200140B
Reset 0x01
Access read/write 7 – 6 – 5 CCBUFV1 4 CCBUFV0 3 PERBUFV 2 – 1 SLAVE 0 STOP 5 fields
Field Bits What it does CCBUFV1 5 Channel 1 Compare or Capture Buffer Valid CCBUFV0 4 Channel 0 Compare or Capture Buffer Valid PERBUFV 3 Period Buffer Valid SLAVE 1 Client Status Flag STOP 0 Stop Status Flag
WAVEWaveform Generation Control
Address 0x4200140C
Reset 0x00
Access read/write 7 – 6 – 5 – 4 – 3 – 2 – 1 WAVEGEN1 0 WAVEGEN0 1 field
Field Bits What it does WAVEGEN 1:0 Waveform Generation Mode0 Normal Frequency Generation mode1 Match Frequency Generation mode2 Normal Pulse-Width Modulation mode3 Match Pulse-Width Modulation mode
DRVCTRLDriver Control
Address 0x4200140D
Reset 0x00
Access read/write 7 – 6 – 5 – 4 – 3 – 2 – 1 INVEN1 0 INVEN0 2 fields
Field Bits What it does INVEN1 1 Waveform Output 1 Invert Enable INVEN0 0 Waveform Output 0 Invert Enable
DBGCTRLDebug Control
Address 0x4200140F
Reset 0x00
Access read/write 7 – 6 – 5 – 4 – 3 – 2 – 1 – 0 DBGRUN 1 field
Field Bits What it does DBGRUN 0 Run in Debug Mode
SYNCBUSYSynchronization Busy
Address 0x42001410
Reset 0x00000000
Access read only
Size 32-bit 8 fields
Field Bits What it does CC1 7 Compare/Capture Channel 1 Synchronization Busy CC0 6 Compare/Capture Channel 0 Synchronization Busy PER 5 PER 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
COUNT16.COUNTCOUNT16 Counter
Address 0x42001414
Reset 0x0000
Access read/write
Size 16-bit 1 field
Field Bits What it does COUNT 15:0 Counter Value
COUNT32.COUNTCOUNT32 Counter
Address 0x42001414
Reset 0x00000000
Access read/write
Size 32-bit 1 field
Field Bits What it does COUNT 31:0 Counter Value
COUNT8.COUNTCOUNT8 Counter
Address 0x42001414
Reset 0x00
Access read/write 7 COUNT7 6 COUNT6 5 COUNT5 4 COUNT4 3 COUNT3 2 COUNT2 1 COUNT1 0 COUNT0 1 field
Field Bits What it does COUNT 7:0 Counter Value
COUNT8.PERCOUNT8 Period
Address 0x4200141B
Reset 0xFF
Access read/write 7 PER7 6 PER6 5 PER5 4 PER4 3 PER3 2 PER2 1 PER1 0 PER0 1 field
Field Bits What it does PER 7:0 Period Value
COUNT16.CC0COUNT16 Channel # Compare/Capture
Address 0x4200141C
Reset 0x0000
Access read/write
Size 16-bit 1 field
Field Bits What it does CC 15:0 Channel Compare/Capture Value
COUNT32.CC0COUNT32 Channel # Compare/Capture
Address 0x4200141C
Reset 0x00000000
Access read/write
Size 32-bit 1 field
Field Bits What it does CC 31:0 Channel Compare/Capture Value
COUNT8.CC0COUNT8 Channel # Compare/Capture
Address 0x4200141C
Reset 0x00
Access read/write 7 CC7 6 CC6 5 CC5 4 CC4 3 CC3 2 CC2 1 CC1 0 CC0 1 field
Field Bits What it does CC 7:0 Channel Compare/Capture Value
COUNT8.CC1COUNT8 Channel # Compare/Capture
Address 0x4200141D
Reset 0x00
Access read/write 7 CC7 6 CC6 5 CC5 4 CC4 3 CC3 2 CC2 1 CC1 0 CC0 1 field
Field Bits What it does CC 7:0 Channel Compare/Capture Value
COUNT16.CC1COUNT16 Channel # Compare/Capture
Address 0x4200141E
Reset 0x0000
Access read/write
Size 16-bit 1 field
Field Bits What it does CC 15:0 Channel Compare/Capture Value
COUNT32.CC1COUNT32 Channel # Compare/Capture
Address 0x42001420
Reset 0x00000000
Access read/write
Size 32-bit 1 field
Field Bits What it does CC 31:0 Channel Compare/Capture Value
COUNT8.PERBUFCOUNT8 Period Buffer
Address 0x4200142F
Reset 0xFF
Access read/write 7 PERBUF7 6 PERBUF6 5 PERBUF5 4 PERBUF4 3 PERBUF3 2 PERBUF2 1 PERBUF1 0 PERBUF0 1 field
Field Bits What it does PERBUF 7:0 Period Buffer Value
COUNT16.CCBUF0COUNT16 Channel # Compare Buffer
Address 0x42001430
Reset 0x0000
Access read/write
Size 16-bit 1 field
Field Bits What it does CCBUF 15:0 Channel Compare Buffer Value
COUNT32.CCBUF0COUNT32 Channel # Compare Buffer
Address 0x42001430
Reset 0x00000000
Access read/write
Size 32-bit 1 field
Field Bits What it does CCBUF 31:0 Channel Compare Buffer Value
COUNT8.CCBUF0COUNT8 Channel # Compare Buffer
Address 0x42001430
Reset 0x00
Access read/write 7 CCBUF7 6 CCBUF6 5 CCBUF5 4 CCBUF4 3 CCBUF3 2 CCBUF2 1 CCBUF1 0 CCBUF0 1 field
Field Bits What it does CCBUF 7:0 Channel Compare Buffer Value
COUNT8.CCBUF1COUNT8 Channel # Compare Buffer
Address 0x42001431
Reset 0x00
Access read/write 7 CCBUF7 6 CCBUF6 5 CCBUF5 4 CCBUF4 3 CCBUF3 2 CCBUF2 1 CCBUF1 0 CCBUF0 1 field
Field Bits What it does CCBUF 7:0 Channel Compare Buffer Value
COUNT16.CCBUF1COUNT16 Channel # Compare Buffer
Address 0x42001432
Reset 0x0000
Access read/write
Size 16-bit 1 field
Field Bits What it does CCBUF 15:0 Channel Compare Buffer Value
COUNT32.CCBUF1COUNT32 Channel # Compare Buffer
Address 0x42001434
Reset 0x00000000
Access read/write
Size 32-bit 1 field
Field Bits What it does CCBUF 31:0 Channel Compare Buffer Value