PIC32CK1012SG00064 PDEC registers The 19 registers of PDEC (Position Decoder), from 0x4501C000, with their reset value and every field. The PIC32CK1012SG00064 has 5596 registers in 69 peripherals, one page each.
PDEC Position Decoder CTRLAControl A
Address 0x4501C000
Reset 0x00000000
Access read/write
Size 32-bit 16 fields
Field Bits What it does ANGULAR 26:24 Angular Counter Length PINVEN2 22 IO Pin 2 Invert Enable PINVEN1 21 IO Pin 1 Invert Enable PINVEN0 20 IO Pin 0 Invert Enable PINEN2 18 PDEC Input From Pin 2 Enable PINEN1 17 PDEC Input From Pin 1 Enable PINEN0 16 PDEC Input From Pin 0 Enable PEREN 15 Period Enable SWAP 14 PDEC Phase A and B Swap ALOCK 11 Auto Lock CONF 10:8 PDEC Configuration0 Quadrature decoder direction1 Secure Quadrature decoder direction2 Decoder direction3 Secure decoder direction4 Auto correction mode RUNSTDBY 6 Run in Standby MODE 3:2 Operation Mode0 QDEC operating mode1 HALL operating mode2 COUNTER operating mode ENABLE 1 Enable SWRST 0 Software Reset MAXCMP 31:28 Maximum Consecutive Missing Pulses
CTRLBCLRControl B Clear
Address 0x4501C004
Reset 0x00
Access read/write 7 CMD2 6 CMD1 5 CMD0 4 – 3 – 2 – 1 LUPD 0 – 2 fields
Field Bits What it does CMD 7:5 Command0 No action1 Force a counter restart or retrigger2 Force update of double buffered registers3 Force a read synchronization of COUNT4 Start QDEC/HALL5 Stop QDEC/HALL LUPD 1 Lock Update
CTRLBSETControl B Set
Address 0x4501C005
Reset 0x00
Access read/write 7 CMD2 6 CMD1 5 CMD0 4 – 3 – 2 – 1 LUPD 0 – 2 fields
Field Bits What it does CMD 7:5 Command0 No action1 Force a counter restart or retrigger2 Force update of double buffered registers3 Force a read synchronization of COUNT4 Start QDEC/HALL5 Stop QDEC/HALL LUPD 1 Lock Update
EVCTRLEvent Control
Address 0x4501C006
Reset 0x0000
Access read/write
Size 16-bit 9 fields
Field Bits What it does MCEO1 13 Match Channel 1 Event Output Enable MCEO0 12 Match Channel 0 Event Output Enable VLCEO 11 Velocity Output Event Enable DIREO 10 Direction Output Event Enable ERREO 9 Error Output Event Enable OVFEO 8 Overflow/Underflow Output Event Enable EVEI 7:5 Event Input Enable EVINV 4:2 Inverted Event Input Enable EVACT 1:0 Event Action0 Event action disabled2 Count on event
INTENCLRInterrupt Enable Clear
Address 0x4501C008
Reset 0x00
Access read/write 7 – 6 – 5 MC1 4 MC0 3 VLC 2 DIR 1 ERR 0 OVF 6 fields
Field Bits What it does MC1 5 Channel 1 Compare Match Disable MC0 4 Channel 0 Compare Match Disable VLC 3 Velocity Interrupt Disable DIR 2 Direction Interrupt Disable ERR 1 Error Interrupt Disable OVF 0 Overflow/Underflow Interrupt Disable
INTENSETInterrupt Enable Set
Address 0x4501C009
Reset 0x00
Access read/write 7 – 6 – 5 MC1 4 MC0 3 VLC 2 DIR 1 ERR 0 OVF 6 fields
Field Bits What it does MC1 5 Channel 1 Compare Match Enable MC0 4 Channel 0 Compare Match Enable VLC 3 Velocity Interrupt Enable DIR 2 Direction Interrupt Enable ERR 1 Error Interrupt Enable OVF 0 Overflow/Underflow Interrupt Enable
INTFLAGInterrupt Flag Status and Clear
Address 0x4501C00A
Reset 0x00
Access read/write 7 – 6 – 5 MC1 4 MC0 3 VLC 2 DIR 1 ERR 0 OVF 6 fields
Field Bits What it does MC1 5 Channel 1 Compare Match MC0 4 Channel 0 Compare Match VLC 3 Velocity DIR 2 Direction Change ERR 1 Error OVF 0 Overflow/Underflow
STATUSStatus
Address 0x4501C00C
Reset 0x0040
Access read/write
Size 16-bit 11 fields
Field Bits What it does CCBUFV1 13 Compare Channel 1 Buffer Valid CCBUFV0 12 Compare Channel 0 Buffer Valid FILTERBUFV 9 Filter Buffer Valid PRESCBUFV 8 Prescaler Buffer Valid DIR 7 Direction Status Flag STOP 6 Stop HERR 5 Hall Error Flag WINERR 4 Window Error Flag MPERR 2 Missing Pulse Error flag IDXERR 1 Index Error Flag QERR 0 Quadrature Error Flag
DBGCTRLDebug Control
Address 0x4501C00F
Reset 0x00
Access read/write 7 – 6 – 5 – 4 – 3 – 2 – 1 – 0 DBGRUN 1 field
Field Bits What it does DBGRUN 0 Debug Run Mode
SYNCBUSYSynchronization Status
Address 0x4501C010
Reset 0x00000000
Access read only
Size 32-bit 9 fields
Field Bits What it does CC1 8 Compare Channel 1 Synchronization Busy CC0 7 Compare Channel 0 Synchronization Busy COUNT 6 Count Synchronization Busy FILTER 5 Filter Synchronization Busy PRESC 4 Prescaler Synchronization Busy STATUS 3 Status Synchronization Busy CTRLB 2 Control B Synchronization Busy ENABLE 1 Enable Synchronization Busy SWRST 0 Software Reset Synchronization Busy
PRESCPrescaler Value
Address 0x4501C014
Reset 0x00
Access read/write 7 – 6 – 5 – 4 – 3 PRESC3 2 PRESC2 1 PRESC1 0 PRESC0 1 field
Field Bits What it does PRESC 3:0 Prescaler Value0 No division1 Divide by 22 Divide by 43 Divide by 84 Divide by 165 Divide by 326 Divide by 647 Divide by 1288 Divide by 2569 Divide by 51210 Divide by 1024
FILTERFilter Value
Address 0x4501C015
Reset 0x00
Access read/write 7 FILTER7 6 FILTER6 5 FILTER5 4 FILTER4 3 FILTER3 2 FILTER2 1 FILTER1 0 FILTER0 1 field
Field Bits What it does FILTER 7:0 Filter Value
PRESCBUFPrescaler Buffer Value
Address 0x4501C018
Reset 0x00
Access read/write 7 – 6 – 5 – 4 – 3 PRESCBUF3 2 PRESCBUF2 1 PRESCBUF1 0 PRESCBUF0 1 field
Field Bits What it does PRESCBUF 3:0 Prescaler Buffer Value0 No division1 Divide by 22 Divide by 43 Divide by 84 Divide by 165 Divide by 326 Divide by 647 Divide by 1288 Divide by 2569 Divide by 51210 Divide by 1024
FILTERBUFFilter Buffer Value
Address 0x4501C019
Reset 0x00
Access read/write 7 FILTERBUF7 6 FILTERBUF6 5 FILTERBUF5 4 FILTERBUF4 3 FILTERBUF3 2 FILTERBUF2 1 FILTERBUF1 0 FILTERBUF0 1 field
Field Bits What it does FILTERBUF 7:0 Filter Buffer Value
COUNTCounter Value
Address 0x4501C01C
Reset 0x00000000
Access read/write
Size 32-bit 1 field
Field Bits What it does COUNT 15:0 Counter Value
CC0Channel n Compare Value
Address 0x4501C020
Reset 0x00000000
Access read/write
Size 32-bit 1 field
Field Bits What it does CC 15:0 Channel Compare Value
CC1Channel n Compare Value
Address 0x4501C024
Reset 0x00000000
Access read/write
Size 32-bit 1 field
Field Bits What it does CC 15:0 Channel Compare Value
CCBUF0Channel n Compare Buffer Value
Address 0x4501C030
Reset 0x00000000
Access read/write
Size 32-bit 1 field
Field Bits What it does CCBUF 15:0 Channel Compare Buffer Value
CCBUF1Channel n Compare Buffer Value
Address 0x4501C034
Reset 0x00000000
Access read/write
Size 32-bit 1 field
Field Bits What it does CCBUF 15:0 Channel Compare Buffer Value