Microchip

dsPIC33CK1024MP708 - Electronic component Microchip - Free user manual and instructions

Find the device manual for free dsPIC33CK1024MP708 Microchip in PDF.

📄 999 pages English EN Download 💬 AI Question
Notice Microchip dsPIC33CK1024MP708 - page 28
Pick your language and provide your email: we'll send you a specifically translated version.

User questions about dsPIC33CK1024MP708 Microchip

0 question about this device. Answer the ones you know or ask your own.

Ask a new question about this device

The email remains private: it is only used to notify you if someone responds to your question.

No questions yet. Be the first to ask one.

Download the instructions for your Electronic component in PDF format for free! Find your manual dsPIC33CK1024MP708 - Microchip and take your electronic device back in hand. On this page are published all the documents necessary for the use of your device. dsPIC33CK1024MP708 by Microchip.

USER MANUAL dsPIC33CK1024MP708 Microchip

High-Performance Digital Signal Controllers with High-Resolution PWM and CAN Flexible Data-Rate (CAN FD)

dsPIC33CK1024MP710 Family

Operating Conditions

  • 3V to 3.6V, -40°C to +125°C:
  • DC to 100 MIPS
  • 3V to 3.6V, -40°C to +150°C: - DC to 70 MIPS

Core: dsPIC33CK CPU

• 256-1024 Kbytes of Program Flash with ECC and 128 Kbytes of Data RAM
- Fast Six-Cycle Divide
- Flash with Dual Partition for LiveUpdate Capabilities
- LiveUpdate
• Code Efficient (C and Assembly) Architecture
• 40-Bit Wide Accumulators
- Single-Cycle (MAC/MPY) with Dual Data Fetch
- Single-Cycle, Mixed-Sign MUL Plus Hardware Divide
• 32-Bit Multiply Support
- Five Sets of Interrupt Context Selected Registers for Fast Interrupt Response
- Zero Overhead Looping
• RAM Memory Built-In Self-Test (MBIST)

Clock Management

  • Fast RC (FRC)
  • Internal Oscillator
  • Programmable PLLs and Oscillator Clock Sources
    • Reference Clock Output
    • Fail-Safe Clock Monitor (FSCM)
  • Fast Wake-up and Start-up
  • 8 MHz Backup FRC (BFRC) with a Divider (244 decimal) to provide a Nominal 32.768 kHz Output with a 50% Duty Cycle

Power Management

  • Low-Power Management Modes (Sleep, Idle, Doze)
  • Integrated Power-on Reset and Brown-out Reset

High-Resolution PWM with Fine Edge Placement

  • Up to Twelve PWM Channels
    • 250 ps PWM Resolution
  • Applications include:

  • DC/DC converters

  • AC/DC power supplies
    – Uninterruptable Power Supply (UPS)
    – Motor Control: BLDC, PMSM, SR, ACIM

Timers/Output Compare/Input Capture

• One General Purpose 16-Bit Timer
• Peripheral Trigger Generator (PTG) Module
• Eight SCCP Modules:

– Timer, Capture/Compare and PWM modes
- 16 or 32-bit time base
- 16 or 32-bit capture
– Four-deep capture buffer
– Fully asynchronous operation, available in Sleep modes

- Nine MCCP/SCCP modules which include Timer, Capture/Compare and PWM:

  • One MCCP
  • Eight SCCPs
  • 16 or 32-bit time base
  • 16 or 32-bit capture
    – Four-deep capture buffer

Advanced Analog Features

- Five ADC Modules:

  • 12-bit, 3.5 Msps ADC
  • Up to 27 conversion channels
  • 250 ns conversion latency

- Six DAC/Analog Comparator Modules:

  • 12-bit DACs with hardware slope compensation
  • 15 ns analog comparators

• Shared DAC/Analog Output:

– DAC/analog comparator outputs

- Three Op Amp Modules – 20 MHz GBW:

  • 40 V/s Slew Rate
  • ±1 mV offset

Communication Interfaces

  • Three UART Modules:
  • Support for DMX, LIN/J2602 protocols
    • Three 4-Wire SPI/I ^2 S Modules
  • Two CAN Flexible Data-Rate (FD) Modules
  • Three I ^2 C Modules:
  • Support for SMBus
  • PPS to Allow Function Remap
  • Two SENT Modules

Direct Memory Access (DMA)

• Eight DMA Channels

Peripheral Features

  • Three Quadrature Encoder Interfaces (QEIs):
    – Four inputs: Phase A, Phase B, Home, Index
    • Eight Configurable Logic Cells (CLCs) with Internal Connections to Select Peripherals and PPS
  • Two Current Bias Generators (CBGs)

Debugger Development Support

• In-Circuit and In-Application Programming
- Three Complex, Five Simple Breakpoints
- IEEE 1149.2 Compatible (JTAG) Boundary Scan
- Trace Buffer and Run-Time Watch

Safety Features

  • DMT (Deadman Timer)
  • ECC (Error Correcting Code) for Flash Memory
    • WDT (Watchdog Timer)
    • CodeGuard ^TM Security
    • CRC (Cyclic Redundancy Check)
  • Flash OTP by ICSP ^TM Write Inhibit
    • RAM Memory Built-In Self Test (MBIST)
  • Two-Speed Start-up
  • Fail-Safe Clock Monitoring (FSCM)
  • Backup FRC (BFRC)
  • Capless Internal Voltage Regulator
    • Virtual Pins for Redundancy and Monitoring

Functional Safety Support – ISO 26262/IEC 61508/IEC 60730

The devices in this family are ISO 26262 compliant and developed following the ISO 26262 process. To learn about various Functional Safety standards and target safety levels that this device family supports, visit www.microchip.com/dsPIC33-Functional-Safety.

Qualification Support

  • AEC-Q100 REV-H (Grade 1: -40°C to +125°C) Compliant
  • AEC-Q100 REV-H (Grade 0: -40°C to +150°C) Compliant

dsPIC33CK1024MP710 Product Families

The device names, pin counts, memory sizes and peripheral availability of each device are listed in Table 1 and Table 2. The following pages show their pinout diagrams.

Table 1. dsPIC33CK1024MP710 Motor Control/Power Supply Families with CAN FD

ProductPinsFlashData RAMADC ModulesADC Channels16-BR Timers5CCP/MCCPCAN FDSENTUARTSPJ/JSICQEICLCPTGCRCPWM Outputs12-BR DAC/Analog CMPCurrent Bias SourceREFOOp Amp
Devices with CAN FD
dsPIC33CK1024MP710100 1024K128K 5 28 1 8/12 2 3 3 3 3 81 1 12x26 1 1 3
dsPIC33CK1024MP70880 1024K128K 5 24 1 8/12 2 3 3 3 3 81 1 8x26 1 1 3
dsPIC33CK1024MP70664 1024K128K 5 20 1 8/12 2 3 3 3 3 81 1 8x26 1 1 3
dsPIC33CK1024MP70548 1024K128K 5 19 1 8/12 2 3 3 3 3 81 1 8x26 1 1 3
dsPIC33CK512MP710100 512K128K 5 28 1 8/12 2 3 3 3 3 81 1 12x26 1 1 3
dsPIC33CK512MP70880 512K128K 5 24 1 8/12 2 3 3 3 3 81 1 8x26 1 1 3
dsPIC33CK512MP70664 512K128K 5 20 1 8/12 2 3 3 3 3 81 1 8x26 1 1 3
dsPIC33CK512MP70548 512K128K 5 19 1 8/12 2 3 3 3 3 81 1 8x26 1 1 3
dsPIC33CK256MP710100 256K128K 5 28 1 8/12 2 3 3 3 3 81 1 12x26 1 1 3
dsPIC33CK256MP70880 256K128K 5 24 1 8/12 2 3 3 3 3 81 1 8x26 1 1 3
dsPIC33CK256MP70664 256K128K 5 20 1 8/12 2 3 3 3 3 81 1 8x26 1 1 3
dsPIC33CK256MP70548 256K128K 5 19 1 8/12 2 3 3 3 3 81 1 8x26 1 1 3

Table 2. dsPIC33CK1024MP710 Motor Control/Power Supply Families with No CAN FD

ProductPinsFlashData RAMADC ModulesADC Channels16-BR Timers5CCP/MCCPCAN FDSENTUARTSPJ/JSICQEICLCPTGCRCPWM Outputs12-BR DAC/Analog CMPCurrent Bias SourceREFOOp Amp
Devices with No CAN FD
dsPIC33CK1024MP410100 1024K128K 5 28 1 8/10 2 3 3 3 3 81 1 12x26 1 1 3
dsPIC33CK1024MP40880 1024K128K 5 24 1 8/10 2 3 3 3 3 81 1 8x26 1 1 3
dsPIC33CK1024MP40664 1024K128K 5 20 1 8/10 2 3 3 3 3 81 1 8x26 1 1 3
dsPIC33CK1024MP40548 1024K128K 5 19 1 8/10 2 3 3 3 3 81 1 8x26 1 1 3
dsPIC33CK512MP410100 512K128K 5 28 1 8/10 2 3 3 3 3 81 1 12x26 1 1 3
dsPIC33CK512MP40880 512K128K 5 24 1 8/10 2 3 3 3 3 81 1 8x26 1 1 3
dsPIC33CK512MP40664 512K128K 5 20 1 8/10 2 3 3 3 3 81 1 8x26 1 1 3
dsPIC33CK512MP40548 512K128K 5 19 1 8/10 2 3 3 3 3 81 1 8x26 1 1 3
dsPIC33CK256MP410100 256K128K 5 28 1 8/10 2 3 3 3 3 81 1 12x26 1 1 3
dsPIC33CK256MP40880 256K128K 5 24 1 8/10 2 3 3 3 3 81 1 8x26 1 1 3
dsPIC33CK256MP40664 256K128K 5 20 1 8/10 2 3 3 3 3 81 1 8x26 1 1 3
dsPIC33CK256MP40548 256K128K 5 19 1 8/10 2 3 3 3 3 81 1 8x26 1 1 3

Pin Diagrams

Figure 1. 48-Pin TQFP/VQFN ^(1,2)
Microchip dsPIC33CK1024MP708 - Pin Diagrams - 1

geo dsPIC33CKXXXXMP705 | Pin | Value | |---|---| | RB13 | 48 | | RB12 | 47 | | RB11 | 46 | | RB10 | 45 | | RD1 | 44 | | VDD | 43 | | VSS | 42 | | RC11 | 41 | | RC10 | 40 | | RC5 | 39 | | RC4 | 38 | | RB9 | 37 | | RB14 | 1 | | RB15 | 2 | | RC12 | 3 | | RC13 | 4 | | MCLR | 5 | | RD13 | 6 | | RC0 | 7 | | RA0 | 8 | | RA1 | 9 | | RA2 | 10 | | RA3 | 11 | | RA4 | 12 | AVDD | 13 | | AV/SS | 14 | | RC1 | 15 | | RC2 | 16 | | RC6 | 17 | | VDD | 18 | | VSS | 19 | | RC3 | 20 | | RB0 | 21 | | RB1 | 22 | | RD10 | 23 | | RC7 | 24 | 36 RB8 35 RB7 34 RB6 33 RB5 VDD 32 VSS 31 RD8 29 RC9 28 RC8 27 RB4 26 RB3 25 RB2

Notes:

  1. Shaded pins are up to 5.5 V DC tolerant.
  2. The large center pad on the bottom of the package may be left floating or connected to V_ss . The four-corner anchor pads are internally connected to the large bottom pad, and therefore, must be connected to the same net as the large center pad.

Table 3. 48-Pin TQFP/VQFN

Pin # FunctionPin # Function
1 RP46/PWM1H/RB14 25 OA2OUT/AN1/AN7/ANA0/ANA2/ANA3/CMP1D/CMP2D/CMP3D/CMP4D/CMP5D/CMP6D/RP34/SCL3/INT0/RB2
2 RP47/PWM1L/RB15 26 PGD2/OA2IN-/AN8/CMP4A/RP35/RB3
3 RP60/PWM8H/RC12 27 PGC2/OA2IN+/RP36/RB4
4 RP61/PWM8L/RC13 28 RP56/ASDA1/SCK2/RC8
5 MCLR 29 RP57/ASCL1/SDI2/RC9
6 ANN4/CMP5B/RP77/RD13 30 RP72/SDO2/PCI19/RD8
7 AN12/ANN0/RP48/RC0 31 VSS
8 OA1OUT/AN0/CMP1A/IBIAS0/RA0 32 VDD
9 OA1IN-/ANA1/RA1 33 PGD3/RP37/PWM6L/SDA2/RB5
10 OA1IN+/AN9/RA2 34 PGC3/RP38/PWM6H/SCL2/RB6
11 DACOUT1/AN3/AN31/CMP1C/RA3 35 TDO/AN2/AN30/CMP3A/RP39/SDA3/RB7
Legend: RPN and RPin represent remappable peripheral functions. Notes:
1. A pull-up resistor is connected to this pin when device is erased (JTAG enabled) and during programming.
2. This pin is toggled during programming.
Pin # Function Pin # Function
12 OA3OUT/AN4/ANB1/ANB2/CMP3B/IBIAS3/RA436 PGD1/AN10/CMP6A/RP40/SCL1/RB8
13 AVDD37 PGC1/AN11/CMP5A/RP41/SDA1/RB9
14 AVss38 RP52/PWM5H/ASDA2/RC4
15 OA3IN-/AN13/CMP1B/ISRC0/RP49/RC1 39 RP53/PWM5L/ASCL2/RC5
16 OA3IN+/AN14/CMP2B/ISRC1/RP50/RC2 40 RP58/PWM7H/RC10
17 AN17/ANN1/CMP4B/IBIAS1/RP54/RC6 41 RP59/PWM7L/RC11
18 V_DD 42 V_SS
19 V_SS 43 V_DD
20 AN15/ANN2/CMP2A/IBIAS2/RP51/RC3 44 RP65/PWM4H/RD1
21 OSCI/CLKI/AN5/RP32/RB0 45 TMS/RP42/PWM3H/RB10(1)
22 OSCO/CLKO/AN6/RP33/RB1 (2)46 TCK/RP43/PWM3L/RB11
23 AN18/ANC2/CMP3C/ISRC3/RP74/RD10 47 TDI/RP44/PWM2H/RB12
24 DACOUT2/AN16/CMP4C/ISRC2/RP55/RC7 48 RP45/PWM2L/RB13
Legend: RPN and RPin represent remappable peripheral functions. Notes:1. A pull-up resistor is connected to this pin when device is erased (JTAG enabled) and during programming.2. This pin is toggled during programming.

Pin Diagrams (Continued)

Figure 2. 64-Pin TQFP, QFN ^(1,2)
Microchip dsPIC33CK1024MP708 - Pin Diagrams (Continued) - 1

other dsPIC33CKXXXX706 | Pin | Value | |---|---| | RB13 | 64 | | RB12 | 63 | | RB11 | 62 | | RB10 | 61 | | RD0 | 60 | | RD1 | 59 | | RD2 | 58 | | VDD | 57 | | VSS | 56 | | RD3 | 55 | | RD4 | 54 | | RC11 | 53 | | RC10 | 52 | | RC5 | 51 | | RC4 | 50 | | RB9 | 49 | | Pin Label | Value | | :--- | :--- | | RB14 | 1 | | RB15 | 2 | | RC12 | 3 | | RC13 | 4 | | RC14 | 5 | | RC15 | 6 | | MCLR | 7 | | RD15 | 8 | | Vss | 9 | | VDD | 10 | | RD14 | 11 | | RD13 | 12 | | RC0 | 13 | | RA0 | 14 | | RA1 | 15 | | RA2 | 16 | [dsPIC33CKXXXX706 dsPIC33CKXXXX406] | Pin Label | Value | | :--- | :--- | | RB8 | 48 | | RB7 | 47 | | RB6 | 46 | | RB5 | 45 | | RD5 | 44 | | RD6 | 43 | | RD7 | 42 | | VDD | 41 | | Vss | 40 | | RD8 | 39 | | RD9 | 38 | | RC9 | 37 | | RC8 | 36 | | RB4 | 35 | | RB3 | 34 | | RB2 | 33 | [DS PIC33CKXXXX706 dsPIC33CKXXXX406] | Pin Label | Value | | :--- | :--- | | RA3 | 17 | | RA4 | 18 | | AVDD | 19 | | AVSS | 20 | | RD12 | 21 | | RC1 | 22 | | RC2 | 23 | | RC6 | 24 | | VDD | 25 | | VSS | 26 | | RC3 | 27 | | RB0 | 28 | | RB1 | 29 | | RD11 | 30 | | RD10 | 31 | | RC7 | 32 | [DS PIC33CKXXXX706 dsPIC33CKXXXX406]

Notes:

  1. Shaded pins are up to 5.5 V DC tolerant.

  2. The large center pad on the bottom of the package may be left floating or connected to V_SS . The four-corner anchor pads are internally connected to the large bottom pad, and, therefore, must be connected to the same net as the large center pad.

Table 4. 64-Pin TQFP/QFN

Pin # FunctionPin # Function
1 RP46/PWM1H/PMD5/RB14 33 OA2OUT/AN1/AN7/ANA0/ANA2/ANA3/CMP1D/CMP2D/CMP3D/CMP4D/CMP5D/CMP6D/RP34/SCL3/INT0/RB2
2 RP47/PWM1L/PMD6/RB15 34 PGD2/OA2IN-/AN8/CMP4A/RP35/RB3
3 RP60/PWM8H/PMD7/RC12 35 PGC2/OA2IN+/RP36/RB4
4 RP61/PWM8L/PMA5/RC13 36 RP56/ASDA1/SCK2/RC8
5 RP62/PWM6H/PMA4/RC14 37 RP57/ASCL1/SDI2/RC9
6 RP63/PWM6L/PMA3/RC15 38 RP73/PCI20/RD9
7 MCLR 39 RP72/SDO2/PCI19/RD8
8 RP79/PCI22/PMA2/RD15 40 Vss
9 V_SS 41 V_DD
10 V_DD 42 RP71/PMD15/RD7

Legend: RPn and RPIn represent remappable peripheral functions.

Notes:

1. A pull-up resistor is connected to this pin when the device is erased (JTAG enabled) and during programming.
2. This pin is toggled during programming.
Pin # FunctionPin # Function
11 RP78/PCI21/RD14 43 RP70/PMD14/RD6
12 ANN4/CMP5B/RP77/RD13 44 RP69/PMA15/PMCS2/RD5
13 AN12/ANN0/RP48/RC0 45 PGD3/RP37/SDA2/PMA14/PMCS1/PSCS/RB5
14 OA1OUT/AN0/CMP1A/IBIAS0/RA0 46 PGC3/RP38/SCL2/RB6
15 OA1IN-/ANA1/RA1 47 TDO/AN2/AN30/CMP3A/RP39/SDA3/RB7
16 OA1IN+/AN9/PMA6/RA2 48 PGD1/AN10/CMP6A/RP40/SCL1/RB8
17 DACOUT1/AN3/AN31/CMP1C/RA3 49 PGC1/AN11/CMP5A/RP41/SDA1/RB9
18 OA3OUT/AN4/ANB1/ANB2/CMP3B/IBIAS3/RA4 50 RP52/PWM5H/ASDA2/RC4
19 AVDD51 RP53/PWM5L/ASCL2/PMWR/PMENB/PSWR/RC5
20 AVSS52 RP58/PWM7H/PMRD/PMWR/PSRD/RC10
21 RP76/RD12 53 RP59/PWM7L/RC11
22 OA3IN-/AN13/CMP1B/ISRC0/RP49/PMA7/RC1 54 RP68/ASDA3/RD4
23 OA3IN+/AN14/CMP2B/ISRC1/RP50/PMD13/PMA13/RC255 RP67/ASCL3/RD3
24 AN17/ANN1/CMP4B/IBIAS1/RP54/PMD12/PMA12/RC656Vss
25VDD57VDD
26Vss58 RP66/RD2
27 AN15/ANN2/CMP2A/IBIAS2/RP51/PMD11/PMA11/RC359 RP65/PWM4H/RD1
28OSCI/CLKI/AN5/RP32/PMD10/PMA10/RB060RP64/PWM4L/PMD0/RD0
29 OSCO/CLKO/AN6/RP33/PMA1/PMALH/PSA1/RB1 (2)61 TMS/RP42/PWM3H/PMD1/RB10 (1)
30 AN19/ANB0/CMP2C/RP75/PMA0/PMALL/PSA0/RD1162 TCK/RP43/PWM3L/PMD2/RB11
31 AN18/ANC2/CMP3C/ISRC3/RP74/PMD9/PMA9/RD1063 TDI/RP44/PWM2H/PMD3/RB12
32 DACOUT2/AN16/CMP4C/ISRC2/RP55/PMD8/PMA8/RC764 RP45/PWM2L/PMD4/RB13
Legend: RPN and RPin represent remappable peripheral functions. Notes: A pull-up resistor is connected to this pin when the device is erased (JTAG enabled) and during programming. This pin is toggled during programming.

Pin Diagrams (Continued)

Figure 3. 80-Pin TQFP ^(1)
Microchip dsPIC33CK1024MP708 - Pin Diagrams (Continued) - 1

other dsPIC33CKXXXXMP708 dsPIC33CKXXXXMP408 Pin Number (Pin) | Pin Label | Pin Color | Pin Value | | :--- | :--- | :--- | :--- | | 80 | RB13 | Dark Red | 80 | | 79 | RB15 | Dark Red | 79 | | 78 | RB12 | Dark Red | 78 | | 77 | RB14 | Dark Red | 77 | | 76 | RB11 | Dark Red | 76 | | 75 | RB10 | Dark Red | 75 | | 74 | RD0 | Dark Red | 74 | | 73 | RD1 | Dark Red | 73 | | 72 | RD2 | Dark Red | 72 | | 71 | VDD | Dark Red | 71 | | 70 | VSS | Dark Red | 70 | | 69 | RD3 | Dark Red | 69 | | 68 | RD4 | Dark Red | 68 | | 67 | RC11 | Dark Red | 67 | | 66 | RC10 | Dark Red | 66 | | 65 | RC5 | Dark Red | 65 | | 64 | RE13 | Dark Red | 64 | | 63 | RC4 | Dark Red | 63 | | 62 | RE12 | Dark Red | 62 | | 61 | RB9 | Dark Red | 61 | | 60 | RB8 | White | 60 | | 59 | RE11 | White | 59 | | 58 | RB7 | White | 58 | | 57 | RE10 | White | 57 | | 56 | RB6 | White | 56 | | 55 | RB5 | White | 55 | | 54 | RD5 | White | 54 | | 53 | RD6 | White | 53 | | 52 | RD7 | White | 52 | | 51 | VDD | White | 51 | | 50 | VSS | White | 50 | | 49 | RD8 | White | 49 | | 48 | RD9 | White | 48 | | 47 | RC9 | White | 47 | | 46 | RC8 | White | 46 | | 45 | RB4 | White | 45 | | 44 | RE9 | White | 44 | | 43 | RB3 | White | 43 | | 42 | RE8 | White | 42 | | 41 | RB2 | White | 41 | RA3: RA3, RA4: RA4, RA5: RA5, AVDD: AVDD, RD12: RD12, RC2: RC2, RC6: RC6, VDD: VDD, VSS: VSS, RC3: RC3, RB0: RB0, RB1: RB1, RD11: RD11, RE6: RE6, RD10: RD10, RD7: RD7, RC7: RC7 RA2: RA2, RA3: RA3, RA4: RA4, RA5: RA5, AVDD: AVDD, RD11: RD11, RE6: RE6, RD10: RD10, RD7: RD7, RC7: RC7

Note:

  1. Shaded pins are up to 5.5 V _DC tolerant.

Table 5. 80-Pin TQFP

Pin # Function Pin # Function
1 RP46/PWM1H/PMD5/RB14 41 OA2OUT/AN1/AN7/ANA0/ANA2/ANA3/CMP1D/CMP2D/CMP3D/CMP4D/CMP5D/CMP6D/RP34/SCL3/INT0/RB2
2 AN20/ANCO/CMP5C/RE0 42 RE8
3 RP47/PWM1L/PMD6/RB15 43 PGD2/OA2IN-/AN8/CMP4A/RP35/RB3
4 AN21/ANC1/CMP6B/RE1 44 RE9
5 RP60/PWM8H/PMD7/RC12 45 PGC2/OA2IN+/RP36/RB4
6 RP61/PWM8L/PMA5/RC13 46 RP56/ASDA1/SCK2/RC8
7RP62/PWM6H/PMA4/RC1447RP57/ASCL1/SDI2/RC9
8 RP63/PWM6L/PMA3/RC15 48 RP73/PCI20/RD9
9MCLR49 RP72/SDO2/PCI19/RD8
10RP79/PCI22/PMA2/RD1550Vss
11Vss51VDD
12VDD52RP71/PMD15/RD7
13RP78/PCI21/RD1453RP70/PMD14/RD6
14ANN4/CMP5B/RP77/RD1354RP69/PMA15/PMCS2/RD5
15AN12/ANN0/RP48/RC055PGD3/RP37/SDA2/PMA14/PMCS1/PSCS/RB5
16OA1OUT/AN0/CMP1A/IBIAS0/RA056PGC3/RP38/SCL2/RB6
17 AN22/ANB3/CMP6C/RE2 57 RE10
Legend: RPN and RPin represent remappable pins for Peripheral Pin Select (PPS) functions. Notes:1. A pull-up resistor is connected to this pin when device is erased (JTAG enabled) and during programming.2. This pin is toggled during programming.
18 OA1IN-/ANA1/RA1 58 TDO/AN2/AN30/CMP3A/RP39/SDA3/RB7
19 AN23/ANN3/RE3 59 RE11
20 OA1IN+/AN9/PMA6/RA2 60 PGD1/AN10/CMP6A/RP40/SCL1/RB8
21 DACOUT1/AN3/AN31/CMP1C/RA3 61 PGC1/AN11/CMP5A/RP41/SDA1/RB9
22 RE4 62 RE12
23 OA3OUT/AN4/ANB1/ANB2/CMP3B/IBIAS3/RA4 63 RP52/PWM5H/ASDA2/RC4
24 RE5 64 RE13
25 AVDD65RP53/PWM5L/ASCL2/PMWR/PMENB/PSWR/RC5
26AVss66RP58/PWM7H/PMRD/PMWR/PSRD/RC10
27 RP76/RD12 67RP59/PWM7L/RC11
28OA3IN-/AN13/CMP1B/ISRC0/RP49/PMA7/RC168RP68/ASDA3/RD4
29OA3IN+/AN14/CMP2B/ISRC1/RP50/PMD13/PMA13/RC269RP67/ASCL3/RD3
30AN17/ANN1/CMP4B/IBIAS1/RP54/PMD12/PMA12/RC670Vss
31VDD71VDD
32Vss72RP66/RD2
33AN15/ANN2/CMP2A/IBIAS2/RP51/PMD11/PMA11/RC373RP65/PWM4H/RD1
34OSCI/CLKI/AN5/RP32/PMD10/PMA10/RBO74RP64/PWM4L/PMD0/RDO
35OSCO/CLKO/AN6/RP33/PMA1/PMALH/PSA1/RB1(2)75TMS/RP42/PWM3H/PMD1/RB10(1)
36AN19/ANB0/CMP2C/RP75/PMA0/PMALL/PSA0/RD1176TCK/RP43/PWM3L/PMD2/RB11
37 RE6 77 RE14
38AN18/ANC2/CMP3C/ISRC3/RP74/PMD9/PMA9/RD1078TDI/RP44/PWM2H/PMD3/RB12
39 RE7 79 RE15
40DACOUT2/AN16/CMP4C/ISRC2/RP55/PMD8/PMA8/RC780RP45/PWM2L/PMD4/RB13
Legend: RPN and RPin represent remappable pins for Peripheral Pin Select (PPS) functions. Notes: A pull-up resistor is connected to this pin when device is erased (JTAG enabled) and during programming. This pin is toggled during programming.

Pin Diagrams (Continued)

Figure 4. 100-Pin TQFP ^(1)
Microchip dsPIC33CK1024MP708 - Pin Diagrams (Continued) - 1

other | Pin | Value | |-----|-------| | RB13 | 100 | | RA8 | 99 | | RE15 | 98 | | RB12 | 97 | | RA7 | 96 | | RA6 | 95 | | RE14 | 94 | | RB11 | 93 | | RB10 | 92 | | RD0 | 91 | | RD1 | 90 | | RD2 | 89 | | VDD | 88 | | VSS | 87 | | RD3 | 86 | | RD4 | 85 | | RC11 | 84 | | RC10 | 83 | | RC5 | 82 | | RE13 | 81 | | RC4 | 80 | | RA5 | 79 | | RE12 | 78 | | RB9 | 77 | | RF15 | 76 | | RB14 | 1 | | RE0 | 2 | | RB15 | 3 | | RE1 | 4 | | RF0 | 5 | | RC12 | 6 | | RC13 | 7 | | RC14 | 8 | | RC15 | 9 | | MCLR | 10 | | RD15 | 11 | | RF1 | 12 | | Vss | 13 | | VDD | 14 | | RD14 | 15 | | RD13 | 16 | | RC0 | 17 | | RA0 | 18 | | RE2 | 19 | | RF2 | 20 | | RA1 | 21 | | RE3 | 22 | | RF3 | 23 | | RA2 | 24 | | RF4 | 25 | | RF5 | 26 | | RA3 | 27 | | RE4 | 28 | | RF6 | 29 | | RA4 | 30 | | RE5 | 31 | | RF7 | 32 | | AVdd | 33 | | AVss | 34 | | RD12 | 35 | | RC1 | 36 | | RC2 | 37 | | RC6 | 38 | | VDD | 39 | | Vss | 40 | | RC3 | 41 | | RB0 | 42 | | RB1 | 43 | | RD11 | 44 | | RE6 | 45 | | RF8 | 46 | | RD10 | 47 | | RE7 | 48 | | RF9 | 49 | | RB2 | 50 | dsPIC33CKXXXXMP710 dsPIC33CKXXXXMP410

Note:

  1. Shaded pins are up to 5.5 V DC tolerant.

Table 6. 100-Pin TQFP

Pin # FunctionPin # Function
1 RP46/PWM1H/PMD5/RB14 51 OA2OUT/AN1/AN7/ANA0/ANA2/ANA3/CMP1D/CMP2D/CMP3D/CMP4D/CMP5D/CMP6D/RP34/SCL3/INT0/RB2
2 AN20/ANCO/CMP5C/RE0 52 RE8
3 RP47/PWM1L/PMD6/RB15 53 RP90/RF10
4 AN21/ANC1/CMP6B/RE1 54 PGD2/OA2IN-/AN8/CMP4A/RP35/RB3
5 RP80/RF0 55 RE9
6 RP60/PWM8H/PMD7/RC12 56 RP91/RF11
Legend: RPN and RPin represent remappable pins for Peripheral Pin Select (PPS) functions. Notes:1. A pull-up resistor is connected to this pin during programming.2. This pin is toggled during programming.
Pin # Function Pin # Function
7 RP61/PWM8L/PMA5/RC13 57 PGC2/OA2IN+/RP36/RB4
8 RP62/PWM6H/PMA4/RC14 58 RP56/ASDA1/SCK2/RC8
9 RP63/PWM6L/PMA3/RC15 59 RP57/ASCL1/SDI2/RC9
10 MCLR 60 RP92/RF12
11 RP79/PCI22/PMA2/RD15 61 RP73/PCI20/RD9
12 RP81/RF1 62 RP72/SDO2/PCI19/RD8
13 V_SS 63 V_SS
14 V_DD 64 V_DD
15 RP78/PCI21/RD14 65 RP71/PMD15/RD7
16 ANN4/CMP5B/RP77/RD13 66 RP70/PMD14/RD6
17 AN12/ANN0/RP48/RC0 67 RP69/PMA15/PMCS2/RD5
18OA1OUT/AN0/CMP1A/IBIAS0/RA068PGD3/RP37/SDA2/PMA14/PMCS1/PSCS/RB5
19 AN22/ANB3/CMP6C/RE269 PGC3/RP38/SCL2/RB6
20 RP82/RF2 70 RE10
21 OA1IN-/ANA1/RA171 RP93/APWM4H/RF13
22 AN23/ANN3/RE372 TDO/AN2/AN30/CMP3A/RP39/SDA3/RB7
23 RP83/RF3 73 APWM4L/RE11
24OA1IN+/AN9/PMA6/RA274RP94/APWM3H/RF14
25 RP84/RF4 75 PGD1/AN10/CMP6A/RP40/SCL1/RB8
26 RP85/RF5 76 RP95/APWM3L/RF15
27 DACOUT1/AN3/AN31/CMP1C/RA377 PGC1/AN11/CMP5A/RP41/SDA1/RB9
28 RE478 APWM2H/RE12
29 AN24/RP86/RF679 RP96/APWM2L/RA5
30OA3OUT/AN4/ANB1/ANB2/CMP3B/IBIAS3/RA480RP52/PWM5H/ASDA2/RC4
31 RE581 RE13
32AN25/RP87/RF782RP53/PWM5L/ASCL2/PMWR/PMENB/PSWR/RC5
33 AVDD83 RP58/PWM7H/PMRD/PMWR/PSRD/RC10
34 AVss84 RP59/PWM7L/RC11
35 RP76/RD1285 RP68/ASDA3/RD4
36OA3IN-/AN13/CMP1B/ISRC0/RP49/PMA7/RC186RP67/ASCL3/RD3
37 OA3IN+/AN14/CMP2B/ISRC1/RP50/PMD13/PMA13/RC287 V_SS
38 AN17/ANN1/CMP4B/IBIAS1/RP54/PMD12/PMA12/RC688 V_DD
39 V_DD 89 RP66/RD2
40 V_SS 90 RP65/PWM4H/RD1
41 AN15/ANN2/CMP2A/IBIAS2/RP51/PMD11/PMA11/RC391 RP64/PWM4L/PMD0/RD0
42OSCI/CLKI/AN5/RP32/PMD10/PMA10/RB092TMS/RP42/PWM3H/PMD1/RB10 (1)
43 OSCO/CLKO/AN6/RP33/PMA1/PMALH/PSA1/RB1(2)93 TCK/RP43/PWM3L/PMD2/RB11

Legend: RPn and RPIn represent remappable pins for Peripheral Pin Select (PPS) functions.

Notes:

  1. A pull-up resistor is connected to this pin during programming.
  2. This pin is toggled during programming.
Pin # Function Pin # Function
44 AN19/ANB0/CMP2C/RP75/PMA0/PMALL/PSA0/RD1194 RE14
45 RE6 95 RP97/APWM1H/RA6
46 AN26/RP88/RF8 96 RP98/APWM1L/RA7
47 AN18/ANC2/CMP3C/ISRC3/RP74/PMD9/PMA9/RD1097 TDI/RP44/PWM2H/PMD3/RB12
48 RE7 98 RE15
49 RP89/RF9 99 RP99/RA8
50 DACOUT2/AN16/CMP4C/ISRC2/RP55/PMD8/PMA8/RC7100 RP45/PWM2L/PMD4/RB13
Legend: RPN and RPin represent remappable pins for Peripheral Pin Select (PPS) functions. Notes:1. A pull-up resistor is connected to this pin during programming.2. This pin is toggled during programming.

To Our Valued Customers

It is our intention to provide our valued customers with the best documentation possible to ensure successful use of your Microchip products. To this end, we will continue to improve our publications to better suit your needs. Our publications will be refined and enhanced as new volumes and updates are introduced.

If you have any questions or comments regarding this publication, please contact the Marketing Communications Department via E-mail at docerrors@microchip.com. We welcome your feedback.

Most Current Data Sheet

To obtain the most up-to-date version of this data sheet, please register at our Worldwide Website at:

www.microchip.com/

You can determine the version of a data sheet by examining its literature number found on the bottom outside corner of any page. The last character of the literature number is the version number, (e.g., DS30000000A is version A of document DS30000000).

Errata

An errata sheet, describing minor operational differences from the data sheet and recommended workarounds, may exist for current devices. As device/documentation issues become known to us, we will publish an errata sheet. The errata will specify the revision of silicon and revision of document to which it applies.

To determine if an errata sheet exists for a particular device, please check with one of the following:

- Microchip's Worldwide Website: www.microchip.com/

- Your local Microchip sales office (see last page)

When contacting a sales office, please specify which device, revision of silicon and data sheet (include literature number) you are using.

Customer Notification System

Register on our website at www.microchip.com/ to receive the most current information on all of our products.

Referenced Sources

This device data sheet is based on the following individual chapters of the "dsPIC33/PIC24 Family Reference Manual". These documents should be considered as the general reference for the operation of a particular module or device feature.

Note: To access the documents listed below, browse to the documentation section of the dsPIC33CK1024MP710 product page of the Microchip website (www.microchip.com) or select a family reference manual section from the following list. In addition to parameters, features and other documentation, the resulting page provides links to the related family reference manual sections.

  • "Introduction" (www.microchip.com/DS70573)
  • "Enhanced CPU" (www.microchip.com/DS70005158)
  • "dsPIC33/PIC24 Program Memory" (www.microchip.com/DS70000613)
  • "Data Memory" (www.microchip.com/DS70595)
  • "Dual Partition Flash Program Memory" (www.microchip.com/DS70005156)
  • "Flash Programming" (www.microchip.com/DS70000609)
  • "Reset" (www.microchip.com/DS70602)
  • "Interrupts" (www.microchip.com/DS70000600)
  • "I/O Ports with Edge Detect" (www.microchip.com/DS70005322)
  • "Oscillator Module with High-Speed PLL" (www.microchip.com/DS70005255)
  • "Direct Memory Access Controller (DMA)" (www.microchip.com/DS30009742)
  • "CAN Flexible Data-Rate (FD) Protocol Module" (www.microchip.com/DS70005340)
  • "High-Resolution PWM with Fine Edge Placement" (www.microchip.com/DS70005320)
  • "12-Bit High-Speed, Multiple SARs A/D Converter (ADC)" (www.microchip.com/DS70005213)
  • "Quadrature Encoder Interface (QEI)" (www.microchip.com/DS70000601)
  • "Inter-Integrated Circuit (I ^2 C)" (www.microchip.com/DS70000195)
  • "Single-Edge Nibble Transmission (SENT) Module" (www.microchip.com/DS70005145)
    • "Timer1 Module" (www.microchip.com/DS70005279)
  • "Capture/Compare/PWM/Timer (MCCP and SCCP)" (www.microchip.com/DS30003035)
  • "Configurable Logic Cell (CLC)" (www.microchip.com/DS70005298)
  • "Peripheral Trigger Generator (PTG)" (www.microchip.com/DS70000669)
  • "32-Bit Programmable Cyclic Redundancy Check (CRC)" (www.microchip.com/DS30009729)
  • "Current Bias Generator (CBG)" (www.microchip.com/DS70005253)
  • "Deadman Timer" (www.microchip.com/DS70005155)
  • "Watchdog Timer and Power-Saving Modes" (www.microchip.com/DS70615)
  • "CodeGuard™ Intermediate Security" (www.microchip.com/DS70005182)
  • "Dual Watchdog Timer (DMT)" (www.microchip.com/DS70005250)
  • "Programming and Diagnostics" (www.microchip.com/DS70608)

- "High-Speed Analog Comparator with Slope Compensation DAC" (www.microchip.com/DS70005280)

- "Multiprotocol Universal Asynchronous Receiver Transmitter (UART) Module" (www.microchip.com/DS70005288)

- "Serial Peripheral Interface (SPI) with Audio Codec Support" (www.microchip.com/DS70005136)

Table of Contents

Operating Conditions....1

Core: dsPIC33CK CPU....1

Clock Management....1

Power Management....1

High-Resolution PWM with Fine Edge Placement....2

Timers/Output Compare/Input Capture....2

Advanced Analog Features....2

Communication Interfaces....3

Direct Memory Access (DMA)....3

Peripheral Features....3

Debugger Development Support.... 3

Safety Features....3

Functional Safety Support – ISO 26262/IEC 61508/IEC 60730....4

Qualification Support....4

dsPIC33CK1024MP710 Product Families.... 4

Pin Diagrams....7

Pin Diagrams (Continued)....9

Pin Diagrams (Continued).... 10

Pin Diagrams (Continued).... 13

To Our Valued Customers....16

Referenced Sources....17

  1. Device Overview.... 23

  2. Guidelines for Getting Started with Digital Signal Controllers....29

2.1. Basic Connection Requirements....29

2.2. Decoupling Capacitors....29

2.3. Master Clear (MCLR) Pin.... 30

2.7. Oscillator Value Conditions on Device Start-up....32

2.8. Unused I/Os.... 33

2.9. Bulk Capacitors....33

2.10. Targeted Applications....33

3. CPU....37

3.1. Registers....37
3.2. Instruction Set.... 37
3.3. Data Space Addressing.... 37
3.4. Addressing Modes....37
3.5. CPU Control/Status Registers....43
3.6. Arithmetic Logic Unit (ALU)....77
3.7. DSP Engine.... 78

4. Memory Organization....80

4.1. Program Address Space....80
4.2. Data Address Space....83
4.3. BIST Overview 85
4.4. Memory Resources....87

5. Flash Program Memory....98

5.1. Table Instructions and Flash Programming....98
5.2. RTSP Operation....99
5.3. Error Correcting Code (ECC).... 101
5.4. ECC Fault Injection.... 101
5.5. Flash OTP by ICSP ^TM Write Inhibit....101
5.6. Dual Partition Flash Configuration.... 102
5.7. NVM/ECC Control Registers.... 105

6. Resets....119

6.1. Reset Resources.... 120

7. Interrupt Controller....123

7.1. Interrupt Vector Table.... 123
7.2. Alternate Interrupt Vector Table.... 124
7.3. Reset Sequence....126
7.4. Interrupt Resources....132
7.5. Interrupt Control and Status Registers....132
7.6. Status/Control Registers....133
7.7. Status/Control Registers....134

8. I/O Ports 285

8.1. Parallel I/O (PIO) Ports 285
8.2. Configuring Analog and Digital Port Pins....287
8.3. Input Change Notification (ICN).... 302
8.4. Peripheral Pin Select (PPS) 303
8.5. Considerations for Peripheral Pin Selection....304
8.6. Input Mapping....304
8.7. Virtual Connections....308
8.8. Output Mapping....310
8.9. Mapping Limitations.... 311
8.10. I/O Helpful Tips.... 314
8.11. I/O Ports Resources....316
8.12. Peripheral Pin Select Control Registers.... 318

9. Oscillator with High-Frequency PLL 402

9.1. Primary PLL....403
9.2. Auxiliary PLL.... 406
9.3. CPU Clocking.... 408
9.4. Primary Oscillator (POSC) 409
9.5. Internal Fast RC (FRC) Oscillator....410
9.6. Low-Power RC Oscillator 410
9.7. Backup Internal Fast RC (BFRC) Oscillator 410
9.8. Reference Clock Output 410
9.9. Oscillator Configuration.... 411
9.10. OSCCON Unlock Sequence....412
9.11. Oscillator Control Registers....413

10. Direct Memory Access (DMA) Controller 429

10.1. Summary of DMA Operations.... 430
10.2. Typical Setup....433

11. Controller Area Network Flexible Data-Rate (CAN FD) Modules....449

11.1. Features....449
11.2. CAN Control/Status Registers....452

12. High-Resolution PWM with Fine Edge Placement....541

12.1. Features....541
12.2. Architecture Overview.... 542
12.3. Lock and Write Restrictions....543
12.4. PWM4H/L Output on Peripheral Pin Select.... 543
12.5. PWM Control/Status Registers....543
12.6. Control Registers.... 544

13. High-Speed, 12-Bit Analog-to-Digital Converter....643

13.1. ADC Features Overview....643
13.2. Temperature Sensor....645
13.3. Analog-to-Digital Converter Resources....645
13.4. ADC Control Registers....647

14. High-Speed Analog Comparator with Slope Compensation DAC....729

14.1. Overview....729
14.2. Features Overview....730
14.3. DAC Control Registers.... 731
14.4. DAC Control Registers.... 732

15. Quadrature Encoder Interface (QEI)....746

15.1. QEI Control/Status Registers....749

16. Universal Asynchronous Receiver Transmitter (UART)....778

16.1. Architectural Overview....778
16.2. Character Frame....779
16.3. Data Buffers....779
16.4. Protocol Extensions....779
16.5. UART Control/Status Registers....780

  1. Serial Peripheral Interface (SPI)....805

17.1. SPI Control/Status Registers....811

  1. Inter-Integrated Circuit (I ^2 C)....833

18.1. Communicating as a Host in a Single Host Environment....833

18.2. Setting Baud Rate When Operating as a Bus Main....834

18.3. Client Address Masking....835

18.4. SMBus Support....836

18.5. I2C Control/Status Registers....837

  1. Parallel Main Port (PMP) 850

19.1. Parallel Main Port Control Registers....852

  1. Single-Edge Nibble Transmission (SENT)....868

20.1. Transmit Mode 869

20.2. Receive Mode....870

20.3. SENT Control/Status Registers....872

  1. Timer1....882

21.1. Timer1 Control Register 883

  1. Capture/Compare/PWM/Timer Modules (SCCP)......888

22.1. Time Base Generator....889

22.2. General Purpose Timer....889

22.3. Output Compare Mode....890

22.4. Input Capture Mode....891

22.5. Auxiliary Output....893

22.6. SCCP Control/Status Registers....894

  1. Configurable Logic Cell (CLC)....918

23.1. CLC Control Registers.... 921

  1. Peripheral Trigger Generator (PTG)....931

24.1. Features....931

24.2. PTG Registers....933

24.3. PTG Step Commands....949

  1. 32-Bit Programmable Cyclic Redundancy Check (CRC) Generator....952

25.1. CRC Control Registers....953

  1. Current Bias Generator (CBG) 959

26.1. Current Bias Generator Control Registers....961

  1. Operational Amplifier....967

27.1. Operational Amplifier Control Registers.... 968

  1. Deadman Timer (DMT)....971

28.1. Deadman Timer Control/Status Registers....972

  1. Power-Saving Features.... 984

29.1. Clock Frequency and Clock Switching.... 984

29.2. Instruction-Based Power-Saving Modes....984

29.3. Doze Mode....986
29.4. Peripheral Module Disable....986
29.5. Power-Saving Resources....986
29.6. Power-Saving Control Registers....988

  1. Special Features.... 1001

30.1. Configuration Bits....1001
30.2. Configuration Registers.... 1003
30.3. Device Calibration and Identification....1026
30.4. User OTP Memory....1029
30.5. On-Chip Voltage Regulators.... 1029
30.6. Brown-out Reset (BOR)....1030
30.7. Dual Watchdog Timer (WDT).... 1031
30.8. JTAG Interface.... 1035
30.9. In-Circuit Debugger.... 1035
30.10. Code Protection and CodeGuard™ Security.... 1035

  1. Instruction Set Summary....1037
  2. Development Support....1050
  3. Electrical Characteristics.... 1051

33.1. DC Characteristics.... 1051
33.2. AC Characteristics and Timing Parameters....1063

  1. High-Temperature Electrical Characteristics.... 1092

34.1. DC Characteristics.... 1092

  1. Packaging Information.... 1101

35.1. Package Marking Information.... 1101
35.2. Package Marking Information (Continued).... 1102
35.3. Package Details....1103

  1. Revision History....1121

Microchip Information.... 1123

The Microchip Website.... 1123
Product Change Notification Service....1123
Customer Support....1123
Product Identification System.... 1124
Microchip Devices Code Protection Feature....1125
Legal Notice....1125
Trademarks....1125
Quality Management System....1126
Worldwide Sales and Service.... 1127

1. Device Overview

Notes:

  1. This data sheet summarizes the features of the dsPIC33CK1024MP710 family of devices. It is not intended to be a comprehensive resource. To complement the information in this data sheet, refer to the related section of the "dsPIC33/PIC24 Family Reference Manual", which is available from the Microchip website (www.microchip.com)
  2. Some registers and associated bits described in this section may not be available on all devices. Refer to 4. Memory Organization in this data sheet for device-specific register and bit information.

This document contains device-specific information for the dsPIC33CK1024MP710 Digital Signal Controller (DSC) devices.

dsPIC33CK1024MP710 devices contain extensive Digital Signal Processor (DSP) functionality with a high-performance, DSC architecture.

Figure 1-1 shows a general block diagram of the core and peripheral modules of the dsPIC33CK1024MP710 family.
Figure 1-1. dsPIC33CK1024MP710 Family Block Diagram ^(1)
Microchip dsPIC33CK1024MP708 - Notes: - 1

flowchart
graph TD
    CPU["CPU\nRefer to Figure 3-1 for CPU diagram details."] --> Timing_Generation["Timing Generation"]
    Timing_Generation --> OSC1_CKI["OSC1/CLKI"]
    Timing_Generation --> MCLR["MCLR"]
    Timing_Generation --> VDD_VSS["VDD, VSS\nAVDD, AVSS"]
    OSC1_CKI --> Timing_Generation
    MCLR --> Timing_Generation
    VDD_VSS --> Timing_Generation
    Timing_Generation <--> Oscillator_Start-up_Timer["Oscillator Start-up Timer"]
    Oscillator_Start-up_Timer --> POR_BOR["POR/BOR"]
    Oscillator_Start-up_Timer --> Watchdog_Timer["Watchdog Timer"]
    Por_BOR --> Oscillator_Start-up_Timer
    Watchdog_Timer --> Oscillator_Start-up_Timer
    Por_BOR --> PortA2["PORTA(2)"]
    Por_BOR --> PortB2["PORTB(2)"]
    Por_BOR --> PORTC2["PORTC(2)"]
    Por_BOR --> PORTD2["PORTD(2)"]
    Por_BOR --> PortE2["PORTE(2)"]
    Por_BOR --> Remppable_Pins3["Remppable Pins(3)"]

    subgraph Peripheral Modules
        PMP["PMP (1)"] --> OP_AMP_OP_AMP_(3)(4)
        CLC["CLC (4)"] --> OP_AMP_WDT_DMT
        QEI["QEI (3)"] --> OP_AMP_CRC_(1)
        SENT["SENT (2)"] --> OP_AMP_PTG_(1)
        CAN_FD_CAN_FD_(2) --> OP_AMP_HR_PWM_(12)
        ADC["ADC (5)"] --> OP_AMP_Timer1_
        DMA["DMA (8)"] --> OP_AMP_Timer1_
        MACP["MCCP (1)/SCCP (8)"] --> OP_AMP_Timer1_
        UART["I²C (3)"] --> OP_AMP_PPT1_
        OP_AMP_PPT1 --> OP_AMP_TRC1_
        WDT_DMT["WDT/DMT"] --> OP_AMP_TRC1_
        CRC_CRC1_CRC1
        PTG_PTG1_PTG1
        HR_PWM_HR_PWM1
        Timer1_Timer1
        DAC_CRC1_DAC_Comparator1
        SPI_I²S_SPI_I²S
        UART_UART1_UART1
        Remppable_Pins3["Remppable Pins(3)"]
    end

    %% Additional connections shown on the Peripheral Modules.

Notes:

  1. The numbers in the parentheses are the number of instantiations of the module indicated.
  2. Not all I/O pins or features are implemented on all device pinout configurations. See Table 1-1 for specific implementations by pin count.
  3. Some peripheral I/Os are only accessible through Peripheral Pin Select (PPS).

Table 1-1. Pinout I/O Descriptions

Pin Name^(1) Pin TypeBuffer TypePPS Description
ANO-AN26, AN30, AN31IAnalogNoAnalog input channels
ANA0-ANA3IAnalogNoAnalog alternate inputs
ANB0-ANB3IAnalogNoAnalog alternate “B” inputs
ANCO-ANC2IAnalogNoAnalog alternate “C” inputs
ANNO-ANN4IAnalogNoAnalog negative inputs
ADTRG31 | ST Yes ADC Trigger Input 31
CAN1RXISTYesCAN1 receive input
CAN1OYesCAN1 transmit output
CAN2RXISTYesCAN2 receive input
CAN2OYesCAN2 transmit output
CLKIIST/CMOSNoExternal Clock (EC) source input. Always associated with OSCI pin function.
CLKOONoOscillator crystal output. Connects to crystal or resonator in Crystal Oscillator mode. Optionally functions as CLKO in RC and EC modes. Always associated with OSCO pin function.
OSCIIST/CMOSNoOscillator crystal input. ST buffer when configured in RC mode; CMOS otherwise.
OSCOI/ONoOscillator crystal output. Connects to crystal or resonator in Crystal Oscillator mode. Optionally functions as CLKO in RC and EC modes.
REFOI | ST Yes Reference clock input
REFCLKO O — Yes Reference clock output
INT0ISTNoExternal Interrupt 0
INT1ISTYesExternal Interrupt 1
INT2ISTYesExternal Interrupt 2
INT3ISTYesExternal Interrupt 3
IOCA[4:0]ISTNoInterrupt-on-Change input for PORTA
IOCB[15:0]ISTNoInterrupt-on-Change input for PORTB
IOCC[15:0]ISTNoInterrupt-on-Change input for PORTC
IOCD[15:0]ISTNoInterrupt-on-Change input for PORTD
IOCE[15:0]ISTNoInterrupt-on-Change input for PORTE
IOCF[15:0]ISTNoInterrupt-on-Change input for PORTF
QEIA1ISTYesQEI Input A1
QEIB1ISTYesQEI Input B1
QEINDX1ISTYesQEI Index 1 input
QEIHOM1ISTYesQEI Home 1 input
QEICMPOYesQEI comparator output

Legend: CMOS = CMOS compatible input or output; Analog = Analog input; P = Power; ST = Schmitt Trigger input with CMOS levels; O = Output; I = Input;
PPS = Peripheral Pin Select; TTL = TTL input buffer

Notes:

  1. Not all pins are available in all package variants. See the Pin Diagrams section for pin availability.

  2. These pins are remappable as well as dedicated.

......continued

Pin Name^(1) Pin TypeBuffer TypePPS Description
QEIA2ISTYesQEI Input A2
QEIB2ISTYesQEI Input B2
QEINDX2ISTYesQEI Index 2 input
QEHOM2ISTYesQEI Home 2 input
QEICMPOYesQEI comparator output
QEIA3ISTYesQEI Input A3
QEIB3ISTYesQEI Input B3
QEINDX3ISTYesQEI Index 3 input
QEHOM3ISTYesQEI Home 3 input
QEICMPOYesQEI comparator output
RA0-RA4 I/O ST No PORTA is a bidirectional I/O port
RBO-RB15 I/O ST No PORTB is a bidirectional I/O port
RC0-RC15 I/O ST No PORTC is a bidirectional I/O port
RD0-RD15 I/O ST No PORTD is a bidirectional I/O port
RE0-RE15 I/O ST No PORTE is a bidirectional I/O port
RF0-RF15 I/O ST No PORTF is a bidirectional I/O port
T1CK I ST Yes Timer1 external clock input
U1CTSISTYesUART1 Clear-to-Send
U1RTSOYesUART1 Request-to-Send
U1RXISTYesUART1 receive
U1TXOYesUART1 transmit
U1DSRISTYesUART1 Data-Set-Ready
U1DTROYesUART1 Data-Terminal-Ready
U2CTSISTYesUART2 Clear-to-Send
U2RTSOYesUART2 Request-to-Send
U2RXISTYesUART2 receive
U2TXOYesUART2 transmit
U2DSRISTYesUART2 Data-Set-Ready
U2DTROYesUART2 Data-Terminal-Ready
U3CTSISTYesUART3 Clear-to-Send
U3RTSOYesUART3 Request-to-Send
U3RXISTYesUART3 receive
U3TXOYesUART3 transmit
U3DSRISTYesUART3 Data-Set-Ready
U3DTROYesUART3 Data-Terminal-Ready
SENT1ISTYesSENT1 input
SENT2ISTYesSENT2 input
SENT1OUTOYesSENT1 output
SENT2OUTOYesSENT2 output

Legend: CMOS = CMOS compatible input or output; Analog = Analog input; P = Power; ST = Schmitt Trigger input with CMOS levels; O = Output; I = Input;
PPS = Peripheral Pin Select; TTL = TTL input buffer

Notes:

  1. Not all pins are available in all package variants. See the Pin Diagrams section for pin availability.
  2. These pins are remappable as well as dedicated.

......continued

Pin Name^(1) Pin TypeBuffer TypePPS Description
PTGTRG24OYesPTG Trigger Output 24
PTGTRG25OYesPTG Trigger Output 25
TCKI1-TCKI9ISTYesSCCP/MCCP Timer Inputs 1 through 9
ICM1-ICM9ISTYesSCCP/MCCP Capture Inputs 1 through 9
OCFA-OCFDIYesSCCP/MCCP Fault Inputs A through D
OCM1-OCM9OYesSCCP/MCCP Compare Outputs 1 through 9
SCK1I/OSTYesSynchronous serial clock I/O for SPI1
SDI1ISTYesSPI1 data in
SDO1OYesSPI1 data out
SS1I/OSTYesSPI1 Client synchronization or frame pulse I/O
SCK2I/OSTYesSynchronous serial clock I/O for SPI2
SDI2ISTYesSPI2 data in
SDO2OYesSPI2 data out
SS2I/OSTYesSPI2 Client synchronization or frame pulse I/O
SCK3I/OSTYesSynchronous serial clock I/O for SPI3
SDI3ISTYesSPI3 data in
SDO3OYesSPI3 data out
SS3I/OSTYesSPI3 Client synchronization or frame pulse I/O
SCL1I/OSTNoSynchronous serial clock I/O for I2C1
SDA1I/OSTNoSynchronous serial data I/O for I2C1
ASCL1I/OSTNoAlternate synchronous serial clock I/O for I2C1
ASDA1I/OSTNoAlternate synchronous serial data I/O for I2C1
SCL2I/OSTNoSynchronous serial clock I/O for I2C2
SDA2I/OSTNoSynchronous serial data I/O for I2C2
ASCL2I/OSTNoAlternate synchronous serial clock I/O for I2C2
ASDA2I/OSTNoAlternate synchronous serial data I/O for I2C2
SCL3I/OSTNoSynchronous serial clock I/O for I2C3
SDA3I/OSTNoSynchronous serial data I/O for I2C3
ASCL3I/OSTNoAlternate synchronous serial clock I/O for I2C3
ASDA3I/OSTNoAlternate synchronous serial data I/O for I2C3
TMSISTNoJTAG Test mode select pin
TCKISTNoJTAG test clock input pin
TDIISTNoJTAG test data input pin
TDOONoJTAG test data output pin

Legend: CMOS = CMOS compatible input or output; Analog = Analog input; P = Power; ST = Schmitt Trigger input with CMOS levels; O = Output; I = Input; PPS = Peripheral Pin Select; TTL = TTL input buffer

Notes:

  1. Not all pins are available in all package variants. See the Pin Diagrams section for pin availability.

  2. These pins are remappable as well as dedicated.

......continued

Pin Name^(1) Pin TypeBuffer TypePPS Description
PCI8-PCI18ISTYesPWM Inputs 8 through 18
PCI19-PCI22ISTYesPWM Inputs 19 through 22
PWMEA-PWMEFOYesPWM Event Outputs A through F
PWM1L-PWM8L^(2) ONoPWM Low Outputs 1 through 8
PWM1H-PWM8H^(2) ONoPWM High Outputs 1 through 8
APWM1L-APWM4LONoAPWM Low Outputs 1 through 4
APWM1H-APWM4HONoAPWM High Outputs 1 through 4
CLCINA-CLCINDISTYesCLC Inputs A through D
CLC1OUT-CLC8OUTOYesCLC Outputs 1 through 8
CMP1OYesComparator 1 output
CMP1A-CMP3AIAnalogNoComparator Channels 1A through 3A inputs
CMP1B-CMP3BIAnalogNoComparator Channels 1B through 3B inputs
CMP1C-CMP3CIAnalogNoComparator Channels 1C through 3C inputs
CMP1D-CMP3DIAnalogNoComparator Channels 1D through 3D inputs
DACOUT1ONoDAC1 output voltage
DACOUT2ONoDAC2 output voltage
IBIAS3, IBIAS2, IBIAS1,IBIAS0/ISRC3, ISRC2,ISRC1, ISRC0O Analog No Constant-Current Outputs 0 through 3
OA1IN+INoOp Amp 1+ input
OA1IN-INoOp Amp 1- input
OA1OUTONoOp Amp 1 output
OA2IN+INoOp Amp 2+ input
OA2IN-INoOp Amp 2- input
OA2OUTONoOp Amp 2 output
OA3IN+INoOp Amp 3+ input
OA3IN-INoOp Amp 3- input
OA3OUTONoOp Amp 3 output

Legend: CMOS = CMOS compatible input or output; Analog = Analog input; P = Power; ST = Schmitt Trigger input with CMOS levels; O = Output; I = Input;
PPS = Peripheral Pin Select; TTL = TTL input buffer

Notes:

  1. Not all pins are available in all package variants. See the Pin Diagrams section for pin availability.
  2. These pins are remappable as well as dedicated.

......continued

Pin Name^(1) Pin TypeBuffer TypePPS Description
PGD1I/OSTNo Data I/O pin for Programming/Debugging Communication Channel 1
PGC1ISTNo Clock input pin for Programming/Debugging Communication Channel 1
PGD2I/OSTNo Data I/O pin for Programming/Debugging Communication Channel 2
PGC2ISTNo Clock input pin for Programming/Debugging Communication Channel 2
PGD3I/OSTNo Data I/O pin for Programming/Debugging Communication Channel 3
PGC3ISTNo Clock input pin for Programming/Debugging Communication Channel 3
MCLR I/P ST No Master Clear (Reset) input. This pin is anactive-low Reset to the device.
AV_DD P P No Positive supply for analog modules. This pin must be connected at all times.
AV_SS P P No Ground reference for analog modules. This pin must be connected at all times.
V_DD P — No Positive supply for peripheral logic and I/O pins
V_SS P — No Ground reference for logic and I/O pins
Legend: CMOS = CMOS compatible input or output; Analog = Analog input; P = Power; ST = Schmitt Trigger input with CMOS levels; O = Output; I = Input;PPS = Peripheral Pin Select; TTL = TTL input bufferNotes:Not all pins are available in all package variants. See the Pin Diagrams section for pin availability.These pins are remappable as well as dedicated.

2. Guidelines for Getting Started with Digital Signal Controllers

2.1 Basic Connection Requirements

Getting started with the family devices of the dsPIC33CK1024MP710 requires attention to a minimal set of device pin connections before proceeding with development. The following is a list of pin names which must always be connected:

  • All V DD and V SS pins (see 2.2. Decoupling Capacitors)
  • All AV DD and AV SS pins regardless if ADC module is not used (see 2.2. Decoupling Capacitors)
  • MCLR pin (see 2.3. Master Clear (MCLR) Pin)
  • PGCx/PGDx pins used for In-Circuit Serial Programming™ (ICSP™) and debugging purposes (see 2.4. ICSP Pins)
  • OSCI and OSCO pins when an external oscillator source is used (see 2.5. External Oscillator Pins)

2.2 Decoupling Capacitors

The use of decoupling capacitors on every pair of power supply pins, such as V_DD , V_SS , AV_DD and AV_SS is required.

Consider the following criteria when using decoupling capacitors:

  • Value and type of capacitor: Recommendation of 0.1 F (100 nF), 10-20V. This capacitor should be a low-ESR and have resonance frequency in the range of 20 MHz and higher. It is recommended to use ceramic capacitors.
  • Placement on the Printed Circuit Board: The decoupling capacitors should be placed as close to the pins as possible. It is recommended to place the capacitors on the same side of the board as the device. If space is constricted, the capacitor can be placed on another layer on the PCB using a via; however, ensure that the trace length from the pin to the capacitor is within one-quarter inch (6 mm) in length.
  • Handling high-frequency noise: If the board is experiencing high-frequency noise above tens of MHz, add a second ceramic-type capacitor in parallel to the above described decoupling capacitor. The value of the second capacitor can be in the range of 0.01 μF to 0.001 μF. Place this second capacitor next to the primary decoupling capacitor. In high-speed circuit designs, consider implementing a decade pair of capacitances as close to the power and ground pins as possible. For example, 0.1 μF in parallel with 0.001 μF.
  • Maximizing performance: On the board layout from the power supply circuit, run the power and return traces to the decoupling capacitors first, and then to the device pins. This ensures that the decoupling capacitors are first in the power chain. Equally important is to keep the trace length between the capacitor and the power pins to a minimum, thereby reducing PCB track inductance.

Figure 2-1. Recommended Minimum Connection
Microchip dsPIC33CK1024MP708 - Decoupling Capacitors - 1

text_image VDD R R1 MCLR C 0.1 μF Ceramic dsPIC33 VSS VDD AVDD AVSS VDD VSS 0.1 μF Ceramic 0.1 μF Ceramic 0.1 μF Ceramic L1(1)

Note 1: As an option, instead of a hard-wired connection, an inductor (L1) can be substituted between VDD and AVDD to improve ADC noise rejection. The inductor impedance should be less than 1 and the inductor capacity greater than 10mA .

Where:

$$ f = \frac {F C N V}{2} \quad (\text { i.e., ADC Conversion Rate } / 2) $$

$$ f = \frac {1}{(2 \pi \sqrt {L C})} $$

$$ L = \left(\frac {1}{(2 \pi f \sqrt {C})}\right) ^ {2} $$

2.3 Master Clear (MCLR) Pin

The MCLR pin provides two specific device functions:

  • Device Reset
    • Device Programming and Debugging

During device programming and debugging, the resistance and capacitance that can be added to the pin must be considered. Device programmers and debuggers drive the pin. Consequently, specific voltage levels ( V_IH and V_IL ) and fast signal transitions must not be adversely affected. Therefore, specific values of R and C will need to be adjusted based on the application and PCB requirements.

For example, as shown in Figure 2-2, it is recommended that the capacitor, C, be isolated from the MCLR pin during programming and debugging operations.

Place the components, as shown in Figure 2-2, within one-quarter inch (6 mm) from the MCLR pin.

Figure 2-2. Example of MCLR Pin Connections
Microchip dsPIC33CK1024MP708 - Master Clear (MCLR) Pin - 1

text_image VDD R(1) R1(2) MCLR JP C dsPIC33

Notes:

  1. R ≤ 10 k is recommended. A suggested starting value is 10 k . Ensure that the pin V_IH and V_IL specifications are met.
  2. R1 ≤ 470Ω will limit any current flowing into MCLR from the external capacitor, C, in the event of MCLR pin breakdown due to Electrostatic Discharge (ESD) or Electrical Overstress (EOS). Ensure that the MCLR pin V IH and V II specifications are met.

2.4 ICSP Pins

The PGCx and PGDx pins are used for ICSP and debugging purposes. It is recommended to keep the trace length between the ICSP connector and the ICSP pins on the device as short as possible. If the ICSP connector is expected to experience an ESD event, a series resistor is recommended, with the value in the range of a few tens of Ohms, not to exceed 100 Ohms.

Pull-up resistors, series diodes and capacitors on the PGCx and PGDx pins are not recommended as they will interfere with the programmer/debugger communications to the device. If such discrete components are an application requirement, they should be removed from the circuit during programming and debugging. Alternatively, refer to the AC/DC characteristics and timing requirements information in the respective device Flash programming specification for information on capacitive loading limits and pin Voltage Input High ( V_IH ) and Voltage Input Low ( V_IL ) requirements.

Ensure that the "Communication Channel Select" (i.e., PGCx/PGDx pins) programmed into the device matches the physical connections for the ICSP to PICkit™ 3, MPLAB ICD 3 or MPLAB REAL ICE™ emulator.

For more information on MPLAB ICD 2, MPLAB ICD 3 and REAL ICE emulator connection requirements, refer to the following documents that are available on the Microchip website.

  • "Using MPLAB ^® ICD 3 In-Circuit Debugger" (poster) (DS51765)
    • "Development Tools Design Advisory" (DS51764)
  • "MPLAB ^® REAL ICE ^TM In-Circuit Emulator User's Guide for MPLAB X IDE" (DS50002085)
  • "Using MPLAB ^* REAL ICE ^TM In-Circuit Emulator" (poster) (DS51749)

2.5 External Oscillator Pins

When the Primary Oscillator (POSC) circuit is used to connect a crystal oscillator, special care and consideration is needed to ensure proper operation. The POSC circuit should be tested across the environmental conditions that the end product is intended to be used. The load capacitors specified in the crystal oscillator data sheet can be used as a starting point, however, the parasitic capacitance from the PCB traces can affect the circuit, and the values may need to be altered to ensure proper start-up and operation. Excessive trace length and other physical interaction can lead to poor signal quality. Poorly tuned oscillator circuits can have reduced amplitude, incorrect frequency (runt pulses), distorted waveforms and long start-up times that may result in unpredictable application behavior, such as instruction misexecution, illegal opcode fetch, etc. Ensure that the crystal oscillator circuit is at full amplitude and the correct frequency before the system begins to execute code. In planning the application's routing and I/O assignments, ensure that adjacent port pins, and other signals in close proximity to the oscillator,

do not have high frequencies, short rise and fall times, and other similar noise. For further information on the Primary Oscillator, see 9.4. Primary Oscillator (POSC).

2.6 External Oscillator Layout Guidance

Use best practices during PCB layout to ensure robust start-up and operation. The oscillator circuit should be placed on the same side of the board as the device. Also, place the oscillator circuit close to the respective oscillator pins, not exceeding one-half inch (12 mm) distance between them. The load capacitors should be placed next to the oscillator itself, on the same side of the board. Use a grounded copper pour around the oscillator circuit to isolate them from surrounding circuits. The grounded copper pour should be routed directly to the MCU ground. Do not run any signal traces or power traces inside the ground pour. If using a two-sided board, avoid any traces on the other side of the board where the crystal is placed. A suggested layouts are shown in Figure 2-3. With fine-pitch packages, it is not always possible to completely surround the pins and components. A suitable solution is to tie the broken guard sections to a mirrored ground layer. In all cases, the guard trace(s) must be returned to ground.

For additional information and design guidance on oscillator circuits, please refer to these Microchip Application Notes, available at the Microchip website (www.microchip.com):

• AN943, "Practical PICmicro ° Oscillator Analysis and Design"
• AN949, "Making Your Oscillator Work"
• AN1798, "Crystal Selection for Low-Power Secondary Oscillator

Figure 2-3. Suggested Placement of the Oscillator Circuit
Single-Sided and In-Line Layouts:
Microchip dsPIC33CK1024MP708 - External Oscillator Layout Guidance - 1

text_image Copper Pour (tied to ground) Primary Oscillator Crystal DEVICE PINS Primary Oscillator C1 C2 OSCI OSCO GND

Fine-Pitch (Dual-Sided) Layouts:
Microchip dsPIC33CK1024MP708 - External Oscillator Layout Guidance - 2

text_image Top Layer Copper Pour (tied to ground) Bottom Layer Copper Pour (tied to ground) OSCO GND OSCI C2 Oscillator Crystal C1

DEVICE PINS

2.7 Oscillator Value Conditions on Device Start-up

If the PLL of the target device is enabled and configured for the device start-up oscillator, the maximum oscillator source frequency must be limited to a certain frequency (see 9. Oscillator with High-Frequency PLL) to comply with device PLL Start-up conditions. This means that if the external oscillator frequency is outside this range, the application must start up in the FRC mode first. The default PLL settings after a POR with an oscillator frequency outside this range will violate the device operating speed.

Once the device powers up, the application firmware can initialize the PLL SFRs, CLKDIV and PLLFBD, to a suitable value, and then perform a clock switch to the Oscillator + PLL clock source. Note that clock switching must be enabled in the device Configuration Word.

2.8 Unused I/Os

Unused I/O pins should be configured as outputs and driven to a Logic Low state.

Alternatively, connect a 1k to 10k resistor between V_SS and unused pins, and drive the output to logic low.

2.9 Bulk Capacitors

On boards with power traces running longer than six inches in length, it is suggested to use a bulk capacitor for integrated circuits, including DSCs, to supply a local power source. The value of the bulk capacitor should be determined based on the trace resistance that connects the power supply source to the device and the maximum current drawn by the device in the application. In other words, select the bulk capacitor so that it meets the acceptable voltage sag at the device. Typical values range from 4.7 F to 47 F.

2.10 Targeted Applications

• Power Factor Correction (PFC):

  • Interleaved PFC
    – Critical Conduction PFC
  • Bridgeless PFC

- DC/DC Converters:

– Buck, Boost, Forward, Flyback, Push-Pull
- Half/Full-Bridge
- Phase-Shift Full-Bridge
- Resonant Converters

- DC/AC:

  • Half/Full-Bridge Inverter
  • Resonant Inverter

- Motor Control:

  • BLDC
  • PMSM
  • SR
  • ACIM

Examples of typical application connections are shown in Figure 2-4 through Figure 2-6.

Figure 2-4. Interleaved PFC
Microchip dsPIC33CK1024MP708 - Targeted Applications - 1

flowchart
graph TD
    A["|VAC|"] --> B["VAC"]
    B --> C["ΔC"]
    C --> D["k1"]
    C --> E["k2"]
    D --> F["FC"]
    E --> G["FC"]
    F --> H["FET Driver"]
    G --> I["FET Driver"]
    H --> J["PGA/ADC Channel"]
    I --> K["PGA/ADC Channel"]
    J --> L["dsPIC33CK1024MP710"]
    K --> L
    L --> M["ADC Channel"]
    N["VOUT+"] --> O["Output"]
    P["VOUT-"] --> Q["Feedback to FET Driver"]
    R["VAC"] --> S["~"]
    T["VOUT+"] --> U["Output"]

Figure 2-5. Phase-Shifted Full-Bridge Converter
Microchip dsPIC33CK1024MP708 - Targeted Applications - 2

flowchart
graph TD
    subgraph Inputs
        A["Gate 1"] --> B["S1"]
        C["Gate 2"] --> D["S1"]
        E["Gate 2"] --> F["S1"]
        G["Gate 2"] --> H["S1"]
    end

    subgraph Outputs
        I["Gate 3"] --> J["S3"]
        K["Gate 4"] --> L["S3"]
        M["Gate 4"] --> N["S3"]
        O["Gate 5"] --> P["S3"]
        Q["Gate 6"] --> R["S3"]
    end

    S["Analog Ground"] --> T["FET Driver"]
    U["PWM"] --> V["PGA/ADC Channel"]
    W["PWM"] --> X["ADC Channel"]
    Y["k1"] --> Z["FET Driver"]
    AA["k2"] --> AB["FET Driver"]
    AC["VOUT+"] --> AD["Gate 6"]
    AE["VOUT-"] --> AF["Gate 6"]
    AG["VIN+"] --> AH["Gate 6"]
    AI["VIN-"] --> AJ["Gate 6"]
    AK["dsPIC33CK1024MP710"] --> AL["PWM"]
    AL --> AM["FET Driver"]
    AN["FET Driver"] --> AO["Gate 3"]
    AP["FET Driver"] --> AQ["Gate 4"]
    AR["FET Driver"] --> AS["Gate 5"]
    AT["Gate 5"] --> AU["FET Driver"]
    AV["Gate 6"] --> AW["FET Driver"]
    AX["Gate 6"] --> AY["FET Driver"]

Figure 2-6. Off-Line UPS
Microchip dsPIC33CK1024MP708 - Targeted Applications - 3

flowchart
graph TD
    subgraph Push-Pull Converter
        VBAT --> A["Transformer"]
        GND --> B["Analog Comp."]
        A --> C["FET Driver"]
        A --> D["FET Driver"]
        A --> E["k2"]
        A --> F["k1"]
        B --> G["PWM"]
        B --> H["PWM"]
        B --> I["PGA/ADC or Analog Comp."]
        I --> J["ADC"]
        J --> K["dsPIC33CK1024MP710"]
    end

    subgraph Full-Bridge Inverter
        VDC --> L["Inverter"]
        GND --> M["Inverter"]
        L --> N["FET Driver"]
        L --> O["FET Driver"]
        L --> P["FET Driver"]
        L --> Q["FET Driver"]
        L --> R["k4"]
        L --> S["k5"]
    end

    subgraph Battery Charger
        K --> T["ADC"]
        T --> U["PWM"]
        U --> V["+"]
        V --> W["ACD"]
        W --> X["Ground"]
    end

    style Push-Pull Converter fill:#f9f,stroke:#333
    style Full-Bridge Inverter fill:#ccf,stroke:#333
    style Battery Charger fill:#dfd,stroke:#333

3. CPU

Note: This data sheet summarizes the features of the dsPIC33CK1024MP710 family of devices. It is not intended to be a comprehensive reference source. To complement the information in this data sheet, refer to "Enhanced CPU" (www.microchip.com/DS70005158).

The dsPIC33CK1024MP710 family CPU has a (data) modified Harvard architecture with an enhanced instruction set, including significant support for Digital Signal Processing (DSP). The CPU has a 24-bit instruction word with a variable length opcode field. The Program Counter (PC) is 23 bits wide and addresses up to 4M x 24 bits of user program memory space.

An instruction prefetch mechanism helps maintain throughput and provides predictable execution. Most instructions execute in a single-cycle effective execution rate, with the exception of instructions that change the program flow, the double-word move (MOV.D) instruction, PSV accesses and the table instructions. Overhead-free program loop constructs are supported using the DO and REPEAT instructions, both of which are interruptible at any point.

3.1 Registers

The dsPIC33CK1024MP710 devices have sixteen, 16-bit Working registers in the programmer's model. Each of the Working registers can act as a Data, Address or Address Offset register. The 16th Working register (W15) operates as a Software Stack Pointer (SSP) for interrupts and calls.

In addition, the dsPIC33CK1024MP710 devices include four Alternate Working register sets, which consist of W0 through W14. The Alternate Working registers can be made persistent to help reduce the saving and restoring of register content during Interrupt Service Routines (ISRs). The Alternate Working registers can be assigned to a specific Interrupt Priority Level (IPL1 through IPL6) by configuring the CTXTx[2:0] bits in the FALTREG Configuration register. The Alternate Working registers can also be accessed manually by using the CTXTSWP instruction. The CCTXI[2:0] and MCTXI[2:0] bits in the CTXTSTAT register can be used to identify the current, and most recent, manually selected Working register sets.

3.2 Instruction Set

The instruction set for dsPIC33CK1024MP710 devices has two classes of instructions: the MCU class of instructions and the DSP class of instructions. These two instruction classes are seamlessly integrated into the architecture and execute from a single execution unit. The instruction set includes many addressing modes and was designed for optimum C compiler efficiency.

Refer to the 31. Instruction Set Summary for more information.

3.3 Data Space Addressing

The base Data Space can be addressed up to 4K words or 8 Kbytes, and is split into two blocks, referred to as X and Y data memory. Each memory block has its own independent Address Generation Unit (AGU). The MCU class of instructions operates solely through the X memory AGU, which accesses the entire memory map as one linear Data Space. Certain DSP instructions operate through the X and Y AGUs to support dual operand reads, which splits the data address space into two parts. The X and Y Data Space boundary is device-specific.

The upper 32 Kbytes of the Data Space memory map can optionally be mapped into Program Space (PS) at any 16K program word boundary. The program-to-Data Space mapping feature, known as Program Space Visibility (PSV), lets any instruction access Program Space as if it were Data Space. Refer to "Data Memory" (www.microchip.com/DS70595) for more details on PSV and table accesses.

On dsPIC33CK1024MP710 family devices, overhead-free circular buffers (Modulo Addressing) are supported in both X and Y address spaces. The Modulo Addressing removes the software boundary checking overhead for DSP algorithms. The X AGU Circular Addressing can be used with any of the MCU class of instructions. The X AGU also supports Bit-Reversed Addressing to greatly simplify input or output data re-ordering for radix-2 FFT algorithms.

3.4 Addressing Modes

The CPU supports these addressing modes:

  • Inherent (no operand)
  • Relative
  • Literal
  • Memory Direct
  • Register Direct
  • Register Indirect

Each instruction is associated with a predefined addressing mode group, depending upon its functional requirements. As many as six addressing modes are supported for each instruction.

Figure 3-1. dsPIC33CK1024MP710 Family CPU Block Diagram
Microchip dsPIC33CK1024MP708 - Addressing Modes - 1

flowchart
graph TD
    A["X Address Bus"] --> B["Interrupt Controller"]
    A --> C["PSV and Table Data Access Control Block"]
    A --> D["Address Latch"]
    A --> E["Program Memory"]
    A --> F["Data Latch"]
    B --> G["24"]
    C --> H["8"]
    D --> I["16"]
    E --> J["16"]
    F --> K["16"]
    G --> L["PCU PCH PCL Program Counter"]
    H --> M["Stack Control Logic Loop Control Logic"]
    I --> N["Y AGU"]
    J --> O["Y Data RAM"]
    K --> P["Y Data Latch"]
    L --> Q["16"]
    M --> R["X RAGU X WAGU"]
    N --> S["16"]
    O --> T["16"]
    P --> U["16"]
    Q --> V["16"]
    R --> W["EA MUX"]
    S --> X["Literal Data"]
    T --> Y["16-Bit Working Register Arrays"]
    U --> Z["DSP Engine"]
    V --> AA["Divide Support"]
    W --> AB["16-Bit ALU"]
    X --> AC["Ports"]
    Y --> AD["Peripheral Modules"]
    Z --> AE["16"]
    AA --> AF["16"]
    AB --> AG["Control Signals to Various Blocks"]
    AC --> AH["Power, Reset and Oscillator Modules"]
    AD --> AI["16"]
    AE --> AJ["16"]
    AF --> AK["16"]
    AG --> AL["16"]
    AH --> AM["16"]
    AI --> AN["16"]
    AJ --> AO["16"]
    AK --> AP["16"]
    AL --> AQ["16"]
    AM --> AR["16"]
    AN --> AS["16"]
    AO --> AT["16"]
    AP --> AU["16"]
    AQ --> AV["16"]
    AR --> AW["16"]
    AS --> AX["16"]
    AT --> AY["16"]
    AU --> AZ["16"]
    AV --> BA["16"]
    AW --> BB["16"]

3.4.1 Programmer's Model

The programmer's model for the dsPIC33CK1024MP710 family is shown in Figure 3-2. All registers in the programmer's model are memory-mapped and can be manipulated directly by instructions. Table 3-1 lists a description of each register.

In addition to the registers contained in the programmer's model, the dsPIC33CK1024MP710 devices contain control registers for Modulo Addressing, Bit-Reversed Addressing and interrupts. These registers are described in subsequent sections of this document.

All registers associated with the programmer's model are memory-mapped, as shown in Figure 3-2.

Table 3-1. Programmer's Model Register Descriptions

Register(s) Name Description
W0 through W15(1)Working Register Array
W0 through W14(1)Alternate Working Register Array 1
W0 through W14(1)Alternate Working Register Array 2
W0 through W14(1)Alternate Working Register Array 3
W0 through W14(1)Alternate Working Register Array 4
ACCA, ACCB 40-Bit DSP Accumulators (Additional 4 Alternate Accumulators)
PC 23-Bit Program Counter
SR ALU and DSP Engine STATUS Register
SPLIM Stack Pointer Limit Value Register
TBLPAG Table Memory Page Address Register
DSRPAG Extended Data Space (EDS) Read Page Register
RCOUNT REPEAT Loop Counter Register
DCOUNT DO Loop Counter Register
DOSTARTH, DOSTARTL(2)DO Loop Start Address Register (High and Low)
DOENDH, DOENDL DO Loop End Address Register (High and Low)
CORCON Contains DSP Engine, DO Loop Control and Trap Status bits
Notes:1. Memory-mapped W0 through W14 represent the value of the register in the currently active CPU context.2. The DOSTARTH and DOSTARTL registers are read-only.

Figure 3-2. Programmer's Model
Microchip dsPIC33CK1024MP708 - Programmer's Model - 1

flowchart
graph TD
    A["Working/Address Registers"] --> B["DSP Operand Registers"]
    A --> C["DSP Address Registers"]
    B --> D["W0-W3"]
    B --> E["W0 (WREG)"]
    B --> F["W1"]
    B --> G["W2"]
    B --> H["W3"]
    B --> I["W4"]
    B --> J["W5"]
    B --> K["W6"]
    B --> L["W7"]
    B --> M["W8"]
    B --> N["W9"]
    B --> O["W10"]
    B --> P["W11"]
    B --> Q["W12"]
    B --> R["W13"]
    B --> S["Frame Pointer/W14"]
    B --> T["Stack Pointer/W15"]

    U["DSP Accumulators(1)"] --> V["ACCA"]
    U --> W["ACCB"]

    X["Alternate Working/Address Registers"] --> Y["WSLIM"]
    X --> Z["Stack Pointer Limit"]

    AA["Program Counter"] --> AB["Program Counter"]

    AC["Data Table Page Address"] --> AD["TBLPAG"]
    AD --> AE["X Data Space Read Page Address"]

    AF["Data Table Page Address"] --> AG["Data Table Page Address"]

    AH["Data Table Page Address"] --> AI["Data Table Page Address"]

    AJ["Data Table Page Address"] --> AK["X Data Space Read Page Address"]

    AL["Data Table Page Address"] --> AM["Data Table Page Address"]

    AN["Data Table Page Address"] --> AO["X Data Space Read Page Address"]

    AP["Data Table Page Address"] --> AQ["X Data Space Read Page Address"]

    AR["Data Table Page Address"] --> AS["X Data Space Read Page Address"]

    AT["Data Table Page Address"] --> AU["X Data Space Read Page Address"]

    AV["Data Table Page Address"] --> AW["X Data Space Read Page Address"]

    AX["Data Table Page Address"] --> AY["X Data Space Read Page Address"]

    AZ["Data Table Page Address"] --> BA["X Data Space Read Page Address"]

    BB["Data Table Page Address"] --> BC["X Data Space Read Page Address"]

    BD["Data Table Page Address"] --> BE["X Data Space Read Page Address"]

    BF["Data Table Page Address"] --> BG["X Data Space Read Page Address"]

    BH["Data Table Page Address"] --> BH1["X Data Space Read Page Address"]

    BI["Data Table Page Address"] --> BJ["X Data Space Read Page Address"]

    BK["Data Table Page Address"] --> BK1["X Data Space Read Page Address"]

    BL["Data Table Page Address"] --> BL1["X Data Space Read Page Address"]

    BM["Data Table Page Address"] --> BM1["X Data Space Read Page Address"]

    BN["Data Table Page Address"] --> BN1["X Data Space Read Page Address"]

    BO["Data Table Page Address"] --> BP["X Data Space Read Page Address"]

    BP --> BP1["X Data Space Read Page Address"]

    BQ["DO Loop Counter and Stack"] --> BR["DO Loop Counter and Stack"]

    BS["DO Loop Start Address and Stack"] --> BT["DO Loop Start Address and Stack"]

    BU["DO Loop End Address and Stack"] --> BV["DO Loop End Address and Stack"]

    BW["DO Loop End Address and Stack"] --> BX["DO Loop End Address and Stack"]

    BY["DO Loop End Address and Stack"] --> BY1["DO Loop End Address and Stack"]

    CA["DO Loop End Address and Stack"] --> CB["DO Loop End Address and Stack"]

    CC["CPU Core Control Register"] --> DD["CPU Core Control Register"]

    DE["SRL"] --> DF["SRL"]

    DG["STATUS Register"] --> DH["STATUS Register"]

3.4.2 CPU Resources

Many useful resources are provided on the main product page of the Microchip website for the devices listed in this data sheet. This product page contains the latest updates and additional information.

3.5 CPU Control/Status Registers

OffsetNameBit Pos. 76543210
0x00 WREG015:8 WREG0[15:8]
7:0 WREG0[7:0]
0x02 WREG115:8 WREG1[15:8]
7:0 WREG1[7:0]
0x04 WREG215:8 WREG2[15:8]
7:0 WREG2[7:0]
0x06 WREG315:8 WREG3[15:8]
7:0 WREG3[7:0]
0x08 WREG415:8 WREG4[15:8]
7:0 WREG4[7:0]
0x0A WREG515:8 WREG5[15:8]
7:0 WREG5[7:0]
0x0C WREG615:8 WREG6[15:8]
7:0 WREG6[7:0]
0x0E WREG715:8 WREG7[15:8]
7:0 WREG7[7:0]
0x10 WREG815:8 WREG8[15:8]
7:0 WREG8[7:0]
0x12 WREG915:8 WREG9[15:8]
7:0 WREG9[7:0]
0x14 WREG1015:8 WREG10[15:8]
7:0 WREG10[7:0]
0x16 WREG1115:8 WREG11[15:8]
7:0 WREG11[7:0]
0x18 WREG1215:8 WREG12[15:8]
7:0 WREG12[7:0]
0x1A WREG1315:8 WREG13[15:8]
7:0 WREG13[7:0]
0x1C WREG1415:8 WREG14[15:8]
7:0 WREG14[7:0]
0x1E WREG1515:8 WREG15[15:8]
7:0 WREG15[7:0]
0x20 SPLIM15:8 SPLIM[15:8]
7:0SPLIM[7:0]
0x22ACCAL15:8ACCAL[15:8]
7:0ACCAL[7:0]
0x24ACCAH15:8ACCAH[15:8]
7:0ACCAH[7:0]
0x26ACCAU15:8ACCA39[7:0]
7:0ACCAU[7:0]
0x28ACCBL15:8ACCBL[15:8]
7:0ACCBL[7:0]
0x2AACCBH15:8ACCBH[15:8]
7:0ACCBH[7:0]
0x2CACCBU15:8ACCB39[7:0]
7:0ACCBU[7:0]
0x2EPCL15:8PCL[15:8]
7:0PCL[7:0]
0x30PCH15:8
7:0PCH[7:0]
0x32DSRPAG15:8DSRPAG[9:8]
7:0DSRPAG[7:0]
0x33 DSWPAG15:8DSWPAG[8]
7:0DSWPAG[7:0]
0x35Reserved
0x36 RCOUNT15:8 RCOUNT[15:8]
7:0 RCOUNT[7:0]
0x38 DCOUNT15:8 DCOUNT[15:8]
7:0 DCOUNT[7:0]

......continued

OffsetName Bit Pos. 7 6 5 4 3 2 1 0
0x3A DOSTARTL15:8 DOSTARTL[15:8]
7:0 DOSTARTL[7:0]
0x3C DOSTARTH15:8
7:0 DOSTARTH[6:0]
0x3E DOENDL15:8 DOENDL[15:8]
7:0 DOENDL[7:0]
0x40DOENDH15:8
7:0DOENDH[6:0]
0x42SR15:8OAOBSASBOABSABDADC
7:0IPL[2:0]RANOVZC
0x44CORCON15:8VARUS[1:0]EDTDL[2:0]
7:0SATASATBSATDWACCSATIPL3SFARNDIF
0x46MODCON15:8XMODENYMODENBWM[3:0]
7:0YWM[3:0]XWM[3:0]
0x48XMODSRT15:8XS[15:8]
7:0XS[7:0]
0x4A XMODEND15:8XE[15:8]
7:0XE[7:0]
0x4CYMODSRT15:8YS[15:8]
7:0YS[7:0]
0x4E YMODEND15:8YE[15:8]
7:0YE[7:0]
0x50 XBREV15:8BRENXB[14:8]
7:0XB[7:0]
0x52DISICNT15:8DISICNT[13:8]
7:0DISICNT[7:0]
0x54TBLPAG15:8
7:0TBLPAG[7:0]
0x56 YPAG15:8
7:0YPAG[7:0]
0x58 MSTRPR15:8
7:0DMAPRCANPRCAN2PRNVMPR
0x5ACTXTSTAT15:8CCTXI[2:0]
7:0MCTXI[2:0]

3.5.1 Working Register x

Name: WREGx

Offset: 0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E, 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E

Bit 15 14 13 12 11 10 9 8
WREGx[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
WREGx[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0

Bits 15:0 – WREGx[15:0] Data bits

3.5.2 Stack Pointer Limit Value Register

Name: SPLIM

Offset: 0x20

Bit 15 14 13 12 11 10 9 8

SPLIM[15:8]
AccessR/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0
Bit7 6 5 4 3 2 1 0
SPLIM[7:0]
AccessR/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0

Bits 15:0 – SPLIM[15:0] Stack Limit Address bits

3.5.3 Accumulator A Low Register

Name: ACCAL Offset: 0x22

Bit 15 14 13 12 11 10 9 8
ACCAL[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
ACCAL[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0

Bits 15:0 – ACCAL[15:0] Accumulator A Low Register bits

3.5.4 Accumulator A High Register

Name: ACCAH

Offset: 0x24

Bit 15 14 13 12 11 10 9 8

ACCAH[15:8]
AccessR/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0
Bit7 6 5 4 3 2 1 0
ACCAH[7:0]
AccessR/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0

Bits 15:0 – ACCAH[15:0] Accumulator A High Register bits

3.5.5 Accumulator A Upper Register

Name: ACCAU Offset: 0x26

Bit 15 14 13 12 11 10 9 8
ACCA39[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
ACCAU[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0

Bits 15:8 – ACCA39[7:0] Accumulator A bits

Bits 7:0 - ACCAU[7:0] Accumulator A bits

3.5.6 Accumulator B Low Register

Name: ACCBL

Offset: 0x28

Property: R/W

Bit 15 14 13 12 11 10 9 8

ACCBL[15:8]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

ACCBL[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 15:0 – ACCBL[15:0] Accumulator B Low Register bits

3.5.7 Accumulator B High Register

Name: ACCBH

Offset: 0x2A

Property: R/W

Bit 15 14 13 12 11 10 9 8

ACCBH[15:8]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

ACCBH[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 15:0 – ACCBH[15:0] Accumulator B High Register bits

3.5.8 Accumulator B Upper Address Register

Name: ACCBU Offset: 0x2C

Microchip dsPIC33CK1024MP708 - Accumulator B Upper Address Register - 1

text_image Bit 15 14 13 12 11 10 9 8 ACCB39[7:0] Access R/W R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 ACCBU[7:0] Access R/W R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0 0

Bits 15:8 – ACCB39[7:0] Accumulator B bits

Bits 7:0 - ACCBU[7:0] Accumulator B bits

3.5.9 Program Counter Low Register

Name: PCL Offset: 0x2B

Microchip dsPIC33CK1024MP708 - Program Counter Low Register - 1

text_image Bit 15 14 13 12 11 10 9 8 PCL[15:8] Access R/W R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 PCL[7:0] Access R/W R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0 0

Bits 15:0 – PCL[15:0] Program Counter Low Value bits

3.5.10 Program Counter High Register

Name: PCH Offset: 0x30

Microchip dsPIC33CK1024MP708 - Program Counter High Register - 1

text_image Bit 15 14 13 12 11 10 9 8 Access Reset Bit 7 6 5 4 3 2 1 0 PCH[7:0] Access R/W R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0 0

Bits 7:0 – PCH[7:0] Program Counter High Value bits

3.5.11 Data Space Read Page Register

Name: DSRPAG

Offset: 0x32

Bit 15 14 13 12 11 10 9 8

DSRPAG[9:8]
Access Reset 0 0R/W R/W

Bit 76543210

DSRPAG[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 9:0 – DSRPAG[9:0] Data Space Read Page Value bits

3.5.12 Data Space Write Page Register

Name: DSWPAG
Offset: 0x33

Microchip dsPIC33CK1024MP708 - Data Space Write Page Register - 1

text_image Bit 15 14 13 12 11 10 9 8 DSWPAG[8] Access Reset 0 R/W Bit 7 6 5 4 3 2 1 0 DSWPAG[7:0] Access R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0 0

Bits 8:0 – DSWPAG[8:0] Data Space Write Page Value bits

3.5.13 REPEAT Loop Counter Register

Name: RCOUNT

Offset: 0x36

Bit 15 14 13 12 11 10 9 8
RCOUNT[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
RCOUNT[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0

Bits 15:0 – RCOUNT[15:0] Current Loop Counter Value for REPEAT Instruction bits

3.5.14 DO Loop Iteration Count Register

Name: DCOUNT

Offset: 0x38

Bit 15 14 13 12 11 10 9 8
DCOUNT[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
DCOUNT[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0

Bits 15:0 – DCOUNT[15:0] DO Loop Iteration Count Register bits

3.5.15 DO Loop Start Address Register Low

Name: DOSTARTL

Offset: 0x3A

Microchip dsPIC33CK1024MP708 - DO Loop Start Address Register Low - 1

text_image Bit 15 14 13 12 11 10 9 8 DOSTARTL[15:8] Access R R R R R R R R Reset 0 0 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 DOSTARTL[7:0] Access R R R R R R R R R Reset 0 0 0 0 0 0 0 0

Bits 15:0 - DOSTARTL[15:0] Current DO Loop Start Address bits

Note: DOSTARTL[0] always reads as '0'; DOSTARTL is a read-only register.

3.5.16 DO Loop Start Address Register High

Name: DOSTARTH

Offset: 0x3C

Microchip dsPIC33CK1024MP708 - DO Loop Start Address Register High - 1

text_image Bit 15 14 13 12 11 10 9 8 Access Reset Bit 7 6 5 4 3 2 1 0 DOSTARTH[6:0] Access R R R R R R R Reset 0 0 0 0 0 0 0

Bits 6:0 – DOSTARTH[6:0] Current DO Loop Start Address bits

Note: DOSTARTH[0] always reads as '0'; DOSTARTH is a read-only register.

3.5.17 DO Loop End Address Register Low

Name: DOENDL

Offset: 0x3E

Microchip dsPIC33CK1024MP708 - DO Loop End Address Register Low - 1

text_image Bit 15 14 13 12 11 10 9 8 DOENDL[15:8] Access R R R R R R R R Reset 0 0 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 DOENDL[7:0] Access R R R R R R R R R Reset 0 0 0 0 0 0 0 0

Bits 15:0 - DOENDL[15:0] Current DO Loop End Address bits

Note: DOENDL[0] always reads as '0'.

3.5.18 DO Loop End Address Register High

Name: DOENDH

Offset: 0x40

Microchip dsPIC33CK1024MP708 - DO Loop End Address Register High - 1

text_image Bit 15 14 13 12 11 10 9 8 Access Reset Bit 7 6 5 4 3 2 1 0 DOENDH[6:0] Access R R R R R R R Reset 0 0 0 0 0 0 0

Bits 6:0 - DOENDH[6:0] Current DO Loop End Address bits

Note: DOENDH[0] always reads as '0'.

3.5.19 CPU STATUS Register

Name: SR

Offset: 0x42

Notes:

  1. The IPL[2:0] bits are concatenated with the IPL[3] bit (CORCON[3]) to form the CPU Interrupt Priority Level. The value in parentheses indicates the IPL, if IPL[3] = 1. User interrupts are disabled when IPL[3] = 1.
  2. The IPL[2:0] Status bits are read-only when the NSTDIS bit (INTCON1[15]) = 1.
  3. A data write to the SR register can modify the SA and SB bits by either a data write to SA and SB or by clearing the SAB bit. To avoid a possible SA or SB Bit Write Race condition, the SA and SB bits should not be modified using bit operations.

Legend: C = Clearable bit

Bit 15 14 13 12 11 10 9 8

OA OB SASB OAB SAB DADC
AccessR/WR/WR/WR/WR/CR/CRR/W
Reset0 0 0 0 0 0 0 0

Bit 76543210

IPL[2:0]RANOVZC
AccessR/WR/WR/WRR/WR/WR/WR/W
Reset0 0 0 0 0 0 0 0

Bit 15 - OA Accumulator A Overflow Status bit

ValueDescription
1Accumulator A has overflowed
0Accumulator A has not overflowed

Bit 14 - OB Accumulator B Overflow Status bit

ValueDescription
1Accumulator B has overflowed
0Accumulator B has not overflowed

Bit 13 – SA Accumulator A Saturation 'Sticky' Status bit ^(3)

ValueDescription
1Accumulator A is saturated or has been saturated at some time
0Accumulator A is not saturated

Bit 12 – SB Accumulator B Saturation 'Sticky' Status bit ^(3)

ValueDescription
1Accumulator B is saturated or has been saturated at some time
0Accumulator B is not saturated

Bit 11 – OAB OA || OB Combined Accumulator Overflow Status bit

ValueDescription
1Accumulator A or B has overflowed
0Neither Accumulator A or B has overflowed

Bit 10 – SAB SA || SB Combined Accumulator 'Sticky' Status bit

ValueDescription
1Accumulator A or B is saturated or has been saturated at some time
0Neither Accumulator A or B is saturated

Bit 9 – DA DO Loop Active bit

Value Description
1DO loop is in progress
0DO loop is not in progress

Bit 8 - DC MCU ALU Half Carry/Borrow bit

Value Description
1A carry-out from the 4th low-order bit (for byte-sized data) or 8th low-order bit (for word-sized data) of the result occurred
0No carry-out from the 4th low-order bit (for byte-sized data) or 8th low-order bit (for word-sized data) of the result occurred

Bits 7:5 – IPL[2:0] CPU Interrupt Priority Level Status bits ^(1,2)

Value Description
111CPU Interrupt Priority Level is 7 (15); user interrupts are disabled
110CPU Interrupt Priority Level is 6 (14)
101CPU Interrupt Priority Level is 5 (13)
100CPU Interrupt Priority Level is 4 (12)
011CPU Interrupt Priority Level is 3 (11)
010CPU Interrupt Priority Level is 2 (10)
001CPU Interrupt Priority Level is 1 (9)
000CPU Interrupt Priority Level is 0 (8)

Bit 4 - RA REPEAT Loop Active bit

Value Description
1REPEAT loop is in progress
0REPEAT loop is not in progress

Bit 3 - N MCU ALU Negative bit

Value Description
1Result was negative
0Result was non-negative (zero or positive)

Bit 2-OV MCU ALU Overflow bit

This bit is used for signed arithmetic (two's complement). It indicates an overflow of the magnitude that causes the sign bit to change state.

Value Description
1Overflow occurred for signed arithmetic (in this arithmetic operation)
0No overflow occurred

Bit 1-Z MCU ALU Zero bit

Value Description
1An operation that affects the Z bit has set it at some time in the past
0The most recent operation that affects the Z bit has cleared it (i.e., a non-zero result)

Bit 0-C MCU ALU Carry/Borrow bit

Value Description
1A carry-out from the Most Significant bit of the result occurred
0No carry-out from the Most Significant bit of the result occurred

3.5.20 Core Control Register

Name: CORCON

Offset: 0x44

Notes:

  1. This bit is always read as '0'.

  2. The IPL3 bit is concatenated with the IPL[2:0] bits (SR[7:5]) to form the CPU Interrupt Priority Level.

Legend: C = Clearable bit

Bit 15 14 13 12 11 10 9 8

VAR US[1:0] EDT DL[2:0]
AccessR/WR/WR/WR/WRRR
Reset00 0 0 0 0 0

Bit 76543210

SATASATBSATDWACCSATIPL3SFARNDIF
AccessR/WR/WR/WR/WR/CRR/WR/W
Reset0 0 1 0 0 0 0 0

Bit 15 – VAR Variable Exception Processing Latency Control bit

ValueDescription
1Variable exception processing is enabled
0Fixed exception processing is enabled

Bits 13:12 - US[1:0] DSP Multiply Unsigned/Signed Control bits

ValueDescription
11Reserved
10DSP engine multiplies are mixed sign
01DSP engine multiplies are unsigned
00DSP engine multiplies are signed

Bit 11 - EDT Early DO Loop Termination Control bit ^(1)

ValueDescription
1Terminates executing DO loop at the end of the current loop iteration
0No effect

Bits 10:8 – DL[2:0] DO Loop Nesting Level Status bits

ValueDescription
1117 DO loops are active
...
0011 DO loop is active
0000 DO loops are active

Bit 7 – SATA ACCA Saturation Enable bit

ValueDescription
1Accumulator A saturation is enabled
0Accumulator A saturation is disabled

Bit 6 – SATB ACCB Saturation Enable bit

ValueDescription
1Accumulator B saturation is enabled
0Accumulator B saturation is disabled

Bit 5 – SATDW Data Space Write from DSP Engine Saturation Enable bit

Value Description
1Data Space write saturation is enabled
0Data Space write saturation is disabled

Bit 4 – ACCSAT Accumulator Saturation Mode Select bit

Value Description
19.31 saturation (super saturation)
01.31 saturation (normal saturation)

Bit 3 – IPL3 CPU Interrupt Priority Level Status bit 3 ^(2)

Value Description
1CPU Interrupt Priority Level is greater than 7
0CPU Interrupt Priority Level is 7 or less

Bit 2 – SFA Stack Frame Active Status bit

Value Description
1Stack frame is active; W14 and W15 address 0x0000 to 0xFFFF, regardless of DSRPAG
0Stack frame is not active; W14 and W15 address the base Data Space

Bit 1 – RND Rounding Mode Select bit

Value Description
1Biased (conventional) rounding is enabled
0Unbiased (convergent) rounding is enabled

Bit 0 - IF Integer or Fractional Multiplier Mode Select bit

Value Description
1Integer mode is enabled for DSP multiply
0Fractional mode is enabled for DSP multiply

3.5.21 Modulo and Bit-Reversed Addressing Control Register

Name: MODCON

Offset: 0x46

Bit 15 14 13 12 11 10 9 8

XMODEN YMODEN BWM[3:0]
AccessR/W R/W R/W R/W R/W R/W
Reset 0 00 0 0 0

Bit 76543210

YWM[3:0]XWM[3:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 15 - XMODEN X RAGU and X WAGU Modulus Addressing Enable bit

ValueDescription
1X AGU Modulus Addressing enabled
0X AGU Modulus Addressing disabled

Bit 14 – YMODEN Y AGU Modulus Addressing Enable bit

ValueDescription
1Y AGU Modulus Addressing enabled
0Y AGU Modulus Addressing disabled

Bits 11:8 – BWM[3:0] X WAGU Register Select for Bit-Reversed Addressing bits

ValueDescription
0000W0 selected for Bit-Reversed Addressing
1110W14 selected for Bit-Reversed Addressing
1111W15 Bit-Reversed Addressing disabled

Bits 7:4 – YWM[3:0] Y AGU W Register Select for Modulo Addressing bits

ValueDescription
0000W0 selected for Modulo Addressing
1110W14 selected for Modulo Addressing
1111W15 Modulo Addressing disabled

Bits 3:0 – XWM[3:0] X RAGU and X WAGU W Register Select for Modulo Addressing bits

ValueDescription
0000W0 selected for Modulo Addressing
1110W14 selected for Modulo Addressing
1111W15 Modulo Addressing disabled

3.5.22 X AGU Modulo Addressing Start Register

Name: XMODSRT

Offset: 0x48

Microchip dsPIC33CK1024MP708 - X AGU Modulo Addressing Start Register - 1

text_image Bit 15 14 13 12 11 10 9 8 XS[15:8] Access R/W R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 XS[7:0] Access R/W R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0 0

Bits 15:0 – XS[15:0] X RAGU and X WAGU Modulo Addressing Start Address bits

3.5.23 X AGU Modulo Addressing End Register

Name: XMODEND

Offset: 0x4A

Bit 15 14 13 12 11 10 9 8
XE[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
XE[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0

Bits 15:0 – XE[15:0] X RAGU and X WAGU Modulo Addressing End Address bits

3.5.24 Y AGU Modulo Addressing Start Register

Name: YMODSRT

Offset: 0x4C

Microchip dsPIC33CK1024MP708 - Y AGU Modulo Addressing Start Register - 1

text_image Bit 15 14 13 12 11 10 9 8 YS[15:8] Access R/W R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 YS[7:0] Access R/W R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0 0

Bits 15:0 - YS[15:0] Y AGU Modulo Addressing Start Address bits

3.5.25 Y AGU Modulo Addressing End Register

Name: YMODEND

Offset: 0x4E

Bit 15 14 13 12 11 10 9 8
YE[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
YE[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0

Bits 15:0 – YE[15:0] X AGU Modulo Addressing End Address bits

3.5.26 X AGU Bit Reversal Addressing Control Register

Name: XBREV

Offset: 0x50

Bit 15 14 13 12 11 10 9 8

BREN XB[14:8]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 0xxxxxxx

Bit 76543210

XB[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset xxxxxxxx

Bit 15 – BREN Bit-Reversed Addressing (X AGU) Enable bit

ValueDescription
1Bit-Reversed Addressing enabled
0Bit-Reversed Addressing disabled

Bits 14:0 – XB[14:0] X AGU Bit-Reversed Modifier bits

3.5.27 Disable Interrupt Count Register

Name: DISICNT Offset: 0x52

Microchip dsPIC33CK1024MP708 - Disable Interrupt Count Register - 1

text_image Bit 15 14 13 12 11 10 9 8 DISICNT[13:8] Access R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 DISICNT[7:0] Access R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0 0

Bits 13:0 – DISICNT[13:0] Current Counter Value for DISI Instruction bits

3.5.28 Table Memory Page Address Register

Name: TBLPAG

Offset: 0x54

Microchip dsPIC33CK1024MP708 - Table Memory Page Address Register - 1

text_image Bit 15 14 13 12 11 10 9 8 Access Reset Bit 7 6 5 4 3 2 1 0 TBLPAG[7:0] Access R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0

Bits 7:0 – TBLPAG[7:0] Table Memory Page Value bits

3.5.29 Y Page Register

Name: YPAG

Offset: 0x56

Microchip dsPIC33CK1024MP708 - Y Page Register - 1

text_image Bit 15 14 13 12 11 10 9 8 Access Reset Bit 7 6 5 4 3 2 1 0 YPAG[7:0] Access R R R R R R R R Reset 0 0 0 0 0 1 1

Bits 7:0 – YPAG[7:0] Y Page bits

Note: YPAG is a read-only SFR register which will always return the fixed Y RAM page value, 0x0003.

3.5.30 EDS Bus Initiator Priority Control Register

Name: MSTRPR

Offset: 0x58

Microchip dsPIC33CK1024MP708 - EDS Bus Initiator Priority Control Register - 1

text_image Bit 15 14 13 12 11 10 9 8 Access Reset Bit 7 6 5 4 3 2 1 0 DMAPR CANPR CAN2PR Access R/W R/W R/W R/W R/W Reset 0 0 0 NVMPR 0

Bit 5 – DMAPR Modify DMA Controller Bus Initiator Priority Relative to CPU bit

ValueDescription
1Raises DMA Controller bus Initiator priority to above that of the CPU
0No change to DMA Controller bus Initiator priority

Bit 4 – CANPR Modify CAN1 Bus Initiator Priority Relative to CPU bit

ValueDescription
1Raises CAN1 bus Initiator priority to above that of the CPU
0No change to CAN1 bus Initiator priority

Bit 3 – CAN2PR Modify CAN2 Bus Initiator Priority Relative to CPU bit

ValueDescription
1Raises CAN2 bus Initiator priority to above that of the CPU
0No change to CAN2 bus Initiator priority

Bit 0 – NVMPR Modify NVM Controller Bus Initiator Priority Relative to CPU bit

ValueDescription
1Raises NVM Controller bus Initiator priority to above that of the CPU
0No change to NVM Controller bus Initiator priority

3.5.31 CPU W Register Context Status Register

Name: CTXTSTAT

Offset: 0x5A

Bit 15 14 13 12 11 10 9 8

CCTXI[2:0]
AccessR R R
Reset 0 0 0

Bit 76543210

MCTXI[2:0]
AccessR R R
Reset 0 0 0

Bits 10:8 – CCTXI[2:0] Current (W Register) Context Identifier bits

ValueDescription
111Reserved
. . .
100Alternate Working Register Set 4 is currently in use
011Alternate Working Register Set 3 is currently in use
010Alternate Working Register Set 2 is currently in use
001Alternate Working Register Set 1 is currently in use
000Default register set is currently in use

Bits 2:0 - MCTXI[2:0] Manual (W Register) Context Identifier bits

ValueDescription
111Reserved
. . .
100Alternate Working Register Set 4 was most recently manually selected
011Alternate Working Register Set 3 was most recently manually selected
010Alternate Working Register Set 2 was most recently manually selected
001Alternate Working Register Set 1 was most recently manually selected
000Default register set was most recently manually selected

3.6 Arithmetic Logic Unit (ALU)

The dsPIC33CK1024MP710 family ALU is 16 bits wide and is capable of addition, subtraction, bit shifts and logic operations. Unless otherwise mentioned, arithmetic operations are two's complement in nature. Depending on the operation, the ALU can affect the values of the Carry (C), Zero (Z), Negative (N), Overflow (OV) and Digit Carry (DC) Status bits in the SR register. The C and DC Status bits operate as Borrow and Digit Borrow bits, respectively, for subtraction operations.

The ALU can perform 8-bit or 16-bit operations, depending on the mode of the instruction that is used. Data for the ALU operation can come from the W register array or data memory, depending on the addressing mode of the instruction. Likewise, output data from the ALU can be written to the W register array or a data memory location.

Refer to the "16-Bit MCU and DSC Programmer's Reference Manual" (www.microchip.com/DS70000157) for information on the SR bits affected by each instruction.

The core CPU incorporates hardware support for both multiplication and division. This includes a dedicated hardware multiplier and support hardware for 16-bit divisor division.

3.6.1 Multiplier

Using the high-speed, 17-bit x 17-bit multiplier, the ALU supports an unsigned, signed or mixed-sign operation in several MCU Multiplication modes:

  • 16-bit x 16-bit signed
  • 16-bit x 16-bit unsigned
    • 16-bit signed x 5-bit (literal) unsigned
    • 16-bit signed x 16-bit unsigned
    • 16-bit unsigned x 5-bit (literal) unsigned
    • 16-bit unsigned x 16-bit signed
  • 8-bit unsigned x 8-bit unsigned

3.6.2 Divider

The divide block supports 32-bit/16-bit and 16-bit/16-bit signed and unsigned integer divide operations with the following data sizes:

• 32-bit signed/16-bit signed divide
• 32-bit unsigned/16-bit unsigned divide
• 16-bit signed/16-bit signed divide
• 16-bit unsigned/16-bit unsigned divide

The 16-bit signed and unsigned DIV instructions can specify any W register for both the 16-bit divisor (Wn) and any W register (aligned) pair (W(m + 1):Wm) for the 32-bit dividend. The divide algorithm takes one cycle per bit of divisor, so both 32-bit/16-bit and 16-bit/16-bit instructions take the same number of cycles to execute. There are additional instructions: DIV2 and DIVF2. Divide instructions will complete in six cycles.

3.7 DSP Engine

The DSP engine consists of a high-speed 17-bit x 17-bit multiplier, a 40-bit barrel shifter and a 40-bit adder/subtracter (with two target accumulators, round and saturation logic).

The DSP engine can also perform inherent accumulator-to-accumulator operations that require no additional data. These instructions are: ADD, SUB, NEG, MIN and MAX.

The DSP engine has options selected through bits in the CPU Core Control register (CORCON), as listed below:

• Fractional or integer DSP multiply (IF)
• Signed, unsigned or mixed-sign DSP multiply (USx)
- Conventional or convergent rounding (RND)
• Automatic saturation on/off for ACCA (SATA)
• Automatic saturation on/off for ACCB (SATB)
• Automatic saturation on/off for writes to data memory (SATDW)
• Accumulator Saturation mode selection (ACCSAT)

Table 3-2. DSP Instructions Summary

InstructionAlgebraic OperationACC Write-Back
CLR A = 0 Yes
ED A = (x - y)^2 No
EDAC A = A + (x - y)^2 No
MAC A = A + (x · y) Yes
MAC A = A + x^2 No
MOVSACNo change in A Yes
MPY A = x · y No
MPY A = x^2 No
MPY.N A = -x · y No
MSC A = A - x · y Yes

4. Memory Organization

Note: This data sheet summarizes the features of the dsPIC33CK1024MP710 family of devices. It is not intended to be a comprehensive reference source. To complement the information in this data sheet, refer to "dsPIC33/PIC24 Program Memory" (www.microchip.com/DS70000613).

The dsPIC33CK1024MP710 family architecture features separate program and data memory spaces, and buses. This architecture also allows the direct access of program memory from the Data Space (DS) during code execution.

4.1 Program Address Space

The program address memory space of the dsPIC33CK1024MP710 family devices is 4M instructions. The space is addressable by a 24-bit value derived either from the 23-bit PC during program execution or from table operation or Data Space remapping, as described in 4.4.5. Interfacing Program and Data Memory Spaces.

User application access to the program memory space is restricted to the lower half of the address range (0x000000 to 0x7FFFFFF). The exception is the use of TBLRD operations, which use TBLPAG[7] to permit access to calibration data and Device ID sections of the configuration memory space.

The program memory maps for dsPIC33CK1024MP710 devices are shown in Figure 4-1.

Figure 4-1. Program Memory Map for dsPIC33CK1024MP710 Device ^(1)
Microchip dsPIC33CK1024MP708 - Program Address Space - 1

text_image IVT Code Memory Device Configuration Unimplemented (Read '0's) Executive Code Memory Calibration(2,3) Data OTP Memory Reserved Write Latches Reserved DEVID Reserved 0x000000 0x0001FE 0x000200 0x0XXXFE 0x0XXX00 0x0XXXFE 0x0XXX00 0x7FFFFE 0x800000 0x800FFE 0x801000 0x8016FE 0x801700 0x8017FE 0x801800 0xF9FFFE 0xFA0000 0xFA0002 0xFA0004 0xFEFFFE 0xFF0000 0xFF0002 0xFF0004 0xFFFFFE User Memory Space Configuration Memory Space (Note 4)

Notes:

  1. Memory areas are not shown to scale.
  2. Calibration data area must be maintained during programming.
  3. Calibration data area includes UDID, ICSP ^TM Write Inhibit and FBOOT registers' locations.
  4. See Figure 4-2, Figure 4-3 and Figure 4-4 for details

Figure 4-2. Program Memory Map for dsPIC33CK1024MP7XX/4XX Devices ^(1)
Microchip dsPIC33CK1024MP708 - Notes: - 1

text_image Single Partition User Program Memory 0x000000 Device Configuration 0x0AFEFE 0x0AFF00 0x0AFFEFE 0x0B0000 Unimplemented (Read '0's) 0x7FFFFFE

Microchip dsPIC33CK1024MP708 - Notes: - 2

bar_stacked Dual Partition | Category | Memory Count (x) | | :--- | :--- | | User Program Memory | 0x000000 | | Device Configuration | 0x057EFE | | Unimplemented (Read '0's) | 0x057F00 | | User Program Memory | 0x057FFE | | Device Configuration | 0x058000 | | Unimplemented (Read '0's) | 0x400000 | | Device Configuration | 0x4AFEFE | | Unimplemented (Read '0's) | 0x4AFF00 | | Device Configuration | 0x4AFFE | | Unimplemented (Read '0's) | 0x4B0000 | | Inactive Partition Active Partition | 0x7FFFFE |

Note:

  1. Memory areas are not shown to scale.

Figure 4-3. Program Memory Map for dsPIC33CK512MP7XX/4XX Devices ^(1)
Microchip dsPIC33CK1024MP708 - Note: - 1

text_image Single Partition User Program Memory 0x000000 Device Configuration 0x057EFE 0x057F00 0x057FFE 0x058000 Unimplemented (Read '0's) 0x7FFFFFE

Microchip dsPIC33CK1024MP708 - Note: - 2

bar_stacked Dual Partition | Category | Memory Count (x) | | :--- | :--- | | User Program Memory | 0x000000 | | Device Configuration | 0x02BEFE 0x02BF00 | | Unimplemented (Read '0's) | 0x02BFFE 0x02C000 | | User Program Memory | 0x400000 | | Device Configuration | 0x42BEFE 0x42BF00 | | Unimplemented (Read '0's) | 0x42BFFE 0x42C000 | | Inactive Partition Active Partition | 0x7FFFFE |

Note:

  1. Memory areas are not shown to scale.

Figure 4-4. Program Memory Map for dsPIC33CK256MP7XX/4XX Devices ^(1)
Microchip dsPIC33CK1024MP708 - Note: - 1

text_image Single Partition User Program Memory 0x000000 Device Configuration 0x02BEFE 0x02BF00 0x02BFFE 0x02C000 Unimplemented (Read '0's) 0x7FFFFE

Microchip dsPIC33CK1024MP708 - Note: - 2

bar_stacked Dual Partition | Category | Memory Count (x) | |---|---| | User Program Memory | 0x000000 | | Device Configuration | 0x015EFE | | Unimplemented (Read '0's) | 0x015F00 | | User Program Memory | 0x015FFE | | Device Configuration | 0x016000 | | Unimplemented (Read '0's) | 0x400000 | | Device Configuration | 0x415EFE | | Unimplemented (Read '0's) | 0x415F00 | | Device Configuration | 0x415FFE | | Unimplemented (Read '0's) | 0x416000 | | Inactive Partition Active Partition | 0x7FFFFE |

Note:

  1. Memory areas are not shown to scale.

4.1.1 Program Memory Organization

The program memory space is organized in word-addressable blocks. Although it is treated as 24 bits wide, it is more appropriate to think of each address of the program memory as a lower and upper word, with the upper byte of the upper word being unimplemented. The lower word always has an even address, while the upper word has an odd address (4.1.2. Interrupt and Trap Vectors).

Program memory addresses are always word-aligned on the lower word, and addresses are incremented or decremented, by two, during code execution. This arrangement provides compatibility with data memory space addressing and makes data in the program memory space accessible.

4.1.2 Interrupt and Trap Vectors

All dsPIC33CK1024MP710 family devices reserve addresses between 0x000000 and 0x000200 for hard-coded program execution vectors. A hardware Reset vector is provided to redirect code execution from the default value of the PC on device Reset to the actual start of code. A GOTO instruction is programmed by the user application at address 0x000000 of Flash memory, with the actual address for the start of code at address 0x000002 of Flash memory.

A more detailed discussion of the Interrupt Vector Tables (IVTs) is provided in 7. Interrupt Controller.

Figure 4-5. Program Memory Organization
Microchip dsPIC33CK1024MP708 - Interrupt and Trap Vectors - 1

bar_stacked | msw Address | most significant word | least significant word | PC Address (Isw Address) | | ----------- | --------------------- | ---------------------- | ------------------------ | | 0x000001 | 00000000 | 0 | 0x000000 | | 0x000003 | 00000000 | 0 | 0x000002 | | 0x000005 | 00000000 | 0 | 0x000004 | | 0x000007 | 00000000 | 0 | 0x000006 |

4.1.3 Unique Device Identifier (UDID)

All dsPIC33CK1024MP710 family devices are individually encoded during final manufacturing with a Unique Device Identifier (UDID). The UDID cannot be erased by a bulk erase command or any other user-accessible means.

This feature allows for manufacturing traceability of Microchip Technology devices in applications where this is a requirement. It may also be used by the application manufacturer for any number of things that may require unique identification, such as:

  • Tracking the device
  • Unique identifying number
  • Unique security key

The UDID comprises five 24-bit program words. When taken together, these fields form a unique 120-bit identifier.

The UDID is stored in five read-only locations, located between 0x801200 and 0x801208 in the device configuration space. Table 4-1 lists the addresses of the identifier words and shows their contents.

Table 4-1. UDID Addresses

UDID Address Description
UDID1 0x801200 UDID Word 1
UDID2 0x801202 UDID Word 2
UDID3 0x801204 UDID Word 3
UDID4 0x801206 UDID Word 4
UDID5 0x801208 UDID Word 5

4.2 Data Address Space

The dsPIC33CK1024MP710 family CPU has a separate 16-bit wide data memory space. The Data Space is accessed using separate Address Generation Units (AGUs) for read and write operations. The data memory map is shown in Figure 4-6.

All Effective Addresses (EAs) in the data memory space are 16 bits wide and point to bytes within the Data Space. This arrangement gives a base Data Space address range of 64 Kbytes or 32K words.

The lower half of the data memory space (i.e., when EA[15] = 0) is used for implemented memory addresses, while the upper half (EA[15] = 1) is reserved for the Program Space Visibility (PSV).

The dsPIC33CK1024MP710 family devices implement up to 128 Kbytes of data memory. If an EA points to a location outside of this area, an all-zero word or byte is returned.

4.2.1 Data Memory Organization and Alignment

To maintain backward compatibility with PIC MCU devices and improve Data Space memory usage efficiency, the dsPIC33CK1024MP710 family instruction set supports both word and byte operations. As a consequence of byte accessibility, all Effective Address calculations are internally scaled to step through word-aligned memory. For example, the core recognizes that Post-Modified Register Indirect Addressing mode [Ws++] results in a value of Ws + 1 for byte operations and Ws + 2 for word operations.

A data byte read reads the complete word that contains the byte using the LSB of any EA to determine which byte to select. The selected byte is placed onto the LSB of the data path. That is, data memory and registers are organized as two parallel, byte-wide entities with shared (word) address decode but separate write lines. Data byte writes only write to the corresponding side of the array or register that matches the byte address.

All word accesses must be aligned to an even address. Misaligned word data fetches are not supported, so care must be taken when mixing byte and word operations, or translating from 8-bit MCU code. If a misaligned read or write is attempted, an address error trap is generated. If the error occurred on a read, the instruction underway is completed. If the error occurred on a write, the instruction is executed but the write does not occur. In either case, a trap is then executed, allowing the system and/or user application to examine the machine state prior to execution of the address Fault.

All byte loads into any W register are loaded into the LSB; the MSB is not modified.

A Sign-Extend (SE) instruction is provided to allow user applications to translate 8-bit signed data to 16-bit signed values. Alternatively, for 16-bit unsigned data, user applications can clear the MSB of any W register by executing a Zero-Extend (ZE) instruction on the appropriate address.

4.2.2 Near Data Space

The 8-Kbyte area, between 0x0000 and 0x1FFF, is referred to as the Near Data Space. Locations in this space are directly addressable through a 13-bit absolute address field within all memory direct instructions. Additionally, the whole Data Space is addressable using MOV instructions, which support Memory Direct Addressing mode with a 16-bit address field, or by using Indirect Addressing mode using a Working register as an Address Pointer.

Figure 4-6. Data Memory Map for dsPIC33CKXXXXMPXXX Devices
Microchip dsPIC33CK1024MP708 - Near Data Space - 1

flowchart
graph TD
    A["4-Kbyte SFR Space"] --> B["0x0001"]
    A --> C["0x0FFF"]
    A --> D["0x1001"]
    E["127-Kbyte SRAM Space"] --> F["0x18001"]
    E --> G["0x187FF"]
    E --> H["0x18801"]
    I["Optionally Mapped into Program Memory"] --> J["Y Data RAM (Y) (30720)"]
    K["LSB Address"] --> L["SFR Space"]
    L --> M["X Data RAM (X) (96256)"]
    L --> N["Y Data RAM (Y) (30720)"]
    L --> O["LSBMSB"]
    P["8-Kbyte Near Data Space"] --> Q["0x0000"]
    P --> R["0x0FFE"]
    P --> S["0x2000"]
    T["LSB Address"] --> U["0x18000"]
    T --> V["0x187FE"]
    T --> W["0x18800"]
    X["LSB Address"] --> Y["0x1FFF E"]
    X --> Z["0x20000"]

Note: Memory areas are not shown to scale.

4.2.3 X and Y Data Spaces

The dsPIC33CK1024MP710 family core has two Data Spaces, X and Y. These Data Spaces can be considered either separate (for some DSP instructions) or as one unified linear address range (for MCU instructions). The Data Spaces are accessed using two Address Generation Units (AGUs) and separate data paths. This feature allows certain

instructions to concurrently fetch two words from RAM, thereby enabling efficient execution of DSP algorithms, such as Finite Impulse Response (FIR) filtering and Fast Fourier Transform (FFT).

The X Data Space is used by all instructions and supports all addressing modes. X Data Space has separate read and write data buses. The X read data bus is the read data path for all instructions that view Data Space as combined X and Y address space. It is also the X data prefetch path for the dual operand DSP instructions (MAC class).

The Y Data Space is used in concert with the X Data Space by the MAC class of instructions (CLR, ED, EDAC, MAC, MOVSAC, MPY, MPY.N and MSC) to provide two concurrent data read paths.

Both the X and Y Data Spaces support Modulo Addressing mode for all instructions, subject to addressing mode restrictions. Bit-Reversed Addressing mode is only supported for writes to X Data Space.

All data memory writes, including in DSP instructions, view Data Space as combined X and Y address space. The boundary between the X and Y Data Spaces is device-dependent and is not user-programmable.

4.3 BIST Overview

The dsPIC33CK1024MP710 family features a data memory Built-In Self-Test (BIST) that has the option to be run at start-up or run time. The memory test checks that all memory locations are functional and provides a pass/fail status of the RAM that can be used by software to take action if needed. If a failure is reported, the specific location(s) are not identified.

The MBISTCON register (4.3.4. MBISTCON) contains control and status bits for BIST operation. The MBISTDONE bit (MBISTCON[7]) indicates if a BIST was run since the last Reset and the MBISTSTAT bit (MBISTCON[4]) provides the pass/fail result.

BIST will always run on FRC+PLL with PLL settings resulting in a 125 MHz clock rate.

4.3.1 BIST at Start-up

The BIST can be configured to automatically run on a POR-type Reset, as shown in Figure 4-7. By default, when BISTDIS (FPOR[6]) = 1, the BIST is disabled and will not be part of device start-up. If the BISTDIS bit is cleared during device programming, the BIST will run after all Configuration registers have been loaded and before code execution begins.

Figure 4-7. BIST Flowchart
Microchip dsPIC33CK1024MP708 - BIST at Start-up - 1

flowchart
graph TD
    A["POR"] --> B{BISTDIS (FPOR["6"])]
    B -->|0| C["BIST"]
    C --> D["Code Execution"]
    B -->|1| C

4.3.2 Fault Simulation

A mechanism is available to simulate a BIST failure to allow testing of Fault handling software. When the FLTINJ bit is set during a run-time BIST, the MBISTSTAT bit will be set regardless of the test result. The procedure for a BIST Fault simulation is as follows:

  1. Execute the unlock sequence by consecutively writing 0x55 and 0xAA to the NVMKEY register.
  2. Set the MBISTEN bit (MBISTCON[0]).
  3. Execute 2nd unlock sequence by consecutively writing 0x55 and 0xAA to the NVMKEY register.
  4. Set the FLTINJ bit (MBISTCON[8]).
  5. Execute a Software Reset command.
  6. Verify a Software Reset has occurred by reading SWR (RCON[6]) (optional).
  7. Verify the MBISTDONE, MBSITSTAT and FLTINJ bits are all set.

4.3.3 BIST at Run Time

The BIST can also be run at any time during code execution. Note that a BIST will corrupt all of the RAM contents, including the Stack Pointer, and requires a subsequent Reset. The system should be prepared for a Reset before a BIST is performed. The BIST is invoked by setting the MBISTEN bit (MBISTCON[0]). The MBISTCON register is protected against accidental writes and requires an unlock sequence prior to writing. Only one bit can be set per unlock sequence. The procedure for a run-time BIST is as follows:

  1. Execute the unlock sequence by consecutively writing 0x55 and 0xAA to the NVMKEY register.
  2. Write 0x0001 to the MBISTCON SFR.
  3. Execute a Software Reset command.
  4. Verify a Software Reset has occurred by reading SWR (RCON[6]) (optional).
  5. Verify that the MBISTDONE bit is set.
  6. Take action depending on test result indicated by MBISTSTAT.

4.3.4 MBIST Control Register

Name: MBISTCON

Offset: OEFC

Notes:

  1. Resets only on a true POR Reset.

  2. This bit will self-clear when the MBIST test is complete.

Legend: HS = Hardware Settable bit; HC = Hardware Clearable bit

Bit 15 14 13 12 11 10 9 8

Microchip dsPIC33CK1024MP708 - Notes: - 1

text_image FLTINJ Access Reset 0 R/W

Bit 76543210

Microchip dsPIC33CK1024MP708 - Notes: - 2

text_image MBISTDONE MBISTSTAT MBISTEN Access R/W/HS R/W/HC Reset 0 0 0

Bit 8 – FLTINJ MBIST Fault Inject Control bit ^(1)

ValueDescription
1The MBIST test will complete and sets MBISTSTAT = 1, simulating an SRAM test failure
0The MBIST test will execute normally

Bit 7 – MBISTDONE MBIST Done Status bit

ValueDescription
1An MBIST operation has been executed
0No MBIST operation has occurred on the last Reset sequence

Bit 4 – MBISTSTAT MBIST Status bit

ValueDescription
1The last MBIST failed
0The last MBIST passed; all memory may not have been tested

Bit 0 – MBISTEN MBIST Enable bit ^(2)

ValueDescription
1MBIST test is armed; an MBIST test will execute at the next device Reset
0MBIST test is disarmed

4.4 Memory Resources

Many useful resources are provided on the main product page of the Microchip website for the devices listed in this data sheet. This product page contains the latest updates and additional information.

4.4.1 Paged Memory Scheme

The dsPIC33CK1024MP710 architecture extends the available Data Space through a paging scheme, which allows the available Data Space to be accessed using MOV instructions in a linear fashion for pre-modified and post-modified Effective Addresses (EAs). The upper half of the base Data Space address is used in conjunction with the Data Space Read Page (DSRPAG) register to form the Program Space Visibility (PSV) address.

The DSRPAG register is located in the SFR space. When DSRPAG[9] = 1 and the base address bit EA[15] = 1, the DSRPAG[8:0] bits are concatenated onto EA[14:0] to form the 24-bit PSV read address.

The paged memory scheme provides access to multiple 32-Kbyte windows in the PSV memory. The DSRPAG register, in combination with the upper half of the Data Space address, can provide up to 8 Mbytes of PSV address space. The paged data memory space is shown in Figure 4-9.

The Program Space (PS) can be accessed with a DSRPAG of 0x200 or greater. Only reads from PS are supported using the DSRPAG.

Figure 4-8. Program Space Visibility (PSV) Read Address Generation
Microchip dsPIC33CK1024MP708 - Paged Memory Scheme - 1

flowchart
graph TD
    A["16-Bit DS EA"] --> B["0"]
    B --> C["EA"]
    D["24-Bit PSV EA"] --> E["15 Bits"]
    E --> F["Byte Select"]
    G["Select DSRPAG"] --> H["1"]
    H --> I["DSRPAG[8:0"]]
    I --> J["DAIR"]
    K["DAIR"] --> L["DAIR[9"] = 1]
    L --> M["No EDS Access"]
    N["DAIR[9"] = 1] --> O["DAIR[15"]]
    P["DAIR[15"] = 1] --> Q["DAIR"]
    R["DAIR[15"] = 1] --> S["DAIR"]
    T["DAIR[15"] = 1] --> U["DAIR"]
    V["DAIR[15"] = 1] --> W["DAIR"]
    X["DAIR[15"] = 1] --> Y["DAIR"]
    Z["DAIR[15"] = 1] --> AA["DAIR"]
    AB["DAIR[15"] = 1] --> AC["DAIR"]
    AD["DAIR[15"] = 1] --> AE["DAIR"]
    AF["DAIR[15"] = 1] --> AG["DAIR"]
    AH["DAIR[15"] = 1] --> AI["DAIR"]
    AJ["DAIR[15"] = 1] --> AK["DAIR"]
    AL["DAIR[15"] = 1] --> AM["DAIR"]
    AN["DAIR[15"] = 1] --> AO["DAIR"]
    AP["DAIR[15"] = 1] --> AQ["DAIR"]
    AR["DAIR[15"] = 1] --> AS["DAIR"]
    AT["DAIR[15"] = 0 (DSRPAG = don't care)] --> AU["0"]
    AU --> AV["EA"]
    AW["Generate PSV Address"] --> AX["Select DSRPAG"]
    AX --> AY["DSRPAG[8:0"]]
    AY --> AZ["9 Bits"]
    AZ --> BA["15 Bits"]
    BB["24-Bit PSV EA"] --> BC["24-Bit PSV EA"]
    BC --> BD["Byte Select"]

Note: DS read access when DSRPAG = 0x000 will force an address error trap.

Figure 4-9. Paged Data Memory Space
Microchip dsPIC33CK1024MP708 - Paged Memory Scheme - 2

flowchart
graph TD
    A["Local Data Space"] --> B["DS_Addr[14:0"]]
    B --> C["0x0000"]
    C --> D["(DSRPAG = 0x200)<br>No Writes Allowed"]
    D --> E["0x7FFF"]
    E --> F["(DSRPAG = 0x2FF)<br>No Writes Allowed"]
    F --> G["0x0000"]
    G --> H["(DSRPAG = 0x300)<br>No Writes Allowed"]
    H --> I["0x7FFF"]
    I --> J["(DSRPAG = 0x3FF)<br>No Writes Allowed"]
    J --> K["0x0000"]
    K --> L["(DSRPAG = 0x3FF)<br>No Writes Allowed"]
    L --> M["0x7FFF"]
    M --> N["Program Space (Instruction & Data)"]
    N --> O["0x00_0000"]
    O --> P["Program Memory (Isw - [15:0"])]
    P --> Q["0x7F_FFFF"]
    Q --> R["Program Memory (MSB - [23:16"])]
    R --> S["0x00_0000"]
    S --> T["Table Address Space (TBLPAG[7:0"])]

    subgraph_DS_Addr["Local Data Space"]
        U["DS_Addr[15:0"]]
        V["SFR Registers"]
        W["Up to 61-Kbyte RAM(1)"]
        X["32-Kbyte PSV Window"]
    end

    subgraph TableAddressSpace
        Y["(TBLPAG = 0x00)<br>Isw Using TBLRD/TBLNTL, MSB Using TBLRD/TBLNTH"]
        Z["(TBLPAG = 0x7F)<br>Isw Using TBLRD/TBLNTL, MSB Using TBLRD/TBLNTH"]
    end

When a PSV page overflow or underflow occurs, EA[15] is cleared as a result of the register indirect EA calculation. An overflow or underflow of the EA in the PSV pages can occur at the page boundaries when:

• The initial address, prior to modification, addresses the PSV page
- The EA calculation uses Pre-Modified or Post-Modified Register Indirect Addressing; however, this does not include Register Offset Addressing

In general, when an overflow is detected, the DSRPAG register is incremented and the EA[15] bit is set to keep the base address within the PSV window. When an underflow is detected, the DSRPAG register is decremented and the EA[15] bit is set to keep the base address within the PSV window. This creates a linear PSV address space, but only when using Register Indirect Addressing modes.

Exceptions to the operation described above arise when entering and exiting the boundaries of Page 0 and PSV spaces. Table 4-2 lists the effects of overflow and underflow scenarios at different boundaries.

In the following cases, when overflow or underflow occurs, the EA[15] bit is set and the DSRPAG is not modified; therefore, the EA will wrap to the beginning of the current page:

  • Register Indirect with Register Offset Addressing
  • Modulo Addressing
  • Bit-Reversed Addressing

Table 4-2. Overflow and Underflow Scenarios at Page 0 and PSV Space Boundaries ^(2,3,4)

O/U, R/W OperationBefore After
DSRPAGDSEA[15]Page DescriptionDSRPAGDSEA[15]Page Description
O, Read[++Wn] or [Wn++]DSRPAG = 0x2FF1PSV: Last lsw pageDSRPAG = 0x3001PSV: First MSB page
O, ReadDSRPAG = 0x3FF1PSV: Last MSB pageDSRPAG = 0x3FF0See Note 1
U, Read[--Wn] or [Wn--]DSRPAG = 0x0011PSV page DSRPAG =0x0010See Note 1
U, ReadDSRPAG = 0x2001PSV: First lsw pageDSRPAG = 0x2000See Note 1
U, ReadDSRPAG = 0x3001PSV: First MSB pageDSRPAG = 0x2FF1PSV: Last lsw page

Legend: O = Overflow, U = Underflow, R = Read, W = Write

Notes:

  1. The Register Indirect Addressing now addresses a location in the base Data Space (0x0000-0x8000).
  2. An EDS access, with DSRPAG = 0x000, will generate an address error trap.
  3. Only reads from PS are supported using DSRPAG.
  4. Pseudolinear Addressing is not supported for large offsets.

4.4.1.1 Extended X Data Space

The lower portion of the base address space range, between 0x0000 and 0x7FFF, is always accessible, regardless of the contents of the Data Space Read Page register. It is indirectly addressable through the register indirect instructions. It can be regarded as being located in the default EDS Page 0 (i.e., EDS address range of 0x000000 to 0x007FFF with the base address bit, EA[15] = 0, for this address range). However, Page 0 cannot be accessed through the upper 32 Kbytes, 0x8000 to 0xFFFF, of base Data Space in combination with DSRPAG = 0x00. Consequently, DSRPAG is initialized to 0x001 at Reset.

Notes:

  1. DSRPAG should not be used to access Page 0. An EDS access with DSRPAG set to 0x000 will generate an address error trap.
  2. Clearing the DSRPAG in software has no effect.

The remaining PSV pages are only accessible using the DSRPAG register in combination with the upper 32 Kbytes, 0x8000 to 0xFFFF, of the base address, where the base address bit EA[15] = 1.

4.4.1.2 Software Stack

The W15 register serves as a dedicated Software Stack Pointer (SSP), and is automatically modified by exception processing, subroutine calls and returns; however, W15 can be referenced by any instruction in the same manner as all other W registers. This simplifies reading, writing and manipulating the Stack Pointer (for example, creating stack frames).

Note: To protect against misaligned stack accesses, W15[0] is fixed to '0' by the hardware.

W15 is initialized to 0x1000 during all Resets. This address ensures that the SSP points to valid RAM in all dsPIC33CK1024MP710 devices and permits stack availability for non-maskable trap exceptions. These can occur before the SSP is initialized by the user software. You can reprogram the SSP during initialization to any location within Data Space.

The Software Stack Pointer always points to the first available free word and fills the software stack, working from lower toward higher addresses. Figure 4-10 illustrates how it pre-decrements for a stack pop (read) and post-increments for a stack push (write).

When the PC is pushed onto the stack, PC[15:0] are pushed onto the first available stack word, then PC[22:16] are pushed into the second available stack location. For a PC push during any CALL instruction, the MSB of the PC is zero-extended before the push, as shown in Figure 4-10. During exception processing, the MSB of the PC is concatenated with the lower eight bits of the CPU STATUS Register, SR. This allows the contents of SRL to be preserved automatically during interrupt processing.

Notes:

  1. To maintain system Stack Pointer (W15) coherency, W15 is never subject to (EDS) paging, and is, therefore, restricted to an address range of 0x0000 to 0xFFFF. The same applies to the W14 when used as a Stack Frame Pointer (SFA = 1).
  2. As the stack can be placed in, and can access X and Y spaces, care must be taken regarding its use, particularly with regard to local automatic variables in a C development environment.

Figure 4-10. CALL Stack Frame
Microchip dsPIC33CK1024MP708 - Notes: - 1

text_image Stack Grows Toward Higher Address 15 0 CALL SUBR PC<15:1> W15 (before CALL) b:\00000000\ PC<22:16> W15 (after CALL)

4.4.2 Instruction Addressing Modes

The addressing modes shown in Table 4-3 form the basis of the addressing modes optimized to support the specific features of individual instructions. The addressing modes provided in the MAC class of instructions differ from those in the other instruction types.

Table 4-3. Fundamental Addressing Modes Supported

Addressing Mode Description
File Register DirectThe address of the file register is specified explicitly.
Register Direct The contents of a register are accessed directly.
Register Indirect The contents of Wn form the Effective Address (EA).
Register Indirect Post-ModifiedThe contents of Wn form the EA. Wn is post-modified (incremented or decremented) by a constant value.
Register Indirect Pre-ModifiedWn is pre-modified (incremented or decremented) by a signed constant value to form the EA.
Register Indirect with Register Offset (Register Indexed)The sum of Wn and Wb forms the EA.
Register Indirect with Literal OffsetThe sum of Wn and a literal forms the EA.

4.4.2.1 File Registration Instructions

Most file register instructions use a 13-bit address field (f) to directly address data present in the first 8192 bytes of data memory (Near Data Space). Most file register instructions employ a Working register, W0, which is denoted as WREG in these instructions. The destination is typically either the same file register or WREG (with the exception of the MUL instruction), which writes the result to a register or register pair. The MOV instruction allows additional flexibility and can access the entire Data Space.

4.4.2.2 MCU Instructions

The three-operand MCU instructions are of the form:

Operand 3 = Operand 1 [function] Operand 2

where Operand 1 is always a Working register (that is, the addressing mode can only be Register Direct), which is referred to as Wb. Operand 2 can be a W register fetched from data memory or a 5-bit literal. The result location can either be a W register or a data memory location. The following addressing modes are supported by MCU instructions:

  • Register Direct
  • Register Indirect
  • Register Indirect Post-Modified
  • Register Indirect Pre-Modified
  • 5-Bit or 10-Bit Literal

Note: Not all instructions support all the addressing modes given above. Individual instructions can support different subsets of these addressing modes.

4.4.2.3 Move and Accumulator Instructions

Move instructions, and the DSP accumulator class of instructions, provide a greater degree of addressing flexibility than other instructions. In addition to the addressing modes supported by most MCU instructions, move and accumulator instructions also support Register Indirect with Register Offset Addressing mode, also referred to as Register Indexed mode.

Note: For the MOV instructions, the addressing mode specified in the instruction can differ for the source and destination EA. However, the 4-bit Wb (Register Offset) field is shared by both source and destination (but typically only used by one).

In summary, the following addressing modes are supported by move and accumulator instructions:

  • Register Direct
  • Register Indirect
  • Register Indirect Post-Modified
  • Register Indirect Pre-Modified
  • Register Indirect with Register Offset (Indexed)
  • Register Indirect with Literal Offset
  • 8-Bit Literal
  • 16-Bit Literal

Note: Not all instructions support all the addressing modes given above. Individual instructions may support different subsets of these addressing modes.

4.4.2.4 MAC Instructions

The dual source operand DSP instructions (CLR, ED, EDAC, MAC, MPY, MPY . N, MOVSAC and MSC), also referred to as MAC instructions, use a simplified set of addressing modes to allow the user application to effectively manipulate the Data Pointers through register indirect tables.

The two-source operand prefetch registers must be members of the set {W8, W9, W10, W11}. For data reads, W8 and W9 are always directed to the X RAGU, and W10 and W11 are always directed to the Y AGU. The Effective Addresses generated (before and after modification) must therefore, be valid addresses within X Data Space for W8 and W9, and Y Data Space for W10 and W11.

Note: Register Indirect with Register Offset Addressing mode is available only for W9 (in X space) and W11 (in Y space).

In summary, the following addressing modes are supported by the MAC class of instructions:

  • Register Indirect
  • Register Indirect Post-Modified by 2
  • Register Indirect Post-Modified by 4
  • Register Indirect Post-Modified by 6
  • Register Indirect with Register Offset (Indexed)

4.4.2.5 Other Instructions

Besides the addressing modes outlined previously, some instructions use literal constants of various sizes. For example, BRA (branch) instructions use 16-bit signed literals to specify the branch destination directly, whereas the DISI instruction uses a 14-bit unsigned literal field. In some instructions, such as ULNK, the source of an operand or result is implied by the opcode itself. Certain operations, such as a NOP, do not have any operands.

4.4.3 Modulo Addressing

Modulo Addressing mode is a method of providing an automated means to support circular data buffers using hardware. The objective is to remove the need for software to perform data address boundary checks when executing tightly looped code, as is typical in many DSP algorithms.

Modulo Addressing can operate in either Data or Program Space (since the Data Pointer mechanism is essentially the same for both). One circular buffer can be supported in each of the X (which also provides the pointers into Program Space) and Y Data Spaces. Modulo Addressing can operate on any W Register Pointer. However, it is not advisable to use W14 or W15 for Modulo Addressing since these two registers are used as the Stack Frame Pointer and Stack Pointer, respectively.

In general, any particular circular buffer can be configured to operate in only one direction, as there are certain restrictions on the buffer start address (for incrementing buffers) or end address (for decrementing buffers), based upon the direction of the buffer.

The only exception to the usage restrictions is for buffers that have a power-of-two length. As these buffers satisfy the start and end address criteria, they can operate in a Bidirectional mode (that is, address boundary checks are performed on both the lower and upper address boundaries).

4.4.3.1 Start and End Address

The Modulo Addressing scheme requires that a starting and ending address be specified and loaded into the 16-bit Modulo Buffer Address registers: XMODSRT, XMODEND, YMODSRT and YMODEND.

Note: Y space Modulo Addressing EA calculations assume word-sized data (LSb of every EA is always clear).

The length of a circular buffer is not directly specified. It is determined by the difference between the corresponding start and end addresses. The maximum possible length of the circular buffer is 32K words (64 Kbytes).

4.4.3.2 W Address Register Selection

The Modulo and Bit-Reversed Addressing Control register, MODCON[15:0], contains enable flags, as well as a W register field to specify the W Address registers. The XWM and YWM fields select the registers that operate with Modulo Addressing:

  • If XWM = 1111, X RAGU and X WAGU Modulo Addressing is disabled
  • If YWM = 1111, Y AGU Modulo Addressing is disabled

The X Address Space Pointer W (XWM) register, to which Modulo Addressing is to be applied, is stored in MODCON[3:0]. Modulo Addressing is enabled for X Data Space when XWM is set to any value other than '1111' and the XMODEN bit is set (MODCON[15]).

The Y Address Space Pointer W (YWM) register, to which Modulo Addressing is to be applied, is stored in MODCON[7:4]. Modulo Addressing is enabled for Y Data Space when YWM is set to any value other than '1111' and the YMODEN bit is set (MODCON[14]).

Figure 4-11. Modulo Addressing Operation Example
Microchip dsPIC33CK1024MP708 - W Address Register Selection - 1

text_image Byte Address 0x1100 0x1163

Start Addr = 0x1100 End Addr = 0x1163 Length = 0x0032 words
MOV #0x1100, WO MOV WO, XMODSRT ;set modulo start address MOV #0x1163, WO MOV WO, MODEND ;set modulo end address MOV #0x8001, WO MOV WO, MODCON ;enable W1, X AGU for modulo
MOV #0x0000, W0 ;W0 holds buffer fill value MOV #0x1110, W1 ;point W1 to buffer
DO AGAIN, #0x31 ;fill the 50 buffer locations MOV W0, [W1++] ;fill the next location AGAIN: INC W0, W0 ;increment the fill value

4.4.4 Bit-Reversed Addressing

Bit-Reversed Addressing mode is intended to simplify data reordering for radix-2 FFT algorithms. It is supported by the X AGU for data writes only.

The modifier, which can be a constant value or register contents, is regarded as having its bit order reversed. The address source and destination are kept in normal order. Thus, the only operand requiring reversal is the modifier.

4.4.4.1 Bit-Reversed Addressing Implementation

Bit-Reversed Addressing mode is enabled in any of these situations:

  • BWMx bits (W register selection) in the MODCON register are any value other than '1111' (the stack cannot be accessed using Bit-Reversed Addressing)
    • The BREN bit is set in the XBREV register
  • The addressing mode used is Register Indirect with Pre-Increment or Post-Increment

If the length of a bit-reversed buffer is M = 2^N bytes, the last 'N' bits of the data buffer start address must be zeros.

The XB[14:0] bits are the Bit-Reversed Addressing modifier, or 'pivot point', which is typically a constant. In the case of an FFT computation, its value is equal to half of the FFT data buffer size.

Note: All bit-reversed EA calculations assume word-sized data (LSb of every EA is always clear). The XB value is scaled accordingly to generate compatible (byte) addresses.

When enabled, Bit-Reversed Addressing is executed only for Register Indirect with Pre-Increment or Post-Increment Addressing and word-sized data writes. It does not function for any other addressing mode or for byte-sized data, and normal addresses are generated instead. When Bit-Reversed Addressing is active, the W Address Pointer is always added to the address modifier (XB) and the offset associated with the Register Indirect Addressing mode is ignored. In addition, as word-sized data are a requirement, the LSb of the EA is ignored (and always clear).

Note: Modulo Addressing and Bit-Reversed Addressing can be enabled simultaneously using the same W register, but the Bit-Reversed Addressing operation will always take precedence for data writes when enabled.

If Bit-Reversed Addressing has already been enabled by setting the BREN (XBREV[15]) bit, a write to the XBREV register should not be immediately followed by an indirect read operation using the W register that has been designated as the Bit-Reversed Pointer.

Figure 4-12. Bit-Reversed Addressing Example
Microchip dsPIC33CK1024MP708 - Bit-Reversed Addressing Implementation - 1

text_image Sequential Address b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 0 ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b1 b2 b3 b4 0 Bit Locations Swapped Left-to-Right Around Center of Binary Value Bit-Reversed Address Pivot Point XB = 0x0008 for a 16-Word Bit-Reversed Buffer

Table 4-4. Bit-Reversed Addressing Sequence (16-Entry)

Normal Address Bit-Reversed Address
A3 A2 A1 A0 Decimal A3 A2 A1 A0 Decimal
0 0 0 000 0 0 00
0 0 0 111 0 0 08
0 0 1 020 1 0 04
0 0 1 131 1 0 012
0 1 0 040 0 1 02
0 1 0 151 0 1 010
0 1 1 060 1 1 06
0 1 1 171 1 1 014
1 0 0 080 0 0 11
1 0 0 191 0 0 19
1 0 1 0100 1 0 15
1 0 1 1111 1 0 113
1 1 0 0120 0 1 13
1 1 0 1131 0 1 111
1 1 1 0140 1 1 17
1 1 1 1151 1 1 115

4.4.5 Interfacing Program and Data Memory Spaces

The dsPIC33CK1024MP710 family architecture uses a 24-bit wide Program Space (PS) and a 16-bit wide Data Space (DS). The architecture is also a modified Harvard scheme, meaning that data can also be present in the Program Space. To use these data successfully, they must be accessed in a way that preserves the alignment of information in both spaces.

Aside from normal execution, the architecture of the dsPIC33CK1024MP710 family devices provides two methods by which Program Space can be accessed during operation:

  • Using table instructions to access individual bytes or words anywhere in the Program Space
  • Remapping a portion of the Program Space into the Data Space (Program Space Visibility)

Table instructions allow an application to read or write to small areas of the program memory. This capability makes the method ideal for accessing data tables that need to be updated periodically. It also allows access to all bytes of the program word. The remapping method allows an application to access a large block of data on a read-only basis, which is ideal for look ups from a large table of static data. The application can only access the least significant word of the program word.

Table 4-5. Program Space Address Construction

Access TypeAccess SpaceProgram Space Address
[23] [22:16] [15] [14:1] [0]
Instruction Access (Code Execution)User0PC[22:1]0
0xxx xxxx xxxx xxxx xxxx xxxx 0
TBLRD/TBLWT (Byte/Word Read/Write)User TBLPAG[7:0] Data EA[15:0]
0xxx xxxx xxxx xxxx xxxx xxxx
ConfigurationTBLPAG[7:0] Data EA[15:0]
1xxx xxxx xxxx xxxx xxxx xxxx

Figure 4-13. Data Access from Program Space Address Generation
Microchip dsPIC33CK1024MP708 - Interfacing Program and Data Memory Spaces - 1

flowchart
graph TD
    A["Program Counter(1)"] --> B["0"]
    B --> C["Program Counter"]
    C --> D["0"]
    D --> E["23 Bits"]
    E --> F["EA"]
    F --> G["1/0"]
    G --> H["Table Operations(2)"]
    H --> I["1/0"]
    I --> J["TBLPAG"]
    J --> K["8 Bits"]
    K --> L["16 Bits"]
    L --> M["24 Bits"]
    M --> N["User/Configuration Space Select"]
    M --> O["Byte Select"]

Note 1: The Least Significant bit (LSb) of Program Space addresses is always fixed as '0' to maintain word alignment of data in the Program and Data Spaces.
2: Table operations are not required to be word-aligned. Table Read operations are permitted in the configuration memory space.

4.4.5.1 Data Access from Program Memory Using Table Instructions

The TBLRDL and TBLWTL instructions offer a direct method of reading or writing the lower word of any address within the Program Space without going through Data Space. The TBLRDH and TBLWTH instructions are the only method to read or write the upper eight bits of a Program Space word as data.

The PC is incremented by two for each successive 24-bit program word. This allows program memory addresses to directly map to Data Space addresses. Program memory can thus be regarded as two 16-bit wide word address spaces, residing side by side, each with the same address range. TBLRDL and TBLWTL access the space that contains the least significant data word. TBLRDH and TBLWTH access the space that contains the upper data byte.

Two table instructions are provided to move byte or word-sized (16-bit) data to and from Program Space. Both function as either byte or word operations.

• TBLRDL (Table Read Low):

  • In Word mode, this instruction maps the lower word of the Program Space location (P[15:0]) to a data address (D[15:0]).
  • In Byte mode, either the upper or lower byte of the lower program word is mapped to the lower byte of a data address. The upper byte is selected when Byte Select is '1'; the lower byte is selected when it is '0'.

• TBLRDH (Table Read High):

  • In Word mode, this instruction maps the entire upper word of a program address (P[23:16]) to a data address. The 'phantom' byte (D[15:8]) is always '0'.
  • In Byte mode, this instruction maps the upper or lower byte of the program word to D[7:0] of the data address in the TBLRDL instruction. The data are always '0' when the upper 'phantom' byte is selected (Byte Select = 1).

In a similar fashion, two table instructions, TBLWTH and TBLWTL, are used to write individual bytes or words to a Program Space address. The details of their operation are explained in 5. Flash Program Memory.

For all table operations, the area of program memory space to be accessed is determined by the Table Page register (TBLPAG). TBLPAG covers the entire program memory space of the device, including user application and configuration spaces. When TBLPAG[7] = 0, the table page is located in the user memory space. When TBLPAG[7] = 1, the page is located in configuration space.

Figure 4-14. Accessing Program Memory with Table Instructions
Microchip dsPIC33CK1024MP708 - Data Access from Program Memory Using Table Instructions - 1

flowchart
graph TD
    A["TBLPAG 02"] --> B["Program Space"]
    B --> C["0x0000000"]
    B --> D["0x020000"]
    B --> E["0x030000"]
    C --> F["Phantom' Byte"]
    D --> F
    E --> F
    F --> G["TBLRDH.B (Wn[0"] = 0)]
    F --> H["TBLRDL.B (Wn[0"] = 1)]
    F --> I["TBLRDL.B (Wn[0"] = 0)]
    F --> J["TBLRDL.W"]

The address for the table operation is determined by the data EA within the page defined by the TBLPAG register. Only read operations are shown; write operations are also valid in the user memory area.

5. Flash Program Memory

Note: This data sheet summarizes the features of the dsPIC33CK1024MP710 family of devices. It is not intended to be a comprehensive reference source. To complement the information in this data sheet, refer to “Dual Partition Flash Program Memory” (www.microchip.com/DS70005156).

Some registers and associated bits described in this section may not be available on all devices.

The dsPIC33CK1024MP710 family devices contain internal Flash program memory for storing and executing application code. The memory is readable, writable and erasable during normal operation over the entire V_DD range.

Flash memory can be programmed in three ways:

  • In-Circuit Serial Programming ^TM (ICSP ^TM ) programming capability
    • Enhanced In-Circuit Serial Programming (Enhanced ICSP)
    • Run-Time Self-Programming (RTSP)

ICSP allows for a dsPIC33CK1024MP710 family device to be serially programmed while in the end application circuit. This is done with a Programming Clock and Programming Data (PGCx/PGDx) line, and three other lines for power ( V_DD ), ground ( V_SS ) and Master Clear ( ). This allows customers to manufacture boards with unprogrammed devices and then program the device just before shipping the product. This also allows the most recent firmware or a custom firmware to be programmed.

Enhanced In-Circuit Serial Programming uses an on-board bootloader, known as the Program Executive, to manage the programming process. Using an SPI data frame format, the Program Executive can erase, program and verify program memory. For more information on Enhanced ICSP, see the device programming specification.

RTSP allows the Flash user application code to update itself during run time. The feature is capable of writing a single program memory word (two instructions) or an entire row as needed.

5.1 Table Instructions and Flash Programming

Regardless of the method used, all programming of Flash memory is done with the Table Read and Table Write instructions. These allow direct read and write access to the program memory space from the data memory while the device is in normal operating mode. The 24-bit target address in the program memory is formed using bits[7:0] of the TBLPAG register and the Effective Address (EA) from a W register, specified in the table instruction, as shown in Figure 5-1. The TBLRDL and TBLWTL instructions are used to read or write to bits[15:0] of program memory. TBLRDL and TBLWTL can access program memory in both Word and Byte modes. The TBLRDH and TBLWTH instructions are used to read or write to bits[23:16] of program memory. TBLRDH and TBLWTH can also access program memory in Word or Byte mode.

Figure 5-1. Addressing for Table Registers
Microchip dsPIC33CK1024MP708 - Table Instructions and Flash Programming - 1

text_image Using Program Counter 24 Bits 0 Program Counter 0 Working Reg EA Using Table Instruction 1/0 TBLPAG Reg 8 Bits 16 Bits User/Configuration Space Select 24-Bit EA Byte Select

5.2 RTSP Operation

RTSP allows the user application to program one double instruction word or one row at a time. The double instruction word write blocks and single row write blocks are edge-aligned, from the beginning of program memory, on boundaries of one double instruction word and 64 double instruction words, respectively.

The basic sequence for RTSP programming is to first load two 24-bit instructions into the NVM write latches found in configuration memory space. Then, the WR bit in the NVMCON register is set to initiate the write process. The processor stalls (waits) until the programming operation is finished. The WR bit is automatically cleared when the operation is finished.

Double instruction word writes are performed by manually loading both write latches, using TBLWTL and TBLWTH instructions, and then initiating the NVM write while the NVMOPx bits are set to '0x1'. The Program Space destination address is defined by the NVMADR/U registers.

Row programming is performed by first loading 128 instructions into data RAM and then loading the address of the first instruction in that row into the NVMSRCADRL/H registers. Once the write has been initiated, the device will automatically load two instructions into the write latches and write them to the Program Space destination address defined by the NVMADR/U registers.

The operation will increment the NVMSRCADRL/H and the NVMADR/U registers until all double instruction words have been programmed.

The RPDF bit (NVMCON[9]) selects the format of the stored data in RAM to be either compressed or uncompressed. See Figure 5-2 for data formatting.

Compressed data help to reduce the amount of required RAM by using the upper byte of the second word for the MSB of the second instruction.

All erase and program operations may optionally use the NVM interrupt to signal the successful completion of the operation.

Figure 5-2. Uncompressed/Compressed Format
Microchip dsPIC33CK1024MP708 - RTSP Operation - 1

text_image 15 7 0 LSW1 Even Byte Address MSB10x00 LSW2 MSB20x00 Increasing Address UNCOMPRESSED FORMAT (RPDF = 0)

Microchip dsPIC33CK1024MP708 - RTSP Operation - 2

text_image 15 7 0 LSW1 Even Byte Address Address MSB1MSB2 LSW2 COMPRESSED FORMAT (RPDF = 1)

Example 5-1. Flash Write/Read

/////Flash write///////
//Sample code for writing 0x123456 to address locations 0x10000 / 10002
NVMCON = 0x4001;
TBLPAG = 0xFA;    // write latch upper address
NVMADR = 0x0000;    // set target write address of general segment
NVMADRU = 0x0001;
__builtin_tblwtl(0, 0x3456);    // load write latches
__builtin_tblwth (0,0x12);
__builtin_tblwtl(2, 0x3456);    // load write latches
__builtin_tblwth (2,0x12);
asm volatile ("disi #5");
__builtin_write_NVM();
while(_WR == 1);
/////Flash Read///////
//Sample code to read the Flash content of address 0x10000
// readDataL/ readDataH variables need to defined
TBLPAG = 0x0001;
readDataL = __builtin_tblrdl(0x0000);
readDataH = __builtin_tblrdh(0x0000); 

5.3 Error Correcting Code (ECC)

In order to improve program memory performance and durability, the devices include Error Correcting Code functionality (ECC) as an integral part of the Flash memory controller. ECC can determine the presence of single-bit errors in program data, including which bit is in error, and correct the data automatically without user intervention. ECC cannot be disabled.

When data are written to program memory, ECC generates a 7-bit Hamming code parity value for every two (24-bit) instruction words. The data are stored in blocks of 48 data bits and seven parity bits; parity data are not memory-mapped and are inaccessible. When the data are read back, the ECC calculates the parity on them and compares it to the previously stored parity value. If a parity mismatch occurs, there are two possible outcomes:

  • Single-bit error has occurred and has been automatically corrected on read-back.
  • Double-bit error has occurred and the read data are not changed.

Single-bit error occurrence can be identified by the state of the ECCSBEIF (IFS0[13]) bit. An interrupt can be generated when the corresponding interrupt enable bit is set, ECCSBEIE (IEC0[13]). The ECCSTATL register contains the parity information for single-bit errors. The SECOUT[7:0] bit field contains the expected calculated SEC parity and SECIN[7:0] bits contain the actual value from a Flash read operation. The SECSYNDx bits (ECCSTATH[7:0]) indicate the bit position of the single-bit error within the 48-bit pair of instruction words. When no error is present, SECINx equals SECOUTx and SECSYNDx is zero.

Double-bit errors result in a generic hard trap. The ECCDBE bit (INTCON4[1]) will be set to identify the source of the hard trap. If no Interrupt Service Routine is implemented for the hard trap, a device Reset will also occur. The ECCSTATH register contains double-bit error status information. The DEDOUT bit is the expected calculated DED parity and DEDIN is the actual value from a Flash read operation. When no error is present, DEDIN equals DEDOUT.

5.4 ECC Fault Injection

To test Fault handling, an EEC error can be generated. Both single and double-bit errors can be generated in both the read and write data paths. Read path Fault injection first reads the Flash data and then modifies them prior to entering the ECC logic. Write path Fault injection modifies the actual data prior to them being written into the target Flash and will cause an EEC error on a subsequent Flash read. The following procedure is used to inject a Fault:

  1. Load the Flash target address into the ECCADDR register.
  2. Select 1st Fault bit determined by FLT1PTRx (ECCCONH[7:0]). The target bit is inverted to create the Fault.
  3. If a double Fault is desired, select the 2nd Fault bit determined by FLT2PTRx (ECCCONH[15:8]); otherwise, set to all '1's.
  4. Write 0x55 to NVMKEY.
  5. Write 0xAA to NVMKEY.
  6. Set the FLTINJ bit (ECCCONL[0]) in a single operation to enable the ECC Fault injection logic.
  7. Perform a read or write to the Flash target address.

5.5 Flash OTP by ICSP ^TM Write Inhibit

ICSP Write Inhibit is an access restriction feature, that when activated, restricts all of Flash memory. Once activated, ICSP Write Inhibit permanently prevents ICSP Flash programming and erase operations, and cannot be deactivated. This feature is intended to prevent alteration of Flash memory contents, with behavior similar to One-Time-Programmable (OTP) devices.

RTSP, including erase and programming operations, is not restricted when ICSP Write Inhibit is activated; however, code to perform these actions must be programmed into the device before ICSP Write Inhibit is activated. This allows for a bootloader-type application to alter Flash contents with ICSP Write Inhibit activated.

Entry into ICSP and Enhanced ICSP modes is not affected by ICSP Write Inhibit. In these modes, it will continue to be possible to read configuration memory space and any user memory space regions which are not code-protected. With ICSP writes inhibited, an attempt to set WR (NVMCON[15]) = 1 will maintain WR = 0, and instead, set WRERR (NVMCON[13]) = 1. All Enhanced ICSP erase and programming commands will have no effect with

self-checked programming commands returning a FAIL response opcode (PASS if the destination already exactly matched the requested programming data).

Once ICSP Write Inhibit is activated, it is not possible for a device executing in Debug mode to erase/write Flash, nor can a debug tool switch the device to Production mode. ICSP Write Inhibit should therefore only be activated on devices programmed for production.

5.6 Dual Partition Flash Configuration

For dsPIC33CK1024MP710 devices operating in Dual Partition Flash Program Memory modes, the Inactive Partition can be erased and programmed without stalling the processor. The same programming algorithms are used for programming and erasing the Flash in the Inactive Partition, as described in 5.2. RTSP Operation. On top of the page erase option, the entire Flash memory of the Inactive Partition can be erased by configuring the NVMOP[3:0] bits in the NVMCON register.

Note: The application software to be loaded into the Inactive Partition will have the address of the Active Partition. The bootloader firmware will need to offset the address by 0x400000 in order to write to the Inactive Partition.

5.6.1 Flash Partition Swapping

The Boot Sequence Number is used for determining the Active Partition at start-up and is encoded within the FBTSEQ Configuration register bits. Unlike most Configuration registers, which only utilize the lower 16 bits of the program memory, FBTSEQ is a 24-bit Configuration Word. The Boot Sequence Number (BSEQ) is a 12-bit value and is stored in FBTSEQ twice. The true value is stored in bits, FBTSEQ[11:0], and its complement is stored in bits, FBTSEQ[23:12]. Should a Boot sequence number be invalid (or unprogrammed), it will be overridden to value 0x000FFF prior to analysis (i.e., the highest possible Boot sequence number). The FC will then compare the Boot sequence numbers and make the panel with the lowest Boot sequence number the Active panel. If both Boot sequence numbers are equal (which will also occur if they are both invalid), the FC will select the default panel (Panel 1) to be the Active Boot region. Should either or both Boot sequence number reads result in an ECC DED error, an ECC DERR trap will requested, otherwise no notification is issued for equal Boot sequence numbers (because this is typically not a run-time error). See 30. Special Features for more information.

The BOOTSWP instruction provides an alternative means of swapping the Active and Inactive Partitions (soft swap) without the need for a device Reset. The BOOTSWP must always be followed by a GOTO instruction. The BOOTSWP instruction swaps the Active and Inactive Partitions, and the PC vectors to the location specified by the GOTO instruction in the newly Active Partition.

It is important to note that interrupts should temporarily be disabled while performing the soft swap sequence and that after the partition swap, all peripherals and interrupts, which were enabled, remain enabled. Additionally, the RAM and stack will maintain state after the switch. As a result, it is recommended that applications using soft swaps jump to a routine that will reinitialize the device in order to ensure the firmware runs as expected. The Configuration registers will have no effect during a soft swap.

For robustness of operation, in order to execute the BOOTSWP instruction, it is necessary to execute the NVM unlocking sequence as follows:

  1. Write 0x55 to NVMKEY.
  2. Write 0xAA to NVMKEY.
  3. Execute the BOOTSWP instruction.

If the unlocking sequence is not performed, the BOOTSWP instruction will be executed as a forced NOP and a GOTO instruction, following the BOOTSWP instruction, will be executed, causing the PC to jump to that location in the current operating partition.

The SFTSWP and P2ACTIV bits in the NVMCON register are used to determine a successful swap of the Active and Inactive Partitions, as well as which partition is active. After the BOOTSWP and GOTO instructions, the SFTSWP bit should be polled to verify the partition swap has occurred and then cleared for the next panel swap event.

5.6.2 Dual Partition Modes

While operating in Dual Partition mode, the dsPIC33CK1024MP710 family devices have the option for both partitions to have their own defined security segments, as shown in 30.10. Code Protection and CodeGuard™ Security. Alternatively, the device can operate in Protected Dual Partition mode, where Partition 1 becomes permanently erase/write-protected. Protected Dual Partition mode allows for a "Factory Default" mode, which provides a fail-safe backup image to be stored in Partition 1.

dsPIC33CK1024MP710 family devices can also operate in Privileged Dual Partition mode, where additional security protections are implemented to allow for protection of intellectual property when multiple parties have software within the device. In Privileged Dual Partition mode, both partitions place additional restrictions on the FBSLIM register. These prevent changes to the size of the Boot Segment and General Segment, ensuring that neither segment will be altered.

Figure 5-3. Relationship Between Partitions 1/2 and Active/Inactive Partitions
Microchip dsPIC33CK1024MP708 - Dual Partition Modes - 1

flowchart
graph TD
    subgraph Active Partition
        A1["Partition 1\nBSEQ = 10"] -->|BOOTSWP Instruction| B1["Partition 2\nBSEQ = 15"]
        B1 -->|Reset| C1["Partition 1\nBSEQ = 10"]
    end
    subgraph Inactive Partition
        A2["Partition 2\nBSEQ = 15"] -->|Reprogram BSEQ| B2["Partition 1\nBSEQ = 10"]
        B2 -->|Reset| C2["Partition 2\nBSEQ = 5"]
    end
    A1 --> B1 --> C1
    A2 --> B2 --> C2
    style Active Partition fill:#f9f,stroke:#333
    style Inactive Partition fill:#bbf,stroke:#333

5.7 NVM/ECC Control Registers

OffsetNameBit Pos. 7 6 54 3 2 1 0
0xF0ECCCONL15:8
7:0FLTINJ
0xF2ECCCONH15:8 FLT2PTR[7:0]
7:0 FLT1PTR[7:0]
0xF4ECCADDRL15:8ECCADDR[15:8]
7:0 ECCADDR[7:0]
0xF6ECCADDRH15:8
7:0ECCADDR[23:16]
0xF8ECCSTATL15:8SECOUT[7:0]
7:0SECIN[7:0]
0xFAECCSTATH15:8DEDOUTDEDIN
7:0SECSYND[7:0]
0xFC...0x08CFReserved
0x08D0NVMCON15:8WRWRENWRERRNVMSIDLSFTSWPP2ACTIVRPDFURERR
7:0NVMOP[3:0]
0x08D2NVMADR15:8NVMADR[15:8]
7:0 NVMADR[7:0]
0x08D4NVMADRU15:8
7:0NVMADRU[23:16]
0x08D6NVMKEY15:8
7:0NVMKEY[7:0]
0x08D8NVMSRCADRL15:8NVMSRCADR[15:8]
7:0NVMSRCADR[7:0]
0x08DANVMSRCADRH15:8
7:0NVMSRCADR[23:16]

5.7.1 Nonvolatile Memory (NVM) Control Register

Name: NVMCON

Offset: 0x8D0

Notes:

  1. These bits can only be reset on a POR.
  2. If this bit is set, there will be minimal power savings (I IDLE), and upon exiting Idle mode, there is a delay (TVREG) before Flash memory becomes operational.
  3. All other combinations of NVMOP[3:0] are unimplemented.
  4. Execution of the PWRSAV instruction is ignored while any of the NVM operations are in progress.
  5. Two adjacent words on a 4-word boundary are programmed during execution of this operation.

Legend: C = Clearable bit; SO = Settable Only bit

Bit 15 14 13 12 11 10 9 8

WR WRENWRERR NVMSIDL SFTSWP P2ACTIV RPDFURERR
AccessR/SOR/WR/CR/WR/CRR/WR/C
Reset0 0 0 0 0 0 0

Bit 76543210

NVMOP[3:0]
AccessR/WR/WR/WR/W
Reset0 0 0 0

Bit 15 - WR Write Control bit ^(1)

ValueDescription
1Initiates a Flash memory program or erase operation; the operation is self-timed and the bit is cleared by hardware once the operation is complete
0Program or erase operation is complete and inactive

Bit 14 – WREN Write Enable bit ^(1)

ValueDescription
1Enables Flash program/erase operations
0Inhibits Flash program/erase operations

Bit 13 - WRERR Write Sequence Error Flag bit ^(1)

ValueDescription
1An improper program or erase sequence attempt, or termination has occurred (bit is set automatically on any set attempt of the WR bit)
0The program or erase operation completed normally

Bit 12 - NVMSIDL NVM Stop in Idle Control bit ^(2)

ValueDescription
1Flash voltage regulator goes into Standby mode during Idle mode
0Flash voltage regulator is active during Idle mode

Bit 11 – SFTSWP Partition Soft Swap Status bit

ValueDescription
1Partitions have been successfully swapped using the BOOTSWP instruction (soft swap)
0Awaiting successful partition swap using the BOOTSWP instruction or a device Reset will determine the Active Partition based on the FBTSEQ register

Bit 10 – P2ACTIV Partition 2 Active Status bit

Value Description
1Partition 2 Flash is mapped into the active region
0Partition 1 Flash is mapped into the active region

Bit 9 – RPDF Row Programming Data Format bit

Value Description
1Row data to be stored in RAM are in compressed format
0Row data to be stored in RAM are in uncompressed format

Bit 8 – URERR Row Programming Data Underrun Error bit

Value Description
1Indicates row programming operation has been terminated
0No data underrun error is detected

Bits 3:0 – NVMOP[3:0] NVM Operation Select bits ^(1,3,4)

Value Description
1111Reserved
1110User memory bulk erase operation
1101Reserved
1100Reserved
1011Reserved
1010Reserved
1001Reserved
1000Boot mode (FBOOT) double-word program operation
0111Reserved
0101Reserved
0100Inactive Partition memory erase operation
0011Memory page erase operation
0010Memory row program operation
0001 Memory double-word operation^(5)
0000Reserved

5.7.2 Nonvolatile Memory Lower Address Register

Name: NVMADR

Offset: 0x8D2

Legend: x = Bit is unknown

Bit 15 14 13 12 11 10 9 8

NVMADR[15:8]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset xxxxxxxx

Bit 76543210

NVMADR[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset xxxxxxxx

Bits 15:0 – NVMADR[15:0] Nonvolatile Memory Lower Write Address bits

Selects the lower 16 bits of the location to program or erase in Program Flash Memory. This register may be read or written to by the user application.

5.7.3 Nonvolatile Memory Upper Address Register

Name: NVMADRU

Offset: 0x8D4

Legend: x = Bit is unknown

Bit 15 14 13 12 11 10 9 8

Access

Reset

Bit 76543210

Microchip dsPIC33CK1024MP708 - Nonvolatile Memory Upper Address Register - 1

text_image NVMADRU[23:16]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset xxxxxxxx

Bits 7:0 – NVMADRU[23:16] Nonvolatile Memory Upper Write Address bits

Selects the upper eight bits of the location to program or erase in Program Flash Memory. This register may be read or written to by the user application.

5.7.4 Nonvolatile Memory Key Register

Name: NVMKEY
Offset: 0x8D6

Microchip dsPIC33CK1024MP708 - Nonvolatile Memory Key Register - 1

text_image Bit 15 14 13 12 11 10 9 8 Access Reset Bit 7 6 5 4 3 2 1 0 NVMKEY[7:0] Access WWWWWWWW Reset 0 0 0 0 0 0 0

Bits 7:0 – NVMKEY[7:0] NVM Key Register bits (write-only)

5.7.5 NVM Source Data Address Register Low

Name: NVMSRCADRL Offset: 0x8D8

Bit 15 14 13 12 11 10 9 8
NVMSRCADR[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
NVMSRCADR[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0

Bits 15:0 – NVMSRCADR[15:0] NVM Source Data Address bits

The RAM address of the data to be programmed into Flash when the NVMOP[3:0] bits are set to row programming.

5.7.6 NVM Source Data Address Register High

Name: NVMSRCADRH Offset: 0x8DA

Microchip dsPIC33CK1024MP708 - NVM Source Data Address Register High - 1

text_image Bit 15 14 13 12 11 10 9 8 Access Reset Bit 7 6 5 4 3 2 1 0 NVMSRCADR[23:16] Access R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0

Bits 7:0 – NVMSRCADR[23:16] NVM Source Data Address bits

The RAM address of the data to be programmed into Flash when the NVMOP[3:0] bits are set to row programming.

5.7.7 ECC Fault Injection Configuration Register Low

Name: ECCCONL Offset: 0x0F0

Microchip dsPIC33CK1024MP708 - ECC Fault Injection Configuration Register Low - 1

text_image Bit 15 14 13 12 11 10 9 8 Access Reset Bit 7 6 5 4 3 2 1 0 Access Reset 0 FLTINJ R/W

Bit 0 - FLTINJ Fault Injection Sequence Enable bit

Value Description
1Enabled
0Disabled

5.7.8 ECC Fault Injection Configuration Register High

Name: ECCCONH Offset: 0x0F2

Bit 15 14 13 12 11 10 9 8

Access R/W R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0

Bit 76543210

Access R/W R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0

FLT2PTR[7:0]

Bits 15:8 – FLT2PTR[7:0] ECC Fault Injection Bit Pointer 2 bits

Value Description
1111111-00111000No Fault injection occurs
00110111Fault injection (bit inversion) occurs on bit 55 of ECC bit order
. . .
00000001Fault injection (bit inversion) occurs on bit 1 of ECC bit order
00000000Fault injection (bit inversion) occurs on bit 0 of ECC bit order

Bits 7:0 – FLT1PTR[7:0] ECC Fault Injection Bit Pointer 1 bits

Value Description
11111111-00111000No Fault injection occurs
00110111Fault injection occurs on bit 55 of ECC bit order
. . .
00000001Fault injection occurs on bit 1 of ECC bit order
00000000Fault injection occurs on bit 0 of ECC bit order

5.7.9 ECC Fault Inject Address Compare Register Low

Name: ECCADDRL

Offset: 0x0F4

Bit 15 14 13 12 11 10 9 8

ECCADDR[15:8]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

ECCADDR[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 15:0 – ECCADDR[15:0] ECC Fault Injection NVM Address Match Compare bits

5.7.10 ECC Fault Inject Address Compare Register High

Name: ECCADDRH

Offset: 0x00F6

Microchip dsPIC33CK1024MP708 - ECC Fault Inject Address Compare Register High - 1

text_image Bit 15 14 13 12 11 10 9 8 Access Reset Bit 7 6 5 4 3 2 1 0 ECCADDR[23:16] Access R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0

Bits 7:0 – ECCADDR[23:16] ECC Fault Injection NVM Address Match Compare bits

5.7.11 ECC System Status Display Register Low

Name: ECCSTATL Offset: 0x0F8

Bit 15 14 13 12 11 10 9 8
SECOUT[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
SECIN[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0

Bits 15:8 – SECOUT[7:0] Calculated Single Error Correction Parity Value bits

Bits 7:0 – SECIN[7:0] Read Single Error Correction Parity Value bits SECIN[7:0] bits are the actual parity value of a Flash read operation.

5.7.12 ECC System Status Display Register High

Name: ECCSTATH

Offset: 0x00FA

Bit 15 14 13 12 11 10 9 8

DEDOUT DEDIN
Access Reset 0 0R/W R/W

Bit 76543210

SECSYND[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 9 – DEDOUT Calculated Dual Bit Error Detection Parity bit

Bit 8 – DEDIN Read Dual Bit Error Detection Parity bit

DEDIN is the actual parity value of a Flash read operation.

Bits 7:0 – SECSYND[7:0] Calculated ECC Syndrome Value bits

Indicates the bit location that contains the error.

6. Resets

This data sheet summarizes the features of the dsPIC33CK1024MP710 family of devices. It is not intended to be a comprehensive reference source. To complement the information in this data sheet, refer to "Reset" (www.microchip.com/DS70602).

The Reset module combines all Reset sources and controls the device Reset Signal, SYSRST. The following is a list of device Reset sources:

  • POR: Power-on Reset
    • BOR: Brown-out Reset
    • MCLR: Master Clear Pin Reset
    • SWR: RESET Instruction
    • WDTO: Watchdog Timer Time-out Reset
    • CM: Configuration Mismatch Reset
    • TRAPR: Trap Conflict Reset
    • IOPUWR: Illegal Condition Device Reset
  • Illegal Opcode Reset
  • Uninitialized W Register Reset
  • Security Reset

A simplified block diagram of the Reset module is shown in Figure 6-1.

Figure 6-1. Reset System Block Diagram
Microchip dsPIC33CK1024MP708 - Resets - 1

flowchart
graph TD
    A["MCLR"] --> B["RESET Instruction"]
    B --> C["Glitch Filter"]
    C --> D["AND Gate"]
    D --> E["BOR"]
    F["VDD"] --> G["Internal Regulator"]
    G --> H["VDD Rise Detect"]
    H --> I["POR"]
    I --> J["AND Gate"]
    J --> K["SYSRST"]
    L["WDT Module\nSleep or Idle"] --> D
    M["Trap Conflict"] --> J
    N["Illegal Opcode"] --> J
    O["Uninitialized W Register"] --> J
    P["Security Reset"] --> J
    Q["Configuration Mismatch"] --> J

Any active source of Reset will make the SYSRST signal active. On system Reset, some of the registers associated with the CPU and peripherals are forced to a known Reset state, and some are unaffected.

Note: Refer to the specific peripheral section or 4. Memory Organization of this data sheet for register Reset states.

All types of device Reset set a corresponding status bit in the RCON register to indicate the type of Reset.

A POR clears all the bits, except for the BOR and POR bits (RCON[1:0]) that are set. The user application can set or clear any bit, at any time, during code execution. The RCON bits only serve as status bits. Setting a particular Reset status bit in software does not cause a device Reset to occur.

The RCON register also has other bits associated with the Watchdog Timer and device Power-Saving states. The function of these bits is discussed in other sections of this manual.

Note: The status bits in the RCON register should be cleared after they are read so that the next RCON register value after a device Reset is meaningful.

For all Resets, the default clock source is determined by the FNOSC[2:0] bits in the FOSCSEL Configuration register. The value of the FNOSCx bits is loaded into the NOSC[2:0] (OSCCON[10:8]) bits on Reset, which in turn, initializes the system clock.

6.1 Reset Resources

Many useful resources are provided on the main product page of the Microchip website for the devices listed in this data sheet. This product page contains the latest updates and additional information.

6.1.1 Key Resources

  • "Reset" (www.microchip.com/DS70602)
  • Code Samples
  • Application Notes
  • Software Libraries
  • Webinars
  • Development Tools

6.1.2 Reset Control Register

Name: RCON (1)

Offset: 0xF80

Notes:

  1. All of the Reset status bits can be set or cleared in software. Setting one of these bits in software does not cause a device Reset.
  2. If the FWDTEN Configuration bit is '1' (unprogrammed), the WDT is always enabled, regardless of the SWDTEN bit setting.

Bit 15 14 13 12 11 10 9 8

TRAPR IOPUWRCM VREGS
AccessR/WR/WR/WR/W
Reset0 00 0

Bit 76543210

EXTRSWRSWDTENWDTOSLEEPIDLEBORPOR
AccessR/WR/WR/WR/WR/WR/WR/WR/W
Reset0 0 0 0 0 1 1

Bit 15 - TRAPR Trap Reset Flag bit

ValueDescription
1A Trap Conflict Reset has occurred
0A Trap Conflict Reset has not occurred

Bit 14 - IOPUWR Illegal Opcode or Uninitialized W Register Access Reset Flag bit

ValueDescription
1An Illegal Opcode, an Illegal Address mode or Uninitialized W Register used as an Address Pointer caused a Reset
0An Illegal Opcode or Uninitialized W Register Reset has not occurred

Bit 9 – CM Configuration Mismatch Flag bit

ValueDescription
1A Configuration Mismatch Reset has occurred
0A Configuration Mismatch Reset has not occurred

Bit 8 – VREGS Voltage Regulator Standby During Sleep bit

ValueDescription
1Voltage regulator is active during Sleep
0Voltage regulator goes into Standby mode during Sleep

Bit 7 - EXTR External Reset (MCLR) Pin bit

ValueDescription
1A Master Clear (pin) Reset has occurred
0A Master Clear (pin) Reset has not occurred

Bit 6 – SWR Software RESET (Instruction) Flag bit

ValueDescription
1A RESET instruction has been executed
0A RESET instruction has not been executed

Bit 5 – SWDTEN Software Enable/Disable of WDT bit ^(2)

ValueDescription
1WDT is enabled
0WDT is disabled

Bit 4 – WDTO Watchdog Timer Time-out Flag bit

Value Description
1WDT time-out has occurred
0WDT time-out has not occurred

Bit 3 – SLEEP Wake-up from Sleep Flag bit

Value Description
1Device has been in Sleep mode
0Device has not been in Sleep mode

Bit 2 – IDLE Wake-up from Idle Flag bit

Value Description
1Device has been in Idle mode
0Device has not been in Idle mode

Bit 1 – BOR Brown-out Reset Flag bit

Value Description
1A Brown-out Reset has occurred
0A Brown-out Reset has not occurred

Bit 0 – POR Power-on Reset Flag bit

Value Description
1A Power-on Reset has occurred
0A Power-on Reset has not occurred

7. Interrupt Controller

This data sheet summarizes the features of the dsPIC33CK1024MP710 family of devices. It is not intended to be a comprehensive reference source. To complement the information in this data sheet, refer to “Interrupts” (www.microchip.com/DS70000600).

The dsPIC33CK1024MP710 family interrupt controller reduces the numerous peripheral interrupt request signals to a single interrupt request signal to the dsPIC33CK1024MP710 family CPU.

The interrupt controller has the following features:

  • Six Processor Exceptions and Software Traps
  • Seven User-Selectable Priority Levels
  • Interrupt Vector Table (IVT) with a Unique Vector for each Interrupt or Exception Source
  • Fixed Priority within a Specified User Priority Level
  • Fixed Interrupt Entry and Return Latencies
  • Alternate Interrupt Vector Table (AIVT) for Debug Support

7.1 Interrupt Vector Table

The dsPIC33CK1024MP710 family Interrupt Vector Table (IVT), shown in Figure 7-1, resides in program memory, starting at location, 000004h. The IVT contains six non-maskable trap vectors and up to 246 sources of interrupts. In general, each interrupt source has its own vector. Each interrupt vector contains a 24-bit wide address. The value programmed into each interrupt vector location is the starting address of the associated Interrupt Service Routine (ISR).

Figure 7-1. dsPIC33CK1024MP710 Family Interrupt Vector Table (IVT) ^(1)
Microchip dsPIC33CK1024MP708 - Interrupt Vector Table - 1

bar_stacked | Interrupt Vector | Priority Level | | --------------- | -------------- | | Reset - GOTO Instruction | 0x000000 | | Reset - GOTO Address | 0x000002 | | Oscillator Fail Trap Vector | 0x000004 | | Address Error Trap Vector | 0x000006 | | Generic Hard Trap Vector | 0x000008 | | Stack Error Trap Vector | 0x00000A | | Math Error Trap Vector | 0x00000C | | Reserved 0x00000E | | | Generic Soft Trap Vector | 0x000010 | | Reserved 0x000012 | | | Interrupt Vector 0 | 0x000014 | | Interrupt Vector 1 | 0x000016 | | : | : | | : | : | | : | : | | : | : | | Interrupt Vector 52 | 0x00007C | | Interrupt Vector 53 | 0x00007E | | Interrupt Vector 54 | 0x000080 | | : | : | | : | : | | : | : | | Interrupt Vector 116 | 0x0000FC | | Interrupt Vector 117 | 0x0000FE | | Interrupt Vector 118 | 0x000100 | | Interrupt Vector 119 | 0x000102 | | Interrupt Vector 120 | 0x000104 | | : | : | | : | : | | : | : | | Interrupt Vector 244 | 0x0001FC | | Interrupt Vector 245 | 0x0001FE | | START OF CODE | 0x000200 |

Notes:

  1. In Dual Partition modes, each partition has a dedicated Interrupt Vector Table.
  2. See Trap Vector Details.

Interrupt vectors are prioritized in terms of their natural priority. This priority is linked to their position in the vector table. Lower addresses generally have a higher natural priority. For example, the interrupt associated with Vector 0 takes priority over interrupts at any other vector address.

7.2 Alternate Interrupt Vector Table

The Alternate Interrupt Vector Table (AIVT), shown in Figure 7-2, is available only when the Boot Segment (BS) is defined and the AIVT has been enabled. To enable the Alternate Interrupt Vector Table, the Configuration bit, AIVTDIS in the FSEC register, must be programmed and the AIVTEN bit must be set (INTCON2[8] = 1). When the AIVT is enabled, all interrupt and exception processes use the alternate vectors instead of the default vectors. The

AIVT begins at the start of the last page of the Boot Segment, defined by BSLIM[12:0]. The second half of the page is no longer usable space. The Boot Segment must be at least two pages to enable the AIVT.

Note: Although the Boot Segment must be enabled in order to enable the AIVT, application code does not need to be present inside of the Boot Segment. The AIVT (and IVT) will inherit the Boot Segment code protection.

Figure 7-2. dsPIC33CK1024MP710 Alternate Interrupt Vector Table ^(2)
Microchip dsPIC33CK1024MP708 - Alternate Interrupt Vector Table - 1

bar_stacked | Operation | Priority Level | Description | | --- | --- | --- | | Reserved BSLIM<12:0> | 1 | (1) + 0x000000 | | Reserved BSLIM<12:0> | 2 | (1) + 0x000002 | | Oscillator Fail Trap Vector BSLIM<12:0> | 1 | (1) + 0x000004 | | Address Error Trap Vector BSLIM<12:0> | 1 | (1) + 0x000006 | | Generic Hard Trap Vector BSLIM<12:0> | 1 | (1) + 0x000008 | | Stack Error Trap Vector BSLIM<12:0> | 1 | (1) + 0x00000A | | Math Error Trap Vector BSLIM<12:0> | 1 | (1) + 0x00000C | | Reserved BSLIM<12:0> | 1 | (1) + 0x00000E | | Generic Soft Trap Vector BSLIM<12:0> | 1 | (1) + 0x000010 | | Reserved BSLIM<12:0> | 1 | (1) + 0x000012 | | Interrupt Vector 0 BSLIM<12:0> | 1 | (1) + 0x000014 | | Interrupt Vector 1 BSLIM<12:0> | 1 | (1) + 0x000016 | | : | : | : | | : | : | : | | : | : | : | | Interrupt Vector 52 BSLIM<12:0> | 1 | (1) + 0x00007C | | Interrupt Vector 53 BSLIM<12:0> | 1 | (1) + 0x00007E | | Interrupt Vector 54 BSLIM<12:0> | 1 | (1) + 0x00008O | | : | : | : | | : | : | : | | : | : | : | | Interrupt Vector 116 BSLIM<12:0> | 1 | (1) + 0x0000FC | | Interrupt Vector 117 BSLIM<12:0> | 1 | (1) + 0x000FE | | Interrupt Vector 118 BSLIM<12:0> | 1 | (1) + 0x00010O | | Interrupt Vector 119 BSLIM<12:0> | 1 | (1) + 0x000102 | | Interrupt Vector 120 BSLIM<12:0> | 1 | (1) + 0x000104 | | : | : | : | | : | : | : | | : | : | : | | Interrupt Vector 244 BSLIM<12:0> | 1 | (1) + 0x0001FC | | Interrupt Vector 245 BSLIM<12:0> | 1 | (1) + 0x0001FE | AIVT

Notes:

  1. The address depends on the size of the Boot Segment defined by BSLIM[12:0]: [(BSLIM[12:0] - 1) x 0x800] + Offset.
  2. In Dual Partition modes, each partition has a dedicated Alternate Interrupt Vector Table (if enabled).
  3. See Trap Vector Details.

The AIVT supports debugging by providing a means to switch between an application and a support environment without requiring the interrupt vectors to be reprogrammed. This feature also enables switching between applications for evaluation of different software algorithms at run time.

7.3 Reset Sequence

A device Reset is not a true exception because the interrupt controller is not involved in the Reset process. The dsPIC33CK1024MP710 family devices clear their registers in response to a Reset, which forces the PC to zero. The device then begins program execution at location, 0x000000. A GOTO instruction at the Reset address can redirect program execution to the appropriate start-up routine.

Note: Any unimplemented or unused vector locations in the IVT should be programmed with the address of a default interrupt handler routine that contains a RESET instruction.

Table 7-1. Trap Vector Details

Trap DescriptionMPLAB* XC16 TrapISR NameVector #IVTAddressTrap Bit LocationPriority
Interrupt FlagType Enable
Oscillator Failure _OscillatorFail 0 0x000004 INTCON1[1] — — 15
Address Error _AddressError 1 0x000006 INTCON1[3] — — 14
ECC Double-BitError_HardTrapError 2 0x000008 INTCON4[1] — — 13
Software Generated Trap_HardTrapError 2 0x000008 INTCON4[0] — INTCON2[13] 13
Stack Error_StackError30x00000AINTCON1[2]12
OverflowAccumulator A_MathError40x00000CINTCON1[4]INTCON1[14]INTCON1[10]11
OverflowAccumulator B_MathError40x00000CINTCON1[4]INTCON1[13]INTCON1[9]11
CatastrophicOverflowAccumulator A_MathError40x00000CINTCON1[4]INTCON1[12]INTCON1[8]11
CatastrophicOverflowAccumulator B_MathError40x00000CINTCON1[4]INTCON1[11]INTCON1[8]11
Shift AccumulatorError_MathError40x00000CINTCON1[4]INTCON1[7]INTCON1[8]11
Divide-by-Zero Error_MathError40x00000CINTCON1[4]INTCON1[6]INTCON1[8]11
Reserved _Reserved5 0x00000E— — —
CAN Address Error_SoftTrapError60x000010INTCON3[9]9
NVM Address Error_SoftTrapError60x000010INTCON3[8]9
CAN2 Address Error_SoftTrapError60x000010INTCON3[6]9
DMA Address Error_SoftTrapError60x000010INTCON3[5]9
DO Stack Overflow_SoftTrapError60x000010INTCON3[4]9
APLL Loss Of Lock_SoftTrapError60x000010INTCON3[0]9
ReservedReserved70x000012

Table 7-2. Interrupt Vector Details

Interrupt Source MPLAB XC16 ISR Name Vector #IRQ # IVT AddressInterrupt Bit Location
Flag Enable Priority
External Interrupt 0_INT0Interrupt 8 0 0x000014 IFS0[0] IECO[0] IPC0[2:0]
Timer1_T1Interrupt 9 1 0x000016 IFS0[1] IECO[1] IPC0[6:4]
Change Notice Interrupt A_CNAInterrupt 10 2 0x000018 IFS0[2] IECO[2] IPC0[10:8]
Change Notice Interrupt B_CNBInterrupt 11 3 0x00001A IFS0[3] IECO[3] IPC0[14:12]
DMA Channel 0_DMA0Interrupt 12 4 0x00001C IECO[5] IPC1[4:6]IFS0[4]IECO[4]IPC1[2:0]
Change Notice Interrupt F_CNFInterrupt 13 5 0x00001E IFS0[5] IECO[5] IPC1[4:6]
Input Capture/ Output Compare 1_CCP1Interrupt 14 6 0x000020 IECO[6] IPC1[10:8]IFS0[6]IECO[6]IPC1[10:8]
CCP1 Timer_CCT1Interrupt 15 7 0x000022 IECO[7] IPC1[14:12]IFS0[7]IECO[7]IPC1[14:12]
DMA Channel 1_DMA1Interrupt 16 8 0x000024 IECO[8] IPC2[2:0]IFS0[8]IECO[8]IPC2[2:0]
SPI1 Receiver_SPI1RXInterrupt 17 9 0x000026 IECO[9] IPC2[6:4]IFS0[9]IECO[9]IPC2[6:4]
SPI1 Transmitter_SPI1TXInterrupt 18 10 0x000028 IECO[10] IPC2[10:8]IFS0[10]IECO[10]IPC2[10:8]
UART1 Receiver_U1RXInterrupt 19 11 0x00002A IECO[11] IPC2[14:12]IFS0[11]IECO[11]IPC2[14:12]
UART1 Transmitter_U1TXInterrupt 20 12 0x00002C IECO[12] IPC3[2:0]IFS0[12]IECO[12]IPC3[2:0]
ECC Single-Bit Error_ECCSBEInterrupt 21 13 0x00002E IECO[13] IPC3[6:4]IFS0[13]IECO[13]IPC3[6:4]
NVM Write Complete_NVMInterrupt 22 14 0x000030 IECO[14] IPC3[10:8]IFS0[14]IECO[14]IPC3[10:8]
External Interrupt 1_INT1Interrupt 23 15 0x000032 IECO[15] IPC3[14:12]IFS0[15]IECO[15]IPC3[14:12]
I2C1 Client Event_SI2C1Interrupt 24 16 0x000034 IEC1[0] IPC4[2:0]IFS1[0]IEC1[0]IPC4[2:0]
I2C1 Host Event_MI2C1Interrupt 25 17 0x000036 IEC1[1] IPC4[6:4]IFS1[1]IEC1[1]IPC4[6:4]
DMA Channel 2_DMA2Interrupt 26 18 0x000038 IEC1[2] IPC4[10:8]IFS1[2]IEC1[2]IPC4[10:8]
Change Notice Interrupt C(1)_CNCInterrupt 27 19 0x00003A IEC1[3] IPC4[14:12]IFS1[3]IEC1[3]IPC4[14:12]
External Interrupt 2_INT2Interrupt 28 20 0x00003C IEC1[4] IPC5[2:0]IFS1[4]IEC1[4]IPC5[2:0]
DMA Channel 3_DMA3Interrupt 29 21 0x00003E IEC1[5] IPC5[6:4]IFS1[5]IEC1[5]IPC5[6:4]
DMA Channel 4_DMA4Interrupt 30 22 0x000040 IEC1[6] IPC5[10:8]IFS1[6]IEC1[6]IPC5[10:8]
Input Capture/ Output Compare 2_CCP2Interrupt 31 23 0x000042 IEC1[7] IPC5[14:12]IFS1[7]IEC1[7]IPC5[14:12]
CCP2 Timer_CCT2Interrupt 32 24 0x000044 IEC1[8] IPC6[2:0]IFS1[8]IEC1[8]IPC6[2:0]
CAN1 Combined Error_CAN1Interrupt 33 25 0x000046 IEC1[9] IPC6[6:4]IFS1[9]IEC1[9]IPC6[6:4]
External Interrupt 3_INT3Interrupt 34 26 0x000048 IEC1[10] IPC6[10:8]IFS1[10]IEC1[10]IPC6[10:8]
U2RX - UART2 Receiver_U2RXInterrupt 35 27 0x00004A IEC1[11] IPC6[14:12]IFS1[11]IEC1[11]IPC6[14:12]
U2TX - UART2 Transmitter_U2TXInterrupt 36 28 0x00004C IEC1[12] IPC7[2:0]IFS1[12]IEC1[12]IPC7[2:0]
SPI2 Receiver_SPI2RXInterrupt 37 29 0x00004E IEC1[13] IPC7[6:4]IFS1[13]IEC1[13]IPC7[6:4]
SPI2 Transmitter_SPI2TXInterrupt 38 30 0x000050 IEC1[14] IPC7[10:8]IFS1[14]IEC1[14]IPC7[10:8]
CAN1 RX Data Ready(2)_C1RXInterrupt 39 31 0x000052 IEC1[15] IPC7[14:12]IFS1[15]IEC1[15]IPC7[14:12]
Interrupt Source MPLAB * XC16 ISR Name Vector # IRQ # IVT AddressInterrupt Bit Location
Flag Enable Priority
CAN2 RX Data Ready(2)_C2RXInterrupt 40 32 0x000054 IFS2[0] IEC2[0] IPC8[2:0]
CAN2 Combined Error_CAN2Interrupt 41 33 0x000056 IFS2[1] IEC2[1] IPC8[6:4]
DMA Channel 5_DMA5Interrupt 42 34 0x000058 IFS2[2] IEC2[2] IPC8[10:8]
Input Capture/Output Compare 3_CCP3Interrupt 43 35 0x00005A IFS2[3] IEC2[3] IPC8[14:12]
CCP3 Timer_CCT3Interrupt 44 36 0x00005C IFS2[4] IEC2[4] IPC9[2:0]
I2C2 Client Event_SI2C2Interrupt 45 37 0x00005E IFS2[5] IEC2[5] IPC9[6:4]
I2C2 Host Event_MI2C2Interrupt 46 38 0x000060 IFS2[6] IEC2[6] IPC9[10:8]
ReservedReserved 47 39 0x000062 — — —
Input Capture/Output Compare 4_CCP4Interrupt 48 40 0x000064 IFS2[8] IEC2[8] IPC10[2:0]
CCP4 Timer_CCT4Interrupt 49 41 0x000066 IFS2[9] IEC2[9] IPC10[6:4]
ReservedReserved 50 42 0x000068 — — —
Input Capture/Output Compare 5_CCP5Interrupt 51 43 0x00006A IFS2[11] IEC2[11] IPC10[14:12]
CCP5 Timer_CCT5Interrupt 52 44 0x00006C IFS2[12] IEC2[12] IPC11[2:0]
Deadman Timer_DMTInterrupt 53 45 0x00006E IFS2[13] IEC2[13] IPC11[6:4]
Input Capture/Output Compare 6_CCP6Interrupt 54 46 0x000070 IFS2[14] IEC2[14] IPC11[10:8]
CCP6 Timer_CCT6Interrupt 55 47 0x000072 IFS2[15] IEC2[15] IPC11[14:12]
QE1 Position Counter Compare_QEI1Interrupt 56 48 0x000074 IFS3[0] IEC3[0] IPC12[2:0]
UART1 Error_U1EInterrupt 57 49 0x000076 IFS3[1] IEC3[1] IPC12[6:4]
UART2 Error_U2EInterrupt 58 50 0x000078 IFS3[2] IEC3[2] IPC12[10:8]
CRC Generator_CRCInterrupt 59 51 0x00007A IFS3[3] IEC3[3] IPC12[14:12]
CAN1 TX Data Request(2)_C1TXInterrupt 60 52 0x00007C IFS3[4] IEC3[4] IPC13[2:0]
CAN2 TX Data Request(2)_C2TXInterrupt 61 53 0x00007E IFS3[5] IEC3[5] IPC13[6:4]
QE12 Position Counter Compare_QEI2Interrupt 62 54 0x000080 IFS3[6] IEC3[6] IPC13[10:8]
ReservedReserved 63 55 0x000082 — — —
UART3 Error_U3EInterrupt 64 56 0x000084 IFS3[8] IEC3[8] IPC14[2:0]
UART3 Receiver_U3RXInterrupt 65 57 0x000086 IFS3[9] IEC3[9] IPC14[6:4]
UART3 Transmitter_U3TXInterrupt 66 58 0x000088 IFS3[10] IEC3[10] IPC14[10:8]
SPI3 Receiver_SPI3RXInterrupt 67 59 0x00008A IFS3[11] IEC3[11] IPC14[14:12]
SPI3 Transmitter_SPI3TXInterrupt 68 60 0x00008C IFS3[12] IEC3[12] IPC15[2:0]
In-Circuit Debugger_ICDInterrupt 69 61 0x00008E IFS3[13] IEC3[13] IPC15[6:4]
PTG Step_PTGSTEPInterrupt 71 63 0x000092 IFS3[15] IEC3[15] IPC15[14:12]
I2C1 Bus Collision_I2C1BCInterrupt 72 64 0x000094 IFS4[0] IEC4[0] IPC16[2:0]
I2C2 Bus Collision_I2C2BCInterrupt 73 65 0x000096 IFS4[1] IEC4[1] IPC16[6:4]
QE13 Position Counter Compare_QEI3Interrupt 74 66 0x000098 IFS4[2] IEC4[2] IPC16[10:8]
PWM Generator 1_PWM1Interrupt 75 67 0x00009A IFS4[3] IEC4[3] IPC16[14:12]
PWM Generator 2_PWM2Interrupt 76 68 0x00009C IFS4[4] IEC4[4] IPC17[2:0]
PWM Generator 3_PWM3Interrupt 77 69 0x00009E IFS4[5] IEC4[5] IPC17[6:4]
PWM Generator 4_PWM4Interrupt 78 70 0x0000A0 IFS4[6] IEC4[6]IPC17[10:8]
PWM Generator 5_PWM5Interrupt 79 71 0x0000A2 IFS4[7] IEC4[7]IPC17[14:12]
PWM Generator 6_PWM6Interrupt 80 72 0x0000A4 IFS4[8] IEC4[8] IPC18[2:0]
PWM Generator 7_PWM7Interrupt 81 73 0x0000A6 IFS4[9] IEC4[9] IPC18[6:4]
PWM Generator 8_PWM8Interrupt82740x0000A8IFS4[10]IEC4[10]IPC18[10:8]
Change Notice D(1) _CNDInterrupt83750x0000AAIFS4[11]IEC4[11]IPC18[14:12]
Change Notice E(1) CNEInterrupt84760x0000ACIFS4[12]IEC4[12]IPC19[2:0]
Comparator 1 _CMP1Interrupt85770x0000AEIFS4[13]IEC4[13]IPC19[6:4]
Comparator 2 _CMP2Interrupt86780x0000B0IFS4[14]IEC4[14]IPC19[10:8]
Comparator 3 _CMP3Interrupt87790x0000B2IFS4[15]IEC4[15]IPC19[14:2]
Comparator 4 _CMP4Interrupt 88 80 0x0000B4 IFS5[0] IEC5[0] IPC20[2:0]
PTG Watchdog Timer Time-out _PTGWDTInterrupt89 81 0x0000B6 IFS5[1] IEC5[1] IPC20[6:4]
PTG Trigger 0 _PTG0Interrupt90820x0000B8IFS5[2]IEC5[2]IPC20[10:8]
PTG Trigger 1 _PTG1Interrupt91830x0000BAIFS5[3]IEC5[3]IPC20[14:12]
PTG Trigger 2 _PTG2Interrupt92840x0000BCIFS5[4]IEC5[4]IPC21[2:0]
PTG Trigger 3 _PTG3Interrupt93850x0000BEIFS5[5]IEC5[6]IPC21[6:4]
SENT1 TX/RX _SENT1Interrupt94860x0000C0IFS5[6]IEC5[6]IPC21[10:8]
SENT1 Error _SENT1EInterrupt95870x0000C2IFS5[7]IEC5[7]IPC21[14:12]
SENT2 TX/RX _SENT2Interrupt96880x0000C4IFS[8]IEC5[8]IPC22[2:0]
SENT2 Error _SENT2EInterrupt97890x0000C6IFS[9]IEC5[9]IPC22[6:4]
ADC Global Interrupt _ADCInterrupt98900x0000C8IFS5[10]IEC5[10]IPC22[10:8]
ADC ANO Interrupt _ADCAN0Interrupt99910x0000CAIFS5[11]IEC5[11]IPC22[14:12]
ADC AN1 Interrupt _ADCAN1Interrupt100920x0000CCIFS5[12]IEC5[12]IPC23[2:0]
ADC AN2 Interrupt _ADCAN2Interrupt101930x0000CEIFS5[13]IEC5[13]IPC23[6:4]
ADC AN3 Interrupt _ADCAN3Interrupt102940x0000D0IFS5[14]IEC5[14]IPC23[10:8]
ADC AN4 Interrupt _ADCAN4Interrupt103950x0000D2IFS5[15]IEC5[15]IPC23[14:12]
ADC AN5 Interrupt _ADCAN5Interrupt104960x0000D4IFS6[0]IEC6[0]IPC24[2:0]
ADC AN6 Interrupt _ADCAN6Interrupt105970x0000D6IFS6[1]IEC6[1]IPC24[6:4]
ADC AN7 Interrupt(3) _ADCAN7Interrupt106980x0000D8IFS6[2]IEC6[2]IPC24[10:8]
ADC AN8 Interrupt _ADCAN8Interrupt107990x0000DAIFS6[3]IEC6[3]IPC24[14:12]
ADC AN9 Interrupt _ADCAN9Interrupt1081000x0000DCIFS6[4]IEC6[4]IPC25[2:0]
ADC AN10 Interrupt _ADCAN10Interrupt1091010x0000DEIFS6[5]IEC6[5]IPC25[6:4]
ADC AN11 Interrupt _ADCAN11Interrupt1101020x0000E0IFS6[6]IEC6[6]IPC25[10:8]
ADC AN12 Interrupt(3) _ADCAN12Interrupt1111030x0000E2IFS6[7]IEC6[7]IPC25[14:12]
ADC AN13 Interrupt(3) _ADCAN13Interrupt112 1040x0000E4 IFS6[8] IEC6[8] IPC26[2:0]
ADC AN14 Interrupt(3) _ADCAN14Interrupt113 1050x0000E6 IFS6[9] IEC6[9] IPC26[6:4]
ADC AN15 Interrupt(3) _ADCAN15Interrupt1141060x0000E8IFS6[10]IEC6[10]IPC26[10:8]
ADC AN16 Interrupt _ADCAN16Interrupt 115 107 0x0000EA IFS6[11] IEC6[11] IPC26[14:12]
ADC AN17 Interrupt _ADCAN17Interrupt 116 108 0x0000EC IFS6[12] IEC6[12] IPC27[2:0]
ADC AN18 Interrupt(3)_ADCAN18Interrupt 117 1090x0000EE IFS6[13] IEC6[13] IPC27[6:4]
ADC AN19 Interrupt(3)_ADCAN19Interrupt 118 1100x0000F0 IFS6[14] IEC6[14] IPC27[10:8]
ADC AN20 Interrupt(3)_ADCAN20Interrupt 119 1110x0000F2 IFS6[15] IEC6[15] IPC27[14:12]
ADC AN21 Interrupt(3)_ADCAN21Interrupt1201120x0000F4IFS7[0]IEC7[0]IPC28[2:0]
ADC AN22 Interrupt(3)_ADCAN22Interrupt1211130x0000F6IFS7[1]IEC7[1]IPC28[6:4]
ADC AN23 Interrupt(3)_ADCAN23Interrupt1221140x0000F8IFS7[2]IEC7[2]IPC28[10:8]
ADC Fault_ADFLTInterrupt1231150x0000FAIFS7[3]IEC7[3]IPC28[14:12]
ADC Digital Comparator 0_ADCMP0Interrupt1241160x0000FCIFS7[4]IEC7[4]IPC29[2:0]
ADC Digital Comparator 1_ADCMP1Interrupt1251170x0000FEIFS7[5]IEC7[5]IPC29[6:4]
ADC Digital Comparator 2_ADCMP2Interrupt1261180x000100IFS7[6]IEC7[6]IPC29[10:8]
ADC Digital Comparator 3_ADCMP3Interrupt1271190x000102IFS7[7]IEC7[7]IPC29[14:12]
ADC Oversample Filter 0_ADFLTR0Interrupt1281200x000104IFS7[8]IEC7[8]IPC30[2:0]
ADC Oversample Filter 1_ADFLTR1Interrupt1291210x000106IFS7[9]IEC7[9]IPC30[6:4]
ADC Oversample Filter 2_ADFLTR2Interrupt130 122 0x000108 IFS7[10] IEC7[10] IPC30[10:8]
ADC Oversample Filter 3_ADFLTR3Interrupt131 123 0x00010A IFS7[11] IEC7[11] IPC30[14:12]
CLC1 Positive Edge_CLC1PInterrupt1321240x00010CIFS7[12]IEC7[12]IPC31[2:0]
CLC2 Positive Edge_CLC2PInterrupt1331250x00010EIFS7[13]IEC7[13]IPC31[6:4]
SPI1 Error_SPI1Interrupt1341260x000110IFS7[14]IEC7[14]IPC31[10:8]
SPI2 Error_SPI2Interrupt1351270x000112IFS7[15]IEC7[15]IPC31[14:12]
SPI3 Error_SPI3Interrupt1361280x000114IFS8[0]IEC8[0]IPC32[2:0]
CLC5 Positive Edge_CLC5PInterrupt1371290x000116IFS8[1]IEC8[1]IPC32[6:4]
CLC5 Negative Edge_CLC5NInterrupt1381300x000118IFS8[2]IEC8[2]IPC32[10:8]
CLC6 Positive Edge_CLC6PInterrupt1391310x00011AIFS8[3]IEC8[3]IPC32[14:12]
CLC6 Negative Edge_CLC6NInterrupt1401320x00011CIFS8[4]IEC8[4]IPC33[2:0]
CLC7 Positive Edge_CLC7PInterrupt1411330x00011EIFS8[5]IEC8[5]IPC33[6:4]
CLC7 Negative Edge_CLC7NInterrupt1421340x000120IFS8[6]IEC8[6]IPC33[10:8]
CLC8 Positive Edge_CLC8PInterrupt1431350x000122IFS8[7]IEC8[7]IPC33[14:12]
CLC8 Negative Edge_CLC8NInterrupt1441360x000124IFS8[8]IEC8[8]IPC34[2:0]
APEVTA - APWM Event A_APEVTAInterrupt1451370x000126IFS8[9]IEC8[9]IPC34[6:4]
APEVTB - APWM Event B_APEVTBnterrupt146 138 0x000128 IFS8[10] IEC8[10] IPC34[10:8]
APEVTC - APWM Event C_APEVTCInterrupt 147 139 0x00012A IFS8[11] IEC8[11] IPC34[14:12]
APEVTD - APWM Event D_APEVTDInterrupt 148 140 0x00012C IFS8[12] IEC8[12] IPC35[2:0]
ADC AN31 Interrupt_ADCAN31Interrupt1491410x00012EIFS8[13]IEC8[13]IPC35[6:4]
I2C3 Client Event_SI2C3Interrupt1501420x000130IFS8[14]IEC8[14]IPC35[10:8]
I2C3 Host Event_MI2C3Interrupt1511430x000132IFS8[15]IEC8[15]IPC35[14:12]
I2C3 Bus Collision_I2C3BInterrupt1521440x000134IFS9[0]IEC9[0]IPC36[2:0]
ADC AN27 Interrupt_ADCAN27Interrupt1531450x000136IFS9[1]IEC9[1]IPC36[6:4]
ADC AN28 Interrupt_ADCAN28Interrupt1541460x000138IFS9[2]IEC9[2]IPC36[10:8]
ADC AN29 Interrupt_ADCAN29Interrupt1551470x00013AIFS9[3]IEC9[3]IPC36[14:12]
ADC AN30 Interrupt_ADCAN30Interrupt1561480x00013CIFS9[4]IEC9[4]IPC37[2:0]
Input Capture/ Output Compare 7_CCP7Interrupt1571490x00013EIFS9[5]IEC9[5]IPC37[6:4]
CCP7 Timer_CCT7Interrupt1581500x000140IFS9[6]IEC9[6]IPC37[10:8]
ADC AN26 Interrupt_ADCAN26Interrupt1591510x000142IFS9[7]IEC9[7]IPC37[14:12]
Input Capture/ Output Compare 8_CCP8Interrupt1601520x000144IFS9[8]IEC9[8]IPC38[2:0]
CCP8 Timer_CCT8Interrupt1611530x000146IFS9[9]IEC9[9]IPC38[6:4]
DMA Channel 6_DMA6Interrupt1621540x000148IFS9[10]IEC9[10]IPC38[10:8]
DMA Channel 7_DMA7Interrupt 163 155 0x00014A IFS9[11] IEC9[11] IPC38[14:12]
ReservedReserved164-165156-1570x00014C-0x00014E
APEVTE - APWM Event E_APEVTEInterrupt 166 1580x000150 IFS9[14] IEC9[14] IPC39[10:8]
APEVTF - APWM Event F_APEVTFInterrupt 167 159 0x000152 IFS9[15] IEC9[15] IPC39[14:12]
ReservedReserved168-176160-1680x000154-0x000164
PEVTA - PWM Event A_PEVTAInterrupt177 1690x000166 IFS10[9] IEC10[9] IPC42[6:4]
PEVTB - PWM Event B_PEVTBInterrupt1781700x000168IFS10[10]IEC10[10]IPC42[10:8]
PEVTC - PWM Event C_PEVTCInterrupt1791710x00016AIFS10[11]IEC10[11]IPC42[14:12]
PEVTD - PWM Event D_PEVTDInterrupt1801720x00016CIFS10[12]IEC10[12]IPC43[2:0]
PEVTE - PWM Event E_PEVTEInterrupt1811730x00016EIFS10[13]IEC10[13]IPC43[6:4]
PEVTF - PWM Event F_PEVTFInterrupt1821740x000170IFS10[14]IEC10[14]IPC43[10:8]
CLC3 Positive Edge_CLC3PInterrupt1831750x000172IFS10[15]IEC10[15]IPC43[14:12]
CLC4 Positive Edge_CLC4PInterrupt1841760x000174IFS11[0]IEC11[0]IPC44[2:0]
CLC1 Negative Edge_CLC1NInterrupt1851770x000176IFS11[1]IEC11[1]IPC44[6:4]
CLC2 Negative Edge_CLC2NInterrupt1861780x000178IFS11[2]IEC11[2]IPC44[10:8]
CLC3 Negative Edge_CLC3NInterrupt1871790x00017AIFS11[3]IEC11[3]IPC44[14:12]
CLC4 Negative Edge_CLC4NInterrupt1881800x00017CIFS11[4]IEC11[4]IPC45[2:0]
Input Capture/ Output Compare 9_CCP9Interrupt189 1810x00017E IFS11[5] IEC11[5] IPC45[6:4]
CCP9 Timer _CCT9Interrupt 190 182 0x000180 IFS11[6] IEC11[6] IPC45[10:8]
APWM Generator 1 _APWM1Interrupt 191 183 0x000182 IFS11[7] IEC11[7] IPC45[14:12]
APWM Generator 2 _APWM2Interrupt 192 184 0x000184 IFS11[8] IEC11[8] IPC46[2:0]
APWM Generator 3 _APWM3Interrupt 193 185 0x000186 IFS11[9] IEC11[9] IPC46[6:4]
APWM Generator 4 _APWM4Interrupt1941860x000188IFS11[10]IEC11[10]IPC46[10:8]
Comparator 5 _CMP5Interrupt1951870x00018AIFS11[11]IEC11[11]IPC46[14:12]
Comparator 6 _CMP6Interrupt1961880x00018CIFS11[12]IEC11[12]IPC47[2:0]
UART1 Event _U1EVTInterrupt1971890x00018EIFS11[13]IEC11[13]IPC47[6:4]
UART2 Event _U2EVTInterrupt1981900x000190IFS11[14]IEC11[14]IPC47[10:8]
UART3 Event _U3EVTInterrupt1991910x000192IFS11[15]IEC11[15]IPC47[14:12]
AN24 Done _ADCAN24Interrupt2001920x000194IFS12[0]IEC12[0]IPC48[2:0]
AN25 Done _ADCAN25Interrupt2011930x000196IFS12[1]IEC12[1]IPC48[6:4]
PMP Event ^(3) _PMPInterrupt202 194 0x000198 IFS12[2] IEC12[2] IPC48[10:8]
PMP Error Event ^(3) _PMPEInterrupt2031950x00019AIFS12[3]IEC12[3]IPC48[14:12]
Reserved Reserved204-255196-2470x00019C-0x0001FE

Note:

  1. Availability dependent on supported I/O ports. Refer to Table 8-1 for availability on device variants.
  2. Availability dependent on supported peripherals, refer to Table 1 and Table 2.
  3. Availability dependent on number of supported ADC channels. Refer to Table 1 and Table 2 for ADC channel availability on device variants.

7.4 Interrupt Resources

Many useful resources are provided on the main product page of the Microchip website for the devices listed in this data sheet. This product page contains the latest updates and additional information.

7.5 Interrupt Control and Status Registers

The dsPIC33CK1024MP710 family devices implement the following registers for the interrupt controller:

  • INTCON1
  • INTCON2
  • INTCON3
  • INTCON4
  • INTTREG

7.5.1 INTCON1 through INTCON4

Global interrupt control functions are controlled from INTCON1, INTCON2, INTCON3 and INTCON4.

INTCON1 contains the Interrupt Nesting Disable bit (NSTDIS), as well as the control and status flags for the processor trap sources.

The INTCON2 register controls external interrupt request signal behavior, contains the Global Interrupt Enable bit (GIE) and the Alternate Interrupt Vector Table Enable bit (AIVTEN).

INTCON3 contains the status flags for the Auxiliary PLL and DO stack overflow status trap sources.

The INTCON4 register contains the Software Generated Hard Trap Status bit (SGHT).

7.5.1.1 IFSx

The IFSx registers maintain all of the interrupt request flags. Each source of interrupt has a status bit, which is set by the respective peripherals or external signal and is cleared via software.

7.5.1.2 IECx

The IECx registers maintain all of the interrupt enable bits. These control bits are used to individually enable interrupts from the peripherals or external signals.

7.5.1.3 IPCx

The IPCx registers are used to set the Interrupt Priority Level (IPL) for each source of interrupt. Each user interrupt source can be assigned to one of seven priority levels.

7.5.1.4 INTTREG

The INTTREG register contains the associated interrupt vector number and the new CPU Interrupt Priority Level, which are latched into the Vector Number (VECNUM[7:0]) and Interrupt Level bits (ILR[3:0]) fields in the INTTREG register. The new Interrupt Priority Level is the priority of the pending interrupt.

The interrupt sources are assigned to the IFSx, IECx and IPCx registers in the same sequence as they are listed in Table 7-2. For example, INTO (External Interrupt 0) is shown as having Vector Number 8 and a natural order priority of 0. Thus, the INTOIF bit is found in IFS0[0], the INTOIE bit in IEC0[0] and the INTOIP[2:0] bits in the first position of IPC0 (IPC0[2:0]).

7.6 Status/Control Registers

Although these registers are not specifically part of the interrupt control hardware, two of the CPU Control registers contain bits that control interrupt functionality. For more information on these registers, refer to "Enhanced CPU" (www.microchip.com/DS70005158).

  • The CPU STATUS Register, SR, contains the IPL[2:0] bits (SR[7:5]). These bits indicate the current CPU Interrupt Priority Level. The user software can change the current CPU Interrupt Priority Level by writing to the IPLx bits.
  • The CORCON register contains the IPL3 bit, which together with IPL[2:0], also indicates the current CPU priority level. IPL3 is a read-only bit so that trap events cannot be masked by the user software.

7.7 Status/Control Registers

OffsetName Bit Pos. 7 6 5 4 3 2 1 0
0x42 SR15:8
7:0 IPL[2:0]
0x44 CORCON15:8 VAR
7:0 IPL3
0x46 ... 0x07FFReserved
0x0800 IFS015:8INT1IFNVMIFECCSBEIFU1TXIFU1RXIFSPI1TXIFSPI1RXIFDMA1IF
7:0CCT1IFCCP1IFCNFIFDMA0IFCNBIFCNAIFT1IFINT0IF
0x0802 IFS115:8C1RXIFSPI2TXIFSPI2RXIFU2TXIFU2RXIFINT3IFC1IFCCT2IF
7:0CCP2IFDMA4IFDMA3IFINT2IFCNCIFDMA2IFMI2C1IFSI2C1IF
0x0804 IFS215:8CCT6IFCCP6IFDMTIFCCT5IFCCP5IFCCT4IFCCP4IF
7:0MI2C2SI2C2CCT3IFCCP3IFDMA5IFC2IFC2RXIF
0x0806 IFS315:8PTGSTEPIFICDIFSPI3TXIFSPI3RXIFU3TXIFU3RXIFU3EIF
7:0QE12IFC2TXIFC1TXIFCRCIFU2EIFU1EIFQE11IF
0x0808 IFS415:8CMP3IFCMP2IFCMP1IFCNEIFCNDIFPWM8IFPWM7IFPWM6IF
7:0PWMSIFPWM4IFPWM3IFPWM2IFPWM1IFQE13IFI2C2BCIFI2C1BCIF
0x080A IFS515:8ADCAN4IFADCAN3IFADCAN2IFADCAN1IFADCANOIFADCIFSENT2EIFSENT2IF
7:0SENT1EIFSENT1IFPTG3IFPTG2IFPTG1IFPTG0IFPTGWDTIFCMP4IF
0x080C IFS615:8ADCAN20IFADCAN19IFADCAN18IFADCAN17IFADCAN16IFADCAN15IFADCAN14IFADCAN13IF
7:0ADCAN12IFADCAN11IFADCAN10IFADCAN9IFADCAN8IFADCAN7IFADCAN6IFADCAN5IF
0x080E IFS715:8SPI2GIFSPI1GIFCLC2PIFCLC1PIFADFLTR3IFADFLTR2IFADFLTR1IFADFLTR0IF
7:0ADCMP3IFADCMP2IFADCMP1IFADCMPOIFADFLTIFADCAN23IFADCAN22IFADCAN21IF
0x0810 IFS815:8MI2C3IFSI2C3IFADCAN31IFAPEVTDIFAPEVTCIFAPEVTBIFAPEVTAIFCLC8NIF
7:0CLC8PIFCLC7NIFCLC7PIFCLC6NIFCLC6PIFCLC5NIFCLC5PIFSPI3IF
0x0812 IFS915:8APEVTFIFAPEVTEIFDMA7IFDMA6IFCCT8IFCCP8IF
7:0ADCAN26IFCCT7IFCCP7IFADCAN30IFADCAN29IFADCAN28IFADCAN27IFI2C3BCIF
0x0814IFS1015:8CLC3PIFPEVTFIFPEVTEIFPEVTDIFPEVTCIFPEVTBIFPEVTAIF
7:0ADC3EIFADC2EIFADC1EIFADC0EIF
0x0816IFS1115:8U3EVTIFU2EVTIFU1EVTIFCMP6IFCMP5IFAPWM4IFAPWM3IFAPWM2IF
7:0APWM1IFCCT9IFCCP9IFCLC4NIFCLC3NIFCLC2NIFCLC1NIFCLC4PIF
0x0818IFS1215:8
7:0PMPEIFPMPIFADCAN25IFADCAN24IF
0x081A ... 0x081FReserved
0x0820IEC015:8INT1IENVMIEECCSBEIEU1TXIEU1RXIESPI1TXIESPI1RXIEDMA1IE
7:0CCT1IECCP1IECNFIEDMA0IECNBIECNAIET1IEINT0IE
0x0822IEC115:8C1RXIESPI2TXIESPI2RXIEU2TXIEU2RXIEINT3IEC1IECCT2IE
7:0CCP2IEDMA4IEDMA3IEINT2IECNCIEDMA2IEMI2C1IESI2C1IE
0x0824IEC215:8CCT6IECCP6IEDMTIECCT5IECCP5IECCT4IECCP4IE
7:0MI2C2IESI2C2IECCT3IECCP3IEDMA5IEC2IEC2RXIE
0x0826IEC315:8PTGSTEPIEICDIESPI3TXIESPI3RXIEU3TXIEU3RXIEU3EIE
7:0QE12IEC2TXIEC1TXIECRCIEU2EIEU1EIEQE11IE
0x0828IEC415:8CMP3IECMP2IECMP1IECNEIECNDIEPWM8IEPWM7IEPWM6IE
7:0PWMSIEPWM4IEPWM3IEPWM2IEPWM1IEQE13IEI2C2BCIEI2C1BCIE
0x082AIEC515:8ADCAN4IEADCAN3IEADCAN2IEADCAN1IEADCANOIEADCIESENT2EIESENT2IE
7:0SENT1EIESENT1IEPTG3IEPTG2IEPTG1IEPTG0IEPTGWDTIECMP4IE
0x082CIEC615:8ADCAN20IEADCAN19IEADCAN18IEADCAN17IEADCAN16IEADCAN15IEADCAN14IEADCAN13IE
7:0ADCAN12IEADCAN11IEADCAN10IEADCAN9IEADCAN8IEADCAN7IEADCAN6IEADCAN5IE
0x082EIEC715:8SPI2GIESPI1GIECLC2PIECLC1PIEADFLTR3IEADFLTR2IEADFLTR1IEADFLTR0IE
7:0ADCMP3IEADCMP2IEADCMP1IEADCMP0IEADFLTIEADCAN23IEADCAN22IEADCAN21IE
0x0830IEC815:8MI2C3IESI2C3IEADCAN31IEAPEVTDIEAPEVTCIEAPEVTBIEAPEVTAIECLC8NIE
7:0CLC8PIECLC7NIECLC7PIECLC6NIECLC6PIECLC5NIECLC5PIESPI3IE
0x0832IEC915:8APEVTFIEAPEVTEIEDMA7IEDMA6IECCT8IECCP8IE
7:0ADCAN26IECCT7IECCP7IEADCAN30IEADCAN29IEADCAN28IEADCAN27IEI2C3BCIE
0x0834IEC1015:8CLC3PIEPEVTFIEPEVTEIEPEVTDIEPEVTCIEPEVTBIEPEVTAIE
7:0ADC3EIEADC2EIEADC1EIEADC0EIE
OffsetNameBit Pos. 76543210
0x0836IEC1115:8U3EVTIE U2EVTIE U1EVTIE CMP6IE CMP5IE APWM4IE APWM3IE APWM2IE
7:0APWM1IE CCT9IE CCP9IE CLC4NIE CLC3NIE CLC2NIE CLC1NIE CLC4PIE
0x0838IEC1215:8
7:0PMPEIEPMPIEADCAN25IEADCAN24IE
0x083A ... 0x083FReserved
0x0840IPC015:8CNBIP[2:0]CNAIP[2:0]
7:0T1IP[2:0]INT0IP[2:0]
0x0842IPC115:8CCT1IP[2:0]CCP1IP[2:0]
7:0CNFIP[2:0]DMA0IP[2:0]
0x0844IPC215:8U1RXIP[2:0]SPI1TXIP[2:0]
7:0SPI1RXIP[2:0]DMA1IP[2:0]
0x0846IPC315:8INT1IP[2:0]NVMIP[2:0]
7:0ECCSBEIP[2:0]U1TXIP[2:0]
0x0848IPC415:8CNCIP[2:0]DMA2IP[2:0]
7:0MI2C1IP[2:0]SI2C1IP[2:0]
0x084AIPC515:8CCP2IP[2:0]DMA4IP[2:0]
7:0DMA3IP[2:0]INT2IP[2:0]
0x084CIPC615:8U2RXIP[2:0]INT3IP[2:0]
7:0C1IP[2:0]CCT2IP[2:0]
0x084EIPC715:8C1RXIP[2:0]SPI2TXIP[2:0]
7:0SPI2RXIP[2:0]U2TXIP[2:0]
0x0850IPC815:8CCP3IP[2:0]DMA5IP[2:0]
7:0C2IP[2:0]C2RXIP[2:0]
0x0852IPC915:8MI2C2IP[2:0]
7:0SI2C2IP[2:0]CCT3IP[2:0]
0x0854IPC1015:8CCP5IP[2:0]
7:0CCT4IP[2:0]CCP4IP[2:0]
0x0856IPC1115:8CCT6IP[2:0]CCP6IP[2:0]
7:0DMTIP[2:0]CCT5IP[2:0]
0x0858IPC1215:8CRCIP[2:0]U2EIP[2:0]
7:0U1EIP[2:0]QE11IP[2:0]
0x085AIPC1315:8QE12IP[2:0]
7:0C2TXIP[2:0]C1TXIP[2:0]
0x085CIPC1415:8SPI3RXIP[2:0]U3TXIP[2:0]
7:0U3RXIP[2:0]U3EIP[2:0]
0x085EIPC1515:8PTGSTEPIP[2:0]
7:0ICDIP[2:0]SPI3TXIP[2:0]
0x0860IPC1615:8PWM1IP[2:0]QE13IP[2:0]
7:0I2C2BCIP[2:0]I2C1BCIP[2:0]
0x0862IPC1715:8PWM5IP[2:0]PWM4IP[2:0]
7:0PWM3IP[2:0]PWM2IP[2:0]
0x0864IPC1815:8CNDIP[2:0]PWM8IP[2:0]
7:0PWM7IP[2:0]PWM6IP[2:0]
0x0866IPC1915:8CMP3IP[2:0]CMP2IP[2:0]
7:0CMP1IP[2:0]CNEIP[2:0]
0x0868IPC2015:8PTG1IP[2:0]PTG0IP[2:0]
7:0PTGWDTIP[2:0]CMP4IP[2:0]
0x086AIPC2115:8SENT1EIP[2:0]SENT1IP[2:0]
7:0PTG3IP[2:0]PTG2IP[2:0]
0x086CIPC2215:8ADCANOIP[2:0]ADCIP[2:0]
7:0SENT2EIP[2:0]SENT2IP[2:0]
0x086EIPC2315:8ADCAN4IP[2:0]ADCAN3IP[2:0]
7:0ADCAN2IP[2:0]ADCAN1IP[2:0]
0x0870IPC2415:8ADCAN8IP[2:0]ADCAN7IP[2:0]
7:0ADCAN6IP[2:0]ADCAN5IP[2:0]
0x0872IPC2515:8ADCAN12IP[2:0]ADCAN11IP[2:0]
7:0ADCAN10IP[2:0]ADCAN9IP[2:0]
0x0874IPC2615:8ADCAN16IP[2:0]ADCAN15IP[2:0]
7:0ADCAN14IP[2:0]ADCAN13IP[2:0]
0x0876IPC2715:8ADCAN20IP[2:0]ADCAN19IP[2:0]
7:0ADCAN18IP[2:0]ADCAN17IP[2:0]
0x0878IPC2815:8ADFLTIP[2:0]ADCAN23IP[2:0]
7:0ADCAN22IP[2:0]ADCAN21IP[2:0]
0x087AIPC2915:8ADCMP3IP[2:0]ADCMP2IP[2:0]
7:0ADCMP1IP[2:0]ADCMP0IP[2:0]
0x087CIPC3015:8ADFLTR3IP[2:0]ADFLTR2IP[2:0]
7:0ADFLTR1IP[2:0]ADFLTR0IP[2:0]
0x087EIPC3115:8SPI2EIP[2:0]SPI1EIP[2:0]
7:0CLC2PEIP[2:0]CLC1PEIP[2:0]
0x0880IPC3215:8CLC6PEIP[2:0]CLC5NEIP[2:0]
7:0CLC5PEIP[2:0]SPI3IP[2:0]
0x0882IPC3315:8CLC8PEIP[2:0]CLC7NEIP[2:0]
7:0CLC7PEIP[2:0]CLC6NEIP[2:0]
0x0884IPC3415:8APEVTCIP[2:0]APEVTBIP[2:0]
7:0APEVTAIP[2:0]CLC8NEIP[2:0]
0x0886IPC3515:8MI2C3IP[2:0]SI2C3IP[2:0]
7:0ADCAN31IP[2:0]APEVTDIP[2:0]
0x0888IPC3615:8ADCAN29IP[2:0]ADCAN28IP[2:0]
7:0ADCAN27IP[2:0]I2C3BCIP[2:0]
0x088AIPC3715:8ADCAN26IP[2:0]CCT7IP[2:0]
7:0CCP7IP[2:0]ADCAN30IP[2:0]
0x088CIPC3815:8DMA7IP[2:0]DMA6IP[2:0]
7:0CCT8IP[2:0]CCP8IP[2:0]
0x088EIPC3915:8APEVTFIP[2:0]APEVTEIP[2:0]
7:0
0x0890IPC4015:8ADC3EIP[2:0]ADC2EIP[2:0]
7:0ADC1EIP[2:0]ADC0EIP[2:0]
0x0892 ... 0x0893Reserved
0x0894IPC4215:8PEVTCIP[2:0]PEVTBIP[2:0]
7:0PEVTAIP[2:0]
0x0896IPC4315:8CLC3PEIP[2:0]PEVTFIP[2:0]
7:0PEVTEIP[2:0]PEVTDIP[2:0]
0x0898IPC4415:8CLC3NEIP[2:0]CLC2NEIP[2:0]
7:0CLC1NEIP[2:0]CLC4PEIP[2:0]
0x089AIPC4515:8APWM1IP[2:0]CCT9IP[2:0]
7:0CCP9IP[2:0]CLC4NEIP[2:0]
0x089CIPC4615:8CMP5IP[2:0]APWM4IP[2:0]
7:0APWM3IP[2:0]APWM2IP[2:0]
0x089EIPC4715:8U3EVTIP[2:0]U2EVTIP[2:0]
7:0U1EVTIP[2:0]CMP6IP[2:0]
0x08A0IPC4815:8PMPEIP[2:0]PMPIP[2:0]
7:0ADCAN25IP[2:0]ADCAN24IP[2:0]
0x08A2 ... 0x08BFReserved
0x08C0INTCON115:8NSTDISOVAERROVBERRCOVAERRCOVBERROVATEOVBTECOVTE
7:0SFTACERRDIVOERRMATHERRADDRERRSTKERROSCFAIL
0x08C2INTCON215:8GIEDISISWTRAPAIVTEN
7:0INT3EPINT2EPINT1EPINT0EP
0x08C4INTCON315:8DMTCANNAE
7:0CAN2DAEDOOVRAPLL
0x08C6INTCON415:8
7:0ECCDBESGHT
0x08C8INTTREG15:8VHOLDILR[3:0]
7:0VECNUM[7:0]

7.7.1 Interrupt Request Flags Register 0

Name: IFSO

Offset: 0x800

Bit 15 14 13 12 11 10 9 8

INT1IF NVMIF ECCSBEIF U1TXIF U1RXIF SPI1TXIF SPI1RXIFDMA1IF
AccessR/WR/WR/WR/WR/WR/WR/WR/W
Reset0 0 0 0 0 0 0 0

Bit 76543210

CCT1IFCCP1IFCNFIFDMA0IFCNBIFCNAIFT1IFINT0IF
AccessR/WR/WR/WR/WR/WR/WR/WR/W
Reset0 0 0 0 0 0 0 0

Bit 15 - INT1IF External Interrupt 1 bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 14 – NVMIF Nonvolatile Memory Write Complete Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 13 – ECCSBEIF ECC Single-Bit Error Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 12 - U1TXIF UART1 Transmitter Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 11 - U1RXIF UART1 Receiver Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 10 – SPI1TXIF SPI1 Transmit Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 9 – SPI1RXIF SPI1 Receive Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 8 – DMA1IF Direct Memory Access 1 Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 7 – CCT1IF Capture/Compare/Timer1 Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 6 – CCP1IF Input Capture/Output Compare 1 Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 5 – CNFIF CNFIF Change Notice Interrupt F bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 4 – DMA0IF Direct Memory Access 0 Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 3 – CNBIF Change Notice Interrupt B bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 2 – CNAIF Change Notice Interrupt A bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 1 - T1IF Timer1 Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 0 - INTOIF External Interrupt 0 bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

7.7.2 Interrupt Request Flags Register 1

Name: IFS1

Offset: 0x802

Bit 15 14 13 12 11 10 9 8

C1RXIF SPI2TXIF SPI2RXIF U2TXIF U2RXIF INT3IF C1IFCCT2IF
AccessR/WR/WR/WR/WR/WR/WR/WR/W
Reset0 0 0 0 0 0 0 0

Bit 76543210

CCP2IFDMA4IFDMA3IFINT2IFCNCIFDMA2IFMI2C1IFSI2C1IF
AccessR/WR/WR/WR/WR/WR/WR/WR/W
Reset0 0 0 0 0 0 0 0

Bit 15 - C1RXIF CAN1 RX Data Ready Interrupt bit

ValueDescription
1Interrupt enabled
0Interrupt not enabled

Bit 14 – SPI2TXIF SPI2 Transmit Interrupt bit

ValueDescription
1Interrupt has occurred
0Interrupt has not occurred

Bit 13 - SPI2RXIF SPI2 Receive Interrupt bit

ValueDescription
1Interrupt has occurred
0Interrupt has not occurred

Bit 12 - U2TXIF UART2 Transmitter Interrupt bit

ValueDescription
1Interrupt has occurred
0Interrupt has not occurred

Bit 11 - U2RXIF UART2 Receiver Interrupt bit

ValueDescription
1Interrupt has occurred
0Interrupt has not occurred

Bit 10 - INT3IF External Interrupt 3 bit

ValueDescription
1Interrupt has occurred
0Interrupt has not occurred

Bit 9 – C1IF CAN1 Combined Error Interrupt Bit

ValueDescription
1Interrupt has occurred
0Interrupt has not occurred

Bit 8 – CCT2IF Capture/Compare/Timer2 Interrupt bit

ValueDescription
1Interrupt enabled
0Interrupt not enabled

Bit 7 – CCP2IF Input Capture/Output Compare 2 Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 6 – DMA4IF Direct Memory Access 4 Interrupt bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 5 – DMA3IF Direct Memory Access 3 Interrupt bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 4 – INT2IF External Interrupt 2 bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 3 – CNCIF Change Notice Interrupt C bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 2 – DMA2IF Direct Memory Access 2 Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 1 – MI2C1IF I2C1 Host Event Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 0 – SI2C1IF I2C1 Client Event Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

7.7.3 Interrupt Request Flags Register 2

Name: IFS2

Offset: 0x804

Bit 15 14 13 12 11 10 9 8

CCT6IF CCP5IF DMTIF CCT5|F CCP5IF CCT4|F CCP4IF
AccessR/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 00 0

Bit 76543210

MI2C2SI2C2CCT3IFCCP3IFDMA5IFC2IFC2RXIF
AccessR/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0

Bit 15 - CCT6IF Capture/Compare/Timer6 Interrupt bit

ValueDescription
1Interrupt has occurred
0Interrupt has not occurred

Bit 14 – CCP6IF Input Capture/Output Compare 6 Interrupt bit

ValueDescription
1Interrupt has occurred
0Interrupt has not occurred

Bit 13 – DMTIF Deadman Timer Interrupt bit

ValueDescription
1Interrupt has occurred
0Interrupt has not occurred

Bit 12 - CCT5IF Capture/Compare/Timer5 Interrupt bit

ValueDescription
1Interrupt has occurred
0Interrupt has not occurred

Bit 11 – CCP5IF Input Capture/Output Compare 5 Interrupt bit

ValueDescription
1Interrupt has occurred
0Interrupt has not occurred

Bit 9 – CCT4IF Capture/Compare/Timer4 Interrupt bit

ValueDescription
1Interrupt has occurred
0Interrupt has not occurred

Bit 8 – CCP4IF Input Capture/Output Compare 4 Interrupt bit

ValueDescription
1Interrupt has occurred
0Interrupt has not occurred

Bit 6 – MI2C2 I2C2 Host Event Interrupt bit

ValueDescription
1Interrupt has occurred
0Interrupt has not occurred

Bit 5 – SI2C2 I2C2 Client Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 4 – CCT3IF Capture/Compare/Timer3 Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 3 – CCP3IF Input Capture/Output Compare 3 Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 2 – DMA5IF Direct Memory Access 5 Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 1 – C2IF CAN2 Combined Error Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 0 – C2RXIF CAN2 RX Data Ready Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

7.7.4 Interrupt Request Flags Register 3

Name: IFS3

Offset: 0x806

Bit 15 14 13 12 11 10 9 8

PTGSTEPIFICDIFSPI3TXIFSPI3RXIFU3TXIFU3RXIFU3EIF
AccessR/WR/WR/WR/WR/WR/WR/WR/W
Reset00 0 0 0 0 0

Bit 76543210

QE12IFC2TXIFC1TXIFCRCIFU2EIFU1EIFQE11IF
AccessR/WR/WR/WR/WR/WR/WR/W
Reset0 0 0 0 0 0 0

Bit 15 – PTGSTEPIF PTG Step Interrupt bit

ValueDescription
1Interrupt has occurred
0Interrupt has not occurred

Bit 13 - ICDIF In-Circuit Debugger Interrupt bit

ValueDescription
1Interrupt has occurred
0Interrupt has not occurred

Bit 12 - SPI3TXIF SPI3 Transmitter Interrupt bit

ValueDescription
1Interrupt has occurred
0Interrupt has not occurred

Bit 11 - SPI3RXIF SPI3 Receiver Interrupt bit

ValueDescription
1Interrupt has occurred
0Interrupt has not occurred

Bit 10 - U3TXIF UART3 Transmitter Interrupt bit

ValueDescription
1Interrupt has occurred
0Interrupt has not occurred

Bit 9 – U3RXIF UART3 Receiver Interrupt bit

ValueDescription
1Interrupt has occurred
0Interrupt has not occurred

Bit 8 - U3EIF UART3 Error Interrupt bit

ValueDescription
1Interrupt has occurred
0Interrupt has not occurred

Bit 6 - QE12IF QE12 Interrupt bit

ValueDescription
1Interrupt has occurred
0Interrupt has not occurred

Bit 5 – C2TXIF CAN2 TX Data Request Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 4 – C1TXIF CAN1 TX Data Request Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 3 – CRCIF Cyclic Redundancy Check Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 2 – U2EIF UART2 Error Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 1 – U1EIF UART1 Error Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 0 - QEI1IF QEI1 Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

7.7.5 Interrupt Request Flags Register 4

Name: IFS4

Offset: 0x808

Bit 15 14 13 12 11 10 9 8

CMP3IF CMP2IF CMP1IF CNEIF CNDIF PWMBIF PWM7IF PWM6IF
AccessR/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0 0

Bit 76543210

PWM5IF PWM4IF PWM3IF PWM2IF PWM1IFQEI3IFI2C2BCIFI2C1BCIF
AccessR/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0

Bit 15 - CMP3IF Comparator 3 Interrupt bit

ValueDescription
1Interrupt has occurred
0Interrupt has not occurred

Bit 14 - CMP2IF Comparator 2 Interrupt bit

ValueDescription
1Interrupt has occurred
0Interrupt has not occurred

Bit 13 - CMP1IF Comparator 1 Interrupt bit

ValueDescription
1Interrupt has occurred
0Interrupt has not occurred

Bit 12 – CNEIF Change Notice E Interrupt bit

ValueDescription
1Interrupt has occurred
0Interrupt has not occurred

Bit 11 – CNDIF Change Notice D Interrupt bit

ValueDescription
1Interrupt has occurred
0Interrupt has not occurred

Bit 10 – PWM8IF PWM Generator 8 Interrupt bit

ValueDescription
1Interrupt has occurred
0Interrupt has not occurred

Bit 9 – PWM7IF PWM Generator 7 Interrupt bit

ValueDescription
1Interrupt has occurred
0Interrupt has not occurred

Bit 8 – PWM6IF PWM Generator 6 Interrupt bit

ValueDescription
1Interrupt has occurred
0Interrupt has not occurred

Bit 7 – PWM5IF PWM Generator 5 Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 6 – PWM4IF PWM Generator 4 Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 5 – PWM3IF PWM Generator 3 Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 4 – PWM2IF PWM Generator 2 Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 3 – PWM1IF PWM Generator 1 Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 2 – QEI3IF QEI3 Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 1 – I2C2BCIF I2C2 Bus Collision Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 0 – I2C1BCIF I2C1 Bus Collision Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

7.7.6 Interrupt Request Flags Register 5

Name: IFS5

Offset: 0x80A

Bit 15 14 13 12 11 10 9 8

ADCAN4IF ADCAN3IF ADCAN2IF ADCAN1IF ADCAN0IF ADCIF SENT2EIF SENT2IF

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

SENT1EIFSENT1IFPTG3IFPTG2IFPTG1IFPTG0IFPTGWDTIFCMP4IF

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 15 - ADCAN4IF ADC AN4 Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 14 - ADCAN3IF ADC AN3 Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 13 - ADCAN2IF ADC AN2 Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 12 - ADCAN1IF ADC AN1 Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 11 - ADCAN0IF ADC ANO Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 10 - ADCIF ADC Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 9 – SENT2EIF SENT2 Error Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 8 – SENT2IF SENT2 TX/RX Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 7 – SENT1EIF SENT1 Error Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 6 – SENT1IF SENT1 TX/RX Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 5 – PTG3IF PTG3 Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 4 – PTG2IF PTG2 Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 3 – PTG1IF PTG Trigger 1 Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 2 – PTG0IF PTG Trigger 0 Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 1 – PTGWDTIF PTG Watchdog Timer Time-out Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 0 – CMP4IF Comparator 4 Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

7.7.7 Interrupt Request Flags Register 6

Name: IFS6

Offset: 0x80C

Bit 15 14 13 12 11 10 9 8

ADCAN20IF ADCAN19IF ADCAN18IF ADCAN17IF ADCAN16IF ADCAN15IF ADCAN14IF ADCAN13IF

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

ADCAN12IF ADCAN11IF ADCAN10IF ADCAN9IF ADCAN8IF ADCAN7IF ADCAN6IF ADCAN5IF

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 15 - ADCAN20IF ADC AN20 Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 14 - ADCAN19IF ADC AN19 Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 13 - ADCAN18IF ADC AN18 Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 12 - ADCAN17IF ADC AN17 Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 11 - ADCAN16IF ADC AN16 Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 10 - ADCAN15IF ADC AN15 Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 9 – ADCAN14IF ADC AN14 Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 8 – ADCAN13IF ADC AN13 Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 7 – ADCAN12IF ADC AN12 Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 6 - ADCAN11IF ADC AN11 Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 5 – ADCAN10IF ADC AN10 Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 4 – ADCAN9IF ADC AN9 Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 3 – ADCAN8IF ADC AN8 Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 2 – ADCAN7IF ADC AN7 Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 1 – ADCAN6IF ADC AN6 Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 0 – ADCAN5IF ADC AN5 Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

7.7.8 Interrupt Request Flags Register 7

Name: IFS7

Offset: 0x80E

Bit 15 14 13 12 11 10 9 8

SPI2GIF SPI1GIF CLC2PIF CLC1PIF ADFLTR3IFADFLTR2IF ADFLTR1IF ADFLTR0IF
AccessR/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0 0

Bit 76543210

ADCMP3IFADCMP2IFADCMP1IFADCMP0IFADFLTIFADCAN23IFADCAN22IFADCAN21IF
AccessR/WR/WR/WR/WR/WR/WR/WR/W
Reset00000000

Bit 15 - SPI2GIF SPI2 Error Interrupt bit

ValueDescription
1Interrupt has occurred
0Interrupt has not occurred

Bit 14 – SPI1GIF SPI1 Error Interrupt bit

ValueDescription
1Interrupt has occurred
0Interrupt has not occurred

Bit 13 – CLC2PIF CLC2 Positive Edge Interrupt bit

ValueDescription
1Interrupt has occurred
0Interrupt has not occurred

Bit 12 - CLC1PIF CLC1 Positive Edge Interrupt bit

ValueDescription
1Interrupt has occurred
0Interrupt has not occurred

Bit 11 - ADFLTR3IF ADC Oversample Filter 3 Interrupt bit

ValueDescription
1Interrupt has occurred
0Interrupt has not occurred

Bit 10 - ADFLTR2IF ADC Oversample Filter 2 Interrupt bit

ValueDescription
1Interrupt has occurred
0Interrupt has not occurred

Bit 9 – ADFLTR1IF ADC Oversample Filter 1 Interrupt bit

ValueDescription
1Interrupt has occurred
0Interrupt has not occurred

Bit 8 – ADFLTROIF ADC Oversample Filter 0 Interrupt bit

ValueDescription
1Interrupt has occurred
0Interrupt has not occurred

Bit 7 - ADCMP3IF ADC Digital Comparator 3 Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 6 - ADCMP2IF ADC Digital Comparator 2 Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 5 – ADCMP1IF ADC Digital Comparator 1 Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 4 – ADCMPOIF ADC Digital Comparator 0 Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 3 – ADFLTIF ADC Fault Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 2 – ADCAN23IF ADC AN23 Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 1 – ADCAN22IF ADC AN22 Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 0 – ADCAN21IF ADC AN21 Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

7.7.9 Interrupt Request Flags Register 8

Name: IFS8

Offset: 0x810

Bit 15 14 13 12 11 10 9 8

MI2C3IF SI2C3IF ADCAN31IFAPEVTDIF APEVTCIF APEVTBIFAPEVTAIF CLC8NIF

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

CLC8PIF CLC7NIF CLC7PIF CLC6NIF CLC6PIF CLC5NIF CLC5PIF SPI3IF

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 15 - MI2C3IF I2C3 Host Event Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 14 – SI2C3IF I2C3 Client Event Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 13 - ADCAN31IF ADC AN31 Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 12 - APEVTDIF Alternate PWM Event D Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 11 – APEVTCIF Alternate PWM Event C Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 10 – APEVTBIF Alternate PWM Event B Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 9 – APEVTAIF Alternate PWM Event A Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 8 – CLC8NIF CLC8 Negative Edge Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 7 – CLC8PIF CLC8 Positive Edge Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 6 – CLC7NIF CLC7 Negative Edge Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 5 – CLC7PIF CLC7 Positive Edge Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 4 – CLC6NIF CLC6 Negative Edge Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 3 – CLC6PIF CLC6 Positive Edge Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 2 – CLC5NIF CLC5 Negative Edge Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 1 – CLC5PIF CLC5 Positive Edge Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 0 – SPI3IF SPI3 Error Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

7.7.10 Interrupt Request Flags Register 9

Name: IFS9

Offset: 0x812

Bit 15 14 13 12 11 10 9 8

APEVTFIFAPEVTEIFDMA7FDMA6IFCCT8FCCP8F
AccessR/WR/WR/WR/WR/W
Reset0 00 0 0 0

Bit 76543210

ADCAN26IFCCT7IFCCP7IFADCAN30IFADCAN29IFADCAN28IFADCAN27IFI2C3BCIF
AccessR/WR/WR/WR/WR/WR/WR/WR/W
Reset0 0 0 0 0 0 0 0

Bit 15 – APEVTFIF Alternate PWM Event F Interrupt bit

ValueDescription
1Interrupt has occurred
0Interrupt has not occurred

Bit 14 – APEVTEIF Alternate PWM Event E Interrupt bit

ValueDescription
1Interrupt has occurred
0Interrupt has not occurred

Bit 11 – DMA7IF Direct Memory Access 7 Interrupt bit

ValueDescription
1Interrupt has occurred
0Interrupt has not occurred

Bit 10 - DMA6IF Direct Memory Access 6 Interrupt bit

ValueDescription
1Interrupt has occurred
0Interrupt has not occurred

Bit 9 – CCT8IF CCP8 (Timer8) Interrupt bit

ValueDescription
1Interrupt has occurred
0Interrupt has not occurred

Bit 8 – CCP8IF Interrupt-on-Change 8 Interrupt bit

ValueDescription
1Interrupt has occurred
0Interrupt has not occurred

Bit 7 - ADCAN26IF ADC AN26 Interrupt bit

ValueDescription
1Interrupt has occurred
0Interrupt has not occurred

Bit 6 – CCT7IF CCP7 (Timer7) Interrupt bit

ValueDescription
1Interrupt has occurred
0Interrupt has not occurred

Bit 5 – CCP7IF Interrupt-on-Change 7 Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 4 – ADCAN30IF ADC AN30 Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 3 – ADCAN29IF ADC AN29 Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 2 – ADCAN28IF ADC AN28 Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 1 – ADCAN27IF ADC AN27 Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 0 – I2C3BCIF I2C3 Bus Collision Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

7.7.11 Interrupt Request Flags Register 10

Name: IFS10

Offset: 0x814

Bit 15 14 13 12 11 10 9 8

CLC3PIF PEVTFIF PEVTEIF PEVTDIF PEVTCIF PEVTBIF PEVTAIF
AccessR/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0

Bit 76543210

ADC3EIFADC2EIFADC1EIFADC0EIF
AccessR/W R/W R/W R/W
Reset0 0 0 0

Bit 15 – CLC3PIF CLC3 Positive Edge Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 14 – PEVTFIF PWM Event F Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 13 – PEVTEIF PWM Event E Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 12 – PEVTDIF PWM Event D Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 11 – PEVTCIF PWM Event C Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 10 – PEVTBIF PWM Event B Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 9 – PEVTAIF PWM Event A Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 3 – ADC3EIF ADC Enable 3 Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 2 - ADC2EIF ADC Enable 2 Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 1 - ADC1EIF ADC Enable 1 Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 0 - ADCOEIF ADC Enable 0 Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

7.7.12 Interrupt Request Flags Register 11

Name: IFS11

Offset: 0x816

Bit 15 14 13 12 11 10 9 8

U3EVTIF U2EVTIF U1EVTIF CMP6IF CMP5IF APWM4IF APWM3IF APWM2IF

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

APWM1IFCCT9IFCCP9IFCLC4NIFCLC3NIFCLC2NIFCLC1NIFCLC4PIF

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 15 - U3EVTIF UART3 Event Interrupt bit

ValueDescription
1Interrupt has occurred
0Interrupt has not occurred

Bit 14 - U2EVTIF UART2 Event Interrupt bit

ValueDescription
1Interrupt has occurred
0Interrupt has not occurred

Bit 13 - U1EVTIF UART1 Event Interrupt bit

ValueDescription
1Interrupt has occurred
0Interrupt has not occurred

Bit 12 - CMP6IF Comparator 6 Interrupt bit

ValueDescription
1Interrupt has occurred
0Interrupt has not occurred

Bit 11 - CMP5IF Comparator 5 Interrupt bit

ValueDescription
1Interrupt has occurred
0Interrupt has not occurred

Bit 10 - APWM4IF Alternate PWM Generator 4 Interrupt bit

ValueDescription
1Interrupt has occurred
0Interrupt has not occurred

Bit 9 – APWM3IF Alternate PWM Generator 3 Interrupt bit

ValueDescription
1Interrupt has occurred
0Interrupt has not occurred

Bit 8 – APWM2IF Alternate PWM Generator 2 Interrupt bit

ValueDescription
1Interrupt has occurred
0Interrupt has not occurred

Bit 7 – APWM1IF Alternate PWM Generator 1 Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 6 – CCT9IF Capture/Compare/Timer9 Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 5 – CCP9IF Input Capture/Output Compare 9 Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 4 – CLC4NIF CLC4 Negative Edge Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 3 – CLC3NIF CLC3 Negative Edge Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 2 – CLC2NIF CLC2 Negative Edge Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 1 – CLC1NIF CLC1 Negative Edge Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 0 – CLC4PIF CLC4 Positive Edge Interrupt bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

7.7.13 Interrupt Request Flags Register 12

Name: IFS12

Offset: 0x818

Bit 15 14 13 12 11 10 9 8

Access Reset

Bit 76543210

PMPEIF PMPIF ADCAN25IF ADCAN24IF
Access ResetR/W 0000R/WR/WR/WR/W

Bit 3 – PMPEIF Parallel Main Port External Interrupt bit

ValueDescription
1Interrupt has occurred
0Interrupt has not occurred

Bit 2 – PMPIF Parallel Main Port Interrupt bit

ValueDescription
1Interrupt has occurred
0Interrupt has not occurred

Bit 1 – ADCAN25IF ADC AN25 Interrupt bit

ValueDescription
1Interrupt has occurred
0Interrupt has not occurred

Bit 0 - ADCAN24IF ADC AN24 Interrupt bit

ValueDescription
1Interrupt has occurred
0Interrupt has not occurred

7.7.14 Interrupt Enable Register 0

Name: IECO

Offset: 0x820

Bit 15 14 13 12 11 10 9 8

INT1IE NVMIE ECCSBEIE U1TXIE U1RXIE SPI1TXIE SPI1RXIEDMA1IE
AccessR/WR/WR/WR/WR/WR/WR/WR/W
Reset0 0 0 0 0 0 0

Bit 76543210

CCT1IECCP1IECNFIEDMA0IECNBIECNAIET1IEINT0IE
AccessR/WR/WR/WR/WR/WR/WR/WR/W
Reset0 0 0 0 0 0 0

Bit 15 - INT1IE External Interrupt 1 Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 14 – NVMIE NVM Program/Erase Complete Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 13 – ECCSBEIE ECC Single-Bit Error Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 12 - U1TXIE UART1 Transmitter Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 11 - U1RXIE UART1 Receiver Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 10 - SPI1TXIE SPI1 Transmit Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 9 – SPI1RXIE SPI1 Receive Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 8 – DMA1IE Direct Memory Access 1 Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 7 – CCT1IE Capture/Compare/Timer1 Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 6 – CCP1IE Input Capture/Output Compare 1 Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 5 – CNFIE CNFIE Change Notice F Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 4 – DMA0IE Direct Memory Access 0 Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 3 – CNBIE Change Notice B Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 2 – CNAIE Change Notice A Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 1 - T1IE Timer1 Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 0 - INTOIE External Interrupt 0 Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

7.7.15 Interrupt Enable Register 1

Name: IEC1

Offset: 0x822

Bit 15 14 13 12 11 10 9 8

C1RXIE SPI2TXIE SPI2RXIE U2TXIE U2RXIE INT3IE C1IECCT2IE
AccessR/WR/WR/WR/WR/WR/WR/WR/W
Reset0 0 0 0 0 0 0 0

Bit 76543210

CCP2IEDMA4IEDMA3IEINT2IECNCIEDMA2IEMI2C1IESI2C1IE
AccessR/WR/WR/WR/WR/WR/WR/WR/W
Reset0 0 0 0 0 0 0

Bit 15 - C1RXIE CAN1 RX Data Ready Interrupt Enable bit

ValueDescription
1Interrupt enabled
0Interrupt not enabled

Bit 14 – SPI2TXIE SPI2 Transmitter Interrupt Enable bit

ValueDescription
1Interrupt enabled
0Interrupt not enabled

Bit 13 – SPI2RXIE SPI2 Receiver Interrupt Enable bit

ValueDescription
1Interrupt enabled
0Interrupt not enabled

Bit 12 - U2TXIE UART2 Transmitter Interrupt Enable bit

ValueDescription
1Interrupt enabled
0Interrupt not enabled

Bit 11 - U2RXIE UART2 Receiver Interrupt Enable bit

ValueDescription
1Interrupt enabled
0Interrupt not enabled

Bit 10 - INT3IE External Interrupt 3 Enable bit

ValueDescription
1Interrupt enabled
0Interrupt not enabled

Bit 9 – C1IE CAN1 Combined Error Interrupt Enable bit

ValueDescription
1Interrupt enabled
0Interrupt not enabled

Bit 8 – CCT2IE Capture/Compare/Timer2 Interrupt Enable bit

ValueDescription
1Interrupt enabled
0Interrupt not enabled

Bit 7 – CCP2IE Input Capture/Output Compare 2 Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 6 – DMA4IE Input Capture/Output Compare 2 Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 5 – DMA3IE Direct Memory Access 3 Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 4 – INT2IE External Interrupt 2 Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 3 – CNCIE Change Notice C Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 2 – DMA2IE Direct Memory Access 2 Interrupt bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 1 – MI2C1IE I2C1 Host Events Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 0 – SI2C1IE I2C1 Client Events Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

7.7.16 Interrupt Enable Register 2

Name: IEC2

Offset: 0x824

Bit 15 14 13 12 11 10 9 8

CCT6IE CCP6IE DMTIE CCT5IE CCP5IE CCT4IE CCP4IE
AccessR/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 00 0

Bit 76543210

MI2C2IESI2C2IECCT3IECCP3IEDMA5IEC2IEC2RXIE
AccessR/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0

Bit 15 - CCT6IE Capture/Compare/Timer6 Enable bit

ValueDescription
1Interrupt enabled
0Interrupt not enabled

Bit 14 – CCP6IE Input Capture/Output Compare 6 Interrupt Enable bit

ValueDescription
1Interrupt enabled
0Interrupt not enabled

Bit 13 – DMTIE Deadman Timer Interrupt Enable bit

ValueDescription
1Interrupt enabled
0Interrupt not enabled

Bit 12 - CCT5IE Capture/Compare/Timer5 Interrupt Enable bit

ValueDescription
1Interrupt enabled
0Interrupt not enabled

Bit 11 – CCP5IE Input Capture/Output Compare 5 Interrupt Enable bit

ValueDescription
1Interrupt enabled
0Interrupt not enabled

Bit 9 – CCT4IE Capture/Compare/Timer4 Interrupt Enable bit

ValueDescription
1Interrupt enabled
0Interrupt not enabled

Bit 8 – CCP4IE Input Capture/Output Compare 4 Interrupt Enable bit

ValueDescription
1Interrupt enabled
0Interrupt not enabled

Bit 6 – MI2C2IE I2C2 Host Event Interrupt Enable bit

ValueDescription
1Interrupt enabled
0Interrupt not enabled

Bit 5 – SI2C2IE I2C2 Client Event Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 4 – CCT3IE Capture/Compare/Timer3 Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 3 – CCP3IE Input Capture/Output Compare 3 Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 2 – DMA5IE Direct Memory Access 5 Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 1 - C2IE CAN2 Combined Error Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 0 - C2RXIE CAN2 RX Data Ready Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

7.7.17 Interrupt Enable Register 3

Name: IEC3

Offset: 0x826

Bit 15 14 13 12 11 10 9 8

PTGSTEPIEICDIE SPI3TXIE SPI3RXIEU3TXIEU3RXIEU3EIE
AccessR/WR/WR/WR/WR/WR/WR/W
Reset 00 0 0 0 0 0

Bit 76543210

QE12IEC2TXIEC1TXIECRCIEU2EIEU1EIEQE11IE
AccessR/WR/WR/WR/WR/WR/WR/W
Reset0 0 0 0 0 0 0

Bit 15 – PTGSTEPIE PTG Step Interrupt Enable bit

ValueDescription
1Interrupt enabled
0Interrupt not enabled

Bit 13 - ICDIE ICD Interrupt Enable bit

ValueDescription
1Interrupt enabled
0Interrupt not enabled

Bit 12 - SPI3TXIE SPI3 Transmitter Interrupt Enable bit

ValueDescription
1Interrupt enabled
0Interrupt not enabled

Bit 11 - SPI3RXIE SPI3 Receiver Interrupt Enable bit

ValueDescription
1Interrupt enabled
0Interrupt not enabled

Bit 10 - U3TXIE UART3 Transmitter Interrupt Enable bit

ValueDescription
1Interrupt enabled
0Interrupt not enabled

Bit 9 - U3RXIE UART3 Receiver Interrupt Enable bit

ValueDescription
1Interrupt enabled
0Interrupt not enabled

Bit 8 - U3EIE UART3 Error Interrupt Enable bit

ValueDescription
1Interrupt enabled
0Interrupt not enabled

Bit 6 – QE12IE QE12 Interrupt Enable bit

ValueDescription
1Interrupt enabled
0Interrupt not enabled

Bit 5 – C2TXIE CAN2 TX Data Request Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 4 – C1TXIE CAN1 TX Data Request Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 3 – CRCIE CRC Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 2 – U2EIE UART2 Error Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 1 - U1EIE UART1 Error Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 0 – QEI1IE QEI1 Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

7.7.18 Interrupt Enable Register 4

Name: IEC4

Offset: 0x828

Bit 15 14 13 12 11 10 9 8

CMP3IE CMP2IE CMP1IE CNEIE CNDIE PWM8IE PWM7IE PWM6IE

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

PWM5IE PWM4IE PWM3IEPWM2IE PWM1IEQEI3IEI2C2BCIEI2C1BCIE

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 15 - CMP3IE Comparator 3 Interrupt Enable bit

ValueDescription
1Interrupt enabled
0Interrupt not enabled

Bit 14 - CMP2IE Comparator 2 Interrupt Enable bit

ValueDescription
1Interrupt enabled
0Interrupt not enabled

Bit 13 - CMP1IE Comparator 1 Interrupt Enable bit

ValueDescription
1Interrupt enabled
0Interrupt not enabled

Bit 12 - CNEIE Change Notice E Interrupt Enable bit

ValueDescription
1Interrupt enabled
0Interrupt not enabled

Bit 11 – CNDIE Change Notice D Interrupt Enable bit

ValueDescription
1Interrupt enabled
0Interrupt not enabled

Bit 10 – PWM8IE Pulse-Width Modulation 8 Interrupt Enable bit

ValueDescription
1Interrupt enabled
0Interrupt not enabled

Bit 9 – PWM7IE Pulse-Width Modulation 7 Interrupt Enable bit

ValueDescription
1Interrupt enabled
0Interrupt not enabled

Bit 8 – PWM6IE Pulse-Width Modulation 6 Interrupt Enable bit

ValueDescription
1Interrupt enabled
0Interrupt not enabled

Bit 7 – PWM5IE Pulse-Width Modulation 5 Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 6 – PWM4IE Pulse-Width Modulation 4 Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 5 – PWM3IE Pulse-Width Modulation 3 Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 4 – PWM2IE Pulse-Width Modulation 2 Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 3 – PWM1IE Pulse-Width Modulation 1 Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 2 – QEI3IE QEI3 Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 1 – I2C2BCIE I2C2 Bus Collision Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 0 – I2C1BCIE I2C1 Bus Collision Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

7.7.19 Interrupt Enable Register 5

Name: IEC5

Offset: 0x82A

Bit 15 14 13 12 11 10 9 8

ADCAN4IE ADCAN3IE ADCAN2IE ADCAN1IE ADCANOIE ADCIE SENT2EIE SENT2IE

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

SENT1EIESENT1IEPTG3IEPTG2IEPTG1IEPTG0IEPTGWDTIECMP4IE

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 15 - ADCAN4IE ADC AN4 Interrupt Enable bit

ValueDescription
1Interrupt enabled
0Interrupt not enabled

Bit 14 - ADCAN3IE ADC AN3 Interrupt Enable bit

ValueDescription
1Interrupt enabled
0Interrupt not enabled

Bit 13 - ADCAN2IE ADC AN2 Interrupt Enable bit

ValueDescription
1Interrupt enabled
0Interrupt not enabled

Bit 12 - ADCAN1IE ADC AN1 Interrupt Enable bit

ValueDescription
1Interrupt enabled
0Interrupt not enabled

Bit 11 - ADCANOIE ADC ANO Interrupt Enable bit

ValueDescription
1Interrupt enabled
0Interrupt not enabled

Bit 10 - ADCIE ADC Global Interrupt Enable bit

ValueDescription
1Interrupt enabled
0Interrupt not enabled

Bit 9 – SENT2EIE SENT2 Error Interrupt Enable bit

ValueDescription
1Interrupt enabled
0Interrupt not enabled

Bit 8 – SENT2IE SENT2 TX/RX Interrupt Enable bit

ValueDescription
1Interrupt enabled
0Interrupt not enabled

Bit 7 – SENT1EIE SENT1 Error Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 6 – SENT1IE SENT1 TX/RX Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 5 – PTG3IE PTG3 Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 4 – PTG2IE PTG2 Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 3 – PTG1IE PTG1 Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 2 – PTG0IE PTG0 Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 1 – PTGWDTIE PTG Watchdog Timer Time-out Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 0 - CMP4IE Comparator 4 Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

7.7.20 Interrupt Enable Register 6

Name: IEC6

Offset: 0x82C

Bit 15 14 13 12 11 10 9 8

ADCAN20IE ADCAN19IE ADCAN18IE ADCAN17IE ADCAN16IE ADCAN15IE ADCAN14IE ADCAN13IE

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

ADCAN12IE ADCAN11IE ADCAN10IE ADCAN9IE ADCAN8IE ADCAN7IE ADCAN6IE ADCAN5IE

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 15 - ADCAN20IE ADC AN20 Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 14 - ADCAN19IE ADC AN19 Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 13 - ADCAN18IE ADC AN18 Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 12 - ADCAN17IE ADC AN17 Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 11 - ADCAN16IE ADC AN16 Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 10 - ADCAN15IE ADC AN15 Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 9 – ADCAN14IE ADC AN14 Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 8 – ADCAN13IE ADC AN13 Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 7 – ADCAN12IE ADC AN12 Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 6 – ADCAN11IE ADC AN11 Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 5 – ADCAN10IE ADC AN10 Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 4 – ADCAN9IE ADC AN9 Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 3 – ADCAN8IE ADC AN8 Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 2 – ADCAN7IE ADC AN7 Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 1 – ADCAN6IE ADC AN6 Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 0 – ADCAN5IE ADC AN5 Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

7.7.21 Interrupt Enable Register 7

Name: IEC7

Offset: 0x82E

Bit 15 14 13 12 11 10 9 8

SPI2GIE SPI1GIE CLC2PIE CLC1PIE ADFLTR3IE ADFLTR2IE ADFLTR1IE ADFLTR0IE

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

ADCMP3IEADCMP2IEADCMP1IEADCMPOIEADFLTIEADCAN23IEADCAN22IEADCAN21IE

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 15 - SPI2GIE SPI2 Error Interrupt Enable bit

ValueDescription
1Interrupt enabled
0Interrupt not enabled

Bit 14 – SPI1GIE SPI1 Error Interrupt Enable bit

ValueDescription
1Interrupt enabled
0Interrupt not enabled

Bit 13 – CLC2PIE CLC2 Positive Edge Interrupt Enable bit

ValueDescription
1Interrupt enabled
0Interrupt not enabled

Bit 12 - CLC1PIE CLC1 Positive Edge Interrupt Enable bit

ValueDescription
1Interrupt enabled
0Interrupt not enabled

Bit 11 – ADFLTR3IE ADC Oversample Filter 3 Interrupt Enable bit

ValueDescription
1Interrupt enabled
0Interrupt not enabled

Bit 10 – ADFLTR2IE ADC Oversample Filter 2 Interrupt Enable bit

ValueDescription
1Interrupt enabled
0Interrupt not enabled

Bit 9 – ADFLTR1IE ADC Oversample Filter 1 Interrupt Enable bit

ValueDescription
1Interrupt enabled
0Interrupt not enabled

Bit 8 – ADFLTROIE ADC Oversample Filter 0 Interrupt Enable bit

ValueDescription
1Interrupt enabled
0Interrupt not enabled

Bit 7 – ADCMP3IE ADC Digital Comparator 3 Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 6 – ADCMP2IE ADC Digital Comparator 2 Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 5 – ADCMP1IE ADC Digital Comparator 1 Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 4 – ADCMPOIE ADC Digital Comparator 0 Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 3 – ADFLTIE ADC Fault Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 2 – ADCAN23IE ADC AN23 Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 1 – ADCAN22IE ADC AN22 Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 0 – ADCAN21IE ADC AN21 Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

7.7.22 Interrupt Enable Register 8

Name: IEC8

Offset: 0x830

Bit 15 14 13 12 11 10 9 8

MI2C3IE SI2C3IE ADCAN31IEAPEVTDIE APEVTCIE APEVTBIEAPEVTAIE CLC8NIE

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

CLC8PIE CLC7NIE CLC7PIE CLC6NIE CLC6PIE CLC5NIE CLC5PIE SPI3IE

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 15 - MI2C3IE I2C3 Host Event Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 14 – SI2C3IE I2C3 Client Event Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 13 - ADCAN31IE ADC AN31 Interrupt bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 12 – APEVTDIE Alternate PWM Event D Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 11 – APEVTCIE Alternate PWM Event C Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 10 – APEVTBIE Alternate PWM Event B Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 9 – APEVTAIE Alternate PWM Event A Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 8 – CLC8NIE CLC8 Negative Edge Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 7 – CLC8PIE CLC8 Positive Edge Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 6 – CLC7NIE CLC7 Negative Edge Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 5 – CLC7PIE CLC7 Positive Edge Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 4 – CLC6NIE CLC6 Negative Edge Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 3 – CLC6PIE CLC6 Positive Edge Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 2 – CLC5NIE CLC5 Negative Edge Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 1 – CLC5PIE CLC5 Positive Edge Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 0 – SPI3IE SPI3 Error Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

7.7.23 Interrupt Enable Register 9

Name: IEC9

Offset: 0x832

Bit 15 14 13 12 11 10 9 8

APEVTFIEAPEVTEIEDMA71EDMA61ECCT81ECCP81E
AccessR/WR/WR/WR/WR/WR/W
Reset0 00 0 0 0

Bit 76543210

ADCAN26IECCT7IECCP7IEADCAN30IEADCAN29IEADCAN28IEADCAN27IEI2C3BCIE
AccessR/WR/WR/WR/WR/WR/WR/WR/W
Reset0 0 0 0 0 0 0 0

Bit 15 – APEVTFIE Alternate PWM Event F Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 14 – APEVTEIE Alternate PWM Event E Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 11 – DMA7IE Direct Memory Access 7 Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 10 – DMA6IE Direct Memory Access 6 Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 9 – CCT8IE Capture/Compare/Timer8 Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 8 – CCP8IE Input Capture/Output Compare 8 Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 7 – ADCAN26IE ADC AN26 Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 6 – CCT7IE Capture/Compare/Timer7 Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 5 – CCP7IE Input Capture/Output Compare 7 Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 4 – ADCAN30IE ADC AN30 Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 3 – ADCAN29IE ADC AN29 Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 2 – ADCAN28IE ADC AN28 Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 1 – ADCAN27IE ADC AN27 Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 0 – I2C3BCIE I2C3 Bus Collision Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

7.7.24 Interrupt Enable Register 10

Name: IEC10

Offset: 0x834

Bit 15 14 13 12 11 10 9 8

CLC3PIE PEVTFIE PEVTEIE PEVTDIE PEVTCIE PEVTBIE PEVTAIE
AccessR/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0

Bit 76543210

ADC3EIEADC2EIEADC1EIEADC0EIE
AccessR/W R/W R/W R/W
Reset0 0 0 0

Bit 15 – CLC3PIE CLC3 Positive Edge Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 14 – PEVTFIE PWM Event F Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 13 – PEVTEIE PWM Event E Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 12 – PEVTDIE PWM Event D Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 11 – PEVTCIE PWM Event C Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 10 – PEVTBIE PWM Event B Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 9 – PEVTAIE PWM Event A Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 3 – ADC3EIE ADC Enable 3 Interrupt Enable bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 2 – ADC2EIE ADC Enable 2 Interrupt Enable bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 1 – ADC1EIE ADC Enable 1 Interrupt Enable bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

Bit 0 – ADCOEIE ADC Enable 0 Interrupt Enable bit

Value Description
1Interrupt has occurred
0Interrupt has not occurred

7.7.25 Interrupt Enable Register 11

Name: IEC11

Offset: 0x836

Bit 15 14 13 12 11 10 9 8

U3EVTIE U2EVTIE U1EVTIE CMP6IE CMP5IEAPWM4IE APWMM3IE APWM2IE

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

APWM1IECCT9IECCP9IECLC4NIECLC3NIECLC2NIECLC1NIECLC4PIE

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 15 - U3EVTIE UART3 Event Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 14 - U2EVTIE UART2 Event Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 13 - U1EVTIE UART1 Event Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 12 - CMP6IE Comparator 6 Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 11 - CMP5IE Comparator 5 Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 10 - APWM4IE Alternate PWM4 Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 9 – APWM3IE Alternate PWM3 Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 8 – APWM2IE Alternate PWM2 Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 7 – APWM1IE Alternate PWM1 Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 6 – CCT9IE Capture/Compare/Timer9 Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 5 – CCP9IE Input Capture/Output Compare 9 Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 4 – CLC4NIE CLC4 Negative Edge Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 3 – CLC3NIE CLC3 Negative Edge Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 2 – CLC2NIE CLC2 Negative Edge Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 1 – CLC1NIE CLC1 Negative Edge Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

Bit 0 – CLC4PIE CLC4 Positive Edge Interrupt Enable bit

Value Description
1Interrupt enabled
0Interrupt not enabled

7.7.26 Interrupt Enable Register 12

Name: IEC12

Offset: 0x838

Bit 15 14 13 12 11 10 9 8

Access Reset

Bit 76543210

PMPEIE PMPIE ADCAN25IEADCAN24IE
Access ResetR/W 0000R/WR/WR/W

Bit 3 – PMPEIE Parallel Main Port External Interrupt Enable bit

ValueDescription
1Interrupt enabled
0Interrupt not enabled

Bit 2 – PMPIE Parallel Main Port Interrupt Enable bit

ValueDescription
1Interrupt enabled
0Interrupt not enabled

Bit 1 – ADCAN25IE ADC AN25 Interrupt Enable bit

ValueDescription
1Interrupt enabled
0Interrupt not enabled

Bit 0 – ADCAN24IE ADC AN24 Interrupt Enable bit

ValueDescription
1Interrupt enabled
0Interrupt not enabled

7.7.27 Interrupt Priority Register 0

Name: IPCO

Offset: 0x840

Bit 15 14 13 12 11 10 9 8

CNBIP[2:0] CNAIP[2:0]
AccessR/W R/W R/W R/W R/W R/W
Reset 100100

Bit 76543210

T1IP[2:0]INTOIP[2:0]
AccessR/W R/W R/W R/W R/W R/W
Reset 100100

Bits 14:12 – CNBIP[2:0] Change Notice B Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 10:8 – CNAIP[2:0] Change Notice A Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 6:4 – T1IP[2:0] Timer1 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 2:0 – INTOIP[2:0] External Interrupt 0 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)

Value Description

3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

7.7.28 Interrupt Priority Register 1

Name: IPC1

Offset: 0x842

Bit 15 14 13 12 11 10 9 8

CCT1IP[2:0]CCP1IP[2:0]
AccessR/WR/WR/WR/W
Reset 100100

Bit 76543210

CNFIP[2:0]DMA0IP[2:0]
AccessR/W R/W R/W R/W R/W R/W
Reset 100100

Bits 14:12 - CCT1IP[2:0] Capture/Compare/Timer1 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 10:8 - CCP1IP[2:0] Input Capture/Output Compare 1 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 6:4 – CNFIP[2:0] Change Notice F Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 2:0 – DMA0IP[2:0] Direct Memory Access 0 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)

Value Description

3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

7.7.29 Interrupt Priority Register 2

Name: IPC2

Offset: 0x844

Bit 15 14 13 12 11 10 9 8

U1RXIP[2:0] SPI1TXIP[2:0]
AccessR/W R/W R/W R/W R/W R/W
Reset 100100

Bit 76543210

SPI1RX|P[2:0]DMA1|P[2:0]
AccessR/W R/W R/W R/W R/W R/W
Reset 100100

Bits 14:12 - U1RXIP[2:0] UART1 Receiver Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 10:8 – SPI1TXIP[2:0] SPI1 Transmitter Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 6:4 – SPI1RXIP[2:0] SPI1 Receiver Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 2:0 – DMA1IP[2:0] Direct Memory Access 1 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)

Value Description

3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

7.7.30 Interrupt Priority Register 3

Name: IPC3

Offset: 0x846

Bit 15 14 13 12 11 10 9 8

INT1IP[2:0] NVMIP[2:0]
AccessR/W R/W R/W R/W R/W R/W
Reset 100100

Bit 76543210

ECCSBEIP[2:0]U1TXIP[2:0]
AccessR/W R/W R/W R/W R/W R/W
Reset 100100

Bits 14:12 - INT1IP[2:0] External Interrupt 1 Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 10:8 – NVMIP[2:0] NVM Program/Erase Complete Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 6:4 – ECCSBEIP[2:0] Error Correcting Code Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 2:0 – U1TXIP[2:0] UART1 Transmitter Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)

Value Description

3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

7.7.31 Interrupt Priority Register 4

Name: IPC4

Offset: 0x848

Bit 15 14 13 12 11 10 9 8

CNCIP[2:0] DMA2IP[2:0]
AccessR/W R/W R/W R/W R/W R/W
Reset 100100

Bit 76543210

MI2C1IP[2:0]SI2C1IP[2:0]
AccessR/W R/W R/W R/W R/W R/W
Reset 100100

Bits 14:12 - CNCIP[2:0] Change Notification C Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 10:8 – DMA2IP[2:0] Direct Memory Access 2 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 6:4 – MI2C1IP[2:0] |2C1 Host Events Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 2:0 – SI2C1IP[2:0] I2C1 Client Events Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)

Value Description

3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

7.7.32 Interrupt Priority Register 5

Name: IPC5

Offset: 0x84A

Bit 15 14 13 12 11 10 9 8

CCP2IP[2:0] DMA4IP[2:0]
AccessR/W R/W R/W R/W R/W R/W
Reset 100100

Bit 76543210

DMA3IP[2:0]INT2IP[2:0]
AccessR/W R/W R/W R/W R/W R/W
Reset 100100

Bits 14:12 - CCP2IP[2:0] Input Capture/Output Compare 2 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 10:8 – DMA4IP[2:0] Direct Memory Access 4 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 6:4 – DMA3IP[2:0] Direct Memory Access 3 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 2:0 - INT2IP[2:0] External Interrupt 2 Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)

Value Description

3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

7.7.33 Interrupt Priority Register 6

Name: IPC6

Offset: 0x84C

Bit 15 14 13 12 11 10 9 8

U2RXIP[2:0] INT3IP[2:0]
AccessR/W R/W R/W R/W R/W R/W
Reset 100100

Bit 76543210

C1IP[2:0]CCT2IP[2:0]
AccessR/W R/W R/W R/W R/W R/W
Reset 100100

Bits 14:12 - U2RXIP[2:0] UART2 Receiver Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 10:8 - INT3IP[2:0] External Interrupt 3 Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 6:4 – C1IP[2:0] CAN1 Combined Error Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 2:0 – CCT2IP[2:0] Capture/Compare/Timer2 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)

Value Description

3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

7.7.34 Interrupt Priority Register 7

Name: IPC7

Offset: 0x84E

Bit 15 14 13 12 11 10 9 8

C1RXIP[2:0]SPI2TXIP[2:0]
AccessR/WR/WR/WR/W
Reset 100100

Bit 76543210

SPI2RXIP[2:0]U2TXIP[2:0]
AccessR/W R/W R/W R/W R/W R/W
Reset 100100

Bits 14:12 - C1RXIP[2:0] CAN1 RX Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 10:8 – SPI2TXIP[2:0] SPI2 Transmitter Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 6:4 – SPI2RXIP[2:0] SPI2 Receiver Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 2:0 – U2TXIP[2:0] UART2 Transmitter Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)

Value Description

3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

7.7.35 Interrupt Priority Register 8

Name: IPC8

Offset: 0x850

Bit 15 14 13 12 11 10 9 8

CCP3IP[2:0] DMA5IP[2:0]
AccessR/W R/W R/W R/W R/W R/W
Reset 100100

Bit 76543210

C2IP[2:0]C2RXIP[2:0]
AccessR/W R/W R/W R/W R/W R/W
Reset 100100

Bits 14:12 - CCP3IP[2:0] Input Capture/Output Compare 3 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 10:8 – DMA5IP[2:0] Direct Memory Access 5 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 6:4 – C2IP[2:0] CAN2 Combined Error Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 2:0 - C2RXIP[2:0] CAN2 RX Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)

Value Description

3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

7.7.36 Interrupt Priority Register 9

Name: IPC9

Offset: 0x852

Bit 15 14 13 12 11 10 9 8

M|2C2IP[2:0]
Access Reset 100R/W R/W R/W

Bit 76543210

SI2C2IP[2:0]CCT3IP[2:0]
AccessR/W R/W R/WR/W R/W R/W
Reset1 0 01 0 0

Bits 10:8 – MI2C2IP[2:0] Host I2C2 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 6:4 – SI2C2IP[2:0] Client I2C2 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 2:0 – CCT3IP[2:0] Capture/Compare/Timer3 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

7.7.37 Interrupt Priority Register 10

Name: IPC10

Offset: 0x854

Bit 15 14 13 12 11 10 9 8
CCP5IP[2:0]
Access Reset 1 0 0R/W R/W R/W
Bit 7 6 5 4 3 2 1 0
CCT4IP[2:0] CCP4IP[2:0]
Access Reset 1 0 0R/W R/W R/WR/W R/W R/W
1 0 0

Bits 14:12 - CCP5IP[2:0] Input Capture/Output Compare 5 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 6:4 – CCT4IP[2:0] Capture/Compare/Timer4 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 2:0 – CCP4IP[2:0] Input Capture/Output Compare 4 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

7.7.38 Interrupt Priority Register 11

Name: IPC11

Offset: 0x856

Bit 15 14 13 12 11 10 9 8

CCT6IP[2:0]CCP6IP[2:0]
AccessR/WR/WR/WR/W R/W R/W
Reset 100100

Bit 76543210

DMTIP[2:0]CCT5IP[2:0]
AccessR/W R/W R/W R/W R/W R/W
Reset 100100

Bits 14:12 - CCT6IP[2:0] Capture/Compare/Timer6 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 10:8 – CCP6IP[2:0] Input Capture/Output Compare 6 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 6:4 – DMTIP[2:0] Deadman Timer Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 2:0 – CCT5IP[2:0] Capture/Compare/Timer5 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)

Value Description

3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

7.7.39 Interrupt Priority Register 12

Name: IPC12

Offset: 0x858

Bit 15 14 13 12 11 10 9 8

CRCIP[2:0] U2EIP[2:0]
AccessR/W R/W R/W R/W R/W R/W
Reset 100100

Bit 76543210

U1EIP[2:0]QEI1IP[2:0]
AccessR/W R/W R/W R/W R/W R/W
Reset 100100

Bits 14:12 - CRCIP[2:0] Cyclic Redundancy Check Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 10:8 – U2EIP[2:0] UART2 Error Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 6:4 – U1EIP[2:0] UART1 Error Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 2:0 – QEI1IP[2:0] QEI1 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)

Value Description

3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

7.7.40 Interrupt Priority Register 13

Name: IPC13

Offset: 0x85A

Bit 15 14 13 12 11 10 9 8

QE|2IP[2:0]
Access Reset 100R/W R/W R/W

Bit 76543210

C2TXIP[2:0]C1TXIP[2:0]
AccessR/WR/W R/W R/WR/WR/W R/W
Reset100100

Bits 10:8 – QEI2IP[2:0] QEI2 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 6:4 - C2TXIP[2:0] CAN2 TX Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 2:0 - C1TXIP[2:0] CAN1 TX Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

7.7.41 Interrupt Priority Register 14

Name: IPC14

Offset: 0x85C

Bit 15 14 13 12 11 10 9 8

SPI3RXIP[2:0] U3TXIP[2:0]
AccessR/W R/W R/W R/W R/W R/W
Reset 100100

Bit 76543210

U3RXIP[2:0]U3EIP[2:0]
AccessR/W R/W R/W R/W R/W R/W
Reset 100100

Bits 14:12 - SPI3RXIP[2:0] SPI3 Receiver Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 10:8 – U3TXIP[2:0] UART3 Transmitter Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 6:4 – U3RXIP[2:0] UART3 Receiver Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 2:0 – U3EIP[2:0] UART3 External Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)

Value Description

3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

7.7.42 Interrupt Priority Register 15

Name: IPC15

Offset: 0x85E

Bit 15 14 13 12 11 10 9 8

PTGSTEPIP[2:0]
AccessR/W R/W R/W
Reset 100

Bit 76543210

ICDIP[2:0]SPI3TXIP[2:0]
AccessR/W R/W R/WR/W R/W R/W
Reset 100100

Bits 14:12 - PTGSTEPIP[2:0] PTG Step Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 6:4 – ICDIP[2:0] ICD Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 2:0 – SPI3TXIP[2:0] SPI3 Transfer Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

7.7.43 Interrupt Priority Register 16

Name: IPC16

Offset: 0x860

Bit 15 14 13 12 11 10 9 8

PWM1|P[2:0] QE|3|P[2:0]
AccessR/W R/W R/W R/W R/W R/W
Reset 100100

Bit 76543210

I2C2BCIP[2:0]I2C1BCIP[2:0]
AccessR/W R/W R/W R/W R/W R/W
Reset 100100

Bits 14:12 – PWM1IP[2:0] Pulse-Width Modulation 1 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 10:8 – QEI3IP[2:0] QEI3 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 6:4 – I2C2BCIP[2:0] I2C2 Bus Collision Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 2:0 – I2C1BCIP[2:0] I2C1 Bus Collision Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)

Value Description

3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

7.7.44 Interrupt Priority Register 17

Name: IPC17

Offset: 0x862

Bit 15 14 13 12 11 10 9 8

PWM5P[2:0]PWM4IP[2:0]
AccessR/W
R/W
Reset 100100

Bit 76543210

PWM3P[2:0]PWM2IP[2:0]
Access Reset 100100

Bits 14:12 – PWM5IP[2:0] Pulse-Width Modulation 5 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 10:8 – PWM4IP[2:0] Pulse-Width Modulation 4 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 6:4 – PWM3IP[2:0] Pulse-Width Modulation 3 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 2:0 – PWM2IP[2:0] Pulse-Width Modulation 2 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)

Value Description

3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

7.7.45 Interrupt Priority Register 18

Name: IPC18

Offset: 0x864

Bit 15 14 13 12 11 10 9 8

CNDIP[2:0] PWM8IP[2:0]
AccessR/W R/W R/W R/W R/W R/W
Reset 100100

Bit 76543210

PWM7P[2:0]PWM6IP[2:0]
AccessR/W
Reset 100100

Bits 14:12 - CNDIP[2:0] Change Notice D Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 10:8 – PWM8IP[2:0] Pulse-Width Modulation 8 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 6:4 – PWM7IP[2:0] Pulse-Width Modulation 7 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 2:0 – PWM6IP[2:0] Pulse-Width Modulation 6 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)

Value Description

3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

7.7.46 Interrupt Priority Register 19

Name: IPC19

Offset: 0x866

Bit 15 14 13 12 11 10 9 8

CMP3IP[2:0]CMP2IP[2:0]
AccessR/WR/WR/WR/W
Reset0000

Bit 76543210

CMP1IP[2:0]CNEIP[2:0]
AccessR/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0

Bits 14:12 - CMP3IP[2:0] Comparator 3 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 10:8 - CMP2IP[2:0] Comparator 2 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 6:4 – CMP1IP[2:0] Comparator 1 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 2:0 – CNEIP[2:0] Change Notice E Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)

Value Description

3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

7.7.47 Interrupt Priority Register 20

Name: IPC20

Offset: 0x868

Bit 15 14 13 12 11 10 9 8

PTG1IP[2:0]PTG0IP[2:0]
AccessR/W R/W R/W R/W R/W R/W
Reset 100100

Bit 76543210

PTGWDTIP[2:0]CMP4IP[2:0]
AccessR/W R/W R/W R/W R/W R/W
Reset 100000

Bits 14:12 - PTG1IP[2:0] Peripheral Trigger Generator 1 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 10:8 – PTGOIP[2:0] Peripheral Trigger Generator 0 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 6:4 – PTGWDTIP[2:0] Watchdog Timer Time-out Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 2:0 – CMP4IP[2:0] Comparator 4 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)

Value Description

3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

7.7.48 Interrupt Priority Register 21

Name: IPC21

Offset: 0x86A

Bit 15 14 13 12 11 10 9 8

SENT1EIP[2:0]SENT1IP[2:0]
AccessR/WR/WR/WR/W
Reset 100100

Bit 76543210

PTG3IP[2:0]PTG2IP[2:0]
AccessR/W R/W R/W R/W R/W R/W
Reset 100100

Bits 14:12 - SENT1EIP[2:0] SENT1 External Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 10:8 – SENT1IP[2:0] SENT1 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 6:4 – PTG3IP[2:0] Peripheral Trigger Generator 3 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 2:0 – PTG2IP[2:0] Peripheral Trigger Generator 2 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)

Value Description

3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

7.7.49 Interrupt Priority Register 22

Name: IPC22

Offset: 0x86C

Bit 15 14 13 12 11 10 9 8

ADCANOIP[2:0] ADCIP[2:0]
AccessR/W R/W R/W R/W R/W R/W
Reset 100000

Bit 76543210

SENT2EIP[2:0]SENT2IP[2:0]
AccessR/W R/W R/W R/W R/W R/W
Reset 100100

Bits 14:12 - ADCAN0IP[2:0] ADC ANO Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 10:8 - ADCIP[2:0] ADC Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 6:4 – SENT2EIP[2:0] SENT2 Error Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 2:0 – SENT2IP[2:0] SENT2 TX/RX Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)

Value Description

3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

7.7.50 Interrupt Priority Register 23

Name: IPC23

Offset: 0x86E

Bit 15 14 13 12 11 10 9 8

ADCAN4IP[2:0] ADCAN3IP[2:0]
AccessR/W R/W R/W R/W R/W R/W
Reset 100100

Bit 76543210

ADCAN2IP[2:0]ADCAN1IP[2:0]
AccessR/WR/WR/WR/W
Reset 100100

Bits 14:12 - ADCAN4IP[2:0] ADC AN4 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 10:8 – ADCAN3IP[2:0] ADC AN3 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 6:4 – ADCAN2IP[2:0] ADC AN2 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 2:0 – ADCAN1IP[2:0] ADC AN1 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)

Value Description

3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

7.7.51 Interrupt Priority Register 24

Name: IPC24

Offset: 0x870

Bit 15 14 13 12 11 10 9 8

ADCAN8IP[2:0]ADCAN7IP[2:0]
AccessR/WR/WR/WR/W
Reset 100100

Bit 76543210

ADCAN6IP[2:0] ADCAN5IP[2:0]
AccessR/W R/W R/W R/W R/W R/W
Reset 100100

Bits 14:12 - ADCAN8IP[2:0] ADC AN8 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 10:8 – ADCAN7IP[2:0] ADC AN7 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 6:4 – ADCAN6IP[2:0] ADC AN6 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 2:0 - ADCAN5IP[2:0] ADC AN5 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)

Value Description

3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

7.7.52 Interrupt Priority Register 25

Name: IPC25

Offset: 0x872

Bit 15 14 13 12 11 10 9 8

ADCAN12IP[2:0]ADCAN11IP[2:0]
AccessR/WR/WR/WR/W
Reset 100100

Bit 76543210

ADCAN10IP[2:0]ADCAN9IP[2:0]
AccessR/W R/W R/W R/W R/W R/W
Reset 100100

Bits 14:12 - ADCAN12IP[2:0] ADC AN12 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 10:8 – ADCAN11IP[2:0] ADC AN11 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 6:4 – ADCAN10IP[2:0] ADC AN10 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 2:0 – ADCAN9IP[2:0] ADC AN9 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)

Value Description

3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

7.7.53 Interrupt Priority Register 26

Name: IPC26

Offset: 0x874

Bit 15 14 13 12 11 10 9 8

ADCAN16IP[2:0]ADCAN15IP[2:0]
AccessR/WR/WR/WR/W
Reset 100100

Bit 76543210

ADCAN 14IP[2:0] ADCAN13IP[2:0]
AccessR/W R/W R/W R/W R/W R/W
Reset 100100

Bits 14:12 - ADCAN16IP[2:0] ADC AN16 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 10:8 – ADCAN15IP[2:0] ADC AN15 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 6:4 – ADCAN14IP[2:0] ADC AN14 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 2:0 – ADCAN13IP[2:0] ADC AN13 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)

Value Description

3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

7.7.54 Interrupt Priority Register 27

Name: IPC27

Offset: 0x876

Bit 15 14 13 12 11 10 9 8

ADCAN20IP[2:0]ADCAN19IP[2:0]
AccessR/WR/WR/WR/W
Reset 100100

Bit 76543210

ADCAN 18IP[2:0] ADCAN17IP[2:0]
AccessR/W R/W R/W R/W R/W R/W
Reset 100100

Bits 14:12 - ADCAN20IP[2:0] ADC AN20 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 10:8 – ADCAN19IP[2:0] ADC AN19 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 6:4 – ADCAN18IP[2:0] ADC AN18 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 2:0 – ADCAN17IP[2:0] ADC AN17 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)

Value Description

3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

7.7.55 Interrupt Priority Register 28

Name: IPC28

Offset: 0x878

Bit 15 14 13 12 11 10 9 8

ADFLTIP[2:0] ADCAN23IP[2:0]
AccessR/W R/W R/W R/W R/W R/W
Reset 100100

Bit 76543210

ADCAN22IP[2:0]ADCAN21IP[2:0]
AccessR/W R/W R/W R/W R/W R/W
Reset 100100

Bits 14:12 - ADFLTIP[2:0] ADC Fault Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 10:8 – ADCAN23IP[2:0] ADC AN23 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 6:4 – ADCAN22IP[2:0] ADC AN22 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 2:0 – ADCAN21IP[2:0] ADC AN21 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)

Value Description

3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

7.7.56 Interrupt Priority Register 29

Name: IPC29

Offset: 0x87A

Bit 15 14 13 12 11 10 9 8

ADCMP3IP[2:0] ADCMP2IP[2:0]
AccessR/W R/W R/W R/W R/W R/W
Reset 100100

Bit 76543210

ADCMP1IP[2:0] ADCMPOIP[2:0]
AccessR/W R/W R/W R/W R/W R/W
Reset 100100

Bits 14:12 - ADCMP3IP[2:0] ADC Digital Comparator 3 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 10:8 – ADCMP2IP[2:0] ADC Digital Comparator 2 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 6:4 – ADCMP1IP[2:0] ADC Digital Comparator 1 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 2:0 – ADCMPOIP[2:0] ADC Digital Comparator 0 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)

Value Description

3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

7.7.57 Interrupt Priority Register 30

Name: IPC30

Offset: 0x87C

Bit 15 14 13 12 11 10 9 8

ADFLTR3IP[2:0]ADFLTR2IP[2:0]
AccessR/WR/WR/WR/W
Reset 100100

Bit 76543210

ADFLTR1IP[2:0]ADFLTROIP[2:0]
AccessR/WR/WR/WR/W
Reset 100100

Bits 14:12 - ADFLTR3IP[2:0] ADC Oversample Filter 3 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 10:8 – ADFLTR2IP[2:0] ADC Oversample Filter 2 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 6:4 – ADFLTR1IP[2:0] ADC Oversample Filter 1 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 2:0 – ADFLTROIP[2:0] ADC Oversample Filter 0 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)

Value Description

3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

7.7.58 Interrupt Priority Register 31

Name: IPC31

Offset: 0x87E

Bit 15 14 13 12 11 10 9 8

SPI2EIP[2:0]SPI1EIP[2:0]
AccessR/WR/WR/WR/W
Reset 100100

Bit 76543210

CLC2PEIP[2:0]CLC1PEIP[2:0]
AccessR/W R/W R/W R/W R/W R/W
Reset 100100

Bits 14:12 - SPI2EIP[2:0] SPI2 Error Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 10:8 – SPI1EIP[2:0] SPI1 Error Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 6:4 – CLC2PEIP[2:0] CLC2 Positive Edge Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 2:0 – CLC1PEIP[2:0] CLC1 Positive Edge Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)

Value Description

3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

7.7.59 Interrupt Priority Register 32

Name: IPC32

Offset: 0x880

Bit 15 14 13 12 11 10 9 8

CLC6PEIP[2:0]CLC5NEIP[2:0]
AccessR/WR/WR/WR/W
Reset 100100

Bit 76543210

CLC5PEIP[2:0]SPI3IP[2:0]
AccessR/W R/W R/W R/W R/W R/W
Reset 100100

Bits 14:12 - CLC6PEIP[2:0] CLC6 Positive Edge Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 10:8 – CLC5NEIP[2:0] CLC5 Negative Edge Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 6:4 – CLC5PEIP[2:0] CLC5 Positive Edge Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 2:0 – SPI3IP[2:0] SPI3 Error Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)

Value Description

3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

7.7.60 Interrupt Priority Register 33

Name: IPC33

Offset: 0x882

Bit 15 14 13 12 11 10 9 8

CLC8PEIP[2:0] CLC7NEIP[2:0]
AccessR/W R/W R/W R/W R/W R/W
Reset 100100

Bit 76543210

CLC7PEIP[2:0] CLC6NEIP[2:0]
AccessR/W R/W R/W R/W R/W R/W
Reset 100100

Bits 14:12 - CLC8PEIP[2:0] CLC8 Positive Edge Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 10:8 – CLC7NEIP[2:0] CLC7 Negative Edge Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 6:4 – CLC7PEIP[2:0] CLC7 Positive Edge Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 2:0 – CLC6NEIP[2:0] CLC6 Negative Edge Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)

Value Description

3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

7.7.61 Interrupt Priority Register 34

Name: IPC34

Offset: 0x884

Bit 15 14 13 12 11 10 9 8

APEVTCIP[2:0] APEVTBIP[2:0]
AccessR/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0

Bit 76543210

APEVTAIP[2:0]CLC8NEIP[2:0]
AccessR/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0

Bits 14:12 – APEVTCIP[2:0] Alternate PWM Event C Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 10:8 – APEVTBIP[2:0] Alternate PWM Event B Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 6:4 – APEVTAIP[2:0] Alternate PWM Event A Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 2:0 – CLC8NEIP[2:0] CLC8 Negative Edge Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)

Value Description

3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

7.7.62 Interrupt Priority Register 35

Name: IPC35

Offset: 0x886

Bit 15 14 13 12 11 10 9 8

MI2C3IP[2:0] SI2C3IP[2:0]
AccessR/W R/W R/W R/W R/W R/W
Reset 100000

Bit 76543210

ADCAN31IP[2:0]APEVTDIP[2:0]
AccessR/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0

Bits 14:12 - MI2C3IP[2:0] I2C3 Host Event Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 10:8 – SI2C3IP[2:0] I2C3 Client Event Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 6:4 – ADCAN31IP[2:0] ADC AN31 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 2:0 – APEVTDIP[2:0] Alternate PWM Event D Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)

Value Description

3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

7.7.63 Interrupt Priority Register 36

Name: IPC36

Offset: 0x888

Bit 15 14 13 12 11 10 9 8

ADCAN29IP[2:0]ADCAN28IP[2:0]
AccessR/WR/WR/WR/W
Reset 100100

Bit 76543210

ADCAN27IP[2:0]I2C3BCIP[2:0]
AccessR/W R/W R/W R/W R/W R/W
Reset 100100

Bits 14:12 - ADCAN29IP[2:0] ADC AN29 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 10:8 – ADCAN28IP[2:0] ADC AN28 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 6:4 – ADCAN27IP[2:0] ADC AN27 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 2:0 – I2C3BCIP[2:0] I2C3 Bus Collision Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)

Value Description

3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

7.7.64 Interrupt Priority Register 37

Name: IPC37

Offset: 0x88A

Bit 15 14 13 12 11 10 9 8

ADCAN26IP[2:0] CCT7IP[2:0]
AccessR/W R/W R/W R/W R/W R/W
Reset 100100

Bit 76543210

CCP7IP[2:0]ADCAN30IP[2:0]
AccessR/WR/WR/WR/W
Reset 100100

Bits 14:12 - ADCAN26IP[2:0] ADC AN26 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 10:8 – CCT7IP[2:0] Capture/Compare/Timer7 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 6:4 – CCP7IP[2:0] Input Capture/Output Compare 7 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 2:0 – ADCAN30IP[2:0] ADC AN30 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)

Value Description

3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

7.7.65 Interrupt Priority Register 38

Name: IPC38

Offset: 0x88C

Bit 15 14 13 12 11 10 9 8

DMA7IP[2:0] DMA6IP[2:0]
AccessR/W R/W R/W R/W R/W R/W
Reset 100100

Bit 76543210

CCT8IP[2:0]CCP8IP[2:0]
AccessR/W R/W R/W R/W R/W R/W
Reset 100100

Bits 14:12 – DMA7IP[2:0] Direct Memory Access 7 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 10:8 – DMA6IP[2:0] Direct Memory Access 6 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 6:4 – CCT8IP[2:0] Capture/Compare/Timer8 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 2:0 – CCP8IP[2:0] Input Capture/Output Compare 8 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)

Value Description

3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

7.7.66 Interrupt Priority Register 39

Name: IPC39

Offset: 0x88E

Bit 15 14 13 12 11 10 9 8

APEVTEIP[2:0] APEVTEIP[2:0]
AccessR/W R/W R/W R/W R/W R/W
Reset 100100

Bit 76543210

Access Reset

Bits 14:12 – APEVTFIP[2:0] Alternate PWM Event F Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 10:8 – APEVTEIP[2:0] Alternate PWM Event E Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

7.7.67 Interrupt Priority Register 40

Name: IPC40

Offset: 0x890

Bit 15 14 13 12 11 10 9 8

ADC3EP[2:0]ADC2EIP[2:0]
Access Reset 100100

Bit 76543210

ADC1EP[2:0]ADC0EIP[2:0]
Access Reset 100100

Bits 14:12 - ADC3EIP[2:0] ADC3 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 10:8 - ADC2EIP[2:0] ADC2 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 6:4 – ADC1EIP[2:0] ADC1 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 2:0 - ADCOEIP[2:0] ADCO Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)

Value Description

3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

7.7.68 Interrupt Priority Register 42

Name: IPC42

Offset: 0x894

Bit 15 14 13 12 11 10 9 8

PEVTCIP[2:0] PEVTBIP[2:0]
AccessR/W R/W R/W R/W R/W R/W
Reset 100100

Bit 76543210

PEVTAIP[2:0]
AccessR/W R/W R/W
Reset 100

Bits 14:12 – PEVTCIP[2:0] PWM Event C Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 10:8 – PEVTBIP[2:0] PWM Event B Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 6:4 – PEVTAIP[2:0] PWM Event A Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

7.7.69 Interrupt Priority Register 43

Name: IPC43

Offset: 0x896

Bit 15 14 13 12 11 10 9 8

CLC3PEIP[2:0] PEVTFIP[2:0]
AccessR/W R/W R/W R/W R/W R/W
Reset 100100

Bit 76543210

PEVTEIP[2:0]PEVTDIP[2:0]
AccessR/W R/W R/W R/W R/W R/W
Reset 100100

Bits 14:12 - CLC3PEIP[2:0] CLC3 Positive Edge Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 10:8 – PEVTFIP[2:0] PWM Event F Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 6:4 – PEVTEIP[2:0] PWM Event E Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 2:0 – PEVTDIP[2:0] PWM Event D Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)

Value Description

3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

7.7.70 Interrupt Priority Register 44

Name: IPC44

Offset: 0x898

Bit 15 14 13 12 11 10 9 8

CLC3NEIP[2:0] CLC2NEIP[2:0]
AccessR/W R/W R/W R/W R/W R/W
Reset 100100

Bit 76543210

CLC1NEIP[2:0]CLC4PEIP[2:0]
AccessR/W R/W R/W R/W R/W R/W
Reset 100100

Bits 14:12 - CLC3NEIP[2:0] CLC3 Negative Edge Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 10:8 – CLC2NEIP[2:0] CLC2 Negative Edge Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 6:4 – CLC1NEIP[2:0] CLC1 Negative Edge Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 2:0 – CLC4PEIP[2:0] CLC4 Positive Edge Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)

Value Description

3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

7.7.71 Interrupt Priority Register 45

Name: IPC45

Offset: 0x89A

Bit 15 14 13 12 11 10 9 8

APWM1IP[2:0] CCT9IP[2:0]
AccessR/W R/W R/W R/W R/W R/W
Reset 100100

Bit 76543210

CCP9IP[2:0]CLC4NEIP[2:0]
AccessR/WR/WR/WR/W R/W R/W
Reset 100100

Bits 14:12 - APWM1IP[2:0] Alternate PWM1 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 10:8 – CCT9IP[2:0] Capture/Compare/Timer9 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 6:4 – CCP9IP[2:0] Input Capture/Output Compare 9 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 2:0 – CLC4NEIP[2:0] CLC4 Negative Edge Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)

Value Description

3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

7.7.72 Interrupt Priority Register 46

Name: IPC46

Offset: 0x89C

Bit 15 14 13 12 11 10 9 8

CMP5IP[2:0] APWM4IP[2:0]
AccessR/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0

Bit 76543210

APWM3IP[2:0] APWM2IP[2:0]
AccessR/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0

Bits 14:12 - CMP5IP[2:0] Comparator 5 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 10:8 – APWM4IP[2:0] Alternate PWM4 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 6:4 – APWM3IP[2:0] Alternate PWM3 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 2:0 – APWM2IP[2:0] Alternate PWM2 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)

Value Description

3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

7.7.73 Interrupt Priority Register 47

Name: IPC47

Offset: 0x89E

Bit 15 14 13 12 11 10 9 8

U3EVT|P[2:0] U2EVTIP[2:0]
AccessR/W R/W R/W R/W R/W R/W
Reset 100100

Bit 76543210

U1EVTIP[2:0]CMP6IP[2:0]
AccessR/W R/W R/W R/W R/W R/W
Reset 100100

Bits 14:12 - U3EVTIP[2:0] UART3 Event Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 10:8 – U2EVTIP[2:0] UART2 Event Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 6:4 – U1EVTIP[2:0] UART1 Event Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 2:0 – CMP6IP[2:0] Comparator 6 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)

Value Description

3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

7.7.74 Interrupt Priority Register 48

Name: IPC48

Offset: 0x8A0

Bit 15 14 13 12 11 10 9 8

PMPEIP[2:0] PMPIP[2:0]
AccessR/W R/W R/W R/W R/W R/W
Reset 100100

Bit 76543210

ADCAN25IP[2:0]ADCAN24IP[2:0]
AccessR/W R/W R/W R/W R/W R/W
Reset 100100

Bits 14:12 – PMPEIP[2:0] Parallel Main Port External Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 10:8 – PMPIP[2:0] Parallel Main Port Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 6:4 – ADCAN25IP[2:0] ADC AN25 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)
3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

Bits 2:0 – ADCAN24IP[2:0] ADC AN24 Interrupt Priority bits

ValueDescription
7Interrupt Priority Level 7 (highest)
6Interrupt Priority Level 6
5Interrupt Priority Level 5
4Interrupt Priority Level 4 (default)

Value Description

3Interrupt Priority Level 3
2Interrupt Priority Level 2
1Interrupt Priority Level 1
0Interrupt Priority Level 0 (lowest)

7.7.75 CPU STATUS Register

Name: SR

Offset: 0x42

Notes:

  1. The IPL[2:0] bits are concatenated with the IPL[3] bit (CORCON[3]) to form the CPU Interrupt Priority Level. The value in parentheses indicates the IPL, if IPL[3] = 1. User interrupts are disabled when IPL[3] = 1.

  2. The IPL[2:0] Status bits are read-only when the NSTDIS bit (INTCON1[15]) = 1.

Microchip dsPIC33CK1024MP708 - Notes: - 1

text_image Bit 15 14 13 12 11 10 9 8 Access Reset Bit 7 6 5 4 3 2 1 0 IPL[2:0] Access R/W R/W R/W Reset 0 0 0

Bits 7:5 – IPL[2:0] CPU Interrupt Priority Level Status bits ^(1,2)

ValueDescription
111CPU Interrupt Priority Level is 7 (15); user interrupts are disabled
110CPU Interrupt Priority Level is 6 (14)
101CPU Interrupt Priority Level is 5 (13)
100CPU Interrupt Priority Level is 4 (12)
011CPU Interrupt Priority Level is 3 (11)
010CPU Interrupt Priority Level is 2 (10)
001CPU Interrupt Priority Level is 1 (9)
000CPU Interrupt Priority Level is 0 (8)

7.7.76 Core Control Register

Name: CORCON

Offset: 0x44

Note:

  1. The IPL3 bit is concatenated with the IPL[2:0] bits (SR[7:5]) to form the CPU Interrupt Priority Level.

Legend: C = Clearable bit

Bit 15 14 13 12 11 10 9 8

VAR
AccessR/W
Reset0
Bit76543210
IPL3
AccessR/C
Reset0

Bit 15 – VAR Variable Exception Processing Latency Control bit

ValueDescription
1Variable exception processing is enabled
0Fixed exception processing is enabled

Bit 3 – IPL3 CPU Interrupt Priority Level Status bit 3 ^(1)

ValueDescription
1CPU Interrupt Priority Level is greater than 7
0CPU Interrupt Priority Level is 7 or less

7.7.77 Interrupt Control Register 1

Name: INTCON1

Offset: 0x8C0

Bit 15 14 13 12 11 10 9 8

NSTDIS OVAERR OVBERR COVAERR COVBERROVATE OVBTECOVTE

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

SFTACERRDIVOERRMATHERRADDRERRSTKERROSCFAIL

Access R/W R/W R/W R/W R/W R/W

Reset 00 0000

Bit 15 – NSTDIS Interrupt Nesting Disable bit

ValueDescription
1Interrupt nesting is disabled
0Interrupt nesting is enabled

Bit 14 - OVAERR Accumulator A Overflow Trap Flag bit

ValueDescription
1Trap was caused by overflow of Accumulator A
0Trap was not caused by overflow of Accumulator A

Bit 13 - OVBERR Accumulator B Overflow Trap Flag bit

ValueDescription
1Trap was caused by overflow of Accumulator B
0Trap was not caused by overflow of Accumulator B

Bit 12 - COVAERR Accumulator A Catastrophic Overflow Trap Flag bit

ValueDescription
1Trap was caused by catastrophic overflow of Accumulator A
0Trap was not caused by catastrophic overflow of Accumulator A

Bit 11 - COVBERR Accumulator B Catastrophic Overflow Trap Flag bit

ValueDescription
1Trap was caused by catastrophic overflow of Accumulator B
0Trap was not caused by catastrophic overflow of Accumulator B

Bit 10 - OVATE Accumulator A Overflow Trap Enable bit

ValueDescription
1Trap overflow of Accumulator A
0Trap is disabled

Bit 9 – OVBTE Accumulator B Overflow Trap Enable bit

ValueDescription
1Trap overflow of Accumulator B
0Trap is disabled

Bit 8 – COVTE Catastrophic Overflow Trap Enable bit

ValueDescription
1Trap on catastrophic overflow of Accumulator A or B is enabled
0Trap is disabled

Bit 7 – SFTACERR Shift Accumulator Error Status bit

Value Description
1Math error trap was caused by an invalid accumulator shift
0Math error trap was not caused by an invalid accumulator shift

Bit 6 – DIVOERR Divide-by-Zero Error Status bit

Value Description
1Math error trap was caused by a divide-by-zero
0Math error trap was not caused by a divide-by-zero

Bit 4 - MATHERR Math Error Status bit

Value Description
1Math error trap has occurred
0Math error trap has not occurred

Bit 3 – ADDRERR Address Error Trap Status bit

Value Description
1Address error trap has occurred
0Address error trap has not occurred

Bit 2 – STKERR Stack Error Trap Status bit

Value Description
1Stack error trap has occurred
0Stack error trap has not occurred

Bit 1 – OSCFAIL Oscillator Failure Trap Status bit

Value Description
1Oscillator failure trap has occurred
0Oscillator failure trap has not occurred

7.7.78 Interrupt Control Register 2

Name: INTCON2

Offset: 0x8C2

Bit 15 14 13 12 11 10 9 8
GIE DISI SWTRAPAIVTEN
AccessR/W R/W R/WR/W
Reset1 0 00
Bit7 6 5 4 3 2 1 0
INT3EPINT2EPINT1EPINT0EP
AccessR/W R/W R/W R/W
Reset0 0 0 0

Bit 15 – GIE Global Interrupt Enable bit

ValueDescription
1Interrupts and associated IE bits are enabled
0Interrupts are disabled, but traps are still enabled

Bit 14 - DISI DISI Instruction Status bit

ValueDescription
1DISI instruction is active
0DISI instruction is not active

Bit 13 – SWTRAP Software Trap Status bit

ValueDescription
1Software trap is enabled
0Software trap is disabled

Bit 8 – AIVTEN Alternate Interrupt Vector Table Enable bit

ValueDescription
1Alternate Interrupt Vector Table enabled (AIVTDIS = 0 also required)
0Alternate Interrupt Vector Table disabled

Bit 3 – INT3EP External Interrupt 3 Edge Detect Polarity Select bit

ValueDescription
1Interrupt on negative edge
0Interrupt on positive edge

Bit 2 - INT2EP External Interrupt 2 Edge Detect Polarity Select bit

ValueDescription
1Interrupt on negative edge
0Interrupt on positive edge

Bit 1 – INT1EP External Interrupt 1 Edge Detect Polarity Select bit

ValueDescription
1Interrupt on negative edge
0Interrupt on positive edge

Bit 0 - INTOEP External Interrupt 0 Edge Detect Polarity Select bit

ValueDescription
1Interrupt on negative edge
0Interrupt on positive edge

7.7.79 Interrupt Control Register 3

Name: INTCON3

Offset: 0x8C4

Bit 15 14 13 12 11 10 9 8

DMTCAN NAE
AccessR/WR/WR/W
Reset 00 0

Bit 76543210

CAN2DAEDOOVRAPLL
AccessR/WR/WR/WR/W
Reset0000

Bit 15 – DMT Deadman Timer Expiration bit

ValueDescription
1DMT Soft Trap has occurred
0DMT Soft Trap has not occurred

Bit 9 – CAN CAN Address Error Soft Trap Status bit

ValueDescription
1CAN address error soft trap has occurred
0CAN address error soft trap has not occurred

Bit 8 – NAE NVM Address Error Soft Trap Status bit

ValueDescription
1NVM address error soft trap has occurred
0NVM address error soft trap has not occurred

Bit 6 – CAN2 CAN2 Address Error Soft Trap Status bit

ValueDescription
1CAN2 address error soft trap has occurred
0CAN2 address error soft trap has not occurred

Bit 5 – DAE DMA Address Error Soft Trap Status bit

ValueDescription
1DMA address error trap has occurred
0DMA address error trap has not occurred

Bit 4 - DOOVR DO Stack Overflow Soft Trap Status bit

ValueDescription
1DO stack overflow soft trap has occurred
0DO stack overflow soft trap has not occurred

Bit 0 – APLL Auxiliary PLL Loss of Lock Soft Trap Status bit

ValueDescription
1APLL lock soft trap has occurred
0APLL lock soft trap has not occurred

7.7.80 Interrupt Control Register 4

Name: INTCON4

Offset: 0x8C6

Microchip dsPIC33CK1024MP708 - Interrupt Control Register 4 - 1

text_image Bit 15 14 13 12 11 10 9 8 Access Reset Bit 7 6 5 4 3 2 1 0 ECCDBE SGHT Access R/W R/W Reset 0 0

Bit 1 – ECCDBE ECC Double-Bit Error Trap bit

ValueDescription
1ECC double-bit error trap has occurred
0ECC double-bit error trap has not occurred

Bit 0 – SGHT Software Generated Hard Trap Status bit

ValueDescription
1Software generated hard trap has occurred
0Software generated hard trap has not occurred

7.7.81 Interrupt Control and Status Register

Name: INTTREG

Offset: 0x8C8

Bit 15 14 13 12 11 10 9 8

VHOLD ILR[3:0]
Access Reset 0R/W R R R R
0 0 0 0
Bit7 6 5 4 3 2 1 0
VECNUM[7:0]
Access ResetR R R R R R R R
0 0 0 0 0 0 0

Bit 13 - VHOLD Vector Number Capture Enable bit

ValueDescription
1VECNUM[7:0] bits read current value of vector number encoding tree (i.e., highest priority pending interrupt)
0Vector number latched into VECNUM[7:0] at Interrupt Acknowledge and retained until next IACK

Bits 11:8 – ILR[3:0] New CPU Interrupt Priority Level bits

ValueDescription
1111CPU Interrupt Priority Level is 15
. . .
0001CPU Interrupt Priority Level is 1
0000CPU Interrupt Priority Level is 0

Bits 7:0 – VECNUM[7:0] Vector Number of Pending Interrupt bits

ValueDescription
11111111255, Reserved; do not use
. . .
000010019, IC1 – Input Capture 1
000010008, INTO – External Interrupt 0
000001117, Reserved; do not use
000001106, Generic soft error trap
000001015, Reserved; do not use
000001004, Math error trap
000000113, Stack error trap
000000102, Generic hard trap
000000011, Address error trap
000000000, Oscillator fail trap

8. I/O Ports

This data sheet summarizes the features of the dsPIC33CK1024MP710 family of devices. It is not intended to be a comprehensive source. To complement the information in this data sheet, refer to "I/O Ports with Edge Detect" (www.microchip.com/DS70005322).

Many of the device pins are shared among the peripherals and the Parallel I/O ports. All I/O input ports feature Schmitt Trigger inputs for improved noise immunity.

Some of the key features of the I/O ports are:

  • Individual Output Pin Open-Drain Enable/Disable
  • Individual Input Pin Weak Pull-up and Pull-Down
    • Monitor Selective Inputs and Generate Interrupt when Change in Pin State is Detected
    • Operation during Sleep and Idle modes

8.1 Parallel I/O (PIO) Ports

All port pins have 12 registers directly associated with their operation as digital I/Os. The Data Direction register (TRISx) determines whether the pin is an input or an output. If the data direction bit is a '1', then the pin is an input.

All port pins are defined as inputs after a Reset. Reads from the latch (LATx), read the latch. Writes to the latch, write the latch. Reads from the port (PORTx), read the port pins, while writes to the port pins, write the latch. Any bit and its associated data and control registers that are not valid for a particular device are disabled. This means the corresponding LATx and TRISx registers, and the port pin are read as zeros.

When a pin is shared with another peripheral or function that is defined as an input only, it is nevertheless regarded as a dedicated port because there is no other competing source of outputs. Table 8-1 shows the pin availability. Figure 8-1 shows the 5V input tolerant pins across this device.

Table 8-1. Pin and ANSELx Availability

Figure 8-1. Block Diagram of a Typical Shared Port Structure

Microchip dsPIC33CK1024MP708 - Parallel I/O (PIO) Ports - 1

flowchart
graph TD
    subgraph Peripheral Module
        A["Peripheral Input Data"] --> B["Peripheral Module Enable"]
        B --> C["Peripheral Output Enable"]
        C --> D["Peripheral Output Data"]
    end

    subgraph Output Multiplexers
        E["1"] --> F["Output Enable"]
        G["1"] --> H["Output Data"]
    end

    I["PIO Module"] --> J["TRISx Latch"]
    I --> K["Data Latch"]
    I --> L["Data Bus"]
    I --> M["WR TRISx"]
    I --> N["WR LATx + WR PORTx"]
    I --> O["Read TRISx"]
    I --> P["Read LATx"]
    I --> Q["Read PORTx"]

    F --> R["I/O Pin"]
    H --> R
    H --> R
    R --> S["Input Data"]

8.1.1 Open-Drain Configuration

In addition to the PORTx, LATx and TRISx registers for data control, port pins can also be individually configured for either digital or open-drain output. This is controlled by the Open-Drain Enable for PORTx register, ODCx, associated with each port. Setting any of the bits configures the corresponding pin to act as an open-drain output.

The open-drain feature allows the generation of outputs, other than V_DD , by using external pull-up resistors. The maximum open-drain voltage allowed on any pin is the same as the maximum V_IH specification for that particular pin.

8.2 Configuring Analog and Digital Port Pins

The ANSELx registers control the operation of the analog port pins. The port pins that are to function as analog inputs or outputs must have their corresponding ANSELx and TRISx bits set. In order to use port pins for I/O functionality with digital modules, such as timers, UARTs, etc., the corresponding ANSELx bit must be cleared.

The ANSELx registers have a default value of 0xFFFF; therefore, all pins that share analog functions are analog (not digital) by default.

Pins with analog functions affected by the ANSELx registers are listed with a buffer type of analog in the Pinout I/O Descriptions (see 1. Device Overview).

If the TRISx bit is cleared (output) while the ANSELx bit is set, the digital output level ( V_OH or V_OL ) is converted by an analog peripheral, such as the ADC module or comparator module.

When the PORTx register is read, all pins configured as analog input channels are read as cleared (a low level).

Pins configured as digital inputs do not convert an analog input. Analog levels on any pin, defined as a digital input (including the ANx pins), can cause the input buffer to consume current that exceeds the device specifications.

8.2.1 I/O Port Write/Read Timing

One instruction cycle is required between a port direction change or port write operation and a read operation of the same port. Typically, this instruction would be a NOP.

8.2.2 Port Control/Status Registers

OffsetName Bit Pos. 7 6 5 4 3 2 1 0
0x0E00 ANSELA15:8 ANSELA[15:8]
7:0 ANSELA[7:0]
0x0E02 TRISA15:8 TRISA[15:8]
7:0 TRISA[7:0]
0x0E04 PORTA15:8 PORTA[15:8]
7:0 PORTA[7:0]
0x0E06LATA15:8LATA[15:8]
7:0LATA[7:0]
0x0E08ODCA15:8ODCA[15:8]
7:0ODCA[7:0]
0x0E0ACNPUA15:8CNPUA[15:8]
7:0CNPUA[7:0]
0x0E0CCNPDA15:8CNPDA[15:8]
7:0CNPDA[7:0]
0x0E0ECNCONA15:8ONCNSTYLE
7:0
0x0E10CNENOA15:8CNENOA[15:8]
7:0CNENOA[7:0]
0x0E12CNSTATA15:8CNSTATA[15:8]
7:0CNSTATA[7:0]
0x0E14CNEN1A15:8CNEN1A[15:8]
7:0CNEN1A[7:0]
0x0E16CNFA15:8 CNFA[15:8]
7:0CNFA[7:0]
0x0E18 ... 0x0E1BReserved
0x0E1C ANSELB15:8 ANSELB[15:8]
7:0 ANSELB[7:0]
0x0E1E TRISB15:8 TRISB[15:8]
7:0 TRISB[7:0]
0x0E20PORTB15:8 PORTB[15:8]
7:0 PORTB[7:0]
0x0E22LATB15:8LATB[15:8]
7:0LATB[7:0]
0x0E24ODCB15:8ODCB[15:8]
7:0ODCB[7:0]
0x0E26CNPUB15:8CNPUB[15:8]
7:0CNPUB[7:0]
0x0E28CNPDB15:8CNPDB[15:8]
7:0CNPDB[7:0]
0x0E2ACNCONB15:8ONCNSTYLE
7:0
0x0E2CCNENOB15:8CNENOB[15:8]
7:0CNENOB[7:0]
0x0E2ECNSTATB15:8CNSTATB[15:8]
7:0CNSTATB[7:0]
0x0E30CNEN1B15:8CNEN1B[15:8]
7:0CNEN1B[7:0]
0x0E32CNFB15:8 CNFB[15:8]
7:0CNFB[7:0]
0x0E34 ... 0x0E37Reserved
0x0E38 ANSELC15:8 ANSELC[15:8]
7:0 ANSELC[7:0]
0x0E3ATRISC15:8 TRISC[15:8]
7:0 TRISC[7:0]
0x0E3C PORTC15:8 PORTC[15:8]
7:0 PORTC[7:0]
0x0E3E LATC15:8 LATC[15:8]
7:0 LATC[7:0]
0x0E40 ODCC15:8 ODCC[15:8]
7:0 ODCC[7:0]
0x0E42 CNPUC15:8CNPUC[15:8]
7:0 CNPUC[7:0]
0x0E44 CNPDC15:8CNPDC[15:8]
7:0CNPDC[7:0]
0x0E46 CNCONC15:8ONCNSTYLE
7:0
0x0E48CNENOC15:8CNENOC[15:8]
7:0 CNENOC[7:0]
0x0E4ACNSTATC15:8CNSTATC[15:8]
7:0CNSTATC[7:0]
0x0E4CCNEN1C15:8CNEN1C[15:8]
7:0 CNEN1C[7:0]
0x0E4ECNFC15:8CNFC[15:8]
7:0CNFC[7:0]
0x0E50 ... 0x0E53Reserved
0x0E54ANSELD15:8ANSELD[15:8]
7:0ANSELD[7:0]
0x0E56 TRISD15:8 TRISD[15:8]
7:0 TRISD[7:0]
0x0E58 PORTD15:8PORTD[15:8]
7:0PORTD[7:0]
0x0E5ALATD15:8LATD[15:8]
7:0LATD[7:0]
0x0E5CODCD15:8ODCD[15:8]
7:0ODCD[7:0]
0x0E5E CNPUD15:8CNPUD[15:8]
7:0 CNPUD[7:0]
0x0E60 CNPDD15:8CNPDD[15:8]
7:0 CNPDD[7:0]
0x0E62CNCOND15:8ONCNSTYLE
7:0
0x0E64 CNENOD15:8CNENOD[15:8]
7:0CNENOD[7:0]
0x0E66CNSTATD15:8CNSTATD[15:8]
7:0CNSTATD[7:0]
0x0E68 CNEN1D15:8CNEN1D[15:8]
7:0CNEN1D[7:0]
0x0E6A CNFD15:8CNFD[15:8]
7:0CNFD[7:0]
0x0E6C ... 0x0E6FReserved
0x0E70ANSELE15:8ANSELE[15:8]
7:0ANSELE[7:0]
0x0E72TRISE15:8TRISE[15:8]
7:0TRISE[7:0]
0x0E74 PORTE15:8 PORTE[15:8]
7:0 PORTE[7:0]
0x0E76 LATE15:8 LATE[15:8]
7:0 LATE[7:0]
0x0E78 ODCE15:8 ODCE[15:8]
7:0 ODCE[7:0]
OffsetNameBit Pos. 7 6 54 3 2 1 0
0x0E7A CNPUE15:8 CNPUE[15:8]
7:0 CNPUE[7:0]
0x0E7C CNPDE15:8 CNPDE[15:8]
7:0 CNPDE[7:0]
0x0E7E CNCONE15:8 ONCNSTYLE
7:0
0x0E80 CNENOE15:8 CNENOE[15:8]
7:0 CNENOE[7:0]
0x0E82 CNSTATE15:8CNSTATE[15:8]
7:0CNSTATE[7:0]
0x0E84 CNEN1E15:8 CNEN1E[15:8]
7:0 CNEN1E[7:0]
0x0E86 CNFE15:8CNFE[15:8]
7:0CNFE[7:0]
0x0E88 ... 0x0E8BReserved
0x0E8CANSELF15:8ANSELF[15:8]
7:0ANSELF[7:0]
0x0E8E TRISF15:8TRISF[15:8]
7:0TRISF[7:0]
0x0E90PORTF15:8PORTF[15:8]
7:0PORTF[7:0]
0x0E92LATF15:8 LATF[15:8]
7:0LATF[7:0]
0x0E94ODCF15:8 ODCF[15:8]
7:0ODCF[7:0]
0x0E96 CNPUF15:8 CNPUF[15:8]
7:0 CNPUF[7:0]
0x0E98 CNPDF15:8 CNPDF[15:8]
7:0 CNPDF[7:0]
0x0E9A CNCONF15:8 ONCNSTYLE
7:0
0x0E9C CNENOF15:8 CNENOF[15:8]
7:0 CNENOF[7:0]
0x0E9E CNSTATF15:8CNSTATF[15:8]
7:0CNSTATF[7:0]
0x0EA0 CNEN1F15:8 CNEN1F[15:8]
7:0 CNEN1F[7:0]
0x0EA2 CNFF15:8CNFF[15:8]
7:0CNFF[7:0]

8.2.2.1 Analog Select for PORTx Register

Name: ANSELx

Offset: 0xE00, 0xE1C, 0xE38, 0xE54, 0xE70, 0xE8C

Bit 15 14 13 12 11 10 9 8

ANSELx[15:8]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 11111111

Bit 76543210

ANSELx[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 1 1 1 1 1 1 1 1

Bits 15:0 - ANSELx[15:0] Analog Select for PORTx bits

Value Description
1Analog input is enabled and digital input is disabled on the PORTx[n] pin
0Analog input is disabled and digital input is enabled on the PORTx[n] pin

8.2.2.2 Output Enable for PORTx Register

Name: TRISx

Offset: 0xE02, 0xE1E, 0xE3A, 0xE56, 0xE72, 0xE8E

Bit 15 14 13 12 11 10 9 8

TRISx[15:8]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 11111111

Bit 76543210

TRISx[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 1 1 1 1 1 1 1 1

Bits 15:0 - TRISx[15:0] Output Enable for PORTx bits

Value Description
1LATx[n] is not driven on the PORTx[n] pin
0LATx[n] is driven on the PORTx[n] pin

8.2.2.3 Input Data for PORTx Register

Name: PORTx

Offset: 0xE04, 0xE20, 0xE3C, 0xE58, 0xE74, 0xE90

Bit 15 14 13 12 11 10 9 8

PORTx[15:8]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 11111111

Bit 76543210

PORTx[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 11111111

Bits 15:0 – PORTx[15:0] PORTx Data Input Value bits

8.2.2.4 Output Data for PORTx Register

Name: LATx

Offset: 0xE06, 0xE22, 0xE3E, 0xE5A, 0xE76, 0xE92

Legend: x = Bit is unknown

Bit 15 14 13 12 11 10 9 8

LATx[15:8]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset xxxxxxxx

Bit 76543210

LATx[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset xxxxxxxx

Bits 15:0 – LATx[15:0] PORTx Data Output Value bits

8.2.2.5 Open-Drain Enable for PORTx Register

Name: ODCx

Offset: 0xE08, 0xE24, 0xE40, 0xE5C, 0xE78, 0xE94

Bit 15 14 13 12 11 10 9 8

ODCx[15:8]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

ODCx[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 15:0 - ODCx[15:0] PORTx Open-Drain Enable bits

Value Description
1Open-drain is enabled on the PORTx pin
0Open-drain is disabled on the PORTx pin

8.2.2.6 Change Notification Pull-up Enable for PORTx Register

Name: CNPUx

Offset: 0xE0A, 0xE26, 0xE42, 0xE5E, 0xE7A, 0xE96

Bit 15 14 13 12 11 10 9 8

CNPUx[15:8]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

CNPUx[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 15:0 – CNPUx[15:0] Change Notification Pull-up Enable for PORTx bits

Value Description
1The pull-up for PORTx[n] is enabled – takes precedence over the pull-down selection
0The pull-up for PORTx[n] is disabled

8.2.2.7 Change Notification Pull-Down Enable for PORTx Register

Name: CNPDx

Offset: 0xE0C, 0xE28, 0xE44, 0xE60, 0xE7C, 0xE98

Bit 15 14 13 12 11 10 9 8

CNPDx[15:8]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

CNPDx[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 15:0 – CNPDx[15:0] Change Notification Pull-Down Enable for PORTx bits

Value Description
1The pull-down for PORTx[n] is enabled (if the pull-up for PORTx[n] is not enabled)
0The pull-down for PORTx[n] is disabled

8.2.2.8 Change Notification Control for PORTx Register

Name: CNCONx

Offset: 0xE0E, 0xE2A, 0xE46, 0xE62, 0xE7E, 0x0E9A

Microchip dsPIC33CK1024MP708 - Change Notification Control for PORTx Register - 1

text_image Bit 15 14 13 12 11 10 9 8 ON CNSTYLE Access R/W R/W Reset 0 0 Bit 7 6 5 4 3 2 1 0 Access Reset

Bit 15 - ON Change Notification (CN) Control for PORTx On bit

ValueDescription
1CN is enabled
0CN is disabled

Bit 11 – CNSTYLE Change Notification Style Selection bit

ValueDescription
1Edge style (detects edge transitions, CNFx[15:0] bits are used for a Change Notification event)
0Mismatch style (detects change from last port read, CNSTATx[15:0] bits are used for a Change Notification event)

8.2.2.9 Interrupt Change Notification Enable for PORTx Register

Name: CNENOx

Offset: 0xE10, 0xE2C, 0xE48, 0xE64, 0xE80, 0xE9C

Bit 15 14 13 12 11 10 9 8

CNEN0x[15:8]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

CNEN0x[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 15:0 – CNENOx[15:0] Interrupt Change Notification Enable for PORTx bits

Value Description
1Interrupt-on-change (from the last read value) is enabled for PORTx[n]
0Interrupt-on-change is disabled for PORTx[n]

8.2.2.10 Interrupt Change Notification Status for PORTx Register

Name: CNSTATx

Offset: 0xE12, 0xE2E, 0xE4A, 0xE66, 0xE82, 0xE9E

Microchip dsPIC33CK1024MP708 - Interrupt Change Notification Status for PORTx Register - 1

text_image Bit 15 14 13 12 11 10 9 8 CNSTATx[15:8] Access R R R R R R R R Reset 0 0 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 CNSTATx[7:0] Access R R R R R R R R R Reset 0 0 0 0 0 0 0 0

Bits 15:0 – CNSTATx[15:0] Interrupt Change Notification Status for PORTx bits

When CNSTYLE (CNCONx[11]) = 0:

Value Description
1Change occurred on PORTx[n] since last read of PORTx[n]
0Change did not occur on PORTx[n] since last read of PORTx[n]

8.2.2.11 Interrupt Change Notification Edge Select for PORTx Register

Name: CNEN1x

Offset: 0xE14, 0xE30, 0xE4C, 0xE68, 0xE84, 0xEA0

Bit 15 14 13 12 11 10 9 8

CNEN1x[15:8]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

CNEN1x[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 15:0 – CNEN1x[15:0] Interrupt Change Notification Edge Select for PORTx bits

Value Description
1Interrupt-on-change (from the last read value) is enabled for PORTx[n]
0Interrupt-on-change is disabled for PORTx[n]

8.2.2.12 Interrupt Change Notification Flag for PORTx Register

Name: CNFx

Offset: 0xE16, 0xE32, 0xE4E, 0xE6A, 0xE86, 0xEA2

Bit 15 14 13 12 11 10 9 8

CNFx[15:8]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

CNFx[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 15:0 – CNFx[15:0] Interrupt Change Notification Flag for PORTx bits When CNSTYLE (CNCONx[11]) = 1:

Value Description
1An enabled edge event occurred on the PORTx[n] pin
0An enabled edge event did not occur on the PORTx[n] pin

8.3 Input Change Notification (ICN)

The Input Change Notification function of the I/O ports allows the dsPIC33CK1024MP710 family devices to generate interrupt requests to the processor in response to a Change-of-State (COS) on selected input pins. This feature can detect input Change-of-States, even in Sleep mode, when the clocks are disabled. Every I/O port pin can be selected (enabled) for generating an interrupt request on a Change-of-State. Five control registers are associated with the Change Notification (CN) functionality of each I/O port. To enable the Change Notification feature for the port, the ON bit (CNCONx[15]) must be set.

The CNEN0x and CNEN1x registers contain the CN interrupt enable control bits for each of the input pins. The setting of these bits enables a CN interrupt for the corresponding pins. Also, these bits, in combination with the CNSTYLE bit (CNCONx[11]), define a type of transition when the interrupt is generated. Possible CN event options are listed in Table 8-2.

Table 8-2. Change Notification Event Options

CNSTYLE Bit (CNCONx[11])CNEN1x Bit CNENOx BitChange Notification Event Description
0Does not matter0Disabled
0Does not matter1Detects a mismatch between the last read state and the current state of the pin
1 0 0Disabled
1 0 1Detects a positive transition only (from ‘0’ to ‘1’)
1 1 0Detects a negative transition only (from ‘1’ to ‘0’)
1 1 1Detects both positive and negative transitions

The CNSTATx register indicates whether a change occurred on the corresponding pin since the last read of the PORTx bit. In addition to the CNSTATx register, the CNFx register is implemented for each port. This register contains flags for Change Notification events. These flags are set if the valid transition edge, selected in the CNENOx and CNEN1x registers, is detected. CNFx stores the occurrence of the event. CNFx bits must be cleared in software

to get the next Change Notification interrupt. The CN interrupt is generated only for the I/Os configured as inputs (corresponding TRISx bits must be set).

Note: Pull-ups and pull-downs on Input Change Notification pins should always be disabled when the port pin is configured as a digital output.

8.4 Peripheral Pin Select (PPS)

A major challenge in general purpose devices is providing the largest possible set of peripheral features, while minimizing the conflict of features on I/O pins. The challenge is even greater on low pin count devices. In an application where more than one peripheral needs to be assigned to a single pin, inconvenient work arounds in application code, or a complete redesign, may be the only option.

Peripheral Pin Select configuration provides an alternative to these choices by enabling peripheral set selection and placement on a wide range of I/O pins. By increasing the pinout options available on a particular device, users can better tailor the device to their entire application, rather than trimming the application to fit the device.

The Peripheral Pin Select configuration feature operates over a fixed subset of digital I/O pins. Users may independently map the input and/or output of most digital peripherals to any one of these I/O pins. Hardware safeguards are included that prevent accidental or spurious changes to the peripheral mapping once it has been established.

8.4.1 Available Pins

The number of available pins is dependent on the particular device and its pin count. Pins that support the Peripheral Pin Select feature include the label, "RPn", in their full pin designation, where "n" is the remappable pin number. "RP" is used to designate pins that support both remappable input and output functions.

8.4.2 Available Peripherals

The peripherals managed by the Peripheral Pin Select are all digital only peripherals. These include general serial communications (UART and SPI), general purpose timer clock inputs, timer-related peripherals (input capture and output compare) and interrupt-on-change inputs.

In comparison, some digital only peripheral modules are never included in the Peripheral Pin Select feature. This is because the peripheral's function requires special I/O circuitry on a specific port and cannot be easily connected to multiple pins. One example includes I^2C modules. A similar requirement excludes all modules with analog inputs, such as the A/D Converter (ADC)

A key difference between remappable and non-remappable peripherals is that remappable peripherals are not associated with a default I/O pin. The peripheral must always be assigned to a specific I/O pin before it can be used. In contrast, non-remappable peripherals are always available on a default pin, assuming that the peripheral is active and not conflicting with another peripheral.

When a remappable peripheral is active on a given I/O pin, it takes priority over all other digital I/Os and digital communication peripherals associated with the pin. Priority is given regardless of the type of peripheral that is mapped. Remappable peripherals never take priority over any analog functions associated with the pin.

8.4.3 Controlling Configuration Changes

Because peripheral mapping can be changed during run time, some restrictions on peripheral remapping are needed to prevent accidental configuration changes. The dsPIC33CK1024MP710 devices have implemented the control register lock sequence.

8.4.3.1 Control Register Lock

Under normal operation, writes to the RPINRx and RPORx registers are not allowed. Attempted writes will appear to execute normally, but the contents of the registers will remain unchanged. To change these registers, they must be unlocked in hardware. The register lock is controlled by the IOLOCK bit (RPCON[11]). Setting IOLOCK prevents writes to the control registers; clearing IOLOCK allows writes.

To set or clear IOLOCK, the NVMKEY unlock sequence must be executed:

  1. Write 0x55 to NVMKEY.
  2. Write 0xAA to NVMKEY.
  3. Clear (or set) IOLOCK as a single operation.

IOLOCK remains in one state until changed. This allows all of the Peripheral Pin Selects to be configured with a single unlock sequence, followed by an update to all of the control registers. Then, IOLOCK can be set with a second lock sequence.

Note: MPLAB XC16 provides a built-in C language function for unlocking and modifying the RPCON register: builtin write RPCON(value);

For more information, see the MPLAB ^® XC16 Help files.

8.5 Considerations for Peripheral Pin Selection

The ability to control Peripheral Pin Selection introduces several considerations into application design that most users would never think of otherwise. This is particularly true for several common peripherals, which are only available as remappable peripherals.

The main consideration is that the Peripheral Pin Selects are not available on default pins in the device's default (Reset) state. More specifically, because all RPINRx registers reset to '1's and RPORx registers reset to '0's, this means all PPS inputs are tied to V_SS , while all PPS outputs are disconnected. This means that before any other application code is executed, the user must initialize the device with the proper peripheral configuration. Because the IOLOCK bit resets in the Unlocked state, it is not necessary to execute the unlock sequence after the device has come out of Reset. For application safety, however, it is always better to set IOLOCK and lock the configuration after writing to the control registers.

The NVMKEY unlock sequence must be executed as an Assembly language routine. If the bulk of the application is written in C, or another high-level language, the unlock sequence should be performed by writing in-line assembly or by using the __builtin_write_RPCON(value) function provided by the compiler.

Choosing the configuration requires a review of all Peripheral Pin Selects and their pin assignments, particularly those that will not be used in the application. In all cases, unused pin-selectable peripherals should be disabled completely. Unused peripherals should have their inputs assigned to an unused RPn pin function. I/O pins with unused RPn functions should be configured with the null peripheral output.

8.6 Input Mapping

The inputs of the Peripheral Pin Select options are mapped on the basis of the peripheral. That is, a control register associated with a peripheral dictates the pin it will be mapped to. The RPINRx registers are used to configure peripheral input mapping. Each register contains sets of 8-bit fields, with each set associated with one of the remappable peripherals. Programming a given peripheral's bit field with an appropriate 8-bit index value maps the RPn pin with the corresponding value, or internal signal, to that peripheral. See Table 8-3 for a list of available inputs.

For example, Figure 8-2 illustrates remappable pin selection for the U1RX input.

Figure 8-2. Remappable Input for U1RX
Microchip dsPIC33CK1024MP708 - Input Mapping - 1

flowchart
graph LR
    A["Vss"] --> B["0"]
    C["CMP1"] --> D["1"]
    E["RP32"] --> F["32"]
    G["..."] --> H["n"]
    I["RP181"] --> H["n"]
    B --> J["U1RX[7:0"]]
    D --> J
    F --> J
    H --> J
    J --> K["U1RX Input to Peripheral"]

Example 8-1 provides a configuration for bidirectional communication with flow control using UART1. The following input and output functions are used:

  • Input Functions: U1RX, U1CTS
    • Output Functions: U1TX, U1RTS

Table 8-3. Remappable Pin Inputs

RPINRx[15:8] or RPINRx[7:0] FunctionAvailable on Ports
0 V_SS Internal
1 Comparator 1 Internal
2 Comparator 2 Internal
3 Comparator 3 Internal
4-5 RP4-RP5 Reserved
6 PTG Trigger 26 Internal
7 PTG Trigger 27 Internal
8 APWM Event Out A Internal
9 APWM Event Out B Internal
10 APWM Event Out C Internal
11PWM Event Out CInternal
12 PWM Event Out DInternal
13PWM Event Out EInternal
14RP14Reserved
15Comparator 6 Internal
16-31RP16-RP31Reserved
32RP32Port Pin RB0
33RP33Port Pin RB1
34RP34Port Pin RB2
35RP35Port Pin RB3
36RP36Port Pin RB4
37RP37Port Pin RB5
38RP38Port Pin RB6
39RP39Port Pin RB7
40RP40Port Pin RB8

......continued

RPINRx[15:8] or RPINRx[7:0] FunctionAvailable on Ports
41 RP41 Port Pin RB9
42 RP42 Port Pin RB10
43 RP43 Port Pin RB11
44 RP44 Port Pin RB12
45 RP45 Port Pin RB13
46 RP46 Port Pin RB14
47 RP47 Port Pin RB15
48 RP48 Port Pin RC0
49 RP49 Port Pin RC1
50 RP50 Port Pin RC2
51 RP51 Port Pin RC3
52 RP52 Port Pin RC4
53 RP53 Port Pin RC5
54 RP54 Port Pin RC6
55 RP55 Port Pin RC7
56 RP56 Port Pin RC8
57 RP57 Port Pin RC9
58 RP58 Port Pin RC10
59 RP59 Port Pin RC11
60 RP60 Port Pin RC12
61 RP61 Port Pin RC13
62 RP62 Port Pin RC14
63 RP63 Port Pin RC15
64 RP64 Port Pin RD0
65 RP65 Port Pin RD1
66 RP66 Port Pin RD2
67 RP67 Port Pin RD3
68 RP68 Port Pin RD4
69 RP69 Port Pin RD5
70 RP70 Port Pin RD6
71 RP71 Port Pin RD7
72 RP72 Port Pin RD8
73 RP73 Port Pin RD9
74 RP74 Port Pin RD10
75 RP75 Port Pin RD11
76 RP76 Port Pin RD12
77 RP77 Port Pin RD13
78 RP78 Port Pin RD14
79 RP79 Port Pin RD15
80 RP80 Port Pin RF0
81 RP81 Port Pin RF1
82 RP82 Port Pin RF2
83 RP83 Port Pin RF3
84 RP84 Port Pin RF4
85 RP85 Port Pin RF5

......continued

RPINRx[15:8] or RPINRx[7:0] FunctionAvailable on Ports
86 RP86 Port Pin RF6
87 RP87 Port Pin RF7
88 RP88 Port Pin RF8
89 RP89 Port Pin RF9
90 RP90 Port Pin RF10
91 RP91 Port Pin RF11
92 RP92 Port Pin RF12
93 RP93 Port Pin RF13
94 RP94 Port Pin RF14
95 RP95 Port Pin RF15
96 RP96 Port Pin RA5
97 RP97 Port Pin RA6
98 RP98 Port Pin RA7
99 RP99 Port Pin RA8
100-157 RP100-RP157 Reserved
158 DAC6 pwm_req_on Internal
159 DAC6 pwm_req_offInternal
160 DAC5 pwm_req_on Internal
161 DAC5 pwm_req_offInternal
162 DAC4 pwm_req_on Internal
163 DAC4 pwm_req_offInternal
164 DAC3 pwm_req_on Internal
165 DAC3 pwm_req_offInternal
166 DAC2 pwm_req_on Internal
167 DAC2 pwm_req_offInternal
168 DAC1 pwm_req_on Internal
169 DAC1 pwm_req_offInternal
170-175 RP170-RP175 Reserved
176 RP176 Virtual RPV0
177 RP177 Virtual RPV1
178 RP178 Virtual RPV2
179 RP179 Virtual RPV3
180 RP180 Virtual RPV4
181 RP181 Virtual RPV5

Example 8-1. Configuring UART1 Input and Output Functions

//
**********************************************************************
// Unlock Registers
//**********************************************************************
__builtin_write_RPCON(0x0000);
//**********************************************************************
// Configure Input Functions (See Table 8-3)
// Assign U1Rx To Pin RP35
//**********************************************************************
U1RXR = 35;
// Assign U1CTS To Pin RP36
//**********************************************************************
U1CTSR = 36;
// /\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*.
// /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\*
// Assign U1Tx To Pin RP37
// /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\*
RP37 = 1;
// /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\*
// Assign U1RTS To Pin RP38
// /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\*
RP38 = 2;
// /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\* /\*
// Lock Registers
// :\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*) 

8.7 Virtual Connections

The dsPIC33CK1024MP710 devices support six virtual RPn pins (RP176-RP181), which are identical in functionality to all other RPn pins, with the exception of pinouts. These six pins are internal to the devices and are not connected to a physical device pin.

These pins provide a simple way for inter-peripheral connection without utilizing a physical pin. For example, the output of the analog comparator can be connected to RP176 and the PWM Fault input can be configured for RP176 as well. This configuration allows the analog comparator to trigger PWM Faults without the use of an actual physical pin on the device.

Table 8-4. Selectable Input Sources (Maps Input to Function)

Input Name(1)Function Name Register Register Bits
External Interrupt 1 INT1 RPINR0 INT1R[7:0]
External Interrupt 2 INT2 RPINR1 INT2R[7:0]
External Interrupt 3 INT3 RPINR1 INT3R[7:0]
Timer1 External Clock T1CK RPINR2 T1CK[7:0]
SCCP Timer1 TCKI1 RPINR3 TCKI1R[7:0]
SCCP Capture 1 ICM1 RPINR3 ICM1R[7:0]
SCCP Timer2 TCKI2 RPINR4 TCKI2R[7:0]
SCCP Capture 2 ICM2 RPINR4 ICM2R[7:0]
SCCP Timer3 TCKI3 RPINR5 TCKI3R[7:0]
SCCP Capture 3 ICM3 RPINR5 ICM3R[7:0]
SCCP Timer4 TCKI4 RPINR6 TCKI4R[7:0]
SCCP Capture 4 ICM4 RPINR6 ICM4R[7:0]
SCCP Timer5 TCKI5 RPINR7 TCKI5R[7:0]
SCCP Capture 5 ICM5 RPINR7 ICM5R[7:0]
SCCP Timer6 TCKI6 RPINR8 TCKI6R[7:0]
SCCP Capture 6 ICM6 RPINR8 ICM6R[7:0]

......continued

Input Name(1)Function Name Register Register Bits
SCCP Timer7 TCKI7 RPINR9 TCKI7R[7:0]
SCCP Capture 7 ICM7 RPINR9 ICM7R[7:0]
SCCP Timer8 TCKI8 RPINR10 TCKI8R[7:0]
SCCP Capture 8 ICM8 RPINR10 ICM8R[7:0]
xCCP Fault A OCFA RPINR11 OCFAR[7:0]
xCCP Fault B OCFB RPINR11 OCFBR[7:0]
PWM PCI8PCI8 RPINR12 PCI8R[7:0]
PWM PCI9PCI9 RPINR12 PCI9R[7:0]
PWM PCI10PCI10 RPINR13 PCI10R[7:0]
PWM PCI11PCI11 RPINR13 PCI11R[7:0]
QE11 Input AQEIA1RPINR14 QEIA1R[7:0]
QE11 Input BQEIB1RPINR14QEIB1R[7:0]
QE11 Index 1 InputQEINDX1 RPINR15QEINDX1R[7:0]
QE11 Home 1 InputQEHOM1RPINR15 QEHOM1R[7:0]
QE12 Input AQEIA2RPINR16 QEIA2R[7:0]
QE12 Input BQEIB2RPINR16QEIB2R[7:0]
QE12 Index 1 InputQEINDX2 RPINR17QEINDX2R[7:0]
QE12 Home 1 InputQEHOM2RPINR17 QEHOM2R[7:0]
UART1 ReceiveU1RX RPINR18U1RXR[7:0]
UART1 Data-Set-Ready 1DSR RPINR18U1DSRR[7:0]
UART2 ReceiveU2RX RPINR19U2RXR[7:0]
UART2 Data-Set-Ready 2DSR RPINR19U2DSRR[7:0]
SPI1 Data InputSDI1 RPINR20 SDI1R[7:0]
SPI1 Clock InputSCK1INRPINR20SCK1R[7:0]
SPI1 Client Select 1 RPINR21SS1R[7:0]
Reference Clock InputREFOIRPINR21REFOIR[7:0]
SPI2 Data InputSDI2 RPINR22 SDI2R[7:0]
SPI2 Clock InputSCK2INRPINR22SCK2R[7:0]
SPI2 Client Select 2 RPINR23SS2R[7:0]
QE13 Input AQEIA3RPINR24 QEIA3R[7:0]
QE13 Input BQEIB3RPINR24QEIB3R[7:0]
QE13 Index 1 InputQEINDX3 RPINR25QEINDX3R[7:0]
QE13 Home 1 InputQEHOM3RPINR25 QEHOM3R[7:0]
CAN1 InputCAN1RXRPINR26CAN1RXR[7:0]
CAN2 InputCAN2RXRPINR26CAN2RXR[7:0]
UART3 ReceiveU3RX RPINR27U3RXR[7:0]
UART3 Data-Set-Ready 3DSR RPINR27U3DSRR[7:0]
SPI3 Data InputSDI3 RPINR29 SDI3R[7:0]
SPI3 Clock InputSCK3INRPINR29SCK3R[7:0]
SPI3 Client Select 3 RPINR30SS3R[7:0]
CLC Input ECLCINERPINR30CLCINER[7:0]
CLC Input FCLCINFRPINR31CLCINFR[7:0]
CLC Input GCLCINGRPINR31CLCINGR[7:0]
CLC Input HCLCINHRPINR32CLCINHR[7:0]
MCCP Timer9TCKI9 RPINR32 TCKI9R[7:0]
Input Name(1)Function Name Register Register Bits
MCCP Capture 9 ICM9 RPINR33 ICM9R[7:0]
xCCP Fault C OCFC RPINR37 OCFCR[7:0]
PWM Input 17 PCI17 RPINR37 PCI17R[7:0]
PWM Input 18 PCI18 RPINR38 PCI18R[7:0]
PWM Input 12 PCI12 RPINR42 PCI12R[7:0]
PWM Input 13 PCI13 RPINR42 PCI13R[7:0]
PWM Input 14 PCI14 RPINR43 PCI14R[7:0]
PWM Input 15 PCI15 RPINR43 PCI15R[7:0]
PWM Input 16 PCI16 RPINR44 PCI16R[7:0]
SENT1 Input SENT1 RPINR44 SENT1R[7:0]
SENT2 Input SENT2 RPINR45 SENT2R[7:0]
CLC Input A CLCINARPINR45CLCINAR[7:0]
CLC Input B CLCINBRPINR46CLCINBR[7:0]
CLC Input CCLCINCRPINR46CLCINCR[7:0]
CLC Input DCLCINDRPINR47CLCINDR[7:0]
ADC Trigger Input (ADTRIG31)ADCTRGRPINR47ADCTRGR[7:0]
xCCP Fault D OCFDRPINR48 OCFDR[7:0]
UART1 Clear-to-SendU1CTS RPINR48U1CTSR[7:0]
UART2 Clear-to-SendU2CTS RPINR49U2CTSR[7:0]
UART3 Clear-to-SendU3CTS RPINR49U3CTSR[7:0]
Note:1. Unless otherwise noted, all inputs use the Schmitt Trigger input buffers.

8.8 Output Mapping

In contrast to inputs, the outputs of the Peripheral Pin Select options are mapped on the basis of the pin. In this case, a control register associated with a particular pin dictates the peripheral output to be mapped. The RPORx registers are used to control output mapping. Each register contains sets of 6-bit fields, with each set associated with one RPn pin (see 8.12.2. RPINRO through 8.12.81. RPOR36). The value of the bit field corresponds to one of the peripherals and that peripheral's output is mapped to the pin (see 8.9. Mapping Limitations and Figure 8-3).

A null output is associated with the output register Reset value of '0'. This is done to ensure that remappable outputs remain disconnected from all output pins by default.

Figure 8-3. Multiplexing Remappable Outputs for RPn
Microchip dsPIC33CK1024MP708 - Output Mapping - 1

text_image RPnR[5:0] Default U1TX Output SDO2 Output PWM4H Output PWM4L Output 0 1 2 3 4 53 54 Output Data RP32-RP71 (Physical Pins) RP176-RP181 (Internal Virtual Output Ports)

Note: There are six virtual output ports which are not connected to any I/O ports (RP176-RP181). These virtual ports can be accessed by RPOR20, RPOR21 and RPOR22.

The control schema of the peripheral select pins is not limited to a small range of fixed peripheral configurations. There are no mutual or hardware-enforced lockouts between any of the peripheral mapping SFRs. Literally, any combination of peripheral mappings, across any or all of the RPn pins, is possible. This includes both many-to-one and one-to-many mappings of peripheral inputs, and outputs to pins. While such mappings may be technically possible from a configuration point of view, they may not be supportable from an electrical point of view (see Table 8-5).

Table 8-5. Remappable Output Pin Registers ^(1)

Register RP Pin I/O Port
RPOR0[5:0] RP32 Port Pin RBO
RPOR0[13:8] RP33 Port Pin RB1
RPOR1[5:0] RP34 Port Pin RB2
RPOR1[13:8] RP35 Port Pin RB3
RPOR2[5:0] RP36 Port Pin RB4
RPOR2[13:8] RP37 Port Pin RB5
RPOR3[5:0] RP38 Port Pin RB6
RPOR3[13:8] RP39 Port Pin RB7
RPOR4[5:0] RP40 Port Pin RB8
RPOR4[13:8] RP41 Port Pin RB9
RPOR5[5:0] RP42 Port Pin RB10
RPOR5[13:8] RP43 Port Pin RB11
RPOR6[5:0] RP44 Port Pin RB12
RPOR6[13:8] RP45 Port Pin RB13
RPOR7[5:0] RP46 Port Pin RB14
RPOR7[13:8] RP47 Port Pin RB15
RPOR8[5:0] RP48 Port Pin RC0
RPOR8[13:8] RP49 Port Pin RC1
RPOR9[5:0] RP50 Port Pin RC2
RPOR9[13:8] RP51 Port Pin RC3
RPOR10[5:0] RP52 Port Pin RC4
RPOR10[13:8] RP53 Port Pin RC5
RPOR11[5:0] RP54 Port Pin RC6
RPOR11[13:8] RP55 Port Pin RC7
RPOR12[5:0] RP56 Port Pin RC8
RPOR12[13:8] RP57 Port Pin RC9
RPOR13[5:0] RP58 Port Pin RC10
RPOR13[13:8] RP59 Port Pin RC11
RPOR14[5:0] RP60 Port Pin RC12
RPOR14[13:8] RP61 Port Pin RC13
RPOR15[5:0] RP62 Port Pin RC14
RPOR15[13:8] RP63 Port Pin RC15
RPOR16[5:0] RP64 Port Pin RD0
RPOR16[13:8] RP65 Port Pin RD1
RPOR17[5:0] RP66 Port Pin RD2
RPOR17[13:8] RP67 Port Pin RD3
RPOR18[5:0] RP68 Port Pin RD4
RPOR18[13:8] RP69 Port Pin RD5
RPOR19[5:0] RP70 Port Pin RD6
RPOR19[13:8] RP71 Port Pin RD7
RPOR20[5:0] RP72 Port Pin RD8
RPOR20[13:8] RP73 Port Pin RD9
RPOR21[5:0] RP74 Port Pin RD10
RPOR21[13:8] RP75 Port Pin RD11
RPOR22[5:0] RP76 Port Pin RD12
RPOR22[13:8] RP77 Port Pin RD13
RPOR23[5:0] RP78 Port Pin RD14
RPOR23[13:8] RP79 Port Pin RD15
RPOR24[5:0] RP80 Port Pin RF0
RPOR24[13:8] RP81 Port Pin RF1
RPOR25[5:0] RP82 Port Pin RF2
RPOR25[13:8] RP83 Port Pin RF3
RPOR26[5:0] RP84 Port Pin RF4
RPOR26[13:8] RP85 Port Pin RF5
RPOR27[5:0] RP86 Port Pin RF6
RPOR27[13:8] RP87 Port Pin RF7
RPOR28[5:0] RP88 Port Pin RF8
RPOR28[13:8] RP89 Port Pin RF9
RPOR29[5:0] RP90 Port Pin RF10
RPOR29[13:8] RP91 Port Pin RF11
RPOR30[5:0] RP92 Port Pin RF12
RPOR30[13:8] RP93 Port Pin RF13
RPOR31[5:0] RP94 Port Pin RF14
RPOR31[13:8] RP95 Port Pin RF15
RPOR32[5:0] RP96 Port Pin RA5
RPOR32[13:8] RP97 Port Pin RA6
RPOR33[5:0] RP98 Port Pin RA7
RPOR33[13:8] RP99 Port Pin RA8
Reserved RP100-RP175 Reserved
RPOR34[5:0] RP176 Virtual Pin RPV0
RPOR34[13:8] RP177 Virtual Pin RPV1
RPOR35[5:0] RP178 Virtual Pin RPV2
RPOR35[13:8] RP179 Virtual Pin RPV3
RPOR36[5:0] RP180 Virtual Pin RPV4
RPOR36[13:8] RP181 Virtual Pin RPV5
Note:1. Not all RPn pins are available on all packages. Make sure the selected device variant has the feature available on the device.

Table 8-6. Output Selection for Remappable Pins (RPn) ^1

FunctionRPnR[5:0]Output Name
Default PORT0RPn tied to Default Pin
FunctionRPnR[5:0] Output Name
U1TX 1 RPn tied to UART1 Transmit
U1RTS 2 RPn tied to UART1 Request-to-Send
U2TX 3 RPn tied to UART2 Transmit
U2RTS 4 RPn tied to UART2 Request-to-Send
SDO1 5 RPn tied to SPI1 Data Output
SCK1 6 RPn tied to SPI1 Clock Output
1 7 RPn tied to SPI1 Slave Select
SDO2 8 RPn tied to SPI2 Data Output
SCK2 9 RPn tied to SPI2 Clock Output
2 10 RPn tied to SPI2 Slave Select
SDO3 11 RPn tied to SPI3 Data Output
SCK3 12 RPn tied to SPI3 Clock Output
3 13 RPn tied to SPI3 Slave Select
REFCLKO 14 RPn tied to Reference Clock Output
OCM1 15 RPn tied to SCCP1 Output
OCM2 16 RPn tied to SCCP2 Output
OCM3 17 RPn tied to SCCP3 Output
OCM4 18 RPn tied to SCCP4 Output
OCM5 19 RPn tied to SCCP5 Output
OCM6 20 RPn tied to SCCP6 Output
CAN1TX21 RPn tied to CAN1 Transmit
CAN2TX22 RPn tied to CAN2 Transmit
CMP1 23 RPn tied to Comparator 1 Output
CMP2 24 RPn tied to Comparator 2 Output
CMP3 25 RPn tied to Comparator 3 Output
CMP4 26 RPn tied to Comparator 4 Output
U3TX27 RPn tied to UART3 Transmit
U3RTS28 RPn tied to UART3 Request-to-Send
PWMEE29 RPn tied to PWM Event E Output
PWMEF30 RPn tied to PWM Event F Output
Reserved31 Reserved
CMP5 32 RPn tied to Comparator 5 Output
CMP6 33 RPn tied to Comparator 6 Output
PWM4H34 RPn tied to PWM4H Output
PWM4L35 RPn tied to PWM4L Output
PWMEA36 RPn tied to PWM Event A Output
PWMEB37 RPn tied to PWM Event B Output
QEICMP138 RPn tied to QEI1 Comparator Output
QEICMP239 RPn tied to QEI2 Comparator Output
CLC1OUT40 RPn tied to CLC1 Output
CLC2OUT41 RPn tied to CLC2 Output
OCM7 42 RPn tied to SCCP7 Output
OCM8 43 RPn tied to SCCP8 Output
PWMEC44 RPn tied to PWM Event C Output
PWMED45 RPn tied to PWM Event D Output
PTGTRG24 46 PTG Trigger Output 24
PTGTRG25 47 PTG Trigger Output 25
SENT1OUT 48 RPN tied to SENT1 Output
SENT2OUT 49 RPN tied to SENT2 Output
MCCP9A 50 RPN tied to MCCP9 Output A
MCCP9B 51 RPN tied to MCCP9 Output B
MCCP9C 52 RPN tied to MCCP9 Output C
MCCP9D 53 RPN tied to MCCP9 Output D
MCCP9E 54 RPN tied to MCCP9 Output E
MCCP9F 55 RPN tied to MCCP9 Output F
APWMEE 56 RPN tied to APWM Event E Output
APWMEF 57 RPN tied to APWM Event F Output
QEICMP3 58 RPN tied to QEI3 Comparator Output
CLC3OUT 59 RPN tied to CLC3 Output
CLC4OUT 60 RPN tied to CLC4 Output
U1DTR 61 RPN tied to UART1 DTR
U2DTR 62 RPN tied to UART2 DTR
U3DTR 63 RPN tied to UART3 DTR
APWMEA64 RPN tied to APWM Event A Output
APWMEB65 RPN tied to APWM Event B Output
APWMEC66 RPN tied to APWM Event C Output
APWMED67 RPN tied to APWM Event D Output
CLC5OUT 68 RPN tied to CLC5 Output
CLC6OUT 69 RPN tied to CLC6 Output
CLC7OUT 70 RPN tied to CLC7 Output
CLC8OUT 71 RPN tied to CLC8 Output
  1. Not all RPn pins are available on all packages. Make sure the selected device variant has the feature available on the device.

Note:

8.10 I/O Helpful Tips

  1. In some cases, certain pins, as defined in 34.1. DC Characteristics under "Injection Current", have internal protection diodes to V_DD and V_SS . The term, "Injection Current", is also referred to as "Clamp Current". On designated pins, with sufficient external current-limiting precautions by the user, I/O pin input voltages are allowed to be greater or lesser than the data sheet absolute maximum ratings, with respect to the V_SS and V_DD supplies. Note that when the user application forward biases either of the high or low-side internal input clamp diodes, that the resulting current being injected into the device that is clamped internally by the V_DD and V_SS power rails, may affect the ADC accuracy by four to six counts.
  2. I/O pins that are shared with any analog input pin (i.e., ANx) are always analog pins, by default, after any Reset. Consequently, configuring a pin as an analog input pin automatically disables the digital input pin buffer and any attempt to read the digital input level by reading PORTx or LATx will always return a '0', regardless of the digital logic level on the pin. To use a pin as a digital I/O pin on a shared ANx pin, the user application needs to configure the Analog Select for PORTx registers in the I/O ports module (i.e., ANSELx) by setting the appropriate bit that corresponds to that I/O port pin to a '0'.

Note: Although it is not possible to use a digital input pin when its analog function is enabled, it is possible to use the digital I/O output function, TRISx = 0x0, while the analog function is also enabled. However, this is not recommended, particularly if the analog input is connected to an external analog voltage source, which would create signal contention between the analog signal and the output pin driver.

  1. Most I/O pins have multiple functions. Referring to the device pin diagrams in this data sheet, the priorities of the functions allocated to any pins are indicated by reading the pin name, from left-to-right. The left most function name takes precedence over any function to its right in the naming convention. For example: AN16/T2CK/T7CK/RC1; this indicates that AN16 is the highest priority in this example and will supersede all other functions to its right in the list. Those other functions to its right, even if enabled, would not work as long as any other function to its left was enabled. This rule applies to all of the functions listed for a given pin.
  2. Each pin has an internal weak pull-up resistor and pull-down resistor that can be configured using the CNPUx and CNPDx registers, respectively. These resistors eliminate the need for external resistors in certain applications. The internal pull-up is up to (V_DD - 0.8) , not V_DD . This value is still above the minimum V_IH of CMOS and TTL devices.
  3. When driving LEDs directly, the I/O pin can source or sink more current than what is specified in the V_OH/I_OH and V_OL/I_OL DC characteristics specification. The respective I_OH and I_OL current rating only applies to maintaining the corresponding output at or above the V_OH , and at or below the V_OL levels. However, for LEDs, unlike digital inputs of an externally connected device, they are not governed by the same minimum V_IH/V_IL levels. An I/O pin output can safely sink or source any current less than that listed in the Absolute Maximum Ratings in 33. Electrical Characteristics of this data sheet. For example:

$$ V _ {O H} = 2. 4 v @ I _ {O H} = - 8 \mathrm{mA} \text { and } V _ {D D} = 3. 3 \mathrm{V} $$

The maximum output current sourced by any 8 mA I/O pin = 12 mA.

LED source current < 12 mA is technically permitted.

  1. The Peripheral Pin Select (PPS) pin mapping rules are as follows:

a. Only one "output" function can be active on a given pin at any time, regardless if it is a dedicated or remappable function (one pin, one output).
b. It is possible to assign a "remappable output" function to multiple pins and externally short or tie them together for increased current drive.
c. If any "dedicated output" function is enabled on a pin, it will take precedence over any remappable "output" function.

d. If any "dedicated digital" (input or output) function is enabled on a pin, any number of "input" remappable functions can be mapped to the same pin.

e. If any "dedicated analog" function(s) are enabled on a given pin, "digital input(s)" of any kind will all be disabled, although a single "digital output", at the user's cautionary discretion, can be enabled and active as long as there is no signal contention with an external analog input signal. For example, it is possible for the ADC to convert the digital output logic level, or to toggle a digital output on a comparator or ADC input, provided there is no external analog input, such as for a Built-In Self-Test.

f. Any number of "input" remappable functions can be mapped to the same pin(s) at the same time, including to any pin with a single output from either a dedicated or remappable "output".

g. The TRISx registers control only the digital I/O output buffer. Any other dedicated or remappable active "output" will automatically override the TRISx setting. The TRISx register does not control the digital logic "input" buffer. Remappable digital "inputs" do not automatically override TRISx settings, which means that the TRISx bit must be set to input for pins with only remappable input function(s) assigned.

h. All analog pins are enabled by default after any Reset and the corresponding digital input buffer on the pin has been disabled. Only the Analog Select for PORTx (ANSELx) registers control the digital input buffer, not the TRISx register. The user must disable the analog function on a pin using the Analog Select for PORTx registers in order to use any "digital input(s)" on a corresponding pin, no exceptions.

8.11 I/O Ports Resources

Many useful resources are provided on the main product page of the Microchip website for the devices listed in this data sheet. This product page contains the latest updates and additional information.

8.11.1 Key Resources

  • "I/O Ports with Edge Detect" (www.microchip.com/DS70005322)
  • Code Samples
  • Application Notes
  • Software Libraries
  • Webinars
  • Development Tools

8.12 Peripheral Pin Select Control Registers

OffsetNameBit Pos. 76543210
0x0D00RPCON(1)15:8IOLOCK
7:0
0x0D02 ... 0x0D03Reserved
0x0D04RPINR015:8INT1R[7:0]
7:0
0x0D06RPINR115:8INT3R[7:0]
7:0INT2R[7:0]
0x0D08RPINR215:8T1CKR[7:0]
7:0
0x0D0ARPINR315:8ICM1R[7:0]
7:0TCKI1R[7:0]
0x0DOCRPINR415:8ICM2R[7:0]
7:0TCKI2R[7:0]
0x0DOERPINR515:8ICM3R[7:0]
7:0TCKI3R[7:0]
0x0D10RPINR615:8ICM4R[7:0]
7:0TCKI4R[7:0]
0x0D12RPINR715:8ICM5R[7:0]
7:0TCKI5R[7:0]
0x0D14RPINR815:8ICM6R[7:0]
7:0TCKI6R[7:0]
0x0D16RPINR915:8ICM7R[7:0]
7:0TCKI7R[7:0]
0x0D18RPINR1015:8ICM8R[7:0]
7:0TCKI8R[7:0]
0x0D1ARPINR1115:8OCFBR[7:0]
7:0OCFAR[7:0]
0x0D1CRPINR1215:8PCI9R[7:0]
7:0PCI8R[7:0]
0x0D1ERPINR1315:8PCI11R[7:0]
7:0PCI10R[7:0]
0x0D20RPINR1415:8QEIB1R[7:0]
7:0QEIA1R[7:0]
0x0D22RPINR1515:8QEIHOM1R[7:0]
7:0QEINDX1R[7:0]
0x0D24RPINR1615:8QEIB2R[7:0]
7:0QEIA2R[7:0]
0x0D26RPINR1715:8QEIHOM2R[7:0]
7:0QEINDX2R[7:0]
0x0D28RPINR1815:8U1DSRR[7:0]
7:0U1RXR[7:0]
0x0D2ARPINR1915:8U2DSRR[7:0]
7:0U2RXR[7:0]
0x0D2CRPINR2015:8SCK1R[7:0]
7:0SDI1R[7:0]
0x0D2ERPINR2115:8REFOIR[7:0]
7:0SS1R[7:0]
0x0D30RPINR2215:8SCK2R[7:0]
7:0SDI2R[7:0]
0x0D32RPINR2315:8
7:0SS2R[7:0]
0x0D34RPINR2415:8QEIB3R[7:0]
7:0QEIA3R[7:0]
0x0D36RPINR2515:8QEIHOM3R[7:0]
7:0QEINDX3R[7:0]
0x0D38RPINR2615:8CAN2RXR[7:0]
7:0CAN1RXR[7:0]

......continued

OffsetName Bit Pos. 76543210
0x0D3A RPINR2715:8 U3DSRR[7:0]
7:0 U3RXR[7:0]
0x0D3C ... 0x0D3DReserved
0x0D3E RPINR2915:8 SCK3R[7:0]
7:0 SDI3R[7:0]
0x0D40 RPINR3015:8 CLCINER[7:0]
7:0 SS3R[7:0]
0x0D42 RPINR3115:8CLCINGR[7:0]
7:0CLCINFR[7:0]
0x0D44 RPINR3215:8TCKI9R[7:0]
7:0CLCINHR[7:0]
0x0D46 RPINR3315:8
7:0 ICM9R[7:0]
0x0D48 ... 0x0D4DReserved
0x0D4E RPINR3715:8PCI17R[7:0]
7:0 OCFCR[7:0]
0x0D50 RPINR3815:8
7:0PCI18R[7:0]
0x0D52 ... 0x0D57Reserved
0x0D58 RPINR4215:8PCI13R[7:0]
7:0PCI12R[7:0]
0x0D5A RPINR4315:8PCI15R[7:0]
7:0PCI14R[7:0]
0x0D5C RPINR4415:8SENT1R[7:0]
7:0PCI16R[7:0]
0x0D5E RPINR4515:8CLCINAR[7:0]
7:0 SENT2R[7:0]
0x0D60 RPINR4615:8 CLCINCR[7:0]
7:0CLCINBR[7:0]
0x0D62 RPINR4715:8ADCTRGR[7:0]
7:0CLCINDR[7:0]
0x0D64 RPINR4815:8U1CTSR[7:0]
7:0OCFDR[7:0]
0x0D66 RPINR4915:8U3CTSR[7:0]
7:0U2CTSR[7:0]
0x0D68 ... 0x0D7FReserved
0x0D80RPOR015:8RP33R[5:0]
7:0RP32R[5:0]
0x0D82RPOR115:8RP35R[5:0]
7:0RP34R[5:0]
0x0D84RPOR215:8RP37R[5:0]
7:0RP36R[5:0]
0x0D86RPOR315:8RP39R[5:0]
7:0RP38R[5:0]
0x0D88RPOR415:8RP41R[5:0]
7:0RP40R[5:0]
0x0D8ARPOR515:8RP43R[5:0]
7:0RP42R[5:0]
0x0D8CRPOR615:8RP45R[5:0]
7:0RP44R[5:0]
0x0D8ERPOR715:8RP47R[5:0]
7:0RP46R[5:0]
0xOD90 RPOR815:8RP49R[5:0]
7:0RP48R[5:0]
0xOD92 RPOR915:8RP51R[5:0]
7:0RP50R[5:0]
0xOD94 RPOR1015:8RP53R[5:0]
7:0RP52R[5:0]
0xOD96 RPOR1115:8RP55R[5:0]
7:0RP54R[5:0]
0xOD98 RPOR1215:8RP57R[5:0]
7:0RP56R[5:0]
0xOD9A RPOR1315:8RP59R[5:0]
7:0RP58R[5:0]
0xOD9C RPOR1415:8RP61R[5:0]
7:0RP60R[5:0]
0xOD9E RPOR1515:8RP63R[5:0]
7:0RP62R[5:0]
0xODA0 RPOR1615:8RP65R[5:0]
7:0RP64R[5:0]
0xODA2 RPOR1715:8RP67R[5:0]
7:0RP66R[5:0]
0xODA4 RPOR1815:8RP69R[5:0]
7:0RP68R[5:0]
0xODA6 RPOR1915:8RP71R[5:0]
7:0RP70R[5:0]
0xODA8 RPOR2015:8RP73R[5:0]
7:0RP72R[5:0]
0xODAA RPOR2115:8RP75R[5:0]
7:0RP74R[5:0]
0xODAC RPOR2215:8RP77R[5:0]
7:0RP76R[5:0]
0xODAE RPOR2315:8RP79R[5:0]
7:0RP78R[5:0]
0xODB0 RPOR2415:8RP81R[5:0]
7:0RP80R[5:0]
0xODB2 RPOR2515:8RP83R[5:0]
7:0RP82R[5:0]
0xODB4 RPOR2615:8RP85R[5:0]
7:0RP84R[5:0]
0xODB6 RPOR2715:8RP87R[5:0]
7:0RP86R[5:0]
0xODB8 RPOR2815:8RP89R[5:0]
7:0RP88R[5:0]
0xODBA RPOR2915:8RP91R[5:0]
7:0RP90R[5:0]
0xODBC RPOR3015:8RP93R[5:0]
7:0RP92R[5:0]
0xODBE RPOR3115:8RP95R[5:0]
7:0RP94R[5:0]
0xODC0 RPOR3215:8RP97R[5:0]
7:0RP96R[5:0]
0xODC2 RPOR3315:8RP99R[5:0]
7:0RP98R[5:0]
0xODC4 RPOR3415:8RP177R[5:0]
7:0RP176R[5:0]
0xODC6 RPOR3515:8RP179R[5:0]
7:0RP178R[5:0]
0xODC8 RPOR3615:8RP181R[5:0]
7:0RP180R[5:0]

8.12.1 Peripheral Remapping Configuration Register

Name: RPCON (1) Offset: 0xD00

Note:

  1. Writing to this register needs an unlock sequence.

Microchip dsPIC33CK1024MP708 - Note: - 1

text_image Bit 15 14 13 12 11 10 9 8 IOLOCK Access R/W Reset 0 Bit 7 6 5 4 3 2 1 0 Access Reset

Bit 11 - IOLOCK Peripheral Remapping Register Lock bit

ValueDescription
1All Peripheral Remapping registers are locked and cannot be written
0All Peripheral Remapping registers are unlocked and can be written

8.12.2 Peripheral Pin Select Input Register 0

Name: RPINRO

Offset: 0xD04

Microchip dsPIC33CK1024MP708 - Peripheral Pin Select Input Register 0 - 1

text_image Bit 15 14 13 12 11 10 9 8 INT1R[7:0] Access R/W R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 Access Reset

Bits 15:8 – INT1R[7:0] Assign External Interrupt 1 (INT1) to the Corresponding RPn Pin bits

8.12.3 Peripheral Pin Select Input Register 1

Name: RPINR1

Offset: 0xD06

Microchip dsPIC33CK1024MP708 - Peripheral Pin Select Input Register 1 - 1

text_image Bit 15 14 13 12 11 10 9 8 INT3R[7:0] Access R/W R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 INT2R[7:0] Access R/W R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0 0

Bits 15:8 - INT3R[7:0] Assign External Interrupt 3 (INT3) to the Corresponding RPn Pin bits

Bits 7:0 - INT2R[7:0] Assign External Interrupt 2 (INT2) to the Corresponding RPn Pin bits

8.12.4 Peripheral Pin Select Input Register 2

Name: RPINR2

Offset: 0xD08

Microchip dsPIC33CK1024MP708 - Peripheral Pin Select Input Register 2 - 1

text_image Bit 15 14 13 12 11 10 9 8 T1CKR[7:0] Access R/W R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 Access Reset

Bits 15:8 – T1CKR[7:0] Assign Timer1 External Clock (T1CK) to the Corresponding RPn Pin bits

8.12.5 Peripheral Pin Select Input Register 3

Name: RPINR3

Offset: 0xD0A

Microchip dsPIC33CK1024MP708 - Peripheral Pin Select Input Register 3 - 1

text_image Bit 15 14 13 12 11 10 9 8 ICM1R[7:0] Access R/W R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 TCKI1R[7:0] Access R/W R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0 0

Bits 15:8 – ICM1R[7:0] Assign SCCP Capture 1 (ICM1) Input to the Corresponding RPn Pin bits

Bits 7:0 - TCKI1R[7:0] Assign SCCP Timer1 (TCKI1) Input to the Corresponding RPn Pin bits

8.12.6 Peripheral Pin Select Input Register 4

Name: RPINR4

Offset: 0xD0C

Microchip dsPIC33CK1024MP708 - Peripheral Pin Select Input Register 4 - 1

text_image Bit 15 14 13 12 11 10 9 8 ICM2R[7:0] Access R/W R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 TCKI2R[7:0] Access R/W R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0 0

Bits 15:8 – ICM2R[7:0] Assign SCCP Capture 2 (ICM2) Input to the Corresponding RPn Pin bits

Bits 7:0 - TCKI2R[7:0] Assign SCCP Timer2 (TCKI2) Input to the Corresponding RPn Pin bits

8.12.7 Peripheral Pin Select Input Register 5

Name: RPINR5

Offset: 0xDOE

Microchip dsPIC33CK1024MP708 - Peripheral Pin Select Input Register 5 - 1

text_image Bit 15 14 13 12 11 10 9 8 ICM3R[7:0] Access R/W R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 TCKI3R[7:0] Access R/W R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0 0

Bits 15:8 – ICM3R[7:0] Assign SCCP Capture 3 (ICM3) Input to the Corresponding RPn Pin bits

Bits 7:0 - TCKI3R[7:0] Assign SCCP Timer3 (TCKI3) Input to the Corresponding RPn Pin bits

8.12.8 Peripheral Pin Select Input Register 6

Name: RPINR6

Offset: 0xD10

Microchip dsPIC33CK1024MP708 - Peripheral Pin Select Input Register 6 - 1

text_image Bit 15 14 13 12 11 10 9 8 ICM4R[7:0] Access R/W R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 TCKI4R[7:0] Access R/W R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0 0

Bits 15:8 – ICM4R[7:0] Assign SCCP Capture 4 (ICM4) Input to the Corresponding RPn Pin bits

Bits 7:0 - TCKI4R[7:0] Assign SCCP Timer4 (TCKI4) Input to the Corresponding RPn Pin bits

8.12.9 Peripheral Pin Select Input Register 7

Name: RPINR7

Offset: 0xD12

Microchip dsPIC33CK1024MP708 - Peripheral Pin Select Input Register 7 - 1

text_image Bit 15 14 13 12 11 10 9 8 ICM5R[7:0] Access R/W R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 TCKI5R[7:0] Access R/W R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0 0

Bits 15:8 – ICM5R[7:0] Assign SCCP Capture 5 (ICM5) Input to the Corresponding RPn Pin bits

Bits 7:0 - TCKI5R[7:0] Assign SCCP Timer5 (TCKI5) Input to the Corresponding RPn Pin bits

8.12.10 Peripheral Pin Select Input Register 8

Name: RPINR8

Offset: 0xD14

Microchip dsPIC33CK1024MP708 - Peripheral Pin Select Input Register 8 - 1

text_image Bit 15 14 13 12 11 10 9 8 ICM6R[7:0] Access R/W R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 TCKI6R[7:0] Access R/W R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0 0

Bits 15:8 – ICM6R[7:0] Assign SCCP Capture 6 (ICM6) Input to the Corresponding RPn Pin bits

Bits 7:0 - TCKI6R[7:0] Assign SCCP Timer6 (TCKI6) Input to the Corresponding RPn Pin bits

8.12.11 Peripheral Pin Select Input Register 9

Name: RPINR9

Offset: 0xD16

Microchip dsPIC33CK1024MP708 - Peripheral Pin Select Input Register 9 - 1

text_image Bit 15 14 13 12 11 10 9 8 ICM7R[7:0] Access R/W R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 TCKI7R[7:0] Access R/W R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0 0

Bits 15:8 – ICM7R[7:0] Assign SCCP Capture 7 (ICM7) Input to the Corresponding RPn Pin bits

Bits 7:0 - TCKI7R[7:0] Assign SCCP Timer7 (TCKI7) Input to the Corresponding RPn Pin bits

8.12.12 Peripheral Pin Select Input Register 10

Name: RPINR10

Offset: 0xD18

Microchip dsPIC33CK1024MP708 - Peripheral Pin Select Input Register 10 - 1

text_image Bit 15 14 13 12 11 10 9 8 ICM8R[7:0] Access R/W R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 TCKI8R[7:0] Access R/W R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0 0

Bits 15:8 – ICM8R[7:0] Assign SCCP Capture 8 (ICM8) Input to the Corresponding RPn Pin bits

Bits 7:0 - TCKI8R[7:0] Assign SCCP Timer8 (TCKI8) Input to the Corresponding RPn Pin bits

8.12.13 Peripheral Pin Select Input Register 11

Name: RPINR11 Offset: 0xD1A

Microchip dsPIC33CK1024MP708 - Peripheral Pin Select Input Register 11 - 1

text_image Bit 15 14 13 12 11 10 9 8 OCFBR[7:0] Access R/W R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 OCFAR[7:0] Access R/W R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0 0

Bits 15:8 – OCFBR[7:0] Assign SCCP Fault B (OCFB) Input to the Corresponding RPn Pin bits

Bits 7:0 - OCFAR[7:0] Assign SCCP Fault A (OCFA) Input to the Corresponding RPn Pin bits

8.12.14 Peripheral Pin Select Input Register 12

Name: RPINR12

Offset: 0xD1C

Microchip dsPIC33CK1024MP708 - Peripheral Pin Select Input Register 12 - 1

text_image Bit 15 14 13 12 11 10 9 8 PCI9R[7:0] Access R/W R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 PCI8R[7:0] Access R/W R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0 0

Bits 15:8 – PCI9R[7:0] Assign PWM Input 9 (PCI9) to the Corresponding RPn Pin bits

Bits 7:0 - PCI8R[7:0] Assign PWM Input 8 (PCI8) to the Corresponding RPn Pin bits

8.12.15 Peripheral Pin Select Input Register 13

Name: RPINR13

Offset: 0xD1E

Bit 15 14 13 12 11 10 9 8
PCI11R[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
PCI10R[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0

Bits 15:8 – PCI11R[7:0] Assign PWM Input 11 (PCI11) to the Corresponding RPn Pin bits

Bits 7:0 – PCI10R[7:0] Assign PWM Input 10 (PCI10) to the Corresponding RPn Pin bits

8.12.16 Peripheral Pin Select Input Register 14

Name: RPINR14

Offset: 0xD20

Microchip dsPIC33CK1024MP708 - Peripheral Pin Select Input Register 14 - 1

text_image Bit 15 14 13 12 11 10 9 8 QEIB1R[7:0] Access R/W R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 QEIA1R[7:0] Access R/W R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0 0

Bits 15:8 – QEIB1R[7:0] Assign QEI Input B (QEIB1) to the Corresponding RPn Pin bits

Bits 7:0 – QEIA1R[7:0] Assign QEI Input A (QEIA1) to the Corresponding RPn Pin bits

8.12.17 Peripheral Pin Select Input Register 15

Name: RPINR15

Offset: 0xD22

Microchip dsPIC33CK1024MP708 - Peripheral Pin Select Input Register 15 - 1

text_image Bit 15 14 13 12 11 10 9 8 QEIHOM1R[7:0] Access R/W R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 QEINDX1R[7:0] Access R/W R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0 0

Bits 15:8 – QEIHOM1R[7:0] Assign QEI Home 1 Input (QEIHOM1) to the Corresponding RPn Pin bits

Bits 7:0 – QEINDX1R[7:0] Assign QEI Index 1 Input (QEINDX1) to the Corresponding RPn Pin bits

8.12.18 Peripheral Pin Select Input Register 16

Name: RPINR16

Offset: 0xD24

Bit 15 14 13 12 11 10 9 8
QEIB2R[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
QEIA2R[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0

Bits 15:8 – QEIB2R[7:0] Assign QEI2 Input B (QEIB2) to the Corresponding RPn Pin bits

Bits 7:0 – QEIA2R[7:0] Assign QE12 Input A (QEIA2) to the Corresponding RPn Pin bits

8.12.19 Peripheral Pin Select Input Register 17

Name: RPINR17

Offset: 0xD26

Microchip dsPIC33CK1024MP708 - Peripheral Pin Select Input Register 17 - 1

text_image Bit 15 14 13 12 11 10 9 8 QEIHOM2R[7:0] Access R/W R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 QEINDX2R[7:0] Access R/W R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0 0

Bits 15:8 – QEIHOM2R[7:0] Assign QEI Home 2 Input (QEIHOM2) to the Corresponding RPn Pin bits

Bits 7:0 – QEINDX2R[7:0] Assign QEI Index 2 Input (QEINDX2) to the Corresponding RPn Pin bits

8.12.20 Peripheral Pin Select Input Register 18

Name: RPINR18

Offset: 0xD28

Microchip dsPIC33CK1024MP708 - Peripheral Pin Select Input Register 18 - 1

text_image Bit 15 14 13 12 11 10 9 8 U1DSRR[7:0] Access R/W R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 U1RXR[7:0] Access R/W R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0 0

Bits 15:8 – U1DSRR[7:0] Assign UART1 Data-Set-Ready (U1DSR) to the Corresponding RPn Pin bits

Bits 7:0 – U1RXR[7:0] Assign UART1 Receive (U1RX) to the Corresponding RPn Pin bits

8.12.21 Peripheral Pin Select Input Register 19

Name: RPINR19

Offset: 0xD2A

Microchip dsPIC33CK1024MP708 - Peripheral Pin Select Input Register 19 - 1

text_image Bit 15 14 13 12 11 10 9 8 U2DSRR[7:0] Access R/W R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 U2RXR[7:0] Access R/W R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0 0

Bits 15:8 – U2DSRR[7:0] Assign UART2 Data-Set-Ready (U2DSR) to the Corresponding RPn Pin bits

Bits 7:0 - U2RXR[7:0] Assign UART2 Receive (U2RX) to the Corresponding RPn Pin bits

8.12.22 Peripheral Pin Select Input Register 20

Name: RPINR20

Offset: 0xD2C

Microchip dsPIC33CK1024MP708 - Peripheral Pin Select Input Register 20 - 1

text_image Bit 15 14 13 12 11 10 9 8 SCK1R[7:0] Access R/W R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 SDI1R[7:0] Access R/W R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0 0

Bits 15:8 – SCK1R[7:0] Assign SPI1 Clock Input (SCK1IN) to the Corresponding RPn Pin bits

Bits 7:0 – SDI1R[7:0] Assign SPI1 Data Input (SDI1) to the Corresponding RPn Pin bits

8.12.23 Peripheral Pin Select Input Register 21

Name: RPINR21 Offset: 0xD2E

Microchip dsPIC33CK1024MP708 - Peripheral Pin Select Input Register 21 - 1

text_image Bit 15 14 13 12 11 10 9 8 REFOIR[7:0] Access R/W R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 SS1R[7:0] Access R/W R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0 0

Bits 15:8 – REFOIR[7:0] Assign Reference Clock Input (REFOI) to the Corresponding RPn Pin bits

Bits 7:0 – SS1R[7:0] Assign SPI1 Client Select (SS1) to the Corresponding RPn Pin bits

8.12.24 Peripheral Pin Select Input Register 22

Name: RPINR22

Offset: 0xD30

Microchip dsPIC33CK1024MP708 - Peripheral Pin Select Input Register 22 - 1

text_image Bit 15 14 13 12 11 10 9 8 SCK2R[7:0] Access R/W R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 SDI2R[7:0] Access R/W R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0 0

Bits 15:8 – SCK2R[7:0] Assign SPI2 Clock Input (SCK2IN) to the Corresponding RPn Pin bits

Bits 7:0 – SDI2R[7:0] Assign SPI2 Data Input (SDI2) to the Corresponding RPn Pin bits

8.12.25 Peripheral Pin Select Input Register 23

Name: RPINR23

Offset: 0xD32

Microchip dsPIC33CK1024MP708 - Peripheral Pin Select Input Register 23 - 1

text_image Bit 15 14 13 12 11 10 9 8 Access Reset Bit 7 6 5 4 3 2 1 0 SS2R[7:0] Access R/W R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0

Bits 7:0 – SS2R[7:0] Assign SPI2 Client Select (SS2) to the Corresponding RPn Pin bits

8.12.26 Peripheral Pin Select Input Register 24

Name: RPINR24

Offset: 0xD34

Bit 15 14 13 12 11 10 9 8
QEIB3R[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
QEIA3R[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0

Bits 15:8 – QEIB3R[7:0] Assign QEI Input B3 (QEIB3) to the Corresponding RPn Pin bits

Bits 7:0 – QEIA3R[7:0] Assign QEI Input A3 (QEIA3) to the Corresponding RPn Pin bits

8.12.27 Peripheral Pin Select Input Register 25

Name: RPINR25

Offset: 0xD36

Microchip dsPIC33CK1024MP708 - Peripheral Pin Select Input Register 25 - 1

text_image Bit 15 14 13 12 11 10 9 8 QEIHOM3R[7:0] Access R/W R/W R/W R/W R/W R/W R/W R/W Reset Bit 7 6 5 4 3 2 1 0 QEINDX3R[7:0] Access R/W R/W R/W R/W R/W R/W R/W R/W Reset

Bits 15:8 – QEIHOM3R[7:0] Assign QEI Home 3 Input (QEIHOM3) to the Corresponding RPn Pin bits

Bits 7:0 – QEINDX3R[7:0] Assign QEI Index 3 Input (QEINDX3) to the Corresponding RPn Pin bits

8.12.28 Peripheral Pin Select Input Register 26

Name: RPINR26

Offset: 0xD38

Bit 15 14 13 12 11 10 9 8
CAN2RXR[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
CAN1RXR[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0

Bits 15:8 – CAN2RXR[7:0] Assign CAN2 Input (CAN2RX) to the Corresponding RPn Pin bits

Bits 7:0 – CAN1RXR[7:0] Assign CAN1 Input (CAN1RX) to the Corresponding RPn Pin bits

8.12.29 Peripheral Pin Select Input Register 27

Name: RPINR27

Offset: 0xD3A

Microchip dsPIC33CK1024MP708 - Peripheral Pin Select Input Register 27 - 1

text_image Bit 15 14 13 12 11 10 9 8 U3DSRR[7:0] Access R/W R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 U3RXR[7:0] Access R/W R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0 0

Bits 15:8 – U3DSRR[7:0] Assign UART3 Data-Set-Ready (U3DSR) to the Corresponding RPn Pin bits

Bits 7:0 – U3RXR[7:0] Assign UART3 Receive (U3RX) to the Corresponding RPn Pin bits

8.12.30 Peripheral Pin Select Input Register 29

Name: RPINR29

Offset: 0xD3E

Microchip dsPIC33CK1024MP708 - Peripheral Pin Select Input Register 29 - 1

text_image Bit 15 14 13 12 11 10 9 8 SCK3R[7:0] Access R/W R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 SDI3R[7:0] Access R/W R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0 0

Bits 15:8 – SCK3R[7:0] Assign SPI3 Clock Input (SCK3IN) to the Corresponding RPn Pin bits

Bits 7:0 – SDI3R[7:0] Assign SPI3 Data Input (SDI3) to the Corresponding RPn Pin bits

8.12.31 Peripheral Pin Select Input Register 30

Name: RPINR30

Offset: 0xD40

Microchip dsPIC33CK1024MP708 - Peripheral Pin Select Input Register 30 - 1

text_image Bit 15 14 13 12 11 10 9 8 CLCINER[7:0] Access R/W R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 SS3R[7:0] Access R/W R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0 0

Bits 15:8 – CLCINER[7:0] Assign CLC Input E (CLCINE) to the Corresponding RPn Pin bits

Bits 7:0 – SS3R[7:0] Assign SPI3 Client Select (SS3) to the Corresponding RPn Pin bits

8.12.32 Peripheral Pin Select Input Register 31

Name: RPINR31

Offset: 0xD42

Bit 15 14 13 12 11 10 9 8
CLCINGR[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
CLCINFR[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0

Bits 15:8 – CLCINGR[7:0] Assign CLC Input G (CLCING) to the Corresponding RPn Pin bits

Bits 7:0 – CLCINFR[7:0] Assign CLC Input F (CLCINF) to the Corresponding RPn Pin bits

8.12.33 Peripheral Pin Select Input Register 32

Name: RPINR32

Offset: 0xD44

Bit 15 14 13 12 11 10 9 8
TCKI9R[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
CLCINHR[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0

Bits 15:8 – TCKI9R[7:0] Assign MCCP Timer9 Input (TCKI9) to the Corresponding RPn Pin bits

Bits 7:0 – CLCINHR[7:0] Assign CLC Input H (CLCINH) to the Corresponding RPn Pin bits

8.12.34 Peripheral Pin Select Input Register 33

Name: RPINR33

Offset: 0xD46

Microchip dsPIC33CK1024MP708 - Peripheral Pin Select Input Register 33 - 1

text_image Bit 15 14 13 12 11 10 9 8 Access Reset Bit 7 6 5 4 3 2 1 0 ICM9R[7:0] Access R/W R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0 0

Bits 7:0 – ICM9R[7:0] Assign MCCP Capture 9 Input (ICM9) to the Corresponding RPn Pin bits

8.12.35 Peripheral Pin Select Input Register 37

Name: RPINR37

Offset: 0xD4E

Microchip dsPIC33CK1024MP708 - Peripheral Pin Select Input Register 37 - 1

text_image Bit 15 14 13 12 11 10 9 8 PCI17R[7:0] Access R/W R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 OCFCR[7:0] Access R/W R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0 0

Bits 15:8 – PCI17R[7:0] Assign PWM Input 17 (PCI17) to the Corresponding RPn Pin bits

Bits 7:0 - OCFCR[7:0] Assign xCCP Fault C (OCFC) to the Corresponding RPn Pin bits

8.12.36 Peripheral Pin Select Input Register 38

Name: RPINR38

Offset: 0xD50

Microchip dsPIC33CK1024MP708 - Peripheral Pin Select Input Register 38 - 1

text_image Bit 15 14 13 12 11 10 9 8 Access Reset Bit 7 6 5 4 3 2 1 0 PCI18R[7:0] Access R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0

Bits 7:0 – PCI18R[7:0] Assign PWM Input 18 (PCI18) to the Corresponding RPn Pin bits

8.12.37 Peripheral Pin Select Input Register 42

Name: RPINR42

Offset: 0xD58

Bit 15 14 13 12 11 10 9 8
PCI13R[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
PCI12R[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0

Bits 15:8 – PCI13R[7:0] Assign PWM Input 13 (PCI13) to the Corresponding RPn Pin bits

Bits 7:0 – PCI12R[7:0] Assign PWM Input 12 (PCI12) to the Corresponding RPn Pin bits

8.12.38 Peripheral Pin Select Input Register 43

Name: RPINR43

Offset: 0xD5A

Bit 15 14 13 12 11 10 9 8
PCI15R[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
PCI14R[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0

Bits 15:8 – PCI15R[7:0] Assign PWM Input 15 (PCI15) to the Corresponding RPn Pin bits

Bits 7:0 – PCI14R[7:0] Assign PWM Input 14 (PCI14) to the Corresponding RPn Pin bits

8.12.39 Peripheral Pin Select Input Register 44

Name: RPINR44

Offset: 0xD5C

Bit 15 14 13 12 11 10 9 8
SENT1R[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
PCI16R[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0

Bits 15:8 – SENT1R[7:0] Assign SENT1 Input (SENT1) to the Corresponding RPn Pin bits

Bits 7:0 – PCI16R[7:0] Assign PWM Input 16 (PCI16) to the Corresponding RPn Pin bits

8.12.40 Peripheral Pin Select Input Register 45

Name: RPINR45

Offset: 0xD5E

Bit 15 14 13 12 11 10 9 8
CLCINAR[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
SENT2R[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0

Bits 15:8 – CLCINAR[7:0] Assign CLC Input A (CLCINA) to the Corresponding RPn Pin bits

Bits 7:0 – SENT2R[7:0] Assign SENT2 Input (SENT2) to the Corresponding RPn Pin bits

8.12.41 Peripheral Pin Select Input Register 46

Name: RPINR46

Offset: 0xD60

Bit 15 14 13 12 11 10 9 8
CLCINCR[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
CLCINBR[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0

Bits 15:8 – CLCINCR[7:0] Assign CLC Input C (CLCINC) to the Corresponding RPn Pin bits

Bits 7:0 – CLCINBR[7:0] Assign CLC Input B (CLCINB) to the Corresponding RPn Pin bits

8.12.42 Peripheral Pin Select Input Register 47

Name: RPINR47

Offset: 0xD62

Microchip dsPIC33CK1024MP708 - Peripheral Pin Select Input Register 47 - 1

text_image Bit 15 14 13 12 11 10 9 8 ADCTRGR[7:0] Access R/W R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 CLCINDR[7:0] Access R/W R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0 0

Bits 15:8 – ADCTRGR[7:0] Assign ADC Trigger Input (ADCTRGR) to the Corresponding RPn Pin bits

Bits 7:0 – CLCINDR[7:0] Assign CLC Input D (CLCIND) to the Corresponding RPn Pin bits

8.12.43 Peripheral Pin Select Input Register 48

Name: RPINR48

Offset: 0xD64

Microchip dsPIC33CK1024MP708 - Peripheral Pin Select Input Register 48 - 1

text_image Bit 15 14 13 12 11 10 9 8 U1CTSR[7:0] Access R/W R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 OCFDR[7:0] Access R/W R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0 0

Bits 15:8 – U1CTSR[7:0] Assign UART1 Clear-to-Send (U1CTS) to the Corresponding RPn Pin bits

Bits 7:0 - OCFDR[7:0] Assign xCCP Fault D (OCFD) to the Corresponding RPn Pin bits

8.12.44 Peripheral Pin Select Input Register 49

Name: RPINR49

Offset: 0xD66

Bit 15 14 13 12 11 10 9 8
U3CTSR[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
U2CTSR[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0

Bits 15:8 – U3CTSR[7:0] Assign UART3 Clear-to-Send (U3CTS) to the Corresponding RPn Pin bits

Bits 7:0 – U2CTSR[7:0] Assign UART2 Clear-to-Send (U2CTS) to the Corresponding RPn Pin bits

8.12.45 Peripheral Pin Select Output Register 0

Name: RPOR0 Offset: 0xD80

Microchip dsPIC33CK1024MP708 - Peripheral Pin Select Output Register 0 - 1

text_image Bit 15 14 13 12 11 10 9 8 RP33R[5:0] Access R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 RP32R[5:0] Access R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0

Bits 13:8 – RP33R[5:0] Peripheral Output Function is Assigned to RP33 Output Pin bits

Bits 5:0 – RP32R[5:0] Peripheral Output Function is Assigned to RP32 Output Pin bits

8.12.46 Peripheral Pin Select Output Register 1

Name: RPOR1 Offset: 0xD82

Microchip dsPIC33CK1024MP708 - Peripheral Pin Select Output Register 1 - 1

text_image Bit 15 14 13 12 11 10 9 8 RP35R[5:0] Access R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 RP34R[5:0] Access R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0

Bits 13:8 – RP35R[5:0] Peripheral Output Function is Assigned to RP35 Output Pin bits

Bits 5:0 – RP34R[5:0] Peripheral Output Function is Assigned to RP34 Output Pin bits

8.12.47 Peripheral Pin Select Output Register 2

Name: RPOR2 Offset: 0xD84

Microchip dsPIC33CK1024MP708 - Peripheral Pin Select Output Register 2 - 1

text_image Bit 15 14 13 12 11 10 9 8 RP37R[5:0] Access R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 RP36R[5:0] Access R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0

Bits 13:8 – RP37R[5:0] Peripheral Output Function is Assigned to RP37 Output Pin bits

Bits 5:0 – RP36R[5:0] Peripheral Output Function is Assigned to RP36 Output Pin bits

8.12.48 Peripheral Pin Select Output Register 3

Name: RPOR3 Offset: 0xD86

Microchip dsPIC33CK1024MP708 - Peripheral Pin Select Output Register 3 - 1

text_image Bit 15 14 13 12 11 10 9 8 RP39R[5:0] Access R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 RP38R[5:0] Access R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0

Bits 13:8 – RP39R[5:0] Peripheral Output Function is Assigned to RP39 Output Pin bits

Bits 5:0 – RP38R[5:0] Peripheral Output Function is Assigned to RP38 Output Pin bits

8.12.49 Peripheral Pin Select Output Register 4

Name: RPOR4 Offset: 0xD88

Microchip dsPIC33CK1024MP708 - Peripheral Pin Select Output Register 4 - 1

text_image Bit 15 14 13 12 11 10 9 8 RP41R[5:0] Access R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 RP40R[5:0] Access R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0

Bits 13:8 – RP41R[5:0] Peripheral Output Function is Assigned to RP41 Output Pin bits

Bits 5:0 – RP40R[5:0] Peripheral Output Function is Assigned to RP40 Output Pin bits

8.12.50 Peripheral Pin Select Output Register 5

Name: RPOR5 Offset: 0xD8A

Microchip dsPIC33CK1024MP708 - Peripheral Pin Select Output Register 5 - 1

text_image Bit 15 14 13 12 11 10 9 8 RP43R[5:0] Access R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 RP42R[5:0] Access R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0

Bits 13:8 – RP43R[5:0] Peripheral Output Function is Assigned to RP43 Output Pin bits

Bits 5:0 – RP42R[5:0] Peripheral Output Function is Assigned to RP42 Output Pin bits

8.12.51 Peripheral Pin Select Output Register 6

Name: RPOR6 Offset: 0xD8C

Microchip dsPIC33CK1024MP708 - Peripheral Pin Select Output Register 6 - 1

text_image Bit 15 14 13 12 11 10 9 8 RP45R[5:0] Access R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 RP44R[5:0] Access R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0

Bits 13:8 – RP45R[5:0] Peripheral Output Function is Assigned to RP45 Output Pin bits

Bits 5:0 – RP44R[5:0] Peripheral Output Function is Assigned to RP44 Output Pin bits

8.12.52 Peripheral Pin Select Output Register 7

Name: RPOR7 Offset: 0xD8E

Microchip dsPIC33CK1024MP708 - Peripheral Pin Select Output Register 7 - 1

text_image Bit 15 14 13 12 11 10 9 8 RP47R[5:0] Access R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 RP46R[5:0] Access R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0

Bits 13:8 – RP47R[5:0] Peripheral Output Function is Assigned to RP47 Output Pin bits

Bits 5:0 – RP46R[5:0] Peripheral Output Function is Assigned to RP46 Output Pin bits

8.12.53 Peripheral Pin Select Output Register 8

Name: RPOR8 Offset: 0xD90

Microchip dsPIC33CK1024MP708 - Peripheral Pin Select Output Register 8 - 1

text_image Bit 15 14 13 12 11 10 9 8 RP49R[5:0] Access R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 RP48R[5:0] Access R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0

Bits 13:8 – RP49R[5:0] Peripheral Output Function is Assigned to RP49 Output Pin bits

Bits 5:0 – RP48R[5:0] Peripheral Output Function is Assigned to RP48 Output Pin bits

8.12.54 Peripheral Pin Select Output Register 9

Name: RPOR9 Offset: 0xD92

Microchip dsPIC33CK1024MP708 - Peripheral Pin Select Output Register 9 - 1

text_image Bit 15 14 13 12 11 10 9 8 RP51R[5:0] Access R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 RP50R[5:0] Access R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0

Bits 13:8 – RP51R[5:0] Peripheral Output Function is Assigned to RP51 Output Pin bits

Bits 5:0 – RP50R[5:0] Peripheral Output Function is Assigned to RP50 Output Pin bits

8.12.55 Peripheral Pin Select Output Register 10

Name: RPOR10 Offset: 0xD94

Microchip dsPIC33CK1024MP708 - Peripheral Pin Select Output Register 10 - 1

text_image Bit 15 14 13 12 11 10 9 8 RP53R[5:0] Access R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 RP52R[5:0] Access R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0

Bits 13:8 – RP53R[5:0] Peripheral Output Function is Assigned to RP53 Output Pin bits

Bits 5:0 – RP52R[5:0] Peripheral Output Function is Assigned to RP52 Output Pin bits

8.12.56 Peripheral Pin Select Output Register 11

Name: RPOR11 Offset: 0xD96

Microchip dsPIC33CK1024MP708 - Peripheral Pin Select Output Register 11 - 1

text_image Bit 15 14 13 12 11 10 9 8 RP55R[5:0] Access R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 RP54R[5:0] Access R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0

Bits 13:8 – RP55R[5:0] Peripheral Output Function is Assigned to RP55 Output Pin bits

Bits 5:0 – RP54R[5:0] Peripheral Output Function is Assigned to RP54 Output Pin bits

8.12.57 Peripheral Pin Select Output Register 12

Name: RPOR12 Offset: 0xD98

Microchip dsPIC33CK1024MP708 - Peripheral Pin Select Output Register 12 - 1

text_image Bit 15 14 13 12 11 10 9 8 RP57R[5:0] Access R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 RP56R[5:0] Access R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0

Bits 13:8 – RP57R[5:0] Peripheral Output Function is Assigned to RP57 Output Pin bits

Bits 5:0 – RP56R[5:0] Peripheral Output Function is Assigned to RP56 Output Pin bits

8.12.58 Peripheral Pin Select Output Register 13

Name: RPOR13

Offset: 0xD9A

Microchip dsPIC33CK1024MP708 - Peripheral Pin Select Output Register 13 - 1

text_image Bit 15 14 13 12 11 10 9 8 RP59R[5:0] Access R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 RP58R[5:0] Access R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0

Bits 13:8 – RP59R[5:0] Peripheral Output Function is Assigned to RP59 Output Pin bits
Bits 5:0 – RP58R[5:0] Peripheral Output Function is Assigned to RP58 Output Pin bits

8.12.59 Peripheral Pin Select Output Register 14

Name: RPOR14

Offset: 0xD9C

Microchip dsPIC33CK1024MP708 - Peripheral Pin Select Output Register 14 - 1

text_image Bit 15 14 13 12 11 10 9 8 RP61R[5:0] Access R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 RP60R[5:0] Access R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0

Bits 13:8 – RP61R[5:0] Peripheral Output Function is Assigned to RP61 Output Pin bits
Bits 5:0 – RP60R[5:0] Peripheral Output Function is Assigned to RP60 Output Pin bits

8.12.60 Peripheral Pin Select Output Register 15

Name: RPOR15 Offset: 0xD9E

Microchip dsPIC33CK1024MP708 - Peripheral Pin Select Output Register 15 - 1

text_image Bit 15 14 13 12 11 10 9 8 RP63R[5:0] Access R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 RP62R[5:0] Access R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0

Bits 13:8 – RP63R[5:0] Peripheral Output Function is Assigned to RP63 Output Pin bits

Bits 5:0 – RP62R[5:0] Peripheral Output Function is Assigned to RP62 Output Pin bits

8.12.61 Peripheral Pin Select Output Register 16

Name: RPOR16 Offset: 0xDA0

Microchip dsPIC33CK1024MP708 - Peripheral Pin Select Output Register 16 - 1

text_image Bit 15 14 13 12 11 10 9 8 RP65R[5:0] Access R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 RP64R[5:0] Access R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0

Bits 13:8 – RP65R[5:0] Peripheral Output Function is Assigned to RP65 Output Pin bits

Bits 5:0 – RP64R[5:0] Peripheral Output Function is Assigned to RP64 Output Pin bits

8.12.62 Peripheral Pin Select Output Register 17

Name: RPOR17

Offset: 0xDA2

Microchip dsPIC33CK1024MP708 - Peripheral Pin Select Output Register 17 - 1

text_image Bit 15 14 13 12 11 10 9 8 RP67R[5:0] Access RW RW RW RW RW RW Reset 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 RP66R[5:0] Access RW RW RW RW RW RW Reset 0 0 0 0 0 0

Bits 13:8 – RP67R[5:0] Peripheral Output Function is Assigned to RP67 Output Pin bits
Bits 5:0 – RP66R[5:0] Peripheral Output Function is Assigned to RP66 Output Pin bits

8.12.63 Peripheral Pin Select Output Register 18

Name: RPOR18

Offset: 0xDA4

Microchip dsPIC33CK1024MP708 - Peripheral Pin Select Output Register 18 - 1

text_image Bit 15 14 13 12 11 10 9 8 RP69R[5:0] Access R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 RP68R[5:0] Access R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0

Bits 13:8 – RP69R[5:0] Peripheral Output Function is Assigned to RP69 Output Pin bits
Bits 5:0 – RP68R[5:0] Peripheral Output Function is Assigned to RP68 Output Pin bits

8.12.64 Peripheral Pin Select Output Register 19

Name: RPOR19

Offset: 0xDA6

Microchip dsPIC33CK1024MP708 - Peripheral Pin Select Output Register 19 - 1

text_image Bit 15 14 13 12 11 10 9 8 RP71R[5:0] Access R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 RP70R[5:0] Access R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0

Bits 13:8 – RP71R[5:0] Peripheral Output Function is Assigned to RP71 Output Pin bits
Bits 5:0 – RP70R[5:0] Peripheral Output Function is Assigned to RP70 Output Pin bits

8.12.65 Peripheral Pin Select Output Register 20

Name: RPOR20 Offset: 0xDA8

Note:

  1. These are virtual output ports.

Microchip dsPIC33CK1024MP708 - Note: - 1

text_image Bit 15 14 13 12 11 10 9 8 RP73R[5:0] Access R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 RP72R[5:0] Access R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0

Bits 13:8 – RP73R[5:0] Peripheral Output Function is Assigned to RP73 Output Pin bits ^(1)

Bits 5:0 – RP72R[5:0] Peripheral Output Function is Assigned to RP72 Output Pin bits ^(1)

8.12.66 Peripheral Pin Select Output Register 21

Name: RPOR21 Offset: 0xDAA

Note:

  1. These are virtual output ports.

Microchip dsPIC33CK1024MP708 - Note: - 1

text_image Bit 15 14 13 12 11 10 9 8 RP75R[5:0] Access R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 RP74R[5:0] Access R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0

Bits 13:8 – RP75R[5:0] Peripheral Output Function is Assigned to RP75 Output Pin bits ^(1)

Bits 5:0 – RP74R[5:0] Peripheral Output Function is Assigned to RP74 Output Pin bits ^(1)

8.12.67 Peripheral Pin Select Output Register 22

Name: RPOR22

Offset: 0xDAC

Note:

  1. These are virtual output ports.

Microchip dsPIC33CK1024MP708 - Note: - 1

text_image Bit 15 14 13 12 11 10 9 8 RP77R[5:0] Access R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 RP76R[5:0] Access R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0

Bits 13:8 – RP77R[5:0] Peripheral Output Function is Assigned to RP77 Output Pin bits ^(1)

Bits 5:0 – RP76R[5:0] Peripheral Output Function is Assigned to RP76 Output Pin bits ^(1)

8.12.68 Peripheral Pin Select Output Register 23

Name: RPOR23 Offset: 0xDAE

Microchip dsPIC33CK1024MP708 - Peripheral Pin Select Output Register 23 - 1

text_image Bit 15 14 13 12 11 10 9 8 RP79R[5:0] Access R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 RP78R[5:0] Access R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0

Bits 13:8 – RP79R[5:0] Peripheral Output Function is Assigned to RP79 Output Pin bits

Bits 5:0 – RP78R[5:0] Peripheral Output Function is Assigned to RP78 Output Pin bits

8.12.69 Peripheral Pin Select Output Register 24

Name: RPOR24

Offset: 0xDB0

Note:

  1. These are virtual output ports.

Microchip dsPIC33CK1024MP708 - Note: - 1

text_image Bit 15 14 13 12 11 10 9 8 RP81R[5:0] Access R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 RP80R[5:0] Access R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0

Bits 13:8 – RP81R[5:0] Peripheral Output Function is Assigned to RP81 Output Pin bits ^(1)

Bits 5:0 – RP80R[5:0] Peripheral Output Function is Assigned to RP80 Output Pin bits ^(1)

8.12.70 Peripheral Pin Select Output Register 25

Name: RPOR25

Offset: 0xDB2

Note:

  1. These are virtual output ports.

Microchip dsPIC33CK1024MP708 - Note: - 1

text_image Bit 15 14 13 12 11 10 9 8 RP83R[5:0] Access R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 RP82R[5:0] Access R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0

Bits 13:8 – RP83R[5:0] Peripheral Output Function is Assigned to RP83 Output Pin bits ^(1)

Bits 5:0 – RP82R[5:0] Peripheral Output Function is Assigned to RP82 Output Pin bits ^(1)

8.12.71 Peripheral Pin Select Output Register 26

Name: RPOR26

Offset: 0xDB4

Note:

  1. These are virtual output ports.

Microchip dsPIC33CK1024MP708 - Note: - 1

text_image Bit 15 14 13 12 11 10 9 8 RP85R[5:0] Access R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 RP84R[5:0] Access R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0

Bits 13:8 – RP85R[5:0] Peripheral Output Function is Assigned to RP85 Output Pin bits ^(1)

Bits 5:0 – RP84R[5:0] Peripheral Output Function is Assigned to RP84 Output Pin bits ^(1)

8.12.72 Peripheral Pin Select Output Register 27

Name: RPOR27

Offset: 0xDB6

Note:

  1. These are virtual output ports.

Microchip dsPIC33CK1024MP708 - Note: - 1

text_image Bit 15 14 13 12 11 10 9 8 RP87R[5:0] Access R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 RP86R[5:0] Access R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0

Bits 13:8 – RP87R[5:0] Peripheral Output Function is Assigned to RP87 Output Pin bits ^(1)

Bits 5:0 – RP86R[5:0] Peripheral Output Function is Assigned to RP86 Output Pin bits ^(1)

8.12.73 Peripheral Pin Select Output Register 28

Name: RPOR28

Offset: 0xDB8

Note:

  1. These are virtual output ports.

Microchip dsPIC33CK1024MP708 - Note: - 1

text_image Bit 15 14 13 12 11 10 9 8 RP89R[5:0] Access R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 RP88R[5:0] Access R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0

Bits 13:8 – RP89R[5:0] Peripheral Output Function is Assigned to RP89 Output Pin bits ^(1)

Bits 5:0 – RP88R[5:0] Peripheral Output Function is Assigned to RP88 Output Pin bits ^(1)

8.12.74 Peripheral Pin Select Output Register 29

Name: RPOR29

Offset: 0xDBA

Note:

  1. These are virtual output ports.

Microchip dsPIC33CK1024MP708 - Note: - 1

text_image Bit 15 14 13 12 11 10 9 8 RP91R[5:0] Access R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 RP90R[5:0] Access R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0

Bits 13:8 - RP91R[5:0] Peripheral Output Function is Assigned to RP91 Output Pin bits ^(1)
Bits 5:0 – RP90R[5:0] Peripheral Output Function is Assigned to RP90 Output Pin bits ^(1)

8.12.75 Peripheral Pin Select Output Register 30

Name: RPOR30 Offset: 0xDBC

Note:

  1. These are virtual output ports.

Microchip dsPIC33CK1024MP708 - Note: - 1

text_image Bit 15 14 13 12 11 10 9 8 RP93R[5:0] Access R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 RP92R[5:0] Access R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0

Bits 13:8 – RP93R[5:0] Peripheral Output Function is Assigned to RP93 Output Pin bits ^(1)

Bits 5:0 – RP92R[5:0] Peripheral Output Function is Assigned to RP92 Output Pin bits ^(1)

8.12.76 Peripheral Pin Select Output Register 31

Name: RPOR31

Offset: 0xDBE

Note:

  1. These are virtual output ports.

Microchip dsPIC33CK1024MP708 - Note: - 1

text_image Bit 15 14 13 12 11 10 9 8 RP95R[5:0] Access R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 RP94R[5:0] Access R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0

Bits 13:8 – RP95R[5:0] Peripheral Output Function is Assigned to RP95 Output Pin bits ^(1)

Bits 5:0 – RP94R[5:0] Peripheral Output Function is Assigned to RP94 Output Pin bits ^(1)

8.12.77 Peripheral Pin Select Output Register 32

Name: RPOR32

Offset: 0xDC0

Note:

  1. These are virtual output ports.

Microchip dsPIC33CK1024MP708 - Note: - 1

text_image Bit 15 14 13 12 11 10 9 8 RP97R[5:0] Access R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 RP96R[5:0] Access R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0

Bits 13:8 – RP97R[5:0] Peripheral Output Function is Assigned to RP97 Output Pin bits ^(1)
Bits 5:0 – RP96R[5:0] Peripheral Output Function is Assigned to RP96 Output Pin bits ^(1)

8.12.78 Peripheral Pin Select Output Register 33

Name: RPOR33

Offset: 0xDC2

Note:

  1. These are virtual output ports.

Microchip dsPIC33CK1024MP708 - Note: - 1

text_image Bit 15 14 13 12 11 10 9 8 RP99R[5:0] Access R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 RP98R[5:0] Access R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0

Bits 13:8 - RP99R[5:0] Peripheral Output Function is Assigned to RP99 Output Pin bits ^(1)

Bits 5:0 – RP98R[5:0] Peripheral Output Function is Assigned to RP98 Output Pin bits ^(1)

8.12.79 Peripheral Pin Select Output Register 34

Name: RPOR34

Offset: 0xDC4

Note:

  1. These are virtual output ports.

Microchip dsPIC33CK1024MP708 - Note: - 1

text_image Bit 15 14 13 12 11 10 9 8 RP177R[5:0] Access R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 RP176R[5:0] Access R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0

Bits 13:8 – RP177R[5:0] Peripheral Output Function is Assigned to RP177 Output Pin bits ^(1)

Bits 5:0 – RP176R[5:0] Peripheral Output Function is Assigned to RP176 Output Pin bits ^(1)

8.12.80 Peripheral Pin Select Output Register 35

Name: RPOR35

Offset: 0xDC6

Note:

  1. These are virtual output ports.

Microchip dsPIC33CK1024MP708 - Note: - 1

text_image Bit 15 14 13 12 11 10 9 8 RP179R[5:0] Access R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 RP178R[5:0] Access R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0

Bits 13:8 – RP179R[5:0] Peripheral Output Function is Assigned to RP179 Output Pin bits ^(1)

Bits 5:0 – RP178R[5:0] Peripheral Output Function is Assigned to RP178 Output Pin bits ^(1)

8.12.81 Peripheral Pin Select Output Register 36

Name: RPOR36

Offset: 0xDC8

Note:

  1. These are virtual output ports.

Microchip dsPIC33CK1024MP708 - Note: - 1

text_image Bit 15 14 13 12 11 10 9 8 RP181R[5:0] Access R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 RP180R[5:0] Access R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0

Bits 13:8 – RP181R[5:0] Peripheral Output Function is Assigned to RP181 Output Pin bits ^(1)

Bits 5:0 – RP180R[5:0] Peripheral Output Function is Assigned to RP180 Output Pin bits ^(1)

9. Oscillator with High-Frequency PLL

Note: This data sheet summarizes the features of the dsPIC33CK1024MP710 family of devices. It is not intended to be a comprehensive reference source. To complement the information in this data sheet, refer to “Oscillator Module with High-Speed PLL” (www.microchip.com/DS70005255).

The dsPIC33CK1024MP710 family oscillator with high-frequency PLL includes these characteristics:

  • On-Chip Phase-Locked Loop (PLL) to Boost
    Internal Operating Frequency on Select Internal and External Oscillator Sources
  • Auxiliary PLL (APLL) Clock Generator to Boost Operating Frequency for Peripherals
    • Doze mode for System Power Savings
  • Scalable Reference Clock Output (REFCLKO)
  • On-the-Fly Clock Switching between Various Clock Sources
  • Fail-Safe Clock Monitoring (FSCM) that Detects Clock Failure and Permits Safe Application Recovery or Shutdown

A block diagram of the dsPIC33CK1024MP710 oscillator system is shown in Figure 9-1.

Figure 9-1. dsPIC33CK1024MP710 Core Clock Sources Block Diagram
Microchip dsPIC33CK1024MP708 - Oscillator with High-Frequency PLL - 1

flowchart
graph TD
    A["TUN[5:0"]] --> B["BFRC 8 MHz"]
    A --> C["FRC 8 MHz"]
    A --> D["POSC"]
    A --> E["LPRC 32 kHz"]
    B --> F["BFCRCLK"]
    B --> G["FRCCLK"]
    C --> H["POSCCLK"]
    C --> I["LPRCCLK"]
    D --> J["OSCO"]
    D --> K["OSCI"]
    F --> L["Core Clock Selection and PLL/DIV Subsystem"]
    G --> L
    H --> L
    I --> L
    J --> L
    K --> L
    L --> M["FCY"]
    L --> N["FP"]
    L --> O["Fosc"]
    L --> P["VCO Outputs"]
    L --> Q["APLL and AVCO Outputs"]
    L --> R["REFCLKO"]

Figure 9-2. dsPIC33CK1024MP710 Oscillator Subsystem
Microchip dsPIC33CK1024MP708 - Oscillator with High-Frequency PLL - 2

flowchart
graph TD
    subgraph_PLL["PLL(1)"]
        FRCCLK --> S1["S1"]
        POSCCLK --> S3["S3"]
        FRCDIVN --> FRDIVN
    end

    subgraph_VCO["Division"]
        FVCO["Fnco"] --> FVCO2["Fvco/2(7)"]
        FVCO2 --> FVCO3["Fvco/3"]
        FVCO3 --> FVCO4["Fvco/4(6)"]
        FVCO4 --> FVCODIV["FCVCODIV[1:0"]]
        FVCO2 --> FVCODIV
        FVCODIV --> FVCODIV
    end

    subgraph VCO_Dividers
        FPLLO["FPLO(5,7)"] --> +2
        +2 --> POSCCLK["POSCLK"]
        +2 --> FPLLO2["FPLLO/2(4)"]
        +2 --> S1/S3["S1/S3"]
        +2 --> S0["S0"]
        +2 --> S7["S7"]
        +2 --> S6["S6"]
        +2 --> S5["S5"]
    end

    subgraph_DOZE["DOZE"]
        DOZE --> FcY["FcY"]
        DOZE --> FP["FP"]
        DOZE --> +2
        +2 --> Fosc["Fosc"]

    subgraph_Auxiliary_PLL["Auxiliary PLL"]
        REF1["REFI"] --> APLL["APLL"]
        FVCO4["FVCO/4"] --> APLL
        BFRC["BFRC"] --> APLL
        LPRC["LPRC(8)"] --> APLL
        FRC["FRC"] --> APLL
        POSC["POSC"] --> APLL
        FP["FP"] --> APLL
        FOSC["FOSC"] --> APLL
        APLL --> AFVCO3["AFVCO(3)"]
        AFVCO2["AFVCO/2(5,7)"] --> APLL
        AFVCO3["AFVCO/3"] --> APLL
        AFVCO4["AFVCO/4"] --> APLL
        AFVCO3 --> AFVCO1["AFVCO(6)"]
        AFVCO4 --> AFVCO2["AFVCO/2"]
        AFVCO3 --> AFVCO4["AFVCO/4"]
    end

    subgraph_CAN_Clock_Generation["CAN Clock Generation"]
        NoClock["No Clock"] --> Div["÷ N"]
        FVCO["FVCO"] --> Div
        FPLLO["FPLLO"] --> Div
        FVCO/2["FVCO/2"] --> Div
        FVCO/3["FVCO/3"] --> Div
        AFPLLO["AFPLLO"] --> Div
        AFVCO["AFVCO"] --> Div
        AFVCO/2["AFVCO/2"] --> Div
        AFVCO/3["AFVCO/3"] --> Div
        AFVCO/4["AFVCO/4"] --> Div
        AFVCO1["AFVCO/1"] --> Div
        AFVCO2["AFVCO/2"] --> Div
        AFVCO3["AFVCO/3"] --> Div
        AFVCO4["AFVCO/4"] --> Div
        AFVCO1 --> Div
        AFVCO2 --> Div
        AFVCO3 --> Div
        AFVCO4 --> Div
    end

    Note1["See Figure 9-3 for details of the PLL module"]
Note2["See Figure 9-3 for the source of FVCO"]
Note3["See Figure 9-3 for the source of AVCO"]
Note4["XTPLL, HSPLL, ECP LL, FRCPLL (FPLLO)"]
Note5["Clock option for PWM"]
Note6["Clock option for ADC"]
Note7["Clock option for DAC"]
Note8["The LPRC is disabled"]

    Note1 & Note2 & Note3 & Note4 & Note5 & Note6 & Note7 & Note8 & Note9 & Note10 & Note11 & Note12 & Note13 & Note14 & Note15 & Note16 & Note17 & Note18 & Note19 & Note20 & Note21 & Note22 & Note23 & Note24 & Note25 & Note26 & Note27 & Note28 & Note29 & Note30 & Note31 & Note32 & Note33 & Note34 & Note35 & Note36 & Note37 & Note38 & Note39 & Note40 & Note41 & Note42 & Note43 & Note44 & Note45 & Note46 & Note47 & Note48 & Note49 & Note50 & Note51 & Note52 & Note53 & Note54 & Note55 & Note56 & Note57 & Note58 & Note59 & Note60 & Note61 & Note62 & Note63 & Note64 & Note65 & Note66 & Note67 & Note68 & Note69 & Note70 & Note71 & Note72 & Note73 & Note74 & Note75 & Note76 & Note77 & Note78 & Note79 & Note80 & Note81 & Note82 & Note83 & Note84 & Note85 & Note86 & Note87 & Note88 & Note89 & Note90 & Note91 & Note92 & Note93 & Note94 & Note95 & Note96 & Note97 & Note98 & Note99
    end

    S6 --> Clock_Clock["Clock Clock"]
    SwitchFail["Switch Fail"]
    Reset["Reset"]

    Legend

9.1 Primary PLL

The Primary Oscillator and internal FRC Oscillator sources can optionally use an on-chip PLL to obtain higher operating speeds. Figure 9-3 illustrates a block diagram of the Primary PLL module.

For PLL operation, the following requirements must be met at all times without exception:

  • The PLL Input Frequency (F PLLI) must be in the range of 8 MHz to 64 MHz
  • The PFD Input Frequency (F PFD ) must be in the range of 8 MHz to (F VCO /16) MHz
    The VCO Output Frequency ( F_VCO ) must be in the range of 400 MHz to 1600 MHz

Figure 9-3. Primary Core PLL And VCO Detail
Microchip dsPIC33CK1024MP708 - Primary PLL - 1

flowchart
graph LR
    A["FRCCLK(4)"] --> B["S1"]
    C["POSCCLK"] --> D["S3"]
    B --> E["DIV 1-8"]
    D --> E
    E --> F["PFD"]
    F --> G["Lock Detect"]
    G --> H["VCO"]
    H --> I["DIV 1-7"]
    I --> J["DIV 1-7"]
    K["PLLPRE[3:0"]] --> E
    L["PLL Ready (LOCK)"] --> G
    M["POST1DIV[2:0"]] --> I
    N["POST2DIV[2:0"]] --> J
    O["Feedback Divider 16-200"] --> H
    P["VCO Divider"] --> I
    Q["FVCO"] --> I
    R["FVCO/2^(3)"] --> I
    S["FVCO/3"] --> I
    T["FVCO/4^(2)"] --> I
    U["FVCODIV"] --> J
    V["FVCODIV[1:0"]] --> J

Note 1: Clock option for PWM.

2: Clock option for ADC.
3: Clock option for DAC.
4: PLL source is always FRC unless FNOSC is the Primary Oscillator with PLL.

Equation 9-1 provides the relationship between the PLL Input Frequency ( F_PLLI ) and VCO Output Frequency ( F_VCO ).

Equation 9-1. Primary Core F_VCO Calculation

$$ F V C O = F P L L I \times \left(\frac {M}{N 1}\right) = F P L L I \times \left(\frac {P L L F B D I V [ 7 : 0 ]}{P L L P R E [ 3 : 0 ]}\right) $$

Equation 9-2 provides the relationship between the PLL Input Frequency ( F_PLLI ) and PLL Output Frequency ( F_PLLO ).

Equation 9-2. Primary Core F_PLLO Calculation

$$ F P L L O = F P L L I \times \left(\frac {M}{N 1 \times N 2 \times N 3}\right) = F P L L I \times \left(\frac {P L L F B D I V [ 7 : 0 ]}{P L L P R E [ 3 : 0 ] \times P O S T 1 D I V [ 2 : 0 ] \times P O S T 2 D I V [ 2 : 0 ]}\right) $$

Where:

M = PLLFBDIV[7:0] N1 = PLLPRE[3:0] N2 = POST1DIV[2:0] N3 = POST2DIV[2:0]

Note: The PLL Phase Detector Input Divider Select (PLLPREx) bits and the PLL Feedback Divider (PLLFBDIVx) bits should not be changed when operating in PLL mode. Therefore, the user must start on either a non-PLL source or clock switch to a non-PLL source (e.g., internal FRC Oscillator) to make any necessary changes and then clock switch to the desired PLL source.

Using Two-Speed Start-up (IESO (FOSCSEL[7])) with a PLL source will start the device on the FRC while preparing the PLL. Once the PLL is ready, the device will switch automatically to the new source. This mode should not be used if changes are needed to the PLLPREx and PLLFBDIVx bits because the PLL may be running before user code execution begins.

It is not permitted to directly clock switch from one PLL clock source to a different PLL clock source. The user would need to transition between PLL clock sources with a clock switch to a non-PLL clock source.

Example 9-1. Code for Using Primary PLL with 8 MHz Internal FRC

//code example for 50 MIPS system clock using 8MHz FRC
// Select Internal FRC at POR
_FOSCSEL(FNOSC_FRC & IESO_OFF);
// Enable Clock Switching
_FOSC(FCKSM_CSECMD);
int main()
{
    // Configure PLL prescaler, both PLL postscalers, and PLL feedback divider
    CLKDIVbits.PLLPRE = 1;    // N1=1
    PLLFBDbits.PLLFBDIV = 125;    // M = 125
    PLLDIVbits.POST1DIV = 5;    // N2=5
    PLLDIVbits.POST2DIV = 1;    // N3=1
    // Initiate Clock Switch to FRC with PLL (NOSC=0b001)
__builtin_write_OSCCONH(0x01);
__builtin_write_OSCCONL(OSCCON | 0x01);
// Wait for Clock switch to occur
while (OSCCONbits.OSWEN!= 0);
} 

Note: F_PLLO = F_PLLI * M/(N1 * N2 * N3) ; F_PLLI = 8 ; M = 125; N1 = 1; N2 = 5; N3 = 1; so F_PLLO = 8 * 125/(1 * 5 * 1) = 200 MHz or 50 MIPS.

9.2 Auxiliary PLL

The dsPIC33CK1024MP710 device family implements an Auxiliary PLL (APLL) module for each core present. The APLL is used to generate various peripheral clock sources independent of the system clock. Figure 9-4 shows a block diagram of the Auxiliary Core APLL module.

For APLL operation, the following requirements must be met at all times without exception:

• The APLL Input Frequency (AF PLLI) must be in the range of 8 MHz to 64 MHz
- The APFD Input Frequency (AF PFD ) must be in the range of 8 MHz to (AF VCO /16) MHz
• The AVCO Output Frequency (AF _VCO ) must be in the range of 400 MHz to 1600 MHz

Figure 9-4. Auxiliary Core APLL and VCO Detail
Microchip dsPIC33CK1024MP708 - Auxiliary PLL - 1

flowchart
graph TD
    A["FRCCLK"] --> B["DIV 1-8"]
    C["POSCCLK"] --> D["DIV 1-8"]
    B --> E["APFD"]
    D --> E
    E --> F["Lock Detect"]
    F --> G["AVCO"]
    G --> H["DIV 1-7"]
    H --> I["DIV 1-7"]
    I --> J["0"]
    K["APLLPRE[3:0"]] --> B
    L["APLL Ready (APLLCLK)"] --> F
    M["APOST1DIV[2:0"]] --> H
    N["APOST2DIV[2:0"]] --> I
    O["APLLEN"] --> J
    P["AFPLLO(1,3)"] --> J
    Q["Feedback Divider 16-200"] --> R["AVCO Divider"]
    R --> S["AFVco"]
    T["APLLFBDIV[7:0"]] --> R
    U["AVCODIV[1:0"]] --> V["AFVcodiv(2)"]
    W["AFVco/2(1,3)"] --> V
    X["AFVco/3"] --> V
    Y["AFVco/4"] --> V

Notes:

  1. Clock option for PWM.
  2. Clock option for ADC.
  3. Clock option for DAC.

Equation 9-3 provides the relationship between the APLL Input Frequency (AF PLLI ) and the AVCO Output Frequency (AF VCO ).

Equation 9-3. Auxiliary Core AF_VCO Calculation

$$ F V C O = F P L L I \times \left(\frac {M}{N 1}\right) = F P L L I \times \left(\frac {P L L F B D I V [ 7 : 0 ]}{P L L P R E [ 3 : 0 ]}\right) $$

Equation 9-4 provides the relationship between the APLL Input Frequency (AF PLLI ) and APLL Output Frequency (AF PLLO ).

Equation 9-4. Auxiliary Core AF_PLLO Calculation

$$ A F P L L O = A F P L L I \times \left(\frac {M}{N 1 \times N 2 \times N 3}\right) = A F P L L I \times \left(\frac {A P L L F B D I V [ 7 : 0 ]}{A P L L P R E [ 3 : 0 ] \times A P O S T 1 D I V [ 2 : 0 ] \times A P O S T 2 D I V [ 2 : 0 ]}\right) $$

Where:

$$ M = \text { A P L L F B D I V } [ 7: 0 ] $$

$$ N 1 = \text { A P L L P R E } [ 3: 0 ] $$

N2 = APOST1DIV[2:0]

N3 = APOST2DIV[2:0]

dsPIC33CK1024MP710 Family Oscillator with High-Frequency PLL

Example 9-2. Code for Using Auxiliary PLL with the Internal FRC Oscillator

//code example for AFVCO = 1 GHz and AFPLLO = 500 MHz using 8 MHz internal FRC
// Configure the source clock for the APLL
ACLKCON1bits.FRCSEL = 1; // Select internal FRC as the clock source
// Configure the APLL prescaler, APLL feedback divider, and both APLL postscalers.
ACLKCON1bits.APLLPRE = 1; // N1 = 1
APLLFBD1bits.APLLFBDIV = 125; // M = 125
APLLDIV1bits.APOST1DIV = 2; // N2 = 2
APLLDIV1bits.APOST2DIV = 1; // N3 = 1
// Enable APLL
ACLKCON1bits.APLLEN = 1; 

Note: Even with the APLLEN bit set, another peripheral must generate a clock request before the APLL will start.

9.3 CPU Clocking

The dsPIC33CK1024MP710 devices can be configured to use any of the following clock configurations:

• Primary Oscillator (POSC) on the OSCI and OSCO pins
- Internal Fast RC (FRC) Oscillator with optional clock divider
- Internal Low-Power RC Oscillator
• Primary Oscillator with PLL (ECPLL, HSPLL, XTPLL)
- Internal Fast RC Oscillator with PLL (FRCPLL)
- Backup Internal Fast RC Oscillator (BFRC)

The system clock source is divided by two to produce the internal instruction cycle clock. In this document, the instruction cycle clock is denoted by F_CY . The timing diagram in Figure 9-5 illustrates the relationship between the system clock ( F_OSC ), the instruction cycle clock ( F_CY ) and the Program Counter (PC).

The internal instruction cycle clock ( F_CY ) can be output on the OSCO I/O pin if the Primary Oscillator mode (POSCMD[1:0]) is not configured as HS/XT. For more information, see 9. Oscillator with High-Frequency PLL.

Figure 9-5. Clock and Instruction Cycle Timing
Microchip dsPIC33CK1024MP708 - CPU Clocking - 1

text_image Fosc FCY PC TCY PC + 2 PC + 4 Fetch INST (PC) Execute INST (PC - 2) Fetch INST (PC + 2) Execute INST (PC) Fetch INST (PC + 4) Execute INST (PC + 2)

9.4 Primary Oscillator (POSC)

The dsPIC33CK1024MP710 family devices contain one instance of the Primary Oscillator (POSC). The Primary Oscillator is available on the OSCI and OSCO pins of the dsPIC33CK devices. This connection enables an external crystal (or ceramic resonator) to provide the clock to the device. The Primary Oscillator provides three modes of operation:

• Medium Speed Oscillator (XT Mode):
The XT mode is a Medium Gain, Medium Frequency mode used to work with crystal frequencies of 3.5 MHz to 10 MHz.

- High-Speed Oscillator (HS Mode): The HS mode is a High-Gain, High-Frequency mode used to work with crystal frequencies of 10 MHz to 32 MHz.

- External Clock Source Operation (EC Mode): If the on-chip oscillator is not used, the EC mode allows the internal oscillator to be bypassed. The device clocks are generated from an external source (0 MHz to up to 64 MHz) and input on the OSCI pin.

Example 9-3 illustrates code for using the PLL (50 MIPS) with the Primary Oscillator.

Example 9-3. Code for Using PLL (50 MIPS) with Primary Oscillator (POSC)

//code example for 50 MIPS system clock using POSC with 10 MHz external crystal
// Select FRC on POR
#pragma config FNOSC = FRC // Oscillator Source Selection (Internal Fast RC (FRC))
#pragma config IESO = OFF
/// Enable Clock Switching and Configure POSC in XT mode
#pragma config POSCMD = XT
#pragma config FCKSM = CSECMD
int main()
{
    // Configure PLL prescaler, both PLL postscalers, and PLL feedback divider
    CLKDIVbits.PLLPRE = 1;    // N1=1
    PLLFBDDbits.PLLFBDIV = 100;    // M = 100
    PLLDIVbits.POST1DIV = 5;    // N2=5
    PLLDIVbits.POST2DIV = 1;    // N3=1
    // Initiate Clock Switch to Primary Oscillator with PLL (NOSC=0b011)
    __builtin_write_OSCCONH(0x03);
    __builtin_write_OSCCONL(OSCCON | 0x01);
    // Wait for Clock switch to occur
    while (OSCCONbits.OSWEN!= 0);
    // Wait for PLL to lock
    while (OSCCONbits.LOCK!= 1);
} 

9.4.1 Primary Oscillator Pin Functionality

The Primary Oscillator pins (OSCI and OSCO) can be used for other functions when the Primary Oscillator is not being used. The POSCMD[1:0] Configuration bits in the Oscillator Configuration register (FOSC[1:0]) determine the oscillator pin function. The OSCIOFNC bit (FOSC[2]) determines the OSCO/CLKO pin function. By default, the CLKO function is active and the pin will output a clock frequency of F_CY . A clock signal is present on the OSCO/CLKO pin when device is unprogrammed or during the programming sequence. Care should be taken when the OSCO/CLKO pin is used to drive other circuitry.

9.5 Internal Fast RC (FRC) Oscillator

The dsPIC33CK1024MP710 family devices contain one instance of the internal Fast RC (FRC) Oscillator. The FRC Oscillator provides a nominal 8 MHz clock without requiring an external crystal or ceramic resonator, which results in system cost savings for applications that do not require a precise clock reference.

The application software can tune the frequency of the oscillator using the FRC Oscillator Tuning bits (TUN[5:0]) in the FRC Oscillator Tuning register (OSCTUN[5:0]).

9.6 Low-Power RC Oscillator

The dsPIC33CK1024MP710 family devices contain one instance of the Low-Power RC (LPRC) Oscillator, which provides a nominal clock frequency of 32.768 kHz. The dsPIC33CK1024MP710 family devices implement the LPRC function with the BFRC and post-divider to yield a 50% duty cycle output.

The LPRC is the clock source for the Watchdog Timer (WDT) and Fail-Safe Clock Monitor (FSCM) circuits in the clock subsystem. The LPRC Oscillator is shut off in Sleep mode.

The LPRC Oscillator remains enabled under these conditions:

  • The FSCM is enabled
    • The WDT is enabled
  • The LPRC Oscillator is selected as the system clock

9.7 Backup Internal Fast RC (BFRC) Oscillator

The oscillator block provides a stable reference clock source for the Fail-Safe Clock Monitor (FSCM). When FSCM is enabled in the FCKSM[1:0] Configuration bits (FOSC[7:6]), it constantly monitors the main clock source against a reference signal from the 8 MHz Backup Internal Fast RC (BFRC) Oscillator. In case of a clock failure, the Fail-Safe Clock Monitor switches the clock to the BFRC Oscillator, allowing for continued low-speed operation or a safe application shutdown.

9.8 Reference Clock Output

In addition to the CLKO output ( F_OSC/2 ), the dsPIC33CK1024MP710 family devices can be configured to provide a reference clock output signal to a port pin. This feature is available in all oscillator configurations and allows the user to select a greater range of clock submultiples to drive external devices in the application. CLKO is enabled by Configuration bit, OSCIOFNC, and is independent of the REFCLKO reference clock. REFCLKO is mappable to any I/O pin that has mapped output capability. The reference clock output module block diagram is shown in Figure 9-6.

Figure 9-6. Reference Clock Generator
Microchip dsPIC33CK1024MP708 - Reference Clock Output - 1

flowchart
graph LR
    A["REFOI (PPS) Pin"] --> B["1000"]
    C["Fvco/4"] --> D["0110"]
    E["BFRC"] --> F["0101"]
    G["LPRC"] --> H["0100"]
    I["FRC"] --> J["0011"]
    K["POSC"] --> L["0010"]
    M["Peripheral Clock (Fp)"] --> N["0001"]
    O["System Clock (FOSC)"] --> P["0000"]
    Q["ROSEL[3:0"]] --> R["Divider"]
    S["ROTRIM[8:0"]] --> R
    T["RODIV[14:0"]] --> R
    U["ROOUT"] --> V["REFCLKO (PPS)"]
    W["To SPI, CCP, CLC"] --> X

This reference clock output is controlled by the REFOCONL and REFOCONH registers. Setting the ROEN bit (REFOCONL[15]) makes the clock signal available on the REFCLKO pin. The RODIV[14:0] bits (REFOCONH[14:0]) and ROTRIM[8:0] bits (REFOTRIM[15:7]) enable the selection of different clock divider options. The formula for determining the final frequency output is shown in Equation 9-5. The ROSWEN bit (REFOCONL[9]) indicates that

the clock divider has been successfully switched. In order to switch the REFCLKO divider, the user should ensure that this bit reads as '0'. Write the updated values to the RODIV[14:0] or ROTRIM[8:0] bits, set the ROSWEN bit and then wait until it is cleared before assuming that the REFCLKO clock is valid.

Equation 9-5. Calculating Frequency Output

$$ F _ {R E F O U T} = \frac {F _ {R E F I N}}{2 \cdot (R O D I V [ 1 4 : 0 ] + R O T R I M [ 8 : 0 ] / 5 1 2)} $$

Where: FREFOUT = Output Frequency FREFIN = Input Frequency When RODIV[14:0] = 0, the output clock is the same as the input clock.

The ROSEL[3:0] bits (REFOCONL[3:0]) determine which clock source is used for the reference clock output. The ROSLP bit (REFOCONL[11]) determines if the reference source is available on REFCLKO when the device is in Sleep mode.

To use the reference clock output in Sleep mode, both the ROSLP bit must be set and the clock selected by the ROSEL[3:0] bits must be enabled for operation during Sleep mode, if possible. Clearing the ROSEL[3:0] bits allows the reference output frequency to change, as the system clock changes during any clock switches. The ROOUT bit enables/disables the reference clock output on the REFCLKO pin.

The ROACTIV bit (REFOCONL[8]) indicates that the module is active; it can be cleared by disabling the module (setting ROEN to '0'). The user must not change the reference clock source, or adjust the divider when the ROACTIV bit indicates that the module is active. To avoid glitches, the user should not disable the module until the ROACTIV bit is '1'.

9.9 Oscillator Configuration

The oscillator system has both Configuration registers and SFRs to configure, control and monitor the system. The FOSCSEL and FOSC Configuration registers (FOSCSEL and FOSC, respectively) are used for initial setup.

Table 9-1 lists the configuration settings that select the device's oscillator source and operating mode at a Power-on Reset (POR).
Table 9-1. Configuration Bit Values for Clock Selection

Oscillator SourceOscillator ModeFNOSC[2:0] ValuePOSCMD[1:0] ValueNotes
S0 Fast RC Oscillator (FRC)000 xxNote 1
S1 Fast RC Oscillator with PLL (FRCPLL)001 xxNote 1
S2 Primary Oscillator (EC)010 00Note 1
S2 Primary Oscillator (XT)010 01
S2 Primary Oscillator (HS)010 10
S3 Primary Oscillator with PLL (ECPLL)011 00Note 1
S3 Primary Oscillator with PLL (XTPLL)011 01
S3 Primary Oscillator with PLL (HSPLL)011 10
S4 Reserved100 xx
Notes:1. The OSCO pin function is determined by the OSCIOFNC Configuration bit.2. This is the default oscillator mode for an unprogrammed (erased) device.
S5 Low-Power RC Oscillator (LPRC)101 xxNote 1
S6 Backup FRC (BFRC)110 xxNote 1
S7 Fast RC Oscillator with ÷ N Divider (FRCDIVN)111 xxNote 1, Note 2

Notes:

  1. The OSCO pin function is determined by the OSCIOFNC Configuration bit.
  2. This is the default oscillator mode for an unprogrammed (erased) device.

9.10 OSCCON Unlock Sequence

The OSCCON register is protected against unintended writes through a lock mechanism. The upper and lower bytes of OSCCON have their own unlock sequence, and both must be used when writing to both bytes of the register.

Before OSCCON can be written to, the following unlock sequence must be used:

  1. Execute the unlock sequence for the OSCCON high byte. In two back-to-back instructions:

  2. Write 0x78 to OSCCON[15:8]

  3. Write 0x9A to OSCCON[15:8]

  4. In the instruction immediately following the unlock sequence, the OSCCON[15:8] bits can be modified.

  5. Execute the unlock sequence for the OSCCON low byte. In two back-to-back instructions:

  6. Write 0x46 to OSCCON[7:0]

  7. Write 0x57 to OSCCON[7:0]

  8. In the instruction immediately following the unlock sequence, the OSCCON[7:0] bits can be modified.

Note: MPLAB ^ XC16 provides a built-in C language function, including the unlocking sequence to modify high and low bytes in the OSCCON register:

__builtin_write_OSCCONH(value)
__builtin_write_OSCCONL(value) 

9.11 Oscillator Control Registers

OffsetNameBit Pos. 7 6 54 3 2 1 0
0x0F84OSCCON(1)15:8COSC[2:0]NOSC[2:0]
7:0CLKLOCKLOCKCFOSWEN
0x0F86CLKDIV15:8ROIDOZE[2:0]DOZENFRCDIV[2:0]
7:0Reserved[1:0]PLLPRE[3:0]
0x0F88PLLFBD15:8Reserved[3:0]
7:0PLLFBDIV[7:0]
0x0F8APLLDIV15:8VCODIV[1:0]
7:0POST1DIV[2:0]POST2DIV[2:0]
0x0F8COSCTUN15:8
7:0TUN[5:0]
0x0F8EACLKCON115:8APLLENAPLLCKFRCSEL
7:0Reserved[1:0]APLLPRE[3:0]
0x0F90APLLFBD115:8Reserved[3:0]
7:0APLLFBDIV[7:0]
0x0F92APLLDIV115:8AVCODIV[1:0]
7:0APOST1DIV[2:0]APOST2DIV[2:0]
0x0F94...0x0F99Reserved
0x0F9ACANCLKCON15:8CANCLKENCANCLKSEL[3:0]
7:0CANCLKDIV[6:0]
0x0F9C...0x0FB7Reserved
0x0FB8REFOCONL15:8ROENROSIDLROOUTROSLPROSWENROACTIV
7:0ROSEL[3:0]
0x0FBAREFOCONH15:8RODIV[14:8]
7:0RODIV[7:0]
0x0FBC...0x0FBDReserved
0x0FBEREFOTRIMH15:8ROTRIM[8:0]
7:0ROTRIM[8:0]

9.11.1 Oscillator Control Register

Name: OSCCON (1)

Offset: 0xF84

Notes:

  1. Writes to this register require an unlock sequence.
  2. Direct clock switches between any Primary Oscillator mode with PLL and FRCPLL mode are not permitted. This applies to clock switches in either direction. In these instances, the application must switch to FRC mode as a transitional clock source between the two PLL modes.
  3. This bit should only be cleared in software.

Legend: y = Value set from Configuration bits on POR

Bit 15 14 13 12 11 10 9 8

COSC[2:0]NOSC[2:0]
AccessRRR/WR/WR/W
Reset000y y y

Bit 76543210

CLKLOCKLOCKCFOSWEN
AccessR/W RRR/W
Reset0000

Bits 14:12 - COSC[2:0] Current Oscillator Selection bits (read-only)

ValueDescription
111Fast RC Oscillator (FRC) with Divide-by-n (FRCDIVN)
110Backup FRC (BFRC)
101Low-Power RC Oscillator (LPRC)
100Reserved – default to FRC
011Primary Oscillator (XT, HS, EC) with PLL (XTPLL, HSPLL, ECPLL)
010Primary Oscillator (XT, HS, EC)
001Fast RC Oscillator (FRC) with PLL (FRCPLL)
000Fast RC Oscillator (FRC)

Bits 10:8 – NOSC[2:0] New Oscillator Selection bits ^(2)

ValueDescription
111Fast RC Oscillator (FRC) with Divide-by-n (FRCDIVN)
110Backup FRC (BFRC)
101Low-Power RC Oscillator (LPRC)
100Reserved – default to FRC
011Primary Oscillator (XT, HS, EC) with PLL (XTPLL, HSPLL, ECPLL)
010Primary Oscillator (XT, HS, EC)
001Fast RC Oscillator (FRC) with PLL (FRCPLL)
000Fast RC Oscillator (FRC)

Bit 7 – CLKLOCK Clock Lock Enable bit

ValueDescription
1If (FCKSM0 = 1), then clock and PLL configurations are locked; if (FCKSM0 = 0), then clock and PLL configurations may be modified
0Clock and PLL selections are not locked, configurations may be modified

Bit 5 – LOCK PLL Lock Status bit (read-only)

ValueDescription
1Indicates that PLL is in lock or PLL start-up timer is satisfied

Value Description

0Indicates that PLL is out of lock, start-up timer is in progress or PLL is disabled

Bit 3 – CF Clock Fail Detect bit ^(3)

Value Description
1FSCM has detected a clock failure
0FSCM has not detected a clock failure

Bit 0 – OSWEN Oscillator Switch Enable bit

Value Description
1Requests oscillator switch to the selection specified by the NOSC[2:0] bits
0Oscillator switch is complete

9.11.2 Clock Divider Register

Name: CLKDIV

Offset: 0xF86

Notes:

  1. The DOZE[2:0] bits can only be written to when the DOZEN bit is clear. If DOZEN = 1, any writes to DOZE[2:0] are ignored.
  2. This bit is cleared when the ROI bit is set and an interrupt occurs.
  3. The DOZEN bit cannot be set if DOZE[2:0] = 000. If DOZE[2:0] = 000, any attempt by user software to set the DOZEN bit is ignored.
  4. PLLPRE[3:0] may be updated while the PLL is operating, but the VCO may overshoot.

Legend: r = Reserved bit

Bit 15 14 13 12 11 10 9 8

ROI DOZE[2:0] DOZEN FRCDIV[2:0]
AccessR/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 1 1 0 0 0 0
Bit7 6 5 4 3 2 1 0
Reserved[1:0]PLLPRE[3:0]
Accessr rR/W R/W R/W R/W
Reset0 0 0 0 0 1

Bit 15 - ROI Recover on Interrupt bit

ValueDescription
1Interrupts will clear the DOZEN bit and the processor clock, and the peripheral clock ratio is set to 1:1
0Interrupts have no effect on the DOZEN bit

Bits 14:12 - DOZE[2:0] Processor Clock Reduction Select bits ^(1)

ValueDescription
111 F_P divided by 128
110 F_P divided by 64
101 F_P divided by 32
100 F_P divided by 16
011 F_P divided by 8 (default)
010 F_P divided by 4
001 F_P divided by 2
000 F_P divided by 1

Bit 11 - DOZEN Doze Mode Enable bit ^(2,3)

ValueDescription
1DOZE[2:0] field specifies the ratio between the peripheral clocks and the processor clocks
0Processor clock and peripheral clock ratio is forced to 1:1

Bits 10:8 – FRCDIV[2:0] Internal Fast RC Oscillator Postscaler bits

ValueDescription
111FRC divided by 256
110FRC divided by 64
101FRC divided by 32
100FRC divided by 16
011FRC divided by 8
010FRC divided by 4
Value Description
001FRC divided by 2
000FRC divided by 1 (default)

Bits 5:4 – Reserved[1:0] Read as '0'

Bits 3:0 – PLLPRE[3:0] PLL Phase Detector Input Divider Select bits ^(4) (also denoted as 'N1', PLL prescaler)

Value Description
1111Reserved
...
1001Reserved
1000Input divided by 8
0111Input divided by 7
0110Input divided by 6
0101Input divided by 5
0100Input divided by 4
0011Input divided by 3
0010Input divided by 2
0001Input divided by 1 (power-on default selection)
0000Reserved

9.11.3 PLL Feedback Divider Register

Name: PLLFBD

Offset: 0xF88

Note:

  1. The allowed range is 16-200 (decimal). The rest of the values are reserved and should be avoided. The power on the default feedback divider is 150 (decimal) with an 8 MHz FRC input clock. The VCO frequency is 1.2 GHz.

Legend: r = Reserved bit

Bit 15 14 13 12 11 10 9 8

Reserved[3:0]
Accessrrrr
Reset 0 0 0 0
Bit 7 6 5 4 3 2 1 0
PLLFBDIV[7:0]
AccessR/WR/WR/WR/WR/WR/WR/WR/W
Reset 1 0 0 1 0 1 1 0

Bits 11:8 – Reserved[3:0] Maintain as '0'

Bits 7:0 – PLLFBDIV[7:0] PLL Feedback Divider bits (also denoted as 'M', PLL multiplier)

ValueDescription
11111111Reserved
...
11001000200 Maximum ^(1)
...
10010110150 (default)
00000001Reserved
00000000Reserved

9.11.4 FRC Oscillator Tuning Register

Name: OSCTUN

Offset: 0xF8C

Microchip dsPIC33CK1024MP708 - FRC Oscillator Tuning Register - 1

text_image Bit 15 14 13 12 11 10 9 8 Access Reset Bit 7 6 5 4 3 2 1 0 TUN[5:0] Access R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0

Bits 5:0 – TUN[5:0] FRC Oscillator Tuning bits

ValueDescription
011111Maximum frequency deviation of 1.74% (MHz)
011110Center frequency + 1.693% (MHz)
...
000001Center frequency + 0.047% (MHz)
000000Center frequency (8.00 MHz nominal)
111111Center frequency – 0.047% (MHz)
...
100001Center frequency – 1.693% (MHz)
100000Minimum frequency deviation of -1.74% (MHz)

9.11.5 PLL Output Divider Register

Name: PLLDIV

Offset: 0xF8A

Notes:

  1. The POST1DIVx and POST2DIVx divider values must not be changed while the PLL is operating.

  2. The default values for POST1DIVx and POST2DIVx are 4 and 1, respectively, yielding a 150 MHz system source clock.

Bit 15 14 13 12 11 10 9 8

VCODIV[1:0]
Access Reset 0 0R/W R/W

Bit 76543210

POST1DIV[2:0]POST2DIV[2:0]
AccessR/W R/W R/WR/W R/W R/W
Reset0 0 00 0 0

Bits 9:8 – VCODIV[1:0] PLL VCO Output Divider Select bits

ValueDescription
11Fvco
10Fvco/2
01Fvco/3
00Fvco/4

Bits 6:4 – POST1DIV[2:0] PLL Output Divider #1 Ratio bits ^(1,2)

POST1DIV[2:0] can have a valid value, from 1 to 7 (POST1DIVx value should be greater than or equal to the POST2DIVx value). The POST1DIVx divider is designed to operate at higher clock rates than the POST2DIVx divider.

Bits 2:0 - POST2DIV[2:0] PLL Output Divider #2 Ratio bits ^(1,2)

POST2DIV[2:0] can have a valid value, from 1 to 7 (POST1DIVx value should be greater than or equal to the POST2DIVx value). The POST1DIVx divider is designed to operate at higher clock rates than the POST2DIVx divider.

9.11.6 Auxiliary Clock Control Register

Name: ACLKCON1

Offset: 0xF8E

Note:

  1. Even with the APLLEN bit set, another peripheral must generate a clock request before the APLL will start.

Legend: r = Reserved bit

Bit 15 14 13 12 11 10 9 8

APLLEN APLLCKFRCSEL
AccessR/W R/WR/W
Reset0 00

Bit 76543210

Reserved[1:0]APLLPRE[3:0]
AccessrrR/W R/W R/W R/W
Reset0 0 0 0 0 0

Bit 15 - APLLEN Auxiliary PLL Enable/Bypass Select bit ^(1)

ValueDescription
1 AF_PLLO is connected to APLL post-divider output (bypass is disabled)
0 AF_PLLO is connected to APLL input clock (bypass is enabled)

Bit 14 - APLLCK APLL Phase-Locked State Status bit

ValueDescription
1Auxiliary PLL is in lock
0Auxiliary PLL is not in lock

Bit 8 – FRCSEL FRC Clock Source Select bit

Bits 5:4 – Reserved[1:0] Read as '0'

Bits 3:0 – APLLPRE[3:0] Auxiliary PLL Phase Detector Input Divider bits

ValueDescription
1111Reserved
...
1001Reserved
1000Input divided by 8
0111Input divided by 7
0110Input divided by 6
0101Input divided by 5
0100Input divided by 4
0011Input divided by 3
0010Input divided by 2
0001Input divided by 1 (power-on default selection)
0000Reserved

9.11.7 APLL Feedback Divider Register

Name: APLLFBD1

Offset: 0xF90

Note:

  1. The allowed range is 16-200 (decimal). The rest of the values are reserved and should be avoided. The power-on default feedback divider is 150 (decimal) with an 8 MHz FRC input clock; the VCO frequency is 1.2 GHz.

Legend: r = Reserved bit

Bit 15 14 13 12 11 10 9 8

Reserved[3:0]
Accessrrrr
Reset 0 0 0 0

Bit 76543210

APLLFBDIV[7:0]
AccessR/WR/WR/WR/WR/WR/WR/WR/W
Reset1 0 0 1 0 1 1 0

Bits 11:8 – Reserved[3:0] Maintain as '0'

Bits 7:0 – APLLFBDIV[7:0] APLL Feedback Divider bits

ValueDescription
11111111Reserved
. . .
11001000200 maximum^(1)
. . .
10010110150 (default)
. . .
0001000016 minimum^(1)
. . .
00000010Reserved
00000001Reserved
00000000Reserved

9.11.8 APLL Output Divider Register

Name: APLLDIV1

Offset: 0xF92

Notes:

  1. The APOST1DIVx and APOST2DIVx values must not be changed while the PLL is operating.

  2. The default values for APOST1DIVx and APOST2DIVx are 4 and 1, respectively, yielding a 150 MHz system source clock.

Bit 15 14 13 12 11 10 9 8

AVCODIV[1:0]
Access Reset 0 0R/W R/W

Bit 76543210

APOST1DIV[2:0]APOST2DIV[2:0]
AccessR/W R/W R/WR/W R/W R/W
Reset1 0 00 0 1

Bits 9:8 – AVCODIV[1:0] APLL VCO Output Divider Select bits

ValueDescription
11 AF_VCO
10 AF_VCO/2
01 AF_VCO/3
00 AF_VCO/4

Bits 6:4 – APOST1DIV[2:0] APLL Output Divider #1 Ratio bits ^(1,2)

APOST1DIV[2:0] can have a valid value, from 1 to 7 (the APOST1DIVx value should be greater than or equal to the APOST2DIVx value). The APOST1DIVx divider is designed to operate at higher clock rates than the APOST2DIVx divider.

Bits 2:0 – APOST2DIV[2:0] APLL Output Divider #2 Ratio bits ^(1,2)

APOST2DIV[2:0] can have a valid value, from 1 to 7 (the APOST2DIVx value should be less than or equal to the APOST1DIVx value). The APOST1DIVx divider is designed to operate at higher clock rates than the APOST2DIVx divider.

9.11.9 CAN Clock Control Register

Name: CANCLKCON

Offset: 0xF9A

Notes:

  1. The user must ensure the input clock source is 640 MHz or less. Operation with input reference frequency above 640 MHz will result in unpredictable behavior.

  2. The CANCLKDIVx divider value must not be changed during CAN module operation.

  3. The user must ensure the maximum clock output frequency of the divider is 80 MHz or less.

Bit 15 14 13 12 11 10 9 8

CANCLKENCANCLKSEL[3:0]
AccessR/W R/WR/WR/WR/W
Reset00 0 0 0
Bit7 6 5 4 3 2 1 0
CANCLKDIV[6:0]
AccessR/WR/WR/WR/WR/WR/WR/W
Reset0 0 0 0 0 0

Bit 15 - CANCLKEN Enables the CAN Clock Generator bit

ValueDescription
1CAN clock generation circuitry is enabled
0CAN clock generation circuitry is disabled

Bits 11:8 - CANCLKSEL[3:0] CAN Clock Source Select bits ^(1)

ValueDescription
1011-1111Reserved (no clock selected)
1010 AF_VCO/4
1001 AF_VCO/3
1000 AF_VCO/2
0111 AF_VCO
0110 AF_PLLO
0101 F_VCO/4
0100 F_VCO/3
0011 F_VCO/2
0010 F_PLLO
0001 F_VCO
00000 (no clock selected)

Bits 6:0 - CANCLKDIV[6:0] CAN Clock Divider Select bits ^(2,3)

ValueDescription
1111111Divide-by-128
. . .
0000010Divide-by-3
0000001Divide-by-2
0000000Divide-by-1

9.11.10 Reference Clock Control Low Register

Name: REFOCONL

Offset: 0xFB8

Legend: HC = Hardware Clearable bit; HSC = Hardware Settable/Clearable bit

Bit 15 14 13 12 11 10 9 8

ROENROSIDLROOUTROSLPROSWENROACTIV
AccessR/WR/WR/WR/WR/W/HCR/HSC
Reset00 0 00 0

Bit 76543210

ROSEL[3:0]
AccessR/WR/WR/WR/W
Reset0 0 0 0

Bit 15 - ROEN Reference Clock Enable bit

ValueDescription
1Reference Oscillator is enabled on the REFCLKO pin
0Reference Oscillator is disabled

Bit 13 - ROSIDL Reference Clock Stop in Idle bit

ValueDescription
1Reference Oscillator is disabled in Idle mode
0Reference Oscillator continues to run in Idle mode

Bit 12 - ROOUT Reference Clock Output Enable bit

ValueDescription
1Reference clock external output is enabled and available on the REFCLKO pin
0Reference clock external output is disabled

Bit 11 – ROSLP Reference Clock Stop in Sleep bit

ValueDescription
1Reference Oscillator continues to run in Sleep modes
0Reference Oscillator is disabled in Sleep modes

Bit 9 – ROSWEN Reference Clock Output Enable bit

ValueDescription
1Clock divider change (requested by changes to RODIVx) is requested or is in progress (set in software, cleared by hardware upon completion)
0Clock divider change has completed or is not pending

Bit 8 – ROACTIV Reference Clock Status bit

ValueDescription
1Reference clock is active; do not change clock source
0Reference clock is stopped; clock source and configuration may be safely changed

Bits 3:0 - ROSEL[3:0] Reference Clock Source Select bits

ValueDescription
1111Reserved
. . .Reserved
1000Reserved
0111REFI pin
0110Fvco/4
0101BFRC
Value Description
0100LPRC
0011FRC
0010Primary Oscillator
0001Peripheral clock ( F_P )
0000System clock ( F_OSC )

9.11.11 Reference Clock Control High Register

Name: REFOCONH

Offset: 0xFBA

Bit 15 14 13 12 11 10 9 8

RODIV[14:8]

Access

Reset 0000000

R/W R/W R/W R/W R/W R/W R/W

Bit 76543210

RODIV[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 14:0 – RODIV[14:0] Reference Clock Integer Divider Select bits

Divider for the selected input clock source is two times the selected value.

Value Description
111 1111 1111 1111Base clock value divided by 65,534 (2 * 7FFFh)
111 1111 1111 1110Base clock value divided by 65,532 (2 * 7FFEh)
111 1111 1111 1101Base clock value divided by 65,530 (2 * 7FFDh)
. . .
000 0000 0000 0010Base clock value divided by 4 (2 * 2)
000 0000 0000 0001Base clock value divided by 2 (2 * 1)
000 0000 0000 0000Base clock value

9.11.12 Reference Clock Trim Register

Name: REFOTRIMH

Offset: 0xFBE

Bit 15 14 13 12 11 10 9 8

ROTRIM[8:0]
AccessR/WR/WR/WR/WR/WR/WR/W
Reset0000000
Bit7654321
ROTRIM[8:0]
AccessR/W
Reset0

Bits 15:7 – ROTRIM[8:0] REFO Trim bits

These bits provide a fractional additive to the RODIV[14:0] value for the 1/2 period of the REFO clock.

Value Description
111111111511/512 (0.998046875 divisor added to the RODIV[14:0] value)
111111110510/512 (0.99609375 divisor added to the RODIV[14:0] value)
...
100000000256/512 (0.5000 divisor added to the RODIV[14:0] value)
...
0000000102/512 (0.00390625 divisor added to the RODIV[14:0] value)
0000000011/512 (0.001953125 divisor added to the RODIV[14:0] value)
0000000000/512 (0.0 divisor added to the RODIV[14:0] value)

10. Direct Memory Access (DMA) Controller

Note: This data sheet summarizes the features of the dsPIC33CK1024MP710 family of devices. It is not intended to be a comprehensive reference source. For more information, refer to "Direct Memory Access Controller (DMA)" (www.microchip.com/DS30009742).

The Direct Memory Access (DMA) Controller is designed to service high data throughput peripherals operating on the SFR bus, allowing them to access data memory directly and alleviating the need for CPU-intensive management. By allowing these data-intensive peripherals to share their own data path, the main data bus is also deloaded, resulting in additional power savings.

The DMA Controller functions both as a peripheral and a direct extension of the CPU. It is located on the microcontroller data bus, between the CPU and DMA-enabled peripherals, with direct access to SRAM. This partitions the SFR bus into two buses, allowing the DMA Controller access to the DMA-capable peripherals located on the new DMA SFR bus. The controller serves as an Initiator device on the DMA SFR bus, controlling data flow from DMA-capable peripherals.

The controller also monitors CPU instruction processing directly, allowing it to be aware of when the CPU requires access to peripherals on the DMA bus and automatically relinquishing control to the CPU as needed. This increases the effective bandwidth for handling data without DMA operations, causing a processor Stall. This makes the controller essentially transparent to the user.

The DMA Controller has these features:

• A Total of Eight
Independently Programmable Channels
- Concurrent Operation with the CPU (no DMA caused Wait states)
• DMA Bus Arbitration
- Five Programmable Address modes
- Four Programmable Transfer modes
- Four Flexible Internal Data Transfer modes
- Byte or Word Support for Data Transfer
- 16-Bit Source and Destination Address Register for each Channel, Dynamically Updated and Reloadable
- 16-Bit Transaction Count Register, Dynamically Updated and Reloadable
• Upper and Lower Address Limit Registers
- Counter Half-Full Level Interrupt
- Software Triggered Transfer
- Null Write mode for Symmetric Buffer Operations

A simplified block diagram of the DMA Controller is shown in Figure 10-1.

Figure 10-1. DMA Functional Block Diagram
Microchip dsPIC33CK1024MP708 - Direct Memory Access (DMA) Controller - 1

flowchart
graph TD
    A["CPU Execution Monitoring"] --> B["Control Logic"]
    B --> C["DMACON"]
    B --> D["DMAH"]
    B --> E["DMAL"]
    B --> F["DMABUF"]
    G["Data Bus"] --> H["Channel 0 Channel 1 Channel 4 Channel 5"]
    H --> I["Data RAM Address Generation"]
    J["To I/O Ports and Peripherals"] --> B
    K["To DMA-Enabled Peripherals"] --> B
    L["Data RAM"] --> H

10.1 Summary of DMA Operations

The DMA Controller is capable of moving data between addresses according to a number of different parameters. Each of these parameters can be independently configured for any transaction. In addition, any or all of the DMA channels can independently perform a different transaction at the same time. Transactions are classified by these parameters:

  • Source and destination (SFRs and data RAM)
    • Data size (byte or word)
  • Trigger source
  • Transfer mode (One-Shot, Repeated or Continuous)
  • Addressing modes (Fixed Address or Address Blocks with or without Address Increment/Decrement)

In addition, the DMA Controller provides channel priority arbitration for all channels.

10.1.1 Source and Destination

Using the DMA Controller, data may be moved between any two addresses in the Data Space. The SFR space (0000h to 0FFFh), or the data RAM space (1000h to 4FFFh), can serve as either the source or the destination. Data can be moved between these areas in either direction or between addresses in either area. The four different combinations are shown in 10.1.5. Addressing Modes.

If it is necessary to protect areas of data RAM, the DMA Controller allows the user to set upper and lower address boundaries for operations in the Data Space above the SFR space. The boundaries are set by the DMAH and DMAL Limit registers. If a DMA channel attempts an operation outside of the address boundaries, the transaction is terminated and an interrupt is generated.

10.1.2 Data Size

The DMA Controller can handle both 8-bit and 16-bit transactions. Size is user-selectable using the SIZE bit (DMACHn[1]). By default, each channel is configured for word-size transactions. When byte-size transactions are chosen, the LSB of the source and/or destination address determines if the data represent the upper or lower byte of the data RAM location.

10.1.3 Trigger Source

The DMA Controller can use 82 of the device's interrupt sources to initiate a transaction. The DMA trigger sources occur in reverse order from their natural interrupt priority and are shown in 10.1.5. Addressing Modes.

Since the source and destination addresses for any transaction can be programmed independently of the trigger source, the DMA Controller can use any trigger to perform an operation on any peripheral. This also allows DMA channels to be cascaded to perform more complex transfer operations.

10.1.4 Transfer Mode

The DMA Controller supports four types of data transfers, based on the volume of data to be moved for each trigger.

  • One-Shot: A single transaction occurs for each trigger.
  • Continuous: A series of back-to-back transactions occur for each trigger; the number of transactions is determined by the DMACNTn transaction counter.
  • Repeated One-Shot: A single transaction is performed repeatedly, once per trigger, until the DMA channel is disabled.
  • Repeated Continuous: A series of transactions are performed repeatedly, one cycle per trigger, until the DMA channel is disabled.

All transfer modes allow the option to have the source and destination addresses, and counter value, automatically reloaded after the completion of a transaction.

10.1.5 Addressing Modes

The DMA Controller also supports transfers between single addresses or address ranges. The four basic options are:

  • Fixed-to-Fixed: Between two constant addresses
  • Fixed-to-Block: From a constant source address to a range of destination addresses
  • Block-to-Fixed: From a range of source addresses to a single, constant destination address
  • Block-to-Block: From a range of source addresses to a range of destination addresses

The option to select auto-increment or auto-decrement of source and/or destination addresses is available for Block Addressing modes.

In addition to the four basic modes, the DMA Controller also supports Peripheral Indirect Addressing (PIA) mode, where the source or destination address is generated jointly by the DMA Controller and a PIA-capable peripheral. When enabled, the DMA channel provides a base source and/or destination address, while the peripheral provides a fixed range offset address.

Figure 10-2. Types of DMA Data Transfers
Peripheral to Memory Memory to Peripheral
Microchip dsPIC33CK1024MP708 - Addressing Modes - 1

text_image SFR Area DMASRCn 0FFFh 1000h Data RAM DMA RAM Area DMAL DMADSTn DMAH

Microchip dsPIC33CK1024MP708 - Addressing Modes - 2

text_image SFR Area DMADSTn 0FFFh 1000h Data RAM DMA RAM Area DMAL DMASRCn DMAH

Peripheral to Peripheral Memory to Memory
Microchip dsPIC33CK1024MP708 - Addressing Modes - 3

text_image SFR Area DMASRCn DMADSTn 0FFFh 1000h Data RAM

Microchip dsPIC33CK1024MP708 - Addressing Modes - 4

text_image SFR Area Data RAM 0FFFh 1000h DMA RAM Area DMAL DMASRCn DMADSTn DMAH

Note: Relative sizes of memory areas are not shown to scale.

10.1.6 Channel Priority

Each DMA channel functions independently of the others, but also competes with the others for access to the data and DMA buses. When access collisions occur, the DMA Controller arbitrates between the channels using a user-selectable priority scheme. Two schemes are available:

  • Round Robin: When two or more channels collide, the lower numbered channel receives priority on the first collision. On subsequent collisions, the higher numbered channels each receive priority based on their channel number.
  • Fixed: When two or more channels collide, the lowest numbered channel always receives priority, regardless of past history; however, any channel being actively processed is not available for an immediate retrigger. If a higher priority channel is continually requesting service, it will be scheduled for service after the next lower priority channel with a pending request.

10.2 Typical Setup

To set up a DMA channel for a basic data transfer:

  1. Enable the DMA Controller (DMAEN = 1) and select an appropriate channel priority scheme by setting or clearing PRSSEL.
  2. Program DMAH and DMAL with appropriate upper and lower address boundaries for data RAM operations.
  3. Select the DMA channel to be used and disable its operation (CHEN = 0).
  4. Program the appropriate source and destination addresses for the transaction into the channel's DMASRCn and DMADSTn registers. For PIA mode addressing, use the base address value.
  5. Program the DMACNTn register for the number of triggers per transfer (One-Shot or Continuous modes) or the number of words (bytes) to be transferred (Repeated modes).
  6. Set or clear the SIZE bit to select the data size.
  7. Program the TRMODE[1:0] bits to select the Data Transfer mode.
  8. Program the SAMODE[1:0] and DAMODE[1:0] bits to select the addressing mode.
  9. Enable the DMA channel by setting CHEN.
  10. Enable the trigger source interrupt.

10.2.1 Peripheral Module Disable

The channels of the DMA Controller can be individually powered down using the Peripheral Module Disable (PMD) registers.

10.2.2 DMA Registers

The DMA Controller uses a number of registers to control its operation. The number of registers depends on the number of channels implemented for a particular device.

There are always four module-level registers (one control and three buffer/address):

  • DMACON: DMA Engine Control Register (10.2.3.1. DMACON)
    • DMAH and DMAL: DMA High and Low Address Limit Registers
    • DMABUF: DMA Transfer Data Buffer

Each of the DMA channels implements five registers (two control and three buffer/address):

  • DMACHn: DMA Channel n Control Register (10.2.3.5. DMACHn)
  • DMAINTn: DMA Channel n Interrupt Register (10.2.3.6. DMAINTn)
  • DMASRCn: DMA Data Source Address Pointer for Channel n Register
  • DMADSTn: DMA Data Destination Source for Channel n Register
  • DMACNTn: DMA Transaction Counter for Channel n Register

For devices, there are a total of 34 registers.

10.2.3 DMA Control Registers

OffsetName Bit Pos. 7 6 5 4 3 2 1 0
0x0A94 DMACON15:8 DMAEN
7:0PRSSEL
0x0A96 DMABUF15:8 DMABUF[15:8]
7:0 DMABUF[7:0]
0x0A98DMAL15:8LADDR[15:8]
7:0LADDR[7:0]
0x0A9ADMAH15:8HADDR[15:8]
7:0HADDR[7:0]
0x0A9C DMACHO15:8NULLW RELOAD CHREQ
7:0SAMODE[1:0]DAMODE[1:0]TRMODE[1:0]SIZECHEN
0x0A9E DMAINTO15:8DBUFWFCHSEL[6:0]
7:0HIGHIFLOWIFDONEIFHALFIFOVRUNIFHALFEN
0x0AA0 DMASRCO15:8SADDR[15:8]
7:0SADDR[7:0]
0x0AA2 DMADSTO15:8DADDR[15:8]
7:0DADDR[7:0]
0x0AA4 DMACNTO15:8CNT[15:8]
7:0CNT[7:0]
0x0AA6DMACH115:8NULLW RELOAD CHREQ
7:0SAMODE[1:0]DAMODE[1:0]TRMODE[1:0]SIZECHEN
0x0AA8DMAINT115:8DBUFWFCHSEL[6:0]
7:0HIGHIFLOWIFDONEIFHALFIFOVRUNIFHALFEN
0x0AAA DMASRC115:8SADDR[15:8]
7:0SADDR[7:0]
0x0AACDMADST115:8DADDR[15:8]
7:0DADDR[7:0]
0x0AAE DMACNT115:8CNT[15:8]
7:0CNT[7:0]
0x0AB0DMACH215:8NULLW RELOAD CHREQ
7:0SAMODE[1:0]DAMODE[1:0]TRMODE[1:0]SIZECHEN
0x0AB2DMAINT215:8DBUFWFCHSEL[6:0]
7:0HIGHIFLOWIFDONEIFHALFIFOVRUNIFHALFEN
0x0AB4 DMASRC215:8SADDR[15:8]
7:0SADDR[7:0]
0x0AB6DMADST215:8DADDR[15:8]
7:0DADDR[7:0]
0x0AB8 DMACNT215:8CNT[15:8]
7:0CNT[7:0]
0x0ABA DMACH315:8NULLW RELOAD CHREQ
7:0SAMODE[1:0]DAMODE[1:0]TRMODE[1:0]SIZECHEN
0x0ABCDMAINT315:8DBUFWFCHSEL[6:0]
7:0HIGHIFLOWIFDONEIFHALFIFOVRUNIFHALFEN
0x0ABE DMASRC315:8SADDR[15:8]
7:0SADDR[7:0]
0x0AC0 DMADST315:8DADDR[15:8]
7:0DADDR[7:0]
0x0AC2 DMACNT315:8CNT[15:8]
7:0CNT[7:0]
0x0AC4DMACH415:8NULLW RELOAD CHREQ
7:0SAMODE[1:0]DAMODE[1:0]TRMODE[1:0]SIZECHEN
0x0AC6DMAINT415:8DBUFWFCHSEL[6:0]
7:0HIGHIFLOWIFDONEIFHALFIFOVRUNIFHALFEN
0x0AC8 DMASRC415:8SADDR[15:8]
7:0SADDR[7:0]
0x0ACADMADST415:8DADDR[15:8]
7:0DADDR[7:0]
0x0ACC DMACNT415:8CNT[15:8]
7:0CNT[7:0]
0x0ACE DMACH515:8NULLW RELOAD CHREQ
7:0 SAMODE[1:0] DAMODE[1:0] TRMODE[1:0] SIZE CHEN
0x0AD0 DMAINT515:8DBUFWFCHSEL[6:0]
7:0HIGHIFLOWIFDONEIFHALFIFOVRUNIFHALFEN
0x0AD2DMASRC515:8SADDR[15:8]
7:0SADDR[7:0]
0x0AD4 DMADST515:8DADDR[15:8]
7:0DADDR[7:0]
0x0AD6 DMACNT515:8CNT[15:8]
7:0CNT[7:0]
0x0AD8DMACH615:8NULLW RELOAD CHREQ
7:0 SAMODE[1:0] DAMODE[1:0] TRMODE[1:0] SIZE CHEN
0x0ADADMAINT615:8DBUFWFCHSEL[6:0]
7:0HIGHIFLOWIFDONEIFHALFIFOVRUNIFHALFEN
0x0ADCDMASRC615:8SADDR[15:8]
7:0SADDR[7:0]
0x0ADEDMADST615:8DADDR[15:8]
7:0DADDR[7:0]
0x0AE0DMACNT615:8CNT[15:8]
7:0CNT[7:0]
0x0AE2 DMACH715:8NULLW RELOAD CHREQ
7:0 SAMODE[1:0] DAMODE[1:0] TRMODE[1:0] SIZE CHEN
0x0AE4DMAINT715:8DBUFWFCHSEL[6:0]
7:0HIGHIFLOWIFDONEIFHALFIFOVRUNIFHALFEN
0x0AE6 DMASRC715:8SADDR[15:8]
7:0SADDR[7:0]
0x0AE8 DMADST715:8DADDR[15:8]
7:0DADDR[7:0]
0x0AEA DMACNT715:8CNT[15:8]
7:0CNT[7:0]

10.2.3.1 DMA Engine Control Register

Name: DMACON

Offset: 0xA94

Bit 15 14 13 12 11 10 9 8

DMAEN
AccessR/W
Reset 0

Bit 76543210

PRSSEL
Access Reset 0R/W

Bit 15 - DMAEN DMA Module Enable bit

ValueDescription
1Enables module
0Disables module and terminates all active DMA operation(s)

Bit 0 – PRSSEL Channel Priority Scheme Selection bit

ValueDescription
1Round robin scheme
0Fixed priority scheme

10.2.3.2 DMA Buffer Register

Name: DMABUF

Offset: 0xA96

Bit 15 14 13 12 11 10 9 8

DMABUF[15:8]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

DMABUF[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 15:0 – DMABUF[15:0] DMA Buffer bits

10.2.3.3 DMA Low Address Limit Register

Name: DMAL

Offset: 0xA98

Bit 15 14 13 12 11 10 9 8

LADDR[15:8]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

LADDR[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 15:0 – LADDR[15:0] DMA Low Address Limit bits

10.2.3.4 DMA High Address Limit Register

Name: DMAH

Offset: 0xA9A

Bit 15 14 13 12 11 10 9 8

HADDR[15:8]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

HADDR[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 15:0 – HADDR[15:0] DMA High Address Limit bits

10.2.3.5 DMA Channel n Control Register

Name: DMACHn

Offset: 0xA9C, 0xAA6, 0xAB0, 0xABA, 0xAC4, 0xACE, 0xAD8, 0xAE2

Notes:

  1. Only the original DMACNTn is required to be stored to recover the original DMASRCn and DMADSTn values.
  2. DMACNTn will always be reloaded in Repeated mode transfers, regardless of the state of the RELOAD bit.
  3. The number of transfers executed while CHREQ is set depends on the configuration of TRMODE[1:0].

Legend: r = Reserved bit

Bit 15 14 13 12 11 10 9 8

NULLW RELOAD CHREQ
Access ResetR/W0 0 0R/W0 0 0

Bit 76543210

SAMODE[1:0]DAMODE[1:0]TRMODE[1:0]SIZECHEN
AccessR/WR/WR/WR/WR/WR/WR/WR/W
Reset0 0 0 0 0 0 0

Bit 10 - NULLW Null Write Mode bit

ValueDescription
1A dummy write is initiated to DMASRCn for every write to DMADSTn
0No dummy write is initiated

Bit 9 – RELOAD Address and Count Reload bit ^(1)

ValueDescription
1DMASRCn, DMADSTn and DMACNTn registers are reloaded to their previous values upon the start of the next operation
0DMASRCn, DMADSTn and DMACNTn are not reloaded on the start of the next operation ^(2)

Bit 8 – CHREQ DMA Channel Software Request bit ^(3)

ValueDescription
1A DMA request is initiated by software; automatically cleared upon completion of a DMA transfer
0No DMA request is pending

Bits 7:6 – SAMODE[1:0] Source Address Mode Selection bits

ValueDescription
11DMASRCn is used in Peripheral Indirect Addressing and remains unchanged
10DMASRCn is decremented based on the SIZE bit after a transfer completion
01DMASRCn is incremented based on the SIZE bit after a transfer completion
00DMASRCn remains unchanged after a transfer completion

Bits 5:4 – DAMODE[1:0] Destination Address Mode Selection bits

ValueDescription
11DMADSTn is used in Peripheral Indirect Addressing and remains unchanged
10DMADSTn is decremented based on the SIZE bit after a transfer completion
01DMADSTn is incremented based on the SIZE bit after a transfer completion
00DMADSTn remains unchanged after a transfer completion

Bits 3:2 - TRMODE[1:0] Transfer Mode Selection bits

ValueDescription
11Repeated Continuous
Value Description
10Continuous
01Repeated One-Shot
00One-Shot

Bit 1 – SIZE Data Size Selection bit

Value Description
1Byte (8-bit)
0Word (16-bit)

Bit 0 – CHEN DMA Channel Enable bit

Value Description
1The corresponding channel is enabled
0The corresponding channel is disabled

10.2.3.6 DMA Channel n Interrupt Register

Name: DMAINTn

Offset: 0xA9E, 0xAA8, 0xAB2, 0xABC, 0xAC6, 0xAD0, 0xADA, 0xAE4

Notes:

  1. Setting these flags in software does not generate an interrupt.

  2. Testing for address limit violations (DMASRCn or DMADSTn is either greater than DMAH or less than DMAL) is NOT done before the actual access.

Bit 15 14 13 12 11 10 9 8

DBUFWF CHSEL[6:0]
AccessR/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0

Bit 76543210

HIGHIFLOWIFDONEIFHALFIFOVRUNIFHALFEN
AccessR/WR/WR/WR/WR/W
Reset0000

Bit 15 - DBUFWF DMA Buffered Data Write Flag bit ^(1)

ValueDescription
1The content of the DMA buffer has not been written to the location specified in DMADSTn or DMASRCn in Null Write mode
0The content of the DMA buffer has been written to the location specified in DMADSTn or DMASRCn in Null Write mode

Bits 14:8 - CHSEL[6:0] DMA Channel Trigger Selection bits

Bit 7 – HIGHIF DMA High Address Limit Interrupt Flag bit ^(1,2)

ValueDescription
1The DMA channel has attempted to access an address higher than DMAH or the upper limit of the data RAM space
0The DMA channel has not invoked the high address limit interrupt

Bit 6 - LOWIF DMA Low Address Limit Interrupt Flag bit ^(1,2)

ValueDescription
1The DMA channel has attempted to access the DMA SFR address lower than DMAL, but above the SFR range (07FFh)
0The DMA channel has not invoked the low address limit interrupt

Bit 5 - DONEIF DMA Complete Operation Interrupt Flag bit ^(1)

ValueDescription
If CHEN = 1:
1The previous DMA session has ended with completion
0The current DMA session has not yet completed
If CHEN = 0:
1The previous DMA session has ended with completion
0The previous DMA session has ended without completion

Bit 4 - HALFIF DMA 50% Watermark Level Interrupt Flag bit ^(1)

ValueDescription
1DMACNTn has reached the halfway point to 0000h
0DMACNTn has not reached the halfway point

Bit 3 - OVRUNIF DMA Channel Overrun Flag bit ^(1)

Value Description
1The DMA channel is triggered while it is still completing the operation based on the previous trigger
0The Overrun condition has not occurred

Bit 0 – HALFEN Halfway Completion Watermark bit

Value Description
1Interrupts are invoked when DMACNTn has reached its halfway point and at completion
0An interrupt is invoked only at the completion of the transfer

10.2.3.7 DMA Data Source Address Pointer Channel n Register

Name: DMASRCn

Offset: 0xAA0, 0xAAA, 0xAB4, 0XABE, 0xAC8, 0xAD2, 0xADC, 0xAE6

Bit 15 14 13 12 11 10 9 8

SADDR[15:8]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

SADDR[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 15:0 – SADDR[15:0] DMA Data Source Address Pointer bits

10.2.3.8 DMA Data Source Address Pointer Channel n Register

Name: DMADSTn

Offset: 0xAA2, 0xAAC, 0xAB6, 0xAC0, 0xACA, 0xAD4, 0xAE, 0xAE8

Bit 15 14 13 12 11 10 9 8

DADDR[15:8]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

DADDR[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 15:0 – DADDR[15:0] DMA Data Destination Address Pointer bits

10.2.3.9 DMA Transaction Counter Channel n Register

Name: DMACNTn

Offset: 0xAA4, 0xAAE, 0xAB8, 0xAC2, 0xACC, 0xAD6, 0xAE0, 0xAEA

Bit 15 14 13 12 11 10 9 8

CNT[15:8]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

CNT[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 15:0 – CNT[15:0] DMA Transaction Counter bits

10.2.4 DMA Trigger Sources

Table 10-1. DMA Channel Trigger Sources

CHSEL[6:0] Trigger (Interrupt) CHSEL[6:0] Trigger (Interrupt) CHSEL[6:0]Trigger (Interrupt)
00hINTO – External Interrupt 028hADC Done AN050hCLC7 Positive Edge Interrupt
01hSCCP1 Interrupt29hADC Done AN151hCLC8 Positive Edge Interrupt
02hSPI1 Receiver2AhADC Done AN252hAPWM Generator 1
03hSPI1 Transmitter2BhADC Done AN353hAPWM Generator 2
04hUART1 Receiver2ChADC Done AN454hAPWM Generator 3
05hUART1 Transmitter2DhADC Done AN555hAPWM Generator 4
06hECC Single-Bit Error2EhADC Done AN656h(Reserved, do not use)
07hNVM Write Complete2FhADC Done AN757hPWM Event D
08hINT1 – External Interrupt 130hADC Done AN858hPWM Event E
09hSI2C1 – I2C1 Client Event31hADC Done AN959hPWM Event F
0AhMI2C1 – I2C1 Host Event32hADC Done AN10(Reserved, do not use)(Reserved, do not use)
0BhINT2 – External Interrupt 233hADC Done AN11(Reserved, do not use)(Reserved, do not use)
0ChSCCP2 Interrupt34hADC Done AN125ChSCCP7 Interrupt
0DhINT3 – External Interrupt 335hADC Done AN135Dh SCCP8Interrupt
0EhUART2 Receiver36hADC Done AN145Eh(Reserved, do not use)
0FhUART2 Transmitter37hADC Done AN155Fh(Reserved, do not use)
10hSPI2 Receiver38hADC Done AN1660hCLC3 Positive Edge Interrupt
11hSPI2 Transmitter39hADC Done AN1761hCLC4 Positive Edge Interrupt
12hSCCP3 Interrupt3AhADC Done AN1862hSPI3 Receiver
13hSI2C2 – I2C2 Client Event3BhADC Done AN1963hSPI3 Transmitter
CHSEL[6:0] Trigger (Interrupt) CHSEL[6:0] Trigger (Interrupt) CHSEL[6:0] Trigger (Interrupt)
14h MI2C2 – I2C2 Host Event3Ch ADC Done AN20 64h SI2C3 – I2C3 ClientEvent
15h SCCP4 Interrupt 3Dh ADC Done AN21
16h SCCP5 Interrupt 3Eh ADC Done AN22 65h MI2C3 – I2C3 HostEvent
17h SCCP6 Interrupt 3Fh ADC Done AN23 66h SPI3 – Fault Interrupt
18h CRC Generator Interrupt40h AD1FLTR1 – Oversample Filter 167h MCCP9
19h PWM Event A 41h AD1FLTR2 –68h UART3 Receiver
1Ah (Reserved, do not use)42h AD1FLTR3 – Oversample Filter 369h UART3 Transmitter
1Bh PWM Event B 43h AD1FLTR4 –6Ah ADC Done AN24
1Ch PWM Generator 144h CLC1 Positive Edge Interrupt6Bh ADC Done AN25
1Dh PWM Generator 245h CLC2 Positive Edge Interrupt6Ch PMP Event
1Eh PWM Generator 346h SPI1 – Fault Interrupt6Dh PMP Error
1Fh PWM Generator 447h SPI2 – Fault Interrupt6Eh APWM Event A
20h PWM Generator 548h ADC Done AN26 6FEh APWM Event B
21h PWM Generator 649h ADC Done AN27 70h APWM Event C
22h PWM Generator 74Ah ADC Done AN28 71h APWM Event D
23h PWM Generator 84Bh ADC Done AN29 72h APWM Event E
24h PWM Event C 4Ch ADC Done AN30 73h APWM Event F
25h SENT1 TX/RX4Dh ADC Done AN3174h-7Fh(Reserved, do not use)
26h SENT2 TX/RX4Eh CLC5 Positive Edge Interrupt
27h ADC1 Group Convert Done4Fh CLC6 Positive Edge Interrupt

11. Controller Area Network Flexible Data-Rate (CAN FD) Modules

Notes:

  1. This data sheet summarizes the features of the dsPIC33CK1024MP710 family of devices. It is not intended to be a comprehensive reference source. To complement the information in this data sheet, refer to "CAN Flexible Data-Rate (FD) Protocol Module" (www.microchip.com/DS70005340).
  2. Not all device variants include the CAN FD peripheral. Refer to dsPIC33CK1024MP710 Product Families for availability.

11.1 Features

The CAN FD modules have the following features:

General

• Nominal (Arbitration) Bit Rate up to 1 Mbps
• Data Bit Rate up to 8 Mbps
• CAN FD Controller modes:
- Mixed CAN 2.0B and CAN FD mode
- CAN 2.0B mode
• Conforms to ISO11898-1:2015

Message FIFOs

  • Seven FIFOs, Configurable as Transmit or Receive FIFOs
    • One Transmit Queue (TXQ)
  • Transmit Event FIFO (TEF) with 32-Bit Timestamp

Message Transmission

  • Message Transmission Prioritization:
    – Based on priority bit field and/or
    – Message with lowest ID gets transmitted first using the TXQ
  • Programmable Automatic Retransmission Attempts: – Unlimited, Three Attempts or Disabled

Message Reception

• 16 Flexible Filter and Mask Objects.
• Each Object can be Configured to Filter either:
- Standard ID + first 18 data bits or
- Extended ID

- 32-Bit Timestamp.

- The CAN FD Bit Stream Processor (BSP): Implements the Medium Access Control of the CAN FD Protocol Described in ISO11898-1:2015. It serializes and deserializes the bit stream, encodes and decodes the CAN FD frames, manages the medium access, Acknowledges frames, and detects and signals errors.

- The TX Handler: Prioritizes the Messages that are Requested for Transmission by the Transmit FIFOs. It uses the RAM interface to fetch the transmit data from RAM and provides them to the BSP for transmission.

- The BSP: Provides Received Messages to the RX Handler. The RX handler uses acceptance filters to filter out messages that shall be stored in the Receive FIFOs. It uses the RAM interface to store received data into RAM.

• Each FIFO can be Configured either as a

Transmit or Receive FIFO: The FIFO control keeps track of the FIFO head and tail, and calculates the user address. In a TX FIFO, the user address points to the address in RAM where the data for the next transmit message shall be stored. In an RX FIFO, the user address points to the address in RAM where the data of the next receive message shall be read. The user notifies the FIFO that a message was written to or read from RAM by incrementing the head/tail of the FIFO.

  • The Transmit Queue (TXQ): A Special Transmit FIFO that Transmits the Messages based on the ID of the Messages Stored in the Queue.
  • The Transmit Event FIFO (TEF): Stores the Message IDs of the Transmitted Messages.
  • A Free-Running Time Base Counter: Used to Timestamp Received Messages. Messages in the TEF can also be timestamped.
  • The CAN FD Controller Modules: Generate Interrupts when New Messages are Received or when Messages were Transmitted Successfully.

Figure 11-1 shows the CAN FD system block diagram.

Figure 11-1. CAN FD Module Block Diagram
Microchip dsPIC33CK1024MP708 - Message Reception - 1

flowchart
graph TD
    A["C1TX"] --> B["TX Handler"]
    A --> C["TX Prioritization"]
    D["C1RX"] --> E["RX Handler"]
    D --> F["Filter and Masks"]
    B <--> G["Timestamping"]
    C <--> H["Interrupt Control"]
    E <--> I["Error Handling Diagnostics"]
    J["Cross"] --> A
    K["Cross"] --> D

Device RAM

Microchip dsPIC33CK1024MP708 - Message Reception - 2

flowchart
graph LR
    A["TEF"] --> B["Message Object 0"]
    A --> C["Message Object 31"]
    D["TXQ"] --> E["Message Object 0"]
    D --> F["Message Object 31"]
    G["FIFO 1"] --> H["Message Object 0"]
    G --> I["Message Object 31"]
    J["FIFO 7"] --> K["Message Object 0"]
    J --> L["Message Object 31"]
    B --> M["..."]
    E --> N["..."]
    H --> O["..."]
    I --> P["..."]
    K --> Q["..."]

11.2 CAN Control/Status Registers

OffsetNameBit Pos. 76543210
0x0594C2TSCONL15:8TBCPRE[9:8]
7:0TBCPRE[7:0]
0x0596C2TSCONH15:8
7:0TSRES TSEOF TBCEN
0x0598C2VECL15:8FILHIT[4:0]
7:0ICODE[6:0]
0x059AC2VECH15:8RXCODE[6:0]
7:0TXCODE[6:0]
0x059CC2INTL15:8IVMIFWAKIFCERRIFSERRIFRXOVIFTXATIF
7:0TEFIF MODIF TBCIFRXIFTXIF
0x059EC2INTH15:8IVMIEWAKIECERRIESERRIERXOVIETXATIE
7:0TEFIE MODIE TBCIERXIETXIE
0x05A0...0x05AFReserved
0x05B0C2TXREQL15:8TXREQ[15:8]
7:0TXREQ[7:1]TXREQ0
0x05B2C2TXREQH15:8TXREQ[31:24]
7:0TXREQ[23:16]
0x05B4C2TRECL15:8TERRCNT[7:0]
7:0RERRCNT[7:0]
0x05B6C2TRECH15:8
7:0TXBOTXBPRXBPTXWARNRXWARNEWARN
0x05B8C2BDIAGOL15:8NTERRCNT[7:0]
7:0NRERRCNT[7:0]
0x05BAC2BDIAGOH15:8DTERRCNT[7:0]
7:0DRERRCNT[7:0]
0x05BCC2BDIAG1L15:8EFMSGCNT[15:8]
7:0EFMSGCNT[7:0]
0x05BEC2BDIAG1H15:8DLCMMESIDCRCERRDSTUFERRDFORMERRDBIT1ERRDBITOERR
7:0TXBOERRNCRCERRNSTUFERRNFORMERRNACKERRNBIT1ERRNBITOERR
0x05C0C2TEFCONL15:8FRESETUINC
7:0TEFTSENTEFOVIETEFFIETEFHIETEFNEIE
0x05C2C2TEFCONH15:8FSIZE[4:0]
7:0
0x05C4C2TEFSTA15:8
7:0TEFOVIF TEFFIFTEFHIF TEFNEIF
0x05C6...0x05C7Reserved
0x05C8C2TEFUAL(1)15:8TEFUA[15:8]
7:0TEFUA[7:0]
0x05CAC2TEFUAH(1)15:8TEFUA[31:24]
7:0TEFUA[23:16]
0x05CCC2FIFOBAL15:8FIFOBA[15:8]
7:0FIFOBA[7:0]
0x05CEC2FIFOBAH15:8FIFOBA[31:24]
7:0FIFOBA[23:16]
0x05D0C2TXQCONL15:8FRESET TXREQ UINC
7:0TXENTXATIETXQEIETXQNIE
0x05D2C2TXQCONH15:8PLSIZE[2:0]FSIZE[4:0]
7:0TXAT[1:0]TXPRI[4:0]
0x05D4C2TXQSTA15:8TXQCI[4:0]
7:0TXABTTXLABBTXERRTXATIFTXQEIFTXQNIF
0x05D6...0x05DBReserved
0x05DCC2FIFOCON1L15:8FRESET TXREQ UINC
7:0TXENRTRENRXTSENTXATIERXOVIETFERFFIETFHRFHIETFNRFNIE
0x05DEC2FIFOCON1H15:8 PLSIZE[2:0] FSIZE[4:0]
7:0 TXAT[1:0] TXPRI[4:0]
0x05E0...0x05E7Reserved
0x05E8C2FIFOCON2L15:8FRESETTXREQUINC
7:0TXENRTRENRXTSENTXATIERXOVIETFERFFIETFHRFHIETFNRFNIE
0x05EAC2FIFOCON2H15:8 PLSIZE[2:0] FSIZE[4:0]
7:0 TXAT[1:0] TXPRI[4:0]
0x05EC...0x05F3Reserved
0x05F4C2FIFOCON3L15:8FRESETTXREQUINC
7:0TXENRTRENRXTSENTXATIERXOVIETFERFFIETFHRFHIETFNRFNIE
0x05F6C2FIFOCON3H15:8 PLSIZE[2:0] FSIZE[4:0]
7:0 TXAT[1:0] TXPRI[4:0]
0x05F8...0x05FFReserved
0x0600C2FIFOCON4L15:8FRESETTXREQUINC
7:0TXENRTRENRXTSENTXATIERXOVIETFERFFIETFHRFHIETFNRFNIE
0x0602C2FIFOCON4H15:8 PLSIZE[2:0] FSIZE[4:0]
7:0 TXAT[1:0] TXPRI[4:0]
0x0604...0x060BReserved
0x060CC2FIFOCON5L15:8FRESETTXREQUINC
7:0TXENRTRENRXTSENTXATIERXOVIETFERFFIETFHRFHIETFNRFNIE
0x060EC2FIFOCON5H15:8 PLSIZE[2:0] FSIZE[4:0]
7:0 TXAT[1:0] TXPRI[4:0]
0x0610...0x0617Reserved
0x0618C2FIFOCON6L15:8FRESETTXREQUINC
7:0TXENRTRENRXTSENTXATIERXOVIETFERFFIETFHRFHIETFNRFNIE
0x061AC2FIFOCON6H15:8 PLSIZE[2:0] FSIZE[4:0]
7:0 TXAT[1:0] TXPRI[4:0]
0x061C...0x0623Reserved
0x0624C2FIFOCON7L15:8FRESETTXREQUINC
7:0TXENRTRENRXTSENTXATIERXOVIETFERFFIETFHRFHIETFNRFNIE
0x0626C2FIFOCON7H15:8 PLSIZE[2:0] FSIZE[4:0]
7:0 TXAT[1:0] TXPRI[4:0]
0x0628...0x062FReserved
0x0630C2FLTCON0L15:8 FLTENbFbBP[4:0]
7:0FLTENaFaBP[4:0]
0x0632C2FLTCON0H15:8 FLTENdFdBp[4:0]
7:0FLTENcFcBP[4:0]
0x0634C2FLTCON1L15:8 FLTENbFbBP[4:0]
7:0FLTENaFaBP[4:0]
0x0636C2FLTCON1H15:8 FLTENdFdBP[4:0]
7:0FLTENcFcBP[4:0]
0x0638C2FLTCON2L15:8 FLTENbFbBP[4:0]
7:0FLTENaFaBP[4:0]
0x063AC2FLTCON2H15:8 FLTENdFdBP[4:0]
7:0FLTENcFcBP[4:0]
0x063CC2FLTCON3L15:8 FLTENbFbBP[4:0]
7:0FLTENaFaBP[4:0]
0x063EC2FLTCON3H15:8 FLTENd FdBp[4:0]
7:0 FLTENc FcBP[4:0]
0x0640C2FLTOBJ0L15:8 EID[4:0] SID[10:8]
7:0 SID[7:0]
0x0642C2FLTOBJ0H15:8EXIDESID11EID[17:13]
7:0EID[12:5]
0x0644C2MASKOL15:8MEID[4:0]MSID[10:8]
7:0MSID[7:0]
0x0646C2MASKOH15:8MIDE MSID11MEID[17:13]
7:0MEID[12:5]
0x0648C2FLTOBJ1L15:8 EID[4:0] SID[10:8]
7:0 SID[7:0]
0x064AC2FLTOBJ1H15:8EXIDESID11EID[17:13]
7:0EID[12:5]
0x064CC2MASK1L15:8MEID[4:0]MSID[10:8]
7:0MSID[7:0]
0x064EC2MASK1H15:8MIDE MSID11MEID[17:13]
7:0MEID[12:5]
0x0650C2FLTOBJ2L15:8 EID[4:0] SID[10:8]
7:0 SID[7:0]
0x0652C2FLTOBJ2H15:8EXIDESID11EID[17:13]
7:0EID[12:5]
0x0654C2MASK2L15:8MEID[4:0]MSID[10:8]
7:0MSID[7:0]
0x0656C2MASK2H15:8MIDE MSID11MEID[17:13]
7:0MEID[12:5]
0x0658C2FLTOBJ3L15:8 EID[4:0] SID[10:8]
7:0 SID[7:0]
0x065AC2FLTOBJ3H15:8EXIDESID11EID[17:13]
7:0EID[12:5]
0x065CC2MASK3L15:8MEID[4:0]MSID[10:8]
7:0MSID[7:0]
0x065EC2MASK3H15:8MIDE MSID11MEID[17:13]
7:0MEID[12:5]
0x0660C2FLTOBJ4L15:8 EID[4:0] SID[10:8]
7:0 SID[7:0]
0x0662C2FLTOBJ4H15:8EXIDESID11EID[17:13]
7:0EID[12:5]
0x0664C2MASK4L15:8MEID[4:0]MSID[10:8]
7:0MSID[7:0]
0x0666C2MASK4H15:8MIDE MSID11MEID[17:13]
7:0MEID[12:5]
0x0668C2FLTOBJ5L15:8 EID[4:0] SID[10:8]
7:0 SID[7:0]
0x066AC2FLTOBJ5H15:8EXIDESID11EID[17:13]
7:0EID[12:5]
0x066CC2MASK5L15:8MEID[4:0]MSID[10:8]
7:0MSID[7:0]
0x066EC2MASK5H15:8MIDE MSID11MEID[17:13]
7:0MEID[12:5]
0x0670C2FLTOBJ6L15:8 EID[4:0] SID[10:8]
7:0 SID[7:0]
0x0672C2FLTOBJ6H15:8EXIDESID11EID[17:13]
7:0EID[12:5]
0x0674C2MASK6L15:8MEID[4:0]MSID[10:8]
7:0MSID[7:0]
0x0676C2MASK6H15:8MIDE MSID11MEID[17:13]
7:0MEID[12:5]
0x0678C2FLTOBJ7L15:8 EID[4:0] SID[10:8]
7:0 SID[7:0]
0x067AC2FLTOBJ7H15:8 EXIDE SID11 EID[17:13]
7:0 EID[12:5]
0x067CC2MASK7L15:8 MEID[4:0] MSID[10:8]
7:0 MSID[7:0]
0x067EC2MASK7H15:8MIDEMSID11MEID[17:13]
7:0MEID[12:5]
0x0680C2FLTOBJ8L15:8EID[4:0]SID[10:8]
7:0SID[7:0]
0x0682C2FLTOBJ8H15:8 EXIDE SID11 EID[17:13]
7:0 EID[12:5]
0x0684C2MASK8L15:8 MEID[4:0] MSID[10:8]
7:0 MSID[7:0]
0x0686C2MASK8H15:8MIDEMSID11MEID[17:13]
7:0MEID[12:5]
0x0688C2FLTOBJ9L15:8EID[4:0]SID[10:8]
7:0SID[7:0]
0x068AC2FLTOBJ9H15:8 EXIDE SID11 EID[17:13]
7:0 EID[12:5]
0x068CC2MASK9L15:8 MEID[4:0] MSID[10:8]
7:0 MSID[7:0]
0x068EC2MASK9H15:8MIDEMSID11MEID[17:13]
7:0MEID[12:5]
0x0690C2FLTOBJ10L15:8EID[4:0]SID[10:8]
7:0SID[7:0]
0x0692C2FLTOBJ10H15:8 EXIDE SID11 EID[17:13]
7:0 EID[12:5]
0x0694C2MASK10L15:8 MEID[4:0] MSID[10:8]
7:0 MSID[7:0]
0x0696C2MASK10H15:8MIDEMSID11MEID[17:13]
7:0MEID[12:5]
0x0698C2FLTOBJ11L15:8EID[4:0]SID[10:8]
7:0SID[7:0]
0x069AC2FLTOBJ11H15:8 EXIDE SID11 EID[17:13]
7:0 EID[12:5]
0x069CC2MASK11L15:8 MEID[4:0] MSID[10:8]
7:0 MSID[7:0]
0x069EC2MASK11H15:8MIDEMSID11MEID[17:13]
7:0MEID[12:5]
0x06A0C2FLTOBJ12L15:8EID[4:0]SID[10:8]
7:0SID[7:0]
0x06A2C2FLTOBJ12H15:8 EXIDE SID11 EID[17:13]
7:0 EID[12:5]
0x06A4C2MASK12L15:8 MEID[4:0] MSID[10:8]
7:0 MSID[7:0]
0x06A6C2MASK12H15:8MIDEMSID11MEID[17:13]
7:0MEID[12:5]
0x06A8C2FLTOBJ13L15:8EID[4:0]SID[10:8]
7:0SID[7:0]
0x06AAC2FLTOBJ13H15:8 EXIDE SID11 EID[17:13]
7:0 EID[12:5]
0x06ACC2MASK13L15:8 MEID[4:0] MSID[10:8]
7:0 MSID[7:0]
0x06AEC2MASK13H15:8MIDEMSID11MEID[17:13]
7:0MEID[12:5]
0x06B0C2FLTOBJ14L15:8EID[4:0]SID[10:8]
7:0SID[7:0]
0x06B2C2FLTOBJ14H15:8 EXIDE SID11 EID[17:13]
7:0 EID[12:5]
0x06B4C2MASK14L15:8 MEID[4:0] MSID[10:8]
7:0 MSID[7:0]
0x06B6C2MASK14H15:8MIDE MSID11 MEID[17:13]
7:0MEID[12:5]
0x06B8C2FLTOBJ15L15:8EID[4:0] SID[10:8]
7:0SID[7:0]
0x06BAC2FLTOBJ15H15:8EXIDESID11EID[17:13]
7:0EID[12:5]
0x06BCC2MASK15L15:8MEID[4:0]MSID[10:8]
7:0MSID[7:0]
0x06BEC2MASK15H15:8MIDE MSID11 MEID[17:13]
7:0MEID[12:5]
0x06CDC1CONL15:8CONSIDLBRSDISBUSYWFT[1:0]WAKFIL
7:0CLKSELPXEDIS ISOCRCENDNCNT[4:0]
0x06C2C1CONH15:8TXBWS[3:0]ABATREQOP[2:0]
7:0OPMOD[2:0]TXQENSTEFSERRLOMESIGMRTXAT
0x06C4C1NBTCFGL15:8TSEG2[6:0]
7:0SJW[6:0]
0x06C6C1NBTCFGH15:8BRP[7:0]
7:0TSEG1[7:0]
0x06C8C1DBTCFGL15:8TSEG2[3:0]
7:0SJW[3:0]
0x06CAC1DBTCFGH15:8BRP[7:0]
7:0TSEG1[4:0]
0x06CCC1TDCL15:8TDCO[6:0]
7:0TDCV[5:0]
0x06CCC1TDCL(1,2)15:8TDCO[6:0]
7:0TDCV[5:0]
0x06CEC1TDCH15:8EDGFLTENSID11EN
7:0TDCMOD[1:0]
0x06D0C1TBCL15:8TBC[15:8]
7:0TBC[7:0]
0x06D0C1TBCL(1,2)15:8TBC[15:8]
7:0TBC[7:0]
0x06D2C1TBCH15:8TBC[31:24]
7:0TBC[23:16]
0x06D2C1TBCH(1,2)15:8TBC[31:24]
7:0TBC[23:16]
0x06D4C1TSCONL15:8TBCPRE[9:8]
7:0TBCPRE[7:0]
0x06D6C1TSCONH15:8
7:0TSRESTSEOFTBCEN
0x06D8C1VECL15:8FILHIT[4:0]
7:0ICODE[6:0]
0x06DAC1VECH15:8RXCODE[6:0]
7:0TXCODE[6:0]
0x06DCC1INTL15:8IVMIFWAKIFCERRIFSERRIFRXOVIFTXATIF
7:0TEFIFMODIFTBCIFRXIFTXIF
0x06DEC1INTH15:8IVMIEWAKIECERRIESERRIERXOVIETXATIE
7:0TEFIEMODIETBCIERXIETXIE
0x06E0C1RXIFL15:8 RFIF[15:8]
7:0RFIF[7:1]
0x06E2C1RXIFH15:8RFIF[31:24]
7:0 RFIF[23:16]
0x06E4C1TXIFL15:8 TFIF[15:8]
7:0TFIF[7:0]
0x06E6C1TXIFH15:8TFIF[31:24]
7:0 TFIF[23:16]
0x06E8C1RXOVIFL15:8RFOVIF[15:8]
7:0RFOVIF[7:1]
0x06EAC1RXOVIFH15:8RFOVIF[31:24]
7:0RFOVIF[23:16]
0x06ECC1TXATIFL15:8 TFATIF[15:8]
7:0 TFATIF[7:0]
0x06EEC1TXATIFH15:8 TFATIF[31:24]
7:0 TFATIF[23:16]
0x06F0C1TXREQL15:8 TXREQ[15:8]
7:0 TXREQ[7:1] TXREQ0
0x06F2C1TXREQH15:8 TXREQ[31:24]
7:0 TXREQ[23:16]
0x06F4C1TRECL15:8 TERRCNT[7:0]
7:0 RERRCNT[7:0]
0x06F6C1TRECH15:8
7:0TXBOTXBPRXBPTXWARNRXWARNEWARN
0x06F8C1BDIAGOL15:8NTERRCNT[7:0]
7:0NRERRCNT[7:0]
0x06FAC1BDIAGOH15:8DTERRCNT[7:0]
7:0DRERRCNT[7:0]
0x06FCC1BDIAG1L15:8EFMSGCNT[15:8]
7:0EFMSGCNT[7:0]
0x06FEC1BDIAG1H15:8DLCMMESIDCRCERRDSTUFERRDFORMERRDBIT1ERRDBITOERR
7:0TXBOERRNCRCERRNSTUFERRNFORMERRNACKERRNBIT1ERRNBITOERR
0x0700C1TEFCONL15:8FRESETUINC
7:0TEFTSENTEFOVIETEFFIETEFHIETEFNEIE
0x0702C1TEFCONH15:8FSIZE[4:0]
7:0
0x0704C1TEFSTA15:8
7:0TEFOVIFTEFFIFTEFHIFTEFNEIF
0x0706 ... 0x0707Reserved
0x0708C1TEFUAL(1)15:8 TEFUA[15:8]
7:0 TEFUA[7:0]
0x070AC1TEFUAH(1)15:8 TEFUA[31:24]
7:0 TEFUA[23:16]
0x070CC1FIFOBAL15:8FIFOBA[15:8]
7:0FIFOBA[7:0]
0x070EC1FIFOBAH15:8FIFOBA[31:24]
7:0FIFOBA[23:16]
0x0710C1TXQCONL15:8FRESETTXREQUINC
7:0TXENTXATIETXQEIETXQNIE
0x0712C1TXQCONH15:8PLSIZE[2:0]FSIZE[4:0]
7:0TXAT[1:0]TXPRI[4:0]
0x0714C1TXQSTA15:8TXQCI[4:0]
7:0TXABTTXLARBTXERRTXATIFTXQEIFTXQNIF
0x0716 ... 0x0717Reserved
0x0718C1TXQUAL15:8TXQUA[15:8]
7:0TXQUA[7:0]
0x071AC1TXQUAH15:8TXQUA[31:24]
7:0TXQUA[23:16]
0x071CC1FIFOCON1L15:8FRESETTXREQUINC
7:0TXENRTRENRXTSENTXATIERXOVIETFERFFIETFHRFHIETFNRFNIE
0x071EC1FIFOCON1H15:8PLSIZE[2:0]FSIZE[4:0]
7:0TXAT[1:0]TXPRI[4:0]
0x0720C1FIFOSTA115:8FIFOCI[4:0]
7:0TXABTTXLARBTXERRTXATIFRXOVIFTFERFFIFTFHRFHIFTFNRFNIF
0x0720C1FIFOSTA115:8FIFOCI[4:0]
7:0TXABTTXLARBTXERRTXATIFRXOVIFTFERFFIFTFHRFHIFTFNRFNIF
0x0722 ... 0x0723Reserved
OffsetName Bit Pos. 76543210
0x0724 C1FIFOUA1L15:8 FIFOUA[15:8]
7:0 FIFOUA[7:0]
0x0724 C1FIFOUA1L(1)15:8 FIFOUA[15:8]
7:0 FIFOUA[7:0]
0x0726 C1FIFOUA1H15:8 FIFOUA[31:24]
7:0 FIFOUA[23:16]
0x0726 C1FIFOUA1H(1)15:8 FIFOUA[31:24]
7:0 FIFOUA[23:16]
0x0728 C1FIFOCON2L15:8FRESET TXREQ UINC
7:0TXENRTRENRXTSENTXATIERXOVIETFERFFIETFHRFHIE
0x072AC1FIFOCON2H15:8PLSIZE[2:0]FSIZE[4:0]
7:0TXAT[1:0]TXPRI[4:0]
0x072CC1FIFOSTA215:8FIFOCI[4:0]
7:0TXABTTXLARBTXERRTXATIFRXOVIFTFERFFIFTFHRFHIF
0x072CC1FIFOSTA215:8FIFOCI[4:0]
7:0TXABTTXLARBTXERRTXATIFRXOVIFTFERFFIFTFHRFHIF
0x072E ... 0x072FReserved
0x0730 C1FIFOUA2L15:8 FIFOUA[15:8]
7:0 FIFOUA[7:0]
0x0730 C1FIFOUA2L(1)15:8 FIFOUA[15:8]
7:0 FIFOUA[7:0]
0x0732 C1FIFOUA2H15:8 FIFOUA[31:24]
7:0 FIFOUA[23:16]
0x0732 C1FIFOUA2H(1)15:8 FIFOUA[31:24]
7:0 FIFOUA[23:16]
0x0734 C1FIFOCON3L15:8FRESET TXREQ UINC
7:0TXENRTRENRXTSENTXATIERXOVIETFERFFIETFHRFHIE
0x0736C1FIFOCON3H15:8PLSIZE[2:0]FSIZE[4:0]
7:0TXAT[1:0]TXPRI[4:0]
0x0738C1FIFOSTA315:8FIFOCI[4:0]
7:0TXABTTXLARBTXERRTXATIFRXOVIFTFERFFIFTFHRFHIF
0x0738C1FIFOSTA315:8FIFOCI[4:0]
7:0TXABTTXLARBTXERRTXATIFRXOVIFTFERFFIFTFHRFHIF
0x073A ... 0x073BReserved
0x073C C1FIFOUA3L15:8 FIFOUA[15:8]
7:0 FIFOUA[7:0]
0x073C C1FIFOUA3L(1)15:8 FIFOUA[15:8]
7:0 FIFOUA[7:0]
0x073E C1FIFOUA3H15:8 FIFOUA[31:24]
7:0 FIFOUA[23:16]
0x073E C1FIFOUA3H(1)15:8 FIFOUA[31:24]
7:0 FIFOUA[23:16]
0x0740 C1FIFOCON4L15:8FRESET TXREQ UINC
7:0TXENRTRENRXTSENTXATIERXOVIETFERFFIETFHRFHIE
0x0742C1FIFOCON4H15:8PLSIZE[2:0]FSIZE[4:0]
7:0TXAT[1:0]TXPRI[4:0]
0x0744C1FIFOSTA415:8FIFOCI[4:0]
7:0TXABTTXLARBTXERRTXATIFRXOVIFTFERFFIFTFHRFHIF
0x0744C1FIFOSTA415:8FIFOCI[4:0]
7:0TXABTTXLARBTXERRTXATIFRXOVIFTFERFFIFTFHRFHIF
0x0746 ... 0x0747Reserved
0x0748 C1FIFOUA4L15:8 FIFOUA[15:8]
7:0 FIFOUA[7:0]
0x0748 C1FIFOUA4L(1)15:8 FIFOUA[15:8]
7:0 FIFOUA[7:0]
0x074A C1FIFOUA4H15:8 FIFOUA[31:24]
7:0 FIFOUA[23:16]
0x074A C1FIFOUA4H(1)15:8 FIFOUA[31:24]
7:0 FIFOUA[23:16]
0x074C C1FIFOCON5L15:8FRESET TXREQ UINC
7:0TXENRTRENRXTSENTXATIERXOVIETFERFFIETFHRFHIETFNRFNIE
0x074EC1FIFOCON5H15:8PLSIZE[2:0]FSIZE[4:0]
7:0TXAT[1:0]TXPRI[4:0]
0x0750C1FIFOSTA515:8FIFOCI[4:0]
7:0TXABTTXLARBTXERRTXATIFRXOVIFTFERFFIFTFHRFHIFTFNRFNIF
0x0750C1FIFOSTA515:8FIFOCI[4:0]
7:0TXABTTXLARBTXERRTXATIFRXOVIFTFERFFIFTFHRFHIFTFNRFNIF
0x0752 ... 0x0753Reserved
0x0754C1FIFOUA5L15:8 FIFOUA[15:8]
7:0FIFOUA[7:0]
0x0754C1FIFOUA5L(1)15:8 FIFOUA[15:8]
7:0FIFOUA[7:0]
0x0756C1FIFOUA5H15:8 FIFOUA[31:24]
7:0 FIFOUA[23:16]
0x0756C1FIFOUA5H(1)15:8 FIFOUA[31:24]
7:0 FIFOUA[23:16]
0x0758 C1FIFOCON6L15:8FRESET TXREQ UINC
7:0TXENRTRENRXTSENTXATIERXOVIETFERFFIETFHRFHIETFNRFNIE
0x075AC1FIFOCON6H15:8PLSIZE[2:0]FSIZE[4:0]
7:0TXAT[1:0]TXPRI[4:0]
0x075CC1FIFOSTA615:8FIFOCI[4:0]
7:0TXABTTXLARBTXERRTXATIFRXOVIFTFERFFIFTFHRFHIFTFNRFNIF
0x075CC1FIFOSTA615:8FIFOCI[4:0]
7:0TXABTTXLARBTXERRTXATIFRXOVIFTFERFFIFTFHRFHIFTFNRFNIF
0x075E ... 0x075FReserved
0x0760C1FIFOUA6L15:8 FIFOUA[15:8]
7:0FIFOUA[7:0]
0x0760C1FIFOUA6L(1)15:8 FIFOUA[15:8]
7:0FIFOUA[7:0]
0x0762C1FIFOUA6H15:8 FIFOUA[31:24]
7:0 FIFOUA[23:16]
0x0762C1FIFOUA6H(1)15:8 FIFOUA[31:24]
7:0 FIFOUA[23:16]
0x0764 C1FIFOCON7L15:8FRESET TXREQ UINC
7:0TXENRTRENRXTSENTXATIERXOVIETFERFFIETFHRFHIETFNRFNIE
0x0766C1FIFOCON7H15:8PLSIZE[2:0]FSIZE[4:0]
7:0TXAT[1:0]TXPRI[4:0]
0x0768C1FIFOSTA715:8FIFOCI[4:0]
7:0TXABTTXLARBTXERRTXATIFRXOVIFTFERFFIFTFHRFHIFTFNRFNIF
0x0768C1FIFOSTA715:8FIFOCI[4:0]
7:0TXABTTXLARBTXERRTXATIFRXOVIFTFERFFIFTFHRFHIFTFNRFNIF
0x076A ... 0x076BReserved
0x076CC1FIFOUA7L15:8 FIFOUA[15:8]
7:0FIFOUA[7:0]
0x076CC1FIFOUA7L(1)15:8 FIFOUA[15:8]
7:0FIFOUA[7:0]
0x076EC1FIFOUA7H15:8 FIFOUA[31:24]
7:0 FIFOUA[23:16]
0x076EC1FIFOUA7H(1)15:8 FIFOUA[31:24]
7:0 FIFOUA[23:16]

......continued

OffsetName Bit Pos. 76543210
0x0770 C1FLTCON0L15:8 FLTENb FbBP[4:0]
7:0 FLTENa FaBP[4:0]
0x0772 C1FLTCON0H15:8 FLTENd FdBP[4:0]
7:0 FLTENc FcBP[4:0]
0x0774 C1FLTCON1L15:8 FLTENb FbBP[4:0]
7:0 FLTENa FaBP[4:0]
0x0776 C1FLTCON1H15:8 FLTENd FdBP[4:0]
7:0 FLTENc FcBP[4:0]
0x0778 C1FLTCON2L15:8 FLTENb FbBP[4:0]
7:0 FLTENa FaBP[4:0]
0x077A C1FLTCON2H15:8 FLTENd FdBP[4:0]
7:0 FLTENc FcBP[4:0]
0x077C C1FLTCON3L15:8 FLTENb FbBP[4:0]
7:0 FLTENa FaBP[4:0]
0x077E C1FLTCON3H15:8 FLTENd FdBP[4:0]
7:0 FLTENc FcBP[4:0]
0x0780 C1FLTOBJOL15:8 EID[4:0]SID[10:8]
7:0SID[7:0]
0x0782C1FLTOBJOH15:8EXIDESID11EID[17:13]
7:0EID[12:5]
0x0784 C1MASKOL15:8MEID[4:0]MSID[10:8]
7:0MSID[7:0]
0x0786C1MASKOH15:8MIDEMSID11MEID[17:13]
7:0MEID[12:5]
0x0788 C1FLTOBJ1L15:8 EID[4:0]SID[10:8]
7:0SID[7:0]
0x078A C1FLTOBJ1H15:8EXIDESID11EID[17:13]
7:0EID[12:5]
0x078C C1MASK1L15:8MEID[4:0]MSID[10:8]
7:0MSID[7:0]
0x078EC1MASK1H15:8MIDEMSID11MEID[17:13]
7:0MEID[12:5]
0x0790 C1FLTOBJ2L15:8 EID[4:0]SID[10:8]
7:0SID[7:0]
0x0792C1FLTOBJ2H15:8EXIDESID11EID[17:13]
7:0EID[12:5]
0x0794 C1MASK2L15:8MEID[4:0]MSID[10:8]
7:0MSID[7:0]
0x0796C1MASK2H15:8MIDEMSID11MEID[17:13]
7:0MEID[12:5]
0x0798 C1FLTOBJ3L15:8 EID[4:0]SID[10:8]
7:0SID[7:0]
0x079A C1FLTOBJ3H15:8EXIDESID11EID[17:13]
7:0EID[12:5]
0x079C C1MASK3L15:8MEID[4:0]MSID[10:8]
7:0MSID[7:0]
0x079EC1MASK3H15:8MIDEMSID11MEID[17:13]
7:0MEID[12:5]
0x07A0C1FLTOBJ4L15:8 EID[4:0]SID[10:8]
7:0SID[7:0]
0x07A2 C1FLTOBJ4H15:8EXIDESID11EID[17:13]
7:0EID[12:5]
0x07A4C1MASK4L15:8MEID[4:0]MSID[10:8]
7:0MSID[7:0]
0x07A6C1MASK4H15:8MIDEMSID11MEID[17:13]
7:0MEID[12:5]
0x07A8C1FLTOBJ5L15:8 EID[4:0]SID[10:8]
7:0SID[7:0]
0x07AA C1FLTOBJ5H15:8EXIDESID11EID[17:13]
7:0EID[12:5]
0x07AC C1MASK5L15:8 MEID[4:0] MSID[10:8]
7:0 MSID[7:0]
0x07AE C1MASK5H15:8 MIDE MSID11 MEID[17:13]
7:0 MEID[12:5]
0x07B0C1FLTOBJ6L15:8 EID[4:0]SID[10:8]
7:0 SID[7:0]
0x07B2C1FLTOBJ6H15:8 EXIDE SID11EID[17:13]
7:0 EID[12:5]
0x07B4 C1MASK6L15:8 MEID[4:0] MSID[10:8]
7:0 MSID[7:0]
0x07B6 C1MASK6H15:8 MIDE MSID11 MEID[17:13]
7:0 MEID[12:5]
0x07B8C1FLTOBJ7L15:8 EID[4:0]SID[10:8]
7:0 SID[7:0]
0x07BAC1FLTOBJ7H15:8 EXIDE SID11EID[17:13]
7:0 EID[12:5]
0x07BC C1MASK7L15:8 MEID[4:0] MSID[10:8]
7:0 MSID[7:0]
0x07BE C1MASK7H15:8 MIDE MSID11 MEID[17:13]
7:0 MEID[12:5]
0x07C0C1FLTOBJ8L15:8 EID[4:0]SID[10:8]
7:0 SID[7:0]
0x07C2C1FLTOBJ8H15:8 EXIDE SID11EID[17:13]
7:0 EID[12:5]
0x07C4 C1MASK8L15:8 MEID[4:0] MSID[10:8]
7:0 MSID[7:0]
0x07C6 C1MASK8H15:8 MIDE MSID11 MEID[17:13]
7:0 MEID[12:5]
0x07C8C1FLTOBJ9L15:8 EID[4:0]SID[10:8]
7:0 SID[7:0]
0x07CAC1FLTOBJ9H15:8 EXIDE SID11EID[17:13]
7:0 EID[12:5]
0x07CC C1MASK9L15:8 MEID[4:0] MSID[10:8]
7:0 MSID[7:0]
0x07CE C1MASK9H15:8 MIDE MSID11 MEID[17:13]
7:0 MEID[12:5]
0x07D0C1FLTOBJ10L15:8 EID[4:0]SID[10:8]
7:0 SID[7:0]
0x07D2C1FLTOBJ10H15:8 EXIDE SID11EID[17:13]
7:0 EID[12:5]
0x07D4C1MASK10L15:8 MEID[4:0] MSID[10:8]
7:0 MSID[7:0]
0x07D6C1MASK10H15:8 MIDE MSID11 MEID[17:13]
7:0 MEID[12:5]
0x07D8C1FLTOBJ11L15:8 EID[4:0]SID[10:8]
7:0 SID[7:0]
0x07DAC1FLTOBJ11H15:8 EXIDE SID11EID[17:13]
7:0 EID[12:5]
0x07DCC1MASK11L15:8 MEID[4:0] MSID[10:8]
7:0 MSID[7:0]
0x07DEC1MASK11H15:8 MIDE MSID11 MEID[17:13]
7:0 MEID[12:5]
0x07E0C1FLTOBJ12L15:8 EID[4:0]SID[10:8]
7:0 SID[7:0]
0x07E2C1FLTOBJ12H15:8 EXIDE SID11EID[17:13]
7:0 EID[12:5]
0x07E4C1MASK12L15:8 MEID[4:0] MSID[10:8]
7:0 MSID[7:0]
0x07E6C1MASK12H15:8 MIDE MSID11 MEID[17:13]
7:0 MEID[12:5]
0x07E8 C1FLTOBJ13L15:8 EID[4:0] SID[10:8]
7:0 SID[7:0]
0x07EA C1FLTOBJ13H15:8 EXIDE SID11 EID[17:13]
7:0 EID[12:5]
0x07ECC1MASK13L15:8MEID[4:0]MSID[10:8]
7:0MSID[7:0]
0x07EEC1MASK13H15:8MIDEMSID11MEID[17:13]
7:0MEID[12:5]
0x07F0 C1FLTOBJ14L15:8 EID[4:0] SID[10:8]
7:0 SID[7:0]
0x07F2C1FLTOBJ14H15:8 EXIDE SID11 EID[17:13]
7:0 EID[12:5]
0x07F4C1MASK14L15:8MEID[4:0]MSID[10:8]
7:0MSID[7:0]
0x07F6C1MASK14H15:8MIDEMSID11MEID[17:13]
7:0MEID[12:5]
0x07F8 C1FLTOBJ15L15:8 EID[4:0] SID[10:8]
7:0 SID[7:0]
0x07FA C1FLTOBJ15H15:8 EXIDE SID11 EID[17:13]
7:0 EID[12:5]
0x07FCC1MASK15L15:8MEID[4:0]MSID[10:8]
7:0MSID[7:0]
0x07FEC1MASK15H15:8MIDEMSID11MEID[17:13]
7:0MEID[12:5]

11.2.1 CAN Control Register Low

Name: C1CONL

Offset: 0x6C0

Note:

  1. These bits can only be modified in Configuration mode (OPMOD[2:0] = 100).

Bit 15 14 13 12 11 10 9 8

CONSIDLBRSDISBUSYWFT[1:0]WAKFIL
AccessR/WR/WR/WR/WR/WR/WR/W
Reset00 0 0 1 1 1

Bit 76543210

CLKSELPXEDISISOCRCENDNCNT[4:0]
AccessR/WR/WR/WR/WR/WR/WR/WR/W
Reset0 1 1 0 0 0 0 0

Bit 15 - CON CAN Enable bit

ValueDescription
1CAN module is enabled
0CAN module is disabled

Bit 13 – SIDL CAN Stop in Idle Control bit

ValueDescription
1Stops module operation in Idle mode
0Does not stop module operation in Idle mode

Bit 12 - BRSDIS Bit Rate Switching (BRS) Disable bit

ValueDescription
1Bit Rate Switching is disabled, regardless of BRS in the transmit message object
0Bit Rate Switching depends on BRS in the transmit message object

Bit 11 – BUSY CAN Module is Busy bit

ValueDescription
1The CAN module is active
0The CAN module is inactive

Bits 10:9 – WFT[1:0] Selectable Wake-up Filter Time bits

ValueDescription
11 T11_FILTER
10 T10_FILTER
01 T01_FILTER
00 T00_FILTER

Bit 8 – WAKFIL Enable CAN Bus Line Wake-up Filter bit ^(1)

ValueDescription
1Uses CAN bus line filter for wake-up
0CAN bus line filter is not used for wake-up

Bit 7 – CLKSEL Module Clock Source Select bit ^(1)

ValueDescription
1Auxiliary clock is active when module is enabled
0CAN clock is active when module is enabled

Bit 6 – PXEDIS Protocol Exception Event Detection Disabled bit ^(1)

A recessive "reserved bit" following a recessive FDF bit is called a Protocol Exception.

Value Description
1Protocol Exception is treated as a form error
0If a Protocol Exception is detected, CAN will enter the Bus Integrating state

Bit 5 – ISOCRCEN Enable ISO CRC in CAN FD Frames bit ^(1)

Value Description
1Includes stuff bit count in CRC field and uses non-zero CRC initialization vector
0Does not include stuff bit count in CRC field and uses CRC initialization vector with all zeros

Bits 4:0 – DNCNT[4:0] DeviceNet™ Filter Bit Number bits

Value Description
10011-11111Invalid selection (compares up to 18 bits of data with EID)
10010Compares up to Data Byte 2, bit 6 with EID17
. . .
00001Compares up to Data Byte 0, bit 7 with EID0
00000Does not compare data bytes

11.2.2 CAN Control Register High

Name: C1CONH

Offset: 0x6C2

Note:

  1. These bits can only be modified in Configuration mode (OPMOD[2:0] = 100).

Legend: S = Settable bit; HC = Hardware Clearable bit

Bit 15 14 13 12 11 10 9 8

TXBWS[3:0] ABAT REQOP[2:0]
AccessR/W R/W R/W R/W S/HC R/W R/W R/W
Reset0 0 0 0 0 1 0 0
Bit7 6 5 4 3 2 1 0
OPMOD[2:0]TXQENSTEFSERRLOMESIGMRTXAT
AccessRRRR/W R/W R/W R/W R/W
Reset1 0 0 1 1 0 0 0

Bits 15:12 - TXBWS[3:0] Transmit Bandwidth Sharing bits

ValueDescription
1111-11004096
10112048
10101024
1001512
1000256
0111128
011064
010132
010016
00118
00104
00012
0000No delay

Bit 11 - ABAT Abort All Pending Transmissions bit

ValueDescription
1Signals all transmit buffers to abort transmission
0Module will clear this bit when all transmissions are aborted

Bits 10:8 – REQOP[2:0] Request Operation Mode bits

ValueDescription
111Sets Restricted Operation mode
110Sets Normal CAN 2.0 mode; error frames on CAN FD frames
101Sets External Loopback mode
100Sets Configuration mode
011Sets Listen Only mode
010Sets Internal Loopback mode
001Sets Disable mode
000Sets Normal CAN FD mode; supports mixing of full CAN FD and classic CAN 2.0 frames

Bits 7:5 – OPMOD[2:0] Operation Mode Status bits

ValueDescription
111Module is in Restricted Operation mode
Value Description
110Module is in Normal CAN 2.0 mode; error frames on CAN FD frames
101Module is in External Loopback mode
100Module is in Configuration mode
011Module is in Listen Only mode
010Module is in Internal Loopback mode
001Module is in Disable mode
000Module is in Normal CAN FD mode; supports mixing of full CAN FD and classic CAN 2.0 frames

Bit 4 – TXQEN Enable Transmit Queue bit ^(1)

Value Description
1Enables Transmit Message Queue (TXQ) and reserves space in RAM
0Does not reserve space in RAM for TXQ

Bit 3 – STEF Store in Transmit Event FIFO bit ^(1)

Value Description
1Saves transmitted messages in TEF
0Does not save transmitted messages in TEF

Bit 2 – SERRLOM Transition to Listen Only Mode on System Error bit ^(1)

Value Description
1Transitions to Listen Only mode
0Transitions to Restricted Operation mode

Bit 1 – ESIGM Transmit ESI in Gateway Mode bit ^(1)

Value Description
1ESI is transmitted as recessive when ESI of the message is high or CAN controller is error passive
0ESI reflects error status of CAN controller

Bit 0 - RTXAT Restrict Retransmission Attempts bit ^(1)

Value Description
1Restricted retransmission attempts, uses TXAT[1:0] bits (C1TXQCONH[6:5])
0Unlimited number of retransmission attempts, TXAT[1:0] bits will be ignored

11.2.3 CAN Nominal Bit Time Configuration Register Low

Name: C1NBTCFGL

Offset: 0x6C4

Note:

  1. These bits can only be modified in Configuration mode (OPMOD[2:0] = 100).
Bit 15 14 13 12 11 10 9 8
TSEG2[6:0]
AccessR/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 1 1 1 1
Bit 7 6 5 4 3 2 1 0
SJW[6:0]
AccessR/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 1 1 1 1

Bits 14:8 – TSEG2[6:0] Time Segment 2 bits (Phase Segment 2) ^(1)

ValueDescription
111 1111Length is 128 × T_Q
...
000 0000Length is 1 × T_Q

Bits 6:0 – SJW[6:0] Synchronization Jump Width bits ^(1)

ValueDescription
111 1111Length is 128 × T_Q
...
000 0000Length is 1 × T_Q

11.2.4 CAN Nominal Bit Time Configuration Register High

Name: C1NBTCFGH

Offset: 0x6C6

Note:

  1. These bits can only be modified in Configuration mode (OPMOD[2:0] = 100).

Bit 15 14 13 12 11 10 9 8

BRP[7:0]
AccessR/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0
Bit7 6 5 4 3 2 1 0
TSEG1[7:0]
AccessR/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 1 1 1 0 0

Bits 15:8 - BRP[7:0] Baud Rate Prescaler bits ^(1)

Value Description
1111 1111 T_Q = 256/F_SYS
...
0000 0000 T_Q = 1/F_SYS

Bits 7:0 - TSEG1[7:0] Time Segment 1 bits (Propagation Segment + Phase Segment 1) ^(1)

Value Description
1111 1111Length is 256 × T_Q
...
0000 0000Length is 1 × T_Q

11.2.5 CAN Data Bit Time Configuration Register Low

Name: C1DBTCFGL

Offset: 0x6C8

Note:

  1. These bits can only be modified in Configuration mode (OPMOD[2:0] = 100).

Bit 15 14 13 12 11 10 9 8

TSEG2[3:0]
Access Reset 0 0 1 1R/W R/W R/W R/W

Bit 76543210

SJW[3:0]
Access Reset 0 0 1 1R/W R/W R/W R/W

Bits 11:8 - TSEG2[3:0] Time Segment 2 bits (Phase Segment 2) ^(1)

ValueDescription
1111Length is 16 × T_Q
...
0000Length is 1 × T_Q

Bits 3:0 – SJW[3:0] Synchronization Jump Width bits ^(1)

ValueDescription
1111Length is 16 × T_Q
...
0000Length is 1 × T_Q

11.2.6 CAN Data Bit Time Configuration Register High

Name: C1DBTCFGH

Offset: 0x6CA

Note:

  1. These bits can only be modified in Configuration mode (OPMOD[2:0] = 100).

Bit 15 14 13 12 11 10 9 8

BRP[7:0]
AccessR/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0

Bit 76543210

TSEG1[4:0]
Access Reset 0 1 1 1 0R/W R/W R/W R/W R/W

Bits 15:8 - BRP[7:0] Baud Rate Prescaler bits ^(1)

ValueDescription
1111 1111 T_Q = 256/F_SYS
...
0000 0000 T_Q = 1/F_SYS

Bits 4:0 - TSEG1[4:0] Time Segment 1 bits (Propagation Segment + Phase Segment 1) ^(1)

ValueDescription
1 1111Length is 32 × T_Q
...
0 0000Length is 1 × T_Q

11.2.7 CAN Transmitter Delay Compensation Register Low

Name: C1TDCL

Offset: 0x6CC

Notes:

  1. These bits can only be modified in Configuration mode (OPMOD[2:0] = 100).
  2. T_CAN = 1/F_CAN . F_CAN is the clock which comes out of the CAN clock generator.

Bit 15 14 13 12 11 10 9 8

TDCO[6:0]
AccessR/W R/W R/W R/W R/W R/W R/W
Reset 0010000

Bit 76543210

TDCV[5:0]
Access ResetR/W R/W R/W R/W R/W R/W
0 0 0 0 0 0

Bits 14:8 – TDCO[6:0] Transmitter Delay Compensation Offset bits (Secondary Sample Point (SSP)) ^(1,2)

ValueDescription
111 1111 -64 × T_CAN
. . .
011 1111 63 × T_CAN
. . .
000 0000 0 × T_CAN

Bits 5:0 – TDCV[5:0] Transmitter Delay Compensation Value bits (Secondary Sample Point (SSP)) ^(1,2)

ValueDescription
11 1111 63 × T_SYSCLK
. . .
00 0000 0 × T_SYSCLK

11.2.8 CAN Transmitter Delay Compensation Register High

Name: C1TDCH

Offset: 0x6CE

Note:

  1. These bits can only be modified in Configuration mode (OPMOD[2:0] = 100).

Bit 15 14 13 12 11 10 9 8

EDGFLTEN SID11EN
Access Reset 0 0R/W R/W

Bit 76543210

TDCMOD[1:0]
Access Reset 10R/W R/W

Bit 9 – EDGFLTEN Enable Edge Filtering During Bus Integration State bit ^(1)

ValueDescription
1Edge filtering is enabled according to ISO11898-1:2015
0Edge filtering is disabled

Bit 8 – SID11EN Enable 12-Bit SID in CAN FD Base Format Messages bit ^(1)

ValueDescription
1RRS is used as SID11 in CAN FD base format messages: SID 11 : 0 = \ SID[10:0],SID11 \
0Does not use RRS; SID[10:0]

Bits 1:0 – TDCMOD[1:0] Transmitter Delay Compensation Mode bits (Secondary Sample Point (SSP)) ^(1)

ValueDescription
10-11Auto: Measures delay and adds TSEG1[4:0] (C1DBTCFGH[4:0]), adds TDCO[6:0]
01Manual: Does not measure, uses TDCV[5:0] + TDCO[6:0] from register
00Disabled

11.2.9 CAN Time Base Counter Register Low

Name: C1TBCL

Offset: 0x6D0

Notes:

  1. The Time Base Counter (TBC) will be stopped and reset when TBCEN = 0 to save power.
  2. The TBC prescaler count will be reset on any write to CxTBCH/L (TBCPREx will be unaffected).

Bit 15 14 13 12 11 10 9 8

TBC[15:8]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

TBC[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 15:0 - TBC[15:0] CAN Time Base Counter bits ^(1,2)

This is a free-running timer that increments every TBCPREx clock when TBCEN is set.

11.2.10 CAN Time Base Counter Register High

Name: C1TBCH

Offset: 0x6D2

Notes:

  1. The Time Base Counter (TBC) will be stopped and reset when TBCEN = 0 to save power.
  2. The TBC prescaler count will be reset on any write to CxTBCH/L (TBCPREx will be unaffected).

Bit 15 14 13 12 11 10 9 8

TBC[31:24]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

TBC[23:16]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 15:0 – TBC[31:16] CAN Time Base Counter bits ^(1,2)

This is a free-running timer that increments every TBCPREx clock when TBCEN is set.

11.2.11 CANx Timestamp Control Register Low

Name: CxTSCONL

Offset: 0x594, 0x6D4

Bit 15 14 13 12 11 10 9 8

TBCPRE[9:8]
Access Reset 0 0R/W R/W

Bit 76543210

TBCPRE[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 9:0 - TBCPRE[9:0] CAN Time Base Counter Prescaler bits

Value Description
1023TBC increments every 1024 clocks
. . .
0TBC increments every 1 clock

11.2.12 CANx Timestamp Control Register High

Name: CxTSCONH

Offset: 0x596, 0x6D6

Bit 15 14 13 12 11 10 9 8

Microchip dsPIC33CK1024MP708 - CANx Timestamp Control Register High - 1

text_image Access Reset

Bit 76543210

Microchip dsPIC33CK1024MP708 - CANx Timestamp Control Register High - 2

text_image TSRES TSEOF TBCEN Access Reset R/W R/W R/W 0 0 0

Bit 2 – TSRES Timestamp Reset bit (CAN FD frames only)

ValueDescription
1At sample point of the bit following the FDF bit
0At sample point of Start-of-Frame (SOF)

Bit 1 – TSEOF Timestamp End-of-Frame (EOF) bit

ValueDescription
1Timestamp when frame is taken valid (11898-1 10.7):• RX no error until last, but one bit of EOF• TX no error until the end of EOF
0Timestamp at “beginning” of frame:• Classical Frame: At sample point of SOF• FD Frame: see TSRES bit

Bit 0 – TBCEN Time Base Counter Enable bit

ValueDescription
1Enables TBC
0Stops and resets TBC

11.2.13 CANx Interrupt Code Register Low

Name: CxVECL

Offset: 0x598, 0x6D8

Bit 15 14 13 12 11 10 9 8

FILH|T[4:0]
AccessRRRRR
Reset 00000

Bit 76543210

ICODE[6:0]
AccessRRRRRRR
Reset1000000

Bits 12:8 - FILHIT[4:0] Filter Hit Number bits

ValueDescription
01111Filter 15
01110Filter 14
. . .
00001Filter 1
00000Filter 0

Bits 6:0 – ICODE[6:0] Interrupt Flag Code bits

ValueDescription
1001011-1111111Reserved
1001010Transmit attempt interrupt (any bit in C1TXATIF is set)
1001001Transmit event FIFO interrupt (any bit in C1TEFSTA is set)
1001000Invalid message occurred (IVMIF/IE)
1000111CAN module mode change occurred (MODIF/IE)
1000110CAN timer overflow (TBCIF/IE)
1000101RX/TX MAB overflow/underflow (RX: Message received before previous message was saved to memory; TX: Can't feed TX MAB fast enough to transmit consistent data)
1000100Address error interrupt (illegal FIFO address presented to system)
1000011Receive FIFO overflow interrupt (any bit in C1RXOVIF is set)
1000010Wake-up interrupt (WAKIF/WAKIE)
1000001Error interrupt (CERRIF/IE)
1000000No interrupt
0001000-0111111Reserved
0000111FIFO 7 interrupt (TFIF7 or RFIF7 is set)
...
0000001FIFO 1 interrupt (TFIF1 or RFIF1 is set)
0000000FIFO 0 interrupt (TFIFO is set)

11.2.14 CANx Interrupt Code Register High

Name: CxVECH

Offset: 0x59A, 0x6DA

Microchip dsPIC33CK1024MP708 - CANx Interrupt Code Register High - 1

text_image Bit 15 14 13 12 11 10 9 8 RXCODE[6:0] Access R R R R R R R Reset 1 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 TXCODE[6:0] Access R R R R R R R Reset 1 0 0 0 0 0 0

Bits 14:8 – RXCODE[6:0] Receive Interrupt Flag Code bits

Value Description
1000001-1111111Reserved
1000000No interrupt
0001000-0111111Reserved
0000111FIFO 7 interrupt (RFIF7 is set)
...
0000010FIFO 2 interrupt (RFIF2 is set)
0000001FIFO 1 interrupt (RFIF1 is set)
0000000Reserved; FIFO 0 cannot receive

Bits 6:0 - TXCODE[6:0] Transmit Interrupt Flag Code bits

ValueDescription
1000001-1111111Reserved
1000000No interrupt
0001000-0111111Reserved
0000111FIFO 7 interrupt (TFIF7 is set)
...
0000001FIFO 1 interrupt (TFIF1 is set)
0000000FIFO 0 interrupt (TFIFO is set)

11.2.15 CANx Interrupt Register Low

Name: CxINTL

Offset: 0x59C, 0x6DC

Note:

  1. CxINTL: Flags are set by hardware and cleared by application.

Legend: C = Clearable bit; HS = Hardware Settable bit

Bit 15 14 13 12 11 10 9 8

IVMIF WAKIF CERRIF SERRIF RXOVIF TXATIF
AccessHS/CHS/CHS/CHS/CRR
Reset0 0 0 0 0 0

Bit 76543210

TEFIFMODIFTBCIFRXIFTXIF
AccessRHS/CHS/CRR
Reset0 0 0 0 0

Bit 15 - IVMIF Invalid Message Interrupt Flag bit ^(1)

ValueDescription
1Invalid message interrupt occurred
0No invalid message interrupt

Bit 14 – WAKIF Bus Wake-up Activity Interrupt Flag bit ^(1)

ValueDescription
1Wake-up activity interrupt occurred
0No wake-up activity interrupt

Bit 13 - CERRIF CAN Bus Error Interrupt Flag bit ^(1)

ValueDescription
1CAN bus error interrupt occurred
0No CAN bus error interrupt

Bit 12 - SERRIF System Error Interrupt Flag bit ^(1)

ValueDescription
1System error interrupt occurred
0No system error interrupt

Bit 11 - RXOVIF Receive Buffer Overflow Interrupt Flag bit

ValueDescription
1Receive buffer overflow interrupt occurred
0No receive buffer overflow interrupt

Bit 10 - TXATIF Transmit Attempt Interrupt Flag bit

ValueDescription
1Transmit attempt interrupt occurred
0No transmit attempt interrupt

Bit 4 – TEFIF Transmit Event FIFO Interrupt Flag bit

ValueDescription
1Transmit event FIFO interrupt occurred
0No transmit event FIFO interrupt

Bit 3 – MODIF CAN Mode Change Interrupt Flag bit ^(1)

Value Description
1CAN module mode change occurred (OPMOD[2:0] have changed to reflect REQOP[2:0])
0No mode change occurred

Bit 2 – TBCIF CAN Timer Overflow Interrupt Flag bit ^(1)

Value Description
1TBC has overflowed
0TBC has not overflowed

Bit 1 – RXIF Receive Object Interrupt Flag bit

Value Description
1Receive object interrupt is pending
0No receive object interrupts are pending

Bit 0 – TXIF Transmit Object Interrupt Flag bit

Value Description
1Transmit object interrupt is pending
0No transmit object interrupts are pending

11.2.16 CANx Interrupt Register High

Name: CxINTH

Offset: 0x59E, 0x6DE

Bit 15 14 13 12 11 10 9 8

IVMIE WAKIE CERRIE SERRIE RXOVIE TXATIE
AccessR/WR/WR/WR/WR/WR/W
Reset0 0 0 0 0 0

Bit 76543210

TEFIE MODIE TBCIERXIETXIE
AccessR/WR/WR/WR/WR/W
Reset0 0 0 0 0

Bit 15 – IVMIE Invalid Message Interrupt Enable bit

ValueDescription
1Invalid message interrupt is enabled
0Invalid message interrupt is disabled

Bit 14 – WAKIE Bus Wake-up Activity Interrupt Enable bit

ValueDescription
1Wake-up activity interrupt is enabled
0Wake-up Activity Interrupt is disabled

Bit 13 – CERRIE CAN Bus Error Interrupt Enable bit

ValueDescription
1CAN bus error interrupt is enabled
0CAN bus error interrupt is disabled

Bit 12 – SERRIE System Error Interrupt Enable bit

ValueDescription
1System error interrupt is enabled
0System error interrupt is disabled

Bit 11 – RXOVIE Receive Buffer Overflow Interrupt Enable bit

ValueDescription
1Receive buffer overflow interrupt is enabled
0Receive buffer overflow interrupt is disabled

Bit 10 - TXATIE Transmit Attempt Interrupt Enable bit

ValueDescription
1Transmit attempt interrupt is enabled
0Transmit attempt interrupt is disabled

Bit 4 – TEFIE Transmit Event FIFO Interrupt Enable bit

ValueDescription
1Transmit event FIFO interrupt is enabled
0Transmit event FIFO interrupt is disabled

Bit 3 – MODIE Mode Change Interrupt Enable bit

ValueDescription
1Mode change interrupt is enabled
0Mode change interrupt is disabled

Bit 2 – TBCIE CAN Timer Interrupt Enable bit

Value Description
1CAN timer interrupt is enabled
0CAN timer interrupt is disabled

Bit 1 – RXIE Receive Object Interrupt Enable bit

Value Description
1Receive object interrupt is enabled
0Receive object interrupt is disabled

Bit 0 – TXIE Transmit Object Interrupt Enable bit

Value Description
1Transmit object interrupt is enabled
0Transmit object interrupt is disabled

11.2.17 CAN Receive Interrupt Status Register Low

Name: C1RXIFL

Offset: 0x6E0

Note:

  1. CxRXIFL: FIFO: RFIFx = 'or' of enabled RX FIFO flags (flags need to be cleared in the FIFO register).

Microchip dsPIC33CK1024MP708 - Note: - 1

text_image Bit 15 14 13 12 11 10 9 8 RFIF[15:8] Access R R R R R R R R Reset 0 0 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 RFIF[7:1] Access R R R R R R R R Reset 0 0 0 0 0 0 0

Bits 15:8 - RFIF[15:8] Unimplemented

Bits 7:1 – RFIF[7:1] Receive FIFO Interrupt Pending bits ^(1)

ValueDescription
1One or more enabled receive FIFO interrupts are pending
0No enabled receive FIFO interrupts are pending

11.2.18 CAN Receive Interrupt Status Register High

Name: C1RXIFH

Offset: 0x6E2

Note:

  1. CxRXIFH: FIFO: RFIFx = 'or' of enabled RX FIFO flags (flags need to be cleared in the FIFO register).
Bit 15 14 13 12 11 10 9 8
RFIF[31:24]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
RFIF[23:16]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0

Bits 15:0 – RFIF[31:16] Unimplemented ^(1)

11.2.19 CAN Transmit Interrupt Status Register Low

Name: C1TXIFL

Offset: 0x6E4

Notes:

  1. CxTXIFL: FIFO: TFIFx = 'or' of the enabled TX FIFO flags (flags need to be cleared in the FIFO register).
  2. TFIFO is for the Transmit Queue.

Bit 15 14 13 12 11 10 9 8

Microchip dsPIC33CK1024MP708 - Notes: - 1

text_image TFIF[15:8] Access R R R R R R R Reset 0 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 TFIF[7:0] Access R R R R R R R Reset 0 0 0 0 0 0 0

Bits 15:8 - TFIF[15:8] Unimplemented ^(1,2)

Bits 7:0 – TFIF[7:0] Transmit FIFO/TXQ Attempt Interrupt Pending bits ^(1,2)

Value Description
1One or more enabled transmit FIFO/TXQ interrupts are pending
0No enabled transmit FIFO/TXQ interrupts are pending

11.2.20 CAN Transmit Interrupt Status Register High

Name: C1TXIFH

Offset: 0x6E6

Note:

  1. CxTXIFH: FIFO: TFIFx = 'or' of the enabled TX FIFO flags (flags need to be cleared in the FIFO register).
Bit 15 14 13 12 11 10 9 8
TFIF[31:24]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
TFIF[23:16]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0

Bits 15:0 - TFIF[31:16] Unimplemented ^(1)

11.2.21 CAN Receive Overflow Interrupt Status Register Low

Name: C1RXOVIFL

Offset: 0x6E8

Note:

  1. CxRXOVIFL: FIFO: RFOVIFx (flag needs to be cleared in the FIFO register).

Microchip dsPIC33CK1024MP708 - Note: - 1

text_image Bit 15 14 13 12 11 10 9 8 RFOVIF[15:8] Access R R R R R R R Reset 0 0 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 RFOVIF[7:1] Access R R R R R R R Reset 0 0 0 0 0 0 0

Bits 15:8 – RFOVIF[15:8] Unimplemented ^(1)

Bits 7:1 – RFOVIF[7:1] Receive FIFO Overflow Interrupt Pending bits ^(1)

Value Description
1Interrupt is pending
0Interrupt is not pending

11.2.22 CAN Receive Overflow Interrupt Status Register High

Name: C1RXOVIFH

Offset: 0x6EA

Note:

  1. CxRXOVIFH: FIFO: RFOVIFx (flag needs to be cleared in the FIFO register).
Bit 15 14 13 12 11 10 9 8
RFOVIF[31:24]
Access R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
RFOVIF[23:16]
Access R R R R R R R
Reset 0 0 0 0 0 0 0 0

Bits 15:0 – RFOVIF[31:16] Unimplemented ^(1)

11.2.23 CAN Transmit Attempt Interrupt Status Register Low

Name: C1TXATIFL

Offset: 0x6EC

Notes:

  1. CxTXATIFL: FIFO: TFATIFx (flag needs to be cleared in the FIFO register).
  2. TFATIFO is for the Transmit Queue.

Bit 15 14 13 12 11 10 9 8

Microchip dsPIC33CK1024MP708 - Notes: - 1

text_image TFATIF[15:8] Access R R R R R R R Reset 0 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 TFATIF[7:0] Access R R R R R R R Reset 0 0 0 0 0 0 0

Bits 15:8 - TFATIF[15:8] Unimplemented ^(1)

Bits 7:0 - TFATIF[7:0] Transmit FIFO/TXQ Attempt Interrupt Pending bits ^(1,2)

Value Description
1Interrupt is pending
0Interrupt is not pending

11.2.24 CAN Transmit Attempt Interrupt Status Register High

Name: C1TXATIFH

Offset: 0x6EE

Note:

  1. CxTXATIFH: FIFO: TFATIFx (flag needs to be cleared in the FIFO register).
Bit 15 14 13 12 11 10 9 8
TFATIF[31:24]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
TFATIF[23:16]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0

Bits 15:0 - TFATIF[31:16] Unimplemented ^(1)

11.2.25 CANx Transmit Request Register Low

Name: CxTXREQL

Offset: 0x5B0, 0x6F0

Legend: S = Settable bit; HC = Hardware Clearable bit

Bit 15 14 13 12 11 10 9 8

TXREQ[15:8]

Access S/HC S/HC S/HC S/HC S/HC S/HC S/HC

Reset 00000000

Bit 76543210

TXREQ[7:1] TXREQ0

Access S/HC S/HC S/HC S/HC S/HC S/HC S/HC

Reset 00000000

Bits 15:8 - TXREQ[15:8] Unimplemented

Bits 7:1 - TXREQ[7:1] Message Send Request bits

TXEN = 1 (object configured as a transmit object):

Setting this bit to '1' requests sending a message. The bit will automatically clear when the message(s) queued in the object is (are) successfully sent. This bit can NOT be used for aborting a transmission.

TXEN = 0 (object configured as a receive object):

This bit has no effect.

Bit 0 - TXREQ0 Transmit Queue Message Send Request bit

Setting this bit to '1' requests sending a message. The bit will automatically clear when the message(s) queued in the object is (are) successfully sent. This bit can NOT be used for aborting a transmission.

11.2.26 CANx Transmit Request Register High

Name: CxTXREQH

Offset: 0x5B2, 0x6F2

Legend: S = Settable bit; HC = Hardware Clearable bit

Bit 15 14 13 12 11 10 9 8

TXREQ[31:24]

Access S/HC S/HC S/HC S/HC S/HC S/HC S/HC

Reset 00000000

Bit 76543210

TXREQ[23:16]

Access S/HC S/HC S/HC S/HC S/HC S/HC S/HC

Reset 00000000

Bits 15:0 - TXREQ[31:16] Unimplemented

11.2.27 CANx Transmit/Receive Error Count Register Low

Name: CxTRECL

Offset: 0x5B4, 0x6F4

Microchip dsPIC33CK1024MP708 - CANx Transmit/Receive Error Count Register Low - 1

text_image Bit 15 14 13 12 11 10 9 8 TERRCNT[7:0] Access R R R R R R R R Reset 0 0 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 RERRCNT[7:0] Access R R R R R R R R R Reset 0 0 0 0 0 0 0 0

Bits 15:8 - TERRCNT[7:0] Transmit Error Counter bits

Bits 7:0 – RERRCNT[7:0] Receive Error Counter bits

11.2.28 CANx Transmit/Receive Error Count Register High

Name: CxTRECH

Offset: 0x5B6, 0x6F6

Microchip dsPIC33CK1024MP708 - CANx Transmit/Receive Error Count Register High - 1

text_image Bit 15 14 13 12 11 10 9 8 Access Reset Bit 7 6 5 4 3 2 1 0 TXBO TXBP RXBP TXWARN RXWARN EWARN R R R Access R R R R R Reset 100000

Bit 5 - TXBO Transmitter in Bus Off Error State bit (TERRCNT[7:0] > 255)

In Configuration mode, TXBO is set since the module is not on the bus.

Bit 4 - TXBP Transmitter in Bus Passive Error State bit (TERRCNT[7:0] > 127)

Bit 3 - RXBP Receiver in Bus Passive Error State bit (RERRCNT[7:0] > 127)

Bit 2 - TXWARN Transmitter in Warning State bit (128 > TERRCNT[7:0] > 95)

Bit 1 - RXWARN Receiver in Warning State bit (128 > RERRCNT[7:0] > 95)

Bit 0 – EWARN Transmitter or Receiver in Warning State bit

11.2.29 CANx Bus Diagnostics Register 0 Low

Name: CxBDIAGOL

Offset: 0x5B8, 0x6F8

Bit 15 14 13 12 11 10 9 8

NTERRCNT[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

NRERRCNT[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 15:8 – NTERRCNT[7:0] Nominal Bit Rate Transmit Error Counter bits

Bits 7:0 - NRERRCNT[7:0] Nominal Bit Rate Receive Error Counter bits

11.2.30 CANx Bus Diagnostics Register 0 High

Name: CxBDIAGOH

Bits 7:0 – DRERRCNT[7:0] Data Bit Rate Receive Error Counter bits

11.2.31 CANx Bus Diagnostics Register 1 Low

Name: CxBDIAG1L

Offset: 0x5BC, 0x6FC

Bit 15 14 13 12 11 10 9 8

EFMSGCNT[15:8]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

EFMSGCNT[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 15:0 – EFMSGCNT[15:0] Error-Free Message Counter bits

11.2.32 CANx Bus Diagnostics Register 1 High

Name: CxBDIAG1H

Offset: 0x5BE, 0x6FE

Bit 15 14 13 12 11 10 9 8

DLCMM ESIDCRCERR DSTUFERR DFORMERRDBIT1ERRDBITOERR
AccessR/WR/WR/WR/WR/WR/WR/W
Reset0 0 0 0 00 0

Bit 76543210

TXBOERRNCRCERRNSTUFERRNFORMERRNACKERRNBIT1ERRNBITOERR
AccessR/WR/WR/WR/WR/WR/WR/W
Reset00 0 0 0 0 0

Bit 15 – DLCMM DLC Mismatch bit

During a transmission or reception, the specified DLC is larger than the PLSIZE[2:0] of the FIFO element.

Bit 14 – ESI ESI Flag of a Received CAN FD Message Set bit

Bit 13 - DCRCERR Same as for nominal bit rate

Bit 12 - DSTUFERR Same as for nominal bit rate

Bit 11 - DFORMERR Same as for nominal bit rate

Bit 9 – DBIT1ERR Same as for nominal bit rate

Bit 8 – DBITOERR Same as for nominal bit rate

Bit 7 – TXBOERR Device Went to Bus Off bit (and auto-recovered)

Bit 5 – NCRCERR Received Message with CRC Incorrect Checksum bit

The CRC checksum of a received message was incorrect. The CRC of an incoming message does not match with the CRC calculated from the received data.

Bit 4 – NSTUFERR Received Message with Illegal Sequence bit

More than five equal bits in a sequence have occurred in a part of a received message where this is not allowed.

Bit 3 – NFORMERR Received Frame Fixed Format bit

A fixed format part of a received frame has the wrong format.

Bit 2 – NACKERR Transmitted Message Not Acknowledged bit

Transmitted message was not Acknowledged.

Bit 1 – NBIT1ERR Transmitted Message Recessive Level bit

During the transmission of a message (with the exception of the arbitration field), the device wanted to send a recessive level (bit of logical value '1'), but the monitored bus value was dominant.

Bit 0 – NBITOERR Transmitted Message Dominant Level bit

During the transmission of a message (or Acknowledge bit, active error flag or overload flag), the device wanted to send a dominant level (data or identifier bit of logical value '0'), but the monitored bus value was recessive. During bus off recovery, this status is set each time a sequence of 11 recessive bits has been monitored. This enables the

CPU to monitor the proceeding of the bus off recovery sequence (indicating the bus is not stuck at dominant or continuously disturbed).

11.2.33 CANx Transmit Event FIFO Control Register Low

Name: CxTEFCONL

Offset: 0x5C0, 0x700

Note:

  1. These bits can only be modified in Configuration mode (OPMOD[2:0] = 100).

Legend: HC = Hardware Clearable bit; S = Settable bit

Bit 15 14 13 12 11 10 9 8

FRESET UINC
Access Reset 0S/HC S/HC

Bit 76543210

TEFTSENTEFOVIETEFFIETEFHIETEFNEIE
AccessR/WR/WR/WR/WR/W
Reset00 0 0 0

Bit 10 - FRESET FIFO Reset bit

ValueDescription
1FIFO will be reset when bit is set, cleared by hardware when FIFO is reset; the user should poll whether this bit is clear before taking any action
0No effect

Bit 8 – UINC Increment Tail bit

ValueDescription
1When this bit is set, the FIFO tail will increment by a single message
0FIFO tail will not increment

Bit 5 – TEFTSEN Transmit Event FIFO Timestamp Enable bit ^(1)

ValueDescription
1Timestamps elements in TEF
0Does not timestamp elements in TEF

Bit 3 – TEFOVIE Transmit Event FIFO Overflow Interrupt Enable bit

ValueDescription
1Interrupt is enabled for overflow event
0Interrupt is disabled for overflow event

Bit 2 – TEFFIE Transmit Event FIFO Full Interrupt Enable bit

ValueDescription
1Interrupt is enabled for FIFO full
0Interrupt is disabled for FIFO full

Bit 1 – TEFHIE Transmit Event FIFO Half Full Interrupt Enable bit

ValueDescription
1Interrupt is enabled for FIFO half full
0Interrupt is disabled for FIFO half full

Bit 0 – TEFNEIE Transmit Event FIFO Not Empty Interrupt Enable bit

ValueDescription
1Interrupt is enabled for FIFO not empty
0Interrupt is disabled for FIFO not empty

11.2.34 CANx Transmit Event FIFO Control Register High

Name: CxTEFCONH

Offset: 0x5C2, 0x702

Note:

  1. These bits can only be modified in Configuration mode (OPMOD[2:0] = 100).

Legend: HC = Hardware Clearable bit; S = Settable bit

Bit 15 14 13 12 11 10 9 8

FSIZE[4:0]
Access Reset 0 0 0 0 0R/W R/W R/W R/W R/W
Bit 7 6 5 4 3 2 1 0
Access Reset

Bits 12:8 – FSIZE[4:0] FIFO Size bits ^(1)

ValueDescription
11111FIFO is 32 messages deep
...
00010FIFO is 3 messages deep
00001FIFO is 2 messages deep
00000FIFO is 1 message deep

11.2.35 CANx Transmit Event FIFO Status Register

Name: CxTEFSTA

Offset: 0x5C4, 0x704

Note:

  1. These bits are read-only and reflect the status of the FIFO.

Legend: HC = Hardware Clearable bit; S = Settable bit

Bit 15 14 13 12 11 10 9 8

Access Reset

Bit 76543210

TEFOVIF TEFFIFTEFHIF TEFNEIF
Access ResetS/HC0 0 0 0 0RRR

Bit 3 – TEFOVIF Transmit Event FIFO Overflow Interrupt Flag bit

ValueDescription
1Overflow event has occurred
0No Overflow event has occurred

Bit 2 - TEFFIF Transmit Event FIFO Full Interrupt Flag bit ^(1)

ValueDescription
1FIFO is full
0FIFO is not full

Bit 1 – TEFHIF Transmit Event FIFO hALF Full Interrupt Flag bit ^(1)

ValueDescription
1FIFO is ≥ half full
0FIFO is < half full

Bit 0 – TEFNEIF Transmit Event FIFO Not Empty Interrupt Enable Flag bit ^(1)

ValueDescription
1FIFO is not empty
0FIFO is empty

11.2.36 CANx Transmit Event FIFO User Address Register Low

Name: CxTEFUAL (1)

Offset: 0x5C8, 0x708

Note:

  1. This register is not ensured to read correctly in Configuration mode and should only be accessed when the module is not in Configuration mode.

Legend: x = Bit is unknown

Microchip dsPIC33CK1024MP708 - Note: - 1

text_image Bit 15 14 13 12 11 10 9 8 TEFUA[15:8] Access R R R R R R R R Reset 0 0 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 TEFUA[7:0] Access R R R R R R R R R Reset 0 0 0 0 0 0 0 x

Bits 15:0 – TEFUA[15:0] Transmit Event FIFO User Address bits

A read of this register will return the address where the next event is to be read (FIFO tail).

11.2.37 CANx Transmit Event FIFO User Address Register High

Name: CxTEFUAH (1)

Offset: 0x5CA, 0x70A

Note:

  1. This register is not ensured to read correctly in Configuration mode and should only be accessed when the module is not in Configuration mode.

Legend: x = Bit is unknown

Microchip dsPIC33CK1024MP708 - Note: - 1

text_image Bit 15 14 13 12 11 10 9 8 TEFUA[31:24] Access R R R R R R R R Reset 0 0 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 TEFUA[23:16] Access R R R R R R R R R Reset 0 0 0 0 0 0 0 x

Bits 15:0 – TEFUA[31:16] Transmit Event FIFO User Address bits

A read of this register will return the address where the next event is to be read (FIFO tail).

11.2.38 CAN Message Memory Base Address Register Low

Name: CxFIFOBAL

Offset: 0x5CC, 0x70C

Bit 15 14 13 12 11 10 9 8

FIFOBA[15:8]
AccessR/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0
Bit7 6 5 4 3 2 1 0
FIFOBA[7:0]
AccessR/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0

Bits 15:0 – FIFOBA[15:0] Message Memory Base Address bits

Defines the base address for the transmit event FIFO followed by the message objects.

11.2.39 CAN Message Memory Base Address Register High

Name: CxFIFOBAH

Offset: 0x5CE, 0x70E

Bit 15 14 13 12 11 10 9 8

FIFOBA[31:24]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

FIFOBA[23:16]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 15:0 - FIFOBA[31:16] Message Memory Base Address bits

Defines the base address for the transmit event FIFO followed by the message objects.

11.2.40 CANx Transmit Queue Control Register Low

Name: CxTXQCONL

Offset: 0x5D0, 0x710

Legend: HS = Hardware Settable bit; C = Clearable bit

Bit 15 14 13 12 11 10 9 8

FRESET TXREQ UINC
Access Reset 0 0 0R/W R/W R/W

Bit 76543210

TXENTXATIETXQEIETXQNIE
AccessRHS/CR/WR/W
Reset0000

Bit 10 - FRESET FIFO Reset bit

ValueDescription
1FIFO will be reset when bit is set, cleared by hardware when FIFO is reset; user should poll whether this bit is clear before taking any action
0No effect

Bit 9 - TXREQ Message Send Request bit

ValueDescription
1Requests sending a message; the bit will automatically clear when all the messages queued in the TXQ are successfully sent
0Clearing the bit to ‘0’ while set (‘1’) will request a message abort

Bit 8 – UINC Increment Head/Tail bit

When this bit is set, the FIFO head will increment by a single message.

Bit 7 - TXEN TX Enable bit

Bit 4 – TXATIE Transmit Attempts Exhausted Interrupt Enable bit

ValueDescription
1Enables interrupt
0Disables interrupt

Bit 2 - TXQEIE Transmit Queue Empty Interrupt Enable bit

ValueDescription
1Interrupt is enabled for TXQ empty
0Interrupt is disabled for TXQ empty

Bit 0 - TXQNIE Transmit Queue Not Full Interrupt Enable bit

ValueDescription
1Interrupt is enabled for TXQ not full
0Interrupt is disabled for TXQ not full

11.2.41 CANx Transmit Queue Control Register High

Name: CxTXQCONH

Offset: 0x5D2, 0x712

Note:

  1. These bits can only be modified in Configuration mode (OPMOD[2:0] = 100).

Bit 15 14 13 12 11 10 9 8

PLSIZE[2:0] FSIZE[4:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0

Bit 76543210

TXAT[1:0] TXPRI[4:0]
AccessR/W R/W R/W R/W R/W R/W R/W
Reset1 100000

Bits 15:13 - PLSIZE[2:0] Payload Size bits ^(1)

ValueDescription
11164 data bytes
11048 data bytes
10132 data bytes
10024 data bytes
01120 data bytes
01016 data bytes
00112 data bytes
0008 data bytes

Bits 12:8 - FSIZE[4:0] FIFO Size bits ^(1)

ValueDescription
11111FIFO is 32 messages deep
. . .
00010FIFO is 3 messages deep
00001FIFO is 2 messages deep
00000FIFO is 1 message deep

Bits 6:5 – TXAT[1:0] Retransmission Attempts bits

This feature is enabled when RTXAT (C1CONH[0]) is set.

ValueDescription
11Unlimited number of retransmission attempts
10Unlimited number of retransmission attempts
01Three retransmission attempts
00Disables retransmission attempts

Bits 4:0 – TXPRI[4:0] Message Transmit Priority bits

ValueDescription
11111Highest message priority
. . .
00000Lowest message priority

11.2.42 CANx Transmit Queue Status Register

Name: CxTXQSTA

Offset: 0x5D4, 0x714

Notes:

  1. The TXQCI[4:0] bits give a zero-indexed value to the message in the TXQ. If the TXQ is four messages deep (FSIZE[4:0] = 3), TXQCix will take on a value of 0 to 3, depending on the state of the TXQ.

  2. This bit is updated when a message completes (or aborts) or when the TXQ is reset.

Legend: HS = Hardware Settable bit; C = Clearable bit

Bit 15 14 13 12 11 10 9 8

TXQCI[4:0]
AccessRRRRR
Reset 0 0 0 0 0

Bit 76543210

TXABTTXLARBTXERRTXATIFTXQEIFTXQNIF
AccessR R RHS/CRR
Reset0 0 0 011

Bits 12:8 - TXQCI[4:0] Transmit Message Queue Index bits ^(1)

A read of this register will return an index to the message that the FIFO will next attempt to transmit.

Bit 7 – TXABT Message Aborted Status bit ^(2)

ValueDescription
1Message was aborted
0Message completed successfully

Bit 6 – TXLARB Message Lost Arbitration Status bit

ValueDescription
1Message lost arbitration while being sent
0Message did not lose arbitration while being sent

Bit 5 – TXERR Error Detected During Transmission bit

ValueDescription
1A bus error occurred while the message was being sent
0A bus error did not occur while the message was being sent

Bit 4 – TXATIF Transmit Attempts Exhausted Interrupt Pending bit

ValueDescription
1Interrupt is pending
0Interrupt is not pending

Bit 2 - TXQEIF Transmit Queue Empty Interrupt Flag bit

ValueDescription
1TXQ is empty
0TXQ is not empty, at least one message is queued to be transmitted

Bit 0 - TXQNIF Transmit Queue Not Full Interrupt Flag bit

ValueDescription
1TXQ is not full
0TXQ is full

11.2.43 CAN Transmit Queue User Address Register Low

Name: C1TXQUAL

Offset: 0x718

Note:

  1. These register bits are not ensured to read correctly in Configuration mode and should only be accessed when the module is not in Configuration mode.

Legend: x = Bit is unknown

Microchip dsPIC33CK1024MP708 - Note: - 1

text_image Bit 15 14 13 12 11 10 9 8 Access R R R R R R R R Reset xxxxxxxx Bit 7 6 5 4 3 2 1 0 Access R R R R R R R R Reset xxxxxxxx TXQUA[15:8] TXQUA[7:0]

Bits 15:0 - TXQUA[15:0] TXQ User Address bits ^(1)

A read of this register will return the address where the next message is to be written (TXQ head).

11.2.44 CAN Transmit Queue User Address Register High

Name: C1TXQUAH

Offset: 0x71A

Note:

  1. These bits are not ensured to read correctly in Configuration mode and should only be accessed when the module is not in Configuration mode.

Legend: x = Bit is unknown

Microchip dsPIC33CK1024MP708 - Note: - 1

text_image Bit 15 14 13 12 11 10 9 8 Access R R R R R R R R Reset 0 0 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 Access R R R R R R R R Reset x x x x x x x x x TXQUA[31:24] TXQUA[23:16]

Bits 15:0 - TXQUA[31:16] TXQ User Address bits ^(1)

A read of this register will return the address where the next message is to be written (TXQ head).

11.2.45 CAN2 FIFO Control Register x Low (x = 1 to 7)

Name: C2FIFOCONxL

Offset: 0x5DC, 0x5E8, 0x5F4, 0x600, 0x60C, 0x618, 0x624

Note:

  1. This bit can only be modified in Configuration mode (OPMOD[2:0] = 100).

Legend: S = Settable bit; HC = Hardware Clearable bit

Bit 15 14 13 12 11 10 9 8

FRESET TXREQ UINC
Access ResetS/HC R/W/HC S/HC 100

Bit 76543210

TXENRTRENRXTSENTXATIERXOVIETFERFFIETFHRFHIETFNRFNIE
AccessR/WR/WR/WR/WR/WR/WR/WR/W
Reset0 0 0 0 0 0 0

Bit 10 - FRESET FIFO Reset bit

ValueDescription
1FIFO will be reset when bit is set, cleared by hardware when FIFO is reset; user should poll whether this bit is clear before taking any action
0No effect

Bit 9 - TXREQ Message Send Request bit

TXEN = 0 (FIFO configured as a receive FIFO):

This bit has no effect

TXEN = 1 (FIFO configured as a transmit FIFO):

ValueDescription
1Requests sending a message; the bit will automatically clear when all the messages queued in the FIFO are successfully sent
0Clearing the bit to ‘0’ while set (‘1’) will request a message abort

Bit 8 – UINC Increment Head/Tail bit

TXEN = 1 (FIFO configured as a transmit FIFO):

When this bit is set, the FIFO head will increment by a single message.

TXEN = 0 (FIFO configured as a receive FIFO):

When this bit is set, the FIFO tail will increment by a single message.

Bit 7 - TXEN TX/RX Buffer Selection bit

ValueDescription
1Transmits message object
0Receives message object

Bit 6 - RTREN Auto-Remote Transmit (RTR) Enable bit

ValueDescription
1When a Remote Transmit is received, TXREQ will be set
0When a Remote Transmit is received, TXREQ will be unaffected

Bit 5 – RXTSEN Received Message Timestamp Enable bit ^(1)

ValueDescription
1Captures timestamp in received message object in RAM
0Does not capture timestamp

Bit 4 – TXATIE Transmit Attempts Exhausted Interrupt Enable bit

Value Description
1Enables interrupt
0Disables interrupt

Bit 3 – RXOVIE Overflow Interrupt Enable bit

Value Description
1Interrupt is enabled for overflow event
0Interrupt is disabled for overflow event

Bit 2 – TFERFFIE Transmit/Receive FIFO Empty/Full Interrupt Enable bit

TXEN = 1 (FIFO configured as a transmit FIFO):

Transmit FIFO Empty Interrupt Enable.

1 = Interrupt is enabled for FIFO empty

0 = Interrupt is disabled for FIFO empty

TXEN = 0 (FIFO configured as a receive FIFO):

Receive FIFO Full Interrupt Enable.

1 = Interrupt is enabled for FIFO full

0 = Interrupt is disabled for FIFO full

Bit 1 – TFHRFHIE Transmit/Receive FIFO Half Empty/Half Full Interrupt Enable bit

TXEN = 1 (FIFO configured as a transmit FIFO):

Transmit FIFO Half Empty Interrupt Enable.

1 = Interrupt is enabled for FIFO half empty

0 = Interrupt is disabled for FIFO half empty

TXEN = 0 (FIFO configured as a receive FIFO):

Receive FIFO Half Full Interrupt Enable.

1 = Interrupt is enabled for FIFO half full

0 = Interrupt is disabled for FIFO half full

Bit 0 – TFNRFNIE Transmit/Receive FIFO Not Full/Not Empty Interrupt Enable bit

TXEN = 1 (FIFO configured as a transmit FIFO):

Transmit FIFO Not Full Interrupt Enable.

1 = Interrupt is enabled for FIFO not full

0 = Interrupt is disabled for FIFO not full

TXEN = 0 (FIFO configured as a receive FIFO):

Receive FIFO Not Empty Interrupt Enable.

1 = Interrupt is enabled for FIFO not empty

0 = Interrupt is disabled for FIFO not empty

11.2.46 CAN2 FIFO Control Register x High (x = 1 to 7)

Name: C2FIFOCONxH

Offset: 0x5DE, 0x5EA, 0x5F6, 0x602, 0x60E, 0x61A, 0x626

Note:

  1. These bits can only be modified in Configuration mode (OPMOD[2:0] = 100).

Bit 15 14 13 12 11 10 9 8

PLSIZE[2:0] FSIZE[4:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0

Bit 76543210

TXAT[1:0] TXPRI[4:0]
AccessR/W R/W R/W R/W R/W R/W R/W
Reset1 100000

Bits 15:13 - PLSIZE[2:0] Payload Size bits ^(1)

ValueDescription
11164 data bytes
11048 data bytes
10132 data bytes
10024 data bytes
01120 data bytes
01016 data bytes
00112 data bytes
0008 data bytes

Bits 12:8 – FSIZE[4:0] FIFO Size bits ^(1)

ValueDescription
11111FIFO is 32 messages deep
. . .
00010FIFO is 3 messages deep
00001FIFO is 2 messages deep
00000FIFO is 1 message deep

Bits 6:5 – TXAT[1:0] Retransmission Attempts bits

This feature is enabled when RTXAT (C1CONH[0]) is set.

ValueDescription
11Unlimited number of retransmission attempts
10Unlimited number of retransmission attempts
01Three retransmission attempts
00Disables retransmission attempts

Bits 4:0 – TXPRI[4:0] Message Transmit Priority bits

ValueDescription
11111Highest message priority
. . .
00000Lowest message priority

11.2.47 CAN FIFO Status Register x (x = 1 to 7)

Name: C1FIFOSTAx

Offset: 0x720, 0x72C, 0x738, 0x744, 0x750, 0x75C, 0x768

Notes:

  1. FIFOCI[4:0] bits give a zero-indexed value to the message in the FIFO. If the FIFO is four messages deep (FSIZE[4:0] = 3), FIFOCIx will take on a value of 0 to 3, depending on the state of the FIFO.

  2. These bits are updated when a message completes (or aborts) or when the FIFO is reset.

  3. This bit is reset on any read of this register or when the TXQ is reset. The bits are cleared when TXREQ is set or using an SPI write.

Legend: HS = Hardware Settable bit; C = Clearable bit

Bit 15 14 13 12 11 10 9 8

FIFO[CI[4:0]
AccessRRRRR
Reset 00000

Bit 76543210

TXABTTXLARBTXERRTXATIFRXOVIFTFERFFIFTFHRFHIFTFNRFNIF
AccessR R RHS/CHS/CR R R
Reset0 0 0 0 0 0 0

Bits 12:8 – FIFOCI[4:0] FIFO Message Index bits ^(1)

TXEN = 1 (FIFO configured as a transmit buffer):

A read of this register will return an index to the message that the FIFO will next attempt to transmit.

TXEN = 0 (FIFO configured as a receive buffer):

A read of this register will return an index to the message that the FIFO will use to save the next message.

Bit 7 – TXABT Message Aborted Status bit ^(3)

ValueDescription
1Message was aborted
0Message completed successfully

Bit 6 – TXLARB Message Lost Arbitration Status bit ^(2)

ValueDescription
1Message lost arbitration while being sent
0Message did not lose arbitration while being sent

Bit 5 - TXERR Error Detected During Transmission bit ^(2)

ValueDescription
1A bus error occurred while the message was being sent
0A bus error did not occur while the message was being sent

Bit 4 – TXATIF Transmit Attempts Exhausted Interrupt Pending bit

TXEN = 0 (FIFO configured as a receive buffer):

Unused, read as '0'.

TXEN = 1 (FIFO configured as a transmit buffer):

ValueDescription
1Interrupt is pending
0Interrupt is not pending

Bit 3 – RXOVIF Receive FIFO Overflow Interrupt Flag bit

TXEN = 1 (FIFO configured as a transmit buffer):

Unused, read as '0'.

TXEN = 0 (FIFO configured as a receive buffer):

Value Description
1Overflow event has occurred
0No overflow event has occurred

Bit 2 – TFERFFIF Transmit/Receive FIFO Empty/Full Interrupt Flag bit

TXEN = 1 (FIFO configured as a transmit FIFO):

Transmit FIFO Empty Interrupt Flag.

1 = FIFO is empty

0 = FIFO is not empty, at least 1 message is queued to be transmitted

TXEN = 0 (FIFO configured as a receive FIFO):

Receive FIFO Full Interrupt Flag.

1 = FIFO is full

0 = FIFO is not full

Bit 1 – TFHRFHIF Transmit/Receive FIFO Half Empty/Half Full Interrupt Flag bit

TXEN = 1 (FIFO configured as a transmit FIFO):

Transmit FIFO Half Empty Interrupt Flag.

1 = FIFO is ≤ half full

0 = FIFO is > half full

TXEN = 0 (FIFO configured as a receive FIFO):

Receive FIFO Half Full Interrupt Flag.

1 = FIFO is ≥ half full

0 = FIFO is < half full

Bit 0 – TFNRFNIF Transmit/Receive FIFO Not Full/Not Empty Interrupt Flag bit

TXEN = 1 (FIFO configured as a transmit FIFO):

Transmit FIFO Not Full Interrupt Flag.

1 = FIFO is not full

0 = FIFO is full

TXEN = 0 (FIFO configured as a receive FIFO):

Receive FIFO Not Empty Interrupt Flag.

1 = FIFO is not empty, has at least one message

0 = FIFO is empty

11.2.48 CAN FIFO User Address Register x Low (x = 1 to 7)

Name: C1FIFOUAxL

Offset: 0x724, 0x730, 0x73C, 0x748, 0x754, 0x760, 0x76C

Note:

  1. These register bits are not ensured to read correctly in Configuration mode and should only be accessed when the module is not in Configuration mode.

Legend: x = Bit is unknown

Bit 15 14 13 12 11 10 9 8

FIFOUA[15:8]
Access R R R R R R R
Reset xxxxxxxx
Bit 76543210
FIFOUA[7:0]
Access R R R R R R R
Reset xxxxxxxx

Bits 15:0 – FIFOUA[15:0] FIFO User Address bits ^(1)

TXEN = 1 (FIFO configured as a transmit buffer):

A read of this register will return the address where the next message is to be written (FIFO head).

TXEN = 0 (FIFO configured as a receive buffer):

A read of this register will return the address where the next message is to be read (FIFO tail).

11.2.49 CAN FIFO User Address Register x High (x = 1 to 7)

Name: C1FIFOUAxH

Offset: 0x726, 0x732, 0x73E, 0x74A, 0x756, 0x762, 0x76E

Note:

  1. These register bits are not ensured to read correctly in Configuration mode and should only be accessed when the module is not in Configuration mode.

Legend: x = Bit is unknown

Bit 15 14 13 12 11 10 9 8

FIFOUA[31:24]
Access R R R R R R R
Reset 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
FIFOUA[23:16]
Access R R R R R R R
Reset x x x x x x x x

Bits 15:0 – FIFOUA[31:16] FIFO User Address bits ^(1)

TXEN = 1 (FIFO configured as a transmit buffer):

A read of this register will return the address where the next message is to be written (FIFO head).

TXEN = 0 (FIFO configured as a receive buffer):

A read of this register will return the address where the next message is to be read (FIFO tail).

11.2.50 CAN2 Filter Control Register x Low (x = 0 to 3; a = 0, 4, 8, 12; b = 1, 5, 9, 13)

Name: C2FLTCONxL

Offset: 0x630, 0x634, 0x638, 0x63C

Bit 15 14 13 12 11 10 9 8

FLTENb FbBP[4:0]
AccessR/W R/W R/W R/W R/W R/W
Reset 00 0 0 0 0

Bit 76543210

FLTENaFaBP[4:0]
AccessR/WR/WR/WR/W R/W R/W
Reset 00 0 0 0 0

Bit 15 – FLTENb Enable Filter b to Accept Messages bit

ValueDescription
1Filter is enabled
0Filter is disabled

Bits 12:8 – FbBP[4:0] Pointer to Object When Filter b Hits bits

ValueDescription
11111-11000Reserved
00111Message matching filter is stored in Object 7
00110Message matching filter is stored in Object 6
...
00010Message matching filter is stored in Object 2
00001Message matching filter is stored in Object 1
00000Reserved; Object 0 is the TX Queue and can’t receive messages

Bit 7 - FLTENa Enable Filter a to Accept Messages bit

ValueDescription
1Filter is enabled
0Filter is disabled

Bits 4:0 – FaBP[4:0] Pointer to Object When Filter a Hits bits

ValueDescription
11111-11000Reserved
00111Message matching filter is stored in Object 7
00110Message matching filter is stored in Object 6
...
00010Message matching filter is stored in Object 2
00001Message matching filter is stored in Object 1
00000Reserved; Object 0 is the TX Queue and can’t receive messages

11.2.51 CAN2 Filter Control Register x High (x = 0 to 3; c = 2, 6, 10, 14; d = 3, 7, 11, 15)

Name: C2FLTCONxH

Offset: 0x632, 0x636, 0x63A, 0x63E

Bit 15 14 13 12 11 10 9 8

FLTENd FdB[4:0]
AccessR/W R/W R/W R/W R/W R/W
Reset 00 0 0 0 0

Bit 76543210

FLTENcFcBP[4:0]
AccessR/W R/W R/W R/W R/W R/W
Reset 00 0 0 0 0

Bit 15 – FLTENd Enable Filter d to Accept Messages bit

ValueDescription
1Filter is enabled
0Filter is disabled

Bits 12:8 – FdBP[4:0] Pointer to Object When Filter d Hits bits

ValueDescription
11111-11000Reserved
00111Message matching filter is stored in Object 7
00110Message matching filter is stored in Object 6
...
00010Message matching filter is stored in Object 2
00001Message matching filter is stored in Object 1
00000Reserved; Object 0 is the TX Queue and can’t receive messages

Bit 7 - FLTENc Enable Filter c to Accept Messages bit

ValueDescription
1Filter is enabled
0Filter is disabled

Bits 4:0 – FcBP[4:0] Pointer to Object When Filter c Hits bits

ValueDescription
11111-11000Reserved
00111Message matching filter is stored in Object 7
00110Message matching filter is stored in Object 6
...
00010Message matching filter is stored in Object 2
00001Message matching filter is stored in Object 1
00000Reserved; Object 0 is the TX Queue and can’t receive messages

11.2.52 CAN2 Filter Object Register x Low (x = 0 to 15)

Name: C2FLTOBJxL

Offset: 0x640, 0x648, 0x650, 0x658, 0x660, 0x668, 0x670, 0x678, 0x680, 0x688, 0x690, 0x698, 0x6A0, 0x6A8, 0x6B0, 0x6B8

Bit 15 14 13 12 11 10 9 8

EID[4:0] SID[10:8]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

SID[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 15:11 - EID[4:0] Extended Identifier Filter bits

In DeviceNet ^™ mode, these are the filter bits for the first two data bytes.

Bits 10:0 – SID[10:0] Standard Identifier Filter bits

11.2.53 CAN2 Filter Object Register x High (x = 0 to 15)

Name: C2FLTOBJxH

Offset: 0x642, 0x64A, 0x652, 0x65A, 0x662, 0x66A, 0x672, 0x67A, 0x682, 0x68A, 0x692, 0x69A, 0x6A2, 0x6AA, 0x6B2, 0x6BA

Bit 15 14 13 12 11 10 9 8

EXIDE $ID11 EID[17:13]
AccessR/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0

Bit 76543210

EID[12:5]
AccessR/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0

Bit 14 – EXIDE Extended Identifier Enable bit

If MIDE = 1:

ValueDescription
1Matches only messages with Extended Identifier addresses
0Matches only messages with Standard Identifier addresses

Bit 13 – SID11 Standard Identifier Filter bit

Bits 12:0 – EID[17:5] Extended Identifier Filter bits

In DeviceNet ^™ mode, these are the filter bits for the first two data bytes.

11.2.54 CAN2 Mask Register x Low (x = 0 to 15)

Name: C2MASKxL

Offset: 0x644, 0x64C, 0x654, 0x65C, 0x664, 0x66C, 0x674, 0x67C, 0x684, 0x68C, 0x694, 0x69C, 0x6A4, 0x6AC, 0x6B4, 0x6BC

Bit 15 14 13 12 11 10 9 8

MEID[4:0] MSID[10:8]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

MSID[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 15:11 - MEID[4:0] Extended Identifier Mask bits

In DeviceNet ^™ mode, these are the mask bits for the first two data bytes.

Bits 10:0 – MSID[10:0] Standard Identifier Mask bits

11.2.55 CAN2 Mask Register x High (x = 0 to 15)

Name: C2MASKxH

Offset: 0x646, 0x64E, 0x656, 0x65E, 0x666, 0x66E, 0x676, 0x67E, 0x686, 0x68E, 0x696, 0x69E, 0x6A6, 0x6AE, 0x6B6, 0x6BE

Bit 15 14 13 12 11 10 9 8

MIDE MSID11 MEID[17:13]

Access R/W R/W R/W R/W R/W R/W R/W

Reset 0000000

Bit 76543210

MEID[12:5]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 14 – MIDE Identifier Receive Mode bit

ValueDescription
1Matches only message types (standard or extended address) that correspond to the EXIDE bit in the filter
0Matches either standard or extended address message if filters match(i.e., if (Filter SID) = (Message SID) or if (Filter SID/EID) = (Message SID/EID))

Bit 13 - MSID11 Standard Identifier Mask bit

Bits 12:0 – MEID[17:5] Extended Identifier Mask bits

In DeviceNet ^™ mode, these are the mask bits for the first two data bytes.

11.2.56 CAN1 Transmitter Delay Compensation Register Low

Name: C1TDCL (1,2)

Offset: 0x6CC

Notes:

  1. This register can only be modified in Configuration mode (OPMOD[2:0] = 100).
  2. T_CAN = 1/F_CAN is the clock which comes out of the CAN clock generator.

Bit 15 14 13 12 11 10 9 8

TDCO[6:0]
AccessR/W R/W R/W R/W R/W R/W R/W
Reset 0010000

Bit 76543210

TDCV[5:0]
Access ResetR/W R/W R/W R/W R/W R/W
0 0 0 0 0 0

Bits 14:8 – TDCO[6:0] Transmitter Delay Compensation Offset bits (Secondary Sample Point (SSP))

ValueDescription
111 1111 -64 × T_CAN
. . .
011 1111 63 × T_CAN
. . .
000 0000 0 × T_CAN

Bits 5:0 – TDCV[5:0] Transmitter Delay Compensation Value bits (Secondary Sample Point (SSP))

ValueDescription
11 1111 63 × T_CAN
. . .
00 0000 0 × T_CAN

11.2.57 CAN1 Time Base Counter Register Low

Name: C1TBCL (1,2)

Offset: 0x6D0

Notes:

  1. The Time Base Counter (TBC) will be stopped and reset when TBCEN = 0 to save power.
  2. The TBC prescaler count will be reset on any write to CxTBCH/L (TBCPREx will be unaffected).

Bit 15 14 13 12 11 10 9 8

TBC[15:8]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

TBC[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 15:0 – TBC[15:0] CAN Time Base Counter bits

This is a free-running timer that increments every TBCPREx clock when TBCEN is set.

11.2.58 CAN1 Time Base Counter Register High

Name: C1TBCH (1,2)

Offset: 0x6D2

Notes:

  1. The Time Base Counter (TBC) will be stopped and reset when TBCEN = 0 to save power.
  2. The TBC prescaler count will be reset on any write to CxTBCH/L (TBCPREx will be unaffected).

Bit 15 14 13 12 11 10 9 8

TBC[31:24]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

TBC[23:16]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 15:0 – TBC[31:16] CAN Time Base Counter bits

This is a free-running timer that increments every TBCPREx clock when TBCEN is set.

11.2.59 CAN1 FIFO Control Register x Low (x = 1 to 7)

Name: C1FIFOCONxL

Offset: 0x71C, 0x728, 0x734, 0x740, 0x74C, 0x758, 0x764

Note:

  1. This bit can only be modified in Configuration mode (OPMOD[2:0] = 100).

Legend: S = Settable bit; HC = Hardware Clearable bit

Bit 15 14 13 12 11 10 9 8

FRESET TXREQ UINC
Access ResetS/HC R/W/HC S/HC 100

Bit 76543210

TXENRTRENRXTSENTXATIERXOVIETFERFFIETFHRFHIETFNRFNIE
AccessR/WR/WR/WR/WR/WR/WR/WR/W
Reset0 0 0 0 0 0 0

Bit 10 - FRESET FIFO Reset bit

ValueDescription
1FIFO will be reset when bit is set, cleared by hardware when FIFO is reset; user should poll whether this bit is clear before taking any action
0No effect

Bit 9 - TXREQ Message Send Request bit

TXEN = 0 (FIFO configured as a receive FIFO):

This bit has no effect

TXEN = 1 (FIFO configured as a transmit FIFO):

ValueDescription
1Requests sending a message; the bit will automatically clear when all the messages queued in the FIFO are successfully sent
0Clearing the bit to ‘0’ while set (‘1’) will request a message abort

Bit 8 – UINC Increment Head/Tail bit

TXEN = 1 (FIFO configured as a transmit FIFO):

When this bit is set, the FIFO head will increment by a single message.

TXEN = 0 (FIFO configured as a receive FIFO):

When this bit is set, the FIFO tail will increment by a single message.

Bit 7 - TXEN TX/RX Buffer Selection bit

ValueDescription
1Transmits message object
0Receives message object

Bit 6 - RTREN Auto-Remote Transmit (RTR) Enable bit

ValueDescription
1When a Remote Transmit is received, TXREQ will be set
0When a Remote Transmit is received, TXREQ will be unaffected

Bit 5 – RXTSEN Received Message Timestamp Enable bit ^(1)

ValueDescription
1Captures timestamp in received message object in RAM
0Does not capture timestamp

Bit 4 – TXATIE Transmit Attempts Exhausted Interrupt Enable bit

Value Description
1Enables interrupt
0Disables interrupt

Bit 3 – RXOVIE Overflow Interrupt Enable bit

Value Description
1Interrupt is enabled for overflow event
0Interrupt is disabled for overflow event

Bit 2 – TFERFFIE Transmit/Receive FIFO Empty/Full Interrupt Enable bit

TXEN = 1 (FIFO configured as a transmit FIFO):

Transmit FIFO Empty Interrupt Enable.

1 = Interrupt is enabled for FIFO empty

0 = Interrupt is disabled for FIFO empty

TXEN = 0 (FIFO configured as a receive FIFO):

Receive FIFO Full Interrupt Enable.

1 = Interrupt is enabled for FIFO full

0 = Interrupt is disabled for FIFO full

Bit 1 – TFHRFHIE Transmit/Receive FIFO Half Empty/Half Full Interrupt Enable bit

TXEN = 1 (FIFO configured as a transmit FIFO):

Transmit FIFO Half Empty Interrupt Enable.

1 = Interrupt is enabled for FIFO half empty

0 = Interrupt is disabled for FIFO half empty

TXEN = 0 (FIFO configured as a receive FIFO):

Receive FIFO Half Full Interrupt Enable.

1 = Interrupt is enabled for FIFO half full

0 = Interrupt is disabled for FIFO half full

Bit 0 – TFNRFNIE Transmit/Receive FIFO Not Full/Not Empty Interrupt Enable bit

TXEN = 1 (FIFO configured as a transmit FIFO):

Transmit FIFO Not Full Interrupt Enable.

1 = Interrupt is enabled for FIFO not full

0 = Interrupt is disabled for FIFO not full

TXEN = 0 (FIFO configured as a receive FIFO):

Receive FIFO Not Empty Interrupt Enable.

1 = Interrupt is enabled for FIFO not empty

0 = Interrupt is disabled for FIFO not empty

11.2.60 CAN1 FIFO Control Register x High (x = 1 to 7)

Name: C1FIFOCONxH

Offset: 0x71E, 0x72A, 0x736, 0x742, 0x74E, 0x75A, 0x766

Note:

  1. These bits can only be modified in Configuration mode (OPMOD[2:0] = 100).

Bit 15 14 13 12 11 10 9 8

PLSIZE[2:0] FSIZE[4:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0

Bit 76543210

TXAT[1:0] TXPRI[4:0]
AccessR/W R/W R/W R/W R/W R/W R/W
Reset1 100000

Bits 15:13 - PLSIZE[2:0] Payload Size bits ^(1)

ValueDescription
11164 data bytes
11048 data bytes
10132 data bytes
10024 data bytes
01120 data bytes
01016 data bytes
00112 data bytes
0008 data bytes

Bits 12:8 – FSIZE[4:0] FIFO Size bits ^(1)

ValueDescription
11111FIFO is 32 messages deep
. . .
00010FIFO is 3 messages deep
00001FIFO is 2 messages deep
00000FIFO is 1 message deep

Bits 6:5 – TXAT[1:0] Retransmission Attempts bits

This feature is enabled when RTXAT (C1CONH[0]) is set.

ValueDescription
11Unlimited number of retransmission attempts
10Unlimited number of retransmission attempts
01Three retransmission attempts
00Disables retransmission attempts

Bits 4:0 – TXPRI[4:0] Message Transmit Priority bits

ValueDescription
11111Highest message priority
. . .
00000Lowest message priority

11.2.61 CAN1 FIFO Status Register x (x = 1 to 7)

Name: C1FIFOSTAx

Offset: 0x720, 0x72C, 0x738, 0x744, 0x750, 0x75C, 0x768

Notes:

  1. FIFOCI[4:0] bits give a zero-indexed value to the message in the FIFO. If the FIFO is four messages deep (FSIZE[4:0] = 3), FIFOCIx will take on a value of 0 to 3, depending on the state of the FIFO.

  2. These bits are updated when a message completes (or aborts) or when the FIFO is reset.

  3. This bit is reset on any read of this register or when the TXQ is reset. The bits are cleared when TXREQ is set or using an SPI write.

Legend: HS = Hardware Settable bit; C = Clearable bit

Bit 15 14 13 12 11 10 9 8

FIFO[CI[4:0]
AccessRRRRR
Reset 00000

Bit 76543210

TXABTTXLARBTXERRTXATIFRXOVIFTFERFFIFTFHRFHIFTFNRFNIF
AccessR R RHS/CHS/CR R R
Reset0 0 0 0 0 0 0

Bits 12:8 – FIFOCI[4:0] FIFO Message Index bits ^(1)

TXEN = 1 (FIFO configured as a transmit buffer):

A read of this register will return an index to the message that the FIFO will next attempt to transmit.

TXEN = 0 (FIFO configured as a receive buffer):

A read of this register will return an index to the message that the FIFO will use to save the next message.

Bit 7 – TXABT Message Aborted Status bit ^(3)

ValueDescription
1Message was aborted
0Message completed successfully

Bit 6 – TXLARB Message Lost Arbitration Status bit ^(2)

ValueDescription
1Message lost arbitration while being sent
0Message did not lose arbitration while being sent

Bit 5 - TXERR Error Detected During Transmission bit ^(2)

ValueDescription
1A bus error occurred while the message was being sent
0A bus error did not occur while the message was being sent

Bit 4 – TXATIF Transmit Attempts Exhausted Interrupt Pending bit

TXEN = 0 (FIFO configured as a receive buffer):

Unused, read as '0'.

TXEN = 1 (FIFO configured as a transmit buffer):

ValueDescription
1Interrupt is pending
0Interrupt is not pending

Bit 3 – RXOVIF Receive FIFO Overflow Interrupt Flag bit

TXEN = 1 (FIFO configured as a transmit buffer):

Unused, read as '0'.

TXEN = 0 (FIFO configured as a receive buffer):

Value Description
1Overflow event has occurred
0No overflow event has occurred

Bit 2 – TFERFFIF Transmit/Receive FIFO Empty/Full Interrupt Flag bit

TXEN = 1 (FIFO configured as a transmit FIFO):

Transmit FIFO Empty Interrupt Flag.

1 = FIFO is empty

0 = FIFO is not empty, at least 1 message is queued to be transmitted

TXEN = 0 (FIFO configured as a receive FIFO):

Receive FIFO Full Interrupt Flag.

1 = FIFO is full

0 = FIFO is not full

Bit 1 – TFHRFHIF Transmit/Receive FIFO Half Empty/Half Full Interrupt Flag bit

TXEN = 1 (FIFO configured as a transmit FIFO):

Transmit FIFO Half Empty Interrupt Flag.

1 = FIFO is ≤ half full

0 = FIFO is > half full

TXEN = 0 (FIFO configured as a receive FIFO):

Receive FIFO Half Full Interrupt Flag.

1 = FIFO is ≥ half full

0 = FIFO is < half full

Bit 0 – TFNRFNIF Transmit/Receive FIFO Not Full/Not Empty Interrupt Flag bit

TXEN = 1 (FIFO configured as a transmit FIFO):

Transmit FIFO Not Full Interrupt Flag.

1 = FIFO is not full

0 = FIFO is full

TXEN = 0 (FIFO configured as a receive FIFO):

Receive FIFO Not Empty Interrupt Flag.

1 = FIFO is not empty, has at least one message

0 = FIFO is empty

11.2.62 CAN1 FIFO User Address Register x Low (x = 1 to 7)

Name: C1FIFOUAXL (1)

Offset: 0x724, 0x730, 0x73C, 0x748, 0x754, 0x760, 0x76C

Note:

  1. This register is not ensured to read correctly in Configuration mode and should only be accessed when the module is not in Configuration mode.

Legend: x = Bit is unknown

Bit 15 14 13 12 11 10 9 8

FIFOUA[15:8]
Access R R R R R R R
Reset xxxxxxxxx
Bit 76543210
FIFOUA[7:0]
Access R R R R R R R
Reset xxxxxxxxx

Bits 15:0 – FIFOUA[15:0] FIFO User Address bits

TXEN = 1 (FIFO configured as a transmit buffer):

A read of this register will return the address where the next message is to be written (FIFO head).

TXEN = 0 (FIFO configured as a receive buffer):

A read of this register will return the address where the next message is to be read (FIFO tail).

11.2.63 CAN1 FIFO User Address Register x High (x = 1 to 7)

Name: C1FIFOUAXH (1)

Offset: 0x726, 0x732, 0x73E, 0x74A, 0x756, 0x762, 0x76E

Note:

  1. This register is not ensured to read correctly in Configuration mode and should only be accessed when the module is not in Configuration mode.

Legend: x = Bit is unknown

Bit 15 14 13 12 11 10 9 8

FIFOUA[31:24]
Access R R R R R R R
Reset 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
FIFOUA[23:16]
Access R R R R R R R
Reset x x x x x x x x

Bits 15:0 – FIFOUA[31:16] FIFO User Address bits

TXEN = 1 (FIFO configured as a transmit buffer):

A read of this register will return the address where the next message is to be written (FIFO head).

TXEN = 0 (FIFO configured as a receive buffer):

A read of this register will return the address where the next message is to be read (FIFO tail).

11.2.64 CAN1 Filter Control Register x Low (x = 0 to 3; a = 0, 4, 8, 12; b = 1, 5, 9, 13)

Name: C1FLTCONxL

Offset: 0x770, 0x774, 0x778, 0x77C

Bit 15 14 13 12 11 10 9 8

FLTENb FbBP[4:0]
AccessR/W R/W R/W R/W R/W R/W
Reset 00 0 0 0 0

Bit 76543210

FLTENaFaBP[4:0]
AccessR/WR/WR/WR/W R/W R/W
Reset 00 0 0 0 0

Bit 15 – FLTENb Enable Filter b to Accept Messages bit

ValueDescription
1Filter is enabled
0Filter is disabled

Bits 12:8 – FbBP[4:0] Pointer to Object When Filter b Hits bits

ValueDescription
11111-11000Reserved
00111Message matching filter is stored in Object 7
00110Message matching filter is stored in Object 6
...
00010Message matching filter is stored in Object 2
00001Message matching filter is stored in Object 1
00000Reserved; Object 0 is the TX Queue and can’t receive messages

Bit 7 - FLTENa Enable Filter a to Accept Messages bit

ValueDescription
1Filter is enabled
0Filter is disabled

Bits 4:0 – FaBP[4:0] Pointer to Object When Filter a Hits bits

ValueDescription
11111-11000Reserved
00111Message matching filter is stored in Object 7
00110Message matching filter is stored in Object 6
...
00010Message matching filter is stored in Object 2
00001Message matching filter is stored in Object 1
00000Reserved; Object 0 is the TX Queue and can’t receive messages

11.2.65 CAN1 Filter Control Register x High (x = 0 to 3; c = 2, 6, 10, 14; d = 3, 7, 11, 15)

Name: C1FLTCONxH

Offset: 0x772, 0x776, 0x77A, 0x77E

Bit 15 14 13 12 11 10 9 8

FLTENd FdB[4:0]
AccessR/W R/W R/W R/W R/W R/W
Reset 00 0 0 0 0

Bit 76543210

FLTENcFcBP[4:0]
AccessR/W R/W R/W R/W R/W R/W
Reset 00 0 0 0 0

Bit 15 – FLTENd Enable Filter d to Accept Messages bit

ValueDescription
1Filter is enabled
0Filter is disabled

Bits 12:8 – FdBP[4:0] Pointer to Object When Filter d Hits bits

ValueDescription
11111-11000Reserved
00111Message matching filter is stored in Object 7
00110Message matching filter is stored in Object 6
...
00010Message matching filter is stored in Object 2
00001Message matching filter is stored in Object 1
00000Reserved; Object 0 is the TX Queue and can’t receive messages

Bit 7 - FLTENc Enable Filter c to Accept Messages bit

ValueDescription
1Filter is enabled
0Filter is disabled

Bits 4:0 - FcBP[4:0] Pointer to Object When Filter c Hits bits

ValueDescription
11111-11000Reserved
00111Message matching filter is stored in Object 7
00110Message matching filter is stored in Object 6
...
00010Message matching filter is stored in Object 2
00001Message matching filter is stored in Object 1
00000Reserved; Object 0 is the TX Queue and can’t receive messages

11.2.66 CAN1 Filter Object Register x Low (x = 0 to 15)

Name: C1FLTOBJxL

Offset: 0x780, 0x788, 0x790, 0x798, 0x7A0, 0x7A8, 0x7B0, 0x7B8, 0x7C0, 0x7C8, 0x7D0, 0x7D8, 0x7E0, 0x7E8, 0x7F0, 0x7F8

Bit 15 14 13 12 11 10 9 8

EID[4:0] SID[10:8]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

SID[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 15:11 - EID[4:0] Extended Identifier Filter bits

In DeviceNet ^™ mode, these are the filter bits for the first two data bytes.

Bits 10:0 – SID[10:0] Standard Identifier Filter bits

11.2.67 CAN1 Filter Object Register x High (x = 0 to 15)

Name: C1FLTOBJxH

Offset: 0x782, 0x78A, 0x792, 0x79A, 0x7A2, 0x7AA, 0x7B2, 0x7BA, 0x7C2, 0x7CA, 0x7D2, 0x7DA, 0x7E2, 0x7EA, 0x7F2, 0x7FA

Bit 15 14 13 12 11 10 9 8

EXIDE $ID11 EID[17:13]
AccessR/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0

Bit 76543210

EID[12:5]
AccessR/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0

Bit 14 – EXIDE Extended Identifier Enable bit

If MIDE = 1:

ValueDescription
1Matches only messages with Extended Identifier addresses
0Matches only messages with Standard Identifier addresses

Bit 13 – SID11 Standard Identifier Filter bit

Bits 12:0 – EID[17:5] Extended Identifier Filter bits

In DeviceNet ^™ mode, these are the filter bits for the first two data bytes.

11.2.68 CAN1 Mask Register x Low (x = 0 to 15)

Name: C1MASKxL

Offset: 0x784, 0x78C, 0x794, 0x79C, 0x7A4, 0x7AC, 0x7B4, 0x7BC, 0x7C4, 0x7CC, 0x7D4, 0x7DC, 0x7E4, 0x7EC, 0x7F4, 0x7FC

Bit 15 14 13 12 11 10 9 8

MEID[4:0] MSID[10:8]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

MSID[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 15:11 - MEID[4:0] Extended Identifier Mask bits

In DeviceNet ^™ mode, these are the mask bits for the first two data bytes.

Bits 10:0 – MSID[10:0] Standard Identifier Mask bits

11.2.69 CAN1 Mask Register x High (x = 0 to 15)

Name: C1MASKxH

Offset: 0x786, 0x78E, 0x796, 0x79E, 0x7A6, 0x7AE, 0x7B6, 0x7BE, 0x7C6, 0x7CE, 0x7D6, 0x7DE, 0x7E6, 0x7EE, 0x7F6, 0x7FE

Bit 15 14 13 12 11 10 9 8

MIDE MSID11 MEID[17:13]

Access R/W R/W R/W R/W R/W R/W R/W

Reset 0000000

Bit 76543210

MEID[12:5]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 14 – MIDE Identifier Receive Mode bit

ValueDescription
1Matches only message types (standard or extended address) that correspond to the EXIDE bit in the filter
0Matches either standard or extended address message if filters match(i.e., if (Filter SID) = (Message SID) or if (Filter SID/EID) = (Message SID/EID))

Bit 13 - MSID11 Standard Identifier Mask bit

Bits 12:0 – MEID[17:5] Extended Identifier Mask bits

In DeviceNet ^™ mode, these are the mask bits for the first two data bytes.

12. High-Resolution PWM with Fine Edge Placement

Note: This data sheet summarizes the features of the dsPIC33CK1024MP710 family of devices. It is not intended to be a comprehensive reference source. To complement the information in this data sheet, refer to "High-Resolution PWM with Fine Edge Placement" (www.microchip.com/DS70005320) in the "dsPIC33/PIC24 Family Reference Manual".

The High-Speed PWM (HSPWM) module is a Pulse-Width Modulated (PWM) module to support both motor control and power supply applications. This flexible module provides features to support many types of Motor Control (MC) and Power Control (PC) applications, including:

  • AC-to-DC Converters
  • DC-to-DC Converters
    • AC and DC Motors: BLDC, PMSM, ACIM, SRM, etc.
  • Inverters
  • Battery Chargers
  • Digital Lighting
    • Power Factor Correction (PFC)

Table 12-1. PWM Output Availability

Package Type Total PGx Instances Dedicated OutputsDedicated + PPS Outputs
100-pin 12 12 pairs 12 pairs
80-pin 8 8 pairs 8 pairs
64-pin 8 8 pairs 8 pairs
48-Pin 8 8 pairs 8 pairs

12.1 Features

- Operating modes:

  • Independent Edge mode
  • Variable Phase PWM mode
  • Center-Aligned mode
  • Double-Update Center-Aligned mode
    – Dual Edge Center-Aligned mode
  • Dual PWM mode

- Output modes:

  • Complementary
  • Independent
  • Push-Pull

  • Dead-Time Generator

  • Leading-Edge Blanking (LEB)
    • Output Override for Fault Handling
  • Flexible Period/Duty Cycle Updating Options
  • Programmable Control Inputs (PCI)
  • Advanced Triggering Options
  • Six Combinatorial Logic Outputs
  • Six PWM Event Outputs

12.2 Architecture Overview

The PWM module consists of a common set of controls and features, and multiple instantiations of PWM Generators (PGs). Each PWM Generator can be independently configured or multiple PWM Generators can be used to achieve complex multiphase systems. PWM Generators can also be used to implement sophisticated triggering, protection and logic functions. A high-level block diagram is shown in Figure 12-1. In addition, this device family has another identical PWM module to accommodate additional PWM Generators. This additional module has been designated as an Auxiliary PWM Module (Figure 12-2). For devices with more than 8 PWM Generators, 8 PWM Generators are regular PWM Generators and any additional generators are APWM Generators.

Figure 12-1. PWM High-Level Block Diagram
Microchip dsPIC33CK1024MP708 - Architecture Overview - 1

flowchart
graph TD
    A["Common PWM Controls and Data"] --> B["PG1"]
    A --> C["PG2"]
    A --> D["PGx"]
    B --> E["PWM1H"]
    B --> F["PWM1L"]
    C --> G["PWM2H"]
    C --> H["PWM2L"]
    D --> I["PWMxH"]
    D --> J["PWMxL"]

Figure 12-2. APWM High-Level Block Diagram
Microchip dsPIC33CK1024MP708 - Architecture Overview - 2

flowchart
graph TD
    A["Common APWM Controls and Data"] --> B["APG1"]
    A --> C["APG2"]
    A --> D["APGx"]
    B --> E["APWM1H"]
    B --> F["APWM1L"]
    C --> G["APWM2H"]
    C --> H["APWM2L"]
    D --> I["APWMxH"]
    D --> J["APWMxL"]

12.3 Lock and Write Restrictions

The LOCK bit (PCLKCON[8]) may be set in software to block writes to certain registers. For more information, refer to "High-Resolution PWM with Fine Edge Placement" (www.microchip.com/DS70005320).

The following lock/unlock sequence is required to set or clear the LOCK bit.

  1. Write 0x55 to NVMKEY.
  2. Write 0xAA to NVMKEY.
  3. Clear (or set) the LOCK bit (PCLKCON[8]) as a single operation.

In general, modifications to configuration controls should not be done while the module is running, as indicated by the ON bit (PGxCONL[15]) being set.

12.4 PWM4H/L Output on Peripheral Pin Select

All devices support the capability to output PWM4H and PWM4L signals via Peripheral Pin Select (PPS) on to any "RPn" pin. This feature is intended for lower pin count devices that do not have PWM4H/L on dedicated pins.

Configuration bit, DUPWM (FDEVOP1[12]), provides the option to disable the fixed pin PWM4L/H functions when using the PPS. Clearing the DUPPWM bit will disable PWM4 function and allow the pin to be used for another purpose. Leaving the DUPPWM set (default) will output PWM4 on both fixed pin and PPS outputs. The output port enable bits, PENH and PENL (PGxIOCONH[3:2]), control output function for both dedicated and PPS pins outputs

If PWM4H/L PPS output functions are used on devices that also have fixed PWM4H/L pins, the output signal will be present on both dedicated and "RPn" pins. The output port enable bits, PENH and PENL (PGxIOCONH[3:2]), control both dedicated and PPS pins together; it is not possible to disable the dedicated pins and use only PPS.

Given the natural priority of the "RPn" functions above that of the PWM, it is possible to use the PPS output functions on the dedicated PWM4H/L pins, while the PWM4 signals are routed to other pins via PPS. Any of the peripheral outputs listed in Table 8-5, with the exception of 'Default Port', can be used. Input functions, including the ports and peripherals listed in 8.7. Virtual Connections, cannot be used through the "RPn" function on dedicated PWM4H/L pins when PWM4 is active.

12.5 PWM Control/Status Registers

There are two categories of Special Function Registers (SFRs) used to control the operation of the PWM module:

• Common, shared by all PWM Generators
- PWM Generator-specific
- Auxiliary PWM which is used as additional PWM Generators

An 'x' in the register name denotes an instance of a PWM Generator.

A 'y' in the register name denotes an instance of the common function.

An 'A' in the register name denotes an instance of the Auxiliary PWM.

12.6 Control Registers

OffsetName Bit Pos. 7 6 5 4 3 2 1 0
0x01D2 APCLKCON15:8 HRRDY HRERR LOCK
7:0 DIVSEL[1:0] MCLKSEL[1:0]
0x01D4AFSCL15:8FSCL[15:8]
7:0FSCL[7:0]
0x01D6AFSMINPER15:8FSMINPER[15:8]
7:0FSMINPER[7:0]
0x01D8 AMPHASE15:8MPHASE[15:8]
7:0MPHASE[7:0]
0x01DAAMDC15:8MDC[15:8]
7:0MDC[7:0]
0x01DCAMPER15:8MPER[15:8]
7:0MPER[7:0]
0x01DEALFSR15:8LFSR[14:8]
7:0LFSR[7:0]
0x01E0ACMBTRIGL15:8
7:0Reserved[3:0]CTA4ENCTA3ENCTA2ENCTA1EN
0x01E2ACMBTRIGH15:8
7:0Reserved[3:0]CTB4ENCTB3ENCTB2ENCTB1EN
0x01E4ALOGCONA15:8PWMS1A[3:0]PWMS2A[3:0]
7:0S1APOLS2APOLPWMLFA[1:0]PWMLFAD[2:0]
0x01E6ALOGCONB15:8PWMS1B[3:0]PWMS2B[3:0]
7:0S1BPOLS2BPOLPWMLFB[1:0]PWMLFBD[2:0]
0x01E8ALOGCONC15:8PWMS1C[3:0]PWMS2C[3:0]
7:0S1CPOLS2CPOLPWMLFC[1:0]PWMLFCD[2:0]
0x01EAALOGCOND15:8PWMS1D[3:0]PWMS2D[3:0]
7:0S1DPOLS2DPOLPWMLFD[1:0]PWMLFDD[2:0]
0x01ECALOGCONE15:8PWMS1E[3:0]PWMS2E[3:0]
7:0S1EPOLS2EPOLPWMLFE[1:0]PWMLFED[2:0]
0x01EE ALOGCONF15:8PWMS1F[3:0]PWMS2F[3:0]
7:0S1FPOLS2FPOLPWMLFF[1:0]PWMLFFD[2:0]
0x01F0APWMEVTA(5)15:8EVTAOENEVTAPOLEVTASTRDEVTASYNC
7:0EVTASEL[3:0]EVTAPGS[2:0]
0x01F2APWMEVTB(5)15:8EVTBOENEVTBPOLEVTBSTRDEVTBSYNC
7:0EVTBSEL[3:0]EVTBPGS[2:0]
0x01F4APWMEVTC(5)15:8EVTCOENEVTCPOLEVTCSTRDEVTCSYNC
7:0EVTCSEL[3:0]EVTCPGS[2:0]
0x01F6APWMEVTD(5)15:8EVTDOENEVTDPOLEVTDSTRDEVTDSYNC
7:0EVTDSEL[3:0]EVTDPGS[2:0]
0x01F8APWMEVTE(5)15:8EVTEOENEVTEPOLEVTESTRDEVTESYNC
7:0EVTESEL[3:0]EVTEPGS[2:0]
0x01FAAPWMEVTF(5)15:8EVTFOENEVTFPOLEVTFSTRDEVTFSYNC
7:0EVTFSEL[3:0]EVTFPGS[2:0]
0x01FC APG1CONL15:8ONTRGCNT[2:0]
7:0HRENCLKSEL[1:0]MODSEL[2:0]
0x01FEAPG1CONH15:8MDCSELMPERSELMPHSELMSTENUPMOD[2:0]
7:0ReservedTRGMODSOCS[3:0]
0x0200APG1STAT15:8SEVTFLTEVTCLEVTFFEVTSACTFLTACTCLACTFFACT
7:0TRSETTRCLRCAPUPDATEUPDREQSTEERCAHALFTRIG
0x0202APG1IOCONL15:8CLMODSWAPOVRENHOVRENLOVRDAT[1:0]OSYNC[1:0]
7:0FLTDAT[1:0]CLDAT[1:0]FFDAT[1:0]DBDAT[1:0]
0x0204APG1IOCONH15:8CAPSRC[2:0]DTCMPSEL
7:0PMOD[1:0]PENHPENLPOLHPOLL
0x0206 APG1EVTL15:8ADTR1PS[4:0]ADTR1EN3ADTR1EN2ADTR1EN1
7:0UPDTRG[1:0]PGTRGSEL[2:0]
0x0208 APG1EVTH15:8FLTIENCLIENFFIENSIENIEVTSEL[1:0]
7:0ADTR2EN3ADTR2EN2ADTR2EN1ADTR1OFS[4:0]
0x020A APGxyPCIL15:8TSYNCDISTERM[2:0]AQPSAQSS[2:0]
7:0SWTERMPSYNCPPSPSS[4:0]

......continued

OffsetName Bit Pos. 7 6 5 4 3 2 1 0
0x020C APGxyPCIH15:8 BPEN BPSEL[2:0] ACP[2:0]
7:0 SWPCI SWPCIM[1:0] LATMOD TQPS TQSS[2:0]
0x020E ... 0x0219Reserved
0x021A APG1LEBL15:8LEB[15:8]
7:0LEB[7:0]
0x021C APG1LEBH15:8PWMPCI[2:0]
7:0PHRPHFPLRPLF
0x021EAPG1PHASE15:8PG1PHASE[15:8]
7:0PG1PHASE[7:0]
0x0220APG1DC15:8PG1DC[15:8]
7:0PG1DC[7:0]
0x0222 APG1DCA15:8
7:0PG1DCA[7:0]
0x0224APG1PER15:8PG1PER[15:8]
7:0PG1PER[7:0]
0x0226APG1TRIGA15:8PG1TRIGA[15:8]
7:0PG1TRIGA[7:0]
0x0228APG1TRIGB15:8PG1TRIGB[15:8]
7:0PG1TRIGB[7:0]
0x022AAPG1TRIGC15:8PG1TRIGC[15:8]
7:0PG1TRIGC[7:0]
0x022CAPG1DTL15:8DTL[13:8]
7:0DTL[7:0]
0x022EAPG1DTH15:8DTH[13:8]
7:0DTH[7:0]
0x0230APG1CAP15:8PG1CAP[15:8]
7:0PG1CAP[7:0]
0x0232APG2CONL15:8 ONTRGCNT[2:0]
7:0 HRENCLKSEL[1:0]MODSEL[2:0]
0x0234APG2CONH15:8 MDCSELMPERSELMPHSELMSTENUPMOD[2:0]
7:0 ReservedTRGMODSOCS[3:0]
0x0236APG2STAT15:8 SEVTFLTEVTCLEVTFFEVTSACTFLTACTCLACTFFACT
7:0 TRSETTRCLRCAPUPDATEUPDREQSTEERCAHALFTRIG
0x0238APG2IOCONL15:8 CLMODSWAPOVRENHOVRENLOVRDAT[1:0]OSYNC[1:0]
7:0 FLTDAT[1:0]CLDAT[1:0]FFDAT[1:0]DBDAT[1:0]
0x023AAPG2IOCONH15:8 CAPSRC[2:0]DTCMPSEL
7:0PMOD[1:0]PENHPENLPOLHPOLL
0x023CAPG2EVTL15:8 ADTR1PS[4:0]ADTR1EN3ADTR1EN2ADTR1EN1
7:0UPDTRG[1:0]PGTRGSEL[2:0]
0x023E APG2EVTH15:8 FLTIENCLIENFFIENSIENIEVTSEL[1:0]
7:0 ADTR2EN3ADTR2EN2ADTR2EN1ADTR1OFS[4:0]
0x0240 ... 0x024FReserved
0x0250APG2LEBL15:8LEB[15:8]
7:0LEB[7:0]
0x0252 APG2LEBH15:8PWMPCI[2:0]
7:0PHRPHFPLRPLF
0x0254APG2PHASE15:8PG2PHASE[15:8]
7:0PG2PHASE[7:0]
0x0256APG2DC15:8PG2DC[15:8]
7:0PG2DC[7:0]
0x0258 APG2DCA15:8
7:0PG2DCA[7:0]
0x025AAPG2PER15:8PG2PER[15:8]
7:0PG2PER[7:0]
0x025CAPG2TRIGA15:8PG2TRIGA[15:8]
7:0PG2TRIGA[7:0]

......continued

OffsetNameBit Pos. 76543210
0x025EAPG2TRIGB15:8 PG2TRIGB[15:8]
7:0 PG2TRIGB[7:0]
0x0260APG2TRIGC15:8 PG2TRIGC[15:8]
7:0 PG2TRIGC[7:0]
0x0262APG2DTL15:8 DTL[13:8]
7:0 DTL[7:0]
0x0264APG2DTH15:8 DTH[13:8]
7:0 DTH[7:0]
0x0266APG2CAP15:8 PG2CAP[15:8]
7:0 PG2CAP[7:0]
0x0268APG3CONL15:8 ONTRGCNT[2:0]
7:0 HRENCLKSEL[1:0]MODSEL[2:0]
0x026AAPG3CONH15:8 MDCSELMPERSELMPHSELMSTENUPMOD[2:0]
7:0 ReservedTRGMODSOCS[3:0]
0x026CAPG3STAT15:8 SEVTFLTEVTCLEVTFFEVTSACTFLTACTCLACTFFACT
7:0 TRSETTRCLRCAPUPDATEUPDREQSTEERCAHALFTRIG
0x026EAPG3IOCONL15:8 CLMODSWAPOVRENHOVRENLOVRDAT[1:0]OSYNC[1:0]
7:0 FLTDAT[1:0]CLDAT[1:0]FFDAT[1:0]DBDAT[1:0]
0x0270APG3IOCONH15:8 CAPSRC[2:0]DTCMPSEL
7:0 PMOD[1:0]PENHPENLPOLHPOLL
0x0272APG3EVTL15:8 ADTR1PS[4:0]ADTR1EN3ADTR1EN2ADTR1EN1
7:0 UPDTRG[1:0]PGTRGSEL[2:0]
0x0274APG3EVTH15:8 FLTIENCLIENFFIENSIENIEVTSEL[1:0]
7:0 ADTR2EN3ADTR2EN2ADTR2EN1ADTR1OFS[4:0]
0x0276...0x0285Reserved
0x0286APG3LEBL15:8 LEB[7:0]
7:0 LEB[7:0]
0x0288APG3LEBH15:8 PWMPCI[2:0]
7:0 PHRPHFPLRPLF
0x028AAPG3PHASE15:8 PG3PHASE[15:8]
7:0 PG3PHASE[7:0]
0x028CAPG3DC15:8 PG3DC[15:8]
7:0 PG3DC[7:0]
0x028EAPG3DCA15:8 PG3DCA[7:0]
7:0 PG3DCA[7:0]
0x0290APG3PER15:8 PG3PER[15:8]
7:0 PG3PER[7:0]
0x0292APG3TRIGA15:8 PG3TRIGA[15:8]
7:0 PG3TRIGA[7:0]
0x0294APG3TRIGB15:8 PG3TRIGB[15:8]
7:0 PG3TRIGB[7:0]
0x0296APG3TRIGC15:8 PG3TRIGC[15:8]
7:0 PG3TRIGC[7:0]
0x0298APG3DTL15:8 DTL[13:8]
7:0 DTL[7:0]
0x029AAPG3DTH15:8 DTH[13:8]
7:0 DTH[7:0]
0x029CAPG3CAP15:8 PG3CAP[15:8]
7:0 PG3CAP[7:0]
0x029EAPG4CONL15:8 ONTRGCNT[2:0]
7:0 HRENCLKSEL[1:0]MODSEL[2:0]
0x02A0APG4CONH15:8 MDCSELMPERSELMPHSELMSTENUPMOD[2:0]
7:0 ReservedTRGMODSOCS[3:0]
0x02A2APG4STAT15:8 SEVTFLTEVTCLEVTFFEVTSACTFLTACTCLACTFFACT
7:0 TRSETTRCLRCAPUPDATEUPDREQSTEERCAHALFTRIG
0x02A4APG4IOCONL15:8 CLMODSWAPOVRENHOVRENLOVRDAT[1:0]OSYNC[1:0]
7:0 FLTDAT[1:0]CLDAT[1:0]FFDAT[1:0]DBDAT[1:0]

......continued

OffsetName Bit Pos. 7 6 5 4 3 2 1 0
0x02A6 APG4IOCONH15:8 CAPSRC[2:0] DTCMPSEL
7:0 PMOD[1:0] PENH PENL POLH POLL
0x02A8APG4EVTL15:8ADTR1PS[4:0]ADTR1EN3ADTR1EN2ADTR1EN1
7:0UPDTRG[1:0]PGTRGSEL[2:0]
0x02AAAPG4EVTH15:8 FLTIEN CLIEN FFIEN SIENIEVTSEL[1:0]
7:0ADTR2EN3ADTR2EN2ADTR2EN1ADTR1OFS[4:0]
0x02AC ... 0x02BBReserved
0x02BC APG4LEBL15:8LEB[15:8]
7:0LEB[7:0]
0x02BE APG4LEBH15:8PWMPCI[2:0]
7:0PHR PHFPLR PLF
0x02C0APG4PHASE15:8PG4PHASE[15:8]
7:0PG4PHASE[7:0]
0x02C2 APG4DC15:8PG4DC[15:8]
7:0PG4DC[7:0]
0x02C4APG4DCA15:8
7:0PG4DCA[7:0]
0x02C6APG4PER15:8PG4PER[15:8]
7:0PG4PER[7:0]
0x02C8APG4TRIGA15:8PG4TRIGA[15:8]
7:0PG4TRIGA[7:0]
0x02CAAPG4TRIGB15:8PG4TRIGB[15:8]
7:0PG4TRIGB[7:0]
0x02CCAPG4TRIGC15:8PG4TRIGC[15:8]
7:0PG4TRIGC[7:0]
0x02CEAPG4DTL15:8DTL[13:8]
7:0DTL[7:0]
0x02D0APG4DTH15:8DTH[13:8]
7:0DTH[7:0]
0x02D2APG4CAP15:8PG4CAP[15:8]
7:0PG4CAP[7:0]
0x02D4 ... 0x02FFReserved
0x0300PCLKCON15:8HRRDYHRERRLOCK
7:0DIVSEL[1:0]MCLKSEL[1:0]
0x0302FSCL15:8FSCL[15:8]
7:0FSCL[7:0]
0x0304FSMINPER15:8FSMINPER[15:8]
7:0FSMINPER[7:0]
0x0306 MPHASE15:8MPHASE[15:8]
7:0MPHASE[7:0]
0x0308MDC15:8MDC[15:8]
7:0MDC[7:0]
0x030A MPER15:8MPER[15:8]
7:0MPER[7:0]
0x030CLFSR15:8LFSR[14:8]
7:0LFSR[7:0]
0x030ECMBTRIGL15:8
7:0CTA8ENCTA7ENCTA6ENCTA5ENCTA4ENCTA3ENCTA2EN
0x0310CMBTRIGH15:8
7:0CTB8ENCTB7ENCTB6ENCTB5ENCTB4ENCTB3ENCTB2EN
0x0312LOGCONA(2)15:8PWMS1A[3:0]PWMS2A[3:0]
7:0S1APOLS2APOLPWMLFA[1:0]PWMLFAD[2:0]
0x0314LOGCONB(2)15:8PWMS1B[3:0]PWMS2B[3:0]
7:0S1BPOLS2BPOLPWMLFB[1:0]PWMLFBD[2:0]
0x0316LOGCONC(2)15:8PWMS1C[3:0]PWMS2C[3:0]
7:0S1CPOLS2CPOLPWMLFC[1:0]PWMLFCD[2:0]

......continued

OffsetNameBit Pos. 76543210
0x0318LOGCOND(2)15:8 PWMS1D[3:0] PWMS2D[3:0]
7:0 S1DPOL S2DPOL PWMLFD[1:0] PWMLFDD[2:0]
0x031ALOGCONE(2)15:8 PWMS1E[3:0] PWMS2E[3:0]
7:0S1EPOLS2EPOLPWMLFE[1:0]PWMLFED[2:0]
0x031CLOGCONF(2)15:8 PWMS1F[3:0] PWMS2F[3:0]
7:0S1FPOLS2FPOLPWMLFF[1:0]PWMLFFD[2:0]
0x031EPWMEVTA(5)15:8EVTAOENEVTAPOLEVTASTRDEVTASYNC
7:0EVTASEL[3:0]EVTAPGS[2:0]
0x0320PWMEVTB(5)15:8EVTBOENEVTBPOLEVTBSTRDEVTBSYNC
7:0EVTBSEL[3:0]EVTBPGS[2:0]
0x0322PWMEVTC(5)15:8EVTCOENEVTCPOLEVTCTRDEVTCSYNC
7:0EVTCESEL[3:0]EVTCPGS[2:0]
0x0324PWMEVTD(5)15:8EVTDOENEVTDPOLEVTDSTRDEVTDSYNC
7:0EVTDSEL[3:0]EVTDPGS[2:0]
0x0326PWMEVTE(5)15:8EVTEOENEVTEPOLEVTESTRDEVTESYNC
7:0EVTSESEL[3:0]EVTEPGS[2:0]
0x0328PWMEVTF(5)15:8EVTFOENEVTFPOLEVTFSTRDEVTFSYNC
7:0EVTFSEL[3:0]EVTFPGS[2:0]
0x032APG1CONL15:8ONTRGCNT[2:0]
7:0HRENCLKSEL[1:0]MODSEL[2:0]
0x032CPG1CONH15:8MDCSELMPERSELMPHSELMSTENUPMOD[2:0]
7:0ReservedTRGMODSOCS[3:0]
0x032EPG1STAT15:8SEVTFLTEVTCLEVTFFEVTSACTFLTACTCLACTFFACT
7:0TRSETTRCLRCAPUPDATEUPDREQSTEERCAHALFTRIG
0x0330PG1IOCONL15:8CLMODSWAPOVRENHOVRENLOVRDAT[1:0]OSYNC[1:0]
7:0FLTDAT[1:0]CLDAT[1:0]FFDAT[1:0]DBDAT[1:0]
0x0332PG1IOCONH15:8CAPSRC[2:0]DTCMPSEL
7:0PMOD[1:0]PENHPENLPOLHPOLL
0x0334PG1EVTL15:8ADTR1PS[4:0]ADTR1EN3ADTR1EN2ADTR1EN1
7:0UPDTRG[1:0]PGTRGSEL[2:0]
0x0336PG1EVTH15:8FLTIENCLIENFFIENSIENIEVTSEL[1:0]
7:0ADTR2EN3ADTR2EN2ADTR2EN1ADTR1OFS[4:0]
0x0338PGxFPCIL15:8TSYNCDISTERM[2:0] AQPSAQSS[2:0]
7:0 SWTERM PSYNCPPSPSS[4:0]
0x033APG1yPCIH15:8BPEN BPSEL[2:0]ACP[2:0]
7:0SWPCISWPCIM[1:0]LATMODTQPSTQSS[2:0]
0x033C...0x033DReserved
0x033EPG2yPCIH15:8BPEN BPSEL[2:0]ACP[2:0]
7:0SWPCISWPCIM[1:0]LATMODTQPSTQSS[2:0]
0x0340...0x0341Reserved
0x0342PG3yPCIH15:8BPEN BPSEL[2:0]ACP[2:0]
7:0SWPCISWPCIM[1:0]LATMODTQPSTQSS[2:0]
0x0344...0x0345Reserved
0x0346PG4yPCIH15:8BPEN BPSEL[2:0]ACP[2:0]
7:0SWPCISWPCIM[1:0]LATMODTQPSTQSS[2:0]
0x0348PG1LEBL15:8LEB[15:8]
7:0LEB[7:0]
0x034APG1LEBH15:8PWMPCI[2:0]
7:0PHRPHFPLRPLF
0x034CPG1PHASE15:8PG1PHASE[15:8]
7:0PG1PHASE[7:0]
0x034EPG1DC15:8PG1DC[15:8]
7:0PG1DC[7:0]
0x0350PG1DCA15:8
7:0PG1DCA[7:0]
0x0352 PG1PER15:8 PG1PER[15:8]
7:0 PG1PER[7:0]
0x0354 PG1TRIGA15:8 PG1TRIGA[15:8]
7:0 PG1TRIGA[7:0]
0x0356 PG1TRIGB15:8 PG1TRIGB[15:8]
7:0 PG1TRIGB[7:0]
0x0358 PG1TRIGC15:8 PG1TRIGC[15:8]
7:0 PG1TRIGC[7:0]
0x035A PG1DTL15:8 DTL[13:8]
7:0 DTL[7:0]
0x035CPG1DTH15:8DTH[13:8]
7:0DTH[7:0]
0x035E PG1CAP15:8PG1CAP[15:8]
7:0PG1CAP[7:0]
0x0360PG2CONL15:8ONTRGCNT[2:0]
7:0 HRENCLKSEL[1:0]MODSEL[2:0]
0x0362 PG2CONH15:8MDCSELMPERSELMPHSELMSTENUPMOD[2:0]
7:0ReservedTRGMODSOCS[3:0]
0x0364 PG2STAT15:8SEVTFLTEVTCLEVTFFEVTSACTFLTACTCLACTFFACT
7:0TRSETTRCLRCAPUPDATEUPDREQSTEERCAHALFTRIG
0x0366PG2IOCONL15:8CLMODSWAPOVRENHOVRENLOVRDAT[1:0]OSYNC[1:0]
7:0FLTDAT[1:0]CLDAT[1:0]FFDAT[1:0]DBDAT[1:0]
0x0368PG2IOCONH15:8CAPSRC[2:0]DTCMPSEL
7:0PMOD[1:0]PENHPENLPOLHPOLL
0x036APG2EVTL15:8ADTR1PS[4:0]ADTR1EN3ADTR1EN2ADTR1EN1
7:0UPDTRG[1:0]PGTRGSEL[2:0]
0x036CPG2EVTH15:8FLTIENCLIENFFIENSIENIEVTSEL[1:0]
7:0ADTR2EN3ADTR2EN2ADTR2EN1ADTR1OFS[4:0]
0x036E ... 0x036FReserved
0x0370PG5yPCIH15:8BPENBPSEL[2:0]ACP[2:0]
7:0SWPCISWPCIM[1:0]LATMODTQPSTQSS[2:0]
0x0372 ... 0x0373Reserved
0x0374PG6yPCIH15:8BPENBPSEL[2:0]ACP[2:0]
7:0SWPCISWPCIM[1:0]LATMODTQPSTQSS[2:0]
0x0376 ... 0x0377Reserved
0x0378PG7yPCIH15:8BPENBPSEL[2:0]ACP[2:0]
7:0SWPCISWPCIM[1:0]LATMODTQPSTQSS[2:0]
0x037A ... 0x037BReserved
0x037C PG8yPCIH15:8BPENBPSEL[2:0]ACP[2:0]
7:0SWPCISWPCIM[1:0]LATMODTQPSTQSS[2:0]
0x037E PG2LEBL15:8LEB[15:8]
7:0 LEB[7:0]
0x0380PG2LEBH15:8PWMPCI[2:0]
7:0PHRPHFPLRPLF
0x0382 PG2PHASE15:8PG2PHASE[15:8]
7:0PG2PHASE[7:0]
0x0384PG2DC15:8PG2DC[15:8]
7:0PG2DC[7:0]
0x0386PG2DCA15:8
7:0PG2DCA[7:0]
0x0388 PG2PER15:8 PG2PER[15:8]
7:0 PG2PER[7:0]
0x038APG2TRIGA15:8 PG2TRIGA[15:8]
7:0 PG2TRIGA[7:0]
0x038CPG2TRIGB15:8 PG2TRIGB[15:8]
7:0 PG2TRIGB[7:0]
0x038EPG2TRIGC15:8 PG2TRIGC[15:8]
7:0 PG2TRIGC[7:0]
0x0390PG2DTL15:8 DTL[13:8]
7:0 DTL[7:0]
0x0392PG2DTH15:8 DTH[13:8]
7:0 DTH[7:0]
0x0394PG2CAP15:8 PG2CAP[15:8]
7:0 PG2CAP[7:0]
0x0396PG3CONL15:8 ONTRGCNT[2:0]
7:0 HRENCLKSEL[1:0]MODSEL[2:0]
0x0398PG3CONH15:8 MDCSELMPERSELMPHSELMSTENUPMOD[2:0]
7:0 ReservedTRGMODSOCS[3:0]
0x039APG3STAT15:8 SEVTFLTEVTCLEVTFFEVTSACTFLTACTCLACTFFACT
7:0 TRSETTRCLRCAPUPDATEUPDREQSTEERCAHALFTRIG
0x039CPG3IOCONL15:8 CLMODSWAPOVRENHOVRENLOVRDAT[1:0]OSYNC[1:0]
7:0 FLTDAT[1:0]CLDAT[1:0]FFDAT[1:0]DBDAT[1:0]
0x039EPG3IOCONH15:8 CAPSRC[2:0]DTCMPSEL
7:0 PMOD[1:0]PENHPENLPOLHPOLL
0x03A0PG3EVTL15:8 ADTR1PS[4:0]ADTR1EN3ADTR1EN2ADTR1EN1
7:0 UPDRG[1:0]PGTRGSEL[2:0]
0x03A2PG3EVTH15:8 FLTIENCLIENFFIENSIENIEVTSEL[1:0]
7:0 ADTR2EN3ADTR2EN2ADTR2EN1ADTR1OFS[4:0]
0x03A4...0x03A5Reserved
0x03A6PG9yPCIH15:8 BPENBPSEL[2:0]ACP[2:0]
7:0 SWPCISWPCIM[1:0]LATMODTQPSTQSS[2:0]
0x03A8...0x03A9Reserved
0x03AAPG10yPCIH15:8 BPENBPSEL[2:0]ACP[2:0]
7:0 SWPCISWPCIM[1:0]LATMODTQPSTQSS[2:0]
0x03AC...0x03ADReserved
0x03AEPG11yPCIH15:8 BPENBPSEL[2:0]ACP[2:0]
7:0 SWPCISWPCIM[1:0]LATMODTQPSTQSS[2:0]
0x03B0...0x03B1Reserved
0x03B2PG12yPCIH15:8 BPENBPSEL[2:0]ACP[2:0]
7:0 SWPCISWPCIM[1:0]LATMODTQPSTQSS[2:0]
0x03B4PG3LEBL15:8 LEB[7:0]
7:0 LEB[7:0]
0x03B6PG3LEBH15:8 PWMPCI[2:0]
7:0 PHR PHF PLR PLF
0x03B8PG3PHASE15:8 PG3PHASE[15:8]
7:0 PG3PHASE[7:0]
0x03BAPG3DC15:8 PG3DC[15:8]
7:0 PG3DC[7:0]
0x03BCPG3DCA15:8 PG3DCA[7:0]
7:0 PG3DCA[7:0]
0x03BEPG3PER15:8 PG3PER[15:8]
7:0 PG3PER[7:0]
0x03C0PG3TRIGA15:8 PG3TRIGA[15:8]
7:0 PG3TRIGA[7:0]
0x03C2 PG3TRIGB15:8 PG3TRIGB[15:8]
7:0 PG3TRIGB[7:0]
0x03C4 PG3TRIGC15:8 PG3TRIGC[15:8]
7:0 PG3TRIGC[7:0]
0x03C6 PG3DTL15:8 DTL[13:8]
7:0 DTL[7:0]
0x03C8 PG3DTH15:8 DTH[13:8]
7:0 DTH[7:0]
0x03CA PG3CAP15:8 PG3CAP[15:8]
7:0 PG3CAP[7:0]
0x03CCPG4CONL15:8 ONTRGCNT[2:0]
7:0 HRENCLKSEL[1:0]MODSEL[2:0]
0x03CEPG4CONH15:8MDCSELMPERSELMPHSELMSTENUPMOD[2:0]
7:0ReservedTRGMODSOCS[3:0]
0x03D0PG4STAT15:8SEVTFLTEVTCLEVTFFEVTSACTFLTACTCLACTFFACT
7:0TRSETTRCLRCAPUPDATEUPDREQSTEERCAHALFTRIG
0x03D2PG4IOCONL15:8CLMODSWAPOVRENHOVRENLOVRDAT[1:0]OSYNC[1:0]
7:0FLTDAT[1:0]CLDAT[1:0]FFDAT[1:0]DBDAT[1:0]
0x03D4PG4IOCONH15:8CAPSRC[2:0]DTCMPSEL
7:0PMOD[1:0]PENHPENLPOLHPOLL
0x03D6PG4EVTL15:8ADTR1PS[4:0]ADTR1EN3ADTR1EN2ADTR1EN1
7:0UPDTRG[1:0]PGTRGSEL[2:0]
0x03D8PG4EVTH15:8FLTIENCLIENFFIENSIENIEVTSEL[1:0]
7:0ADTR2EN3ADTR2EN2ADTR2EN1ADTR1OFS[4:0]
0x03DA...0x03DBReserved
0x03DCPG13yPCIH15:8BPENBPSEL[2:0]ACP[2:0]
7:0SWPCISWPCIM[1:0]LATMODTQPSTQSS[2:0]
0x03DE...0x03DFReserved
0x03E0PG14yPCIH15:8BPENBPSEL[2:0]ACP[2:0]
7:0SWPCISWPCIM[1:0]LATMODTQPSTQSS[2:0]
0x03E2...0x03E3Reserved
0x03E4PG15yPCIH15:8BPENBPSEL[2:0]ACP[2:0]
7:0SWPCISWPCIM[1:0]LATMODTQPSTQSS[2:0]
0x03E6...0x03E7Reserved
0x03E8PG16yPCIH15:8BPENBPSEL[2:0]ACP[2:0]
7:0SWPCISWPCIM[1:0]LATMODTQPSTQSS[2:0]
0x03EAPG4LEBL15:8LEB[15:8]
7:0 LEB[7:0]
0x03ECPG4LEBH15:8PWMPCI[2:0]
7:0PHRPHFPLRPLF
0x03EEPG4PHASE15:8PG4PHASE[15:8]
7:0PG4PHASE[7:0]
0x03F0PG4DC15:8PG4DC[15:8]
7:0PG4DC[7:0]
0x03F2 PG4DCA15:8
7:0PG4DCA[7:0]
0x03F4 PG4PER15:8PG4PER[15:8]
7:0PG4PER[7:0]
0x03F6PG4TRIGA15:8 PG4TRIGA[15:8]
7:0PG4TRIGA[7:0]
0x03F8PG4TRIGB15:8 PG4TRIGB[15:8]
7:0 PG4TRIGB[7:0]
0x03FA PG4TRIGC15:8 PG4TRIGC[15:8]
7:0 PG4TRIGC[7:0]
0x03FC PG4DTL15:8 DTL[13:8]
7:0 DTL[7:0]
0x03FE PG4DTH15:8 DTH[13:8]
7:0DTH[7:0]
0x0400 PG4CAP15:8PG4CAP[15:8]
7:0PG4CAP[7:0]
0x0402 ... 0x0403Reserved
0x0404 PG5CONH15:8MDCSELMPERSELMPHSELMSTENUPMOD[2:0]
7:0ReservedTRGMODSOCS[3:0]
0x0406 ... 0x0407Reserved
0x0408PG5IOCONL15:8CLMODSWAPOVRENHOVRENLOVRDAT[1:0]OSYNC[1:0]
7:0FLTDAT[1:0]CLDAT[1:0]FFDAT[1:0]DBDAT[1:0]
0x040APG5IOCONH15:8CAPSRC[2:0]DTCMPSEL
7:0PMOD[1:0]PENHPENLPOLHPOLL
0x040CPG5EVTL15:8ADTR1PS[4:0]ADTR1EN3ADTR1EN2ADTR1EN1
7:0UPDTRG[1:0]PGTRGSEL[2:0]
0x040EPG5EVTH15:8FLTIENCLIENFFIENSIENIEVTSEL[1:0]
7:0ADTR2EN3ADTR2EN2ADTR2EN1ADTR1OFS[4:0]
0x0410 ... 0x0411Reserved
0x0412PG17yPCIH15:8BPENBPSEL[2:0]ACP[2:0]
7:0SWPCISWPCIM[1:0]LATMODTQPSTQSS[2:0]
0x0414 ... 0x0415Reserved
0x0416PG18yPCIH15:8BPENBPSEL[2:0]ACP[2:0]
7:0SWPCISWPCIM[1:0]LATMODTQPSTQSS[2:0]
0x0418 ... 0x0419Reserved
0x041APG19yPCIH15:8BPENBPSEL[2:0]ACP[2:0]
7:0SWPCISWPCIM[1:0]LATMODTQPSTQSS[2:0]
0x041C ... 0x041DReserved
0x041EPG20yPCIH15:8BPENBPSEL[2:0]ACP[2:0]
7:0SWPCISWPCIM[1:0]LATMODTQPSTQSS[2:0]
0x0420 PG5LEBL15:8LEB[15:8]
7:0 LEB[7:0]
0x0422PG5LEBH15:8PWMPCI[2:0]
7:0PHRPHFPLRPLF
0x0424 PG5PHASE15:8PG5PHASE[15:8]
7:0PG5PHASE[7:0]
0x0426PG5DC15:8PG5DC[15:8]
7:0PG5DC[7:0]
0x0428PG5DCA15:8
7:0PG5DCA[7:0]
0x042A PG5PER15:8PG5PER[15:8]
7:0PG5PER[7:0]
0x042C PG5TRIGA15:8 PG5TRIGA[15:8]
7:0PG5TRIGA[7:0]
0x042E PG5TRIGB15:8 PG5TRIGB[15:8]
7:0 PG5TRIGB[7:0]
0x0430PG5TRIGC15:8 PG5TRIGC[15:8]
7:0 PG5TRIGC[7:0]
0x0432PG5DTL15:8 DTL[13:8]
7:0 DTL[7:0]
0x0434PG5DTH15:8 DTH[13:8]
7:0DTH[7:0]
0x0436PG5CAP15:8PG5CAP[15:8]
7:0PG5CAP[7:0]
0x0438...0x0439Reserved
0x043APG6CONH15:8MDCSELMPERSELMPHSELMSTENUPMOD[2:0]
7:0ReservedTRGMODSOCS[3:0]
0x043C...0x043DReserved
0x043EPG6IOCONL15:8CLMODSWAPOVRENHOVRENLOVRDAT[1:0]OSYNC[1:0]
7:0FLTDAT[1:0]CLDAT[1:0]FFDAT[1:0]DBDAT[1:0]
0x0440PG6IOCONH15:8CAPSRC[2:0]DTCMPSEL
7:0PMOD[1:0]PENHPENLPOLHPOLL
0x0442PG6EVTL15:8ADTR1PS[4:0]ADTR1EN3ADTR1EN2ADTR1EN1
7:0UPDTRG[1:0]PGTRGSEL[2:0]
0x0444...0x0447Reserved
0x0448PG21yPCIH15:8BPENBPSEL[2:0]ACP[2:0]
7:0SWPCISWPCIM[1:0]LATMODTQPSTQSS[2:0]
0x044A...0x044BReserved
0x044CPG22yPCIH15:8BPENBPSEL[2:0]ACP[2:0]
7:0SWPCISWPCIM[1:0]LATMODTQPSTQSS[2:0]
0x044E...0x044FReserved
0x0450PG23yPCIH15:8BPENBPSEL[2:0]ACP[2:0]
7:0SWPCISWPCIM[1:0]LATMODTQPSTQSS[2:0]
0x0452...0x0453Reserved
0x0454PG24yPCIH15:8BPENBPSEL[2:0]ACP[2:0]
7:0SWPCISWPCIM[1:0]LATMODTQPSTQSS[2:0]
0x0456PG6LEBL15:8LEB[15:8]
7:0 LEB[7:0]
0x0458PG6LEBH15:8PWMPCI[2:0]
7:0PHRPHFPLRPLF
0x045APG6PHASE15:8PG6PHASE[15:8]
7:0PG6PHASE[7:0]
0x045CPG6DC15:8PG6DC[15:8]
7:0PG6DC[7:0]
0x045EPG6DCA15:8
7:0PG6DCA[7:0]
0x0460PG6PER15:8PG6PER[15:8]
7:0PG6PER[7:0]
0x0462PG6TRIGA15:8 PG6TRIGA[15:8]
7:0PG6TRIGA[7:0]
0x0464PG6TRIGB15:8 PG6TRIGB[15:8]
7:0 PG6TRIGB[7:0]
0x0466PG6TRIGC15:8 PG6TRIGC[15:8]
7:0 PG6TRIGC[7:0]
0x0468 PG6DTL15:8 DTL[13:8]
7:0 DTL[7:0]
0x046A PG6DTH15:8 DTH[13:8]
7:0 DTH[7:0]
0x046C PG6CAP15:8 PG6CAP[15:8]
7:0 PG6CAP[7:0]
0x046E ... 0x046FReserved
0x0470PG7CONH15:8MDCSELMPERSELMPHSELMSTENUPMOD[2:0]
7:0ReservedTRGMODSOCS[3:0]
0x0472 ... 0x0473Reserved
0x0474PG7IOCONL15:8CLMODSWAPOVRENHOVRENLOVRDAT[1:0]OSYNC[1:0]
7:0FLTDAT[1:0]CLDAT[1:0]FFDAT[1:0]DBDAT[1:0]
0x0476PG7IOCONH15:8CAPSRC[2:0]DTCMPSEL
7:0PMOD[1:0]PENHPENLPOLHPOLL
0x0478PG7EVTL15:8ADTR1PS[4:0]ADTR1EN3ADTR1EN2ADTR1EN1
7:0UPDTRG[1:0]PGTRGSEL[2:0]
0x047A ... 0x047DReserved
0x047EPG25yPCIH15:8BPENBPSEL[2:0]ACP[2:0]
7:0SWPCISWPCIM[1:0]LATMODTQPSTQSS[2:0]
0x0480 ... 0x0481Reserved
0x0482PG26yPCIH15:8BPENBPSEL[2:0]ACP[2:0]
7:0SWPCISWPCIM[1:0]LATMODTQPSTQSS[2:0]
0x0484 ... 0x0485Reserved
0x0486PG27yPCIH15:8BPENBPSEL[2:0]ACP[2:0]
7:0SWPCISWPCIM[1:0]LATMODTQPSTQSS[2:0]
0x0488 ... 0x0489Reserved
0x048APG28yPCIH15:8BPENBPSEL[2:0]ACP[2:0]
7:0SWPCISWPCIM[1:0]LATMODTQPSTQSS[2:0]
0x048CPG7LEBL15:8LEB[15:8]
7:0 LEB[7:0]
0x048EPG7LEBH15:8PWMPCI[2:0]
7:0PHRPHFPLRPLF
0x0490 PG7PHASE15:8PG7PHASE[15:8]
7:0 PG7PHASE[7:0]
0x0492PG7DC15:8PG7DC[15:8]
7:0PG7DC[7:0]
0x0494PG7DCA15:8
7:0PG7DCA[7:0]
0x0496 PG7PER15:8PG7PER[15:8]
7:0PG7PER[7:0]
0x0498 PG7TRIGA15:8PG7TRIGA[15:8]
7:0PG7TRIGA[7:0]
0x049A PG7TRIGB15:8PG7TRIGB[15:8]
7:0PG7TRIGB[7:0]
0x049C PG7TRIGC15:8PG7TRIGC[15:8]
7:0PG7TRIGC[7:0]
0x049E PG7DTL15:8 DTL[13:8]
7:0 DTL[7:0]
0x04A0 PG7DTH15:8 DTH[13:8]
7:0 DTH[7:0]
0x04A2 PG7CAP15:8 PG7CAP[15:8]
7:0 PG7CAP[7:0]
0x04A4 ... 0x04A5Reserved
0x04A6 PG8CONH15:8MDCSELMPERSELMPHSELMSTENUPMOD[2:0]
7:0ReservedTRGMODSOCS[3:0]
0x04A8 ... 0x04A9Reserved
0x04AAPG8IOCONL15:8CLMODSWAPOVRENHOVRENLOVRDAT[1:0]OSYNC[1:0]
7:0FLTDAT[1:0]CLDAT[1:0]FFDAT[1:0]DBDAT[1:0]
0x04ACPG8IOCONH15:8CAPSRC[2:0]DTCMPSEL
7:0PMOD[1:0]PENHPENLPOLHPOLL
0x04AEPG8EVTL15:8ADTR1PS[4:0]ADTR1EN3ADTR1EN2ADTR1EN1
7:0UPDTRG[1:0]PGTRGSEL[2:0]
0x04B0 ... 0x04B3Reserved
0x04B4PG29yPCIH15:8BPENBPSEL[2:0]ACP[2:0]
7:0SWPCISWPCIM[1:0]LATMODTQPSTQSS[2:0]
0x04B6 ... 0x04B7Reserved
0x04B8PG30yPCIH15:8BPENBPSEL[2:0]ACP[2:0]
7:0SWPCISWPCIM[1:0]LATMODTQPSTQSS[2:0]
0x04BA ... 0x04BBReserved
0x04BCPG31yPCIH15:8BPENBPSEL[2:0]ACP[2:0]
7:0SWPCISWPCIM[1:0]LATMODTQPSTQSS[2:0]
0x04BE ... 0x04BFReserved
0x04C0PG32yPCIH15:8BPENBPSEL[2:0]ACP[2:0]
7:0SWPCISWPCIM[1:0]LATMODTQPSTQSS[2:0]
0x04C2PG8LEBL15:8LEB[15:8]
7:0LEB[7:0]
0x04C4PG8LEBH15:8PWMPCI[2:0]
7:0PHRPHFPLRPLF
0x04C6 PG8PHASE15:8PG8PHASE[15:8]
7:0 PG8PHASE[7:0]
0x04C8PG8DC15:8PG8DC[15:8]
7:0PG8DC[7:0]
0x04CA PG8DCA15:8
7:0PG8DCA[7:0]
0x04CCPG8PER15:8PG8PER[15:8]
7:0PG8PER[7:0]
0x04CE PG8TRIGA15:8PG8TRIGA[15:8]
7:0PG8TRIGA[7:0]
0x04D0 PG8TRIGB15:8PG8TRIGB[15:8]
7:0PG8TRIGB[7:0]
0x04D2 PG8TRIGC15:8PG8TRIGC[15:8]
7:0PG8TRIGC[7:0]
0x04D4PG8DTL15:8DTL[13:8]
7:0DTL[7:0]
0x04D6 PG8DTH15:8 DTH[13:8]
7:0 DTH[7:0]
......continued
OffsetNameBit Pos. 76543210
0x04D8PG8CAP15:8 PG8CAP[15:8]
7:0 PG8CAP[7:0]

12.6.1 Auxiliary PWM Clock Control Register

Name: APCLKCON

Offset: 0x1D2

Notes:

  1. A device-specific unlock sequence must be performed before this bit can be cleared.
  2. Changing the MCLKSEL[1:0] bits while ON (PGxCONL[15]) = 1 is not recommended.

Bit 15 14 13 12 11 10 9 8

HRRDY HERRLOCK
AccessR/W R/WR/W
Reset0 00
Bit7 6 5 4 3 2 1 0
DIVSEL[1:0]MCLKSEL[1:0]
AccessR/W R/WR/W R/W
Reset0 00 0

Bit 15 - HRRDY High-Resolution Ready bit

ValueDescription
1The high-resolution circuitry is ready
0The high-resolution circuitry is not ready

Bit 14-HRERR High-Resolution Error bit

ValueDescription
1An error has occurred; APWM signals will have limited resolution
0No error has occurred; APWM signals will have full resolution when HRRDY = 1

Bit 8 - LOCK Lock bit ^(1)

ValueDescription
1Write-protected registers and bits are locked
0Write-protected registers and bits are unlocked

Bits 5:4 - DIVSEL[1:0] PWM Clock Divider Selection bits

ValueDescription
11Divide ratio is 1:16
10Divide ratio is 1:8
01Divide ratio is 1:4
00Divide ratio is 1:2

Bits 1:0 - MCLKSEL[1:0] PWM Main Clock Selection bits ^(2)

ValueDescription
11 AF_PLLO – Auxiliary PLL post-divider output
10 F_PLLO – Primary PLL post-divider output
01 AF_VCO/2 – Auxiliary VCO/2
00 F_OSC

12.6.2 Auxiliary Frequency Scale Register

Name: AFSCL

Offset: 0x1D4

Bit 15 14 13 12 11 10 9 8

FSCL[15:8]
AccessR/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0
Bit7 6 5 4 3 2 1 0
FSCL[7:0]
AccessR/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0

Bits 15:0 – FSCL[15:0] Frequency Scale Register bits

The value in this register is added to the frequency scaling accumulator at each pwm_clk. When the accumulated value exceeds the value of AFSMINPER, a clock pulse is produced.

12.6.3 Auxiliary Frequency Scaling Minimum Period Register

Name: AFSMINPER

Offset: 0x1D6

Bit 15 14 13 12 11 10 9 8

FSMINPER[15:8]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

FSMINPER[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 15:0 – FSMINPER[15:0] Frequency Scaling Minimum Period Register bits

This register holds the minimum clock period (maximum clock frequency) that can be produced by the frequency scaling circuit.

12.6.4 Auxiliary Main Phase Register

Name: AMPHASE

Offset: 0x1D8

Bit 15 14 13 12 11 10 9 8

MPHASE[15:8]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

MPHASE[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 15:0 - MPHASE[15:0] Main Phase Register bits

12.6.5 Auxiliary Main Duty Cycle Register

Name: AMDC

Offset: 0x1DA

Bit 15 14 13 12 11 10 9 8

MDC[15:8]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

MDC[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 15:0 - MDC[15:0] Main Duty Cycle Register bits

12.6.6 Auxiliary Main Period Register

Name: AMPER

Offset: 0x1DC

Note:

  1. Period values less than '0x0010' should not be selected.

Bit 15 14 13 12 11 10 9 8

MPER[15:8]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

MPER[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 15:0 - MPER[15:0] Main Period Register bits ^(1)

This register holds the period value that can be shared by multiple APWM Generators.

12.6.7 Auxiliary Linear Feedback Shift Register

Name: ALFSR

Offset: 0x1DE

Bit 15 14 13 12 11 10 9 8

LFSR[14:8]

Access

R/W R/W R/W R/W R/W R/W R/W

Reset 0000000

Bit 76543210

LFSR[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 14:0 - LFSR[14:0] Linear Feedback Shift Register bits

A read of this register will provide a 15-bit pseudorandom value.

12.6.8 Auxiliary Combinational Trigger Register Low

Name: ACMBTRIGL

Offset: 0x1E0

Microchip dsPIC33CK1024MP708 - Auxiliary Combinational Trigger Register Low - 1

text_image Bit 15 14 13 12 11 10 9 8 Access Reset Bit 7 6 5 4 3 2 1 0 Reserved[3:0] CTA4EN CTA3EN CTA2EN CTA1EN Access R R R R R/W R/W R/W R/W Reset 0 0 0 0 0 0 0

Bits 7:4 – Reserved[3:0]

Bit 3 – CTA4EN Enable Trigger Output from APWM Generator #4 as Source for Comb. Trigger A bit

ValueDescription
1Enables specified trigger signal to be OR'd into the Combinatorial Trigger A signal
0Disabled

Bit 2 – CTA3EN Enable Trigger Output from APWM Generator #3 as Source for Comb. Trigger A bit

ValueDescription
1Enables specified trigger signal to be OR'd into the Combinatorial Trigger A signal
0Disabled

Bit 1 – CTA2EN Enable Trigger Output from APWM Generator #2 as Source for Comb. Trigger A bit

ValueDescription
1Enables specified trigger signal to be OR'd into the Combinatorial Trigger A signal
0Disabled

Bit 0 – CTA1EN Enable Trigger Output from APWM Generator #1 as Source for Comb. Trigger A bit

ValueDescription
1Enables specified trigger signal to be OR'd into the Combinatorial Trigger A signal
0Disabled

12.6.9 Auxiliary Combinational Trigger Register High

Name: ACMBTRIGH

Offset: 0x1E2

Microchip dsPIC33CK1024MP708 - Auxiliary Combinational Trigger Register High - 1

text_image Bit 15 14 13 12 11 10 9 8 Access Reset Bit 7 6 5 4 3 2 1 0 Reserved[3:0] CTB4EN CTB3EN CTB2EN CTB1EN Access R R R R R/W R/W R/W R/W Reset 0 0 0 0 0 0 0

Bits 7:4 – Reserved[3:0]

Bit 3 – CTB4EN Enable Trigger Output from APWM Generator #4 as Source for Comb. Trigger B bit

ValueDescription
1Enables specified trigger signal to be OR'd into the Combinatorial Trigger B signal
0Disabled

Bit 2 – CTB3EN Enable Trigger Output from APWM Generator #3 as Source for Comb. Trigger B bit

ValueDescription
1Enables specified trigger signal to be OR’d into the Combinatorial Trigger B signal
0Disabled

Bit 1 – CTB2EN Enable Trigger Output from APWM Generator #2 as Source for Comb. Trigger B bit

ValueDescription
1Enables specified trigger signal to be OR'd into the Combinatorial Trigger B signal
0Disabled

Bit 0 – CTB1EN Enable Trigger Output from APWM Generator #1 as Source for Comb. Trigger B bit

ValueDescription
1Enables specified trigger signal to be OR'd into the Combinatorial Trigger B signal
0Disabled

12.6.10 Auxiliary Combinatorial PWM Logic Control Register y (2)

Name: ALOGCONy

Offset: 0x1E4, 0x1E6, 0x1E8, 0x1EA, 0x1EC, 0x1EE

Notes:

  1. Logic function input will be connected to '0' if the APWM channel is not present.

  2. 'y' denotes a common instance (A-F).

Bit 15 14 13 12 11 10 9 8

PWMS1y[3:0] PWMS2y[3:0]
AccessR/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0 0
Bit7 6 5 4 3 2 1 0
S1yPOL S2yPOL PWMLFy[1:0]PWMLFyD[2:0]
AccessR/W R/W R/W R/WR/W R/W R/W
Reset0 0 0 00 0 0

Bits 15:12 – PWMS1y[3:0] Combinatorial APWM Logic Source #1 Selection bits ^(1)

ValueDescription
1111-1000Reserved
0111APWM4L
0110APWM4H
0101APWM3L
0100APWM3H
0011APWM2L
0010APWM2H
0001APWM1L
0000APWM1H

Bits 11:8 – PWMS2y[3:0] Combinatorial APWM Logic Source #2 Selection bits ^(1)

ValueDescription
1111-1000Reserved
0111APWM4L
0110APWM4H
0101APWM3L
0100APWM3H
0011APWM2L
0010APWM2H
0001APWM1L
0000APWM1H

Bit 7 – S1yPOL Combinatorial APWM Logic Source #1 Polarity bit

ValueDescription
1Input is inverted
0Input is positive logic

Bit 6 – S2yPOL Combinatorial APWM Logic Source #2 Polarity bit

ValueDescription
1Input is inverted
0Input is positive logic

Bits 5:4 – PWMLFy[1:0] Combinatorial APWM Logic Function Selection bits

Value Description
11Reserved
10PWMS1 ^ PWMS2 (XOR)
01PWMS1 & PWMS2 (AND)
00PWMS1 | PWMS2 (OR)

Bits 2:0 – PWMLFyD[2:0] Combinatorial APWM Logic Destination Selection bits

Value Description
111-100Reserved
011Logic function is assigned to the APWM4H or APWM4L pin
010Logic function is assigned to the APWM3H or APWM3L pin
001Logic function is assigned to the APWM2H or APWM2L pin
000No assignment, combinatorial APWM logic function is disabled

12.6.11 Auxiliary PWM Event Output Control Register y

Name: APWMEVTy (5)

Offset: 0x1F0, 0x1F2, 0x1F4, 0x1F6, 0x1F8, 0x1FA

Notes:

  1. The event signal is stretched using the peripheral clock because different APGs may be operating from different clock sources. The leading edge of the event pulse is produced in the clock domain of the APWM Generator. The trailing edge of the stretched event pulse is produced in the peripheral clock domain.
  2. No event will be produced if the selected APWM Generator is not present.
  3. This is the APWM Generator output signal prior to Output mode logic and any output override logic.
  4. This signal should be the APGx_clk domain signal prior to any synchronization into the system clock domain.
  5. 'y' denotes a common instance (A-F).

Bit 15 14 13 12 11 10 9 8

EVTyOENEVTyPOLEVTySTRDEVTySYNC
AccessR/WR/WR/WR/W
Reset0 0 0 0
Bit7 6 5 4 3 2 1 0
EVTySEL[3:0]EVTyPGS[2:0]
AccessR/WR/WR/WR/WR/WR/W
Reset0 0 0 00 0 0

Bit 15 – EVTyOEN APWM Event Output Enable bit

ValueDescription
1Event output signal is output on APWMEVTy pin
0Event output signal is internal only

Bit 14 - EVTyPOL APWM Event Output Polarity bit

ValueDescription
1Event output signal is active-low
0Event output signal is active-high

Bit 13 – EVTySTRD APWM Event Output Stretch Disable bit

ValueDescription
1Event output signal pulse width is not stretched
0Event output signal is stretched to eight APWM clock cycles minimum ^(1)

Bit 12 - EVTySYNC APWM Event Output Sync bit
Event output signal pulse will be two system clocks when this bit is set and EVTySTRD = 1.

ValueDescription
1Event output signal is synchronized to the system clock
0Event output is not synchronized to the system clock

Bits 7:4 – EVTySEL[3:0] APWM Event Selection bits

ValueDescription
1111High-resolution error event signal
1110-1010Reserved
1001ADC Trigger 2 signal
1000ADC Trigger 1 signal
0111STEER signal (available in Push-Pull Output modes only) ^(4)
0110CAHALF signal (available in Center-Aligned modes only) ^(4)
0101PCI Fault active output signal
Value Description
0100PCI current limit active output signal
0011PCI feed-forward active output signal
0010PCI Sync active output signal
0001APWM Generator output signal^(3)
0000Source is selected by the PGTRGSEL[2:0] bits

Bits 2:0 – EVTyPGS[2:0] APWM Event Source Selection bits ^(2)

Value Description
111-101Reserved
100APWM Generator 4
...
000APWM Generator 1

12.6.12 Auxiliary PWM Generator x Control Register Low

Name: APGxCONL

Offset: 0x1FC, 0x232, 0x268, 0x29E

Note:

  1. The APWM Generator time base operates from the frequency scaling circuit clock, effectively scaling the duty cycle and period of the APWM Generator output.

Legend: r = Reserved bit

Bit 15 14 13 12 11 10 9 8

ONTRGCNT[2:0]
AccessR/WR/WR/WR/W
Reset 00 0 0

Bit 76543210

HRENCLKSEL[1:0]MODSEL[2:0]
AccessR/WR/W R/W R/W R/W R/W
Reset 00 0 0 0 0

Bit 15 - ON Enable bit

ValueDescription
1APWM Generator is enabled
0APWM Generator is not enabled

Bits 10:8 – TRGCNT[2:0] Trigger Count Select bits

ValueDescription
111APWM Generator produces eight PWM cycles after triggered
110APWM Generator produces seven PWM cycles after triggered
101APWM Generator produces six PWM cycles after triggered
100APWM Generator produces five PWM cycles after triggered
011APWM Generator produces four PWM cycles after triggered
010APWM Generator produces three PWM cycles after triggered
001APWM Generator produces two PWM cycles after triggered
000APWM Generator produces one PWM cycle after triggered

Bit 7 – HREN APWM Generator x High-Resolution Enable bit

ValueDescription
1APWM Generator x operates in High-Resolution mode
0APWM Generator x operates in Standard Resolution mode

Bits 4:3 - CLKSEL[1:0] Clock Selection bits

ValueDescription
11APWM Generator uses Host clock scaled by frequency scaling circuit ^(1)
10APWM Generator uses Host clock divided by clock divider circuit ^(1)
01APWM Generator uses Host clock selected by the MCLKSEL[1:0] (APCLKCON[1:0]) control bits
00No clock selected, APWM Generator is in the Lowest Power state (default)

Bits 2:0 - MODSEL[2:0] Mode Selection bits

ValueDescription
111Dual Edge Center-Aligned PWM mode (interrupt/register update twice per cycle)
110Dual Edge Center-Aligned PWM mode (interrupt/register update once per cycle)
101Double-Update Center-Aligned PWM mode
100Center-Aligned PWM mode
011Reserved
Value Description
010Independent Edge PWM mode, dual output
001Variable Phase PWM mode
000Independent Edge PWM mode

12.6.13 Auxiliary PWM Generator x Control Register High

Name: APGxCONH

Offset: 0x1FE, 0x234, 0x26A, 0x2A0

Notes:

  1. The PCI selected Sync signal is always available to be OR'd with the selected SOC signal per the SOCS[3:0] bits if the PCI Sync function is enabled.
  2. The source selected by the SOCS[3:0] bits MUST operate from the same clock source as the local APWM Generator. If not, the source must be routed through the PCI Sync logic so the trigger signal may be synchronized to the APWM Generator clock domain.
  3. APWM Generators are grouped into groups of four: APG1-APG4 and APG5-APG8, if available. Any generator within a group of four may be used to trigger another generator within the same group.

Legend: r = Reserved bit

Bit 15 14 13 12 11 10 9 8

MDCSEL MPERSEL MPHSELMSTEN UPMOD[2:0]
AccessR/WR/WR/WR/WR/WR/WR/W
Reset0 0 00 0 0 0

Bit 76543210

Reserved TRGMODSOCS[3:0]
AccessrR/WR/WR/WR/WR/W
Reset0 00 0 0 0

Bit 15 - MDCSEL Main Duty Cycle Register Select bit

ValueDescription
1APWM Generator uses the AMDC register instead of APGxDC
0APWM Generator uses the APGxDC register

Bit 14 – MPERSEL Main Period Register Select bit

ValueDescription
1APWM Generator uses the AMPER register instead of APGxPER
0APWM Generator uses the APGxPER register

Bit 13 - MPHSEL Main Phase Register Select bit

ValueDescription
1APWM Generator uses the AMPHASE register instead of APGxPHASE
0APWM Generator uses the APGxPHASE register

Bit 11 - MSTEN Main Update Enable bit

ValueDescription
1APWM Generator broadcasts software set/clear of the UPDATE status bit and EOC signal to other APWM Generators
0APWM Generator does not broadcast the UPDATE status bit state or EOC signal

Bits 10:8 – UPMOD[2:0] APWM Buffer Update Mode Selection bits

Bit 7 – Reserved Maintain as '0'

Bit 6 – TRGMOD APWM Generator Trigger Mode Selection bit

ValueDescription
1APWM Generator operates in Retriggerable mode
0APWM Generator operates in Single Trigger mode

Bits 3:0 - SOCS[3:0] Start-of-Cycle Selection bits ^(1,2,3)

Value Description
1111TRIG bit or PCI Sync function only (no hardware trigger source is selected)
1110-0101Reserved
0100APWM4 APG1 trigger output selected by PGTRGSEL[2:0] (PGxEVT[2:0])
0011APWM3 APG1 trigger output selected by PGTRGSEL[2:0] (PGxEVT[2:0])
0010APWM2 APG1 trigger output selected by PGTRGSEL[2:0] (PGxEVT[2:0])
0001APWM1 APG1 trigger output selected by PGTRGSEL[2:0] (PGxEVT[2:0])
0000Local EOC – APWM Generator is self-triggered

12.6.14 Auxiliary PWM Generator x Status Register

Name: APGxSTAT

Offset: 0x200, 0x236, 0x26C, 0x2A2

Note:

  1. User software may write a '1' to CAP as a request to initiate a software capture. The CAP status bit will be set when the capture event has occurred. No further captures will occur until CAP is cleared by software.

Legend: C = Clearable bit; HS = Hardware Settable bit

Bit 15 14 13 12 11 10 9 8

SEVT FLTEVT CLEVT FFEVTSACT FLTACT CLACT FFACT
AccessHS/CHS/CHS/CHS/CRRR
Reset0 0 0 0 0 0 0 0

Bit 76543210

TRSETTRCLRCAPUPDATEUPDREQSTEERCAHALFTRIG
AccessWWR/W/HSRWRRR
Reset0 0 0 0 0 0 0 0

Bit 15 – SEVT PCI Sync Event bit

ValueDescription
1A PCI Sync event has occurred (rising edge on PCI Sync output or PCI Sync output is high when module is enabled)
0No PCI Sync event has occurred

Bit 14 – FLTEVT PCI Fault Active Status bit

ValueDescription
1A Fault event has occurred (rising edge on PCI Fault output or PCI Fault output is high when module is enabled)
0No Fault event has occurred

Bit 13 – CLEVT PCI Current Limit Status bit

ValueDescription
1A PCI current limit event has occurred (rising edge on PCI current limit output or PCI current limit output is high when module is enabled)
0No PCI current limit event has occurred

Bit 12 - FFEVT PCI Feed-Forward Active Status bit

ValueDescription
1A PCI feed-forward event has occurred (rising edge on PCI feed-forward output or PCI feed-forward output is high when module is enabled)
0No PCI feed-forward event has occurred

Bit 11 – SACT PCI Sync Status bit

ValueDescription
1PCI Sync output is active
0PCI Sync output is inactive

Bit 10 - FLTACT PCI Fault Active Status bit

ValueDescription
1PCI Fault output is active
0PCI Fault output is inactive
Value Description
1PCI current limit output is active
0PCI current limit output is inactive

Bit 9 – CLACT PCI Current Limit Status bit

Bit 8 – FFACT PCI Feed-Forward Active Status bit

Value Description
1PCI feed-forward output is active
0PCI feed-forward output is inactive

Bit 7 – TRSET APWM Generator Software Trigger Set bit

User software writes a '1' to this bit location to trigger a APWM Generator cycle. The bit location always reads as '0'. The TRIG bit will indicate '1' when the APWM Generator is triggered.

Bit 6 – TRCLR APWM Generator Software Trigger Clear bit

User software writes a '1' to this bit location to stop a APWM Generator cycle. The bit location always reads as '0'. The TRIG bit will indicate '0' when the APWM Generator is not triggered.

Bit 5 – CAP Capture Status bit ^(1)

Value Description
1APWM Generator time base value has been captured in APGxCAP
0No capture has occurred

Bit 4 – UPDATE APWM Data Register Update Status/Control bit

Value Description
1APWM Data register update is pending – user Data registers are not writable
0No APWM Data register update is pending

Bit 3 – UPDREQ APWM Data Register Update Request bit

User software writes a '1' to this bit location to request a APWM Data register update. The bit location always reads as '0'. The UPDATE status bit will indicate '1' when an update is pending.

Bit 2 – STEER Output Steering Status bit (Push-Pull Output mode only)

Value Description
1APWM Generator is in 2nd cycle of Push-Pull mode
0APWM Generator is in 1st cycle of Push-Pull mode

Bit 1 – CAHALF Half Cycle Status bit (Center-Aligned modes only)

Value Description
1APWM Generator is in 2nd half of time base cycle
0APWM Generator is in 1st half of time base cycle

Bit 0 - TRIG APWM Trigger Status bit

Value Description
1APWM Generator is triggered and APWM cycle is in progress
0No APWM cycle is in progress

12.6.15 Auxiliary PWM Generator x I/O Control Register Low

Name: APGxIOCONL

Offset: 0x202, 0x238, 0x26E, 0x2A4

Bit 15 14 13 12 11 10 9 8

CLMOD SWAP OVRENH OVRENLOVRDAT[1:0] OSYNC[1:0]
AccessR/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0

Bit 76543210

FLTDAT[1:0]CLDAT[1:0]FFDAT[1:0]DBDAT[1:0]
AccessR/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0 0

Bit 15 – CLMOD Current Limit Mode Select bit

ValueDescription
1If PCI current limit is active, then the APWMxH and APWMxL output signals are inverted (bit flipping), and the CLDAT[1:0] bits are not used
0If PCI current limit is active, then the CLDAT[1:0] bits define the APWM output levels

Bit 14 – SWAP Swap APWM Signals to APWMxH and APWMxL Device Pins bit

ValueDescription
1The APWMxH signal is connected to the APWMxL pin and the APWMxL signal is connected to the APWMxH pin
0APWMxH/L signals are mapped to their respective pins

Bit 13 - OVRENH User Override Enable for APWMxH Pin bit

ValueDescription
1OVRDAT1 provides data for output on the APWMxH pin
0APWM Generator provides data for the APWMxH pin

Bit 12 - OVRENL User Override Enable for APWMxL Pin bit

ValueDescription
1OVRDAT0 provides data for output on the APWMxL pin
0APWM Generator provides data for the APWMxL pin

Bits 11:10 - OVRDAT[1:0] Data for APWMxH/APWMxL Pins if Override is Enabled bits

If OVERENH = 1, then OVRDAT1 provides data for APWMxH.

If OVERENL = 1, then OVRDAT0 provides data for APWMxL.

Bits 9:8 – OSYNC[1:0] User Output Override Synchronization Control bits

ValueDescription
11Reserved
10User output overrides via the OVRENH/L and OVRDAT[1:0] bits occur when specified by the UPDMOD[2:0] bits in the APGxCONH register
01User output overrides via the OVRENH/L and OVRDAT[1:0] bits occur immediately (as soon as possible)
00User output overrides via the OVRENH/L and OVRDAT[1:0] bits are synchronized to the local APWM time base (next Start-of-Cycle)

Bits 7:6 – FLTDAT[1:0] Data for APWMxH/APWMxL Pins if Fault Event is Active bits

If Fault is active, then FLTDAT1 provides data for APWMxH.

If Fault is active, then FLTDATO provides data for APWMxL.

Bits 5:4 – CLDAT[1:0] Data for APWMxH/APWMxL Pins if Current Limit Event is Active bits

If current limit is active, then CLDAT1 provides data for APWMxH.

If current limit is active, then CLDAT0 provides data for APWMxL.

Bits 3:2 – FFDAT[1:0] Data for APWMxH/APWMxL Pins if Feed-Forward Event is Active bits

If feed-forward is active, then FFDAT1 provides data for APWMxH.

If feed-forward is active, then FFDATO provides data for APWMxL.

Bits 1:0 – DBDAT[1:0] Data for APWMxH/APWMxL Pins if Debug Mode is Active and PTFRZ = 1 bits

If Debug mode is active and PTFRZ = 1, then DBDAT1 provides data for APWMxH.

If Debug mode is active and PTFRZ = 1, then DBDAT0 provides data for APWMxL.

12.6.16 Auxiliary PWM Generator x I/O Control Register High

Name: APGxIOCONH

Offset: 0x204, 0x23A, 0x270, 0x2A6

Note:

  1. A capture may be initiated in software at any time by writing a '1' to CAP (APGxSTAT[5]).
Bit 15 14 13 12 11 10 9 8
CAPSRC[2:0]DTCMPSEL
AccessR/W R/W R/W R/W
Reset0 0 00
Bit7 6 5 4 3 2 1 0
PMOD[1:0]PENHPENLPOLHPOLL
AccessR/W R/W R/W R/W R/W
Reset0 0 0 0 0 0

Bits 14:12 - CAPSRC[2:0] Time Base Capture Source Selection bits ^(1)

ValueDescription
111Reserved
110Reserved
101Reserved
100Capture time base value at assertion of selected PCI Fault signal
011Capture time base value at assertion of selected PCI current limit signal
010Capture time base value at assertion of selected PCI feed-forward signal
001Capture time base value at assertion of selected PCI Sync signal
000No hardware source selected for time base capture – software only

Bit 8 - DTCMPSEL Dead-Time Compensation Select bit

ValueDescription
1Dead-time compensation is controlled by PCI feed-forward limit logic
0Dead-time compensation is controlled by PCI Sync logic

Bits 5:4 – PMOD[1:0] APWM Generator Output Mode Selection bits

ValueDescription
11Reserved
10APWM Generator outputs operate in Push-Pull mode
01APWM Generator outputs operate in Independent mode
00APWM Generator outputs operate in Complementary mode

Bit 3 – PENH APWMxH Output Port Enable bit

ValueDescription
1APWM Generator controls the APWMxH output pin
0APWM Generator does not control the APWMxH output pin

Bit 2 – PENL APWMxL Output Port Enable bit

ValueDescription
1APWM Generator controls the APWMxL output pin
0APWM Generator does not control the APWMxL output pin

Bit 1 – POLH APWMxH Output Polarity bit

ValueDescription
1Output pin is active-low
0Output pin is active-high

Bit 0 – POLL APWMxL Output Polarity bit

Value Description
1Output pin is active-low
0Output pin is active-high

12.6.17 Auxiliary APWM Generator x Event Register Low

Name: APGxEVTL

Offset: 0x206, 0x23C, 0x272, 0x2A8

Note:

  1. These events are derived from the internal PWM Generator time base comparison events.

Bit 15 14 13 12 11 10 9 8

ADTR1PS[4:0] ADTR1EN3 ADTR1EN2 ADTR1EN1

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210
UPD TRG[1:0]PGTRGSEL[2:0]
AccessR/W R/W R/W R/W R/W
Reset00000

Bits 15:11 - ADTR1PS[4:0] ADC Trigger 1 Postscaler Selection bits

ValueDescription
111111:32
. . .
000101:3
000011:2
000001:1

Bit 10 – ADTR1EN3 ADC Trigger 1 Source is APGxTRIGC Compare Event Enable bit

ValueDescription
1APGxTRIGC register compare event is enabled as trigger source for ADC Trigger 1
0APGxTRIGC register compare event is disabled as trigger source for ADC Trigger 1

Bit 9 – ADTR1EN2 ADC Trigger 1 Source is APGxTRIGB Compare Event Enable bit

ValueDescription
1APGxTRIGB register compare event is enabled as trigger source for ADC Trigger 1
0APGxTRIGB register compare event is disabled as trigger source for ADC Trigger 1

Bit 8 – ADTR1EN1 ADC Trigger 1 Source is APGxTRIGA Compare Event Enable bit

ValueDescription
1APGxTRIGA register compare event is enabled as trigger source for ADC Trigger 1
0APGxTRIGA register compare event is disabled as trigger source for ADC Trigger 1

Bits 4:3 – UPDTRG[1:0] Update Trigger Select bits

ValueDescription
11A write of the APGxTRIGA register automatically sets the UPDATE bit
10A write of the APGxPHASE register automatically sets the UPDATE bit
01A write of the APGxDC register automatically sets the UPDATE bit
00User must set the UPDATE bit (APGxSTAT[4]) manually

Bits 2:0 – PGTRGSEL[2:0] APWM Generator Trigger Output Selection bits ^(1)

ValueDescription
111Reserved
110Reserved
101Reserved
100Reserved
011APGxTRIGC compare event is the APWM Generator trigger

Value Description

010APGxTRIGB compare event is the APWM Generator trigger
001APGxTRIGA compare event is the APWM Generator trigger
000EOC event is the APWM Generator trigger

12.6.18 Auxiliary PWM Generator x Event Register High

Name: APGxEVTH

Offset: 0x208, 0x23E, 0x274, 0x2AA

Notes:

  1. An interrupt is only generated on the rising edge of the PCI Fault active signal.
  2. An interrupt is only generated on the rising edge of the PCI current limit active signal.
  3. An interrupt is only generated on the rising edge of the PCI feed-forward active signal.
  4. An interrupt is only generated on the rising edge of the PCI Sync active signal.

Bit 15 14 13 12 11 10 9 8

FLTIEN CLIEN FFIEN SIENIEVTSEL[1:0]
AccessR/WR/WR/WR/WR/WR/W
Reset0 0 0 00 0

Bit 76543210

ADTR2EN3ADTR2EN2ADTR2EN1ADTR1OFS[4:0]
AccessR/WR/WR/WR/WR/WR/WR/WR/W
Reset0 0 0 0 0 0 0 0

Bit 15 - FLTIEN PCI Fault Interrupt Enable bit ^(1)

ValueDescription
1Fault interrupt is enabled
0Fault interrupt is disabled

Bit 14 – CLIEN PCI Current Limit Interrupt Enable bit ^(2)

ValueDescription
1Current limit interrupt is enabled
0Current limit interrupt is disabled

Bit 13 - FFIEN PCI Feed-Forward Interrupt Enable bit ^(3)

ValueDescription
1Feed-forward interrupt is enabled
0Feed-forward interrupt is disabled

Bit 12 – SIEN PCI Sync Interrupt Enable bit ^(4)

ValueDescription
1Sync interrupt is enabled
0Sync interrupt is disabled

Bits 9:8 – IEVTSEL[1:0] Interrupt Event Selection bits

ValueDescription
11Time base interrupts are disabled (Sync, Fault, current limit and feed-forward events can be independently enabled)
10Interrupts CPU at ADC Trigger 1 event
01Interrupts CPU at TRIGA compare event
00Interrupts CPU at EOC

Bit 7 – ADTR2EN3 ADC Trigger 2 Source is APGxTRIGC Compare Event Enable bit

ValueDescription
1APGxTRIGC register compare event is enabled as trigger source for ADC Trigger 2
0APGxTRIGC register compare event is disabled as trigger source for ADC Trigger 2

Bit 6 – ADTR2EN2 ADC Trigger 2 Source is APGxTRIGB Compare Event Enable bit

Value Description
1APGxTRIGB register compare event is enabled as trigger source for ADC Trigger 2
0APGxTRIGB register compare event is disabled as trigger source for ADC Trigger 2

Bit 5 – ADTR2EN1 ADC Trigger 2 Source is APGxTRIGA Compare Event Enable bit

Value Description
1APGxTRIGA register compare event is enabled as trigger source for ADC Trigger 2
0APGxTRIGA register compare event is disabled as trigger source for ADC Trigger 2

Bits 4:0 – ADTR1OFS[4:0] ADC Trigger 1 Offset Selection bits

Value Description
11111Offset by 31 trigger events
. . .
00010Offset by 2 trigger events
00001Offset by 1 trigger event
00000No offset

12.6.19 Auxiliary PWM Generator xy PCI Register Low (x = PWM Generator #; y = F, CL, FF OR S)

Name: APGxyPCIL

Offset: 0x20A

Bit 15 14 13 12 11 10 9 8

TSYNCDIS TERM[2:0] AQPS AQSS[2:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

SWTERM PSYNCPPSPSS[4:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 15 - TSYNCDIS Termination Synchronization Disable bit

ValueDescription
1Termination of latched PCI occurs immediately
0Termination of latched PCI occurs at APWM EOC

Bits 14:12 - TERM[2:0] Termination Event Selection bits

ValueDescription
111Selects PCI Source #9
110Selects PCI Source #8
101Selects PCI Source #1 (APWM Generator output selected by the PWMPCI[2:0] bits)
100APGxTRIGC trigger event
011APGxTRIGB trigger event
010APGxTRIGA trigger event
001Auto-Terminate: Terminates when PCI source transitions from active to inactive
000Manual Terminate: Terminates on a write of ‘1’ to the SWTERM bit location

Bit 11 – AQPS Acceptance Qualifier Polarity Select bit

ValueDescription
1Inverted
0Not inverted

Bits 10:8 – AQSS[2:0] Acceptance Qualifier Source Selection bits

ValueDescription
111SWPCI control bit only (qualifier forced to ‘0’)
110Selects PCI Source #9
101Selects PCI Source #8
100Selects PCI Source #1 (APWM Generator output selected by the PWMPCI[2:0] bits)
011APWM Generator is triggered
010LEB is active
001Duty cycle is active (base APWM Generator signal)
000No acceptance qualifier is used (qualifier forced to ‘1’)

Bit 7 – SWTERM PCI Software Termination bit

A write of '1' to this location will produce a termination event. This bit location always reads as '0'.

Bit 6 – PSYNC PCI Synchronization Control bit

ValueDescription
1PCI source is synchronized to APWM EOC
0PCI source is not synchronized to APWM EOC

Bit 5 – PPS PCI Polarity Select bit

Value Description
1Inverted
0Not inverted

Bits 4:0 – PSS[4:0] PCI Source Selection bits

Value Description
11111CLC1
11110CLC2
11101Comparator 3 output
11100Comparator 2 output
11011Comparator 1 output
11010APWM Event D
11001APWM Event C
11000APWM Event B
10111APWM Event A
10110Device pin, PCI[22]
10101Device pin, PCI[21]
10100Device pin, PCI[20]
10011Device pin, PCI[19]
10010RPn input, PCI18R
10001RPn input, PCI17R
10000RPn input, PCI16R
01111RPn input, PCI15R
01110RPn input, PCI14R
01101RPn input, PCI13R
01100RPn input, PCI12R
01011RPn input, PCI11R
01010RPn input, PCI10R
01001RPn input, PCI9R
01000RPn input, PCI8R
00111Reserved
00110Reserved
00101Reserved
00100Reserved
00011Internally connected to Combo Trigger B
00010Internally connected to Combo Trigger A
00001Internally connected to the output of PWMPCI[2:0] MUX
00000Tied to '0'

12.6.20 Auxiliary PWM Generator xy PCI Register High (x = APWM Generator #; y = F, CL, FF OR S)

Name: APGxyPCIH

Offset: 0x20C

Note:

  1. Selects '0' if selected PWM Generator is not present.

Bit 15 14 13 12 11 10 9 8

BPEN BPSEL[2:0] ACP[2:0]
AccessR/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 00 0 0
Bit7 6 5 4 3 2 1 0
SWPCI SWPCIM[1:0] LATMODTQPSTQSS[2:0]
AccessR/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0

Bit 15 – BPEN PCI Bypass Enable bit

ValueDescription
1PCI function is enabled and local PCI logic is bypassed; APWM Generator will be controlled by PCI function in the APWM Generator selected by the BPSEL[2:0] bits
0PCI function is not bypassed

Bits 14:12 - BPSEL[2:0] PCI Bypass Source Selection bits ^(1)

ValueDescription
111-100Reserved
011PCI control is sourced from APWM Generator 4 PCI logic when BPEN = 1
010PCI control is sourced from APWM Generator 3 PCI logic when BPEN = 1
001PCI control is sourced from APWM Generator 2 PCI logic when BPEN = 1
000PCI control is sourced from APWM Generator 1 PCI logic when BPEN = 1

Bits 10:8 – ACP[2:0] PCI Acceptance Criteria Selection bits

ValueDescription
111Reserved
110Reserved
101Latched any edge
100Latched rising edge
011Latched
010Any edge
001Rising edge
000Level-sensitive

Bit 7 – SWPCI Software PCI Control bit

ValueDescription
1Drives a ‘1’ to PCI logic assigned to by the SWPCIM[1:0] control bits
0Drives a ‘0’ to PCI logic assigned to by the SWPCIM[1:0] control bits

Bits 6:5 – SWPCIM[1:0] Software PCI Control Mode bits

ValueDescription
11Reserved
10SWPCI bit is assigned to termination qualifier logic
01SWPCI bit is assigned to acceptance qualifier logic
00SWPCI bit is assigned to PCI acceptance logic

Bit 4 – LATMOD PCI SR Latch Mode bit

Value Description
1SR latch is Reset-dominant in Latched Acceptance modes
0SR latch is Set-dominant in Latched Acceptance modes

Bit 3 – TQPS Termination Qualifier Polarity Select bit

Value Description
1Inverted
0Not inverted

Bits 2:0 – TQSS[2:0] Termination Qualifier Source Selection bits

Value Description
111SWPCI control bit only (qualifier forced to ‘0’)
110Selects PCI Source #9
101Selects PCI Source #8
100Selects PCI Source #1 (APWM Generator output selected by the PWMPCI[2:0] bits)
011APWM Generator is triggered
010LEB is active
001Duty cycle is active (base APWM Generator signal)
000No termination qualifier used (qualifier forced to ‘1’)

12.6.21 Auxiliary PWM Generator x Leading-Edge Blanking Register Low

Name: APGxLEBL

Offset: 0x21A, 0x250, 0x286, 0x2BC

Note:

  1. Bits[2:0] are read-only and always remain as '0'.
Bit 15 14 13 12 11 10 9 8
LEB[15:8]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
LEB[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0

Bits 15:0 – LEB[15:0] Leading-Edge Blanking Period bits ^(1)

Leading-Edge Blanking period. The three LSbs of the blanking time are not used, providing a blanking resolution of eight PGx_clks. The minimum blanking period is eight PGx_clks which occurs when LEB[15:3] = 0.

12.6.22 Auxiliary APWM Generator x Leading-Edge Blanking Register High

Name: APGxLEBH

Offset: 0x21C, 0x252, 0x288, 0x2BE

Note:

  1. The selected APWM Generator source does not affect the LEB counter. This source can be optionally used as a PCI input, PCI qualifier, PCI terminator or PCI terminator qualifier.

Bit 15 14 13 12 11 10 9 8

PWMPCI[2:0]
Access Reset 0 0 0R/W R/W R/W

Bit 76543210

PHRPHFPLRPLF
AccessR/W R/W R/W R/W
Reset0 0 0 0

Bits 10:8 – PWMPCI[2:0] APWM Source for PCI Selection bits ^(1)

ValueDescription
111-100Reserved
011APWM Generator #4 output is made available to PCI logic
010APWM Generator #3 output is made available to PCI logic
001APWM Generator #2 output is made available to PCI logic
000APWM Generator #1 output is made available to PCI logic

Bit 3 – PHR APWMxH Rising bit

ValueDescription
1Rising edge of APWMxH will trigger the LEB duration counter
0LEB ignores the rising edge of APWMxH

Bit 2 – PHF APWMxH Falling bit

ValueDescription
1Falling edge of APWMxH will trigger the LEB duration counter
0LEB ignores the falling edge of APWMxH

Bit 1 – PLR APWMxL Rising bit

ValueDescription
1Rising edge of APWMxL will trigger the LEB duration counter
0LEB ignores the rising edge of APWMxL

Bit 0 – PLF APWMxL Falling bit

ValueDescription
1Falling edge of APWMxL will trigger the LEB duration counter
0LEB ignores the falling edge of APWMxL

12.6.23 Auxiliary PWM Generator x Phase Register

Name: APGxPHASE

Offset: 0x21E, 0x254, 0x28A, 0x2C0

Bit 15 14 13 12 11 10 9 8

PGxPHASE[15:8]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

PGxPHASE[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 15:0 – PGxPHASE[15:0] APWM Generator x Phase Register bits

12.6.24 Auxiliary PWM Generator x Duty Cycle Register

Name: APGxDC

Offset: 0x220, 0x256, 0x28C, 0x2C2

Bit 15 14 13 12 11 10 9 8

PGxDC[15:8]
AccessR/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0
Bit7 6 5 4 3 2 1 0
PGxDC[7:0]
AccessR/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0

Bits 15:0 – PGxDC[15:0] APWM Generator x Duty Cycle Register bits

12.6.25 Auxiliary PWM Generator x Duty Cycle Adjustment Register

Name: APGxDCA

Offset: 0x222, 0x258, 0x28E, 0x2C4

Microchip dsPIC33CK1024MP708 - Auxiliary PWM Generator x Duty Cycle Adjustment Register - 1

text_image Bit 15 14 13 12 11 10 9 8 Access Reset Bit 7 6 5 4 3 2 1 0 PGxDCA[7:0] Access R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0

Bits 7:0 – PGxDCA[7:0] APWM Generator x Duty Cycle Adjustment Value bits

Depending on the state of the selected PCI source, the APGxDCA value will be added to the value in the APGxDC register to create the effective duty cycle. When the PCI source is active, APGxDCA is added. When the PCI source is inactive, no adjustment is made. Duty cycle adjustment is disabled when APGxDCA[7:0] = 0. The PCI source is selected using the DTCMPSEL bit.

12.6.26 Auxiliary PWM Generator x Period Register

Name: APGxPER

Offset: 0x224, 0x25A, 0x290, 0x2C6

Note:

  1. Period values less than '0x0010' should not be selected.

Bit 15 14 13 12 11 10 9 8

PGxPER[15:8]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

PGxPER[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 15:0 – PGxPER[15:0] APWM Generator x Period Register bits ^(1)

12.6.27 Auxiliary PWM Generator x Trigger A Register

Name: APGxTRIGA

Offset: 0x226, 0x25C, 0x292, 0x2C8

Bit 15 14 13 12 11 10 9 8

PGxTRIGA[15:8]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

PGxTRIGA[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 15:0 – PGxTRIGA[15:0] APWM Generator x Trigger A Register bits

12.6.28 Auxiliary PWM Generator x Trigger B Register

Name: APGxTRIGB

Offset: 0x228, 0x25E, 0x294, 0x2CA

Bit 15 14 13 12 11 10 9 8

PGxTRIGB[15:8]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

PGxTRIGB[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 15:0 – PGxTRIGB[15:0] APWM Generator x Trigger B Register bits

12.6.29 Auxiliary PWM Generator x Trigger C Register

Name: APGxTRIGC

Offset: 0x22A, 0x260, 0x296, 0x2CC

Bit 15 14 13 12 11 10 9 8

PGxTRIGC[15:8]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

PGxTRIGC[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 15:0 – PGxTRIGC[15:0] APWM Generator x Trigger C Register bits

12.6.30 Auxiliary PWM Generator x Dead-Time Register Low

Name: APGxDTL

Offset: 0x22C, 0x262, 0x298, 0x2CE

Note:

  1. DTL[13:11] bits are not available when HREN (APGxCON[7]) = 0.

Bit 15 14 13 12 11 10 9 8

DTL[13:8]
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
DTL[7:0]
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0

Bits 13:0 – DTL[13:0] APWMxL Dead-Time Delay bits ^(1)

12.6.31 Auxiliary PWM Generator x Dead-Time Register High

Name: APGxDTH

Offset: 0x22E, 0x264, 0x29A, 0x2D0

Bit 15 14 13 12 11 10 9 8

DTH[13:8]
Access ResetR/W R/W R/W R/W R/W R/W
Bit7 6 5 4 3 2 1 0
DTH[7:0]
Access ResetR/W R/W R/W R/W R/W R/W R/W
0 0 0 0 0 0 0

Bits 13:0 – DTH[13:0] APWMxH Dead-Time Delay bits

12.6.32 Auxiliary PWM Generator x Capture Register

Name: APGxCAP

Offset: 0x230, 0x266, 0x29C, 0x2D2

Note:

  1. APGxCAP[1:0] will read as '00' in Standard Resolution mode. APGxCAP[4:0] will read as '00000' in High-Resolution mode.
Bit 15 14 13 12 11 10 9 8
PGxCAP[15:8]
Access R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
PGxCAP[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0

Bits 15:0 – PGxCAP[15:0] APGx Time Base Capture bits ^(1)

12.6.33 PWM Clock Control Register

Name: PCLKCON

Offset: 0x300

Notes:

  1. A device-specific unlock sequence must be performed before this bit can be cleared.
  2. Changing the MCLKSEL[1:0] bits while ON (PGxCONL[15]) = 1 is not recommended.

Bit 15 14 13 12 11 10 9 8

HRRDY HERRLOCK
AccessR/W R/WR/W
Reset0 00
Bit7 6 5 4 3 2 1 0
DIVSEL[1:0]MCLKSEL[1:0]
AccessR/W R/WR/W R/W
Reset0 00 0

Bit 15 - HRRDY High-Resolution Ready bit

ValueDescription
1The high-resolution circuitry is ready
0The high-resolution circuitry is not ready

Bit 14-HRERR High-Resolution Error bit

ValueDescription
1An error has occurred; PWM signals will have limited resolution
0No error has occurred; PWM signals will have full resolution when HRRDY = 1

Bit 8 - LOCK Lock bit ^(1)

ValueDescription
1Write-protected registers and bits are locked
0Write-protected registers and bits are unlocked

Bits 5:4 - DIVSEL[1:0] PWM Clock Divider Selection bits

ValueDescription
11Divide ratio is 1:16
10Divide ratio is 1:8
01Divide ratio is 1:4
00Divide ratio is 1:2

Bits 1:0 - MCLKSEL[1:0] PWM Main Clock Selection bits ^(2)

ValueDescription
11 AF_PLLO – Auxiliary PLL post-divider output
10 F_PLLO – Primary PLL post-divider output
01 AF_VCO/2 – Auxiliary VCO/2
00 F_OSC

12.6.34 Frequency Scale Register

Name: FSCL

Offset: 0x302

Bit 15 14 13 12 11 10 9 8

FSCL[15:8]
AccessR/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0
Bit7 6 5 4 3 2 1 0
FSCL[7:0]
AccessR/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0

Bits 15:0 – FSCL[15:0] Frequency Scale Register bits

The value in this register is added to the frequency scaling accumulator at each pwm_clk. When the accumulated value exceeds the value of FSMINPER, a clock pulse is produced.

12.6.35 Frequency Scaling Minimum Period Register

Name: FSMINPER

Offset: 0x304

Bit 15 14 13 12 11 10 9 8

FSMINPER[15:8]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

FSMINPER[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 15:0 – FSMINPER[15:0] Frequency Scaling Minimum Period Register bits

This register holds the minimum clock period (maximum clock frequency) that can be produced by the frequency scaling circuit.

12.6.36 Main Phase Register

Name: MPHASE

Offset: 0x306

Bit 15 14 13 12 11 10 9 8

MPHASE[15:8]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

MPHASE[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 15:0 - MPHASE[15:0] Main Phase Register bits

12.6.37 Main Duty Cycle Register

Name: MDC

Offset: 0x308

Bit 15 14 13 12 11 10 9 8

MDC[15:8]
AccessR/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0
Bit7 6 5 4 3 2 1 0
MDC[7:0]
AccessR/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0

Bits 15:0 – MDC[15:0] Main Duty Cycle Register bits

12.6.38 Main Period Register

Name: MPER

Offset: 0x30A

Note:

  1. Period values less than '0x0010' should not be selected.

Bit 15 14 13 12 11 10 9 8

MPER[15:8]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

MPER[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 15:0 - MPER[15:0] Main Period Register bits ^(1)

This register holds the period value that can be shared by multiple PWM Generators.

12.6.39 Combinational Trigger Register Low

Name: CMBTRIGL

Offset: 0x30E

Bit 15 14 13 12 11 10 9 8

Access Reset

Bit 76543210

Bit 7 – CTA8EN Enable Trigger Output from PWM Generator #8 as Source for Comb. Trigger A bit

ValueDescription
1Enables specified trigger signal to be OR'd into the Combinatorial Trigger A signal
0Disabled

Bit 6 – CTA7EN Enable Trigger Output from PWM Generator #7 as Source for Comb. Trigger A bit

ValueDescription
1Enables specified trigger signal to be OR'd into the Combinatorial Trigger A signal
0Disabled

Bit 5 – CTA6EN Enable Trigger Output from PWM Generator #6 as Source for Comb. Trigger A bit

ValueDescription
1Enables specified trigger signal to be OR'd into the Combinatorial Trigger A signal
0Disabled

Bit 4 – CTA5EN Enable Trigger Output from PWM Generator #5 as Source for Comb. Trigger A bit

ValueDescription
1Enables specified trigger signal to be OR’d into the Combinatorial Trigger A signal
0Disabled

Bit 3 – CTA4EN Enable Trigger Output from PWM Generator #4 as Source for Comb. Trigger A bit

ValueDescription
1Enables specified trigger signal to be OR'd into the Combinatorial Trigger A signal
0Disabled

Bit 2 – CTA3EN Enable Trigger Output from PWM Generator #3 as Source for Comb. Trigger A bit

ValueDescription
1Enables specified trigger signal to be OR'd into the Combinatorial Trigger A signal
0Disabled

Bit 1 – CTA2EN Enable Trigger Output from PWM Generator #2 as Source for Comb. Trigger A bit

ValueDescription
1Enables specified trigger signal to be OR'd into the Combinatorial Trigger A signal
0Disabled

Bit 0 – CTA1EN Enable Trigger Output from PWM Generator #1 as Source for Comb. Trigger A bit

ValueDescription
1Enables specified trigger signal to be OR'd into the Combinatorial Trigger A signal
0Disabled

12.6.40 Combinational Trigger Register High

Name: CMBTRIGH

Offset: 0x310

Bit 15 14 13 12 11 10 9 8

Access Reset

Bit 76543210

Bit 7 – CTB8EN Enable Trigger Output from PWM Generator #8 as Source for Comb. Trigger B bit

ValueDescription
1Enables specified trigger signal to be OR'd into the Combinatorial Trigger B signal
0Disabled

Bit 6 – CTB7EN Enable Trigger Output from PWM Generator #7 as Source for Comb. Trigger B bit

ValueDescription
1Enables specified trigger signal to be OR'd into the Combinatorial Trigger B signal
0Disabled

Bit 5 – CTB6EN Enable Trigger Output from PWM Generator #6 as Source for Comb. Trigger B bit

ValueDescription
1Enables specified trigger signal to be OR'd into the Combinatorial Trigger B signal
0Disabled

Bit 4 – CTB5EN Enable Trigger Output from PWM Generator #5 as Source for Comb. Trigger B bit

ValueDescription
1Enables specified trigger signal to be OR’d into the Combinatorial Trigger B signal
0Disabled

Bit 3 – CTB4EN Enable Trigger Output from PWM Generator #4 as Source for Comb. Trigger B bit

ValueDescription
1Enables specified trigger signal to be OR'd into the Combinatorial Trigger B signal
0Disabled

Bit 2 – CTB3EN Enable Trigger Output from PWM Generator #3 as Source for Comb. Trigger B bit

ValueDescription
1Enables specified trigger signal to be OR’d into the Combinatorial Trigger B signal
0Disabled

Bit 1 – CTB2EN Enable Trigger Output from PWM Generator #2 as Source for Comb. Trigger B bit

ValueDescription
1Enables specified trigger signal to be OR’d into the Combinatorial Trigger B signal
0Disabled

Bit 0 – CTB1EN Enable Trigger Output from PWM Generator #1 as Source for Comb. Trigger B bit

ValueDescription
1Enables specified trigger signal to be OR'd into the Combinatorial Trigger B signal
0Disabled

12.6.41 Combinatorial PWM Logic Control Register y

Name: LOGCONy (2)

Offset: 0x0312, 0x0314, 0x0316, 0x0318, 0x031A, 0x031C

Notes:

  1. Logic function input will be connected to '0' if the PWM channel is not present.

  2. 'y' denotes a common instance (A-F).

Bit 15 14 13 12 11 10 9 8

PWMS1y[3:0] PWMS2y[3:0]
AccessR/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0
Bit7 6 5 4 3 2 1 0
S1yPOL S2yPOL PWMLFy[1:0]PWMLFyD[2:0]
AccessR/W R/W R/W R/WR/W R/W R/W
Reset0 0 0 00 0 0

Bits 15:12 - PWMS1y[3:0] Combinatorial PWM Logic Source #1 Selection bits ^(1)

ValueDescription
1111PWM8L
1110PWM8H
1101PWM7L
1100PWM7H
1011PWM6L
1010PWM6H
1001PWM5L
1000PWM5H
0111PWM4L
0110PWM4H
0101PWM3L
0100PWM3H
0011PWM2L
0010PWM2H
0001PWM1L
0000PWM1H

Bits 11:8 – PWMS2y[3:0] Combinatorial PWM Logic Source #2 Selection bits ^(1)

ValueDescription
1111PWM8L
1110PWM8H
1101PWM7L
1100PWM7H
1011PWM6L
1010PWM6H
1001PWM5L
1000PWM5H
0111PWM4L
0110PWM4H
0101PWM3L
0100PWM3H
0011PWM2L
0010PWM2H
Value Description
0001PWM1L
0000PWM1H

Bit 7 – S1yPOL Combinatorial PWM Logic Source #1 Polarity bit

Value Description
1Input is inverted
0Input is positive logic

Bit 6 – S2yPOL Combinatorial PWM Logic Source #2 Polarity bit

Value Description
1Input is inverted
0Input is positive logic

Bits 5:4 – PWMLFy[1:0] Combinatorial PWM Logic Function Selection bits

Value Description
11Reserved
10PWMS1 ^ PWMS2 (XOR)
01PWMS1 & PWMS2 (AND)
00PWMS1 | PWMS2 (OR)

Bits 2:0 – PWMLFyD[2:0] Combinatorial PWM Logic Destination Selection bits

Value Description
111Logic function is assigned to the PWM8H or PWM8L pin
110Logic function is assigned to the PWM7H or PWM7L pin
101Logic function is assigned to the PWM6H or PWM6L pin
100Logic function is assigned to the PWM5H or PWM5Lpin
011Logic function is assigned to the PWM4H or PWM4Lpin
010Logic function is assigned to the PWM3H or PWM3Lpin
001Logic function is assigned to the PWM2H or PWM2Lpin
000No assignment, combinatorial PWM logic function is disabled

12.6.42 PWM Event Output Control Register y

Name: PWMEVTy (5)

Offset: 0x031E, 0x0320, 0x0322, 0x0324, 0x0326, 0x0328

Notes:

  1. The event signal is stretched using the peripheral clock because different PGs may be operating from different clock sources. The leading edge of the event pulse is produced in the clock domain of the PWM Generator. The trailing edge of the stretched event pulse is produced in the peripheral clock domain.
  2. No event will be produced if the selected PWM Generator is not present.
  3. This is the PWM Generator output signal prior to Output mode logic and any output override logic.
  4. This signal should be the PGx_clk domain signal prior to any synchronization into the system clock domain.
  5. 'y' denotes a common instance (A-F).

Bit 15 14 13 12 11 10 9 8

EVTyOENEVTyPOLEVTySTRDEVTySYNC
AccessR/WR/WR/WR/W
Reset0 0 0 0
Bit7 6 5 4 3 2 1 0
EVTySEL[3:0]EVTyPGS[2:0]
AccessR/WR/WR/WR/WR/WR/W
Reset0 0 0 00 0 0

Bit 15 – EVTyOEN PWM Event Output Enable bit

ValueDescription
1Event output signal is output on PWMEVTy pin
0Event output signal is internal only

Bit 14 – EVTyPOL PWM Event Output Polarity bit

ValueDescription
1Event output signal is active-low
0Event output signal is active-high

Bit 13 – EVTySTRD PWM Event Output Stretch Disable bit

ValueDescription
1Event output signal pulse width is not stretched
0Event output signal is stretched to eight PWM clock cycles minimum ^(1)

Bit 12 – EVTySYNC PWM Event Output Sync bit
Event output signal pulse will be two system clocks when this bit is set and EVTySTRD = 1.

ValueDescription
1Event output signal is synchronized to the system clock
0Event output is not synchronized to the system clock

Bits 7:4 – EVTySEL[3:0] PWM Event Selection bits

ValueDescription
1111High-resolution error event signal
1110-1010Reserved
1001ADC Trigger 2 signal
1000ADC Trigger 1 signal
0111STEER signal (available in Push-Pull Output modes only) ^(4)
0110CAHALF signal (available in Center-Aligned modes only) ^(4)
0101PCI Fault active output signal
Value Description
0100PCI current limit active output signal
0011PCI feed-forward active output signal
0010PCI Sync active output signal
0001PWM Generator output signal^(3)
0000Source is selected by the PGTRGSEL[2:0] bits

Bits 2:0 – EVTyPGS[2:0] PWM Event Source Selection bits ^(2)

Value Description
111PWM Generator 8
110PWM Generator 7
...
000PWM Generator 1

12.6.43 Linear Feedback Shift Register

Name: LFSR

Offset: 0x30C

Bit 15 14 13 12 11 10 9 8

LFSR[14:8]

Access

R/W R/W R/W R/W R/W R/W R/W

Reset 0000000

Bit 76543210

LFSR[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 14:0 - LFSR[14:0] Linear Feedback Shift Register bits

A read of this register will provide a 15-bit pseudorandom value.

12.6.44 PWM Generator x Control Register Low

Name: PGxCONL

Offset: 0x32A, 0x360, 0x396, 0x3CC

Note:

  1. The PWM Generator time base operates from the frequency scaling circuit clock, effectively scaling the duty cycle and period of the PWM Generator output.

Bit 15 14 13 12 11 10 9 8

ONTRGCNT[2:0]
AccessR/WR/WR/WR/W
Reset00 0 0

Bit 76543210

HRENCLKSEL[1:0]MODSEL[2:0]
AccessR/WR/W R/W R/W R/W R/W
Reset 00 0 0 0 0

Bit 15 - ON Enable bit

ValueDescription
1PWM Generator is enabled
0PWM Generator is not enabled

Bits 10:8 – TRGCNT[2:0] Trigger Count Select bits

ValueDescription
111PWM Generator produces eight PWM cycles after triggered
110PWM Generator produces seven PWM cycles after triggered
101PWM Generator produces six PWM cycles after triggered
100PWM Generator produces five PWM cycles after triggered
011PWM Generator produces four PWM cycles after triggered
010PWM Generator produces three PWM cycles after triggered
001PWM Generator produces two PWM cycles after triggered
000PWM Generator produces one PWM cycle after triggered

Bit 7 – HREN PWM Generator x High-Resolution Enable bit

ValueDescription
1PWM Generator x operates in High-Resolution mode
0PWM Generator x operates in Standard Resolution mode

Bits 4:3 - CLKSEL[1:0] Clock Selection bits

ValueDescription
11PWM Generator uses Host clock scaled by frequency scaling circuit ^(1)
10PWM Generator uses Host clock divided by clock divider circuit ^(1)
01PWM Generator uses Host clock selected by the MCLKSEL[1:0] (PCLKCON[1:0]) control bits
00No clock selected, PWM Generator is in Lowest Power state (default)

Bits 2:0 - MODSEL[2:0] Mode Selection bits

ValueDescription
111Dual Edge Center-Aligned PWM mode (interrupt/register update twice per cycle)
110Dual Edge Center-Aligned PWM mode (interrupt/register update once per cycle)
101Double-Update Center-Aligned PWM mode
100Center-Aligned PWM mode
011Reserved
010Independent Edge PWM mode, dual output
Value Description
001Variable Phase PWM mode
000Independent Edge PWM mode

12.6.45 PWM Generator x Control Register High

Name: PGxCONH

Offset: 0x32C, 0x362, 0x398, 0x3CE, 0x404, 0x43A, 0x470, 0x4A6

Notes:

  1. The PCI selected Sync signal is always available to be OR'd with the selected SOC signal per the SOCS[3:0] bits if the PCI Sync function is enabled.
  2. The source selected by the SOCS[3:0] bits MUST operate from the same clock source as the local PWM Generator. If not, the source must be routed through the PCI Sync logic so the trigger signal may be synchronized to the PWM Generator clock domain.
  3. PWM Generators are grouped into groups of four: PG1-PG4 and PG5-PG8, if available. Any generator within a group of four may be used to trigger another generator within the same group.

Legend: r = Reserved bit

Bit 15 14 13 12 11 10 9 8

MDCSEL MPERSEL MPHSELMSTEN UPMOD[2:0]
AccessR/WR/WR/WR/WR/WR/WR/W
Reset0 0 00 0 0 0

Bit 76543210

Reserved TRGMODSOCS[3:0]
AccessrR/WR/WR/WR/WR/W
Reset0 00 0 0 0

Bit 15 - MDCSEL Main Duty Cycle Register Select bit

ValueDescription
1PWM Generator uses the MDC register instead of PGxDC
0PWM Generator uses the PGxDC register

Bit 14 – MPERSEL Main Period Register Select bit

ValueDescription
1PWM Generator uses the MPER register instead of PGxPER
0PWM Generator uses the PGxPER register

Bit 13 - MPHSEL Main Phase Register Select bit

ValueDescription
1PWM Generator uses the MPHASE register instead of PGxPHASE
0PWM Generator uses the PGxPHASE register

Bit 11 – MSTEN Main Update Enable bit

ValueDescription
1PWM Generator broadcasts software set/clear of the UPDATE status bit and EOC signal to other PWM Generators
0PWM Generator does not broadcast the UPDATE status bit state or EOC signal

Bits 10:8 – UPMOD[2:0] PWM Buffer Update Mode Selection bits

Bit 7 – Reserved Maintain as '0'

Bit 6 – TRGMOD PWM Generator Trigger Mode Selection bit

ValueDescription
1PWM Generator operates in Retriggerable mode
0PWM Generator operates in Single Trigger mode

Bits 3:0 - SOCS[3:0] Start-of-Cycle Selection bits ^(1,2,3)

Value Description
1111TRIG bit or PCI Sync function only (no hardware trigger source is selected)
1110-0101Reserved
0100PWM4(8) PG1 or PG5 trigger output selected by PGTRGSEL[2:0] (PGxEVT[2:0])
0011PWM3(7) PG1 or PG5 trigger output selected by PGTRGSEL[2:0] (PGxEVT[2:0])
0010PWM2(6) PG1 or PG5 trigger output selected by PGTRGSEL[2:0] (PGxEVT[2:0])
0001PWM1(5) PG1 or PG5 trigger output selected by PGTRGSEL[2:0] (PGxEVT[2:0])
0000Local EOC – PWM Generator is self-triggered

12.6.46 PWM Generator x Status Register

Name: PGxSTAT

Offset: 0x32E, 0x364, 0x39A, 0x3D0

Note:

  1. User software may write a '1' to CAP as a request to initiate a software capture. The CAP status bit will be set when the capture event has occurred. No further captures will occur until CAP is cleared by software.

Legend: C = Clearable bit; HS = Hardware Settable bit

Bit 15 14 13 12 11 10 9 8

SEVT FLTEVT CLEVT FFEVTSACT FLTACT CLACT FFACT
AccessHS/CHS/CHS/CHS/CRRR
Reset0 0 0 0 0 0 0 0

Bit 76543210

TRSETTRCLRCAPUPDATEUPDREQSTEERCAHALFTRIG
AccessWWR/W/HSRWRRR
Reset0 0 0 0 0 0 0 0

Bit 15 – SEVT PCI Sync Event bit

ValueDescription
1A PCI Sync event has occurred (rising edge on PCI Sync output or PCI Sync output is high when module is enabled)
0No PCI Sync event has occurred

Bit 14 – FLTEVT PCI Fault Active Status bit

ValueDescription
1A Fault event has occurred (rising edge on PCI Fault output or PCI Fault output is high when module is enabled)
0No Fault event has occurred

Bit 13 – CLEVT PCI Current Limit Status bit

ValueDescription
1A PCI current limit event has occurred (rising edge on PCI current limit output or PCI current limit output is high when module is enabled)
0No PCI current limit event has occurred

Bit 12 - FFEVT PCI Feed-Forward Active Status bit

ValueDescription
1A PCI feed-forward event has occurred (rising edge on PCI feed-forward output or PCI feed-forward output is high when module is enabled)
0No PCI feed-forward event has occurred

Bit 11 – SACT PCI Sync Status bit

ValueDescription
1PCI Sync output is active
0PCI Sync output is inactive

Bit 10 - FLTACT PCI Fault Active Status bit

ValueDescription
1PCI Fault output is active
0PCI Fault output is inactive
Value Description
1PCI current limit output is active
0PCI current limit output is inactive

Bit 9 – CLACT PCI Current Limit Status bit

Bit 8 – FFACT PCI Feed-Forward Active Status bit

Value Description
1PCI feed-forward output is active
0PCI feed-forward output is inactive

Bit 7 – TRSET PWM Generator Software Trigger Set bit

User software writes a '1' to this bit location to trigger a PWM Generator cycle. The bit location always reads as '0'. The TRIG bit will indicate '1' when the PWM Generator is triggered.

Bit 6 – TRCLR PWM Generator Software Trigger Clear bit

User software writes a '1' to this bit location to stop a PWM Generator cycle. The bit location always reads as '0'. The TRIG bit will indicate '0' when the PWM Generator is not triggered.

Bit 5 – CAP Capture Status bit ^(1)

Value Description
1PWM Generator time base value has been captured in PGxCAP
0No capture has occurred

Bit 4 – UPDATE PWM Data Register Update Status/Control bit

Value Description
1PWM Data register update is pending – user Data registers are not writable
0No PWM Data register update is pending

Bit 3 – UPDREQ PWM Data Register Update Request bit

User software writes a '1' to this bit location to request a PWM Data register update. The bit location always reads as '0'. The UPDATE status bit will indicate '1' when an update is pending.

Bit 2 – STEER Output Steering Status bit (Push-Pull Output mode only)

Value Description
1PWM Generator is in 2nd cycle of Push-Pull mode
0PWM Generator is in 1st cycle of Push-Pull mode

Bit 1 – CAHALF Half Cycle Status bit (Center-Aligned modes only)

Value Description
1PWM Generator is in 2nd half of time base cycle
0PWM Generator is in 1st half of time base cycle

Bit 0 - TRIG PWM Trigger Status bit

Value Description
1PWM Generator is triggered and PWM cycle is in progress
0No PWM cycle is in progress

12.6.47 PWM Generator x I/O Control Register Low

Name: PGxIOCONL

Offset: 0x330, 0x366, 0x39C, 0x3D2, 0x408, 0x43E, 0x474, 0x4AA

Bit 15 14 13 12 11 10 9 8

CLMOD SWAP OVRENH OVRENLOVRDAT[1:0] OSYNC[1:0]
AccessR/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0 0

Bit 76543210

FLTDAT[1:0]CLDAT[1:0]FFDAT[1:0]DBDAT[1:0]
AccessR/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0 0

Bit 15 – CLMOD Current Limit Mode Select bit

ValueDescription
1If PCI current limit is active, then the PWMxH and PWMxL output signals are inverted (bit flipping), and the CLDAT[1:0] bits are not used
0If PCI current limit is active, then the CLDAT[1:0] bits define the PWM output levels

Bit 14 – SWAP Swap PWM Signals to PWMxH and PWMxL Device Pins bit

ValueDescription
1The PWMxH signal is connected to the PWMxL pin and the PWMxL signal is connected to the PWMxH pin
0PWMxH/L signals are mapped to their respective pins

Bit 13 - OVRENH User Override Enable for PWMxH Pin bit

ValueDescription
1OVRDAT1 provides data for output on the PWMxH pin
0PWM Generator provides data for the PWMxH pin

Bit 12 - OVRENL User Override Enable for PWMxL Pin bit

ValueDescription
1OVRDAT0 provides data for output on the PWMxL pin
0PWM Generator provides data for the PWMxL pin

Bits 11:10 - OVRDAT[1:0] Data for PWMxH/PWMxL Pins if Override is Enabled bits

If OVERENH = 1, then OVRDAT1 provides data for PWMxH.

If OVERENL = 1, then OVRDAT0 provides data for PWMxL.

Bits 9:8 – OSYNC[1:0] User Output Override Synchronization Control bits

ValueDescription
11Reserved
10User output overrides via the OVRENH/L and OVRDAT[1:0] bits occur when specified by the UPDMOD[2:0] bits in the PGxCONH register
01User output overrides via the OVRENH/L and OVRDAT[1:0] bits occur immediately (as soon as possible)
00User output overrides via the OVRENH/L and OVRDAT[1:0] bits are synchronized to the local PWM time base (next Start-of-Cycle)

Bits 7:6 – FLTDAT[1:0] Data for PWMxH/PWMxL Pins if Fault Event is Active bits

If Fault is active, then FLTDAT1 provides data for PWMxH.

If Fault is active, then FLTDATO provides data for PWMxL.

Bits 5:4 – CLDAT[1:0] Data for PWMxH/PWMxL Pins if Current Limit Event is Active bits

If current limit is active, then CLDAT1 provides data for PWMxH.

If current limit is active, then CLDAT0 provides data for PWMxL.

Bits 3:2 – FFDAT[1:0] Data for PWMxH/PWMxL Pins if Feed-Forward Event is Active bits

If feed-forward is active, then FFDAT1 provides data for PWMxH.

If feed-forward is active, then FFDAT0 provides data for PWMxL.

Bits 1:0 – DBDAT[1:0] Data for PWMxH/PWMxL Pins if Debug Mode is Active and PTFRZ = 1 bits

If Debug mode is active and PTFRZ = 1, then DBDAT1 provides data for PWMxH.

If Debug mode is active and PTFRZ = 1, then DBDAT0 provides data for PWMxL.

12.6.48 PWM Generator x I/O Control Register High

Name: PGxIOCONH

Offset: 0x332, 0x368, 0x39E, 0x3D4, 0x40A, 0x440, 0x476, 0x4AC

Note:

  1. A capture may be initiated in software at any time by writing a '1' to CAP (PGxSTAT[5]).
Bit 15 14 13 12 11 10 9 8
CAPSRC[2:0]DTCMPSEL
AccessR/W R/W R/W R/W
Reset0 0 00
Bit7 6 5 4 3 2 1 0
PMOD[1:0]PENHPENLPOLHPOLL
AccessR/W R/W R/W R/W R/W
Reset0 0 0 0 0 0

Bits 14:12 - CAPSRC[2:0] Time Base Capture Source Selection bits ^(1)

ValueDescription
111Reserved
110Reserved
101Reserved
100Capture time base value at assertion of selected PCI Fault signal
011Capture time base value at assertion of selected PCI current limit signal
010Capture time base value at assertion of selected PCI feed-forward signal
001Capture time base value at assertion of selected PCI Sync signal
000No hardware source selected for time base capture – software only

Bit 8 - DTCMPSEL Dead-Time Compensation Select bit

ValueDescription
1Dead-time compensation is controlled by PCI feed-forward limit logic
0Dead-time compensation is controlled by PCI Sync logic

Bits 5:4 – PMOD[1:0] PWM Generator Output Mode Selection bits

ValueDescription
11Reserved
10PWM Generator outputs operate in Push-Pull mode
01PWM Generator outputs operate in Independent mode
00PWM Generator outputs operate in Complementary mode

Bit 3 – PENH PWMxH Output Port Enable bit

ValueDescription
1PWM Generator controls the PWMxH output pin
0PWM Generator does not control the PWMxH output pin

Bit 2 – PENL PWMxL Output Port Enable bit

ValueDescription
1PWM Generator controls the PWMxL output pin
0PWM Generator does not control the PWMxL output pin

Bit 1 – POLH PWMxH Output Polarity bit

ValueDescription
1Output pin is active-low
0Output pin is active-high

Bit 0 – POLL PWMxL Output Polarity bit

Value Description
1Output pin is active-low
0Output pin is active-high

12.6.49 PWM Generator x Event Register Low

Name: PGxEVTL

Offset: 0x334, 0x36A, 0x3A0, 0x3D6, 0x40C, 0x442, 0x478, 0x4AE

Note:

  1. These events are derived from the internal PWM Generator time base comparison events.

Bit 15 14 13 12 11 10 9 8

ADTR1PS[4:0] ADTR1EN3 ADTR1EN2 ADTR1EN1

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210
UPD TRG[1:0]PGTRGSEL[2:0]
AccessR/W R/W R/W R/W R/W
Reset00000

Bits 15:11 - ADTR1PS[4:0] ADC Trigger 1 Postscaler Selection bits

ValueDescription
111111:32
. . .
000101:3
000011:2
000001:1

Bit 10 – ADTR1EN3 ADC Trigger 1 Source is PGxTRIGC Compare Event Enable bit

ValueDescription
1PGxTRIGC register compare event is enabled as trigger source for ADC Trigger 1
0PGxTRIGC register compare event is disabled as trigger source for ADC Trigger 1

Bit 9 – ADTR1EN2 ADC Trigger 1 Source is PGxTRIGB Compare Event Enable bit

ValueDescription
1PGxTRIGB register compare event is enabled as trigger source for ADC Trigger 1
0PGxTRIGB register compare event is disabled as trigger source for ADC Trigger 1

Bit 8 – ADTR1EN1 ADC Trigger 1 Source is PGxTRIGA Compare Event Enable bit

ValueDescription
1PGxTRIGA register compare event is enabled as trigger source for ADC Trigger 1
0PGxTRIGA register compare event is disabled as trigger source for ADC Trigger 1

Bits 4:3 – UPDTRG[1:0] Update Trigger Select bits

ValueDescription
11A write of the PGxTRIGA register automatically sets the UPDATE bit
10A write of the PGxPHASE register automatically sets the UPDATE bit
01A write of the PGxDC register automatically sets the UPDATE bit
00User must set the UPDATE bit (PGxSTAT[4]) manually

Bits 2:0 – PGTRGSEL[2:0] PWM Generator Trigger Output Selection bits ^(1)

ValueDescription
111Reserved
110Reserved
101Reserved
100Reserved
011PGxTRIGC compare event is the PWM Generator trigger

Value Description

010PGxTRIGB compare event is the PWM Generator trigger
001PGxTRIGA compare event is the PWM Generator trigger
000EOC event is the PWM Generator trigger

12.6.50 PWM Generator x Event Register High

Name: PGxEVTH

Offset: 0x336, 0x36C, 0x3A2, 0x3D8, 0x40E

Notes:

  1. An interrupt is only generated on the rising edge of the PCI Fault active signal.
  2. An interrupt is only generated on the rising edge of the PCI current limit active signal.
  3. An interrupt is only generated on the rising edge of the PCI feed-forward active signal.
  4. An interrupt is only generated on the rising edge of the PCI Sync active signal.

Bit 15 14 13 12 11 10 9 8

FLTIEN CLIEN FFIEN SIENIEVTSEL[1:0]
AccessR/WR/WR/WR/WR/WR/W
Reset0 0 0 00 0

Bit 76543210

ADTR2EN3ADTR2EN2ADTR2EN1ADTR1OFS[4:0]
AccessR/WR/WR/WR/WR/WR/WR/WR/W
Reset0 0 0 0 0 0 0 0

Bit 15 - FLTIEN PCI Fault Interrupt Enable bit ^(1)

ValueDescription
1Fault interrupt is enabled
0Fault interrupt is disabled

Bit 14 – CLIEN PCI Current Limit Interrupt Enable bit ^(2)

ValueDescription
1Current limit interrupt is enabled
0Current limit interrupt is disabled

Bit 13 - FFIEN PCI Feed-Forward Interrupt Enable bit ^(3)

ValueDescription
1Feed-forward interrupt is enabled
0Feed-forward interrupt is disabled

Bit 12 – SIEN PCI Sync Interrupt Enable bit ^(4)

ValueDescription
1Sync interrupt is enabled
0Sync interrupt is disabled

Bits 9:8 – IEVTSEL[1:0] Interrupt Event Selection bits

ValueDescription
11Time base interrupts are disabled (Sync, Fault, current limit and feed-forward events can be independently enabled)
10Interrupts CPU at ADC Trigger 1 event
01Interrupts CPU at TRIGA compare event
00Interrupts CPU at EOC

Bit 7 – ADTR2EN3 ADC Trigger 2 Source is PGxTRIGC Compare Event Enable bit

ValueDescription
1PGxTRIGC register compare event is enabled as trigger source for ADC Trigger 2
0PGxTRIGC register compare event is disabled as trigger source for ADC Trigger 2

Bit 6 – ADTR2EN2 ADC Trigger 2 Source is PGxTRIGB Compare Event Enable bit

Value Description
1PGxTRIGB register compare event is enabled as trigger source for ADC Trigger 2
0PGxTRIGB register compare event is disabled as trigger source for ADC Trigger 2

Bit 5 – ADTR2EN1 ADC Trigger 2 Source is PGxTRIGA Compare Event Enable bit

Value Description
1PGxTRIGA register compare event is enabled as trigger source for ADC Trigger 2
0PGxTRIGA register compare event is disabled as trigger source for ADC Trigger 2

Bits 4:0 – ADTR1OFS[4:0] ADC Trigger 1 Offset Selection bits

Value Description
11111Offset by 31 trigger events
. . .
00010Offset by 2 trigger events
00001Offset by 1 trigger event
00000No offset

12.6.51 PWM Generator x PCI Register Low (x = PWM Generator #; y = F, CL, FF OR S)

Name: PGxFPCIL

Offset: 0x338

Bit 15 14 13 12 11 10 9 8

TSYNCDIS TERM[2:0] AQPS AQSS[2:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

SWTERM PSYNCPPSPSS[4:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 15 - TSYNCDIS Termination Synchronization Disable bit

ValueDescription
1Termination of latched PCI occurs immediately
0Termination of latched PCI occurs at PWM EOC

Bits 14:12 - TERM[2:0] Termination Event Selection bits

ValueDescription
111Selects PCI Source #9
110Selects PCI Source #8
101Selects PCI Source #1 (PWM Generator output selected by the PWMPCI[2:0] bits)
100PGxTRIGC trigger event
011PGxTRIGB trigger event
010PGxTRIGA trigger event
001Auto-Terminate: Terminates when PCI source transitions from active to inactive
000Manual Terminate: Terminates on a write of ‘1’ to the SWTERM bit location

Bit 11 – AQPS Acceptance Qualifier Polarity Select bit

ValueDescription
1Inverted
0Not inverted

Bits 10:8 – AQSS[2:0] Acceptance Qualifier Source Selection bits

ValueDescription
111SWPCI control bit only (qualifier forced to ‘0’)
110Selects PCI Source #9
101Selects PCI Source #8
100Selects PCI Source #1 (PWM Generator output selected by the PWMPCI[2:0] bits)
011PWM Generator is triggered
010LEB is active
001Duty cycle is active (base PWM Generator signal)
000No acceptance qualifier is used (qualifier forced to ‘1’)

Bit 7 – SWTERM PCI Software Termination bit

A write of '1' to this location will produce a termination event. This bit location always reads as '0'.

Bit 6 – PSYNC PCI Synchronization Control bit

ValueDescription
1PCI source is synchronized to PWM EOC
0PCI source is not synchronized to PWM EOC

Bit 5 – PPS PCI Polarity Select bit

Value Description
1Inverted
0Not inverted

Bits 4:0 – PSS[4:0] PCI Source Selection bits

Value Description
11111CLC1
11110CLC2
11101Comparator 3 output
11100Comparator 2 output
11011Comparator 1 output
11010PWM Event D
11001PWM Event C
11000PWM Event B
10111PWM Event A
10110Device pin, PCI[22]
10101Device pin, PCI[21]
10100Device pin, PCI[20]
10011Device pin, PCI[19]
10010RPn input, PCI18R
10001RPn input, PCI17R
10000RPn input, PCI16R
01111RPn input, PCI15R
01110RPn input, PCI14R
01101RPn input, PCI13R
01100RPn input, PCI12R
01011RPn input, PCI11R
01010RPn input, PCI10R
01001RPn input, PCI9R
01000RPn input, PCI8R
00111Reserved
00110Reserved
00101Reserved
00100Reserved
00011Internally connected to Combo Trigger B
00010Internally connected to Combo Trigger A
00001Internally connected to the output of PWMPCI[2:0] MUX
00000Tied to '0'

12.6.52 PWM Generator x PCI Register High

Name: PGxyPCIH

Offset: 0x33A, 0x33E, 0x342, 0x346, 0x370, 0x374, 0x378, 0x37C, 0x3A6, 0x3AA, 0x3AE, 0x3B2, 0x3DC, 0x3E0, 0x3E4, 0x3E8, 0x412, 0x416, 0x41A, 0x41E, 0x448, 0x44C, 0x450, 0x454, 0x47E, 0x482, 0x486, 0x48A, 0x4B4, 0x4B8, 0x4BC, 0x4C0

Note:

  1. Selects '0' if selected PWM Generator is not present.

Bit 15 14 13 12 11 10 9 8

BPEN BPSEL[2:0] ACP[2:0]
AccessR/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 00 0 0
Bit7 6 5 4 3 2 1 0
SWPCI SWPCIM[1:0] LATMODTQPSTQSS[2:0]
AccessR/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0

Bit 15 – BPEN PCI Bypass Enable bit

ValueDescription
1PCI function is enabled and local PCI logic is bypassed; PWM Generator will be controlled by PCI function in the PWM Generator selected by the BPSEL[2:0] bits
0PCI function is not bypassed

Bits 14:12 - BPSEL[2:0] PCI Bypass Source Selection bits ^(1)

ValueDescription
111PCI control is sourced from PWM Generator 8 PCI logic when BPEN = 1
110Reserved
101PCI control is sourced from PWM Generator 6 PCI logic when BPEN = 1
100Reserved
011PCI control is sourced from PWM Generator 4 PCI logic when BPEN = 1
010PCI control is sourced from PWM Generator 3 PCI logic when BPEN = 1
001PCI control is sourced from PWM Generator 2 PCI logic when BPEN = 1
000PCI control is sourced from PWM Generator 1 PCI logic when BPEN = 1

Bits 10:8 – ACP[2:0] PCI Acceptance Criteria Selection bits

ValueDescription
111Reserved
110Reserved
101Latched any edge
100Latched rising edge
011Latched
010Any edge
001Rising edge
000Level-sensitive

Bit 7 – SWPCI Software PCI Control bit

ValueDescription
1Drives a ‘1’ to PCI logic assigned to by the SWPCIM[1:0] control bits
0Drives a ‘0’ to PCI logic assigned to by the SWPCIM[1:0] control bits

Bits 6:5 – SWPCIM[1:0] Software PCI Control Mode bits

Value Description
11Reserved
10SWPCI bit is assigned to termination qualifier logic
01SWPCI bit is assigned to acceptance qualifier logic
00SWPCI bit is assigned to PCI acceptance logic

Bit 4 - LATMOD PCI SR Latch Mode bit

Value Description
1SR latch is Reset-dominant in Latched Acceptance modes
0SR latch is set-dominant in Latched Acceptance modes

Bit 3 – TQPS Termination Qualifier Polarity Select bit

Value Description
1Inverted
0Not inverted

Bits 2:0 – TQSS[2:0] Termination Qualifier Source Selection bits

Value Description
111SWPCI control bit only (qualifier forced to ‘0’)
110Selects PCI Source #9
101Selects PCI Source #8
100Selects PCI Source #1 (PWM Generator output selected by the PWMPCI[2:0] bits)
011PWM Generator is triggered
010LEB is active
001Duty cycle is active (base PWM Generator signal)
000No termination qualifier used (qualifier forced to ‘1’)

12.6.53 PWM Generator x Leading-Edge Blanking Register Low

Name: PGxLEBL

Offset: 0x348, 0x37E, 0x3B4, 0x3EA, 0x420, 0x456, 0x48C, 0x4C2

Note:

  1. Bits[2:0] are read-only and always remain as '0'.
Bit 15 14 13 12 11 10 9 8
LEB[15:8]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
LEB[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0

Bits 15:0 – LEB[15:0] Leading-Edge Blanking Period bits ^(1)

Leading-Edge Blanking period. The three LSbs of the blanking time are not used, providing a blanking resolution of eight PGx_clks. The minimum blanking period is eight PGx_clks which occurs when LEB[15:3] = 0.

12.6.54 PWM Generator x Leading-Edge Blanking Register High

Name: PGxLEBH

Offset: 0x34A, 0x380, 0x3B6, 0x3EC, 0x422, 0x458, 0x48E, 0x4C4

Note:

  1. The selected PWM Generator source does not affect the LEB counter. This source can be optionally used as a PCI input, PCI qualifier, PCI terminator or PCI terminator qualifier.

Bit 15 14 13 12 11 10 9 8

PWMPCI[2:0]
Access Reset 0 0 0R/W R/W R/W

Bit 76543210

PHRPHFPLRPLF
AccessR/W R/W R/W R/W
Reset0 0 0 0

Bits 10:8 – PWMPCI[2:0] PWM Source for PCI Selection bits ^(1)

ValueDescription
111PWM Generator #8 output is made available to PCI logic
110PWM Generator #7 output is made available to PCI logic
101PWM Generator #6 output is made available to PCI logic
100PWM Generator #5 output is made available to PCI logic
011PWM Generator #4 output is made available to PCI logic
010PWM Generator #3 output is made available to PCI logic
001PWM Generator #2 output is made available to PCI logic
000PWM Generator #1 output is made available to PCI logic

Bit 3 – PHR PWMxH Rising bit

ValueDescription
1Rising edge of PWMxH will trigger the LEB duration counter
0LEB ignores the rising edge of PWMxH

Bit 2 – PHF PWMxH Falling bit

ValueDescription
1Falling edge of PWMxH will trigger the LEB duration counter
0LEB ignores the falling edge of PWMxH

Bit 1 – PLR PWMxL Rising bit

ValueDescription
1Rising edge of PWMxL will trigger the LEB duration counter
0LEB ignores the rising edge of PWMxL

Bit 0 – PLF PWMxL Falling bit

ValueDescription
1Falling edge of PWMxL will trigger the LEB duration counter
0LEB ignores the falling edge of PWMxL

12.6.55 PWM Generator x Phase Register

Name: PGxPHASE

Offset: 0x34C, 0x382, 0x3B8, 0x3EE, 0x424, 0x45A, 0x490, 0x4C6

Bit 15 14 13 12 11 10 9 8

PGxPHASE[15:8]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

PGxPHASE[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 15:0 – PGxPHASE[15:0] PWM Generator x Phase Register bits

12.6.56 PWM Generator x Duty Cycle Register

Name: PGxDC

Offset: 0x34E, 0x384, 0x3BA, 0x3F0, 0x426, 0x45C, 0x492, 0x4C8

Bit 15 14 13 12 11 10 9 8

PGxDC[15:8]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

PGxDC[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 15:0 – PGxDC[15:0] PWM Generator x Duty Cycle Register bits

12.6.57 PWM Generator x Duty Cycle Adjustment Register

Name: PGxDCA

Offset: 0x350, 0x386, 0x3BC, 0x3F2, 0x428, 0x45E, 0x494, 0x4CA

Microchip dsPIC33CK1024MP708 - PWM Generator x Duty Cycle Adjustment Register - 1

text_image Bit 15 14 13 12 11 10 9 8 Access Reset Bit 7 6 5 4 3 2 1 0 PGxDCA[7:0] Access R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0

Bits 7:0 – PGxDCA[7:0] PWM Generator x Duty Cycle Adjustment Value bits

Depending on the state of the selected PCI source, the PGxDCA value will be added to the value in the PGxDC register to create the effective duty cycle. When the PCI source is active, PGxDCA is added. When the PCI source is inactive, no adjustment is made. Duty cycle adjustment is disabled when PGxDCA[7:0] = 0. The PCI source is selected using the DTCMPSEL bit.

12.6.58 PWM Generator x Period Register

Name: PGxPER

Offset: 0x352, 0x388, 0x3BE, 0x3F4, 0x42A, 0x460, 0x496, 0x4CC

Note:

  1. Period values less than '0x0010' should not be selected.

Bit 15 14 13 12 11 10 9 8

PGxPER[15:8]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

PGxPER[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 15:0 – PGxPER[15:0] PWM Generator x Period Register bits ^(1)

12.6.59 PWM Generator x Trigger A Register

Name: PGxTRIGA

Offset: 0x354, 0x38A, 0x3C0, 0x3F6, 0x42C, 0x462, 0x498, 0x4CE

Bit 15 14 13 12 11 10 9 8

PGxTRIGA[15:8]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

PGxTRIGA[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 15:0 – PGxTRIGA[15:0] PWM Generator x Trigger A Register bits

12.6.60 PWM Generator x Trigger B Register

Name: PGxTRIGB

Offset: 0x356, 0x38C, 0x3C2, 0x3F8, 0x42E, 0x464, 0x49A, 0x4D0

Bit 15 14 13 12 11 10 9 8

PGxTRIGB[15:8]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

PGxTRIGB[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 15:0 – PGxTRIGB[15:0] PWM Generator x Trigger B Register bits

12.6.61 PWM Generator x Trigger C Register

Name: PGxTRIGC

Offset: 0x358, 0x38E, 0x3C4, 0x3FA, 0x430, 0x466, 0x49C, 0x4D2

Bit 15 14 13 12 11 10 9 8

PGxTRIGC[15:8]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

PGxTRIGC[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 15:0 – PGxTRIGC[15:0] PWM Generator x Trigger C Register bits

12.6.62 PWM Generator x Dead-Time Register Low

Name: PGxDTL

Offset: 0x35A, 0x390, 0x3C6, 0x3FC, 0x432, 0x468, 0x49E, 0x4D4

Note:

  1. DTL[13:11] bits are not available when HREN (PGxCONL[7]) = 0.

Bit 15 14 13 12 11 10 9 8

DTL[13:8]
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
DTL[7:0]
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0

Bits 13:0 – DTL[13:0] PWMxL Dead-Time Delay bits ^(1)

12.6.63 PWM Generator x Dead-Time Register High

Name: PGxDTH

Offset: 0x35C, 0x392, 0x3C8, 0x3FE, 0x434, 0x46A, 0x4A0, 0x4D6

Bit 15 14 13 12 11 10 9 8

DTH[13:8]
Access ResetR/W R/W R/W R/W R/W R/W
Bit7 6 5 4 3 2 1 0
DTH[7:0]
Access ResetR/W R/W R/W R/W R/W R/W R/W
0 0 0 0 0 0 0

Bits 13:0 – DTH[13:0] PWMxH Dead-Time Delay bits

12.6.64 PWM Generator x Capture Register

Name: PGxCAP

Offset: 0x35E, 0x394, 0x3CA, 0x400, 0x436, 0x46C, 0x4A2, 0x4D8

Note:

  1. PGxCAP[1:0] will read as '00' in Standard Resolution mode. PGxCAP[4:0] will read as '00000' in High-Resolution mode.
Bit 15 14 13 12 11 10 9 8
PGxCAP[15:8]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
PGxCAP[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0

Bits 15:0 – PGxCAP[15:0] PGx Time Base Capture bits ^(1)

13. High-Speed, 12-Bit Analog-to-Digital Converter

Notes:

  1. This data sheet summarizes the features of the dsPIC33CK1024MP710 family of devices. It is not intended to be a comprehensive reference source. To complement the information in this data sheet, refer to "12-Bit High-Speed, Multiple SARs A/D Converter (ADC)" (www.microchip.com/DS70005213).
  2. Some registers and associated bits described in this section may not be available on all devices due to the number of implemented ADC channels. Refer to dsPIC33CK1024MP710 Product Families for ADC channel availability on device variants.

The dsPIC33CK1024MP710 devices have a high-speed, 12-bit Analog-to-Digital Converter (ADC) that features a low conversion latency, high resolution and oversampling capabilities to improve performance in AC/DC and DC/DC power converters. The devices implement the ADC with five SAR cores, four dedicated and one shared.

The number of available channels and negative inputs is dependent on package size, as shown in the table below.

Table 13-1. ADC External Input Availability

Package Type ExternalInputs Negative Inputs Alternate Inputs
100-Pin ANO-AN26,AN30, AN31 ANNO-ANN4 ANA0-ANA3, ANB0-ANB3,ANCO-ANC2
80-Pin ANO-AN23,AN30, AN31 ANNO-ANN4 ANA0-ANA3, ANB0-ANB3,ANCO-ANC2
64-Pin ANO-AN19,AN30, AN31 ANNO-ANN2, ANN4 ANA0-ANA3, ANB0-ANB2,ANC2
48-Pin ANO-AN18,AN30, AN31 ANNO-ANN2, ANN4 ANA0-ANA3, ANB1-ANB2,ANC2

13.1 ADC Features Overview

The high-speed, 12-bit multiple SARs Analog-to-Digital Converter (ADC) includes the following features:

  • Five ADC Cores: Four Dedicated Cores and One Shared (common) Core
  • User-Configurable Resolution of Up to 12 Bits
  • Up to 3.5 Msps Conversion Rate per Channel at 12-Bit Resolution
  • Low Latency Conversion
  • Up to 28 Analog Input Channels with a Separate 16-Bit Conversion Result Register for each Input Channel
  • Conversion Result can be Formatted as Unsigned or Signed Data, on a per Channel Basis, for All Channels
  • Simultaneous Sampling of up to Five Analog Inputs

• Channel Scan Capability

- Multiple Conversion Trigger Options, Including:

  • PWM triggers from CPU core
  • MCCP/SCCP modules triggers
  • CLC modules triggers
    – External pin trigger event (ADTRG31)
  • Software trigger

- Four Integrated Digital Comparators with Dedicated Interrupts:

– Multiple comparison options
- Assignable to specific analog inputs

- Four Oversampling Filters with Dedicated Interrupts:

  • Provide increased resolution
  • Assignable to a specific analog input

The module consists of five independent SAR ADC cores. Simplified block diagrams of the Multiple SARs 12-bit ADC are shown in Figure 13-1, Figure 13-2 and Figure 13-3.

The analog inputs (channels) are connected through multiplexers and switches to the Sample-and-Hold (S&H) circuit of the ADC core. The core uses the channel information (the output format, the Measurement mode and the input number) to process the analog sample. When conversion is complete, the result is stored in the result buffer for the specific analog input, and passed to the digital filter and digital comparator if they were configured to use data from this particular channel.

The ADC module can sample up to five inputs at a time (four inputs from the dedicated SAR cores and one from the shared SAR core). If multiple ADC inputs request conversion on the shared core, the module will convert them in a sequential manner, starting with the lowest order input.

The ADC provides each analog input the ability to specify its own trigger source. This capability allows the ADC to sample and convert analog inputs that are associated with PWM Generators operating on independent time bases.

Figure 13-1. ADC Module Block Diagram
Microchip dsPIC33CK1024MP708 - ADC Features Overview - 1

flowchart
graph TD
    A["AV_DD"] --> B["Voltage Reference (REFSEL[2:0"])]
    C["AV_SS"] --> B
    B --> D["Shared ADC Core"]
    D --> E["Divider (CLKDIV[5:0"])]
    E --> F["Clock Selection (CLKSEL[1:0"])]
    F --> G["FP"]
    F --> H["Fosc"]
    F --> I["AFVCODIV"]
    F --> J["FVCO/4"]
    D --> K["ANx"]
    D --> L["ANAx"]
    D --> M["ANNx"]
    D --> N["ANx"]
    D --> O["ANAx"]
    D --> P["ANNx"]
    D --> Q["AN4-AN26, AN30, AN31"]
    D --> R["ANN4"]
    D --> S["V_DD Core (AN27)"]
    D --> T["Temperature Sensor (AN28)"]
    D --> U["Band Gap 1.2V (AN29)(1)"]
    E --> V["Output Data"]
    E --> W["Clock"]
    E --> X["Output Data"]
    E --> Y["Clock"]
    E --> Z["Reference"]
    E --> AA["Reference"]
    E --> AB["Clock"]
    E --> AC["Digital Comparator 0"]
    E --> AD["Digital Comparator 1"]
    E --> AE["Digital Comparator 2"]
    E --> AF["Digital Comparator 3"]
    E --> AG["Digital Filter 0"]
    E --> AH["Digital Filter 1"]
    E --> AI["Digital Filter 2"]
    E --> AJ["Digital Filter 3"]
    E --> AK["ADCBUF0"]
    E --> AL["ADCBUF1"]
    E --> AM["..."]
    E --> AN["ADCBUF31"]
    E --> AO["ADCAN0 Interrupt"]
    E --> AP["ADCAN1 Interrupt"]
    E --> AQ["ADCAN31 Interrupt"]
    B --> AR["Dedicated ADC Core x(2)"]
    B --> AS["Dedicated ADC Core x(2)"]
    B --> AT["Divider CLKDIV[5:0"]]
    B --> AU["Output Data"]
    B --> AV["Clock"]
    B --> AW["Output Data"]
    B --> AX["Clock"]
    B --> AY["Output Data"]
    B --> AZ["Clock"]
    B --> BA["Digital Comparator 0"]
    B --> BB["Digital Comparator 1"]
    B --> BC["Digital Comparator 2"]
    B --> BD["Digital Comparator 3"]
    B --> BE["Digital Filter 0"]
    B --> BF["Digital Filter 1"]
    B --> BG["Digital Filter 2"]
    B --> BH["Digital Filter 3"]
    B --> BI["Digital Filter 0, L0DAT"]
    B --> BJ["Digital Filter 1, L1DAT"]
    B --> BK["Digital Filter 2, L2DAT"]
    B --> BL["Digital Filter 3, L3DAT"]
    B --> BM["DACMP0 Interrupt"]
    B --> BN["DACMP1 Interrupt"]
    B --> BO["DACMP2 Interrupt"]
    B --> BP["DACMP3 Interrupt"]
    B --> BQ["ADFLTR0 Interrupt"]
    B --> BR["ADFLTR1 Interrupt"]
    B --> BS["ADFLTR2 Interrupt"]
    B --> BT["ADFLTR3 Interrupt"]

Notes:

  1. Band Gap Reference (V _BG ) is an internal analog input and is not available on device pins.
  2. Your particular device may have a different number of dedicated cores; see the device-specific data sheet, pinout figures or Table 1-1.

Figure 13-2. Shared Core Block Diagram ^(1)
Microchip dsPIC33CK1024MP708 - Notes: - 1

flowchart
graph TD
    A["AN4"] --> B["Analog Channel Number from Current Trigger"]
    C["AN26"] --> B
    D["V_DD Core (AN27)"] --> B
    E["Temperature Sensor (AN28)"] --> B
    F["Band Gap, 1.2V (AN29)"] --> B
    G["(AN30)"] --> B
    H["(AN31)"] --> B
    I["ANN4"] --> J["Shared Sample-and-Hold"]
    J --> K["12-Bit SAR ADC"]
    K --> L["Reference"]
    K --> M["Output Data"]
    N["ADC Core Clock Divider"] --> K
    O["SHRADCS[6:0"]] --> K
    P["SHRSAMC[9:0"]] --> Q["Sampling Time"]
    Q --> J
    R["Clock"] --> K

Note:

  1. Check the device pinout diagram to verify if the pin is available on the specific device.

Figure 13-3. Dedicated ADC Core
Microchip dsPIC33CK1024MP708 - Note: - 1

flowchart
graph TD
    A["ANx"] --> B["Positive Input Selection (CxCHS[1:0"] bits)]
    C["ANAx"] --> D["Negative Input Selection (DIFFx bit)"]
    E["ANNx"] --> F["Trigger Stops Sampling"]
    B --> G["Sample-and-Hold"]
    D --> G
    F --> G
    G --> H["12-Bit SAR ADC"]
    H --> I["ADC Core Clock Divider (ADCS[6:0"] bits)]
    I --> J["Clock"]
    K["AVss"] --> F
    L["+&quot;"] --> G
    M["-&quot;"] --> F
    N["Reference"] --> H
    O["Output Data"] --> H

13.2 Temperature Sensor

The ADC channel, AN28, is connected to a forward biased diode. It can be used to measure die temperature. This diode provides a voltage output that can be monitored by the ADC.

13.3 Analog-to-Digital Converter Resources

Many useful resources are provided on the main product page of the Microchip website for the devices listed in this data sheet. This product page contains the latest updates and additional information.

13.3.1 Differential-Mode

ANNx negative external inputs are used for Differential-mode as shown in Figure 13-2. To enable Differential-mode, the DIFF bit (in the ADMODxL or ADMODxH register) is set for the corresponding channel.

13.3.2 Alternate Inputs

ANXx alternate inputs are used to provide more flexibility to the inputs of the dedicated SAR cores. To enable the use of a specific alternate input, the CxCHS[1:0] bits (in the ADCON4H register) can be set for the corresponding channel.

13.3.3 Key Resources

  • "12-Bit High-Speed, Multiple SARs A/D Converter (ADC)" (www.microchip.com/DS70005213)
  • Code Samples
  • Application Notes
  • Software Libraries
  • Webinars
  • Development Tools

13.4 ADC Control Registers

OffsetName Bit Pos. 7 6 5 4 3 2 1 0
0x0B00 ADCON1L15:8 ADON ADSIDL CVDEN
7:0
0x0B02 ADCON1H15:8 CVDCAP[2:0]
7:0 FORM SHRRES[1:0]
0x0B04 ADCON2L15:8REFCIEREFERCIEEIENPTGENSHREISEL[2:0]
7:0SHRADCS[6:0]
0x0B06 ADCON2H15:8REFRDYREFERRCVDCAP[2:0]SHRSAMC[9:8]
7:0SHRSAMC[7:0]
0x0B08 ADCON3L15:8REFSEL[2:0]SUSPENDSUSPCIESUSPRDYSHRSAMPCNVRTCH
7:0SWLCTRGSWCTRGCNVCHSEL[5:0]
0x0B0AADCON3H15:8CLKSEL[1:0]CLKDIV[5:0]
7:0SHRENReserved[3:0]C3ENC2ENC1EN
0x0B0C ADCON4L15:8
7:0SAMC3ENSAMC2ENSAMC1ENSAMCOEN
0x0B0E ADCON4H15:8
7:0C3CHS[1:0]C2CHS[1:0]C1CHS[1:0]C0CHS[1:0]
0x0B10ADMODOL15:8DIFF7SIGN7DIFF6SIGN6DIFF5SIGN5DIFF4
7:0DIFF3SIGN3DIFF2SIGN2DIFF1SIGN1DIFF0
0x0B12ADMODOH15:8DIFF15SIGN15DIFF14SIGN14DIFF13SIGN13DIFF12
7:0DIFF11SIGN11DIFF10SIGN10DIFF9SIGN9DIFF8
0x0B14ADMOD1L15:8DIFF23SIGN23DIFF22SIGN22DIFF21SIGN21DIFF20
7:0DIFF19SIGN19DIFF18SIGN18DIFF17SIGN17DIFF16
0x0B16ADMOD1H15:8DIFF31SIGN31DIFF30SIGN30DIFF29SIGN29DIFF28
7:0DIFF27SIGN27DIFF26SIGN26DIFF25SIGN25DIFF24
0x0B18 ... 0x0B1FReserved
0x0B20 ADIEL(1)15:8IE[15:8]
7:0IE[7:0]
0x0B22ADIEH(1)15:8IE[31:24]
7:0IE[23:16]
0x0B24 ... 0x0B2FReserved
0x0B30ADSTATL(1)15:8AN[15:0]RDY
7:0AN[15:0]RDY
0x0B32ADSTATH(1)15:8AN[31:24]RDY
7:0AN[23:16]RDY
0x0B34 ... 0x0B37Reserved
0x0B38 ADCMP0ENL(1)15:8CMPEN[15:8]
7:0CMPEN[7:0]
0x0B3AADCMP0ENH(1)15:8CMPEN[31:24]
7:0CMPEN[23:16]
0x0B3CADCMP0LO15:8CMPLO[15:8]
7:0CMPLO[7:0]
0x0B3EADCMP0HI15:8CMPHI[15:8]
7:0CMPHI[7:0]
0x0B40 ADCMP1ENL(1)15:8CMPEN[15:8]
7:0CMPEN[7:0]
0x0B42ADCMP1ENH(1)15:8CMPEN[31:24]
7:0CMPEN[23:16]
0x0B44ADCMP1LO15:8CMPLO[15:8]
7:0CMPLO[7:0]
0x0B46ADCMP1HI15:8CMPHI[15:8]
7:0CMPHI[7:0]
0x0B48 ADCMP2ENL(1)15:8CMPEN[15:8]
7:0CMPEN[7:0]

......continued

OffsetNameBit Pos. 76543210
0x0B4AADCMP2ENH(1)15:8 CMPEN[31:24]
7:0 CMPEN[23:16]
0x0B4CADCMP2LO15:8 CMPLO[15:8]
7:0 CMPLO[7:0]
0x0B4EADCMP2HI15:8 CMPHI[15:8]
7:0 CMPHI[7:0]
0x0B50ADCMP3ENL(1)15:8 CMPEN[15:8]
7:0CMPEN[7:0]
0x0B52ADCMP3ENH(1)15:8 CMPEN[31:24]
7:0 CMPEN[23:16]
0x0B54ADCMP3LO15:8 CMPLO[15:8]
7:0 CMPLO[7:0]
0x0B56ADCMP3HI15:8 CMPHI[15:8]
7:0 CMPHI[7:0]
0x0B58...Reserved
0x0B67
0x0B68ADFLODAT15:8 FLDATA[15:8]
7:0FLDATA[7:0]
0x0B6AADFLOCON15:8FLENMODE[1:0]OVRSAM[2:0]IERDY
7:0FLCHSEL[4:0]
0x0B6CADFL1DAT15:8 FLDATA[15:8]
7:0FLDATA[7:0]
0x0B6EADFL1CON15:8FLENMODE[1:0]OVRSAM[2:0]IERDY
7:0FLCHSEL[4:0]
0x0B70ADFL2DAT15:8 FLDATA[15:8]
7:0FLDATA[7:0]
0x0B72ADFL2CON15:8FLENMODE[1:0]OVRSAM[2:0]IERDY
7:0FLCHSEL[4:0]
0x0B74ADFL3DAT15:8 FLDATA[15:8]
7:0FLDATA[7:0]
0x0B76ADFL3CON15:8FLENMODE[1:0]OVRSAM[2:0]IERDY
7:0FLCHSEL[4:0]
0x0B78...Reserved
0x0B7F
0x0B80ADTRIGOL15:8TRGSRC1[4:0]
7:0TRGSRC0[4:0]
0x0B82ADTRIGOH15:8TRGSRC3[4:0]
7:0TRGSRC2[4:0]
0x0B84ADTRIG1L15:8TRGSRC5[4:0]
7:0TRGSRC4[4:0]
0x0B86ADTRIG1H15:8TRGSRC7[4:0]
7:0TRGSRC6[4:0]
0x0B88ADTRIG2L15:8TRGSRC9[4:0]
7:0TRGSRC8[4:0]
0x0B8AADTRIG2H15:8TRGSRC11[4:0]
7:0TRGSRC10[4:0]
0x0B8CADTRIG3L15:8TRGSRC13[4:0]
7:0TRGSRC12[4:0]
0x0B8EADTRIG3H15:8TRGSRC15[4:0]
7:0TRGSRC14[4:0]
0x0B90ADTRIG4L15:8TRGSRC17[4:0]
7:0TRGSRC16[4:0]
0x0B92ADTRIG4H15:8TRGSRC19[4:0]
7:0TRGSRC18[4:0]
0x0B94ADTRIG5L15:8TRGSRC21[4:0]
7:0TRGSRC20[4:0]
0x0B96ADTRIG5H15:8TRGSRC23[4:0]
7:0TRGSRC22[4:0]

......continued

OffsetName Bit Pos. 765 43210
0x0B98 ADTRIG6L15:8TRGSRC25[4:0]
7:0TRGSRC24[4:0]
0x0B9A ADTRIG6H15:8TRGSRC27[4:0]
7:0TRGSRC26[4:0]
0x0B9C ADTRIG7L15:8TRGSRC29[4:0]
7:0TRGSRC28[4:0]
0x0B9E ADTRIG7H15:8TRGSRC31[4:0]
7:0TRGSRC30[4:0]
0x0BA0 ADCMP0CON15:8CHNL[4:0]
7:0CMPENIESTATBTWNHIHIHILOLOHILOLO
0x0BA2 ... 0x0BA3Reserved
0x0BA4 ADCMP1CON15:8CHNL[4:0]
7:0CMPENIESTATBTWNHIHIHILOLOHILOLO
0x0BA6 ... 0x0BA7Reserved
0x0BA8 ADCMP2CON15:8CHNL[4:0]
7:0CMPENIESTATBTWNHIHIHILOLOHILOLO
0x0BAA ... 0x0BABReserved
0x0BAC ADCMP3CON15:8CHNL[4:0]
7:0CMPENIESTATBTWNHIHIHILOLOHILOLO
0x0BAE ... 0x0BCFReserved
0x0BDOADLVLTRGL15:8LVLEN[15:8]
7:0LVLEN[7:0]
0x0BD2ADLVLTRGH15:8LVLEN[27:24]
7:0LVLEN[23:16]
0x0BD4ADCOREOL15:8SAMC[9:8]
7:0SAMC[7:0]
0x0BD6ADCOREOH15:8EISEL[2:0]RES[1:0]
7:0ADCS[6:0]
0x0BD8ADCORE1L15:8SAMC[9:8]
7:0SAMC[7:0]
0x0BDAADCORE1H15:8EISEL[2:0]RES[1:0]
7:0ADCS[6:0]
0x0BDCADCORE2L15:8SAMC[9:8]
7:0SAMC[7:0]
0x0BDEADCORE2H15:8EISEL[2:0]RES[1:0]
7:0ADCS[6:0]
0x0BE0 ADCORE3L15:8SAMC[9:8]
7:0SAMC[7:0]
0x0BE2ADCORE3H15:8EISEL[2:0]RES[1:0]
7:0ADCS[6:0]
0x0BE4 ... 0x0BEFReserved
0x0BF0ADEIEL15:8EIEN[15:8]
7:0EIEN[7:0]
0x0BF2ADEIEH15:8EIEN[31:24]
7:0EIEN[23:16]
0x0BF4 ... 0x0BF7Reserved
0x0BF8 ADEISTATL15:8EISTAT[15:8]
7:0EISTAT[7:0]

......continued

OffsetNameBit Pos. 76543210
0x0BFA ADEISTATH15:8 EISTAT[31:24]
7:0 EISTAT[23:16]
0x0BFC ... 0x0BFFReserved
0x0C00 ADCON5L15:8SHRRDYC3RDYC2RDYC1RDYC0RDY
7:0SHRPWRC3PWRC2PWRC1PWRC0PWR
0x0C02 ADCON5H15:8WARMTIME[3:0]
7:0SHRCIEC3CIEC2CIEC1CIEC0CIE
0x0C04 ... 0x0C0BReserved
0x0C0C ADCBUF015:8ADCBUF0[15:8]
7:0ADCBUF0[7:0]
0x0C0EADCBUF115:8ADCBUF1[15:8]
7:0ADCBUF1[7:0]
0x0C10ADCBUF215:8ADCBUF2[15:8]
7:0ADCBUF2[7:0]
0x0C12ADCBUF315:8ADCBUF3[15:8]
7:0ADCBUF3[7:0]
0x0C14ADCBUF415:8ADCBUF4[15:8]
7:0ADCBUF4[7:0]
0x0C16ADCBUF515:8ADCBUF5[15:8]
7:0ADCBUF5[7:0]
0x0C18ADCBUF615:8ADCBUF6[15:8]
7:0ADCBUF6[7:0]
0x0C1A ADCBUF715:8ADCBUF7[15:8]
7:0ADCBUF7[7:0]
0x0C1C ADCBUF815:8ADCBUF8[15:8]
7:0ADCBUF8[7:0]
0x0C1EADCBUF915:8ADCBUF9[15:8]
7:0ADCBUF9[7:0]
0x0C20 ADCBUF1015:8ADCBUF10[15:8]
7:0ADCBUF10[7:0]
0x0C22 ADCBUF1115:8ADCBUF11[15:8]
7:0ADCBUF11[7:0]
0x0C24 ADCBUF1215:8ADCBUF12[15:8]
7:0ADCBUF12[7:0]
0x0C26 ADCBUF1315:8ADCBUF13[15:8]
7:0ADCBUF13[7:0]
0x0C28 ADCBUF1415:8ADCBUF14[15:8]
7:0ADCBUF14[7:0]
0x0C2AADCBUF1515:8ADCBUF15[15:8]
7:0ADCBUF15[7:0]
0x0C2C ADCBUF1615:8ADCBUF16[15:8]
7:0ADCBUF16[7:0]
0x0C2E ADCBUF1715:8ADCBUF17[15:8]
7:0ADCBUF17[7:0]
0x0C30 ADCBUF1815:8ADCBUF18[15:8]
7:0ADCBUF18[7:0]
0x0C32 ADCBUF1915:8ADCBUF19[15:8]
7:0ADCBUF19[7:0]
0x0C34 ADCBUF2015:8ADCBUF20[15:8]
7:0ADCBUF20[7:0]
0x0C36 ADCBUF2115:8ADCBUF21[15:8]
7:0ADCBUF21[7:0]
0x0C38 ADCBUF2215:8ADCBUF22[15:8]
7:0ADCBUF22[7:0]
0x0C3AADCBUF2315:8ADCBUF23[15:8]
7:0ADCBUF23[7:0]
OffsetName Bit Pos. 7 6 5 4 3 2 1 0
0x0C3C ADCBUF2415:8 ADCBUF24[15:8]
7:0 ADCBUF24[7:0]
0x0C3E ADCBUF2515:8 ADCBUF25[15:8]
7:0 ADCBUF25[7:0]
0x0C40 ADCBUF2615:8 ADCBUF26[15:8]
7:0 ADCBUF26[7:0]
0x0C42 ADCBUF2715:8 ADCBUF27[15:8]
7:0 ADCBUF27[7:0]
0x0C44 ADCBUF2815:8 ADCBUF28[15:8]
7:0 ADCBUF28[7:0]
0x0C46 ADCBUF2915:8 ADCBUF29[15:8]
7:0 ADCBUF29[7:0]
0x0C48 ADCBUF3015:8 ADCBUF30[15:8]
7:0 ADCBUF30[7:0]
0x0C4A ADCBUF3115:8 ADCBUF31[15:8]
7:0 ADCBUF31[7:0]

13.4.1 ADC Control Register 1 Low

Name: ADCON1L

Offset: 0xB00

Note:

  1. Set the ADON bit only after the ADC module has been configured. Changing ADC Configuration bits when ADON = 1 will result in unpredictable behavior.
Bit 15 14 13 12 11 10 9 8
ADON ADSIDL CVDEN
AccessR/WR/WR/W
Reset000
Bit7 6 5 4 3 2 1 0
Access
Reset

Bit 15 - ADON ADC Enable bit ^(1)

ValueDescription
1ADC module is enabled
0ADC module is off

Bit 13 - ADSIDL ADC Stop in Idle Mode bit

ValueDescription
1Discontinues module operation when device enters Idle mode
0Continues module operation in Idle mode

Bit 11 - CVDEN CVD Enable bit

ValueDescription
1CVD module is enabled
0CVD module is off

13.4.2 ADC Control Register 1 High

Name: ADCON1H

Offset: 0xB02

Bit 15 14 13 12 11 10 9 8

CVDCAP[2:0]
Access Reset 0 0 0R/W R/W R/W

Bit 76543210

FORM SHRRES[1:0]
AccessR/W R/W R/W
Reset 0 1 1

Bits 12:10 - CVDCAP[2:0] CVD Capacitor Setting

ValueDescription
1112.5 pF * Value
...
0000 pF

Bit 7 – FORM Fractional Data Output Format bit

ValueDescription
1Fractional
0Integer

Bits 6:5 – SHRRES[1:0] Shared ADC Core Resolution Selection bits

ValueDescription
1112-bit resolution
1010-bit resolution
018-bit resolution
006-bit resolution

13.4.3 ADC Control Register 2 Low

Name: ADCON2L

Offset: 0xB04

Note:

  1. For the 6-bit shared ADC core resolution (SHRRES[1:0] = 00), the SHREISEL[2:0] settings, from '100' to '111', are not valid and should not be used. For the 8-bit shared ADC core resolution (SHRRES[1:0] = 01), the SHREISEL[2:0] settings, '110' and '111', are not valid and should not be used.

Bit 15 14 13 12 11 10 9 8

REFCIE REFERCIE EIEN PTGENSHREISEL[2:0]
AccessR/WR/WR/WR/WR/WR/WR/W
Reset0 00 0 0 0 0

Bit 76543210

SHRADCS[6:0]
AccessR/WR/WR/WR/WR/WR/WR/W
Reset0 0 0 0 0 0

Bit 15 – REFCIE Band Gap and Reference Voltage Ready Common Interrupt Enable bit

Value Description

1Common interrupt will be generated when the band gap becomes ready
0Common interrupt is disabled for the band gap ready event

Bit 14 – REFERCIE Band Gap or Reference Voltage Error Common Interrupt Enable bit

Value Description

1Common interrupt will be generated when a band gap or reference voltage error is detected
0Common interrupt is disabled for the band gap and reference voltage error event

Bit 12 – EIEN Early Interrupts Enable bit

Value Description

1Early interrupt feature is enabled for input channel interrupts (when EISTATx flag is set)
0Individual interrupts are generated when conversion is done (when ANxRDY flag is set)

Bit 11 – PTGEN External Conversion Request Interface bit

Setting this bit will enable the PTG to request conversion of an ADC input.

Bits 10:8 – SHREISEL[2:0] Shared Core Early Interrupt Time Selection bits ^(1)

Value Description

111Early interrupt is set, interrupt is generated eight T_ADCORE clocks prior to when data are ready
110Early interrupt is set, interrupt is generated seven T_ADCORE clocks prior to when data are ready
101Early interrupt is set, interrupt is generated six T_ADCORE clocks prior to when data are ready
100Early interrupt is set, interrupt is generated five T_ADCORE clocks prior to when the data are ready
011Early interrupt is set, interrupt is generated four T_ADCORE clocks prior to when data are ready
010Early interrupt is set, interrupt is generated three T_ADCORE clocks prior to when data are ready
001Early interrupt is set, interrupt is generated two T_ADCORE clocks prior to when data are ready
000Early interrupt is set, interrupt is generated one T_ADCORE clock prior to when data are ready

Bits 6:0 – SHRADCS[6:0] Shared ADC Core Input Clock Divider bits

These bits determine the number of T_CORESRC (Source Clock Periods) for one shared T_ADCORE (Core Clock Period).

Value Description

1111111254 Source Clock Periods
. . .
00000116 Source Clock Periods

Value Description

00000104 Source Clock Periods
00000012 Source Clock Periods
00000002 Source Clock Periods

13.4.4 ADC Control Register 2 High

Name: ADCON2H

Offset: 0xB06

Legend: HSC = Hardware Settable/Clearable bit

Bit 15 14 13 12 11 10 9 8

REFRDY REFERRCVDCAP[2:0]SHRSAMC[9:8]
AccessHSC/RHSC/RR/WR/WR/WR/WR/W
Reset0 00 0 0 0 0

Bit 76543210

SHRSAMC[7:0]
AccessR/WR/WR/WR/WR/WR/WR/WR/W
Reset0 0 0 0 0 0 0

Bit 15 – REFRDY Band Gap and Reference Voltage Ready Flag bit

ValueDescription
1Band gap is ready
0Band gap is not ready

Bit 14 - REFERR Band Gap or Reference Voltage Error Flag bit

ValueDescription
1Band gap was removed after the ADC module was enabled (ADON = 1)
0No band gap error was detected

Bits 12:10 - CVDCAP[2:0] CVD Capacitor Setting bit

ValueDescription
1112.5 pF * Value
...
0000 pF

Bits 9:0 – SHRSAMC[9:0] Shared ADC Core Sample Time Selection bits

These bits specify the number of shared ADC Core Clock Periods ( T_ADCORE ) for the shared ADC core sample time (Sample Time = (SHRSAMC[9:0] + 2) * T_ADCORE ).

ValueDescription
111111111 1025 T_ADCORE
. . .
0000000001 3 T_ADCORE
0000000000 2 T_ADCORE

13.4.5 ADC Control Register 3 Low

Name: ADCON3L

Offset: 0xB08

Legend: HSC = Hardware Settable/Clearable bit

Bit 15 14 13 12 11 10 9 8

REFSEL[2:0] SUSPEND SUSPCIE SUSPRDY SHRSAMP CNVRTCH

Access R/W R/W R/W R/W R/W HSC/R R/W HSC/R

Reset 00000000

Bit 76543210

SWLCTRG SWCTRG CNVCHSEL[5:0]

Access R/W HSC/R R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 15:13 - REFSEL[2:0] ADC Reference Voltage Selection bits

Value V_REFH V_REFL
001-111Unimplemented: Do not use
000 AV_DD AV_SS

Bit 12 – SUSPEND All ADC Core Triggers Disable bit

ValueDescription
1All new trigger events for the ADC core are disabled
0The ADC core can be triggered

Bit 11 – SUSPCIE Suspend All ADC Cores Common Interrupt Enable bit

ValueDescription
1Common interrupt will be generated when ADC core triggers are suspended (SUSPEND bit = 1) and all previous conversions are finished (SUSPRDY bit becomes set)
0Common interrupt is not generated for suspend ADC cores event

Bit 10 – SUSPRDY ADC Core Suspended Flag bit

ValueDescription
1The ADC core is suspended (SUSPEND bit = 1) and has no conversions in progress
0The ADC core has previous conversions in progress

Bit 9 – SHRSAMP Shared ADC Core Sampling Direct Control bit

This bit should be used with the individual channel conversion trigger controlled by the CNVRTCH bit. It connects an analog input, specified by the CNVCHSEL[5:0] bits, to the shared ADC core and allows extending the sampling time. This bit is not controlled by hardware and must be cleared before the conversion starts (setting CNVRTCH to '1').

ValueDescription
1Shared ADC core samples an analog input specified by the CNVCHSEL[5:0] bits
0Sampling is controlled by the shared ADC core hardware

Bit 8 – CNVRTCH Software Individual Channel Conversion Trigger bit

ValueDescription
1Single trigger is generated for an analog input specified by the CNVCHSEL[5:0] bits; when the bit is set, it is automatically cleared by hardware on the next instruction cycle
0Next individual channel conversion trigger can be generated

Bit 7 – SWLCTRG Software Level-Sensitive Common Trigger bit

Value Description
1Triggers are continuously generated for all channels with the software; level-sensitive common trigger selected as a source in the ADTRIGnL and ADTRIGxH registers
0No software, level-sensitive common triggers are generated

Bit 6 – SWCTRG Software Common Trigger bit

Value Description
1Single trigger is generated for all channels with the software; common trigger selected as a source in the ADTRIGnL and ADTRIGxH registers; when the bit is set, it is automatically cleared by hardware on the next instruction cycle
0Ready to generate the next software common trigger

Bits 5:0 – CNVCHSEL[5:0] Channel No. Selection for Software Individual Channel Conv. Trigger bits These bits define a channel to be converted when the CNVRTCH bit is set.

13.4.6 ADC Control Register 3 High

Name: ADCON3H

Offset: 0xBOA

Notes:

  1. The ADC input clock frequency, selected by the CLKSEL[1:0] bits, must not exceed AD67 (see Table 33-37).

  2. The ADC clock frequency, after the first divider selected by the CLKDIV[5:0] bits, must not exceed AD67 (see Table 33-37).

Bit 15 14 13 12 11 10 9 8

CLKSEL[1:0] CLKDIV[5:0]
AccessR/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0

Bit 76543210

SHRENC3ENC2ENC1ENC0EN
AccessR/WR/W R/W R/W R/W
Reset00 0 0 0

Bits 15:14 – CLKSEL[1:0] ADC Module Clock Source Selection bits ^(1)

ValueDescription
11 F_vco/4
10 AF_vcodiv
01 F_osc
00 F_p(Peripheral Clock)

Bits 13:8 – CLKDIV[5:0] ADC Module Clock Source Divider bits ^(2)

The divider forms a T_CORESRC clock used by all ADC cores (shared and dedicated), from the T_SRC ADC module clock source, selected by the CLKSEL[1:0] bits. Then, each ADC core individually divides the T_CORESRC clock to get a core-specific T_ADCORE clock using the ADCS[6:0] bits in the ADCORExH register or the SHRADCS[6:0] bits in the ADCON2L register.

ValueDescription
11111164 Source Clock Periods
. . .
0000114 Source Clock Periods
0000103 Source Clock Periods
0000012 Source Clock Periods
0000001 Source Clock Period

Bit 7 – SHREN Shared ADC Core Enable bit

ValueDescription
1Shared ADC core is enabled
0Shared ADC core is disabled

Bit 3 – C3EN Dedicated ADC Core 3 Enable bit

ValueDescription
1Dedicated ADC Core 3 is enabled
0Dedicated ADC Core 3 is disabled

Bit 2 – C2EN Dedicated ADC Core 2 Enable bit

ValueDescription
1Dedicated ADC Core 2 is enabled
0Dedicated ADC Core 2 is disabled

Bit 1 – C1EN Dedicated ADC Core 1 Enable bit

Value Description
1Dedicated ADC Core 1 is enabled
0Dedicated ADC Core 1 is disabled

Bit 0 - COEN Dedicated ADC Core 0 Enable bit

Value Description
1Dedicated ADC Core 0 is enabled
0Dedicated ADC Core 0 is disabled

13.4.7 ADC Control Register 4 Low

Name: ADCON4L

Offset: 0xB0C

Legend: r = Reserved bit

Bit 15 14 13 12 11 10 9 8

Reserved[3:0]
Accessrrrr
Reset 0 0 0 0

Bit 76543210

SAMC3ENSAMC2ENSAMC1ENSAMCOEN
AccessR/WR/WR/WR/W
Reset 0 0 0 0

Bits 11:8 – Reserved[3:0] Must be written as '0'

Bit 3 – SAMC3EN Dedicated ADC Core 3 Conversion Delay Enable bit

ValueDescription
1After trigger, the conversion will be delayed and the ADC core will continue sampling during the time specified by the SAMC[9:0] bits in the ADCORE2L register
0After trigger, the sampling will be stopped immediately and the conversion will be started on the next core clock cycle

Bit 2 – SAMC2EN Dedicated ADC Core 2 Conversion Delay Enable bit

ValueDescription
1After trigger, the conversion will be delayed and the ADC core will continue sampling during the time specified by the SAMC[9:0] bits in the ADCORE2L register
0After trigger, the sampling will be stopped immediately and the conversion will be started on the next core clock cycle

Bit 1 – SAMC1EN Dedicated ADC Core 1 Conversion Delay Enable bit

ValueDescription
1After trigger, the conversion will be delayed and the ADC core will continue sampling during the time specified by the SAMC[9:0] bits in the ADCORE1L register
0After trigger, the sampling will be stopped immediately and the conversion will be started on the next core clock cycle

Bit 0 – SAMCOEN Dedicated ADC Core 0 Conversion Delay Enable bit

ValueDescription
1After trigger, the conversion will be delayed and the ADC core will continue sampling during the time specified by the SAMC[9:0] bits in the ADCOREOL register
0After trigger, the sampling will be stopped immediately and the conversion will be started on the next core clock cycle

13.4.8 ADC Control Register 4 High

Name: ADCON4H

Offset: 0xBOE

Bit 15 14 13 12 11 10 9 8

Access Reset

Bit 76543210

C3CHS[1:0] C2CHS[1:0] C1CHS[1:0] C0CHS[1:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 7:6 – C3CHS[1:0] Dedicated ADC Core 3 Input Channel Selection bits

Value Description
11Reserved
10ANB3
01ANA3
00AN3

Bits 5:4 – C2CHS[1:0] Dedicated ADC Core 2 Input Channel Selection bits

Value Description
11ANC2
10ANB2
01ANA2
00AN2

Bits 3:2 - C1CHS[1:0] Dedicated ADC Core 1 Input Channel Selection bits

Value Description
11ANC1
10ANB1
01ANA1
00AN1

Bits 1:0 – COCHS[1:0] Dedicated ADC Core 0 Input Channel Selection bits

Value Description
11ANCO
10ANBO
01ANA0
00ANO

13.4.9 ADC Input Mode Control Register 0 Low

Name: ADMODOL

Offset: 0xB10

Bit 15 14 13 12 11 10 9 8

DIFF7 SIGN7 DIFF6 SIGN6DIFF5 SIGN5 DIFF4 SIGN4

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

DIFF3 SIGN3DIFF2 SIGN2DIFF1SIGN1DIFF0SIGN0

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 15 - DIFF7 Differential-Mode for Corresponding Analog Inputs bits

Value Description
1Channel is differential
0Channel is single-ended

Bit 14 – SIGN7 Output Data Sign for Corresponding Analog Input bit

Value Description
1Channel output data are signed
0Channel output data are unsigned

Bit 13 - DIFF6 Differential-Mode for Corresponding Analog Inputs bits

Value Description
1Channel is differential
0Channel is single-ended

Bit 12 – SIGN6 Output Data Sign for Corresponding Analog Input bit

Value Description
1Channel output data are signed
0Channel output data are unsigned

Bit 11 - DIFF5 Differential-Mode for Corresponding Analog Inputs bits

Value Description
1Channel is differential
0Channel is single-ended

Bit 10 – SIGN5 Output Data Sign for Corresponding Analog Input bit

Value Description
1Channel output data are signed
0Channel output data are unsigned

Bit 9 – DIFF4 Differential-Mode for Corresponding Analog Inputs bits

Value Description
1Channel is differential
0Channel is single-ended

Bit 8 – SIGN4 Output Data Sign for Corresponding Analog Input bit

Value Description
1Channel output data are signed
0Channel output data are unsigned

Bit 7 – DIFF3 Differential-Mode for Corresponding Analog Inputs bits

Value Description
1Channel is differential
0Channel is single-ended

Bit 6 – SIGN3 Output Data Sign for Corresponding Analog Input bit

Value Description
1Channel output data are signed
0Channel output data are unsigned

Bit 5 – DIFF2 Differential-Mode for Corresponding Analog Inputs bits

Value Description
1Channel is differential
0Channel is single-ended

Bit 4 – SIGN2 Output Data Sign for Corresponding Analog Input bit

Value Description
1Channel output data are signed
0Channel output data are unsigned

Bit 3 – DIFF1 Differential-Mode for Corresponding Analog Inputs bits

Value Description
1Channel is differential
0Channel is single-ended

Bit 2 – SIGN1 Output Data Sign for Corresponding Analog Input bit

Value Description
1Channel output data are signed
0Channel output data are unsigned

Bit 1 – DIFF0 Differential-Mode for Corresponding Analog Inputs bits

Value Description
1Channel is differential
0Channel is single-ended

Bit 0 – SIGN0 Output Data Sign for Corresponding Analog Input bit

Value Description
1Channel output data are signed
0Channel output data are unsigned

13.4.10 ADC Input Mode Control Register 0 High

Name: ADMOD0H

Offset: 0xB12

Bit 15 14 13 12 11 10 9 8

DIFF15 SIGN15 DIFF14 SIGN14 DIFF13 SIGN13 DIFF12 SIGN12

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

DIFF11 SIGN11 DIFF10 SIGN10 DIFF9 SIGN9DIFF8 SIGN8

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 15 - DIFF15 Differential-Mode for Corresponding Analog Inputs bits

Value Description
1Channel is differential
0Channel is single-ended

Bit 14 – SIGN15 Output Data Sign for Corresponding Analog Input bit

Value Description
1Channel output data are signed
0Channel output data are unsigned

Bit 13 - DIFF14 Differential-Mode for Corresponding Analog Inputs bits

Value Description
1Channel is differential
0Channel is single-ended

Bit 12 – SIGN14 Output Data Sign for Corresponding Analog Input bit

Value Description
1Channel output data are signed
0Channel output data are unsigned

Bit 11 - DIFF13 Differential-Mode for Corresponding Analog Inputs bits

Value Description
1Channel is differential
0Channel is single-ended

Bit 10 – SIGN13 Output Data Sign for Corresponding Analog Input bit

Value Description
1Channel output data are signed
0Channel output data are unsigned

Bit 9 – DIFF12 Differential-Mode for Corresponding Analog Inputs bits

Value Description
1Channel is differential
0Channel is single-ended

Bit 8 – SIGN12 Output Data Sign for Corresponding Analog Input bit

Value Description
1Channel output data are signed
0Channel output data are unsigned

Bit 7 – DIFF11 Differential-Mode for Corresponding Analog Inputs bits

Value Description
1Channel is differential
0Channel is single-ended

Bit 6 – SIGN11 Output Data Sign for Corresponding Analog Input bit

Value Description
1Channel output data are signed
0Channel output data are unsigned

Bit 5 – DIFF10 Differential-Mode for Corresponding Analog Inputs bits

Value Description
1Channel is differential
0Channel is single-ended

Bit 4 – SIGN10 Output Data Sign for Corresponding Analog Input bit

Value Description
1Channel output data are signed
0Channel output data are unsigned

Bit 3 – DIFF9 Differential-Mode for Corresponding Analog Inputs bits

Value Description
1Channel is differential
0Channel is single-ended

Bit 2 – SIGN9 Output Data Sign for Corresponding Analog Input bit

Value Description
1Channel output data are signed
0Channel output data are unsigned

Bit 1 – DIFF8 Differential-Mode for Corresponding Analog Inputs bits

Value Description
1Channel is differential
0Channel is single-ended

Bit 0 – SIGN8 Output Data Sign for Corresponding Analog Input bit

Value Description
1Channel output data are signed
0Channel output data are unsigned

13.4.11 ADC Input Mode Control Register 1 Low

Name: ADMOD1L

Offset: 0xB14

Bit 15 14 13 12 11 10 9 8

DIFF23 SIGNN23DIFF22 SIGN22DIFF21 SIGN21DIFF20 SIGN20

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

DIFF19 SIGN19 DIFF18 SIGN18 DIFF17 SIGN17 DIFF16 SIGN16

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 15 - DIFF23 Differential-Mode for Corresponding Analog Inputs bits

Value Description
1Channel is differential
0Channel is single-ended

Bit 14 – SIGN23 Output Data Sign for Corresponding Analog Input bit

Value Description
1Channel output data are signed
0Channel output data are unsigned

Bit 13 - DIFF22 Differential-Mode for Corresponding Analog Inputs bits

Value Description
1Channel is differential
0Channel is single-ended

Bit 12 – SIGN22 Output Data Sign for Corresponding Analog Input bit

Value Description
1Channel output data are signed
0Channel output data are unsigned

Bit 11 - DIFF21 Differential-Mode for Corresponding Analog Inputs bits

Value Description
1Channel is differential
0Channel is single-ended

Bit 10 – SIGN21 Output Data Sign for Corresponding Analog Input bit

Value Description
1Channel output data are signed
0Channel output data are unsigned

Bit 9 – DIFF20 Differential-Mode for Corresponding Analog Inputs bits

Value Description
1Channel is differential
0Channel is single-ended

Bit 8 – SIGN20 Output Data Sign for Corresponding Analog Input bit

Value Description
1Channel output data are signed
0Channel output data are unsigned

Bit 7 – DIFF19 Differential-Mode for Corresponding Analog Inputs bits

Value Description
1Channel is differential
0Channel is single-ended

Bit 6 – SIGN19 Output Data Sign for Corresponding Analog Input bit

Value Description
1Channel output data are signed
0Channel output data are unsigned

Bit 5 – DIFF18 Differential-Mode for Corresponding Analog Inputs bits

Value Description
1Channel is differential
0Channel is single-ended

Bit 4 – SIGN18 Output Data Sign for Corresponding Analog Input bit

Value Description
1Channel output data are signed
0Channel output data are unsigned

Bit 3 – DIFF17 Differential-Mode for Corresponding Analog Inputs bits

Value Description
1Channel is differential
0Channel is single-ended

Bit 2 – SIGN17 Output Data Sign for Corresponding Analog Input bit

Value Description
1Channel output data are signed
0Channel output data are unsigned

Bit 1 – DIFF16 Differential-Mode for Corresponding Analog Inputs bits

Value Description
1Channel is differential
0Channel is single-ended

Bit 0 – SIGN16 Output Data Sign for Corresponding Analog Input bit

Value Description
1Channel output data are signed
0Channel output data are unsigned

13.4.12 ADC Input Mode Control Register 1 High

Name: ADMOD1H

Offset: 0xB16

Bit 15 14 13 12 11 10 9 8

DIFF31 SIGNN31DIFF30 SIGN30DIFF29 SIGN29DIFF28 SIGN28

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

DIFF27 SIGN27 DIFF26 SIGN26 DIFF25 SIGN25 DIFF24 SIGN24

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 15 - DIFF31 Differential-Mode for Corresponding Analog Inputs bit

Value Description
1Channel is differential
0Channel is single-ended

Bit 14 – SIGN31 Output Data Sign for Corresponding Analog Inputs bit

Value Description
1Channel output data are signed
0Channel output data are unsigned

Bit 13 - DIFF30 Differential-Mode for Corresponding Analog Inputs bit

Value Description
1Channel is differential
0Channel is single-ended

Bit 12 – SIGN30 Output Data Sign for Corresponding Analog Inputs bit

Value Description
1Channel output data are signed
0Channel output data are unsigned

Bit 11 - DIFF29 Differential-Mode for Corresponding Analog Inputs bit

Value Description
1Channel is differential
0Channel is single-ended

Bit 10 – SIGN29 Output Data Sign for Corresponding Analog Inputs bit

Value Description
1Channel output data are signed
0Channel output data are unsigned

Bit 9 – DIFF28 Differential-Mode for Corresponding Analog Inputs bit

Value Description
1Channel is differential
0Channel is single-ended

Bit 8 – SIGN28 Output Data Sign for Corresponding Analog Inputs bit

Value Description
1Channel output data are signed
0Channel output data are unsigned

Bit 7 – DIFF27 Differential-Mode for Corresponding Analog Inputs bit

Value Description
1Channel is differential
0Channel is single-ended

Bit 6 – SIGN27 Output Data Sign for Corresponding Analog Inputs bit

Value Description
1Channel output data are signed
0Channel output data are unsigned

Bit 5 – DIFF26 Differential-Mode for Corresponding Analog Inputs bit

Value Description
1Channel is differential
0Channel is single-ended

Bit 4 – SIGN26 Output Data Sign for Corresponding Analog Inputs bit

Value Description
1Channel output data are signed
0Channel output data are unsigned

Bit 3 – DIFF25 Differential-Mode for Corresponding Analog Inputs bit

Value Description
1Channel is differential
0Channel is single-ended

Bit 2 – SIGN25 Output Data Sign for Corresponding Analog Inputs bit

Value Description
1Channel output data are signed
0Channel output data are unsigned

Bit 1 – DIFF24 Differential-Mode for Corresponding Analog Inputs bit

Value Description
1Channel is differential
0Channel is single-ended

Bit 0 – SIGN24 Output Data Sign for Corresponding Analog Inputs bit

Value Description
1Channel output data are signed
0Channel output data are unsigned

13.4.13 ADC Interrupt Enable Register Low

Name: ADIEL (1)

Offset: 0xB20

Note:

  1. Bit availability is dependent on the number of supported ADC channels. Refer to dsPIC33CK1024MP710 Product Families for ADC channel availability on package variants.
Bit 15 14 13 12 11 10 9 8
IE[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
IE[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0

Bits 15:0 – IE[15:0] Common Interrupt Enable bits

Value Description
1Common and individual interrupts are enabled for the corresponding channel
0Common and individual interrupts are disabled for the corresponding channel

13.4.14 ADC Interrupt Enable Register High

Name: ADIEH (1)

Offset: 0xB22

Note:

  1. Bit availability is dependent on the number of supported ADC channels. Refer to dsPIC33CK1024MP710 Product Families for ADC channel availability on package variants.
Bit 15 14 13 12 11 10 9 8
IE[31:24]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
IE[23:16]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0

Bits 15:0 – IE[31:16] Common Interrupt Enable bits

Value Description
1Common and individual interrupts are enabled for the corresponding channel
0Common and individual interrupts are disabled for the corresponding channel

13.4.15 ADC Data Ready Status Register Low

Name: ADSTATL (1)

Offset: 0xB30

Note:

  1. Bit availability is dependent on the number of supported ADC channels. Refer to dsPIC33CK1024MP710 Product Families for ADC channel availability on package variants.

Legend: HSC = Hardware Settable/Clearable bit

Bit 15 14 13 12 11 10 9 8

AN[15:0]RDY
Access HSC/R HSC/R HSC/R HSC/R HSC/R HSC/R HSC/R HSC/R Reset 0 0 0 0 0 0 0 0
Bit 76543210
AN[15:0]RDY
Access HSC/R HSC/R HSC/R HSC/R HSC/R HSC/R HSC/R Reset 0 0 0 0 0 0 0 0

Bits 15:0 – AN[15:0]RDY Common Interrupt Enable for Corresponding Analog Inputs bits

Value Description
1Channel conversion result is ready in the corresponding ADCBUFx register
0Channel conversion result is not ready

13.4.16 ADC Data Ready Status Register High

Name: ADSTATH (1)

Offset: 0xB32

Note:

  1. Bit availability is dependent on the number of supported ADC channels. Refer to dsPIC33CK1024MP710 Product Families for ADC channel availability on package variants.

Legend: HSC = Hardware Settable/Clearable bit

Bit 15 14 13 12 11 10 9 8

AN[31:24]RDY

Access HSC/R HSC/R HSC/R HSC/R HSC/R HSC/R HSC/R HSC/R Reset 0 0 0 0 0 0 0

Bit 76543210

AN[23:16]RDY

Access HSC/R HSC/R HSC/R HSC/R HSC/R HSC/R HSC/R HSC/R Reset 0 0 0 0 0 0 0

Bits 15:8 – AN[31:24]RDY Common Interrupt Enable for Corresponding Analog Input bits

Value Description

1Channel conversion result is ready in the corresponding ADCBUFx register
0Channel conversion result is not ready

Bits 7:0 – AN[23:16]RDY Common Interrupt Enable for Corresponding Analog Input bits

Value Description

1Channel conversion result is ready in the corresponding ADCBUFx register
0Channel conversion result is not ready

13.4.17 ADC Digital Comparator x Channel Enable Register Low (x = 0, 1, 2, 3)

Name: ADCMPxENL (1)

Offset: 0xB38, 0xB40, 0xB48, 0xB50

Note:

  1. Bit availability is dependent on the number of supported ADC channels. Refer to dsPIC33CK1024MP710 Product Families for ADC channel availability on package variants.

Bit 15 14 13 12 11 10 9 8

CMPEN[15:8]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

CMPEN[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 15:0 – CMPEN[15:0] Comparator Enable for Corresponding Input Channel bits

Value Description

1Conversion result for corresponding channel is used by the comparator
0Conversion result for corresponding channel is not used by the comparator

13.4.18 ADC Digital Comparator x Channel Enable Register High (x = 0, 1, 2, 3)

Name: ADCMPxENH (1)

Offset: 0xB3A, 0xB42, 0xB4A, 0xB52

Note:

  1. Bit availability is dependent on the number of supported ADC channels. Refer to dsPIC33CK1024MP710 Product Families for ADC channel availability on package variants.

Bit 15 14 13 12 11 10 9 8

CMPEN[31:24]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

CMPEN[23:16]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 15:0 – CMPEN[31:16] Comparator Enable for Corresponding Input Channel bits

Value Description

1Conversion result for corresponding channel is used by the comparator
0Conversion result for corresponding channel is not used by the comparator

13.4.19 ADC Comparator x Threshold Low Register

Name: ADCMPxLO

Offset: 0xB3C, 0xB44, 0xB4C, 0xB54

Bit 15 14 13 12 11 10 9 8

CMPLO[15:8]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

CMPLO[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 15:0 – CMPLO[15:0] ADC Comparator Lower Threshold bits

The register stores the 16-bit low digital comparison values for use by the digital comparators.

13.4.20 ADC Comparator x Threshold High Register

Name: ADCMPxHI

Offset: 0xB3E, 0xB46, 0xB4E, 0xB56

Bit 15 14 13 12 11 10 9 8

CMPHI[15:8]
AccessR/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0
Bit7 6 5 4 3 2 1 0
CMPHI[7:0]
AccessR/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0

Bits 15:0 - CMPHI[15:0] ADC Comparator Upper Threshold bits

The register stores the 16-bit upper digital comparison values for use by the digital comparators.

13.4.21 Oversampling Filter x Output Register (x = 0, 1, 2, 3)

Name: ADFLxDAT

Offset: 0xB68, 0xB6C, 0xB70, 0xB74

Bit 15 14 13 12 11 10 9 8

FLDATA[15:8]
AccessR/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0
Bit7 6 5 4 3 2 1 0
FLDATA[7:0]
AccessR/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0

Bits 15:0 – FLDATA[15:0] 16-Bit Output Data from Oversampling Filters bits

13.4.22 ADC Digital Filter x Control Register (x = 0, 1, 2, 3)

Name: ADFLxCON

Offset: 0xB6A, 0xB6E, 0xB72, 0xB76

Legend: HSC = Hardware Settable/Clearable bit

Bit 15 14 13 12 11 10 9 8

FLEN MODE[1:0] OVRSAM[2:0] IE RDY
AccessR/W R/W R/W R/W R/W R/W R/W HSC/R
Reset0 0 0 0 0 0 0

Bit 76543210

FLCHSEL[4:0]
AccessR/W R/W R/W R/W R/W
Reset0 0 0 0 0

Bit 15 – FLEN Filter Enable bit

ValueDescription
1Filter is enabled
0Filter is disabled and the RDY bit is cleared

Bits 14:13 - MODE[1:0] Filter Mode bits

ValueDescription
11Averaging mode
10Reserved
01Reserved
00Oversampling mode

Bits 12:10 - OVRSAM[2:0] Filter Averaging/Oversampling Ratio bits

If MODE[1:0] = 00:

111 = 128x (16-bit result in the ADFLxDAT register is in 12.4 format)

110 = 32x (15-bit result in the ADFLxDAT register is in 12.3 format)

101 = 8x (14-bit result in the ADFLxDAT register is in 12.2 format)

100 = 2x (13-bit result in the ADFLxDAT register is in 12.1 format)

011 = 256x (16-bit result in the ADFLxDAT register is in 12.4 format)

010 = 64x (15-bit result in the ADFLxDAT register is in 12.3 format)

001 = 16x (14-bit result in the ADFLxDAT register is in 12.2 format)

000 = 4x (13-bit result in the ADFLxDAT register is in 12.1 format)

If MODE[1:0] = 11 (12-bit result in the ADFLxDAT register in all instances):

111 = 256x

110 = 128x

101 = 64x

100 = 32x

011 = 16x

010 = 8x

001 = 4x

000 = 2x

Bit 9 – IE Filter Common ADC Interrupt Enable bit

ValueDescription
1Common ADC interrupt will be generated when the filter result will be ready
0Common ADC interrupt will not be generated for the filter

Bit 8 – RDY Oversampling Filter Data Ready Flag bit

This bit is cleared by hardware when the result is read from the ADFLxDAT register.

Value Description
1Data in the ADFLxDAT register are ready
0The ADFLxDAT register has been read and new data in the ADFLxDAT register are not ready

Bits 4:0 – FLCHSEL[4:0] Oversampling Filter Input Channel Selection bits

Value Description
11111AN31
11110AN30
11101Band Gap, 1.2V (AN29)
11100Temperature Sensor (AN28)
11011 V_DD Core (AN27)
11010AN26
...
00000ANO

13.4.23 ADC Channel Trigger 0 Selection Register Low

Name: ADTRIGOL

Offset: 0xB80

Bit 15 14 13 12 11 10 9 8

TRGRC1[4:0]
Access Reset 0 0 0 0 0R/W R/W R/W R/W R/W
Bit 7 6 5 4 3 2 1 0
TRGRC0[4:0]
Access Reset 0 0 0 0 0R/W R/W R/W R/W R/W

Bits 12:8 – TRGSRC1[4:0] Trigger Source Selection for Corresponding Analog Inputs bits

Value Description
11111ADTRG31 (PPS input)
11110PTG
11101CLC2
11100CLC1
11011APWM4 Trigger 2
11010APWM4 Trigger 1
11001APWM3 Trigger 2
11000APWM3 Trigger 1
10111APWM2 Trigger 2
10110APWM2 Trigger 1
10101APWM1 Trigger 2
10100APWM1 Trigger 1
10011PWM8 Trigger 2
10010PWM8 Trigger 1
10001PWM7 Trigger 2
10000PWM7 Trigger 1
01111PWM6 Trigger 2
01110PWM6 Trigger 1
01101PWM5 Trigger 2
01100PWM5 Trigger 1
01011PWM4 Trigger 2
01010PWM4 Trigger 1
01001PWM3 Trigger 2
01000PWM3 Trigger 1
00111PWM2 Trigger 2
00110PWM2 Trigger 1
00101PWM1 Trigger 2
00100PWM1 Trigger 1
00011Reserved
00010Level software trigger
00001Common software trigger
00000No trigger is enabled

Bits 4:0 – TRGSRC0[4:0] Common Interrupt Enable for Corresponding Analog Inputs bits

ValueDescription
11111ADTRG31 (PPS input)
11110PTG
Value Description
11101CLC2
11100CLC1
11011APWM4 Trigger 2
11010APWM4 Trigger 1
11001APWM3 Trigger 2
11000APWM3 Trigger 1
10111APWM2 Trigger 2
10110APWM2 Trigger 1
10101APWM1 Trigger 2
10100APWM1 Trigger 1
10011PWM8 Trigger 2
10010PWM8 Trigger 1
10001PWM7 Trigger 2
10000PWM7 Trigger 1
01111PWM6 Trigger 2
01110PWM6 Trigger 1
01101PWM5 Trigger 2
01100PWM5 Trigger 1
01011PWM4 Trigger 2
01010PWM4 Trigger 1
01001PWM3 Trigger 2
01000PWM3 Trigger 1
00111PWM2 Trigger 2
00110PWM2 Trigger 1
00101PWM1 Trigger 2
00100PWM1 Trigger 1
00011Reserved
00010Level software trigger
00001Common software trigger
00000No trigger is enabled

13.4.24 ADC Channel Trigger 0 Selection Register High

Name: ADTRIGOH

Offset: 0xB82

Bit 15 14 13 12 11 10 9 8

TRGRC3[4:0]
Access Reset 0 0 0 0 0R/W R/W R/W R/W R/W
Bit 7 6 5 4 3 2 1 0
TRGRC2[4:0]
Access Reset 0 0 0 0 0R/W R/W R/W R/W R/W

Bits 12:8 – TRGSRC3[4:0] Trigger Source Selection for Corresponding Analog Inputs bits

Value Description
11111ADTRG31 (PPS input)
11110PTG
11101CLC2
11100CLC1
11011APWM4 Trigger 2
11010APWM4 Trigger 1
11001APWM3 Trigger 2
11000APWM3 Trigger 1
10111APWM2 Trigger 2
10110APWM2 Trigger 1
10101APWM1 Trigger 2
10100APWM1 Trigger 1
10011PWM8 Trigger 2
10010PWM8 Trigger 1
10001PWM7 Trigger 2
10000PWM7 Trigger 1
01111PWM6 Trigger 2
01110PWM6 Trigger 1
01101PWM5 Trigger 2
01100PWM5 Trigger 1
01011PWM4 Trigger 2
01010PWM4 Trigger 1
01001PWM3 Trigger 2
01000PWM3 Trigger 1
00111PWM2 Trigger 2
00110PWM2 Trigger 1
00101PWM1 Trigger 2
00100PWM1 Trigger 1
00011Reserved
00010Level software trigger
00001Common software trigger
00000No trigger is enabled

Bits 4:0 – TRGSRC2[4:0] Common Interrupt Enable for Corresponding Analog Inputs bits

ValueDescription
11111ADTRG31 (PPS input)
11110PTG
Value Description
11101CLC2
11100CLC1
11011APWM4 Trigger 2
11010APWM4 Trigger 1
11001APWM3 Trigger 2
11000APWM3 Trigger 1
10111APWM2 Trigger 2
10110APWM2 Trigger 1
10101APWM1 Trigger 2
10100APWM1 Trigger 1
10011PWM8 Trigger 2
10010PWM8 Trigger 1
10001PWM7 Trigger 2
10000PWM7 Trigger 1
01111PWM6 Trigger 2
01110PWM6 Trigger 1
01101PWM5 Trigger 2
01100PWM5 Trigger 1
01011PWM4 Trigger 2
01010PWM4 Trigger 1
01001PWM3 Trigger 2
01000PWM3 Trigger 1
00111PWM2 Trigger 2
00110PWM2 Trigger 1
00101PWM1 Trigger 2
00100PWM1 Trigger 1
00011Reserved
00010Level software trigger
00001Common software trigger
00000No trigger is enabled

13.4.25 ADC Channel Trigger 1 Selection Register Low

Name: ADTRIG1L

Offset: 0xB84

Bit 15 14 13 12 11 10 9 8

TRGRC5[4:0]
Access Reset 0 0 0 0 0R/W R/W R/W R/W R/W
Bit 7 6 5 4 3 2 1 0
TRGRC4[4:0]
Access Reset 0 0 0 0 0R/W R/W R/W R/W R/W

Bits 12:8 – TRGSRC5[4:0] Trigger Source Selection for Corresponding Analog Inputs bits

Value Description
11111ADTRG31 (PPS input)
11110PTG
11101CLC2
11100CLC1
11011APWM4 Trigger 2
11010APWM4 Trigger 1
11001APWM3 Trigger 2
11000APWM3 Trigger 1
10111APWM2 Trigger 2
10110APWM2 Trigger 1
10101APWM1 Trigger 2
10100APWM1 Trigger 1
10011PWM8 Trigger 2
10010PWM8 Trigger 1
10001PWM7 Trigger 2
10000PWM7 Trigger 1
01111PWM6 Trigger 2
01110PWM6 Trigger 1
01101PWM5 Trigger 2
01100PWM5 Trigger 1
01011PWM4 Trigger 2
01010PWM4 Trigger 1
01001PWM3 Trigger 2
01000PWM3 Trigger 1
00111PWM2 Trigger 2
00110PWM2 Trigger 1
00101PWM1 Trigger 2
00100PWM1 Trigger 1
00011Reserved
00010Level software trigger
00001Common software trigger
00000No trigger is enabled

Bits 4:0 – TRGSRC4[4:0] Common Interrupt Enable for Corresponding Analog Inputs bits

ValueDescription
11111ADTRG31 (PPS input)
11110PTG
Value Description
11101CLC2
11100CLC1
11011APWM4 Trigger 2
11010APWM4 Trigger 1
11001APWM3 Trigger 2
11000APWM3 Trigger 1
10111APWM2 Trigger 2
10110APWM2 Trigger 1
10101APWM1 Trigger 2
10100APWM1 Trigger 1
10011PWM8 Trigger 2
10010PWM8 Trigger 1
10001PWM7 Trigger 2
10000PWM7 Trigger 1
01111PWM6 Trigger 2
01110PWM6 Trigger 1
01101PWM5 Trigger 2
01100PWM5 Trigger 1
01011PWM4 Trigger 2
01010PWM4 Trigger 1
01001PWM3 Trigger 2
01000PWM3 Trigger 1
00111PWM2 Trigger 2
00110PWM2 Trigger 1
00101PWM1 Trigger 2
00100PWM1 Trigger 1
00011Reserved
00010Level software trigger
00001Common software trigger
00000No trigger is enabled

13.4.26 ADC Channel Trigger 1 Selection Register High

Name: ADTRIG1H

Offset: 0xB86

Bit 15 14 13 12 11 10 9 8

TRGRC7[4:0]
Access Reset 0 0 0 0 0R/W R/W R/W R/W R/W
Bit 7 6 5 4 3 2 1 0
TRGRC6[4:0]
Access Reset 0 0 0 0 0R/W R/W R/W R/W R/W

Bits 12:8 – TRGSRC7[4:0] Trigger Source Selection for Corresponding Analog Inputs bits

Value Description
11111ADTRG31 (PPS input)
11110PTG
11101CLC2
11100CLC1
11011APWM4 Trigger 2
11010APWM4 Trigger 1
11001APWM3 Trigger 2
11000APWM3 Trigger 1
10111APWM2 Trigger 2
10110APWM2 Trigger 1
10101APWM1 Trigger 2
10100APWM1 Trigger 1
10011PWM8 Trigger 2
10010PWM8 Trigger 1
10001PWM7 Trigger 2
10000PWM7 Trigger 1
01111PWM6 Trigger 2
01110PWM6 Trigger 1
01101PWM5 Trigger 2
01100PWM5 Trigger 1
01011PWM4 Trigger 2
01010PWM4 Trigger 1
01001PWM3 Trigger 2
01000PWM3 Trigger 1
00111PWM2 Trigger 2
00110PWM2 Trigger 1
00101PWM1 Trigger 2
00100PWM1 Trigger 1
00011Reserved
00010Level software trigger
00001Common software trigger
00000No trigger is enabled

Bits 4:0 – TRGSRC6[4:0] Common Interrupt Enable for Corresponding Analog Inputs bits

ValueDescription
11111ADTRG31 (PPS input)
11110PTG
Value Description
11101CLC2
11100CLC1
11011APWM4 Trigger 2
11010APWM4 Trigger 1
11001APWM3 Trigger 2
11000APWM3 Trigger 1
10111APWM2 Trigger 2
10110APWM2 Trigger 1
10101APWM1 Trigger 2
10100APWM1 Trigger 1
10011PWM8 Trigger 2
10010PWM8 Trigger 1
10001PWM7 Trigger 2
10000PWM7 Trigger 1
01111PWM6 Trigger 2
01110PWM6 Trigger 1
01101PWM5 Trigger 2
01100PWM5 Trigger 1
01011PWM4 Trigger 2
01010PWM4 Trigger 1
01001PWM3 Trigger 2
01000PWM3 Trigger 1
00111PWM2 Trigger 2
00110PWM2 Trigger 1
00101PWM1 Trigger 2
00100PWM1 Trigger 1
00011Reserved
00010Level software trigger
00001Common software trigger
00000No trigger is enabled

13.4.27 ADC Channel Trigger 2 Selection Register Low

Name: ADTRIG2L

Offset: 0xB88

Bit 15 14 13 12 11 10 9 8

TRGRC9[4:0]
Access Reset 0 0 0 0 0R/W R/W R/W R/W R/W
Bit 7 6 5 4 3 2 1 0
TRGRC8[4:0]
Access Reset 0 0 0 0 0R/W R/W R/W R/W R/W

Bits 12:8 – TRGSRC9[4:0] Trigger Source Selection for Corresponding Analog Inputs bits

Value Description
11111ADTRG31 (PPS input)
11110PTG
11101CLC2
11100CLC1
11011APWM4 Trigger 2
11010APWM4 Trigger 1
11001APWM3 Trigger 2
11000APWM3 Trigger 1
10111APWM2 Trigger 2
10110APWM2 Trigger 1
10101APWM1 Trigger 2
10100APWM1 Trigger 1
10011PWM8 Trigger 2
10010PWM8 Trigger 1
10001PWM7 Trigger 2
10000PWM7 Trigger 1
01111PWM6 Trigger 2
01110PWM6 Trigger 1
01101PWM5 Trigger 2
01100PWM5 Trigger 1
01011PWM4 Trigger 2
01010PWM4 Trigger 1
01001PWM3 Trigger 2
01000PWM3 Trigger 1
00111PWM2 Trigger 2
00110PWM2 Trigger 1
00101PWM1 Trigger 2
00100PWM1 Trigger 1
00011Reserved
00010Level software trigger
00001Common software trigger
00000No trigger is enabled

Bits 4:0 – TRGSRC8[4:0] Common Interrupt Enable for Corresponding Analog Inputs bits

ValueDescription
11111ADTRG31 (PPS input)
11110PTG
Value Description
11101CLC2
11100CLC1
11011APWM4 Trigger 2
11010APWM4 Trigger 1
11001APWM3 Trigger 2
11000APWM3 Trigger 1
10111APWM2 Trigger 2
10110APWM2 Trigger 1
10101APWM1 Trigger 2
10100APWM1 Trigger 1
10011PWM8 Trigger 2
10010PWM8 Trigger 1
10001PWM7 Trigger 2
10000PWM7 Trigger 1
01111PWM6 Trigger 2
01110PWM6 Trigger 1
01101PWM5 Trigger 2
01100PWM5 Trigger 1
01011PWM4 Trigger 2
01010PWM4 Trigger 1
01001PWM3 Trigger 2
01000PWM3 Trigger 1
00111PWM2 Trigger 2
00110PWM2 Trigger 1
00101PWM1 Trigger 2
00100PWM1 Trigger 1
00011Reserved
00010Level software trigger
00001Common software trigger
00000No trigger is enabled

13.4.28 ADC Channel Trigger 2 Selection Register High

Name: ADTRIG2H

Offset: 0xB8A

Bit 15 14 13 12 11 10 9 8

TRGRC11[4:0]
Access Reset 0 0 0 0 0R/W R/W R/W R/W R/W
Bit 7 6 5 4 3 2 1 0
TRGRC10[4:0]
Access Reset 0 0 0 0 0R/W R/W R/W R/W R/W

Bits 12:8 – TRGSRC11[4:0] Trigger Source Selection for Corresponding Analog Inputs bits

Value Description
11111ADTRG31 (PPS input)
11110PTG
11101CLC2
11100CLC1
11011APWM4 Trigger 2
11010APWM4 Trigger 1
11001APWM3 Trigger 2
11000APWM3 Trigger 1
10111APWM2 Trigger 2
10110APWM2 Trigger 1
10101APWM1 Trigger 2
10100APWM1 Trigger 1
10011PWM8 Trigger 2
10010PWM8 Trigger 1
10001PWM7 Trigger 2
10000PWM7 Trigger 1
01111PWM6 Trigger 2
01110PWM6 Trigger 1
01101PWM5 Trigger 2
01100PWM5 Trigger 1
01011PWM4 Trigger 2
01010PWM4 Trigger 1
01001PWM3 Trigger 2
01000PWM3 Trigger 1
00111PWM2 Trigger 2
00110PWM2 Trigger 1
00101PWM1 Trigger 2
00100PWM1 Trigger 1
00011Reserved
00010Level software trigger
00001Common software trigger
00000No trigger is enabled

Bits 4:0 – TRGSRC10[4:0] Common Interrupt Enable for Corresponding Analog Inputs bits

ValueDescription
11111ADTRG31 (PPS input)
11110PTG
Value Description
11101CLC2
11100CLC1
11011APWM4 Trigger 2
11010APWM4 Trigger 1
11001APWM3 Trigger 2
11000APWM3 Trigger 1
10111APWM2 Trigger 2
10110APWM2 Trigger 1
10101APWM1 Trigger 2
10100APWM1 Trigger 1
10011PWM8 Trigger 2
10010PWM8 Trigger 1
10001PWM7 Trigger 2
10000PWM7 Trigger 1
01111PWM6 Trigger 2
01110PWM6 Trigger 1
01101PWM5 Trigger 2
01100PWM5 Trigger 1
01011PWM4 Trigger 2
01010PWM4 Trigger 1
01001PWM3 Trigger 2
01000PWM3 Trigger 1
00111PWM2 Trigger 2
00110PWM2 Trigger 1
00101PWM1 Trigger 2
00100PWM1 Trigger 1
00011Reserved
00010Level software trigger
00001Common software trigger
00000No trigger is enabled

13.4.29 ADC Channel Trigger 3 Selection Register Low

Name: ADTRIG3L

Offset: 0xB8C

Bit 15 14 13 12 11 10 9 8

TRGRC13[4:0]
Access Reset 0 0 0 0 0R/W R/W R/W R/W R/W
Bit 7 6 5 4 3 2 1 0
TRGRC12[4:0]
Access Reset 0 0 0 0 0R/W R/W R/W R/W R/W

Bits 12:8 – TRGSRC13[4:0] Trigger Source Selection for Corresponding Analog Inputs bits

Value Description
11111ADTRG31 (PPS input)
11110PTG
11101CLC2
11100CLC1
11011APWM4 Trigger 2
11010APWM4 Trigger 1
11001APWM3 Trigger 2
11000APWM3 Trigger 1
10111APWM2 Trigger 2
10110APWM2 Trigger 1
10101APWM1 Trigger 2
10100APWM1 Trigger 1
10011PWM8 Trigger 2
10010PWM8 Trigger 1
10001PWM7 Trigger 2
10000PWM7 Trigger 1
01111PWM6 Trigger 2
01110PWM6 Trigger 1
01101PWM5 Trigger 2
01100PWM5 Trigger 1
01011PWM4 Trigger 2
01010PWM4 Trigger 1
01001PWM3 Trigger 2
01000PWM3 Trigger 1
00111PWM2 Trigger 2
00110PWM2 Trigger 1
00101PWM1 Trigger 2
00100PWM1 Trigger 1
00011Reserved
00010Level software trigger
00001Common software trigger
00000No trigger is enabled

Bits 4:0 – TRGSRC12[4:0] Common Interrupt Enable for Corresponding Analog Inputs bits

ValueDescription
11111ADTRG31 (PPS input)
11110PTG
Value Description
11101CLC2
11100CLC1
11011APWM4 Trigger 2
11010APWM4 Trigger 1
11001APWM3 Trigger 2
11000APWM3 Trigger 1
10111APWM2 Trigger 2
10110APWM2 Trigger 1
10101APWM1 Trigger 2
10100APWM1 Trigger 1
10011PWM8 Trigger 2
10010PWM8 Trigger 1
10001PWM7 Trigger 2
10000PWM7 Trigger 1
01111PWM6 Trigger 2
01110PWM6 Trigger 1
01101PWM5 Trigger 2
01100PWM5 Trigger 1
01011PWM4 Trigger 2
01010PWM4 Trigger 1
01001PWM3 Trigger 2
01000PWM3 Trigger 1
00111PWM2 Trigger 2
00110PWM2 Trigger 1
00101PWM1 Trigger 2
00100PWM1 Trigger 1
00011Reserved
00010Level software trigger
00001Common software trigger
00000No trigger is enabled

13.4.30 ADC Channel Trigger 3 Selection Register High

Name: ADTRIG3H

Offset: 0xB8E

Bit 15 14 13 12 11 10 9 8

TRGRC15[4:0]
Access Reset 0 0 0 0 0R/W R/W R/W R/W R/W
Bit 7 6 5 4 3 2 1 0
TRGRC14[4:0]
Access Reset 0 0 0 0 0R/W R/W R/W R/W R/W

Bits 12:8 – TRGSRC15[4:0] Trigger Source Selection for Corresponding Analog Inputs bits

Value Description
11111ADTRG31 (PPS input)
11110PTG
11101CLC2
11100CLC1
11011APWM4 Trigger 2
11010APWM4 Trigger 1
11001APWM3 Trigger 2
11000APWM3 Trigger 1
10111APWM2 Trigger 2
10110APWM2 Trigger 1
10101APWM1 Trigger 2
10100APWM1 Trigger 1
10011PWM8 Trigger 2
10010PWM8 Trigger 1
10001PWM7 Trigger 2
10000PWM7 Trigger 1
01111PWM6 Trigger 2
01110PWM6 Trigger 1
01101PWM5 Trigger 2
01100PWM5 Trigger 1
01011PWM4 Trigger 2
01010PWM4 Trigger 1
01001PWM3 Trigger 2
01000PWM3 Trigger 1
00111PWM2 Trigger 2
00110PWM2 Trigger 1
00101PWM1 Trigger 2
00100PWM1 Trigger 1
00011Reserved
00010Level software trigger
00001Common software trigger
00000No trigger is enabled

Bits 4:0 – TRGSRC14[4:0] Common Interrupt Enable for Corresponding Analog Inputs bits

ValueDescription
11111ADTRG31 (PPS input)
11110PTG
Value Description
11101CLC2
11100CLC1
11011APWM4 Trigger 2
11010APWM4 Trigger 1
11001APWM3 Trigger 2
11000APWM3 Trigger 1
10111APWM2 Trigger 2
10110APWM2 Trigger 1
10101APWM1 Trigger 2
10100APWM1 Trigger 1
10011PWM8 Trigger 2
10010PWM8 Trigger 1
10001PWM7 Trigger 2
10000PWM7 Trigger 1
01111PWM6 Trigger 2
01110PWM6 Trigger 1
01101PWM5 Trigger 2
01100PWM5 Trigger 1
01011PWM4 Trigger 2
01010PWM4 Trigger 1
01001PWM3 Trigger 2
01000PWM3 Trigger 1
00111PWM2 Trigger 2
00110PWM2 Trigger 1
00101PWM1 Trigger 2
00100PWM1 Trigger 1
00011Reserved
00010Level software trigger
00001Common software trigger
00000No trigger is enabled

13.4.31 ADC Channel Trigger 4 Selection Register Low

Name: ADTRIG4L

Offset: 0xB90

Bit 15 14 13 12 11 10 9 8

TRGRC17[4:0]
Access Reset 0 0 0 0 0R/W R/W R/W R/W R/W
Bit 7 6 5 4 3 2 1 0
TRGRC16[4:0]
Access Reset 0 0 0 0 0R/W R/W R/W R/W R/W

Bits 12:8 – TRGSRC17[4:0] Trigger Source Selection for Corresponding Analog Inputs bits

Value Description
11111ADTRG31 (PPS input)
11110PTG
11101CLC2
11100CLC1
11011APWM4 Trigger 2
11010APWM4 Trigger 1
11001APWM3 Trigger 2
11000APWM3 Trigger 1
10111APWM2 Trigger 2
10110APWM2 Trigger 1
10101APWM1 Trigger 2
10100APWM1 Trigger 1
10011PWM8 Trigger 2
10010PWM8 Trigger 1
10001PWM7 Trigger 2
10000PWM7 Trigger 1
01111PWM6 Trigger 2
01110PWM6 Trigger 1
01101PWM5 Trigger 2
01100PWM5 Trigger 1
01011PWM4 Trigger 2
01010PWM4 Trigger 1
01001PWM3 Trigger 2
01000PWM3 Trigger 1
00111PWM2 Trigger 2
00110PWM2 Trigger 1
00101PWM1 Trigger 2
00100PWM1 Trigger 1
00011Reserved
00010Level software trigger
00001Common software trigger
00000No trigger is enabled

Bits 4:0 – TRGSRC16[4:0] Common Interrupt Enable for Corresponding Analog Inputs bits

ValueDescription
11111ADTRG31 (PPS input)
11110PTG
Value Description
11101CLC2
11100CLC1
11011APWM4 Trigger 2
11010APWM4 Trigger 1
11001APWM3 Trigger 2
11000APWM3 Trigger 1
10111APWM2 Trigger 2
10110APWM2 Trigger 1
10101APWM1 Trigger 2
10100APWM1 Trigger 1
10011PWM8 Trigger 2
10010PWM8 Trigger 1
10001PWM7 Trigger 2
10000PWM7 Trigger 1
01111PWM6 Trigger 2
01110PWM6 Trigger 1
01101PWM5 Trigger 2
01100PWM5 Trigger 1
01011PWM4 Trigger 2
01010PWM4 Trigger 1
01001PWM3 Trigger 2
01000PWM3 Trigger 1
00111PWM2 Trigger 2
00110PWM2 Trigger 1
00101PWM1 Trigger 2
00100PWM1 Trigger 1
00011Reserved
00010Level software trigger
00001Common software trigger
00000No trigger is enabled

13.4.32 ADC Channel Trigger 4 Selection Register High

Name: ADTRIG4H

Offset: 0xB92

Bit 15 14 13 12 11 10 9 8

TRGRC19[4:0]
Access Reset 0 0 0 0 0R/W R/W R/W R/W R/W
Bit 7 6 5 4 3 2 1 0
TRGRC18[4:0]
Access Reset 0 0 0 0 0R/W R/W R/W R/W R/W

Bits 12:8 – TRGSRC19[4:0] Trigger Source Selection for Corresponding Analog Inputs bits

Value Description
11111ADTRG31 (PPS input)
11110PTG
11101CLC2
11100CLC1
11011APWM4 Trigger 2
11010APWM4 Trigger 1
11001APWM3 Trigger 2
11000APWM3 Trigger 1
10111APWM2 Trigger 2
10110APWM2 Trigger 1
10101APWM1 Trigger 2
10100APWM1 Trigger 1
10011PWM8 Trigger 2
10010PWM8 Trigger 1
10001PWM7 Trigger 2
10000PWM7 Trigger 1
01111PWM6 Trigger 2
01110PWM6 Trigger 1
01101PWM5 Trigger 2
01100PWM5 Trigger 1
01011PWM4 Trigger 2
01010PWM4 Trigger 1
01001PWM3 Trigger 2
01000PWM3 Trigger 1
00111PWM2 Trigger 2
00110PWM2 Trigger 1
00101PWM1 Trigger 2
00100PWM1 Trigger 1
00011Reserved
00010Level software trigger
00001Common software trigger
00000No trigger is enabled

Bits 4:0 – TRGSRC18[4:0] Common Interrupt Enable for Corresponding Analog Inputs bits

ValueDescription
11111ADTRG31 (PPS input)
11110PTG
Value Description
11101CLC2
11100CLC1
11011APWM4 Trigger 2
11010APWM4 Trigger 1
11001APWM3 Trigger 2
11000APWM3 Trigger 1
10111APWM2 Trigger 2
10110APWM2 Trigger 1
10101APWM1 Trigger 2
10100APWM1 Trigger 1
10011PWM8 Trigger 2
10010PWM8 Trigger 1
10001PWM7 Trigger 2
10000PWM7 Trigger 1
01111PWM6 Trigger 2
01110PWM6 Trigger 1
01101PWM5 Trigger 2
01100PWM5 Trigger 1
01011PWM4 Trigger 2
01010PWM4 Trigger 1
01001PWM3 Trigger 2
01000PWM3 Trigger 1
00111PWM2 Trigger 2
00110PWM2 Trigger 1
00101PWM1 Trigger 2
00100PWM1 Trigger 1
00011Reserved
00010Level software trigger
00001Common software trigger
00000No trigger is enabled

13.4.33 ADC Channel Trigger 5 Selection Register Low

Name: ADTRIG5L

Offset: 0xB94

Bit 15 14 13 12 11 10 9 8

TRGRC21[4:0]
Access Reset 0 0 0 0 0R/W R/W R/W R/W R/W
Bit 7 6 5 4 3 2 1 0
TRGRC20[4:0]
Access Reset 0 0 0 0 0R/W R/W R/W R/W R/W

Bits 12:8 – TRGSRC21[4:0] Trigger Source Selection for Corresponding Analog Inputs bits

Value Description
11111ADTRG31 (PPS input)
11110PTG
11101CLC2
11100CLC1
11011APWM4 Trigger 2
11010APWM4 Trigger 1
11001APWM3 Trigger 2
11000APWM3 Trigger 1
10111APWM2 Trigger 2
10110APWM2 Trigger 1
10101APWM1 Trigger 2
10100APWM1 Trigger 1
10011PWM8 Trigger 2
10010PWM8 Trigger 1
10001PWM7 Trigger 2
10000PWM7 Trigger 1
01111PWM6 Trigger 2
01110PWM6 Trigger 1
01101PWM5 Trigger 2
01100PWM5 Trigger 1
01011PWM4 Trigger 2
01010PWM4 Trigger 1
01001PWM3 Trigger 2
01000PWM3 Trigger 1
00111PWM2 Trigger 2
00110PWM2 Trigger 1
00101PWM1 Trigger 2
00100PWM1 Trigger 1
00011Reserved
00010Level software trigger
00001Common software trigger
00000No trigger is enabled

Bits 4:0 – TRGSRC20[4:0] Common Interrupt Enable for Corresponding Analog Inputs bits

ValueDescription
11111ADTRG31 (PPS input)
11110PTG
Value Description
11101CLC2
11100CLC1
11011APWM4 Trigger 2
11010APWM4 Trigger 1
11001APWM3 Trigger 2
11000APWM3 Trigger 1
10111APWM2 Trigger 2
10110APWM2 Trigger 1
10101APWM1 Trigger 2
10100APWM1 Trigger 1
10011PWM8 Trigger 2
10010PWM8 Trigger 1
10001PWM7 Trigger 2
10000PWM7 Trigger 1
01111PWM6 Trigger 2
01110PWM6 Trigger 1
01101PWM5 Trigger 2
01100PWM5 Trigger 1
01011PWM4 Trigger 2
01010PWM4 Trigger 1
01001PWM3 Trigger 2
01000PWM3 Trigger 1
00111PWM2 Trigger 2
00110PWM2 Trigger 1
00101PWM1 Trigger 2
00100PWM1 Trigger 1
00011Reserved
00010Level software trigger
00001Common software trigger
00000No trigger is enabled

13.4.34 ADC Channel Trigger 5 Selection Register High

Name: ADTRIG5H

Offset: 0xB96

Bit 15 14 13 12 11 10 9 8

TRGRC23[4:0]
Access Reset 0 0 0 0 0R/W R/W R/W R/W R/W
Bit 7 6 5 4 3 2 1 0
TRGRC22[4:0]
Access Reset 0 0 0 0 0R/W R/W R/W R/W R/W

Bits 12:8 – TRGSRC23[4:0] Trigger Source Selection for Corresponding Analog Inputs bits

Value Description
11111ADTRG31 (PPS input)
11110PTG
11101CLC2
11100CLC1
11011APWM4 Trigger 2
11010APWM4 Trigger 1
11001APWM3 Trigger 2
11000APWM3 Trigger 1
10111APWM2 Trigger 2
10110APWM2 Trigger 1
10101APWM1 Trigger 2
10100APWM1 Trigger 1
10011PWM8 Trigger 2
10010PWM8 Trigger 1
10001PWM7 Trigger 2
10000PWM7 Trigger 1
01111PWM6 Trigger 2
01110PWM6 Trigger 1
01101PWM5 Trigger 2
01100PWM5 Trigger 1
01011PWM4 Trigger 2
01010PWM4 Trigger 1
01001PWM3 Trigger 2
01000PWM3 Trigger 1
00111PWM2 Trigger 2
00110PWM2 Trigger 1
00101PWM1 Trigger 2
00100PWM1 Trigger 1
00011Reserved
00010Level software trigger
00001Common software trigger
00000No trigger is enabled

Bits 4:0 – TRGSRC22[4:0] Common Interrupt Enable for Corresponding Analog Inputs bits

ValueDescription
11111ADTRG31 (PPS input)
11110PTG
Value Description
11101CLC2
11100CLC1
11011APWM4 Trigger 2
11010APWM4 Trigger 1
11001APWM3 Trigger 2
11000APWM3 Trigger 1
10111APWM2 Trigger 2
10110APWM2 Trigger 1
10101APWM1 Trigger 2
10100APWM1 Trigger 1
10011PWM8 Trigger 2
10010PWM8 Trigger 1
10001PWM7 Trigger 2
10000PWM7 Trigger 1
01111PWM6 Trigger 2
01110PWM6 Trigger 1
01101PWM5 Trigger 2
01100PWM5 Trigger 1
01011PWM4 Trigger 2
01010PWM4 Trigger 1
01001PWM3 Trigger 2
01000PWM3 Trigger 1
00111PWM2 Trigger 2
00110PWM2 Trigger 1
00101PWM1 Trigger 2
00100PWM1 Trigger 1
00011Reserved
00010Level software trigger
00001Common software trigger
00000No trigger is enabled

13.4.35 ADC Channel Trigger 6 Selection Register Low

Name: ADTRIG6L

Offset: 0xB98

Bit 15 14 13 12 11 10 9 8

TRGRC25[4:0]
Access Reset 0 0 0 0 0R/W R/W R/W R/W R/W
Bit 7 6 5 4 3 2 1 0
TRGRC24[4:0]
Access Reset 0 0 0 0 0R/W R/W R/W R/W R/W

Bits 12:8 – TRGSRC25[4:0] Trigger Source Selection for Corresponding Analog Inputs bits

Value Description
11111ADTRG31 (PPS input)
11110PTG
11101CLC2
11100CLC1
11011APWM4 Trigger 2
11010APWM4 Trigger 1
11001APWM3 Trigger 2
11000APWM3 Trigger 1
10111APWM2 Trigger 2
10110APWM2 Trigger 1
10101APWM1 Trigger 2
10100APWM1 Trigger 1
10011PWM8 Trigger 2
10010PWM8 Trigger 1
10001PWM7 Trigger 2
10000PWM7 Trigger 1
01111PWM6 Trigger 2
01110PWM6 Trigger 1
01101PWM5 Trigger 2
01100PWM5 Trigger 1
01011PWM4 Trigger 2
01010PWM4 Trigger 1
01001PWM3 Trigger 2
01000PWM3 Trigger 1
00111PWM2 Trigger 2
00110PWM2 Trigger 1
00101PWM1 Trigger 2
00100PWM1 Trigger 1
00011Reserved
00010Level software trigger
00001Common software trigger
00000No trigger is enabled

Bits 4:0 – TRGSRC24[4:0] Common Interrupt Enable for Corresponding Analog Inputs bits

ValueDescription
11111ADTRG31 (PPS input)
11110PTG
Value Description
11101CLC2
11100CLC1
11011APWM4 Trigger 2
11010APWM4 Trigger 1
11001APWM3 Trigger 2
11000APWM3 Trigger 1
10111APWM2 Trigger 2
10110APWM2 Trigger 1
10101APWM1 Trigger 2
10100APWM1 Trigger 1
10011PWM8 Trigger 2
10010PWM8 Trigger 1
10001PWM7 Trigger 2
10000PWM7 Trigger 1
01111PWM6 Trigger 2
01110PWM6 Trigger 1
01101PWM5 Trigger 2
01100PWM5 Trigger 1
01011PWM4 Trigger 2
01010PWM4 Trigger 1
01001PWM3 Trigger 2
01000PWM3 Trigger 1
00111PWM2 Trigger 2
00110PWM2 Trigger 1
00101PWM1 Trigger 2
00100PWM1 Trigger 1
00011Reserved
00010Level software trigger
00001Common software trigger
00000No trigger is enabled

13.4.36 ADC Channel Trigger 6 Selection Register High

Name: ADTRIG6H

Offset: 0xB9A

Bit 15 14 13 12 11 10 9 8

TRGRC27[4:0]
Access Reset 0 0 0 0 0R/W R/W R/W R/W R/W
Bit 7 6 5 4 3 2 1 0
TRGRC26[4:0]
Access Reset 0 0 0 0 0R/W R/W R/W R/W R/W

Bits 12:8 – TRGSRC27[4:0] Trigger Source Selection for Corresponding Analog Inputs bits

Value Description
11111ADTRG31 (PPS input)
11110PTG
11101CLC2
11100CLC1
11011APWM4 Trigger 2
11010APWM4 Trigger 1
11001APWM3 Trigger 2
11000APWM3 Trigger 1
10111APWM2 Trigger 2
10110APWM2 Trigger 1
10101APWM1 Trigger 2
10100APWM1 Trigger 1
10011PWM8 Trigger 2
10010PWM8 Trigger 1
10001PWM7 Trigger 2
10000PWM7 Trigger 1
01111PWM6 Trigger 2
01110PWM6 Trigger 1
01101PWM5 Trigger 2
01100PWM5 Trigger 1
01011PWM4 Trigger 2
01010PWM4 Trigger 1
01001PWM3 Trigger 2
01000PWM3 Trigger 1
00111PWM2 Trigger 2
00110PWM2 Trigger 1
00101PWM1 Trigger 2
00100PWM1 Trigger 1
00011Reserved
00010Level software trigger
00001Common software trigger
00000No trigger is enabled

Bits 4:0 – TRGSRC26[4:0] Common Interrupt Enable for Corresponding Analog Inputs bits

ValueDescription
11111ADTRG31 (PPS input)
11110PTG
Value Description
11101CLC2
11100CLC1
11011APWM4 Trigger 2
11010APWM4 Trigger 1
11001APWM3 Trigger 2
11000APWM3 Trigger 1
10111APWM2 Trigger 2
10110APWM2 Trigger 1
10101APWM1 Trigger 2
10100APWM1 Trigger 1
10011PWM8 Trigger 2
10010PWM8 Trigger 1
10001PWM7 Trigger 2
10000PWM7 Trigger 1
01111PWM6 Trigger 2
01110PWM6 Trigger 1
01101PWM5 Trigger 2
01100PWM5 Trigger 1
01011PWM4 Trigger 2
01010PWM4 Trigger 1
01001PWM3 Trigger 2
01000PWM3 Trigger 1
00111PWM2 Trigger 2
00110PWM2 Trigger 1
00101PWM1 Trigger 2
00100PWM1 Trigger 1
00011Reserved
00010Level software trigger
00001Common software trigger
00000No trigger is enabled

13.4.37 ADC Channel Trigger 7 Selection Register Low

Name: ADTRIG7L

Offset: 0xB9C

Bit 15 14 13 12 11 10 9 8

TRGRC29[4:0]
Access Reset 0 0 0 0 0R/W R/W R/W R/W R/W
Bit 7 6 5 4 3 2 1 0
TRGRC28[4:0]
Access Reset 0 0 0 0 0R/W R/W R/W R/W R/W

Bits 12:8 – TRGSRC29[4:0] Trigger Source Selection for Corresponding Analog Inputs bits

Value Description
11111ADTRG31 (PPS input)
11110PTG
11101CLC2
11100CLC1
11011APWM4 Trigger 2
11010APWM4 Trigger 1
11001APWM3 Trigger 2
11000APWM3 Trigger 1
10111APWM2 Trigger 2
10110APWM2 Trigger 1
10101APWM1 Trigger 2
10100APWM1 Trigger 1
10011PWM8 Trigger 2
10010PWM8 Trigger 1
10001PWM7 Trigger 2
10000PWM7 Trigger 1
01111PWM6 Trigger 2
01110PWM6 Trigger 1
01101PWM5 Trigger 2
01100PWM5 Trigger 1
01011PWM4 Trigger 2
01010PWM4 Trigger 1
01001PWM3 Trigger 2
01000PWM3 Trigger 1
00111PWM2 Trigger 2
00110PWM2 Trigger 1
00101PWM1 Trigger 2
00100PWM1 Trigger 1
00011Reserved
00010Level software trigger
00001Common software trigger
00000No trigger is enabled

Bits 4:0 – TRGSRC28[4:0] Common Interrupt Enable for Corresponding Analog Inputs bits

ValueDescription
11111ADTRG31 (PPS input)
11110PTG
Value Description
11101CLC2
11100CLC1
11011APWM4 Trigger 2
11010APWM4 Trigger 1
11001APWM3 Trigger 2
11000APWM3 Trigger 1
10111APWM2 Trigger 2
10110APWM2 Trigger 1
10101APWM1 Trigger 2
10100APWM1 Trigger 1
10011PWM8 Trigger 2
10010PWM8 Trigger 1
10001PWM7 Trigger 2
10000PWM7 Trigger 1
01111PWM6 Trigger 2
01110PWM6 Trigger 1
01101PWM5 Trigger 2
01100PWM5 Trigger 1
01011PWM4 Trigger 2
01010PWM4 Trigger 1
01001PWM3 Trigger 2
01000PWM3 Trigger 1
00111PWM2 Trigger 2
00110PWM2 Trigger 1
00101PWM1 Trigger 2
00100PWM1 Trigger 1
00011Reserved
00010Level software trigger
00001Common software trigger
00000No trigger is enabled

13.4.38 ADC Channel Trigger 7 Selection Register High

Name: ADTRIG7H

Offset: 0xB9E

Bit 15 14 13 12 11 10 9 8

TRGRC31[4:0]
Access Reset 0 0 0 0 0R/W R/W R/W R/W R/W
Bit 7 6 5 4 3 2 1 0
TRGRC30[4:0]
Access Reset 0 0 0 0 0R/W R/W R/W R/W R/W

Bits 12:8 – TRGSRC31[4:0] Trigger Source Selection for Corresponding Analog Inputs bits

Value Description
11111ADTRG31 (PPS input)
11110PTG
11101CLC2
11100CLC1
11011APWM4 Trigger 2
11010APWM4 Trigger 1
11001APWM3 Trigger 2
11000APWM3 Trigger 1
10111APWM2 Trigger 2
10110APWM2 Trigger 1
10101APWM1 Trigger 2
10100APWM1 Trigger 1
10011PWM8 Trigger 2
10010PWM8 Trigger 1
10001PWM7 Trigger 2
10000PWM7 Trigger 1
01111PWM6 Trigger 2
01110PWM6 Trigger 1
01101PWM5 Trigger 2
01100PWM5 Trigger 1
01011PWM4 Trigger 2
01010PWM4 Trigger 1
01001PWM3 Trigger 2
01000PWM3 Trigger 1
00111PWM2 Trigger 2
00110PWM2 Trigger 1
00101PWM1 Trigger 2
00100PWM1 Trigger 1
00011Reserved
00010Level software trigger
00001Common software trigger
00000No trigger is enabled

Bits 4:0 – TRGSRC30[4:0] Common Interrupt Enable for Corresponding Analog Inputs bits

ValueDescription
11111ADTRG31 (PPS input)
11110PTG
Value Description
11101CLC2
11100CLC1
11011APWM4 Trigger 2
11010APWM4 Trigger 1
11001APWM3 Trigger 2
11000APWM3 Trigger 1
10111APWM2 Trigger 2
10110APWM2 Trigger 1
10101APWM1 Trigger 2
10100APWM1 Trigger 1
10011PWM8 Trigger 2
10010PWM8 Trigger 1
10001PWM7 Trigger 2
10000PWM7 Trigger 1
01111PWM6 Trigger 2
01110PWM6 Trigger 1
01101PWM5 Trigger 2
01100PWM5 Trigger 1
01011PWM4 Trigger 2
01010PWM4 Trigger 1
01001PWM3 Trigger 2
01000PWM3 Trigger 1
00111PWM2 Trigger 2
00110PWM2 Trigger 1
00101PWM1 Trigger 2
00100PWM1 Trigger 1
00011Reserved
00010Level software trigger
00001Common software trigger
00000No trigger is enabled

13.4.39 ADC Digital Comparator x Control Register (x = 0, 1, 2, 3)

Name: ADCMPxCON

Offset: 0xBA0, 0xBA4, 0xBA8, 0xBAC

Legend: HC = Hardware Clearable bit; HS = Hardware Settable bit; HSC = Hardware Settable/Clearable bit

Bit 15 14 13 12 11 10 9 8

CHN[4:0]
Access Reset 0 0 0 0 0HSC/R HSC/R HSC/R HSC/R HSC/R

Bit 76543210

CMPENIESTATBTWNHIHIHILOLOHILOLO
AccessR/WR/WHS/HC/RR/WR/WR/WR/WR/W
Reset0 0 0 0 0 0 0

Bits 12:8 – CHNL[4:0] Input Channel Number bits

ValueDescription
11111AN31
11110AN30
11101Band Gap, 1.2V (AN29)
11100Temperature Sensor (AN28)
11011 V_DD Core (AN27)
11010AN26
...
00000ANO

Bit 7 – CMPEN Comparator Enable bit

ValueDescription
1Comparator is enabled
0Comparator is disabled and the STAT status bit is cleared

Bit 6 - IE Comparator Common ADC Interrupt Enable bit

ValueDescription
1Common ADC interrupt will be generated if the comparator detects a comparison event instead of digital comparator interrupt
0ADC interrupt will not be generated for the comparator

Bit 5 – STAT Comparator Event Status bit
This bit is cleared by hardware when the channel number is read from the CHNL[4:0] bits.

ValueDescription
1A comparison event has been detected since the last read of the CHNL[4:0] bits
0A comparison event has not been detected since the last read of the CHNL[4:0] bits

Bit 4 - BTWN Between Low/High Comparator Event bit

ValueDescription
1Generates a comparator event when ADCMPxLO ≤ ADCBUFx < ADCMPxHI
0Does not generate a digital comparator event when ADCMPxLO ≤ ADCBUFx < ADCMPxHI

Bit 3 - HIHI High/High Comparator Event bit

ValueDescription
1Generates a digital comparator event when ADCBUFx ≥ ADCMPxHI
0Does not generate a digital comparator event when ADCBUFx ≥ ADCMPxHI
Value Description
1Generates a digital comparator event when ADCBUFx < ADCMPxHI
0Does not generate a digital comparator event when ADCBUFx < ADCMPxHI

Bit 2 - HILO High/Low Comparator Event bit

Bit 1 - LOHI Low/High Comparator Event bit

Value Description
1Generates a digital comparator event when ADCBUFx ≥ ADCMPxLO
0Does not generate a digital comparator event when ADCBUFx ≥ ADCMPxLO

Bit 0 - LOLO Low/Low Comparator Event bit

Value Description
1Generates a digital comparator event when ADCBUFx < ADCMPxLO
0Does not generate a digital comparator event when ADCBUFx < ADCMPxLO

13.4.40 ADC Level-Sensitive Trigger Control Register Low

Name: ADLVLTRGL

Offset: 0xBDO

Bit 15 14 13 12 11 10 9 8

LVLEN[15:8]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

LVLEN[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 15:0 – LVLEN[15:0] Level Trigger for Corresponding Analog Input Enable bits

Value Description
1Input trigger is level-sensitive
0Input trigger is edge-sensitive

13.4.41 ADC Level-Sensitive Trigger Control Register High

Name: ADLVLTRGH

Offset: 0xBD2

Bit 15 14 13 12 11 10 9 8

LVLEN[27:24]
Access Reset 0 0 0 0R/W R/W R/W R/W

Bit 76543210

LVLEN[23:16]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 11:0 – LVLEN[27:16] Level Trigger for Corresponding Analog Input Enable bits

ValueDescription
1Input trigger is level-sensitive
0Input trigger is edge-sensitive

13.4.42 Dedicated ADC Core x Control Register Low (x = 0 to 3)

Name: ADCORExL

Offset: 0xBD4, 0xBD8, 0xBDC, 0xBEO

Bit 15 14 13 12 11 10 9 8

SAMC[9:8]
Access Reset 0 0R/W R/W

Bit 76543210

SAMC[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 00000000

Bits 9:0 – SAMC[9:0] Dedicated ADC Core x Conversion Delay Selection bits

These bits determine the time between the trigger event and the start of conversion in the number of the Core Clock Periods ( T_ADCORE ). During this time, the ADC Core x still continues sampling. This feature is enabled by the SAMCxEN bits in the ADCON4L register.

ValueDescription
1111111111 1025 T_ADCORE
. . .
0000000001 3 T_ADCORE
0000000000 2 T_ADCORE

13.4.43 Dedicated ADC Core x Control Register High (x = 0 to 3)

Name: ADCORExH

Offset: 0xBD6, 0xBDA, 0xBDE, 0xBE2

Note:

  1. For the 6-bit ADC core resolution (RES[1:0] = 00), the EISEL[2:0] bits settings, from '100' to '111', are not valid and should not be used. For the 8-bit ADC core resolution (RES[1:0] = 01), the EISEL[2:0] bits settings, '110' and '111', are not valid and should not be used.

Bit 15 14 13 12 11 10 9 8

EISEL[2:0] RES[1:0]
Access ResetR/W R/W R/W R/W R/W
0 0 0 0 0

Bit 76543210

ADCS[6:0]
AccessR/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0

Bits 12:10 – EISEL[2:0] ADC Core x Early Interrupt Time Selection bits

ValueDescription
111Early interrupt is set and interrupt is generated 8 T_ADCORE clocks prior to when data are ready
110Early interrupt is set and interrupt is generated 7 T_ADCORE clocks prior to when data are ready
101Early interrupt is set and interrupt is generated 6 T_ADCORE clocks prior to when data are ready
100Early interrupt is set and interrupt is generated 5 T_ADCORE clocks prior to when data are ready
011Early interrupt is set and interrupt is generated 4 T_ADCORE clocks prior to when data are ready
010Early interrupt is set and interrupt is generated 3 T_ADCORE clocks prior to when data are ready
001Early interrupt is set and interrupt is generated 2 T_ADCORE clocks prior to when data are ready
000Early interrupt is set and interrupt is generated 1 T_ADCORE clock prior to when data are ready

Bits 9:8 – RES[1:0] ADC Core x Resolution Selection bits

ValueDescription
1112-bit resolution
1010-bit resolution
018-bit resolution^(1)
006-bit resolution^(1)

Bits 6:0 – ADCS[6:0] ADC Core x Input Clock Divider bits

These bits determine the number of Source Clock Periods ( T_CORESRC ) for one Core Clock Period ( T_ADCORE ).

ValueDescription
1111111254 Source Clock Periods
. . .
00000116 Source Clock Periods
00000104 Source Clock Periods
00000012 Source Clock Periods
00000002 Source Clock Periods

13.4.44 ADC Early Interrupt Enable Register Low

Name: ADEIEL

Offset: 0xBFO

Bit 15 14 13 12 11 10 9 8

EIEN[15:8]
AccessR/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0
Bit7 6 5 4 3 2 1 0
EIEN[7:0]
AccessR/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0

Bits 15:0 – EIEN[15:0] Early Interrupt Enable for Corresponding Analog Input bits

Value Description
1Early interrupt is enabled for the channel
0Early interrupt is disabled for the channel

13.4.45 ADC Early Interrupt Enable Register High

Name: ADEIEH

Offset: 0xBF2

Bit 15 14 13 12 11 10 9 8

EIEN[31:24]
AccessR/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0
Bit7 6 5 4 3 2 1 0
EIEN[23:16]
AccessR/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0

Bits 15:0 – EIEN[31:16] Early Interrupt Enable for Corresponding Analog Input bits

Value Description
1Early interrupt is enabled for the channel
0Early interrupt is disabled for the channel

13.4.46 ADC Early Interrupt Status Register Low

Name: ADEISTATL

Offset: 0xBF8

Bit 15 14 13 12 11 10 9 8

EISTAT[15:8]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

EISTAT[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 15:0 – EISTAT[15:0] Early Interrupt Status for Corresponding Analog Input bits

Value Description
1Early interrupt was generated
0Early interrupt was not generated since the last ADCBUFx read

13.4.47 ADC Early Interrupt Status Register High

Name: ADEISTATH

Offset: 0xBFA

Bit 15 14 13 12 11 10 9 8

EISTAT[31:24]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

EISTAT[23:16]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 15:0 – EISTAT[31:16] Early Interrupt Status for Corresponding Analog Input bits

Value Description
1Early interrupt was generated
0Early interrupt was not generated since the last ADCBUFx read

13.4.48 ADC Control Register 5 Low

Name: ADCON5L

Offset: 0xC00

Legend: HSC = Hardware Settable/Clearable bit

Bit 15 14 13 12 11 10 9 8

SHRRDYC3RDY C2RDY C1RDY CORDY
AccessR/HSC R/WR/W R/W R/W
Reset00 0 0 0

Bit 76543210

SHRPWRC3PWRC2PWRC1PWRC0PWR
AccessR/WR/W R/W R/W R/W
Reset00 0 0 0

Bit 15 – SHRRDY Shared ADC Core Ready Flag bit

ValueDescription
1ADC core is powered and ready for operation
0ADC core is not ready for operation

Bit 11 - C3RDY Dedicated ADC Core 3 Ready Flag bit

ValueDescription
1ADC Core 3 is powered and ready for operation
0ADC Core 3 is not ready for operation

Bit 10 - C2RDY Dedicated ADC Core 2 Ready Flag bit

ValueDescription
1ADC Core 2 is powered and ready for operation
0ADC Core 2 is not ready for operation

Bit 9 – C1RDY Dedicated ADC Core 1 Ready Flag bit

ValueDescription
1ADC Core 1 is powered and ready for operation
0ADC Core 1 is not ready for operation

Bit 8 – CORDY Dedicated ADC Core 0 Ready Flag bit

ValueDescription
1ADC Core 0 is powered and ready for operation
0ADC Core 0 is not ready for operation

Bit 7 – SHRPWR Shared ADC Core Power Enable bit

ValueDescription
1ADC core is powered
0ADC core is off

Bit 3 - C3PWR Dedicated ADC Core 3 Power Enable bit

ValueDescription
1ADC Core 3 is powered
0ADC Core 3 off

Bit 2 – C2PWR Dedicated ADC Core 2 Power Enable bit

ValueDescription
1ADC Core 2 is powered
0ADC Core 2 is off

Bit 1 – C1PWR Dedicated ADC Core 1 Power Enable bit

Value Description
1ADC Core 1 is powered
0ADC Core 1 is off

Bit 0 - COPWR Dedicated ADC Core 0 Power Enable bit

Value Description
1ADC Core 0 is powered
0ADC Core 0 is off

13.4.49 ADC Control Register 5 High

Name: ADCON5H

Offset: 0xC02

Bit 15 14 13 12 11 10 9 8

WARMTIME[3:0]
Access Reset 0 0 0 0R/W R/W R/W R/W

Bit 76543210

SHRCIEC3CIEC2CIEC1CIEC0CIE
AccessR/WR/W R/W R/W R/W
Reset 00 0 0 0

Bits 11:8 – WARMTIME[3:0] ADC Dedicated Core Power-up Delay bits

These bits determine the power-up delay in the number of the Core Source Clock Periods ( T_CORESRC ) for all ADC cores.

ValueDescription
111132768 Source Clock Periods
111016384 Source Clock Periods
11018192 Source Clock Periods
11004096 Source Clock Periods
10112048 Source Clock Periods
10101024 Source Clock Periods
1001512 Source Clock Periods
1000256 Source Clock Periods
0111128 Source Clock Periods
011064 Source Clock Periods
010132 Source Clock Periods
010016 Source Clock Periods
00xx16 Source Clock Periods

Bit 7 – SHRCIE Shared ADC Core Ready Common Interrupt Enable bit

ValueDescription
1Common interrupt will be generated when ADC core is powered and ready for operation
0Common interrupt is disabled for an ADC core ready event

Bit 3 – C3CIE Dedicated ADC Core 3 Ready Common Interrupt Enable bit

ValueDescription
1Common interrupt will be generated when ADC Core 3 is powered and ready for operation
0Common interrupt is disabled for an ADC Core 3 ready event

Bit 2 – C2CIE Dedicated ADC Core 2 Ready Common Interrupt Enable bit

ValueDescription
1Common interrupt will be generated when ADC Core 2 is powered and ready for operation
0Common interrupt is disabled for an ADC Core 2 ready event

Bit 1 – C1CIE Dedicated ADC Core 1 Ready Common Interrupt Enable bit

ValueDescription
1Common interrupt will be generated when ADC Core 1 is powered and ready for operation
0Common interrupt is disabled for an ADC Core 1 ready event

Bit 0 – COCIE Dedicated ADC Core 0 Ready Common Interrupt Enable bit

Value Description

1Common interrupt will be generated when ADC Core 0 is powered and ready for operation
0Common interrupt is disabled for an ADC Core 0 ready event

13.4.50 ADC Buffer x Register

Name: ADCBUFx

Offset: 0xC0C, 0xC0E, 0xC10, 0xC12, 0xC14, 0xC16, 0xC18, 0xC1A, 0xC1C, 0xC1E, 0xC20, 0xC22, 0xC24, 0xC26, 0xC28, 0xC2A, 0xC2C, 0xC2E, 0xC30, 0xC32, 0xC34, 0xC36, 0xC38, 0xC3A, 0xC3C, 0xC3E, 0xC40, 0xC42, 0xC44, 0xC46, 0xC48, 0xC4A

Bit 15 14 13 12 11 10 9 8

ADCBUFx[15:8]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

ADCBUFx[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 15:0 - ADCBUFx[15:0] Buffer Data bits

14. High-Speed Analog Comparator with Slope Compensation DAC

Notes:

  1. This data sheet summarizes the features of the dsPIC33CK1024MP710 family of devices. It is not intended to be a comprehensive reference source. To complement the information in this data sheet, refer to "High-Speed Analog Comparator with Slope Compensation DAC" (www.microchip.com/DS70005280).
  2. Some registers and associated bits described in this section may not be available on all devices. Refer to 4. Memory Organization in this data sheet for device-specific register and bit information.

The high-speed analog comparator module provides a method to monitor voltage, current and other critical signals in a power conversion application that may be too fast for the CPU and ADC to capture. The analog comparator module can be used to implement Peak Current mode control, Critical Conduction mode (variable frequency) and Hysteretic Control mode.

14.1 Overview

The high-speed analog comparator module is comprised of a high-speed comparator, Pulse Density Modulation (PDM) DAC and a slope compensation unit. The slope compensation unit provides a user-defined slope which can be used to alter the DAC output. This feature is useful in applications, such as Peak Current mode control, where slope compensation is required to maintain the stability of the power supply. The user simply specifies the direction and rate of change for the slope compensation, and the output of the DAC is modified accordingly.

The DAC consists of a PDM unit, followed by a digitally controlled multiphase RC filter. The PDM unit uses a phase accumulator circuit to generate an output stream of pulses. The density of the pulse stream is proportional to the input data value, relative to the maximum value supported by the bit width of the accumulator. The output pulse density is representative of the desired output voltage. The pulse stream is filtered with an RC filter to yield an analog voltage. The output of the DAC is connected to the negative input of the comparator. The positive input of the comparator can be selected using a MUX from the input pins. The comparator provides a high-speed operation with a typical delay of 15 ns.

The output of the comparator is processed by the pulse stretcher and the digital filter blocks, which prevent comparator response to unintended fast transients in the inputs. Figure 14-1 shows a block diagram of the high-speed analog comparator module. The DAC module can be operated in one of three modes: Slope Generation mode, Hysteretic mode and Triangle Wave mode. Each of these modes can be used in a variety of power supply applications.

Note: This device supports two DACOUT pins, DACOUT1 and DACOUT2. DAC instances, DAC1, DAC2 and DAC3, are associated with DACOUT1. DAC instances, DAC4, DAC5 and DAC6, are associated with DACOUT2. The DACOUTx pin can only be associated with a single DAC output at any given time. If more than one DACOEN bit is set, the DACOUTx pin will be a combination of the signals.

Figure 14-1. High-Speed Analog Comparator Module Block Diagram
Microchip dsPIC33CK1024MP708 - Overview - 1

flowchart
graph TD
    A["INSEL[2:0"]] --> B["CMPxD"]
    A --> C["CMPxC"]
    A --> D["CMPxB"]
    A --> E["CMPxA"]
    B --> F["CMPx"]
    C --> F
    D --> F
    E --> F
    F --> G["+"]
    G --> H["CMPPOL"]
    H --> I["0"]
    I --> J["Pulse Stretcher and Digital Filter"]
    J --> K["PWM Trigger"]
    J --> L["Status"]
    J --> M["IRQ"]
    N["Slope Generator"] --> O["n"]
    O --> P["PDM DAC"]
    P --> Q["DACx"]
    Q --> R["Buffer Amplifier"]
    R --> S["DACOUTx"]
    T["SLPxDAT"] --> U["n"]
    U --> V["DACxDATH"]
    V --> W["DACxDATL"]
    X["DACxDATL"] --> Y["n"]

Note: n = 16

14.2 Features Overview

• Six Rail-to-Rail Analog Comparators
- Up to Four Selectable Input Sources per Comparator:

- Four external inputs

• Programmable Comparator Hysteresis

• Programmable Output Polarity

- Interrupt Generation Capability

- Dedicated Pulse Density Modulation DAC for each Analog Comparator: - PDM unit followed by a digitally controlled multimode multipole RC filter

- Multimode Multipole RC Output Filter: - Transition mode: Provides the fastest response - Fast mode: For tracking DAC slopes - Steady-State mode: Provides 12-bit resolution

- Slope Compensation along with each DAC:

– Slope Generation mode
- Hysteretic Control mode
- Triangle Wave mode

- Functional Support for the High-Speed PWM module which Includes: - PWM duty cycle control - PWM period control

- PWM Fault detect

14.3 DAC Control Registers

The DACCTRL1L and DACCTRL2H/L registers are common configuration registers for DAC modules. The DACxCON, DACxDAT, SLPxCON and SLPxDAT registers specify the operation of individual modules.

14.4 DAC Control Registers

OffsetNameBit Pos. 7 6 54 3 2 1 0
0x0C58DACCTRL1L15:8DACONDACSIDL
7:0CLKSEL[1:0]CLKDIV[1:0]FCLKDIV[2:0]
0x0C5A...0x0C5BReserved
0x0C5CDACCTRL2L15:8TMODTIME[9:0]
7:0TMODTIME[9:0]
0x0C5EDACCTRL2H15:8SSTIME[9:0]
7:0SSTIME[9:0]
0x0C60DAC1CONL15:8DACENIRQM[1:0]CBEDACOENFLTREN
7:0CMPSTATCMPPOLINSEL[2:0]HYSPOLHYSSEL[1:0]
0x0C62DAC1CONH15:8TMCB[9:0]
7:0TMCB[9:0]
0x0C64DAC1DATL15:8DACLOW[11:0]
7:0DACLOW[11:0]
0x0C66DAC1DATH15:8DACDAT[11:0]
7:0DACDAT[11:0]
0x0C68SLP1CONL15:8HCFSEL[3:0]SLPSTOPA[3:0]
7:0SLPSTOPB[3:0]SLPSTRT[3:0]
0x0C6ASLP1CONH15:8SLOPENHMETWMEPSE
7:0
0x0C6CSLP1DAT15:8SLPDAT[15:8]
7:0SLPDAT[7:0]
0x0C6E...0x0C6FReserved
0x0C70DAC2CONL15:8DACENIRQM[1:0]CBEDACOENFLTREN
7:0CMPSTATCMPPOLINSEL[2:0]HYSPOLHYSSEL[1:0]
0x0C72DAC2CONH15:8TMCB[9:0]
7:0TMCB[9:0]
0x0C74DAC2DATL15:8DACLOW[11:0]
7:0DACLOW[11:0]
0x0C76DAC2DATH15:8DACDAT[11:0]
7:0DACDAT[11:0]
0x0C78SLP2CONL15:8HCFSEL[3:0]SLPSTOPA[3:0]
7:0SLPSTOPB[3:0]SLPSTRT[3:0]
0x0C7ASLP2CONH15:8SLOPENHMETWMEPSE
7:0
0x0C7CSLP2DAT15:8SLPDAT[15:8]
7:0SLPDAT[7:0]
0x0C7E...0x0C7FReserved
0x0C80DAC3CONL15:8DACENIRQM[1:0]CBEDACOENFLTREN
7:0CMPSTATCMPPOLINSEL[2:0]HYSPOLHYSSEL[1:0]
0x0C82DAC3CONH15:8TMCB[9:0]
7:0TMCB[9:0]
0x0C84DAC3DATL15:8DACLOW[11:0]
7:0DACLOW[11:0]
0x0C86DAC3DATH15:8DACDAT[11:0]
7:0DACDAT[11:0]
0x0C88SLP3CONL15:8HCFSEL[3:0]SLPSTOPA[3:0]
7:0SLPSTOPB[3:0]SLPSTRT[3:0]
0x0C8ASLP3CONH15:8SLOPENHMETWMEPSE
7:0
0x0C8CSLP3DAT15:8SLPDAT[15:8]
7:0SLPDAT[7:0]

......continued

OffsetName Bit Pos. 7 6 5 4 3 2 1 0
0xOC8E ... 0xOC8FReserved
0xOC90 DAC4CONL15:8 DACEN IRQM[1:0] CBE DACOEN FLTREN
7:0 CMPSTAT CMPPOL INSEL[2:0] HYSPOL HYSSEL[1:0]
0xOC92 DAC4CONH15:8TMCB[9:0]
7:0TMCB[9:0]
0xOC94 DAC4DATL15:8DACLOW[11:0]
7:0DACLOW[11:0]
0xOC96 DAC4DATH15:8DACDAT[11:0]
7:0DACDAT[11:0]
0xOC98 SLP4CONL15:8HCFSEL[3:0]SLPSTOPA[3:0]
7:0SLPSTOPB[3:0]SLPSTRT[3:0]
0xOC9A SLP4CONH15:8SLOPENHMETWMEPSE
7:0
0xOC9CSLP4DAT15:8SLPDAT[15:8]
7:0SLPDAT[7:0]
0xOC9E ... 0xOC9FReserved
0xOCA0DAC5CONL15:8 DACEN IRQM[1:0] CBE DACOEN FLTREN
7:0 CMPSTAT CMPPOL INSEL[2:0] HYSPOL HYSSEL[1:0]
0xOCA2 DAC5CONH15:8TMCB[9:0]
7:0TMCB[9:0]
0xOCA4 DAC5DATL15:8DACLOW[11:0]
7:0DACLOW[11:0]
0xOCA6DAC5DATH15:8DACDAT[11:0]
7:0DACDAT[11:0]
0xOCA8 SLP5CONL15:8HCFSEL[3:0]SLPSTOPA[3:0]
7:0SLPSTOPB[3:0]SLPSTRT[3:0]
0xOCAASLP5CONH15:8SLOPENHMETWMEPSE
7:0
0xOCACSLP5DAT15:8SLPDAT[15:8]
7:0SLPDAT[7:0]
0xOCAE ... 0xOCAFReserved
0xOCBODAC6CONL15:8 DACEN IRQM[1:0] CBE DACOEN FLTREN
7:0 CMPSTAT CMPPOL INSEL[2:0] HYSPOL HYSSEL[1:0]
0xOCB2 DAC6CONH15:8TMCB[9:0]
7:0TMCB[9:0]
0xOCB4DAC6DATL15:8DACLOW[11:0]
7:0DACLOW[11:0]
0xOCB6 DAC6DATH15:8DACDAT[11:0]
7:0DACDAT[11:0]
0xOCB8SLP6CONL15:8HCFSEL[3:0]SLPSTOPA[3:0]
7:0SLPSTOPB[3:0]SLPSTRT[3:0]
0xOCBASLP6CONH15:8SLOPENHMETWMEPSE
7:0
0xOCBCSLP6DAT15:8SLPDAT[15:8]
7:0SLPDAT[7:0]

14.4.1 DAC Control 1 Low Register

Name: DACCTRL1L

Offset: 0xC58

Note:

  1. These bits should only be changed when DACON = 0 to avoid unpredictable behavior.
Bit 15 14 13 12 11 10 9 8
DACON DACSIDL
AccessR/W R/W
Reset00
Bit7 6 5 4 3 2 1 0
CLKSEL[1:0]CLKDIV[1:0]FCLKDIV[2:0]
AccessR/W R/WR/W R/W R/WR/W R/W
Reset0 0 0 00 0 0

Bit 15 – DACON Common DAC Module Enable bit

ValueDescription
1Enables DAC modules
0Disables DAC modules and disables FSCM clocks to reduce power consumption; any pending Slope mode and/or Underflow conditions are cleared

Bit 13 - DACSIDL DAC Stop in Idle Mode bit

ValueDescription
1Discontinues module operation when device enters Idle mode
0Continues module operation in Idle mode

Bits 7:6 - CLKSEL[1:0] DAC Clock Source Select bits ^(1)

ValueDescription
11 F_PLLO
10 AF_PLLO
01 F_VCO/2
00 AF_VCO/2

Bits 5:4 - CLKDIV[1:0] DAC Clock Divider bits ^(1)

ValueDescription
11Divide-by-4
10Divide-by-3 (non-uniform duty cycle)
01Divide-by-2
001x

Bits 2:0 - FCLKDIV[2:0] Comparator Filter Clock Divider bits

ValueDescription
111Divide-by-8
110Divide-by-7
101Divide-by-6
100Divide-by-5
011Divide-by-4
010Divide-by-3
001Divide-by-2
0001x

14.4.2 DAC Control 2 Low Register

Name: DACCTRL2L

Offset: 0xC5C

Bit 15 14 13 12 11 10 9 8

TMODTIME[9:0]
Access Reset 0 0R/W R/W

Bit 76543210

TMODTIME[9:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 01010101

Bits 9:0 – TMODTIME[9:0] Transition Mode Duration bits

14.4.3 DAC Control 2 High Register

Name: DACCTRL2H

Offset: 0xC5E

Note:

  1. The value for SSTIME[9:0] should be greater than the TMODTIME[9:0] value.

Bit 15 14 13 12 11 10 9 8

S$TIME[9:0]
Access Reset 0 0R/W R/W
Bit 76543210
SSTIME[9:0]
Access Reset 10001010R/W R/W R/W R/W R/W R/W R/W R/W

Bits 9:0 – SSTIME[9:0] Time from Start of Transition Mode until Steady-State Filter is Enabled bits ^(1)

14.4.4 DACx Control Low Register

Name: DACxCONL

Offset: 0xC60, 0xC70, 0xC80, 0xC90, 0xC A0, 0xC B0

Bit 15 14 13 12 11 10 9 8

DACEN IRQM[1:0] CBE DACOEN FLTREN
AccessR/WR/WR/WR/WR/WR/W
Reset0 0 00 0 0

Bit 76543210

CMPSTAT CMPPOLINSEL[2:0]HYSPOL HYSSEL[1:0]
AccessR/WR/WR/WR/WR/WR/WR/WR/W
Reset0 0 0 0 0 0 0 0

Bit 15 – DACEN Individual DACx Module Enable bit

ValueDescription
1Enables DACx module
0Disables DACx module to reduce power consumption; any pending Slope mode and/or Underflow conditions are cleared

Bits 14:13 - IRQM[1:0] Interrupt Mode select bits

ValueDescription
11Generates an interrupt on either a rising or falling edge detect
10Generates an interrupt on a falling edge detect
01Generates an interrupt on a rising edge detect
00Interrupts are disabled

Bit 10 – CBE Comparator Blank Enable bit

ValueDescription
1Enables the analog comparator output to be blanked (gated off) during the recovery transition following the completion of a slope operation
0Disables the blanking signal to the analog comparator; therefore, the analog comparator output is always active

Bit 9 – DACOEN DACx Output Buffer Enable bit

ValueDescription
1DACx analog voltage is connected to the DACOUTx pin
0DACx analog voltage is not connected to the DACOUTx pin

Bit 8 – FLTREN Comparator Digital Filter Enable bit

ValueDescription
1Digital filter is enabled
0Digital filter is disabled

Bit 7 – CMPSTAT Comparator Status bits

Bit 6 – CMPPOL Comparator Output Polarity Control bit

ValueDescription
1Output is inverted
0Output is noninverted

Bits 5:3 – INSEL[2:0] Comparator Input Source Select bits

ValueDescription
111Reserved
110Reserved
Value Description
101Reserved
100Reserved
011CMPxD input pin
010CMPxC input pin
001CMPxB input pin
000CMPxA input pin

Bit 2 – HYSPOL Comparator Hysteresis Polarity Select bit

Value Description
1Hysteresis is applied to the falling edge of the comparator input
0Hysteresis is applied to the rising edge of the comparator input

Bits 1:0 – HYSSEL[1:0] Comparator Hysteresis Select bits

Value Description
1145 mv hysteresis
1030 mv hysteresis
0115 mv hysteresis
00No hysteresis is selected

14.4.5 DACx Control High Register

Name: DACxCONH

Offset: 0xC62, 0xC72, 0xC82, 0xC92, 0xC A2, 0xCB2

Bit 15 14 13 12 11 10 9 8

TMCB[9:0]
Access Reset 0 0R/W R/W

Bit 76543210

TMCB[9:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 9:0 – TMCB[9:0] DACx Leading-Edge Blanking bits

These register bits specify the blanking period for the comparator, following changes to the DAC output during Change-of-State (COS), for the input signal selected by the HCFSEL[3:0] bits in SLPxCONL.

14.4.6 DACx Data Low Register

Name: DACxDATL

Offset: 0xC64, 0xC74, 0xC84, 0xC94, 0xC4, 0xCB4

Bit 15 14 13 12 11 10 9 8

DACLOW[11:0]
Access Reset 0 0 0 0R/W R/W R/W R/W

Bit 76543210

DACLOW[11:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 11:0 – DACLOW[11:0] DACx Low Data bits

In Hysteretic mode, Slope Generator mode and Triangle mode, this register specifies the low data value and/or limit for the DACx module. Valid values are from 205 to 3890.

14.4.7 DACx Data High Register

Name: DACxDATH

Offset: 0xC66, 0xC76, 0xC86, 0xC96, 0xCAC6, 0xCB6

Bit 15 14 13 12 11 10 9 8

DACDAT[11:0]
Access Reset 0 0 0 0R/W R/W R/W R/W

Bit 76543210

DACDAT[11:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 11:0 – DACDAT[11:0] DACx High Data bits

This register specifies the high DACx data value. Valid values are from 205 to 3890.

14.4.8 DAC Slope x Control Low Register

Name: SLPxCONL

Offset: 0xC68, 0xC78, 0xC88, 0xC98, 0xCA8, 0xCB8

Bit 15 14 13 12 11 10 9 8

HCFSEL[3:0] SLPSTOPA[3:0]
AccessR/W R/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0

Bit 76543210

SLPSTOPB[3:0] SLPSTRT[3:0]
AccessR/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0

Bits 15:12 - HCFSEL[3:0] Hysteretic Comparator Function Input Select bits

The selected input signal controls the switching between the DACx high limit (DACxDATH) and the DACx low limit (DACxDATL) as the data source for the PDM DAC. It modifies the polarity of the comparator, and the rising and falling edges initiate the start of the LEB counter (TMCB[9:0] bits in DACxCONH).

Input SelectionSource
1111 1
1100 0
1011 0
1010 0
1001 0
1000PWM8H
0111PWM7H
0110PWM6H
0101PWM5H
0100PWM4H
0011PWM3H
0010PWM2H
0001PWM1H
0000 0

Bits 11:8 – SLPSTOPA[3:0] Slope Stop A Signal Select bits

The selected Slope Stop A signal is logically OR'd with the selected Slope Stop B signal to terminate the slope function.

Slope Stop A Signal SelectionSource
1111-1001 1
1000PWM8 Trigger 2
0111PWM7 Trigger 2
0110PWM6 Trigger 2
0101PWM5 Trigger 2
0100PWM4 Trigger 2
0011PWM3 Trigger 2
0010PWM2 Trigger 2
0001PWM1 Trigger 2
0000 0

Bits 7:4 – SLPSTOPB[3:0] Slope Stop B Signal Select bits

The selected Slope Stop B signal is logically OR'd with the selected Slope Stop A signal to terminate the slope function.

Slope Stop B Signal SelectionSource
1111-0111 1
0110CMP6 out
0101CMP5 out
0100CMP4 out
0011CMP3 out
0010CMP2 out
0001CMP1 out
0000 0

Bits 3:0 – SLPSTRT[3:0] Slope Start Signal Select bits

Slope Start Signal SelectionSource
1111-1001 1
1000PWM8 Trigger 1
0111PWM7 Trigger 1
0110PWM6 Trigger 1
0101PWM5 Trigger 1
0100PWM4 Trigger 1
0011PWM3 Trigger 1
0010PWM2 Trigger 1
0001PWM1 Trigger 1
0000 0

14.4.9 DAC Slope x Control High Register

Name: SLPxCONH

Offset: 0xC6A, 0xC7A, 0xC8A, 0xC9A, 0xCAA, 0xCBA

Notes:

  1. HME mode requires the user to disable the slope function (SLOPEN = 0).

  2. TWME mode requires the user to enable the slope function (SLOPEN = 1).

Bit 15 14 13 12 11 10 9 8

SLOPENHME TWMEPSE
AccessR/WR/WR/WR/W
Reset00 0 0
Bit7 6 5 4 3 2 1 0
Access
Reset

Bit 15 – SLOPEN Slope Function Enable/On bit

ValueDescription
1Enables slope function
0Disables slope function; slope accumulator is disabled to reduce power consumption

Bit 11 – HME Hysteretic Mode Enable bit ^(1)

ValueDescription
1Enables Hysteretic mode for DACx
0Disables Hysteretic mode for DACx

Bit 10 - TWME Triangle Wave Mode Enable bit ^(2)

ValueDescription
1Enables Triangle Wave mode for DACx
0Disables Triangle Wave mode for DACx

Bit 9 – PSE Positive Slope Mode Enable bit

ValueDescription
1Slope mode is positive (increasing)
0Slope mode is negative (decreasing)

14.4.10 DAC Slope x Data Register

Name: SLPxDAT

Offset: 0xC6C, 0xC7C, 0xC8C, 0xC9C, 0xCAC, 0xCBC

Bit 15 14 13 12 11 10 9 8

SLPDAT[15:8]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

SLPDAT[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 15:0 – SLPDAT[15:0] Slope Ramp Rate Value bits

The SLPDATx value is in 12.4 format.

15. Quadrature Encoder Interface (QEI)

Notes:

  1. This data sheet summarizes the features of the dsPIC33CK1024MP710 family of devices. It is not intended to be a comprehensive resource. For more information, refer to the "Quadrature Encoder Interface (QEI)" (www.microchip.com/DS70000601).
  2. Some registers and associated bits described in this section may not be available on all devices. Refer to 4. Memory Organization in this data sheet for device-specific register and bit information.

The Quadrature Encoder Interface (QEI) module provides the interface to incremental encoders for obtaining mechanical position data. Quadrature Encoders, also known as incremental encoders or optical encoders, detect position and speed of rotating motion systems. Quadrature Encoders enable closed-loop control of motor control applications, such as Switched Reluctance (SR) and AC Induction Motors (ACIM).

A typical Quadrature Encoder includes a slotted wheel attached to the shaft of the motor and an emitter/detector module that senses the slots in the wheel. Typically, three output channels, Phase A (QEAx), Phase B (QEBx) and Index (INDXx), provide information on the movement of the motor shaft, including distance and direction.

The two channels, Phase A (QEAx) and Phase B (QEBx), are typically 90 degrees out of phase with respect to each other. The Phase A and Phase B channels have a unique relationship. If Phase A leads Phase B, the direction of the motor is deemed positive or forward. If Phase A lags Phase B, the direction of the motor is deemed negative or reverse. The Index pulse occurs once per mechanical revolution and is used as a reference to indicate an absolute position. Figure 15-1 illustrates the Quadrature Encoder Interface signals.

The Quadrature signals from the encoder can have four unique states ('01', '00', '10' and '11') that reflect the relationship between QEAx and QEBx. Figure 15-1 illustrates these states for one count cycle. The order of the states get reversed when the direction of travel changes.

The Quadrature Decoder increments or decrements the 32-bit up/down Position x Counter (POSxCNTH/L) registers for each Change-of-State (COS). The counter increments when QEAX leads QEBx and decrements when QEBx leads QEAX. Table 15-1 shows an overview of the QEI module.

Figure 15-1. Quadrature Encoder Interface Signals
Microchip dsPIC33CK1024MP708 - Notes: - 1

line | Signal | Value | |------------|-------| | QEAX | High | | QEAX | Low | | QEBx | High | | QEBx | Low | | Up/Down | Lower |

Table 15-1 shows the truth table that describes how the Quadrature signals are decoded.

Table 15-1. Truth Table for Quadrature Encoder

Current Quadrature StatePrevious Quadrature StateAction
QAQBQAQB
1111No count or direction change
Current Quadrature State Previous Quadrature StateAction
QAQBQAQB
1110Count up
1101Count down
1100Invalid state change; ignore
1011Count down
1010No count or direction change
1001Invalid state change; ignore
1000Count up
0111Count up
0110Invalid state change; ignore
0101No count or direction change
0100Count down
0011Invalid state change; ignore
0010Count down
0001Count up
0000No count or direction change

Figure 15-2 illustrates the simplified block diagram of the QEI module. The QEI module consists of decoder logic to interpret the Phase A (QEAx) and Phase B (QEBx) signals, and an up/down counter to accumulate the count. The counter pulses are generated when the Quadrature state changes. The count direction information must be maintained in a register until a direction change is detected. The module also includes digital noise filters, which condition the input signal.

The QEI module consists of the following major features:

  • Four Input Pins: Two Phase Signals, an Index Pulse and a Home Pulse
  • Programmable Digital Noise Filters on Inputs
  • Quadrature Decoder providing Counter Pulses and Count Direction
    • Count Direction Status
  • 4x Count Resolution
  • Index (INDXx) Pulse to Reset the Position Counter
  • General Purpose 32-Bit Timer/Counter mode
  • Interrupts generated by QEI or Counter Events
    • 32-Bit Velocity Counter
    • 32-Bit Position Counter
    • 32-Bit Index Pulse Counter
    • 32-Bit Interval Timer
    • 32-Bit Position Initialization/Capture Register
    • 32-Bit Compare Less Than and Greater Than Registers
    • External Up/Down Count mode
    • External Gated Count mode
    • External Gated Timer mode
  • Interval Timer mode

15. Quadrature Encoder Interface (QEI)

Figure 15-2. Quadrature Encoder Interface (QEI) Module Block Diagram
Microchip dsPIC33CK1024MP708 - Quadrature Encoder Interface (QEI) - 1

flowchart
graph TD
    A["FLTREN"] --> B["Digital Filter"]
    C["HOMEx"] --> B
    D["INDXx"] --> B
    E["QEBx"] --> B
    F["QEAx"] --> B
    B --> G["FHOMEx"]
    G --> H["÷QFDIV"]
    H --> I["PCLK"]
    I --> J["Quadrature Decoder Logic"]
    J --> K["COUNT DIR"]
    J --> L["EXTCNT DIR_GATE"]
    M["CCMPx"] --> N["PCHCE PCLLE PCLLE PCHGE"]
    O["OUTFNC<1:0>"] --> N
    N --> P["Comparator"]
    P --> Q["PCLEQ PCLLE"]
    R["PBCLK"] --> S[":INTDIV"]
    S --> T["DIVCLK"]
    T --> U["COUNT_EN"]
    U --> V["Interval Timer Register (INTxTMR)"]
    V --> W["Volocity Counter Register (VELxCNT)"]
    W --> X["Velocity Counter Hold Register (VELxHLD)"]
    X --> Y["Index Counter Hold Register (INDxHLD)"]
    Y --> Z["Data Bus"]
    AA["POSTEN"] --> AB["DIR_GATE"]
    AB --> AC["1 C"]
    AC --> AD["COUNT_EN"]
    AE["MINI"] --> AF["DIR_GATE"]
    AF --> AG["CNT_DIR"]
    AH["Greater Than or Equal Compare Register (QEIXGEC)¹"] --> AI["Position Counter Register (POSxCNT)"]
    AI --> AJ["Position Counter Hold Register (POSxHLD)"]
    AJ --> AK["QCAPEN"]
    AL["Initialization and Capture Register (QEIXIC)¹"] --> AM["Data Bus"]

Note:
1. These registers map to the same memory location.
Quadrature Encoder Interface (QEI)
dSPIC33CKT024MPPT10 Family

15.1 QEI Control/Status Registers

OffsetNameBit Pos. 76543210
0x0140QEI1CON15:8QEIENQEISIDL PIMOD[2:0]IMV[1:0]
7:0INTDIV[2:0]CNTPOL GATEN CCM[1:0]
0x0142...0x0143Reserved
0x0144QEI1IOC15:8QCAPENFLTRENQFDIV[2:0]OUTFNC[1:0]SWPAB
7:0HOMPOLIDXPOLQEBPOLQEAPOLHOMEINDEXQEBQEA
0x0146QEI1IOCH(1)15:8
7:0HCAPEN
0x0148QEI1STAT15:8PCHEQIRQPCHEQIENPCLEQIRQPCLEQIENPOSOVIRQPOSOVIEN
7:0PCIIRQPCIENVELOVIRQVELOVIENHOMIRQHOMIENIDXIRQIDXIEN
0x014A...0x014BReserved
0x014CPOS1CNTL15:8POSCNT[15:8]
7:0POSCNT[7:0]
0x014EPOS1CNTH15:8POSCNT[31:24]
7:0POSCNT[23:16]
0x0150...0x0151Reserved
0x0152POS1HLD15:8POSHLD[31:24]
7:0POSHLD[23:16]
0x0154VEL1CNT15:8VELCNT[15:8]
7:0VELCNT[7:0]
0x0156VEL1CNTH(1)15:8VELCNT[31:24]
7:0VELCNT[23:16]
0x0158...0x0159Reserved
0x015AVEL1HLD15:8VELHLD[31:24]
7:0VELHLD[23:16]
0x015CINT1TMRL15:8INTTMR[15:8]
7:0INTTMR[7:0]
0x015EINT1TMRH15:8INTTMR[31:24]
7:0INTTMR[23:16]
0x0160INT1HLDL15:8INTXHLD[15:8]
7:0INTXHLD[7:0]
0x0162INT1HLDH15:8INTHLD[31:24]
7:0INTHLD[23:16]
0x0164INDX1CNTL15:8INDXCNT[15:8]
7:0INDXCNT[7:0]
0x0166INDX1CNTH15:8INDXCNT[31:24]
7:0INDXCNT[23:16]
0x0168...0x0169Reserved
0x016AINDX1HLD15:8INDXHLD[31:24]
7:0INDXHLD[23:16]
0x016CQEI1GEC15:8QEIGEC[15:8]
7:0QEIGEC[7:0]
0x016EQEI1GECH15:8QEIGEC[31:24]
7:0QEIGEC[23:16]
0x0170QEI1LECL15:8QEILEC[15:8]
7:0QEILEC[7:0]
0x0172QEI1LECH15:8QEILEC[31:24]
7:0QEILEC[23:16]
0x0174QEI2CON15:8QEISIDL PIMOD[2:0] IMV[1:0]
7:0INTDIV[2:0] CNTPOL GATEN CCM[1:0]
OffsetNName Bit Pos. 76543210
0x0176...0x0177Reserved
0x0178QE12IOC15:8 QCAPEN FLTREN QFDIV[2:0] OUTFNC[1:0] SWPAB
7:0HOMPOLIDXPOLQEBPOLQEAPOLHOMEINDEXQEBQEA
0x017AQE12IOCH(1)15:8
7:0HCAPEN
0x017CQE12STAT15:8PCHEQIRQPCHEQIENPCLEQIRQPCLEQIENPOSOVIRQPOSOVIEN
7:0PCIIRQPCIENVELOVIRQVELOVIENHOMIRQHOMIENIDXIRQIDXIEN
0x017E...0x017FReserved
0x0180POS2CNTL15:8POSCNT[15:8]
7:0POSCNT[7:0]
0x0182POS2CNTH15:8POSCNT[31:24]
7:0POSCNT[23:16]
0x0184...0x0185Reserved
0x0186POS2HLD15:8POSHLD[31:24]
7:0POSHLD[23:16]
0x0188VEL2CNT15:8VELCNT[15:8]
7:0VELCNT[7:0]
0x018AVEL2CNTH(1)15:8VELCNT[31:24]
7:0VELCNT[23:16]
0x018C...0x018DReserved
0x018EVEL2HLD15:8VELHLD[31:24]
7:0VELHLD[23:16]
0x0190INT2TMRL15:8INTTMR[15:8]
7:0INTTMR[7:0]
0x0192INT2TMRH15:8INTTMR[31:24]
7:0INTTMR[23:16]
0x0194INT2HLDL15:8INTXHLD[15:8]
7:0INTXHLD[7:0]
0x0196INT2HLDH15:8INTHLD[31:24]
7:0INTHLD[23:16]
0x0198INDX2CNTL15:8INDXCNT[15:8]
7:0INDXCNT[7:0]
0x019AINDX2CNTH15:8INDXCNT[31:24]
7:0INDXCNT[23:16]
0x019C...0x019DReserved
0x019EINDX2HLD15:8INDXHLD[31:24]
7:0INDXHLD[23:16]
0x01A0QE12GEC15:8QEIGEC[15:8]
7:0QEIGEC[7:0]
0x01A2QE12GECH15:8QEIGEC[31:24]
7:0QEIGEC[23:16]
0x01A4QE12LECL15:8QEILEC[15:8]
7:0QEILEC[7:0]
0x01A6QE12LECH15:8QEILEC[31:24]
7:0QEILEC[23:16]
0x01A8...0x0EC3Reserved
0x0EC4QE13CON15:8QEENQEISIDLPIMOD[2:0]IMV[1:0]
7:0INTDIV[2:0]CNTPOLGATENCCM[1:0]
OffsetName Bit Pos. 7 6 5 4 3 2 1 0
0xOEC6 ... 0xOEC7Reserved
0xOEC8 QE13IOC15:8 QCAPEN FLTREN QFDIV[2:0] OUTFNC[1:0] SWPAB
7:0HOMPOLIDXPOLQEBPOLQEAPOLHOMEINDEXQEBQEA
0xOECAQE13IOCH(1)15:8
7:0HCAPEN
0xOECCQE13STAT15:8PCHEQIRQPCHEQIENPCLEQIRQPCLEQIENPOSOVIRQPOSOVIEN
7:0PCIIRQPCIENVELOVIRQVELOVIENHOMIRQHOMIENIDXIRQIDXIEN
0xOECE ... 0xOECFReserved
0xOED0 POS3CNTL15:8POSCNT[15:8]
7:0POSCNT[7:0]
0xOED2POS3CNTH15:8POSCNT[31:24]
7:0POSCNT[23:16]
0xOED4 ... 0xOED5Reserved
0xOED6POS3HLD15:8POSHLD[31:24]
7:0POSHLD[23:16]
0xOED8VEL3CNT15:8VELCNT[15:8]
7:0VELCNT[7:0]
0xOEDAVEL3CNTH(1)15:8VELCNT[31:24]
7:0VELCNT[23:16]
0xOEDC ... 0xOEDDReserved
0xOEDEVEL3HLD15:8VELHLD[31:24]
7:0VELHLD[23:16]
0xOEE0 INT3TMRL15:8INTTMR[15:8]
7:0INTTMR[7:0]
0xOEE2 INT3TMRH15:8INTTMR[31:24]
7:0INTTMR[23:16]
0xOEE4INT3HLDL15:8INTXHLD[15:8]
7:0INTXHLD[7:0]
0xOEE6 INT3HLDH15:8INTHLD[31:24]
7:0INTHLD[23:16]
0xOEE8INDX3CNTL15:8INDXCNT[15:8]
7:0INDXCNT[7:0]
0xOEEA INDX3CNTH15:8INDXCNT[31:24]
7:0INDXCNT[23:16]
0xOEEC ... 0xOEDReserved
0xOEEE INDX3HLD15:8INDXHLD[31:24]
7:0INDXHLD[23:16]
0xOEF0 QE13GEC15:8QEIGEC[15:8]
7:0QEIGEC[7:0]
0xOEF2QE13GECH15:8QEIGEC[31:24]
7:0QEIGEC[23:16]
0xOEF4QE13LECL15:8QEILEC[15:8]
7:0QEILEC[7:0]
0xOEF6QE13LECH15:8QEILEC[31:24]
7:0QEILEC[23:16]

15.1.1 QElx Control Register

Name: QEIXCON

Offset: 0x140, 0x174, 0xEC4

Notes:

  1. When CCMx = 10 or CCMx = 11, all of the QEI counters operate as timers and the PIMOD[2:0] bits are ignored.

  2. When CCMx = 0.0, and QEAx and QEBx values match the Index Match Value (IMV), the POSxCNTH and POSxCNTL registers are reset.

  3. The selected clock rate should be at least twice the expected maximum quadrature count rate.

  4. Not all devices support this mode.

  5. The QCAPEN and HCAPEN bits must be cleared during PIMODx Modes 2 through 7 to ensure proper functionality. Not all devices support HCAPEN.

Bit 15 14 13 12 11 10 9 8

QEIEN QESIDL PIMOD[2:0]IMV[1:0]
AccessR/WR/WR/WR/WR/WR/WR/W
Reset00 0 0 0 0 0

Bit 76543210

INTDIV[2:0] CNTPOLGATENCCM[1:0]
AccessR/WR/WR/WR/WR/WR/WR/W
Reset0 0 0 0 0 0 0

Bit 15 – QEIEN Quadrature Encoder Interface Module Enable bit

ValueDescription
1Module counters are enabled
0Module counters are disabled, but SFRs can be read or written

Bit 13 – QEISIDL QEI Stop in Idle Mode bit

ValueDescription
1Discontinues module operation when device enters Idle mode
0Continues module operation in Idle mode

Bits 12:10 – PIMOD[2:0] Position Counter Initialization Mode Select bits ^(1,5)

ValueDescription
111Modulo Count mode for position counter and every Index event resets the position counter ^(4)
110Modulo Count mode for position counter
101Resets the position counter when the position counter equals the QEIXGEC register
100Second Index event after Home event initializes the position counter with the contents of the QEIXIC register
011First Index event after Home event initializes the position counter with the contents of the QEIXIC register
010Next Index input event initializes the position counter with the contents of the QEIXIC register
001Every Index input event resets the position counter
000Index input event does not affect the position counter

Bits 9:8 – IMV[1:0] Index Match Value bits ^(2)

ValueDescription
11Index match occurs when QEBx = 1 and QEAx = 1
10Index match occurs when QEBx = 1 and QEAx = 0
01Index match occurs when QEBx = 0 and QEAx = 1
00Index match occurs when QEBx = 0 and QEAx = 0

Bits 6:4 – INTDIV[2:0] Timer Input Clock Prescale Select bits ^(3) (interval timer, main timer (position counter), velocity counter and Index counter internal clock divider select)

Value Description
1111:256 prescale value
1101:64 prescale value
1011:32 prescale value
1001:16 prescale value
0111:8 prescale value
0101:4 prescale value
0011:2 prescale value
0001:1 prescale value

Bit 3 – CNTPOL Position and Index Counter/Timer Direction Select bit

Value Description
1Counter direction is negative unless modified by an external up/down signal
0Counter direction is positive unless modified by an external up/down signal

Bit 2 – GATEN External Count Gate Enable bit

Value Description
1External gate signal controls position counter operation
0External gate signal does not affect position counter operation

Bits 1:0 – CCM[1:0] Counter Control Mode Selection bits

Value Description
11Internal Timer mode
10External Clock Count with External Gate mode
01External Clock Count with External Up/Down mode
00Quadrature Encoder mode

15.1.2 QElx I/O Control Register Low

Name: QEIXIOC

Offset: 0x144, 0x178, 0xEC8

Legend: x = Bit is unknown

Bit 15 14 13 12 11 10 9 8

QCAPEN FLTREN QFDIV[2:0]OUTFNC[1:0] SWPAB

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

HOMPOLIDXPOLQEBPOLQEAPOLHOMEINDEXQEBQEA
AccessR/WR/WR/WR/WRRRR
Reset0000xxxx

Bit 15 – QCAPEN QEIX Position Counter Input Capture Enable bit

ValueDescription
1HOMEx input event (positive edge) triggers a position capture event (HCAPEN must be cleared)
0HOMEx input event (positive edge) does not trigger a position capture event

Bit 14 – FLTREN QEAX/QEBx/INDXx/HOMEx Digital Filter Enable bit

ValueDescription
1Input pin digital filter is enabled
0Input pin digital filter is disabled (bypassed)

Bits 13:11 – QFDIV[2:0] QEAX/QEBx/INDXx/HOMEx Digital Input Filter Clock Divide Select bits

ValueDescription
1111:256 clock divide
1101:64 clock divide
1011:32 clock divide
1001:16 clock divide
0111:8 clock divide
0101:4 clock divide
0011:2 clock divide
0001:1 clock divide

Bits 10:9 – OUTFNC[1:0] QEIX Module Output Function Mode Select bits

ValueDescription
11The CNTCMPx pin goes high when POSxCNT ≤ QElxLEC or POSxCNT ≥ QElxGEC
10The CNTCMPx pin goes high when POSxCNT ≤ QElxLEC
01The CNTCMPx pin goes high when POSxCNT ≥ QElxGEC
00Output is disabled

Bit 8 – SWPAB Swap QEAX and QEBX Inputs bit

ValueDescription
1QEAx and QEBx are swapped prior to Quadrature Decoder logic
0QEAx and QEBx are not swapped

Bit 7 – HOMPOL HOMEx Input Polarity Select bit

ValueDescription
1Input is inverted
0Input is not inverted

Bit 6 – IDXPOL INDXx Input Polarity Select bit

Value Description
1Input is inverted
0Input is not inverted

Bit 5 – QEBPOL QEBx Input Polarity Select bit

Value Description
1Input is inverted
0Input is not inverted

Bit 4 – QEAPOL QEAx Input Polarity Select bit

Value Description
1Input is inverted
0Input is not inverted

Bit 3 – HOME Status of HOMEx Input Pin After Polarity Control bit (read-only)

Value Description
1Pin is at logic '1' if HOMPOL bit is set to '0'; pin is at logic '0' if HOMPOL bit is set to '1'
0Pin is at logic '0' if HOMPOL bit is set to '0'; pin is at logic '1' if HOMPOL bit is set to '1'

Bit 2 – INDEX Status of INDXx Input Pin After Polarity Control bit (read-only)

Value Description
1Pin is at logic '1' if the IDXPOL bit is set to '0'; pin is at logic '0' if the IDXPOL bit is set to '1'
0Pin is at logic '0' if the IDXPOL bit is set to '0'; pin is at logic '1' if the IDXPOL bit is set to '1'

Bit 1 – QEB Status of QEBx Input Pin After Polarity Control and SWPAB Pin Swapping bit (read-only)

Value Description
1Physical pin, QEBx, is at logic '1' if QEBPOL bit is set to '0' and SWPAB bit is set to '0'; physical pin, QEBx, is at logic '0' if QEBPOL bit is set to '1' and SWPAB bit is set to '0'; physical pin, QEAx, is at logic '1' if QEBPOL bit is set to '0' and SWPAB bit is set to '1'; physical pin, QEAx, is at logic '0' if QEBPOL bit is set to '1' and SWPAB bit is set to '1'
0Physical pin, QEBx, is at logic '0' if QEBPOL bit is set to '0' and SWPAB bit is set to '0'; physical pin, QEBx, is at logic '1' if QEBPOL bit is set to '1' and SWPAB bit is set to '0'; physical pin, QEAx, is at logic '0' if QEBPOL bit is set to '0' and SWPAB bit is set to '1'; physical pin, QEAx, is at logic '1' if QEBPOL bit is set to '1' and SWPAB bit is set to '1'

Bit 0 – QEA Status of QEAX Input Pin After Polarity Control and SWPAB Pin Swapping bit (read-only)

Value Description
1Physical pin, QEAx, is at logic ‘1’ if QEAPOL bit is set to ‘0’ and SWPAB bit is set to ‘0’;physical pin, QEAx, is at logic ‘0’ if QEAPOL bit is set to ‘1’ and SWPAB bit is set to ‘0’;physical pin, QEBx, is at logic ‘1’ if QEAPOL bit is set to ‘0’ and SWPAB bit is set to ‘1’;physical pin, QEBx, is at logic ‘0’ if QEAPOL bit is set to ‘1’ and SWPAB bit is set to ‘1’
0Physical pin, QEAx, is at logic ‘0’ if QEAPOL bit is set to ‘0’ and SWPAB bit is set to ‘0’;physical pin, QEAx, is at logic ‘1’ if QEAPOL bit is set to ‘1’ and SWPAB bit is set to ‘0’;physical pin, QEBx, is at logic ‘0’ if QEAPOL bit is set to ‘0’ and SWPAB bit is set to ‘1’;physical pin, QEBx, is at logic ‘1’ if the QEAPOL bit is set to ‘1’ and the SWPAB bit is set to ‘1’

15.1.3 QElx I/O Control High Register High

Name: QEIXIOCH (1)

Offset: 0x146, 0x17A, 0xECA

Note:

  1. This register is not present on all devices.

Microchip dsPIC33CK1024MP708 - Note: - 1

text_image Bit 15 14 13 12 11 10 9 8 Access Reset Bit 7 6 5 4 3 2 1 0 Access Reset 0 HCAPEN R/W

Bit 0 – HCAPEN Position Counter Input Capture by Home Event Enable bit

ValueDescription
1HOMEx input event (positive edge) triggers a position capture event
0HOMEx input event (positive edge) does not trigger a position capture event

15.1.4 QElx Status Register

Name: QEIXSTAT

Offset: 0x148, 0x17C, 0xECC

Note:

  1. This status bit is only applicable to PIMOD[2:0] modes, '011' and '100'.

Legend: C = Clearable bit, HS = Hardware Settable bit

Bit 15 14 13 12 11 10 9 8

PCHEQIRQ PCHEQIENPCLEQIRQPCLEQIEN POSOVIRQ POSOVIEN
Access ResetR/C/HS0 0 0 0 0 0 0R/WR/C/HSR/WR/C/HSR/W

Bit 76543210

PCIIRQPCIIENVELOVIRQVELOVIENHOMIRQHOMIENIDXIRQIDXIEN
AccessR/C/HSR/WR/C/HSR/WR/C/HSR/WR/C/HSR/W
Reset0 0 0 0 0 0 0 0

Bit 13 – PCHEQIRQ Position Counter Greater Than Compare Status bit

ValueDescription
1POSxCNT ≥ QEIxGEC
0POSxCNT < QEIxGEC

Bit 12 – PCHEQIEN Position Counter Greater Than Compare Interrupt Enable bit

ValueDescription
1Interrupt is enabled
0Interrupt is disabled

Bit 11 – PCLEQIRQ Position Counter Less Than Compare Status bit

ValueDescription
1POSxCNT ≤ QEIxLEC
0POSxCNT > QEIxLEC

Bit 10 – PCLEQIEN Position Counter Less Than Compare Interrupt Enable bit

ValueDescription
1Interrupt is enabled
0Interrupt is disabled

Bit 9 – POSOVIROQ Position Counter Overflow Status bit

ValueDescription
1Overflow has occurred
0No overflow has occurred

Bit 8 – POSOVIEN Position Counter Overflow Interrupt Enable bit

ValueDescription
1Interrupt is enabled
0Interrupt is disabled

Bit 7 – PCIIRQ Position Counter (Homing) Initialization Process Complete Status bit ^(1)

ValueDescription
1POSxCNT was reinitialized
0POSxCNT was not reinitialized

Bit 6 – PCIEN Position Counter (Homing) Initialization Process Complete Interrupt Enable bit

Value Description
1Interrupt is enabled
0Interrupt is disabled

Bit 5 – VELOVIRQ Velocity Counter Overflow Status bit

Value Description
1Overflow has occurred
0No overflow has occurred

Bit 4 – VELOVIEN Velocity Counter Overflow Interrupt Enable bit

Value Description
1Interrupt is enabled
0Interrupt is disabled

Bit 3 – HOMIRQ Status Flag for Home Event Status bit

Value Description
1Home event has occurred
0No Home event has occurred

Bit 2 – HOMIEN Home Input Event Interrupt Enable bit

Value Description
1Interrupt is enabled
0Interrupt is disabled

Bit 1 – IDXIRQ Status Flag for Index Event Status bit

Value Description
1Index event has occurred
0No Index event has occurred

Bit 0 – IDXIEN Index Input Event Interrupt Enable bit

Value Description
1Interrupt is enabled
0Interrupt is disabled

15.1.5 Position x Counter Register Low

Name: POSxCNTL

Offset: 0x14C, 0x180, 0xED0

Bit 15 14 13 12 11 10 9 8
POSCNT[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
POSCNT[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0

Bits 15:0 – POSCNT[15:0] Low Word Used to Form 32-Bit Position Counter Register (POSxCNT) bits

15.1.6 Position x Counter Register High

Name: POSxCNTH

Offset: 0x14E, 0x182, 0xED2

Bit 15 14 13 12 11 10 9 8
POSCNT[31:24]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
POSCNT[23:16]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0

Bits 15:0 – POSCNT[31:16] High Word Used to Form 32-Bit Position Counter Register (POSxCNT) bits

15.1.7 Position 1 Counter Hold Register High

Name: POS1HLD

Offset: 0x152

Bit 15 14 13 12 11 10 9 8
POSHLD[31:24]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
POSHLD[23:16]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0

Bits 15:0 – POSHLD[31:16] Hold for Reading/Writing Position 1 Counter Register (POS1CNT[31:16]) bits

15.1.8 Position 2 Counter Hold Register High

Name: POS2HLD

Offset: 0x186

Bit 15 14 13 12 11 10 9 8
POSHLD[31:24]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
POSHLD[23:16]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0

Bits 15:0 – POSHLD[31:16] Hold for Reading/Writing Position 2 Counter Register (POS2CNT[31:16]) bits

15.1.9 Position 3 Counter Hold Register High

Name: POS3HLD

Offset: 0xED6

Bit 15 14 13 12 11 10 9 8
POSHLD[31:24]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
POSHLD[23:16]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0

Bits 15:0 – POSHLD[31:16] Hold for Reading/Writing Position 3 Counter Register (POS3CNT[31:16]) bits

15.1.10 Velocity x Counter Register Low

Name: VELxCNT

Offset: 0x154, 0x188, 0xED8

Bit 15 14 13 12 11 10 9 8

VELCNT[15:8]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

VELCNT[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 15:0 – VELCNT[15:0] Velocity Counter bits

15.1.11 Velocity x Counter Register High

Name: VELxCNTH (1)

Offset: 0x156, 0x18A, 0xEDA

Note:

  1. This register is not present on all devices.

Bit 15 14 13 12 11 10 9 8

VELCNT[31:24]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

VELCNT[23:16]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 15:0 – VELCNT[31:16] Velocity Counter bits

15.1.12 Velocity x Counter Hold Register

Name: VELxHLD

Offset: 0x15A, 0x18E, 0xEDE

Bit 15 14 13 12 11 10 9 8
VELHLD[31:24]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
VELHLD[23:16]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0

Bits 15:0 – VELHLD[31:16] Hold for Reading/Writing Velocity Counter Register (VELxCNT[31:16]) bits

15.1.13 Interval x Timer Register Low

Name: INTxTMRL

Offset: 0x15C, 0x190, 0xEE0

Bit 15 14 13 12 11 10 9 8
INTTMR[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
INTTMR[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0

Bits 15:0 – INTTMR[15:0] Low Word Used to Form 32-Bit Interval Timer Register (INTxTMR) bits

15.1.14 Interval x Timer Register High

Name: INTxTMRH

Offset: 0x15E, 0x192, 0xEE2

Bit 15 14 13 12 11 10 9 8
INTTMR[31:24]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
INTTMR[23:16]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0

Bits 15:0 – INTTMR[31:16] High Word Used to Form 32-Bit Interval Timer Register (INTxTMR) bits

15.1.15 Index x Counter Hold Register Low

Name: INTxHLDL

Offset: 0x160, 0x194, 0xEE4

Bit 15 14 13 12 11 10 9 8
INTXHLD[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
INTXHLD[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0

Bits 15:0 – INTXHLD[15:0] Hold for Reading/Writing Index x Counter Register (IDXxCNT) bits

15.1.16 Index x Counter Hold Register High

Name: INTxHLDH

Offset: 0x162,0x196,0xEE6

Bit 15 14 13 12 11 10 9 8
INTHLD[31:24]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
INTHLD[23:16]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0

Bits 15:0 – INTHLD[31:16] Hold for Reading/Writing Index x Counter Register (IDXxCNT) bits

15.1.17 Index x Counter Register Low

Name: INDXxCNTL

Offset: 0x164, 0x198, 0xEE8

Bit 15 14 13 12 11 10 9 8
INDXCNT[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
INDXCNT[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0

Bits 15:0 – INDXCNT[15:0] Low Word Used to Form 32-Bit Index x Counter Register (INDXxCNT) bits

15.1.18 Index x Counter Register High

Name: INDXxCNTH

Offset: 0x166, 0x19A, 0xEEA

Bit 15 14 13 12 11 10 9 8
INDXCNT[31:24]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
INDXCNT[23:16]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0

Bits 15:0 – INDXCNT[31:16] High Word Used to Form 32-Bit Index x Counter Register (INDXxCNT) bits

15.1.19 Index x Counter Hold Register

Name: INDXxHLD

Offset: 0x16A, 0x19E, 0xEE

Bit 15 14 13 12 11 10 9 8
INDXHLD[31:24]
Access R/W R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
INDXHLD[23:16]
Access R/W R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0 0

Bits 15:0 – INDXHLD[31:16] Hold Register for Reading/Writing Index 1 Counter High Word Register (INDX1CNTH[31:16]) bits

15.1.20 QEIX Greater Than or Equal Compare Register Low

Name: QEIXGEC

Offset: 0x16C, 0x1A0, 0xEF0

Bit 15 14 13 12 11 10 9 8
QEIGEC[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
QEIGEC[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0

Bits 15:0 – QEIGEC[15:0] Low Word Used to Form 32-Bit Greater Than or Equal Compare Register (QEIXGEC) bits

15.1.21 QEIX Greater Than or Equal Compare Register High

Name: QEIXGECH

Offset: 0x16E, 0x1A2, 0xEF2

Bit 15 14 13 12 11 10 9 8
QEIGEC[31:24]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
QEIGEC[23:16]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0

Bits 15:0 – QEIGEC[31:16] High Word Used to Form 32-Bit Greater Than or Equal Compare Register (QEIXGEC) bits

15.1.22 QEIX Less Than or Equal Compare Register Low

Name: QEIXLECL

Offset: 0x170, 0x1A4, 0xEF4

Bit 15 14 13 12 11 10 9 8
QEILEC[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
QEILEC[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0

Bits 15:0 – QEILEC[15:0] Low Word Used to Form 32-Bit Less Than or Equal Compare Register (QEIXLEC) bits

15.1.23 QEIX Less Than or Equal Compare Register High

Name: QEIXLECH

Offset: 0x172, 0x1A6, 0xEF6

Bit 15 14 13 12 11 10 9 8
QEILEC[31:24]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
QEILEC[23:16]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0

Bits 15:0 – QEILEC[31:16] High Word Used to Form 32-Bit Less Than or Equal Compare Register (QEIXLEC) bits

16. Universal Asynchronous Receiver Transmitter (UART)

Note: This data sheet summarizes the features of the dsPIC33CK1024MP710 family of devices. It is not intended to be a comprehensive reference source. To complement the information in this data sheet, refer to “Multiprotocol Universal Asynchronous Receiver Transmitter (UART) Module” (www.microchip.com/DS70005288).

The Universal Asynchronous Receiver Transmitter (UART) is a flexible serial communication peripheral used to interface dsPIC ^* microcontrollers with other equipment, including computers and peripherals. The UART is a full-duplex, asynchronous communication channel that can be used to implement protocols, such as RS-232 and RS-485. The UART also supports the following hardware extensions:

• LIN/J2602
• Digital Multiplex (DMX)
- Smart Card
The primary features of the UART are:
• Full or Half-Duplex Operation
- Up to 8-Deep TX and RX First-In First-Out (FIFO) Buffers
• 8-Bit or 9-Bit Data Width
- Configurable Stop Bit Length
- Flow Control
• Auto-Baud Calibration
- Parity, Framing and Buffer Overrun Error Detection
- Address Detect
- Break Transmission
• Transmit and Receive Polarity Control
• Manchester Encoder/Decoder
• Operation in Sleep mode
- Wake from Sleep on Sync Break Received Interrupt

16.1 Architectural Overview

The UART transfers bytes of data, to and from device pins, using First-In First-Out (FIFO) buffers up to eight bytes deep. The status of the buffers and data is made available to user software through Special Function Registers (SFRs). The UART implements multiple interrupt channels for handling transmit, receive and error events. A simplified block diagram of the UART is shown in Figure 16-1.

Figure 16-1. Simplified UARTx Block Diagram
Microchip dsPIC33CK1024MP708 - Architectural Overview - 1

flowchart
graph TD
    A["Clock Inputs"] --> B["Baud Rate Generator"]
    C["Data Bus"] --> D["SFRs"]
    E["Interrupts"] --> F["Interrupt Generation"]
    G["Error and Event Detection"] --> H["Hardware Flow Control"]
    I["TX Buffer, UxTXREG"] --> J["TX"]
    K["RX Buffer, UxRXREG"] --> L["RX"]
    M["UxDSR"] --> N["UxDSR"]
    O["UxRTS"] --> P["UxRTS"]
    Q["UxCTS"] --> R["UxCTS"]
    S["UxDTR"] --> T["UxDTR"]

16.2 Character Frame

A typical UART character frame is shown in Figure 16-2. The Idle state is high with a 'Start' condition indicated by a falling edge. The Start bit is followed by a number of data, parity/address detect and Stop bits defined by the MOD[3:0] (UxMODE[3:0]) bits selected.

Figure 16-2. UART Character Frame
Microchip dsPIC33CK1024MP708 - Character Frame - 1

flowchart
graph LR
    A["Start Bit"] --> B["D0D1"]
    B --> C["D2D3"]
    C --> D["D5D4"]
    D --> E["..."]
    E --> F["D6D7"]
    F --> G["Parity Address Detect"]
    G --> H["Stop Bit(s)"]
    H --> I["Idle"]

16.3 Data Buffers

Both transmit and receive functions use buffers to store data shifted to/from the pins. These buffers are FIFOs and are accessed by reading the SFRs, UxTXREG and UxRXREG, respectively. Each data buffer has multiple flags associated with its operation to allow software to read the status. Interrupts can also be configured based on the space available in the buffers. The transmit and receive buffers can be cleared and their pointers reset using the associated TX/RX Buffer Empty Status bits, UTXBE (UxSTAH[5]) and URXBE (UxSTAH[1]).

16.4 Protocol Extensions

The UART provides hardware support for LIN/J2602, DMX and smart card protocol extensions to reduce software overhead. A protocol extension is enabled by writing a value to the MOD[3:0] (UxMODE[3:0]) selection bits and further configured using the UARTx Timing Parameter registers, UxP1, UxP2, UxP3 and UxP3H. Details regarding operation and usage are discussed in their respective chapters. Not all protocols are available on all devices.

16.5 UART Control/Status Registers

OffsetName Bit Pos. 7 6 5 4 3 2 1 0
0x0118 U2MODE15:8 UARTEN USIDL WAKE RXBIMD BRKOVR UTXBRK
7:0 BRGH ABAUD UTXENURXENMOD[3:0]
0x011AU2MODEH15:8SLPENACTIVEBCLKMODBCLKSEL[1:0]HALFDPLX
7:0RUNOVFURXINVSTSEL[1:0]COENUTXINVFLO[1:0]
0x011CU2STA15:8TXMTIEPERIEABDOVECERIEFERIERXBKIEOERIETXCIE
7:0TRMTPERRABDOVFCERIFFERRRXBKIFOERRTXCIF
0x011E U2STAH15:8UTXISEL[2:0]URXISEL[2:0]
7:0TXWRESTPMDUTXBEUTXBFRIDLEXONURXBEURXBF
0x0120U2BRG15:8BRG[15:8]
7:0BRG[7:0]
0x0122 U2BRGH15:8
7:0BRG[19:16]
0x0124U2RXREG15:8
7:0RXREG[7:0]
0x0126 ... 0x0127Reserved
0x0128 U2TXREG15:8LAST
7:0TXREG[7:0]
0x012A ... 0x012BReserved
0x012CU2P115:8P1[8]
7:0P1[7:0]
0x012EU2P215:8P2[8]
7:0P2[7:0]
0x0130U2P315:8P3[15:8]
7:0P3[7:0]
0x0132U2P3H15:8
7:0P3[23:16]
0x0134 U2TXCHK15:8
7:0TXCHK[7:0]
0x0136U2RXCHK15:8
7:0RXCHK[7:0]
0x0138U2SCCON15:8
7:0TXRPT[1:0]CONVTOPDPRTCL
0x013AU2SCINT15:8RXRPTIF TXRPTIFBTCIFWTCIFGTCIF
7:0RXRPTIE TXRPTIEBTCIEWTCIEGTCIE
0x013CU2INT15:8
7:0WUIFABDIFABDIE
0x013E ... 0x0537Reserved
0x0538 U1MODE15:8 UARTEN USIDL WAKE RXBIMD BRKOVR UTXBRK
7:0 BRGH ABAUD UTXENURXENMOD[3:0]
0x053AU1MODEH15:8SLPENACTIVEBCLKMODBCLKSEL[1:0]HALFDPLX
7:0RUNOVFURXINVSTSEL[1:0]COENUTXINVFLO[1:0]
0x053CU1STA15:8TXMTIEPERIEABDOVECERIEFERIERXBKIEOERIETXCIE
7:0TRMTPERRABDOVFCERIFFERRRXBKIFOERRTXCIF
0x053E U1STAH15:8UTXISEL[2:0]URXISEL[2:0]
7:0TXWRESTPMDUTXBEUTXBFRIDLEXONURXBEURXBF
0x0540U1BRG15:8BRG[15:8]
7:0BRG[7:0]
0x0542 U1BRGH15:8
7:0BRG[19:16]
0x0544U1RXREG15:8
7:0RXREG[7:0]
0x0546 ... 0x0547Reserved
0x0548 U1TXREG15:8 LAST
7:0 TXREG[7:0]
0x054A ... 0x054BReserved
0x054C U1P115:8P1[8]
7:0 P1[7:0]
0x054E U1P215:8P2[8]
7:0 P2[7:0]
0x0550 U1P315:8P3[15:8]
7:0 P3[7:0]
0x0552U1P3H15:8
7:0P3[23:16]
0x0554 U1TXCHK15:8
7:0 TXCHK[7:0]
0x0556 U1RXCHK15:8
7:0 RXCHK[7:0]
0x0558U1SCCON15:8
7:0TXRPT[1:0]CONVTOPDPRTCL
0x055AU1SCINT15:8RXRPTIFTXRPTIFBTCIFWTCIFGTCIF
7:0RXRPTIETXRPTIEBTCIEWTCIEGTCIE
0x055CU1INT15:8
7:0WUIFABDIFABDIE
0x055E ... 0x0EFFReserved
0x0F00U3MODE15:8UARTENUSIDLWAKERXBIMDBRKOVRUTXBRK
7:0BRGHABAUDUTXENURXENMOD[3:0]
0x0F02 U3MODEH15:8SLPENACTIVEBCLKMODBCLKSEL[1:0]HALFDPLX
7:0RUNOVFURXINVSTSEL[1:0]COENUTXINVFLO[1:0]
0x0F04U3STA15:8TXMTIEPERIEABDOVECERIEFERIERXBKIEOERIETXCIE
7:0TRMTPERRABDOVFCERIFFERRRXBKIFOERRTXCIF
0x0F06U3STAH15:8UTXISEL[2:0]URXISEL[2:0]
7:0TXWRESTPMDUTXBEUTXBFRIDLEXONURXBEURXBF
0x0F08U3BRG15:8 BRG[15:8]
7:0BRG[7:0]
0x0F0A U3BRGH15:8
7:0BRG[19:16]
0x0F0CU3RXREG15:8
7:0 RXREG[7:0]
0x0F0E ... 0x0F0FReserved
0x0F10 U3TXREG15:8 LAST
7:0 TXREG[7:0]
0x0F12 ... 0x0F13Reserved
0x0F14U3P115:8P1[8]
7:0 P1[7:0]
0x0F16U3P215:8P2[8]
7:0 P2[7:0]
0x0F18U3P315:8P3[15:8]
7:0 P3[7:0]
0x0F1AU3P3H15:8
7:0P3[23:16]
0x0F1C U3TXCHK15:8
7:0 TXCHK[7:0]
OffsetNameBit Pos. 7 6 54 3 2 1 0
0x0F1EU3RXCHK15:8
7:0 RXCHK[7:0]
0x0F20U3SCCON15:8
7:0 TXRPT[1:0] CONV TOPD PRTCL
0x0F22U3SCINT15:8RXRPTIFTXRPTIFBTCIFWTCIFGTCIF
7:0RXRPTIETXRPTIEBTCIEWTCIEGTCIE
0x0F24U3INT15:8
7:0WUIFABDIFABDIE

16.5.1 UARTx Configuration Register

Name: UxMODE

Offset: 0x538, 0x118, 0xF00

Note:

  1. R/HS/HC in DMX and LIN mode.

Legend: HC = Hardware Clearable bit; HS = Hardware Settable bit

Bit 15 14 13 12 11 10 9 8

UARTENUSIDL WAKE RXBIMDBRKOVR UTXBRK
AccessR/WR/WR/WR/WR/WR/W/HC
Reset00 0 00 0

Bit 76543210

BRGHABAUD UTXENURXENMOD[3:0]
AccessR/WR/W/HCR/WR/WR/WR/WR/WR/W
Reset0 0 0 0 0 0 0 0

Bit 15 – UARTEN UART Enable bit

Value Description
1UART is ready to transmit and receive
0UART state machine, FIFO Buffer Pointers and counters are reset; registers are readable and writable

Bit 13 – USIDL UART Stop in Idle Mode bit

Value Description
1Discontinues module operation when device enters Idle mode
0Continues module operation in Idle mode

Bit 12 – WAKE Wake-up Enable bit

Value Description
1Module will continue to sample the RX pin – interrupt generated on falling edge, bit cleared in hardware on following rising edge; if ABAUD is set, Auto-Baud Detection (ABD) will begin immediately
0RX pin is not monitored nor rising edge detected

Bit 11 - RXBIMD Receive Break Interrupt Mode bit

Value Description
1RXBKIF flag when a minimum of 23 (DMX)/11 (asynchronous or LIN/J2602) low bit periods are detected
0RXBKIF flag when the Break makes a low-to-high transition after being low for at least 23/11-bit periods

Bit 9 – BRKOVR Send Break Software Override bit

Overrides the TX Data Line:

Value Description
1Makes the TX line active (Output 0 when UTXINV = 0, Output 1 when UTXINV = 1)
0TX line is driven by the shifter

Bit 8 – UTXBRK UART Transmit Break bit ^(1)

Value Description
1Sends Sync Break on next transmission; cleared by hardware upon completion
0Sync Break transmission is disabled or has completed

Bit 7 – BRGH High Baud Rate Select bit

Value Description
1High Speed: Baud rate is baudclk/4
0Low Speed: Baud rate is baudclk/16

Bit 6 – ABAUD Auto-Baud Detect Enable bit (read-only when MOD[3:0] = 1xxx)

Value Description
1Enables baud rate measurement on the next character – requires reception of a Sync field (55h); cleared in hardware upon completion
0Baud rate measurement is disabled or has completed

Bit 5 – UTXEN UART Transmit Enable bit

Value Description
1Transmit enabled – except during Auto-Baud Detection
0Transmit disabled – all transmit counters, pointers and state machines are reset; TX buffer is not flushed, status bits are not reset

Bit 4 – URXEN UART Receive Enable bit

Value Description
1Receive enabled – except during Auto-Baud Detection
0Receive disabled – all receive counters, pointers and state machines are reset; RX buffer is not flushed, status bits are not reset

Bits 3:0 - MOD[3:0] UART Mode bits

Value Description
OtherReserved
1111Smart card
1110 IrDA^*
1101Reserved
1100LIN Commander/Responder
1011LIN Responder only
1010DMX
1001Reserved
1000Reserved
0111Reserved
0110Reserved
0101Reserved
0100Asynchronous 9-bit UART with address detect, ninth bit = 1 signals address
0011Asynchronous 8-bit UART without address detect, ninth bit is used as an even parity bit
0010Asynchronous 8-bit UART without address detect, ninth bit is used as an odd parity bit
0001Asynchronous 7-bit UART
0000Asynchronous 8-bit UART

16.5.2 UARTx Configuration Register High

Name: UxMODEH

Offset: 0x53A, 0x11A, 0xF02

Bit 15 14 13 12 11 10 9 8

SLPEN ACTIVEBCLKMODBCLKSEL[1:0] HALFDPLX
AccessR/WRR/WR/WR/WR/W
Reset0 00 0 0 0

Bit 76543210

RUNOVFURXINVSTSEL[1:0]COENUTXINVFLO[1:0]
AccessR/WR/WR/WR/WR/WR/WR/WR/W
Reset0 0 0 0 0 0 0 0

Bit 15 – SLPEN Run During Sleep Enable bit

ValueDescription
1UART BRG clock runs during Sleep
0UART BRG clock is turned off during Sleep

Bit 14 – ACTIVE UART Running Status bit

ValueDescription
1UART clock request is active (user can not update the UxMODE/UxMODEH registers)
0UART clock request is not active (user can update the UxMODE/UxMODEH registers)

Bit 11 - BCLKMOD Baud Clock Generation Mode Select bit

ValueDescription
1Uses fractional Baud Rate Generation
0Uses legacy divide-by-x counter for baud clock generation (x = 4 or 16 depending on the BRGH bit)

Bits 10:9 – BCLKSEL[1:0] Baud Clock Source Selection bits

ValueDescription
11 AF_VCO/3
10 F_osc
01Reserved
00 F_osc/2(F_P)

Bit 8 – HALFDPLX UART Half-Duplex Selection Mode bit

ValueDescription
1Half-Duplex mode: UxTX is driven as an output when transmitting and tri-stated when TX is Idle
0Full-Duplex mode: UxTX is driven as an output at all times when both UARTEN and UTXEN are set

Bit 7 – RUNOVF Run During Overflow Condition Mode bit

ValueDescription
1When an Overflow Error (OERR) condition is detected, the RX shifter continues to run so as to remain synchronized with incoming RX data; data are not transferred to UxRXREG when it is full (i.e., no UxRXREG data are overwritten)
0When an Overflow Error (OERR) condition is detected, the RX shifter stops accepting new data (Legacy mode)

Bit 6 – URXINV UART Receive Polarity bit

ValueDescription
1Inverts RX polarity; Idle state is low
0Input is not inverted; Idle state is high

Bits 5:4 – STSEL[1:0] Number of Stop Bits Selection bits

Value Description
112 Stop bits sent, 1 checked at receive
102 Stop bits sent, 2 checked at receive
011.5 Stop bits sent, 1.5 checked at receive
001 Stop bit sent, 1 checked at receive

Bit 3 – COEN Enable Legacy Checksum (C0) Transmit and Receive bit

Value Description
1Checksum Mode 1 (enhanced LIN checksum in LIN mode; add all TX/RX words in all other modes)
0Checksum Mode 0 (legacy LIN checksum in LIN mode; not used in all other modes)

Bit 2 – UTXINV UART Transmit Polarity bit

Value Description
1Inverts TX polarity; TX is low in Idle state
0Output data are not inverted; TX output is high in Idle state

Bits 1:0 - FLO[1:0] Flow Control Enable bits (only valid when MOD[3:0] = 0xxx)

Value Description
11Reserved
10RTS-DSR (for TX side)/CTS-DTR (for RX side) hardware flow control
01XON/XOFF software flow control
00Flow control off

16.5.3 UARTx Status Register

Name: UxSTA

Offset: 0x53C, 0x11C, 0xF04

Legend: HC = Hardware Clearable bit; HS = Hardware Settable bit

Bit 15 14 13 12 11 10 9 8

TXMTIE PERIE ABDOVE CERIE FERIE RXBKIE DERIE TXCIE
AccessR/WR/WR/WR/WR/WR/WR/WR/W
Reset0 0 0 0 0 0 0 0

Bit 76543210

TRMTPERRABDOVFCERIFFERRRXBKIFOERRTXCIF
AccessRRR/W/HSR/W/HCRR/W/HCR/W/HCR/W/HC
Reset10000000

Bit 15 – TXMTIE Transmit Shifter Empty Interrupt Enable bit

ValueDescription
1Interrupt is enabled
0Interrupt is disabled

Bit 14 – PERIE Parity Error Interrupt Enable bit

ValueDescription
1Interrupt is enabled
0Interrupt is disabled

Bit 13 – ABDOVE Auto-Baud Rate Acquisition Interrupt Enable bit

ValueDescription
1Interrupt is enabled
0Interrupt is disabled

Bit 12 – CERIE Checksum Error Interrupt Enable bit

ValueDescription
1Interrupt is enabled
0Interrupt is disabled

Bit 11 – FERIE Framing Error Interrupt Enable bit

ValueDescription
1Interrupt is enabled
0Interrupt is disabled

Bit 10 – RXBKIE Receive Break Interrupt Enable bit

ValueDescription
1Interrupt is enabled
0Interrupt is disabled

Bit 9 – OERIE Receive Buffer Overflow Interrupt Enable bit

ValueDescription
1Interrupt is enabled
0Interrupt is disabled

Bit 8 – TXCIE Transmit Collision Interrupt Enable bit

ValueDescription
1Interrupt is enabled
0Interrupt is disabled

Bit 7 – TRMT Transmit Shifter Empty Interrupt Flag bit (read-only)

Value Description
1Transmit Shift Register (TSR) is empty (end of last Stop bit when STPMD = 1 or middle of first Stop bit when STPMD = 0)
0Transmit Shift Register is not empty

Bit 6 – PERR Parity Error/Address Received/Forward Frame Interrupt Flag bit

LIN and Parity Modes:
1 = Parity error detected
0 = No parity error detected
Address Mode:
1 = Address received
0 = No address detected
All Other Modes:
Not used.

Bit 5 – ABDOVF Auto-Baud Rate Acquisition Interrupt Flag bit (must be cleared by software)

Value Description
1BRG rolled over during the auto-baud rate acquisition sequence (must be cleared in software)
0BRG has not rolled over during the auto-baud rate acquisition sequence

Bit 4 – CERIF Checksum Error Interrupt Flag bit (must be cleared by software)

Value Description
1Checksum error
0No checksum error

Bit 3 – FERR Framing Error Interrupt Flag bit

Value Description
1Framing Error: Inverted level of the Stop bit corresponding to the topmost character in the buffer; propagates through the buffer with the received character
0No framing error

Bit 2 – RXBKIF Receive Break Interrupt Flag bit (must be cleared by software)

Value Description
1A Break was received
0No Break was detected

Bit 1 – OERR Receive Buffer Overflow Interrupt Flag bit (must be cleared by software)

Value Description
1Receive buffer has overflowed
0Receive buffer has not overflowed

Bit 0 – TXCIF Transmit Collision Interrupt Flag bit (must be cleared by software)

Value Description
1Transmitted word is not equal to the received word
0Transmitted word is equal to the received word

16.5.4 UARTx Status Register High

Name: UxSTAH

Offset: 0x53E, 0x11E, 0xF06

Note:

  1. The receive watermark interrupt is not set if PERIF or FERIF is set and the corresponding IE bit is set.

Legend: S = Settable bit, HS = Hardware Settable bit

Bit 15 14 13 12 11 10 9 8

UTXISEL[2:0] URXISEL[2:0]
AccessR/W R/W R/W R/W R/W R/W
Reset 0 0 00 0 0

Bit 76543210

TXWRESTPMDUTXBEUTXBFRIDLEXONURXBEURXBF
AccessR/W/HSR/WR/SRRRR/SR
Reset00 1 0 1 1 1 0

Bits 14:12 - UTXISEL[2:0] UART Transmit Interrupt Select bits

ValueDescription
111Sets transmit interrupt when there is one empty slot left in the buffer
. . .
010Sets transmit interrupt when there are six empty slots or more in the buffer
001Sets transmit interrupt when there are seven empty slots or more in the buffer
000Sets transmit interrupt when there are eight empty slots in the buffer; TX buffer is empty

Bits 10:8 – URXISEL[2:0] UART Receive Interrupt Select bits ^(1)

ValueDescription
111Triggers receive interrupt when there are eight words in the buffer; RX buffer is full
. . .
001Triggers receive interrupt when there are two words or more in the buffer
000Triggers receive interrupt when there is one word or more in the buffer

Bit 7 – TXWRE TX Write Transmit Error Status bit

LIN and Parity Modes:

1 = A new byte was written when buffer was full or when P2[8:0] = 0 (must be cleared by software)

0 = No error

Address Detect Mode:

1 = A new byte was written when buffer was full or to P1[8:0] when P1x was full (must be cleared by software)

0 = No error

Other Modes:

1 = A new byte was written when buffer was full (must be cleared by software)

0 = No error

Bit 6 – STPMD Stop Bit Detection Mode bit

ValueDescription
1Triggers RXIF at the end of the last Stop bit
0Triggers RXIF in the middle of the first (or second, depending on the STSEL[1:0] setting) Stop bit

Bit 5 – UTXBE UART TX Buffer Empty Status bit

ValueDescription
1Transmit buffer is empty; writing ‘1’ when UTXEN = 0 will reset the TX FIFO Pointers and counters
0Transmit buffer is not empty

Bit 4 – UTXBF UART TX Buffer Full Status bit

Value Description
1Transmit buffer is full
0Transmit buffer is not full

Bit 3 – RIDLE Receive Idle bit

Value Description
1UART RX line is in the Idle state
0UART RX line is receiving something

Bit 2 – XON UART in XON Mode bit

Only valid when FLO[1:0] control bits are set to XON/XOFF mode.

Value Description
1UART has received XON
0UART has not received XON or XOFF was received

Bit 1 – URXBE UART RX Buffer Empty Status bit

Value Description
1Receive buffer is empty; writing ‘1’ when URXEN = 0 will reset the RX FIFO Pointers and counters
0Receive buffer is not empty

Bit 0 – URXBF UART RX Buffer Full Status bit

Value Description
1Receive buffer is full
0Receive buffer is not full

16.5.5 UARTx Baud Rate Register Low

Name: UxBRG

Offset: 0x540, 0x120, 0xF08

Bit 15 14 13 12 11 10 9 8

BRG[15:8]
AccessR/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0
Bit7 6 5 4 3 2 1 0
BRG[7:0]
AccessR/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0

Bits 15:0 - BRG[15:0] Baud Rate Divisor bits

16.5.6 UARTx Baud Rate Register High

Name: UxBRGH

Offset: 0x542, 0x122, 0xF0A

Microchip dsPIC33CK1024MP708 - UARTx Baud Rate Register High - 1

text_image Bit 15 14 13 12 11 10 9 8 Access Reset Bit 7 6 5 4 3 2 1 0 BRG[19:16] Access R/W R/W R/W R/W Reset 0 0 0 0

Bits 3:0 - BRG[19:16] Baud Rate Divisor bits

16.5.7 UARTx Receive Buffer Register

Name: UxRXREG

Offset: 0x544, 0x124, 0xF0C

Legend: x = Bit is unknown

Bit 15 14 13 12 11 10 9 8

Access

Reset

Bit 76543210

RXREG[7:0]

Access

RRRRRRRR

Reset xxxxxxxx

Bits 7:0 – RXREG[7:0] Received Character Data bits 7-0

16.5.8 UARTx Transmit Buffer Register

Name: UxTXREG

Offset: 0x548, 0x128, 0xF10

Legend: x = Bit is unknown

Bit 15 14 13 12 11 10 9 8

LAST

Access W

Reset x

Bit 76543210
TXREG[7:0]

Access W W W W W W W W
Reset xxxxxxxx

Bit 15 – LAST Last Byte Indicator for Smart Card Support bit

Bits 7:0 - TXREG[7:0] Transmitted Character Data bits 7-0

If the buffer is full, further writes to the buffer are ignored.

16.5.9 UARTx Timing Parameter 1 Register

Name: UxP1

Offset: 0x54C, 0x12C, 0xF14

Bit 15 14 13 12 11 10 9 8

P1[8]
Access Reset 0R/W

Bit 76543210

P1[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 8:0 - P1[8:0] Parameter 1 bits

DMX TX:

Number of Bytes to Transmit - 1 (not including Start code).

LIN Commander TX:

PID to transmit (bits[5:0]).

Asynchronous TX with Address Detect:

Address to transmit. A '1' is automatically inserted into bit 9 (bits[7:0]).

Smart Card Mode:

Guard Time Counter bits. This counter is operated on the bit clock whose period is always equal to one ETU (bits[8:0]).

Other Modes:

Not used.

16.5.10 UARTx Timing Parameter 2 Register

Name: UxP2

Offset: 0x54E, 0x12E, 0xF16

Bit 15 14 13 12 11 10 9 8

P2[8]
Access Reset 0R/W

Bit 76543210

P2[7:0]
AccessR/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0

Bits 8:0 - P2[8:0] Parameter 2 bits

DMX RX:

The first byte number to receive -1, not including Start code (bits[8:0]).

LIN Responder TX:

Number of bytes to transmit (bits[7:0]).

Asynchronous RX with Address Detect:

Address to start matching (bits[7:0]).

Smart Card Mode:

Block Time Counter bits. This counter is operated on the bit clock whose period is always equal to one ETU (bits[8:0]).

Other Modes:

Not used.

16.5.11 UARTx Timing Parameter 3 Register Low

Name: UxP3

Offset: 0x550, 0x130, 0xF18

Bit 15 14 13 12 11 10 9 8

P3[15:8]
AccessR/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0
Bit7 6 5 4 3 2 1 0
P3[7:0]
AccessR/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0

Bits 15:0 – P3[15:0] Parameter 3 bits

DMX RX:

The last byte number to receive - 1, not including Start code (bits[8:0]).

LIN Responder RX:

Number of bytes to receive (bits[7:0]).

Asynchronous RX:

Used to mask the UxP2 address bits; 1 = P2 address bit is used, 0 = P2 address bit is masked off (bits[7:0]).

Smart Card Mode:

Waiting Time Counter bits (bits[15:0]).

Other Modes:

Not used.

16.5.12 UARTx Timing Parameter 3 Register High

Name: UxP3H

Offset: 0x552, 0x132, 0xF1A

Bit 15 14 13 12 11 10 9 8

Microchip dsPIC33CK1024MP708 - UARTx Timing Parameter 3 Register High - 1

text_image Access Reset

Bit 76543210

Microchip dsPIC33CK1024MP708 - UARTx Timing Parameter 3 Register High - 2

text_image P3[23:16] Access R/W R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0

Bits 7:0 – P3[23:16] Parameter 3 High bits

Smart Card Mode:

Waiting Time Counter bits (bits[23:16]).

Other Modes:

Not used.

16.5.13 UARTx Transmit Checksum Register

Name: UxTXCHK

Offset: 0x554, 0x134, 0xF1C

Bit 15 14 13 12 11 10 9 8

Microchip dsPIC33CK1024MP708 - UARTx Transmit Checksum Register - 1

text_image Access Reset

Bit 76543210

TXCHK[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 7:0 - TXCHK[7:0] Transmit Checksum bits (calculated from TX words)

LIN Modes:

COEN = 1: Sum of all transmitted data + addition carries, including PID.

COEN = 0: Sum of all transmitted data + addition carries, excluding PID.

LIN Responder:

Cleared when Break is detected.

LIN Commander/Responder:

Cleared when Break is detected.

Other Modes:

COEN = 1: Sum of every byte transmitted + addition carries.

COEN = 0: Value remains unchanged.

16.5.14 UARTx Receive Checksum Register

Name: UxRXCHK

Offset: 0x556, 0x136, 0xF1E

Bit 15 14 13 12 11 10 9 8

Microchip dsPIC33CK1024MP708 - UARTx Receive Checksum Register - 1

text_image Access Reset

Bit 76543210

RXCHK[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 7:0 - RXCHK[7:0] Receive Checksum bits (calculated from RX words)

LIN Modes:

COEN = 1: Sum of all received data + addition carries, including PID.

COEN = 0: Sum of all received data + addition carries, excluding PID.

LIN Responder:

Cleared when Break is detected.

LIN Commander/Responder:

Cleared when Break is detected.

Other Modes:

COEN = 1: Sum of every byte received + addition carries.

COEN = 0: Value remains unchanged.

16.5.15 UARTx Smart Card Configuration Register

Name: UxSCCON

Offset: 0x558, 0x138, 0xF20

Bit 15 14 13 12 11 10 9 8

Microchip dsPIC33CK1024MP708 - UARTx Smart Card Configuration Register - 1

text_image Access Reset

Bit 76543210

Microchip dsPIC33CK1024MP708 - UARTx Smart Card Configuration Register - 2

text_image TXRPT[1:0] CONV TOPD PRTCL Access R/W R/W R/W R/W Reset 0 0 0 0 0

Bits 5:4 - TXRPT[1:0] Transmit Repeat Selection bits

ValueDescription
11Retransmits the error byte four times
10Retransmits the error byte three times
01Retransmits the error byte twice
00Retransmits the error byte once

Bit 3 - CONV Logic Convention Selection bit

ValueDescription
1Inverse logic convention
0Direct logic convention

Bit 2 - TOPD Pull-Down Duration for T = 0 Error Handling bit

ValueDescription
12 ETU
01 ETU

Bit 1 – PRTCL Smart Card Protocol Selection bit

ValueDescription
1T = 1
0T = 0

16.5.16 UARTx Smart Card Interrupt Register

Name: UxSCINT

Offset: 0x55A, 0x13A, 0xF22

Legend: HS = Hardware Settable bit

Bit 15 14 13 12 11 10 9 8

RXRPTIF TXRPTIF BTCIF WTCIF GTCIF
Access ResetR/W/HS R/W/HS0 0R/W/HS R/W/HS R/W/HS0 0 0

Bit 76543210

RXRPTIETXRPTIEBTCIEWTCIEGTCIE
AccessR/WR/WR/WR/WR/W
Reset0 00 0 0

Bit 13 - RXRPTIF Receive Repeat Interrupt Flag bit

Value Description
1Parity error has persisted after the same character has been received five times (four retransmits)
0Flag is cleared

Bit 12 - TXRPTIF Transmit Repeat Interrupt Flag bit

Value Description
1Line error has been detected after the last retransmit per TXRPT[1:0]
0Flag is cleared

Bit 10 – BTCIF Block Time Counter Interrupt Flag bit

Value Description
1Block Time Counter has reached 0
0Block Time Counter has not reached 0

Bit 9 – WTCIF Waiting Time Counter Interrupt Flag bit

Value Description
1Waiting Time Counter has reached 0
0Waiting Time Counter has not reached 0

Bit 8 – GTCIF Guard Time Counter Interrupt Flag bit

Value Description
1Guard Time Counter has reached 0
0Guard Time Counter has not reached 0

Bit 5 – RXRPTIE Receive Repeat Interrupt Enable bit

Value Description
1An interrupt is invoked when a parity error has persisted after the same character has been received five times (four retransmits)
0Interrupt is disabled

Bit 4 – TXRPTIE Transmit Repeat Interrupt Enable bit

Value Description
1An interrupt is invoked when a line error is detected after the last retransmit per TXRPT[1:0] has been completed
0Interrupt is disabled

Bit 2 – BTCIE Block Time Counter Interrupt Enable bit

Value Description
1Block Time Counter interrupt is enabled

Value Description

0Block Time Counter interrupt is disabled

Bit 1 – WTCIE Waiting Time Counter Interrupt Enable bit
Value Description

1Waiting Time Counter interrupt is enabled
0Waiting Time Counter interrupt is disabled

Bit 0 – GTCIE Guard Time Counter Interrupt Enable bit
Value Description

1Guard Time Counter interrupt is enabled
0Guard Time Counter interrupt is disabled

16.5.17 UARTx Interrupt Register

Name: UxINT

Offset: 0x55C, 0x13C, 0xF24

Legend: HS = Hardware Settable bit

Bit 15 14 13 12 11 10 9 8

Microchip dsPIC33CK1024MP708 - UARTx Interrupt Register - 1

text_image Access Reset

Bit 76543210

Microchip dsPIC33CK1024MP708 - UARTx Interrupt Register - 2

text_image WUIF ABDIF ABDIE Access R/W/HS R/W/HS R/W Reset 0 0 0

Bit 7 – WUIF Wake-up Interrupt Flag bit

ValueDescription
1Sets when WAKE = 1 and RX makes a ‘1’ to ‘0’ transition; triggers event interrupt (must be cleared by software)
0WAKE is not enabled or WAKE is enabled, but no wake-up event has occurred

Bit 6 – ABDIF Auto-Baud Completed Interrupt Flag bit

ValueDescription
1Sets when ABD sequence makes the final ‘1’ to ‘0’ transition; triggers event interrupt (must be cleared by software)
0ABAUD is not enabled or ABAUD is enabled but auto-baud has not completed

Bit 2 – ABDIE Auto-Baud Completed Interrupt Enable Flag bit

ValueDescription
1Allows ABDIF to set an event interrupt
0ABDIF does not set an event interrupt

17. Serial Peripheral Interface (SPI)

Note: This data sheet summarizes the features of the dsPIC33CK1024MP710 family of devices. It is not intended to be a comprehensive reference source. To complement the information in this data sheet, refer to "Serial Peripheral Interface (SPI) with Audio Codec Support" (www.microchip.com/DS70005136) in the "dsPIC33/PIC24 Family Reference Manual".

The Serial Peripheral Interface (SPI) module is a synchronous serial interface, useful for communicating with other peripheral or microcontroller devices. These peripheral devices may be serial EEPROMs, shift registers, display drivers, A/D Converters, etc. The SPI module is compatible with the Motorola ^® SPI and SIOP interfaces. All devices in the dsPIC33CK1024MP710 family include three SPI modules.

The module supports operation in two Buffer modes. In Standard mode, data are shifted through a single serial buffer. In Enhanced Buffer mode, data are shifted through a FIFO buffer. The FIFO level depends on the configured mode.

Note: FIFO depth for this device is four (in 8-Bit Data mode).

Variable length data can be transmitted and received, from 2 to 32 bits.

Note: Do not perform Read-Modify-Write operations (such as bit-oriented instructions) on the SPIxBUF register in either Standard or Enhanced Buffer mode.

The module also supports Audio modes. Four different Audio modes are available.

  • I^2 S mode
  • Left Justified mode
  • Right Justified mode
  • PCM/DSP mode

In each of these modes, the serial clock is free-running and audio data are always transferred.

The SPI serial interface consists of four pins:

  • SDlx: Serial Data Input
  • SDOx: Serial Data Output
    • SCKx: Shift Clock Input or Output

The SPI module can be configured to operate using two, three or four pins.

The SPI module has the ability to generate three interrupts, reflecting the events that occur during the data communication. The following types of interrupts can be generated:

  1. Receive interrupts are signaled by SPIxRXIF. This event occurs when:

- RX watermark interrupt

- SPIROV = 1

- SPIRBF = 1

- SPIRBE = 1

provided the respective mask bits are enabled in SPIxIMSKL/H.

  1. Transmit interrupts are signalled by SPIxTXIF. This event occurs when:

– TX watermark interrupt

- SPITUR = 1

- SPITBF = 1

- SPITBE = 1

provided the respective mask bits are enabled in SPIxIMSKL/H.

  1. General interrupts are signalled by SPIxGIF. This event occurs when:
- FRMERR = 1
- SPIBUSY = 1
- SRMT = 1 

provided the respective mask bits are enabled in SPIxIMSKL/H.

Block diagrams of the module in Standard and Enhanced modes are shown in Figure 17-1 and Figure 17-2.

Note: In this section, the SPI modules are referred to together as SPIx, or separately as SPI1, SPI2 or SPI3. Special Function Registers will follow a similar notation. For example, SPIxCON1 and SPIxCON2 refer to the control registers for any of the three SPI modules.

To set up the SPIx module for the Standard Host mode of operation:

  1. If using interrupts:

a. Clear the interrupt flag bits in the respective IFSx register.
b. Set the interrupt enable bits in the respective IECx register.
c. Write the SPIxIP bits in the respective IPCx register to set the interrupt priority.

  1. Write the desired settings to the SPIxCON1L and SPIxCON1H registers with the MSTEN bit (SPIxCON1L[5]) = 1.
  2. Clear the SPIROV bit (SPIxSTATL[6]).
  3. Enable SPIx operation by setting the SPIEN bit (SPIxCON1L[15]).
  4. Write the data to be transmitted to the SPIxBUFL and SPIxBUFH registers. Transmission (and reception) will start as soon as data are written to the SPIxBUFL and SPIxBUFH registers.

To set up the SPIx module for the Standard Client mode of operation:

  1. Clear the SPIxBUF registers.
  2. If using interrupts:

a. Clear the SPIxBUFL and SPIxBUFH registers.
b. Set the interrupt enable bits in the respective IECx register.
c. Write the SPIxIP bits in the respective IPCx register to set the interrupt priority.

  1. Write the desired settings to the SPIxCON1L, SPIxCON1H and SPIxCON2L registers with the MSTEN bit (SPIxCON1L[5]) = 0.
  2. Clear the SMP bit.
  3. If the CKE bit (SPIxCON1L[8]) is set, then the SSEN bit (SPIxCON1L[7]) must be set to enable the pin.
  4. Clear the SPIROV bit (SPIxSTATL[6]).
  5. Enable SPIx operation by setting the SPIEN bit (SPIxCON1L[15]).

Figure 17-1. SPIx Module Block Diagram (Standard Mode)
Microchip dsPIC33CK1024MP708 - Serial Peripheral Interface (SPI) - 1

flowchart
graph TD
    A["Read"] --> B["SPIxRXB"]
    C["Write"] --> D["SPIxTXB"]
    B --> E["SPIxRXSR"]
    D --> F["SPIxTXSR"]
    E --> G["Shift Control"]
    F --> H["MSB"]
    G --> I["Clock Control"]
    H --> J["Edge Select"]
    I --> K["Clock Control"]
    J --> L["Edge Select"]
    K --> M["Baud Rate Generator"]
    L --> M
    M --> N["Enable Host Clock"]
    O["Internal Data Bus"] --> P["SPIxURDT"]
    Q["SCKx"] --> R["Edge Select"]
    R --> S["Clock Control"]
    T["SCKx/FSYNC"] --> U["SSx & FSYNC Control"]
    V["SDOx"] --> W["Shift Control"]
    X["SDIx"] --> Y["SPIxRXSR"]
    Z["MSB"] --> AA["SPIxTXSR"]
    AB["TXELM 5:0"] = 6'b0] --> AC["MCLKEN"]
    AD["URETEN"] --> AE["REFO"]
    AF["Fp"] --> AG["Fp"]

To set up the SPIx module for the Enhanced Buffer Host mode of operation:

  1. If using interrupts:

a. Clear the interrupt flag bits in the respective IFSx register.
b. Set the interrupt enable bits in the respective IECx register.
c. Write the SPIxIP bits in the respective IPCx register.

  1. Write the desired settings to the SPIxCON1L, SPIxCON1H and SPIxCON2L registers with MSTEN (SPIxCON1L[5]) = 1.

  2. Clear the SPIROV bit (SPIxSTATL[6]).

  3. Select Enhanced Buffer mode by setting the ENHBUF bit (SPIxCON1L[0]).
  4. Enable SPIx operation by setting the SPIEN bit (SPIxCON1L[15]).
  5. Write the data to be transmitted to the SPIxBUFL and SPIxBUFH registers. Transmission (and reception) will start as soon as data are written to the SPIxBUFL and SPIxBUFH registers.

To set up the SPIx module for the Enhanced Buffer Client mode of operation:

  1. Clear the SPIxBUFL and SPIxBUFH registers.
  2. If using interrupts:

a. Clear the interrupt flag bits in the respective IFSx register.
b. Set the interrupt enable bits in the respective IECx register.
c. Write the SPIxIP bits in the respective IPCx register to set the interrupt priority.

  1. Write the desired settings to the SPIxCON1L, SPIxCON1H and SPIxCON2L registers with the MSTEN bit (SPIxCON1L[5]) = 0.
  2. Clear the SMP bit.
  3. If the CKE bit is set, then the SSEN bit must be set, thus enabling the pin.
  4. Clear the SPIROV bit (SPIxSTATL[6]).
  5. Select Enhanced Buffer mode by setting the ENHBUF bit (SPIxCON1L[0]).
  6. Enable SPIx operation by setting the SPIEN bit (SPIxCON1L[15]).

Figure 17-2. SPIx Module Block Diagram (Enhanced Mode)
Microchip dsPIC33CK1024MP708 - Serial Peripheral Interface (SPI) - 2

flowchart
graph TD
    A["Internal Data Bus"] --> B["Read"]
    B --> C["SPIxRXB"]
    B --> D["SPIxTXB"]
    B --> E["SPIxURDT"]
    C --> F["SPIxRXSR"]
    D --> G["SPIxTXSR"]
    E --> H["MSB"]
    F --> I["Shift Control"]
    G --> J["MSB"]
    I --> K["Clock Control"]
    J --> L["Edge Select"]
    K --> M["Edge Select"]
    L --> N["Baud Rate Generator"]
    M --> O["Enable Host Clock"]
    N --> P["TXELM 5:0"]=6'b0
    O --> Q["MCLKEN"]
    P --> R["URETEN"]
    Q --> S["REFO"]
    R --> T["FP"]
    S --> U["SCLKX"]
    T --> V["SCKX"]
    U --> W["SSx and FSYNC Control"]
    V --> X["SDOx"]
    W --> Y["SDIx"]
    X --> Z["SSx/FSYNC"]
    Y --> F
    Z --> F
    F --> K
    K --> L
    L --> M

To set up the SPIx module for Audio mode:

  1. Clear the SPIxBUFL and SPIxBUFH registers.
  2. If using interrupts:

a. Clear the interrupt flag bits in the respective IFSx register.
b. Set the interrupt enable bits in the respective IECx register.
c. Write the SPIxIP bits in the respective IPCx register to set the interrupt priority.

  1. Write the desired settings to the SPIxCON1L, SPIxCON1H and SPIxCON2L registers with AUDEN (SPIxCON1H[15]) = 1.
  2. Clear the SPIROV bit (SPIxSTATL[6]).
  3. Enable SPIx operation by setting the SPIEN bit (SPIxCON1L[15]).

  4. Write the data to be transmitted to the SPIxBUFL and SPIxBUFH registers. Transmission (and reception) will start as soon as data are written to the SPIxBUFL and SPIxBUFH registers.

Figure 17-3. SPIx Main Connection (Standard Mode)
Microchip dsPIC33CK1024MP708 - Serial Peripheral Interface (SPI) - 3

flowchart
graph TD
    subgraph Processor 1 (SPIx Host)
        A["Serial Receive Buffer (SPIxRXB)^(2)"] --> B["Shift Register (SPIxRXSR)"]
        B --> C["MSb"]
        B --> D["LSb"]
        E["Shift Register (SPIxTXSR)"] --> F["Serial Transmit Buffer (SPIxTXB)^(2)"]
        F --> G["MSb"]
        F --> H["LSb"]
        I["SPIx Buffer (SPIxBUF)^(2)"] --> J["Shift Register (SPIxTXSR)"]
        J --> K["MSb"]
        J --> L["LSb"]
    end

    subgraph Processor 2 (SPIx Client)
        M["Serial Transmit Buffer (SPIxTXB)^(2)"] --> N["Shift Register (SPIxTXSR)"]
        N --> O["MSb"]
        N --> P["LSb"]
        Q["Shift Register (SPIxRXSR)"] --> R["Serial Receive Buffer (SPIxRXB)^(2)"]
        R --> S["MSb"]
        R --> T["LSb"]
        U["Serial Clock"] --> V["SCKx"]
        W["SSx^(1)"] --> X["SCKx"]
    end

    A --> B
    B --> C
    C --> D
    D --> E
    E --> F
    F --> G
    G --> H
    H --> I
    I --> J
    J --> K
    K --> L
    L --> M
    M --> N
    N --> O
    O --> P
    P --> R
    R --> S
    S --> T
    T --> U
    U --> V
    V --> W
    W --> X
    X --> Y
    Y --> Z
    Z --> M

Note1: Using the SSx pin in Client mode of operation is optional.
2: User must write transmit data to read the received data from SPIxBUF. The SPIxTXB and SPIxRXB registers are memory-mapped to SPIxBUF.

Figure 17-4. SPIx Main Connection (Enhanced Buffer Modes)
Microchip dsPIC33CK1024MP708 - Serial Peripheral Interface (SPI) - 4

flowchart
graph TD
    subgraph Processor 1 (SPIx Host)
        A["Serial Receive FIFO (SPIxRXB)^(2)"] --> B["Shift Register (SPIxRXSR)"]
        B --> C["MSb"]
        B --> D["LSb"]
        E["Shift Register (SPIxTXSR)"] --> F["Serial Transmit FIFO (SPIxTXB)^(2)"]
        F --> G["MSb"]
        F --> H["LSb"]
        I["SPIx Buffer (SPIxBUF)^(2)"] --> J["MSb"]
        I --> K["LSb"]
    end

    subgraph Processor 1 (SPIx Client)
        L["Serial Transmit FIFO (SPIxTXB)^(2)"] --> M["Shift Register (SPIxTXSR)"]
        M --> N["MSb"]
        M --> O["LSb"]
        P["Shift Register (SPIxRXSR)"] --> Q["Serial Receive FIFO (SPIxRXB)^(2)"]
        Q --> R["MSb"]
        Q --> S["LSb"]
        T["SSx^(1)"] --> U["SCKx"]
        T --> V["SCKx"]
        W["Serial Clock"] --> X["SCKx"]
    end

    A --> B
    B --> C
    C --> D
    D --> E
    E --> F
    F --> G
    G --> H
    H --> I
    I --> J
    J --> K
    K --> L
    L --> M
    M --> N
    N --> O
    O --> P
    P --> Q
    Q --> R
    R --> S
    S --> T
    T --> U
    U --> V
    V --> W
    W --> P

Note 1: Using the SSx pin in Client mode is optional.
2: User must write transmit data to read the received data from SPIxBUF. The SPIxTXB and SPIxRXB registers are memory-mapped to SPIxBUF.

Equation 17-1. Relationship Between Device and SPIx Clock Speed

$$ \text { Baud Rate } = \frac {F P}{(2 * (S P I x B R G + 1))} $$

Where:

F_P is the Peripheral Bus Clock Frequency

17.1 SPI Control/Status Registers

OffsetName Bit Pos. 765 43210
0x02E4 SPI3CON1L15:8 SPIEN SPISIDL DISSDO MODE32 and MODE16[1:0] SMP CKE
7:0SSENCKPMSTENDISSDIDISSCKMCLKENSPIFEENHBUF
0x02E6 SPI3CON1H15:8AUDENSPISGNEXTIGNROVIGNTURAUDMONOURDTENAUDMOD[1:0]
7:0FRMENFRMSYNCFRMPOLMSSENFRMSYPWFRMCNT[2:0]
0x02E8 SPI3CON2L15:8
7:0WLENGTH[4:0]
0x02EA ... 0x02EBReserved
0x02ECSPI3STATL15:8FRMERRSPIBUSYSPITUR
7:0SRMTSPIROVSPIRBESPITBESPITBFSPIRBF
0x02EE SPI3STATH15:8RXELM[5:0]
7:0TXELM[5:0]
0x02F0SPI3BUFL15:8SPI3BUFL[15:8]
7:0SPI3BUFL[7:0]
0x02F2SPI3BUFH15:8SPI3BUFH[15:8]
7:0SPI3BUFH[7:0]
0x02F4 ... 0x02F7Reserved
0x02F8 SPI3IMSKL15:8FRMERRRENBUSYENSPITUREN
7:0 SRMTEN SPIROVEN SPIRBEN SPITBEN SPITBFEN SPIRBFEN
0x02FA SPI3IMSKH15:8 RXWIENRXMSK[5:0]
7:0 TXWIENTXMSK[5:0]
0x02FC SPI3URDTL15:8SPI3URDTL[15:8]
7:0SPI3URDTL[7:0]
0x02FESPI3URDTH15:8SPI3URDTH[31:24]
7:0SPI3URDTH[23:16]
0x0300 ... 0x04E3Reserved
0x04E4 SPI2CON1L15:8 SPIEN SPISIDL DISSDO MODE32 and MODE16[1:0] SMP CKE
7:0SSENCKPMSTENDISSDIDISSCKMCLKENSPIFEENHBUF
0x04E6 SPI2CON1H15:8AUDENSPISGNEXTIGNROVIGNTURAUDMONOURDTENAUDMOD[1:0]
7:0FRMENFRMSYNCFRMPOLMSSENFRMSYPWFRMCNT[2:0]
0x04E8 SPI2CON2L15:8
7:0WLENGTH[4:0]
0x04EA ... 0x04EBReserved
0x04ECSPI2STATL15:8FRMERRSPIBUSYSPITUR
7:0SRMTSPIROVSPIRBESPITBESPITBFSPIRBF
0x04EE SPI2STATH15:8RXELM[5:0]
7:0TXELM[5:0]
0x04F0SPI2BUFL15:8SPI2BUFL[15:8]
7:0SPI2BUFL[7:0]
0x04F2SPI2BUFH15:8SPI2BUFH[15:8]
7:0SPI2BUFH[7:0]
0x04F4 SPI2BRGL15:8SPI2BRGL[12:8]
7:0SPI2BRGL[7:0]
0x04F6 ... 0x04F7Reserved
0x04F8 SPI2IMSKL15:8FRMERRRENBUSYENSPITUREN
7:0 SRMTEN SPIROVEN SPIRBEN SPITBEN SPITBFEN SPIRBFEN
0x04FA SPI2IMSKH15:8 RXWIENRXMSK[5:0]
7:0 TXWIENTXMSK[5:0]
0x04FC SPI2URDTL15:8SPI2URDTL[15:8]
7:0SPI2URDTL[7:0]
OffsetNameBit Pos. 7 6 54 3 2 1 0
0x04FE SPI2URDTH15:8 SPI2URDTH[31:24]
7:0 SPI2URDTH[23:16]
0x0500 ... 0x055FReserved
0x0560 SPI1CON1L15:8SPIENSPISIDLDISSDOMODE32 and MODE16[1:0]SMPCKE
7:0SSENCKPMSTENDISSDIDISSCKMCLKENSPIFEENHBUF
0x0562SPI1CON1H15:8AUDENSPISGNEXTIGNROVIGNTURAUDMONOURDTENAUDMOD[1:0]
7:0FRMENFRMSYNCFRMPOLMSSENFRMSYPWFRMCNT[2:0]
0x0564 SPI1CON2L15:8
7:0WLENGTH[4:0]
0x0566 ... 0x0567Reserved
0x0568SPI1STATL15:8FRMERRSPIBUSYSPITUR
7:0SRMTSPIROVSPIRBESPITBESPITBFSPIRBF
0x056ASPI1STATH15:8RXELM[5:0]
7:0TXELM[5:0]
0x056C SPI1BUFL15:8SPI1BUFL[15:8]
7:0SPI1BUFL[7:0]
0x056ESPI1BUFH15:8SPI1BUFH[15:8]
7:0SPI1BUFH[7:0]
0x0570 SPI1BRGL15:8SPI1BRGL[12:8]
7:0SPI1BRGL[7:0]
0x0572 ... 0x0573Reserved
0x0574SPI1IMSKL15:8FRMERRENBUSYENSPITUREN
7:0SRMTENSPIROVENSPIRBENSPITBENSPITBFENSPIRBFEN
0x0576 SPI1IMSKH15:8RXWIENRXMSK[5:0]
7:0TXWIENTXMSK[5:0]
0x0578 SPI1URDTL15:8SPI1URDTL[15:8]
7:0SPI1URDTL[7:0]
0x057ASPI1URDTH15:8 SPI1URDTH[31:24]
7:0 SPI1URDTH[23:16]

17.1.1 SPI3 Buffer Register Low

Name: SPI3BUFL Offset: 0x2F0

Bit 15 14 13 12 11 10 9 8
SPI3BUFL[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
SPI3BUFL[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0

Bits 15:0 – SPI3BUFL[15:0] SPI Buffer Low bits

17.1.2 SPI3 Buffer Register High

Name: SPI3BUFH
Offset: 0x2F2

Bit 15 14 13 12 11 10 9 8
SPI3BUFH[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
SPI3BUFH[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0

Bits 15:0 – SPI3BUFH[15:0] SPI3 Buffer High bits

17.1.3 SPIx Control Register 1 Low

Name: SPIxCON1L

Offset: 0x560, 0x4E4, 0x2E4

Notes:

  1. When AUDEN = 1, this module functions as if CKE = 0, regardless of its actual value.
  2. When FRMEN = 1, SSEN is not used.
  3. MCLKEN can only be written when the SPIEN bit = 0.
  4. This channel is not meaningful for DSP/PCM mode as LRC follows FRMSYPW.

Bit 15 14 13 12 11 10 9 8

SPIENSPISIDL DISSDO MODE32 and MODEE16[1:0] SMPCKE
AccessR/WR/WR/WR/WR/WR/WR/W
Reset00 0 0 0 0 0

Bit 76543210

SSENCKPMSTENDISSDIDISSCKMCLKENSPIFEENHBUF
AccessR/WR/WR/WR/WR/WR/WR/WR/W
Reset0 0 0 0 0 0 0

Bit 13 – SPISIDL SPIx Stop in Idle Mode bit

ValueDescription
1Halts in CPU Idle mode
0Continues to operate in CPU Idle mode

Bit 12 – DISSDO Disable SDOx Output Port bit

ValueDescription
1SDOx pin is not used by the module; pin is controlled by port function
0SDOx pin is controlled by the module

Bits 11:10 - MODE32 and MODE16[1:0] Serial Word Length Select bits ^(1,4)

MODE32 MODE16AUDENCommunication
1x032-Bit
0116-Bit
008-Bit
11124-Bit Data, 32-Bit FIFO, 32-Bit Channel/64-Bit Frame
1032-Bit Data, 32-Bit FIFO, 32-Bit Channel/64-Bit Frame
0116-Bit Data, 16-Bit FIFO, 32-Bit Channel/64-Bit Frame
0016-Bit FIFO, 16-Bit Channel/32-Bit Frame

Bit 9 – SMP SPIx Data Input Sample Phase bit

Client Mode:

Input data are always sampled at the middle of data output time, regardless of the SMP setting.

Host Mode:

ValueDescription
1Input data are sampled at the end of data output time
0Input data are sampled at the middle of data output time

Bit 8 – CKE SPIx Clock Edge Select bit ^(1)

Value Description
1Transmit happens on transition from Active Clock state to Idle Clock state
0Transmit happens on transition from Idle Clock state to Active Clock state

Bit 7 – SSEN Client Select Enable bit (Client mode) ^(2)

Value Description
1 pin is used by the macro in Client mode; pin is used as the Client select input
0 pin is not used by the macro ( pin will be controlled by the port I/O)

Bit 6 – CKP Clock Polarity Select bit

Value Description
1Idle state for clock is a high level; Active state is a low level
0Idle state for clock is a low level; Active state is a high level

Bit 5 – MSTEN Host Mode Enable bit

Value Description
1Host mode
0Client mode

Bit 4 – DISSDI Disable SDIx Input Port bit

Value Description
1SDIx pin is not used by the module; pin is controlled by port function
0SDIx pin is controlled by the module

Bit 3 – DISSCK Disable SCKx Output Port bit

Value Description
1SCKx pin is not used by the module; pin is controlled by port function
0SCKx pin is controlled by the module

Bit 2 – MCLKEN Host Clock Enable bit ^(3)

Value Description
1REFO is used by the BRG
0PBCLK is used by the BRG

Bit 1 – SPIFE Frame Sync Pulse Edge Select bit

Value Description
1Frame Sync pulse (Idle-to-active edge) coincides with the first bit clock
0Frame Sync pulse (Idle-to-active edge) precedes the first bit clock

Bit 0 – ENHBUF Enhanced Buffer Enable bit

Value Description
1Enhanced Buffer mode is enabled
0Enhanced Buffer mode is disabled

17.1.4 SPIx Control Register 1 High

Name: SPIxCON1H

Offset: 0x562, 0x4E6, 0x2E6

Notes:

  1. AUDEN can only be written when the SPIEN bit = 0.

  2. AUDMONO can only be written when the SPIEN bit = 0 and is only valid for AUDEN = 1.

  3. URDTEN is only valid when IGNTUR = 1.

  4. AUDMOD[1:0] can only be written when the SPIEN bit = 0 and is only valid when AUDEN = 1. When NOT in PCM/DSP mode, this module functions as if FRMSYPW = 1, regardless of its actual value.

Bit 15 14 13 12 11 10 9 8

AUDEN SPISGNEXT IGNROV|IGNTUR AUDMONO URDTEN AUSDMOD[1:0]
AccessR/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0

Bit 76543210

FRMENFRMSYNCFRMPOLMSSENFRMSYPWFRMCNT[2:0]
AccessR/WR/WR/WR/WR/WR/W
Reset000000

Bit 15 – AUDEN Audio Codec Support Enable bit ^(1)

ValueDescription
1Audio protocol is enabled; MSTEN controls the direction of both SCKx and frame (a.k.a. LRC), and this module functions as if FRMEN = 1, FRMSYNC = MSTEN, FRMCNT[2:0] = 0.01 and SMP = 0, regardless of their actual values
0Audio protocol is disabled

Bit 14 – SPISGNEXT SPIx Sign-Extend RX FIFO Read Data Enable bit

ValueDescription
1Data from RX FIFO are sign-extended
0Data from RX FIFO are not sign-extended

Bit 13 – IGNROV Ignore Receive Overflow bit

ValueDescription
1A Receive Overflow (ROV) is NOT a critical error; during ROV, data in the FIFO are not overwritten by the receive data
0A ROV is a critical error that stops SPI operation

Bit 12 – IGNTUR Ignore Transmit Underrun bit

ValueDescription
1A Transmit Underrun (TUR) is NOT a critical error and data indicated by URDTEN are transmitted until the SPIxTXB is not empty
0A TUR is a critical error that stops SPI operation

Bit 11 - AUDMONO Audio Data Format Transmit bit ^(2)

ValueDescription
1Audio data are mono (i.e., each data word is transmitted on both left and right channels)
0Audio data are stereo

Bit 10 - URDTEN Transmit Underrun Data Enable bit ^(3)

ValueDescription
1Transmits data out of SPIxURDT register during Transmit Underrun conditions
0Transmits the last received data during Transmit Underrun conditions

Bits 9:8 – AUDMOD[1:0] Audio Protocol Mode Selection bits ^(4)

Value Description
11PCM/DSP mode
10Right Justified mode: This module functions as if SPIFE = 1, regardless of its actual value
01Left Justified mode: This module functions as if SPIFE = 1, regardless of its actual value
00 I^2S mode: This module functions as if SPIFE = 0, regardless of its actual value

Bit 7 – FRMEN Framed SPIx Support bit

Value Description
1Framed SPIx support is enabled (SSx pin is used as the FSYNC input/output)
0Framed SPIx support is disabled

Bit 6 – FRMSYNC Frame Sync Pulse Direction Control bit

Value Description
1Frame Sync pulse input (Client)
0Frame Sync pulse output (Host)

Bit 5 – FRMPOL Frame Sync/Client Select Polarity bit

Value Description
1Frame Sync pulse/Client select is active-high
0Frame Sync pulse/Client select is active-low

Bit 4 – MSSEN Host Mode Client Select Enable bit

Value Description
1SPIx Client select support is enabled with polarity determined by FRMPOL ( pin is automatically driven during transmission in Host mode)
0Client select SPIx support is disabled ( pin will be controlled by port I/O)

Bit 3 – FRMSYPW Frame Sync Pulse-Width bit

Value Description
1Frame Sync pulse is one serial word length wide (as defined by MODE[32,16]/WLENGTH[4:0])
0Frame Sync pulse is one clock (SCKx) wide

Bits 2:0 – FRMCNT[2:0] Frame Sync Pulse Counter bits
Controls the number of serial words transmitted per Sync pulse.

Value Description
111Reserved
110Reserved
101Generates a Frame Sync pulse on every 32 serial words
100Generates a Frame Sync pulse on every 16 serial words
011Generates a Frame Sync pulse on every 8 serial words
010Generates a Frame Sync pulse on every 4 serial words
001Generates a Frame Sync pulse on every 2 serial words (value used by audio protocols)
000Generates a Frame Sync pulse on each serial word

17.1.5 SPIx Control Register 2 Low

Name: SPIxCON2L

Offset: 0x564, 0x4E8, 0x2E8

Notes:

  1. These bits are effective when AUDEN = 0 only.
  2. Varying the length by changing these bits does not affect the depth of the TX/RX FIFO.

Microchip dsPIC33CK1024MP708 - Notes: - 1

text_image Bit 15 14 13 12 11 10 9 8 Access Reset Bit 7 6 5 4 3 2 1 0 WLENGTH[4:0] Access R/W R/W R/W R/W R/W Reset 0 0 0 0 0

Bits 4:0 – WLENGTH[4:0] Variable Word Length bits ^(1,2)

ValueDescription
1111132-bit data
1111031-bit data
1110130-bit data
1110029-bit data
1101128-bit data
1101027-bit data
1100126-bit data
1100025-bit data
1011124-bit data
1011023-bit data
1010122-bit data
1010021-bit data
1001120-bit data
1001019-bit data
1000118-bit data
1000017-bit data
0111116-bit data
0111015-bit data
0110114-bit data
0110013-bit data
0101112-bit data
0101011-bit data
0100110-bit data
010009-bit data
001118-bit data
001107-bit data
001016-bit data
001005-bit data
000114-bit data
000103-bit data
000012-bit data
00000See MODE[32,16] bits in SPIxCON1L[11:10]

17.1.6 SPIx Status Register Low

Name: SPIxSTATL

Offset: 0x568, 0x4EC, 0x2EC

Note:

  1. SPITUR is cleared when SPIEN = 0. When IGNTUR = 1, SPITUR provides dynamic status of the Transmit Underrun condition, but does not stop RX/TX operation and does not need to be cleared by software.

Legend: C = Clearable bit; HS = Hardware Settable bit; HSC = Hardware Settable/Clearable bit

Bit 15 14 13 12 11 10 9 8

FRMERR SPIBUSY$PITUR
Access ResetR/C/HS0 0R/HSCR/HSC0

Bit 76543210

SRMTSPIROVSPIRBESPITBESPITBFSPIRBF
AccessR/HSCR/C/HSR/HSCR/HSCR/HSCR/HSC
Reset0 0 110 0

Bit 12 - FRMERR SPIx Frame Error Status bit

ValueDescription
1Frame error is detected
0No frame error is detected

Bit 11 – SPIBUSY SPIx Activity Status bit

ValueDescription
1Module is currently busy with some transactions
0No ongoing transactions (at time of read)

Bit 8 – SPITUR SPIx Transmit Underrun Status bit ^(1)

ValueDescription
1Transmit buffer has encountered a Transmit Underrun condition
0Transmit buffer does not have a Transmit Underrun condition

Bit 7 – SRMT Shift Register Empty Status bit

ValueDescription
1No current or pending transactions (i.e., neither SPIxTXB or SPIxTXSR contains data to transmit)
0Current or pending transactions

Bit 6 – SPIROV SPIx Receive Overflow Status bit

ValueDescription
1A new byte/half-word/word has been completely received when the SPIxRXB was full
0No overflow

Bit 5 – SPIRBE SPIx RX Buffer Empty Status bit

Standard Buffer Mode:

Automatically set in hardware when SPIxBUF is read from, reading SPIxRXB. Automatically cleared in hardware when SPIx transfers data from SPIxRXSR to SPIxRXB.

Enhanced Buffer Mode:

Indicates RXELM[5:0] = 000000.

ValueDescription
1RX buffer is empty
0RX buffer is not empty

Bit 3 – SPITBE SPIx Transmit Buffer Empty Status bit

Standard Buffer Mode:

Automatically set in hardware when SPIx transfers data from SPIxTXB to SPIxTXSR. Automatically cleared in hardware when SPIxBUF is written, loading SPIxTXB.

Enhanced Buffer Mode:

Indicates TXELM[5:0] = 000000.

Value Description
1SPIxTXB is empty
0SPIxTXB is not empty

Bit 1 – SPITBF SPIx Transmit Buffer Full Status bit

Standard Buffer Mode:

Automatically set in hardware when SPIxBUF is written, loading SPIxTXB. Automatically cleared in hardware when SPIx transfers data from SPIxTXB to SPIxTXSR.

Enhanced Buffer Mode:

Indicates TXELM[5:0] = 111111.

Value Description
1SPIxTXB is full
0SPIxTXB not full

Bit 0 – SPIRBF SPIx Receive Buffer Full Status bit

Standard Buffer Mode:

Automatically set in hardware when SPIx transfers data from SPIxRXSR to SPIxRXB. Automatically cleared in hardware when SPIxBUF is read from, reading SPIxRXB.

Enhanced Buffer Mode:

Indicates RXELM[5:0] = 111111.

Value Description
1SPIxRXB is full
0SPIxRXB is not full

17.1.7 SPIx Status Register High

Name: SPIxSTATH

Offset: 0x56A, 0x4EE, 0x2EE

Notes:

  1. RXELM3 and TXELM3 bits are only present when FIFODEPTH = 8 or higher.
  2. RXELM4 and TXELM4 bits are only present when FIFODEPTH = 16 or higher.
  3. RXELM5 and TXELM5 bits are only present when FIFODEPTH = 32.

Legend: HSC = Hardware Settable/Clearable bit

Microchip dsPIC33CK1024MP708 - Notes: - 1

text_image Bit 15 14 13 12 11 10 9 8 RXELM[5:0] Access R/HSC R/HSC R/HSC R/HSC R/HSC Reset 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 TXELM[5:0] Access R/HSC R/HSC R/HSC R/HSC R/HSC Reset 0 0 0 0 0 0

Bits 13:8 – RXELM[5:0] Receive Buffer Element Count bits (valid in Enhanced Buffer mode) ^(1,2,3)

Bits 5:0 – TXELM[5:0] Transmit Buffer Element Count bits (valid in Enhanced Buffer mode) ^(1,2,3)

17.1.8 SPI1 Buffer Register Low

Name: SPI1BUFL Offset: 0x56C

Bit 15 14 13 12 11 10 9 8
SPI1BUFL[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
SPI1BUFL[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0

Bits 15:0 – SPI1BUFL[15:0] SPI 1 Buffer Low bits

17.1.9 SPI1 Buffer Register High

Name: SPI1BUFH Offset: 0x56E

Bit 15 14 13 12 11 10 9 8
SPI1BUFH[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
SPI1BUFH[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0

Bits 15:0 – SPI1BUFH[15:0] SPI1 Buffer High bits

17.1.10 SPI2 Buffer Register Low

Name: SPI2BUFL Offset: 0x4F0

Bit 15 14 13 12 11 10 9 8
SPI2BUFL[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
SPI2BUFL[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0

Bits 15:0 – SPI2BUFL[15:0] SPI Buffer Low bits

17.1.11 SPI2 Buffer Register High

Name: SPI2BUFH Offset: 0x4F2

Bit 15 14 13 12 11 10 9 8
SPI2BUFH[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
SPI2BUFH[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0

Bits 15:0 – SPI2BUFH[15:0] SPI2 Buffer High bits

17.1.12 SPIx Baud Rate Generator Register Low

Name: SPIxBRGL

Offset: 0x570, 0x4F4

Note:

  1. Changing the BRG value when SPIEN = 1 causes undefined behavior.

Microchip dsPIC33CK1024MP708 - Note: - 1

text_image Bit 15 14 13 12 11 10 9 8 SPIxBRGL[12:8] Access R/W R/W R/W R/W R/W Reset 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 SPIxBRGL[7:0] Access R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0

Bits 12:0 – SPIxBRGL[12:0] SPI Baud Rate Generator Divisor bits ^(1)

17.1.13 SPIx Interrupt Mask Register Low

Name: SPIxIMSKL

Offset: 0x574, 0x4F8, 0x2F8

Bit 15 14 13 12 11 10 9 8

FRMERRENBUSYENSPITUREN
Access ResetR/WR/WR/W
000

Bit 76543210

SRMTENSPIROVENSPIRBENSPITBENSPITBFENSPIRBFEN
AccessR/WR/WR/WR/WR/W
Reset00000

Bit 12 – FRMERREN Enable Interrupt Events via FRMERR bit

ValueDescription
1Frame error generates an interrupt event
0Frame error does not generate an interrupt event

Bit 11 – BUSYEN Enable Interrupt Events via SPIBUSY bit

ValueDescription
1SPIBUSY generates an interrupt event
0SPIBUSY does not generate an interrupt event

Bit 8 – SPITUREN Enable Interrupt Events via SPITUR bit

ValueDescription
1Transmit Underrun (TUR) generates an interrupt event
0Transmit Underrun does not generate an interrupt event

Bit 7 – SRMTEN Enable Interrupt Events via SRMT bit

ValueDescription
1Shift Register Empty (SRMT) generates interrupt events
0Shift Register Empty does not generate interrupt events

Bit 6 – SPIROVEN Enable Interrupt Events via SPIROV bit

ValueDescription
1SPIx Receive Overflow (ROV) generates an interrupt event
0SPIx Receive Overflow does not generate an interrupt event

Bit 5 – SPIRBEN Enable Interrupt Events via SPIRBE bit

ValueDescription
1SPIx RX buffer empty generates an interrupt event
0SPIx RX buffer empty does not generate an interrupt event

Bit 3 – SPITBEN Enable Interrupt Events via SPITBE bit

ValueDescription
1SPIx transmit buffer empty generates an interrupt event
0SPIx transmit buffer empty does not generate an interrupt event

Bit 1 – SPITBFEN Enable Interrupt Events via SPITBF bit

ValueDescription
1SPIx transmit buffer full generates an interrupt event
0SPIx transmit buffer full does not generate an interrupt event

Bit 0 – SPIRBFEN Enable Interrupt Events via SPIRBF bit

Value Description
1SPIx receive buffer full generates an interrupt event
0SPIx receive buffer full does not generate an interrupt event

17.1.14 SPIx Interrupt Mask Register High

Name: SPIxIMSKH

Offset: 0x576, 0x4FA, 0x2FA

Notes:

  1. Mask values higher than FIFODEPTH are not valid. The module will not trigger a match for any value in this case.
  2. RXMSK2 and TXMSK2 bits are only present when FIFODEPTH = 8 or higher.
  3. RXMSK3 and TXMSK3 bits are only present when FIFODEPTH = 16 or higher.
  4. RXMSK4 and TXMSK4 bits are only present when FIFODEPTH = 32.

Bit 15 14 13 12 11 10 9 8

RXWIEN RXMSK[5:0]
AccessR/W R/W R/W R/W R/W R/W R/W
Reset00 0 0 0 0 0
Bit7 6 5 4 3 2 1 0
TXWIENTXMSK[5:0]
AccessR/W R/W R/W R/W R/W R/W R/W
Reset00 0 0 0 0 0

Bit 15 – RXWIEN Receive Watermark Interrupt Enable bit

ValueDescription
1Triggers receive buffer element watermark interrupt when RXMSK[5:0] ≤ RXELM[5:0]
0Disables receive buffer element watermark interrupt

Bits 13:8 - RXMSK[5:0] RX Buffer Mask bits ^(1,2,3,4)

RX mask bits; used in conjunction with the RXWIEN bit.

Bit 7 – TXWIEN Transmit Watermark Interrupt Enable bit

ValueDescription
1Triggers transmit buffer element watermark interrupt when TXMSK[5:0] = TXELM[5:0]
0Disables transmit buffer element watermark interrupt

Bits 5:0 - TXMSK[5:0] TX Buffer Mask bits ^(1,2,3,4)

TX mask bits; used in conjunction with the TXWIEN bit.

17.1.15 SPIx Underrun Data Register Low

Name: SPIxURDTL

Offset: 0x578, 0x4FC, 0x2FC

Bit 15 14 13 12 11 10 9 8

SPIxURDTL[15:8]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

SPIxURDTL[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 15:0 – SPIxURDTL[15:0] SPI Underrun Data bits

These bits are only used when URDTEN = 1. This register holds the data to transmit when a Transmit Underrun condition occurs.

When the MODE[32:16] or WLENGTH[4:0] bits select 16 to 9-bit data, the SPIx only uses URDATA[15:0]. When the MODE[32:16] or WLENGTH[4:0] bits select 8 to 2-bit data, the SPIx only uses URDATA[7:0].

17.1.16 SPIx Underrun Data Register Low

Name: SPIxURDTH

Offset: 0x57A, 0x4FE, 0x2FE

Bit 15 14 13 12 11 10 9 8

SPIxURDTH[31:24]
AccessR/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0
Bit7 6 5 4 3 2 1 0
SPIxURDTH[23:16]
AccessR/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0

Bits 15:0 – SPIxURDTH[31:16] SPI Underrun Data bits

These bits are only used when URDTEN = 1. This register holds the data to transmit when a Transmit Underrun condition occurs. When the MODE[32:16] or WLENGTH[4:0] bits select 32 to 25-bit data, the SPIx only uses URDATA[31:16]. When the MODE[32:16] or WLENGTH[4:0] bits select 24 to 17-bit data, the SPIx only uses URDATA[23:16].

18. Inter-Integrated Circuit (I ^2 C)

Note: This data sheet summarizes the features of the dsPIC33CK1024MP710 family of devices. It is not intended to be a comprehensive reference source. For more information, refer to “Inter-Integrated Circuit (I²C)” (www.microchip.com/DS70000195).

The Inter-Integrated Circuit ( I^2C ) module is a serial interface useful for communicating with other peripheral or microcontroller devices. These peripheral devices may be serial EEPROMs, display drivers, A/D Converters, etc.

The I ^2 C module supports these features:

  • 7-Bit and 10-Bit Device Addresses
  • General Call Address as Defined in the I²C Protocol
  • Both 100 kHz and 400 kHz Bus Specifications
  • Configurable Address Masking
  • Multi-Host modes to Prevent Loss of Messages in Arbitration
  • Bus Repeater mode, Allowing the Acceptance of All Messages as a Client, regardless of the Address
  • Automatic SCL

A block diagram of the module is shown in Figure 18-1.

18.1 Communicating as a Host in a Single Host Environment

The details of sending a message in Host mode depends on the communication protocol for the device being communicated with. Typically, the sequence of events is as follows:

  1. Assert a Start condition on SDAx and SCLx.
  2. Send the ^1 C device address byte to the Client with a write indication.
  3. Wait for and verify an Acknowledge from the Client.
  4. Send the first data byte (sometimes known as the command) to the Client.
  5. Wait for and verify an Acknowledge from the Client.
  6. Send the serial memory address low byte to the Client.
  7. Repeat Steps 4 and 5 until all data bytes are sent.
  8. Assert a Repeated Start condition on SDAx and SCLx.
  9. Send the device address byte to the Client with a read indication.
  10. Wait for and verify an Acknowledge from the Client.
  11. Enable Host reception to receive serial memory data.
  12. Generate an ACK or NACK condition at the end of a received byte of data.
  13. Generate a Stop condition on SDAx and SCLx.

Figure 18-1. I2Cx Block Diagram
Microchip dsPIC33CK1024MP708 - Communicating as a Host in a Single Host Environment - 1

flowchart
graph TD
    A["SCLx"] --> B["Shift Clock"]
    C["SDAx"] --> D["Match Detect"]
    B --> E["I2CxRCV"]
    D --> F["I2CxRSR"]
    F --> G["Address Match"]
    G --> H["I2CxMSK"]
    H --> I["Write"]
    H --> J["Read"]
    K["Start and Stop Bit Detect"] --> L["Control Logic"]
    M["Start and Stop Bit Generation"] --> L
    N["Collision Detect"] --> L
    O["Acknowledge Generation"] --> L
    P["Clock Stretching"] --> L
    Q["I2CxTRN"] --> R["LSB"]
    S["Shift Clock"] --> T["BRG Down Counter"]
    U["Reload Control"] --> V["I2CxBRG"]
    W["Tcy/2"] --> X["I2CxBRG"]
    Y["I2CxSTAT"] --> Z["Write"]
    AA["I2CxCONL/H"] --> AB["Write"]
    AC["Internal Data Bus"] --> AD["Read"]
    AE["Write"] --> AF["Read"]
    AG["Write"] --> AH["Read"]

18.2 Setting Baud Rate When Operating as a Bus Main

To compute the Baud Rate Generator reload value, use Equation 18-1.

Equation 18-1. Computing Baud Rate Reload Value ^(1,2,3)

$$ 1 2 C x B R G = \left(\left(1 / F _ {S C L} - D e l a y\right) \cdot F _ {P} / 2\right) - 2 $$

Notes:

  1. These clock rate values are for guidance only. The actual clock rate should be measured in its intended application.
  2. Typical value of delay varies from 110 ns to 150 ns.
  3. I2CxBRG values of 0 to 3 are expressly forbidden. The user should never program the I2CxBRG with a value of 0x0, 0x1, 0x2 or 0x3 as indeterminate results may occur.

18.3 Client Address Masking

The I2CxMSK register (18.5.5. I2CxMSK) designates address bit positions as "don't care" for both 7-Bit and 10-Bit Addressing modes. Setting a particular bit location (= 1) in the I2CxMSK register causes the Client module to respond, whether the corresponding address bit value is a '0' or a '1'. For example, when I2CxMSK is set to '0010000000', the Client module will detect both addresses, '0000000000' and '0010000000'.

To enable address masking, the Intelligent Peripheral Management Interface (IPMI) must be disabled by clearing the STRICT bit (I2CxCONL[11]).

Note: As a result of changes in the I²C protocol, the addresses in Table 18-2 are reserved and will not be Acknowledged in Client mode. This includes any address mask settings that include any of these addresses.

Table 18-1. I2Cx Clock Rates ^(1,2)

F_CY F_SCL I2CxBRG Value
Decimal Hexadecimal
100 MHz 1 MHz 41 29
100 MHz 400 kHz 116 74
100 MHz 100 kHz 491 1EB
80 MHz 1 MHz 32 20
80 MHz 400 kHz 92 5C
80 MHz 100 kHz 392 188
60 MHz 1 MHz 24 18
60 MHz 400 kHz 69 45
60 MHz 100 kHz 294 126
40 MHz 1 MHz 15 0F
40 MHz 400 kHz 45 2D
40 MHz 100 kHz 195 C3
20 MHz 1 MHz 77
20 MHz 400 kHz 22 16
20 MHz 100 kHz 97 61
Notes:1. Based on F_CY=F_OSD/2 ; Doze mode and PLL are disabled.2. These clock rate values are for guidance only. The actual clock rate can be affected by various system-level parameters. The actual clock rate should be measured in its intended application.

Table 18-2. I2Cx Reserved Addresses ^(1)

Client Address R/W Bit Description
00000000General Call Address ^(2)
00000001Start Byte
0000001xCbus Address
000001xxReserved
00001xxxHS Mode Host Code
11110xxx10-Bit Client Upper Byte ^(3)
11111xxxReserved

Note:

  1. The address bits listed here will never cause an address match independent of address mask settings.
  2. This address will be Acknowledged only if GCEN = 1.
  3. A match on this address can only occur on the upper byte in 10-Bit Addressing mode.

18.4 SMBus Support

The dsPIC33CK1024MP710 family devices have support for SMBus through options in the input voltage thresholds. There are two control bits to select one of three options: SMEN (I2CxCONL[8]) and Configuration bit, SMB3EN (FDEVOPT[10]). 18.5.1. I2CxCONL details the setting of these control bits.

Table 18-3. I²C Pin Voltage Threshold

SMEN SFR Bit (I2CxCONL[8]) SMB3EN Configuration Bit (FDEVOPT[10])
I^2C (default)0x
SMBus 2.010
SMBus 3.011

18.5 I2C Control/Status Registers

OffsetNameBit Pos. 76543210
0x0500 I2C1CONL15:8 I2CEN I2CSIDL SCLREL STRICT A10M DISSLW SMEN
7:0 GCEN STREN ACKDT ACKEN RCEN PEN RSEN SEN
0x0502 I2C1CONH15:8
7:0PCIESCIEBOENSDAHTSBCDEAHENDHEN
0x0504 I2C1STAT15:8ACKSTATTRSTATACKTIMBCLGCSTATADD10
7:0IWCOLI2COVD/APSR/WRBFTBF
0x0506 ... 0x0507Reserved
0x0508 I2C1ADD15:8ADD[9:8]
7:0ADD[7:0]
0x050A ... 0x050BReserved
0x050C I2C1MSK15:8AMSK[9:8]
7:0AMSK[7:0]
0x050E ... 0x050FReserved
0x0510 I2C1BRG15:8I2CBRG[15:8]
7:0I2CBRG[7:0]
0x0512 ... 0x0513Reserved
0x0514 I2C1TRN15:8
7:0I2CTXDATA[7:0]
0x0516 ... 0x0517Reserved
0x0518 I2C1RCV15:8
7:0I2CRXDATA[7:0]
0x051A ... 0x051BReserved
0x051C I2C2CONL15:8 I2CEN I2CSIDL SCLREL STRICT A10M DISSLW SMEN
7:0 GCEN STREN ACKDT ACKENRCEN PEN RSEN SEN
0x051E I2C2CONH15:8
7:0PCIESCIEBOENSDAHTSBCDEAHENDHEN
0x0520 I2C2STAT15:8ACKSTATTRSTATACKTIMBCLGCSTATADD10
7:0IWCOLI2COVD/APSR/WRBFTBF
0x0522 ... 0x0523Reserved
0x0524 I2C2ADD15:8ADD[9:8]
7:0ADD[7:0]
0x0526 ... 0x0527Reserved
0x0528I2C2MSK15:8AMSK[9:8]
7:0AMSK[7:0]
0x052A ... 0x052BReserved
0x052C I2C2BRG15:8I2CBRG[15:8]
7:0I2CBRG[7:0]
0x052E ... 0x052FReserved
0x0530 I2C2TRN15:8
7:0I2CTXDATA[7:0]
0x0532...0x0533Reserved
0x0534 I2C2RCV15:8
7:0 I2CRXDATA[7:0]
0x0536...0x0F5BReserved
0x0F5C I2C3CONL15:8 I2CEN I2CSIDL SCLREL STRICT A10M DISSLW SMEN
7:0GCENSTRENACKDTACKENRCENPENRSENSEN
0x0F5E I2C3CONH15:8
7:0PCIESCIEBOENSDAHTSBCDEAHENDHEN
0x0F60 I2C3STAT15:8ACKSTATTRSTATACKTIMBCLGCSTATADD10
7:0IWCOLI2COVD/APSR/WRBFTBF
0x0F62...0x0F63Reserved
0x0F64 I2C3ADD15:8ADD[9:8]
7:0ADD[7:0]
0x0F66...0x0F67Reserved
0x0F68 I2C3MSK15:8AMSK[9:8]
7:0AMSK[7:0]
0x0F6A...0x0F6BReserved
0x0F6C I2C3BRG15:8I2CBRG[15:8]
7:0I2CBRG[7:0]
0x0F6E...0x0F6FReserved
0x0F70 I2C3TRN15:8
7:0 I2CTXDATA[7:0]
0x0F72...0x0F73Reserved
0x0F74I2C3RCV15:8
7:0 I2CRXDATA[7:0]

18.5.1 I2Cx Control Register Low

Name: 12CxCONL

Offset: 0x500, 0x51C, 0xF5C

Notes:

  1. Automatically cleared to '0' at the beginning of Client transmission; automatically cleared to '0' at the end of Slave reception.
  2. Automatically cleared to '0' at the beginning of Client transmission.

Legend: HC = Hardware Clearable bit

Bit 15 14 13 12 11 10 9 8

I2CENI2CSIDLSCLRELSTRICTA10MDISSLWSMEN
AccessR/WR/W/HCR/WR/WR/WR/WR/W
Reset00 1 0 0 0 0

Bit 76543210

GCENSTRENACKDTACKENRCENPENRSENSEN
AccessR/WR/WR/WR/W/HCR/W/HCR/W/HCR/W/HCR/W/HC
Reset0 0 0 0 0 0 0 0

Bit 15 - I2CEN I2Cx Enable bit (writable from software only)

ValueDescription
1Enables the I2Cx module, and configures the SDAx and SCLx pins as serial port pins
0Disables the I2Cx module; all I^2C pins are controlled by port functions

Bit 13 - I2CSIDL I2Cx Stop in Idle Mode bit

ValueDescription
1Discontinues module operation when device enters Idle mode
0Continues module operation in Idle mode

Bit 12 – SCLREL SCLx Release Control bit (I²C Client mode only) ^(1)
If STREN = 1: (2)

User software may write '0' to initiate a clock stretch and write '1' to release the clock. Hardware clears at the beginning of every Client data byte transmission. Hardware clears at the end of every Client address byte reception. Hardware clears at the end of every Client data byte reception.
If STREN = 0:
User software may only write '1' to release the clock. Hardware clears at the beginning of every Client data byte transmission. Hardware clears at the end of every Client address byte reception.

ValueDescription
1Releases the SCLx clock
0Holds the SCLx clock low (clock stretch)

Bit 11 – STRICT I2Cx Strict Reserved Address Rule Enable bit

ValueDescription
1Strict reserved addressing is enforced; for reserved addresses.(In Client Mode) – The device doesn’t respond to reserved address space and addresses falling in that category are NACKed.(In Host Mode) – The device is allowed to generate addresses with reserved address space.
0Reserved addressing would be Acknowledged.(In Client Mode) – The device will respond to an address falling in the reserved address space. When there is a match with any of the reserved addresses, the device will generate an ACK.(In Host Mode) – Reserved.

Bit 10 – A10M 10-Bit Client Address Flag bit

Value Description
1I2CxADD is a 10-bit Client address
0I2CxADD is a 7-bit Client address

Bit 9 – DISSLW Slew Rate Control Disable bit

Value Description
1Slew rate control is disabled for Standard Speed mode (100 kHz, also disabled for 1 MHz mode)
0Slew rate control is enabled for High-Speed mode (400 kHz)

Bit 8 – SMEN SMBus Input Levels Enable bit

Value Description
1Enables input logic so thresholds are compliant with the SMBus specification
0Disables SMBus-specific inputs

Bit 7 – GCEN General Call Enable bit (in I²C Client mode only)

Value Description
1Enables interrupt when a general call address is received in I2CxRSR; module is enabled for reception
0General call address is disabled.

Bit 6 – STREN SCLx Clock Stretch Enable bit
In I ^2 C Client mode only; used in conjunction with the SCLREL bit.

Value Description
1Enables clock stretching
0Disables clock stretching

Bit 5 – ACKDT Acknowledge Data bit
In I ^2 C Host mode during Host Receive mode. The value that will be transmitted when the user initiates an Acknowledge sequence at the end of a receive.

In I ^2 C Client mode when AHEN = 1 or DHEN = 1. The value that the Client will transmit when it initiates an Acknowledge sequence at the end of an address or data reception.

Value Description
1NACK is sent
0ACK is sent

Bit 4 – ACKEN Acknowledge Sequence Enable bit
In I ^2 C Host mode only; applicable during Host Receive mode.

Value Description
1Initiates Acknowledge sequence on SDAx and SCLx pins, and transmits ACKDT data bit
0Acknowledge sequence is Idle

Bit 3 – RCEN Receive Enable bit (in I²C Host mode only)

Value Description
1Enables Receive mode for I^2C ; automatically cleared by hardware at end of 8-bit receive data byte
0Receive sequence is not in progress

Bit 2 – PEN Stop Condition Enable bit (in I²C Host mode only)

Value Description
1Initiates Stop condition on SDAx and SCLx pins
0Stop condition is Idle

Bit 1 – RSEN Restart Condition Enable bit (in I²C Host mode only)

Value Description
1Initiates Restart condition on SDAx and SCLx pins
0Restart condition is Idle

Bit 0 – SEN Start Condition Enable bit (in I²C Host mode only)

Value Description

1Initiates Start condition on SDAx and SCLx pins
0Start condition is Idle

18.5.2 I2Cx Control Register High

Name: I2CxCONH

Offset: 0x502, 0x51E, 0xF5E

Bit 15 14 13 12 11 10 9 8

Access Reset

Bit 76543210

PCIE SCIE BOEN SDAHTSBCDEAHENDHEN
AccessR/WR/WR/WR/WR/WR/WR/W
Reset0 0 0 0 0 0

Bit 6 – PCIE Stop Condition Interrupt Enable bit

ValueDescription
1Enables interrupt on detection of Stop condition
0Stop detection interrupts are disabled

Bit 5 – SCIE Start Condition Interrupt Enable bit

ValueDescription
1Enables interrupt on detection of Start or Restart conditions
0Start detection interrupts are disabled

Bit 4 – BOEN Buffer Overwrite Enable bit

ValueDescription
1I2CxRCV is updated and an ACK is generated for a received address/data byte, ignoring the state of the I2COV bit only if RBF bit = 0
0I2CxRCV is only updated when I2COV is clear

Bit 3 – SDAHT SDAx Hold Time Selection bit

ValueDescription
1Minimum of 300 ns hold time on SDAx after the falling edge of SCLx
0Minimum of 100 ns hold time on SDAx after the falling edge of SCLx

Bit 2 – SBCDE Client Mode Bus Collision Detect Enable bit

If, on the rising edge of SCLx, SDAx is sampled low when the module is outputting a High state, the BCL bit is set and the bus goes Idle. This Detection mode is only valid during data and ACK transmit sequences.

ValueDescription
1Enables Client bus collision interrupts
0Client bus collision interrupts are disabled

Bit 1 – AHEN Address Hold Enable bit

ValueDescription
1Following the 8th falling edge of SCLx for a matching received address byte; SCLREL bit (I2CxCONL[12]) will be cleared and the SCLx will be held low
0Address holding is disabled

Bit 0 – DHEN Data Hold Enable bit

ValueDescription
1Following the 8th falling edge of SCLx for a received data byte; Client hardware clears the SCLREL bit (I2CxCONL[12]) and SCLx is held low
0Data holding is disabled

18.5.3 I2Cx Status Register

Name: I2CxSTAT

Offset: 0x504, 0x520, 0xF60

Legend: C = Clearable bit; HS = Hardware Settable bit; HSC = Hardware Settable/Clearable bit

Bit 15 14 13 12 11 10 9 8

ACKSTAT TRSTAT ACKTIMBCL GCSTATADD10
AccessR/HSCR/HSCR/HSCR/C/HSCR/HSCR/HSC
Reset0 0 00 0 0

Bit 76543210

IWCOLI2COVD/APSR/WRBFTBF
AccessR/C/HSR/C/HSR/HSCR/HSCR/HSCR/HSCR/HSCR/HSC
Reset0 0 0 0 0 0 0 0

Bit 15 – ACKSTAT Acknowledge Status bit (updated in all Host and Client modes)

ValueDescription
1Acknowledge was not received from Client
0Acknowledge was received from Client

Bit 14 - TRSTAT Transmit Status bit (when operating as fC Host; applicable to Host transmit operation)

ValueDescription
1Host transmit is in progress (eight bits + ACK)
0Host transmit is not in progress

Bit 13 - ACKTIM Acknowledge Time Status bit (valid in I²C Client mode only)

ValueDescription
1Indicates I^2C bus is in an Acknowledge sequence, set on 8th falling edge of SCLx clock
0Not an Acknowledge sequence, cleared on 9th rising edge of SCLx clock

Bit 10 - BCL Bus Collision Detect bit

(Host/Client mode; cleared when I²C module is disabled, I2CEN = 0)

ValueDescription
1A bus collision has been detected during a Host or Client transmit operation
0No bus collision has been detected

Bit 9 – GCSTAT General Call Status bit (cleared after Stop detection)

ValueDescription
1General call address was received
0General call address was not received

Bit 8 - ADD10 10-Bit Address Status bit (cleared after Stop detection)

ValueDescription
110-bit address was matched
010-bit address was not matched

Bit 7 – IWCOL I2Cx Write Collision Detect bit

ValueDescription
1An attempt to write to the I2CxTRN register failed because the module is busy; must be cleared in software
0No collision
Value Description
1A byte was received while the I2CxRCV register is still holding the previous byte; I2COV is a “don’t care” in Transmit mode, must be cleared in software
0No overflow

Bit 6 – I2COV I2Cx Receive Overflow Flag bit

Bit 5 - D/A Data/Address bit (when operating as I²C Client)

Value Description
1Indicates that the last byte received was data
0Indicates that the last byte received or transmitted was an address

Bit 4 - P 12Cx Stop bit

Updated when Start, Reset or Stop is detected; cleared when the I²C module is disabled, I2CEN = 0.

Value Description
1Indicates that a Stop bit has been detected last
0Stop bit was not detected last

Bit 3 - S 12Cx Start bit

Updated when Start, Reset or Stop is detected; cleared when the I²C module is disabled, I2CEN = 0.

Value Description
1Indicates that a Start (or Repeated Start) bit has been detected last
0Start bit was not detected last

Bit 2 - R/W Read/Write Information bit (when operating as I²C Client)

Value Description
1Read: Indicates the data transfer is output from the Client
0Write: Indicates the data transfer is input to the Client

Bit 1 – RBF Receive Buffer Full Status bit

Value Description
1Receive is complete, I2CxRCV is full
0Receive is not complete, I2CxRCV is empty

Bit 0 – TBF Transmit Buffer Full Status bit

Value Description
1Transmit is in progress, I2CxTRN is full (eight bits of data)
0Transmit is complete, I2CxTRN is empty

18.5.4 I2Cx Address Register

Name: I2CxADD

Offset: 0x508, 0x524, 0xF64

Bit 15 14 13 12 11 10 9 8

ADD[9:8]
Access Reset 0 0R/W R/W

Bit 76543210

ADD[7:0]
AccessR/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0

Bits 9:0 – ADD[9:0] I2Cx Address bits

18.5.5 I2Cx Client Mode Address Mask Register

Name: I2CxMSK

Offset: 0x50C, 0x528, 0xF68

Bit 15 14 13 12 11 10 9 8

AMSK[9:8]
Access Reset 0 0R/W R/W

Bit 76543210

AMSK[7:0]
AccessR/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0

Bits 9:0 – AMSK[9:0] I2Cx Mask for Address Bit x Select bits

Value Description
1Enables masking for bit x of the incoming message address; bit match is not required in this position
0Disables masking for bit x; bit match is required in this position

18.5.6 I2Cx Baud Rate Generator Register

Name: 12CxBRG

Offset: 0x510, 0x52C, 0xF6C

Bit 15 14 13 12 11 10 9 8

I2CBRG[15:8]
AccessR/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0
Bit7 6 5 4 3 2 1 0
I2CBRG[7:0]
AccessR/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0

Bits 15:0 – I2CBRG[15:0] I2Cx Baud Rate Generator bits

18.5.7 I2Cx Transmit Register

Name: 12CxTRN

Offset: 0x514, 0x530, 0xF70

Microchip dsPIC33CK1024MP708 - I2Cx Transmit Register - 1

text_image Bit 15 14 13 12 11 10 9 8 Access Reset Bit 7 6 5 4 3 2 1 0 I2CTXDATA[7:0] Access R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0

Bits 7:0 - I2CTXDATA[7:0] I2Cx Transmit Data bits

18.5.8 I2Cx Receive Register

Name: 12CxRCV

Offset: 0x518, 0x534, 0xF74

Microchip dsPIC33CK1024MP708 - I2Cx Receive Register - 1

text_image Bit 15 14 13 12 11 10 9 8 Access Reset Bit 7 6 5 4 3 2 1 0 I2CRXDATA[7:0] Access R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0

Bits 7:0 – I2CRXDATA[7:0] I2Cx Receive Data bits

19. Parallel Main Port (PMP)

Notes:

  1. This data sheet summarizes the features of the dsPIC33CK1024MP710 family of devices. It is not intended to be a comprehensive reference source. To complement the information in this data sheet, refer to "Parallel Main Port (PMP)" (www.microchip.com/DS70005344).
  2. Not all device variants include the PMP. Refer to dsPIC33CK1024MP710 Product Families for availability.

The Parallel Main Port (PMP) is a parallel 8-bit/16-bit I/O module specifically designed to communicate with a wide variety of parallel devices, such as communication peripherals, LCDs, external memory devices and microcontrollers. Because the interfaces to parallel peripherals vary significantly, the PMP module is highly configurable. The key features of the PMP module include:

  • Main and Secondary Operating modes
  • Up to 16 Programmable Address Lines
  • Up to Two Chip Select Lines
  • Programmable Strobe Options:

- Individual read and write strobes or read/write strobe with enable strobe

  • Address Auto-Increment/Auto-Decrement
  • Programmable Address/Data Multiplexing
  • Programmable Polarity on Control Signals
    • Legacy Parallel Port Support
    • Enhanced Parallel Support:

- Address support

– Four bytes deep, auto-incrementing buffer

• Schmitt Trigger or TTL Input Buffers
• Programmable Wait States
- Dual Buffer Mode with Separate Read and Write Registers
- Read Initiate Control

Figure 19-1. PMP Module Pinout and Connections to External Devices
Microchip dsPIC33CK1024MP708 - Notes: - 1

flowchart
graph TD
    A["Parallel Main Port"] --> B["PMA0\nPMALL"]
    A --> C["PMA1\nPMALH"]
    A --> D["PMA[13:2"]]
    A --> E["PMA14\nPMCS1"]
    A --> F["PMA15\nPMCS2"]
    A --> G["PMRD\nPMRD/PMWR"]
    A --> H["PMWR\nPMENB"]
    A --> I["PMA[7:0"]\nPMA["15:8"]\nPMD["7:0"]\nPMD["15:8"]]
    B --> J["Up to 16-Bit Address"]
    C --> J
    D --> J
    E --> J
    F --> J
    G --> J
    H --> J
    I --> J
    J --> K["EEPROM"]
    K --> L["Microcontroller"]
    K --> M["LCD"]
    K --> N["FIFO Buffer"]
    L <--> O["8-Bit/16-Bit Data (with or without Multiplexed Addressing)"]
    M <--> O
    N <--> O

19.1 Parallel Main Port Control Registers

OffsetName Bit Pos. 7 6 5 4 3 2 1 0
0x01A8 PMCON15:8 ONSIDL ADRMUX[1:0] PMPTTL PTWREN PTRDEN
7:0CSF[1:0]ALPCS2PCS1PWRSP RDSP
0x01AAPMCONH15:8
7:0RDSTARTDUALBUF
0x01AAPMADDR15:8CS2/ADDR15CS1/ADDR14ADDR[13:0]
7:0ADDR[13:0]
0x01AAPMRADDR(2)15:8RCS2/RADDR15RCS1/RADDR14RADDR[13:0]
7:0RADDR[13:0]
0x01ACPMMODE15:8BUSYIRQM[1:0]INCM[1:0]MODE16MODE[1:0]
7:0WAITB[1:0]WAITM[3:0]WAITE[1:0]
0x01AE ... 0x01B3Reserved
0x01B4 PMDOUT115:8DATAOUT[15:8]
7:0DATAOUT[7:0]
0x01B6 PMDOUT215:8DATAOUT[31:24]
7:0DATAOUT[23:16]
0x01B8 PMDIN115:8DATAIN[15:8]
7:0DATAIN[7:0]
0x01BA PMDIN215:8DATAIN[31:24]
7:0DATAIN[23:16]
0x01BCPMAEN15:8 PTEN[15:14]PTEN[15:10]
7:0PTEN[9:4]PTEN[1:0]
0x01BE ... 0x01BFReserved
0x01C0 PMSTAT15:8 IBFIBOVIB[3:0]F
7:0OBEOBUFOB[3:0]E
0x01C2 ... 0x01C3Reserved
0x01C4PMWADDR(2)15:8WCS2/WADDR15WCS1/WADDR14WADDR[13:0]
7:0WADDR[13:0]
0x01C6 ... 0x01CBReserved
0x01CCPMRDIN(1)15:8RDATAIN[15:8]
7:0RDATAIN[7:0]

19.1.1 PMP Control Register

Name: PMCON

Offset: 0x1A8

Note:

  1. These bits have no effect when their corresponding pins are used as address lines.

Bit 15 14 13 12 11 10 9 8

ONSIDLADRMUX[1:0]PMPTTLPTWRENPTRDEN
AccessR/WR/WR/WR/WR/WR/WR/WR/WR/WR/WR/W
Reset00000

Bit 76543210

CSF[1:0]ALPCS2PCS1PWRSPRDSP
AccessR/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 00 0

Bit 15 - ON Parallel Main Port Enable bit

ValueDescription
1PMP is enabled
0PMP is disabled, no off-chip access is performed

Bit 13 – SIDL PMP Stop in Idle Mode bit

ValueDescription
1Discontinues module operation when device enters Idle mode
0Continues module operation when device enters Idle mode

Bits 12:11 – ADRMUX[1:0] Address/Data Multiplexing Selection bits

ValueDescription
11All 16 bits of address are multiplexed with the 16 bits of data (PMPA[15:0]/PMPD[15:0]) using two phases
10All 16 bits of address are multiplexed with the lower 8 bits of data (PMPA[15:8]/PMPA[7:0]/ PMPD[7:0]) using three phases
01Lower 8 bits of address are multiplexed with the lower 8 bits of data (PMPA[7:0]/PMPD[7:0])
00Address and data appear on separate pins

Bit 10 – PMPTTL PMP Module TTL Input Buffer Select bit

ValueDescription
1PMP module uses TTL input buffers
0PMP module uses Schmitt Trigger input buffers

Bit 9 – PTWREN PMP Write Strobe Port Enable bit

ValueDescription
1PMWR/PMENB port is enabled
0PMWR/PMENB port is disabled

Bit 8 – PTRDEN PMP Read/Write Strobe Port Enable bit

ValueDescription
1PMRD/PMWR port is enabled
0PMRD/PMWR port is disabled

Bits 7:6 - CSF[1:0] Chip Select Function bits ^(1)

ValueDescription
11Reserved
10PMCS2 and PMCS1 function as Chip Select
01PMCS2 functions as Chip Select, PMCS1 functions as address bit

Value Description

00PMCS2 and PMCS1 function as address bits

Bit 5 – ALP Address Latch Polarity bit ^(1)

Value Description
1Active-high (PMALL and PMALH)
0Active-low (PMALL and PMALH)

Bit 4 – CS2P Chip Select 2 Polarity bit ^(1)

Value Description
1Active-high
0Active-low

Bit 3 – CS1P Chip Select 1 Polarity bit ^(1)

Value Description
1Active-high
0Active-low

Bit 1 – WRSP Write Strobe Polarity bit

For Client Modes and Host Mode 2 (MODE[1:0] (PMMODE[9:8]) = 00, 01, 10):

1 = Write strobe is active-high (PMWR)

0 = Write strobe is active-low (PMWR)

For Host Mode 1 (MODE[1:0] (PMMODE[9:8]) = 11):

1 = Enables strobe active-high (PMENB)

0 = Enables strobe active-low (PMENB)

Value Description

1PMRD/PMWR port is enabled
0PMRD/PMWR port is disabled

Bit 0 – RDSP Read Strobe Polarity bit

For Client Modes and Host Mode 2 (MODE[1:0] (PMMODE[9:8]) = 00, 01, 10):

1 = Read strobe is active-high (PMRD)

0 = Read strobe is active-low (PMRD)

For Host Mode 1 (MODE[1:0] (PMMODE[9:8]) = 11):

1 = Read/write strobe is active-high (PMRD/PMWR)

0 = Read/write strobe is active-low (PMRD/PMWR)

Value Description

1PMRD/PMWR port is enabled
0PMRD/PMWR port is disabled

19.1.2 PMP Control High Register

Name: PMCONH

Offset: 0x1AA

Note:

  1. This bit is cleared by HW at the end of the read cycle when BUSY (PMMODE[15]) = 0.

Legend: HC = Hardware Clearable bit

Bit 15 14 13 12 11 10 9 8

Access Reset

Bit 76543210

RDSTARTDUALBUF
AccessR/W/HCR/W
Reset00

Bit 7 – RDSTART Start a Read on PMP Bus bit ^(1)

ValueDescription
1Starts a read cycle on the PMP bus
0No effect

Bit 1 – DUALBUF PMP Dual Read/Write Buffers Enable bit (valid in Host mode only)

ValueDescription
1PMP uses separate registers for reads and writes (PMRADDR, PMDINx, PMWADDR, PMDOUTx)
0PMP uses legacy registers (PMADDR, PMDINx)

19.1.3 Parallel Host Port Mode Register

Name: PMMODE

Offset: 0x1AC

Notes:

  1. When WAITM[3:0] = 0000, the WAITBx and WAITEx bits are ignored and forced to 1Tp (peripheral clock) cycle for a write operation; WAITBx = 1Tp cycle, WAITEx = 0T_p cycles for a read operation.
  2. Address bits, A15 and A14, are not subject to auto-increment/decrement if configured as Chip Selects, CS2 and CS1.
  3. These pins are active when MODE16 = 1 (16-bit mode).
  4. The PMADDR register is always incremented/decremented by one, regardless of the transfer data width.

Legend: HC = Hardware Clearable bit; HS = Hardware Settable bit

Bit 15 14 13 12 11 10 9 8

BUSY IRQM[1:0] INCM[1:0] MODE16 MODE[1:0]
AccessR/HS/HCR/WR/WR/WR/WR/WR/WR/W
Reset0 0 0 0 0 0 0 0

Bit 76543210

WAITB[1:0]WAITM[3:0]WAITE[1:0]
AccessR/WR/WR/WR/WR/WR/WR/WR/W
Reset0 0 0 0 0 0 0

Bit 15 – BUSY Busy bit (Host mode only)

ValueDescription
1Port is busy
0Port is not busy

Bits 14:13 - IRQM[1:0] Interrupt Request Mode bits

ValueDescription
11Reserved, do not use
10Interrupt generated when Read Buffer 3 is read or Write Buffer 3 is written (Buffered PSP mode), or on a read or write operation when PMA[1:0] = 11 (Addressable Client mode only)
01Interrupt generated at the end of the read/write cycle
00No interrupt generated

Bits 12:11 - INCM[1:0] Increment Mode bits

ValueDescription
11Client mode read and write buffers auto-increment (MODE[1:0] (PMMODE[9:8]) = 0.0 only)
10Decrements ADDR[15:0] by one every read/write cycle ^(2,4)
01Increments ADDR[15:0] by one every read/write cycle ^(2,4)
00No increment or decrement of address

Bit 10 - MODE16 8/16-Bit Mode bit

ValueDescription
116-Bit Mode: A read or write to the Data register invokes a single 16-bit transfer
08-Bit Mode: A read or write to the Data register invokes a single 8-bit transfer

Bits 9:8 - MODE[1:0] PMP Mode Select bits

ValueDescription
11Host Mode 1 (PMCSx, PMRD, PMWR, PMENB, PMA[x:0], PMD[7:0] and PMD[8:15]) ^(3)
10Host Mode 2 (PMCSx, PMRD, PMWR, PMA[x:0], PMD[7:0] and PMD[8:15]) ^(3)
01Enhanced Client mode, controls signals (PMRD, PMWR, PMCS, PMD[7:0] and PMA[1:0])

Value Description

00Legacy Parallel Client Port mode, controls signals (PMRD, PMWR, PMCS and PMD[7:0])

Bits 7:6 – WAITB[1:0] Data Setup to Read/Write Strobe Wait States bits ^(1)

Value Description

11Data wait of 4 T_P ; multiplexed address phase of 4 T_P
10Data wait of 3 T_P ; multiplexed address phase of 3 T_P
01Data wait of 2 T_P ; multiplexed address phase of 2 T_P
00Data wait of 1 T_P ; multiplexed address phase of 1 T_P (default)

Bits 5:2 – WAITM[3:0] Data Read/Write Strobe Wait States bits ^(1)
Value Description

1111Wait of 16 T_P
...
0001Wait of 2 T_P
0000Wait of 1 T_P (default)

Bits 1:0 – WAITE[1:0] Data Hold After Read/Write Strobe Wait States bits ^(1)

11 = Wait of 4 T_P
10 = Wait of 3 T_P
01 = Wait of 2 T_P
00 = Wait of 1 T_P (default)

For Read Operations:

11 = Wait of 3 T_P
10 = Wait of 2 T_P
01 = Wait of 1 T_P
00 = Wait of 0 T_P (default)

19.1.4 PMP Address Register

Name: PMADDR

Offset: 0x1AA

Note:

  1. The use of these pins as PMA15/PMA14 or CS2/CS1 is selected by the CSF[1:0] bits (PMCON[7:6]).

Bit 15 14 13 12 11 10 9 8

CS2/ADDR15 CS1/ADDR14 ADDR[13:0] 

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

ADDR[13:0] 

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 15 - CS2/ADDR15 Chip Select 2/Target Read Address bit 15 ^(1)

Value Description

1Chip Select 2 is active
0Chip Select 2 is inactive (ADDR15 function is selected)

Bit 14 - CS1/ADDR14 Chip Select 1/Target Read Address bit 14 ^(1)

Value Description

1Chip Select 1 is active
0Chip Select 1 is inactive (ADDR14 function is selected)

Bits 13:0 – ADDR[13:0] Target Read Address bits

19.1.5 PMP Data Output Low Register

Name: PMDOUT1

Offset: 0x1B4

Bit 15 14 13 12 11 10 9 8
DATAOUT[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
DATAOUT[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0

Bits 15:0 – DATAOUT[15:0] Output Data Port bits

These bits are for 8-bit read operations in Client mode and write operations for Dual Buffer Host mode.

19.1.6 PMP Data Output High Register

Name: PMDOUT2

Offset: 0x1B6

Bit 15 14 13 12 11 10 9 8
DATAOUT[31:24]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
DATAOUT[23:16]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0

Bits 15:0 – DATAOUT[31:16] Output Data Port bits

These bits are for 8-bit write operations in Client mode.

19.1.7 PMP Data Input/Output Low Register

Name: PMDIN1

Offset: 0x1B8

Bit 15 14 13 12 11 10 9 8
DATAIN[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
DATAIN[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0

Bits 15:0 – DATAIN[15:0] Input/Output Data Port bits

These bits are for 8-bit or 16-bit read/write operations in Host mode and are the input data port for 8-bit write operations in Client mode.

19.1.8 PMP Data Input/Output High Register

Name: PMDIN2

Offset: 0x1BA

Bit 15 14 13 12 11 10 9 8

DATAIN[31:24]
AccessR/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0
Bit7 6 5 4 3 2 1 0
DATAIN[23:16]
AccessR/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0

Bits 15:0 – DATAIN[31:16] Input/Output Data Port bits

These bits are for 8-bit write operations in Client mode.

19.1.9 PMP Pin Enable Register

Name: PMAEN

Offset: 0x1BC

Notes:

  1. The use of these pins as address or Chip Select lines is selected by the CSF[1:0] bits (PMCON[7:6]).

  2. The use of these pins as PMA1/PMA0 or PMALH/PMALL depends on the Address/Data Multiplex mode selected by the ADRMUX[1:0] bits in the PMCON register.

Bit 15 14 13 12 11 10 9 8

PTEN[15:14] PTEN[15:10]
AccessR/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0

Bit 76543210

PTEN[9:4] PTEN[1:0]
AccessR/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0

Bits 15:14 – PTEN[15:14] PMCSx Strobe Enable bits

ValueDescription
1PMA15 and PMA14 function as either PMA[15:14] or PMCS2 and PMCS1^(1)
0PMA15 and PMA14 function as port I/Os

Bits 13:2 – PTEN[13:2] PMP Address Port Enable bits

ValueDescription
1PMA[13:2] function as PMP address lines
0PMA[13:2] function as port I/Os

Bits 1:0 – PTEN[1:0] PMALH/PMALL Strobe Enable bits

ValueDescription
1PMA1 and PMA0 function as either PMA[1:0] or PMALH and PMALL^(2)
0PMA1 and PMA0 pads function as port I/Os

19.1.10 PMP Status Register (Client Modes Only)

Name: PMSTAT

Offset: 0x1C0

Bit 15 14 13 12 11 10 9 8

IBF IBOVIB[3:0]F
AccessR R/W RRRR
Reset0 00 0 0 0

Bit 76543210

OBEOBUFOB[3:0]E
AccessR R/W RRRR
Reset1 01 1 1 1

Bit 15 – IBF Input Buffer Full Status bit

ValueDescription
1All writable Input Buffer registers are full
0Some or all of the writable Input Buffer registers are empty

Bit 14 – IBOV Input Buffer Overflow Status bit

This bit is set (= 1) in hardware; it can only be cleared (= 0) in software.

ValueDescription
1A write attempt to a full input byte buffer occurred (must be cleared in software)
0No overflow occurred

Bits 11:8 - IB[3:0]F Input Buffer x Status Full bits

ValueDescription
1Input buffer contains data that have not been read (reading buffer will clear this bit)
0Input buffer does not contain any unread data

Bit 7 – OBE Output Buffer Empty Status bit

ValueDescription
1All readable Output Buffer registers are empty
0Some or all of the readable Output Buffer registers are full

Bit 6 – OBUF Output Buffer Underflow Status bit

This bit is set (= 1) in hardware; it can only be cleared (= 0) in software.

ValueDescription
1A read occurred from an empty output byte buffer (must be cleared in software)
0No underflow occurred

Bits 3:0 - OB[3:0]E Output Buffer x Status Empty bits

ValueDescription
1Output buffer is empty (writing data to the buffer will clear this bit)
0Output buffer contains data that have not been transmitted

19.1.11 PMP Write Address Register

Name: PMWADDR (2)

Offset: 0x1C4

Notes:

  1. The use of these pins as PMA15/PMA14 or WCS2/WCS1 is selected by the CSF[1:0] bits (PMCON[7:6]).
  2. This register is only used when the DUALBUF bit (PMCONH[1]) is set to '1'.

Bit 15 14 13 12 11 10 9 8

WCS2/WADDR15WCS1/WADDR14WADDR[13:0]
AccessR/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0
Bit7 6 5 4 3 2 1 0
WADDR[13:0]
AccessR/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0

Bit 15 - WCS2/WADDR15 Chip Select 2 bit/Target Write Address bit 15 ^1

Value Description
1Chip Select 2 is active
0Chip Select 2 is inactive (WADDR15 function is selected)

Bit 14 - WCS1/WADDR14 Chip Select 1 bit/Target Write Address bit 14^1)

Value Description
1Chip Select 1 is active
0Chip Select 1 is inactive (WADDR14 function is selected)

Bits 13:0 – WADDR[13:0] Target Write Address bits

19.1.12 PMP Read Address Register

Name: PMRADDR (2) Offset: 0x1AA

Notes:

  1. The use of these pins as PMA15/PMA14 or RCS2/RCS1 is selected by the CSF[1:0] bits (PMCON[7:6]).
  2. This register is only used when the DUALBUF bit (PMCONH[1]) is set to '1'.
Bit 15 14 13 12 11 10 9 8
RCS2/RADDR15RCS1/RADDR14RADDR[13:0]
AccessR/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
RADDR[13:0]
AccessR/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0

Bit 15 - RCS2/RADDR15 Chip Select 2/Target Read Address bit 15 ^(1)

Value Description
1Chip Select 2 is active
0Chip Select 2 is inactive (RADDR15 function is selected)

Bit 14 - RCS1/RADDR14 Chip Select 1/Target Read Address bit 14 ^1

Value Description
1Chip Select 1 is active
0Chip Select 1 is inactive (RADDR14 function is selected)

Bits 13:0 – RADDR[13:0] Target Read Address bits

19.1.13 PMP Read Input Data Register

Name: PMRDIN (1)

Offset: 0x1CC

Notes:

  1. This register is only used when the DUALBUF bit (PMCONH[1]) is set to '1' and exclusively for reads. If the DUALBUF bit is '0', the PMDIN1 register is used for reads instead of PMRDIN.

  2. Only used when MODE16 = 1.

Bit 15 14 13 12 11 10 9 8

RDATAIN[15:8]
AccessR/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0
Bit7 6 5 4 3 2 1 0
RDATAIN[7:0]
AccessR/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0

Bits 15:0 – RDATAIN[15:0] Port Read Input Data bits ^(2)

Value Description
1Starts a read cycle on the PMP bus
0No effect

20. Single-Edge Nibble Transmission (SENT)

Note: This data sheet summarizes the features of this group of dsPIC33CK1024MP710 family devices. It is not intended to be a comprehensive reference source. To complement the information in this data sheet, refer to "Single-Edge Nibble Transmission (SENT) Module" (www.microchip.com/DS70005145).

The Single-Edge Nibble Transmission (SENT) module is based on the SAE J2716, "SENT – Single-Edge Nibble Transmission for Automotive Applications". The SENT protocol is a one-way, single wire, time-modulated serial communication based on successive falling edges. It is intended for use in applications where high-resolution sensor data need to be communicated from a sensor to an Engine Control Unit (ECU).

The SENTx module has the following major features:

  • Selectable Transmit or Receive mode
  • Synchronous or Asynchronous Transmit modes
    • Automatic Data Rate Synchronization
  • Optional Automatic Detection of CRC Errors in Receive mode
  • Optional Hardware Calculation of CRC in Transmit mode
    • Support for Optional Pause Pulse Period
    • Data Buffering for One Message Frame
  • Selectable Data Length for Transmit/Receive, Up to Six Nibbles
    • Automatic Detection of Framing Errors

SENT protocol timing is based on a predetermined time unit, T_TICK . Both the transmitter and receiver must be preconfigured for T_TICK , which can vary from 3 to 90 s. A SENT message frame starts with a Sync pulse. The purpose of the Sync pulse is to allow the receiver to calculate the data rate of the message encoded by the transmitter. The SENT specification allows messages to be validated with up to a 20% variation in T_TICK . This allows for the transmitter and receiver to run from different clocks that may be inaccurate, and drift with time and temperature. The data nibbles are four bits in length and are encoded as the data value + 12 ticks. This yields a 0 value of 12 ticks and the maximum value, 0xF, of 27 ticks.

A SENT message consists of the following:

• A synchronization/calibration period of 56 tick times
• A status nibble of 12-27 tick times
- Up to six data nibbles of 12-27 tick times
• A CRC nibble of 12-27 tick times
• An optional pause pulse period of 12-768 tick times

Figure 20-1 shows a block diagram of the SENTx module.

Figure 20-2 shows the construction of a typical 6-nibble data frame, with the numbers representing the minimum or maximum number of tick times for each section.

Figure 20-1. SENTx Module Block Diagram
Microchip dsPIC33CK1024MP708 - Single-Edge Nibble Transmission (SENT) - 1

flowchart
graph TD
    A["SENTx TX"] --> B["Output Driver"]
    B --> C["SENTx Edge Control"]
    C --> D["Edge Timing"]
    D --> E["Sync Period Detector"]
    E --> F["Edge Detect"]
    F --> G["Nibble Period Detector"]
    G --> H["Tick Period Generator"]
    H --> I["Output Driver"]
    I --> J["SENTx CON1"]
    I --> K["SENTxCON2"]
    I --> L["SENTxCON3"]
    I --> M["SENTxSTAT"]
    I --> N["SENTxSYNC"]
    I --> O["SENTxDATH/L"]
    P["SENTx RX"] --> Q["Edge Detect"]
    Q --> R["Nibble Period Detector"]
    R --> S["Tick Period Generator"]
    S --> T["Output Driver"]
    T --> U["SENTx Edge Control"]
    U --> V["Edge Timing"]
    V --> W["Sync Period Detector"]
    W --> X["Edge Detect"]
    X --> Y["Nibble Period Detector"]
    Y --> Z["Tick Period Generator"]
    Z --> AA["Output Driver"]
    AA --> AB["SENTx CON1"]
    AA --> AC["SENTxCON2"]
    AA --> AD["SENTxCON3"]
    AA --> AE["SENTxSTAT"]
    AA --> AF["SENTxDATH/L"]
    AG["Legend: Receiver Only"] --> B
    AH["Legend: Transmitter Only"] --> D
    AI["Legend: Shared"] --> V

Figure 20-2. SENTx Protocol Data Frames
Microchip dsPIC33CK1024MP708 - Single-Edge Nibble Transmission (SENT) - 2

flowchart
graph TD
    A["Sync Period"] --> B["56"]
    B --> C["12-27"]
    C --> D["12-27"]
    D --> E["12-27"]
    E --> F["12-27"]
    F --> G["12-27"]
    G --> H["12-27"]
    H --> I["12-27"]
    I --> J["12-27"]
    J --> K["12-27"]
    K --> L["12-27"]
    L --> M["12-768"]
    N["Status Data 1 Data 2 Data 3 Data 4 Data 5 Data 6 CRC Pause (optional)"] --> O["->"]

20.1 Transmit Mode

By default, the SENTx module is configured for transmit operation. The module can be configured for continuous asynchronous message frame transmission, or alternatively, for Synchronous mode triggered by software. When enabled, the transmitter will send a Sync, followed by the appropriate number of data nibbles, an optional CRC and optional pause pulse. The tick period used by the SENTx transmitter is set by writing a value to the TICKTIME[15:0] (SENTxCON2[15:0]) bits. The tick period calculations are shown in Equation 20-1.

Equation 20-1. Tick Period Calculation

$$ T I C K T I M E [ 1 5: 0 ] = \frac {T T I C K}{T C L K} - 1 $$

An optional pause pulse can be used in Asynchronous mode to provide a fixed message frame time period. The frame period used by the SENTx transmitter is set by writing a value to the FRAMETIME[15:0] (SENTxCON3[15:0]) bits. The formulas used to calculate the value of frame time are shown in Equation 20-2.

Equation 20-2. Frame Time Calculations

$$ \begin{array}{l} F R A M E T I M E [ 1 5: 0 ] = T T I C K / T F R A M E \ F R A M E T I M E [ 1 5: 0 ] \geq 1 2 2 + 2 7 N \ F R A M E T I M E [ 1 5: 0 ] \geq 8 4 8 + 1 2 N \ \end{array} $$

Where:

$$ T F R A M E = \text { Total time of the message from ms } $$

$$ N = \text { The number of data nibbles in message, } 1 - 6 $$

Note: The module will not produce a pause period with less than 12 ticks, regardless of the FRAMETIME[15:0] value. FRAMETIME[15:0] values beyond 2047 will have no effect on the length of a data frame.

20.1.1 Transmit Mode Configuration

20.1.1.1 Initializing the SENTx Module

Perform the following steps to initialize the module:

  1. Write RCVEN (SENTxCON1[11]) = 0 for Transmit mode.
  2. Write TXM (SENTxCON1[10]) = 0 for Asynchronous Transmit mode or TXM = 1 for Synchronous mode.
  3. Write NIBCNT[2:0] (SENTxCON1[2:0]) for the desired data frame length.
  4. Write CRCEN (SENTxCON1[8]) for hardware or software CRC calculation.

  5. Write PPP (SENTxCON1[7]) for optional pause pulse.

  6. If PPP = 1, write TFRAME to SENTxCON3.

  7. Write SENTxCON2 with the appropriate value for the desired tick period.

  8. Enable interrupts and set interrupt priority.

  9. Write initial status and data values to SENTxDATH/L.

  10. If CRCEN = 0, calculate CRC and write the value to CRC[3:0] (SENTxDATL[3:0]).

  11. Set the SNTEN (SENTxCON1[15]) bit to enable the module.

User software updates to SENTxDATH/L must be performed after the completion of the CRC and before the next message frame's status nibble. The recommended method is to use the message frame completion interrupt to trigger data writes. The data should be read from the SENTxDATL/H registers after the completion of the CRC and before the next message frame's status nibble. The recommended method is to use the message frame completion interrupt trigger.

20.2 Receive Mode

The module can be configured for receive operation by setting the RCVEN (SENTxCON1[11]) bit. The time between each falling edge is compared to SYNCMIN[15:0] (SENTxCON3[15:0]) and SYNCMAX[15:0] (SENTxCON2[15:0]), and if the measured time lies between the minimum and maximum limits, the module begins to receive data. The validated Sync time is captured in the SENTxSYNC register and the tick time is calculated. Subsequent falling edges are verified to be within the valid data width and the data are stored in the SENTxDATL/H registers. An interrupt event is generated at the completion of the message and the user software should read the SENTx Data registers before the reception of the next nibble. The equation for SYNCMIN[15:0] and SYNCMAX[15:0] is shown in Equation 20-3.

Equation 20-3. SYNCMIN[15:0] and SYNCMAX[15:0] Calculations

$$ T I C K = T C L K \cdot (T I C K T I M E [ 1 5: 0 ] + 1) $$

$$ F R A M E T I M E [ 1 5: 0 ] = T T I C K / T F R A M E $$

$$ \text { SyncCount } = 8 \times F R C V \times T T I C K $$

$$ \text { SYNCMIN } [ 1 5: 0 ] = 0. 8 \times \text { SyncCount } $$

$$ \text { SYNCMAX } [ 1 5: 0 ] = 1. 2 \times \text { SyncCount } $$

$$ F R A M E T I M E [ 1 5: 0 ] \geq 1 2 2 + 2 7 N $$

$$ F R A M E T I M E [ 1 5: 0 ] \geq 8 4 8 + 1 2 N $$

Where:

TFRAME = Total time of the message from ms

N = The number of data nibbles in message, 1-6

FRCV = FCY × Prescaler

TCLK = FcY/Prescaler

For T_TICK = 3.0 s and F_CLK = 4 MHz , SYNCMIN[15:0] = 76.

Note: To ensure a Sync period can be identified, the value written to SYNCMIN[15:0] must be less than the value written to SYNCMAX[15:0].

20.2.1 Initializing the SENTx Module

Perform the following steps to initialize the module:

  1. Write RCVEN (SENTxCON1[11]) = 1 for Receive mode.
  2. Write NIBCNT[2:0] (SENTxCON1[2:0]) for the desired data frame length.
  3. Write CRCEN (SENTxCON1[8]) for hardware or software CRC validation.
  4. Write PPP (SENTxCON1[7]) = 1 if pause pulse is present.
  5. Write SENTxCON2 with the value of SYNCMAXx (Nominal Sync Period + 20%).
  6. Write SENTxCON3 with the value of SYNCMINx (Nominal Sync Period - 20%).
  7. Enable interrupts and set interrupt priority.
  8. Set the SNTEN (SENTxCON1[15]) bit to enable the module.

The data should be read from the SENTxDATL/H registers after the completion of the CRC and before the next message frame's status nibble. The recommended method is to use the message frame completion interrupt trigger.

20.3 SENT Control/Status Registers

OffsetName Bit Pos. 7 6 5 4 3 2 1 0
0x80 SENT1CON115:8 SNTEN SNTSIDL RCVEN TXM TXPOL CRCEN
7:0 PPP SPCEN PS NIBCNT[2:0]
0x82 ... 0x83Reserved
0x84 SENT1CON215:8SENT1CON2[15:8]
7:0SENT1CON2[7:0]
0x86 ... 0x87Reserved
0x88 SENT1CON315:8SENT1CON3[15:8]
7:0SENT1CON3[7:0]
0x8A ... 0x8BReserved
0x8C SENT1STAT15:8
7:0PAUSENIB[2:0]CRCERRFRMERRRXIDLESYNCTXEN
0x8E ... 0x8FReserved
0x90 SENT1SYNC15:8SENTSYNC[15:8]
7:0SENTSYNC[7:0]
0x92 ... 0x93Reserved
0x94SENT1DATL15:8DATA4[3:0]DATA5[3:0]
7:0DATA6[3:0]CRC[3:0]
0x96SENT1DATH15:8STAT[3:0]DATA1[3:0]
7:0DATA2[3:0]DATA3[3:0]
0x98 SENT2CON115:8 SNTEN SNTSIDL RCVEN TXM TXPOL CRCEN
7:0 PPP SPCEN PS NIBCNT[2:0]
0x9A ... 0x9BReserved
0x9C SENT2CON215:8SENT2CON2[15:8]
7:0SENT2CON2[7:0]
0x9E ... 0x9FReserved
0xA0SENT2CON315:8SENT2CON3[15:8]
7:0SENT2CON3[7:0]
0xA2 ... 0xA3Reserved
0xA4SENT2STAT15:8
7:0PAUSENIB[2:0]CRCERRFRMERRRXIDLESYNCTXEN
0xA6 ... 0xA7Reserved
0xA8SENT2SYNC15:8SENTSYNC[15:8]
7:0SENTSYNC[7:0]
0xAA ... 0xABReserved
0xAC SENT2DATL15:8DATA4[3:0]DATA5[3:0]
7:0DATA6[3:0]CRC[3:0]
0xAESENT2DATH15:8STAT[3:0]DATA1[3:0]
7:0DATA2[3:0]DATA3[3:0]

20.3.1 SENTx Control Register 1

Name: SENTxCON1

Offset: 0x80, 0x98

Notes:

  1. This bit has no function in Receive mode (RCVEN = 1).

  2. This bit has no function in Transmit mode (RCVEN = 0).

Bit 15 14 13 12 11 10 9 8

SNTENSNTSIDLRCVENTXMTXPOLCRCEN
AccessR/WR/WR/WR/WR/W
Reset000 0 0 0

Bit 76543210

PPPSPCENPSNIBCNT[2:0]
AccessR/WR/WR/WR/WR/WR/W
Reset0 000 0 0

Bit 15 - SNTEN SENTx Enable bit

ValueDescription
1SENTx is enabled
0SENTx is disabled

Bit 13 - SNTSIDL SENTx Stop in Idle Mode bit

ValueDescription
1Discontinues module operation when the device enters Idle mode
0Continues module operation in Idle mode

Bit 11 - RCVEN SENTx Receive Enable bit

ValueDescription
1SENTx operates as a receiver
0SENTx operates as a transmitter (sensor)

Bit 10 - TXM SENTx Transmit Mode bit ^(1)

ValueDescription
1SENTx transmits data frames only when triggered using the SYNCTXEN status bit
0SENTx transmits data frames continuously while SNTEN = 1

Bit 9 - TXPOL SENTx Transmit Polarity bit ^(1)

ValueDescription
1SENTx data output pin is low in the Idle state
0SENTx data output pin is high in the Idle state

Bit 8 - CRCEN CRC Enable bit

Module in Receive Mode (RCVEN = 1):

1 = SENTx performs CRC verification on received data using the preferred J2716 method

0 = SENTx does not perform CRC verification on received data

Module in Transmit Mode (RCVEN = 1):

1 = SENTx automatically calculates CRC using the preferred J2716 method

0 = SENTx does not calculate CRC

Bit 7 – PPP Pause Pulse Present bit

ValueDescription
1SENTx is configured to transmit/receive SENT messages with pause pulse

Value Description

0 SENTx is configured to transmit/receive SENT messages without pause pulse

Bit 6 – SPCEN Short PWM Code Enable bit ^(2)

Value Description
1SPC control from external source is enabled
0SPC control from external source is disabled

Bit 4 – PS SENTx Module Clock Prescaler (divider) bit

Value Description
1Divide-by-4
0Divide-by-1

Bits 2:0 – NIBCNT[2:0] Nibble Count Control bits

Value Description
111Reserved; do not use
110Module transmits/receives six data nibbles in a SENT data pocket
101Module transmits/receives five data nibbles in a SENT data pocket
100Module transmits/receives four data nibbles in a SENT data pocket
011Module transmits/receives three data nibbles in a SENT data pocket
010Module transmits/receives two data nibbles in a SENT data pocket
001Module transmits/receives one data nibble in a SENT data pocket
000Reserved; do not use

20.3.2 SENTx Control Register 2

Name: SENTxCON2

Offset: 0x84, 0x9C

Bit 15 14 13 12 11 10 9 8

SENTxCON2[15:8]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

SENTxCON2[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 15:0 - SENTxCON2[15:0] SENTx Control bits

20.3.3 SENTx Control Register 3

Name: SENTxCON3

Offset: 0x88, 0xA0

Bit 15 14 13 12 11 10 9 8

SENTxCON3[15:8]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

SENTxCON3[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 15:0 - SENTxCON3[15:0] SENTx Control bits

20.3.4 SENTx Status Register

Name: SENTxSTAT

Offset: 0x8C, 0xA4

Note:

  1. In Receive mode (RCVEN = 1), the SYNCTXEN bit is read-only.

Legend: C = Clearable bit, HC = Hardware Clearable bit

Bit 15 14 13 12 11 10 9 8

Access Reset

Bit 76543210

PAUSENIB[2:0]CRCERRFRMERRRXIDLESYNCTXEN
AccessRRRRRR/CRR/W/HC
Reset0 0 0 0 0 0 0 0

Bit 7 – PAUSE Pause Period Status bit

ValueDescription
1The module is transmitting/receiving a pause period
0The module is not transmitting/receiving a pause period

Bits 6:4 – NIB[2:0] Nibble Status bits

Module in Transmit Mode (RCVEN = 0):

111 = Module is transmitting a CRC nibble

110 = Module is transmitting Data Nibble 6

101 = Module is transmitting Data Nibble 5

100 = Module is transmitting Data Nibble 4

011 = Module is transmitting Data Nibble 3

010 = Module is transmitting Data Nibble 2

001 = Module is transmitting Data Nibble 1

000 = Module is transmitting a status nibble or pause period, or is not transmitting

Module in Receive Mode (RCVEN = 1):

111 = Module is receiving a CRC nibble or was receiving this nibble when an error occurred

110 = Module is receiving Data Nibble 6 or was receiving this nibble when an error occurred

101 = Module is receiving Data Nibble 5 or was receiving this nibble when an error occurred

100 = Module is receiving Data Nibble 4 or was receiving this nibble when an error occurred

011 = Module is receiving Data Nibble 3 or was receiving this nibble when an error occurred

010 = Module is receiving Data Nibble 2 or was receiving this nibble when an error occurred

001 = Module is receiving Data Nibble 1 or was receiving this nibble when an error occurred

000 = Module is receiving a status nibble or waiting for Sync

Bit 3 – CRCERR CRC Status bit (Receive mode only)

ValueDescription
1A CRC error has occurred for the 1-6 data nibbles in SENTxDATL/H
0A CRC error has not occurred

Bit 2 – FRMERR Framing Error Status bit (Receive mode only)

ValueDescription
1A data nibble was received with less than 12 tick periods or greater than 27 tick periods
0Framing error has not occurred

Bit 1 – RXIDLE SENTx Receiver Idle Status bit (Receive mode only)

Value Description
1The SENTx data bus has been Idle (high) for a period of SYNCMAX[15:0] or greater
0The SENTx data bus is not Idle

Bit 0 – SYNCTXEN SENTx Synchronization Period Status/Transmit Enable bit ^(1)

Module in Receive Mode (RCVEN = 1):
1 = A valid synchronization period was detected; the module is receiving nibble data
0 = No synchronization period has been detected; the module is not receiving nibble data
Module in Asynchronous Transmit Mode (RCVEN = 0, TXM = 0):
The bit always reads as '1' when the module is enabled, indicating the module transmits SENTx data frames continuously. The bit reads '0' when the module is disabled.
Module in Synchronous Transmit Mode (RCVEN = 0, TXM = 1):
1 = The module is transmitting a SENTx data frame
0 = The module is not transmitting a data frame, user software may set SYNCTXEN to start another data frame transmission

20.3.5 SENTx Sync Period Timer Register

Name: SENTxSYNC

Offset: 0x90, 0xA8

Note:

  1. These register bits are not available in Transmit mode (RCVEN = 0).
Bit 15 14 13 12 11 10 9 8
SENTSYNC[15:8]
Access R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
SENTSYNC[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0

Bits 15:0 – SENTSYNC[15:0] Captured Sync Period bits ^(1)

In Receive mode, the length of the synchronization time period is captured.

20.3.6 SENTx Receive Data Register Low

Name: SENTxDATL

Offset: 0x94, 0xAC

Note:

  1. Register bits are read-only in Receive mode (RCVEN = 1). In Transmit mode, the CRC[3:0] bits are read-only when automatic CRC calculation is enabled (RCVEN = 0, CRCEN = 1).

Bit 15 14 13 12 11 10 9 8

DATA4[3:0] DATA5[3:0]
AccessR/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0

Bit 76543210

DATA6[3:0] CRC[3:0]
AccessR/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0

Bits 15:12 - DATA4[3:0] Data Nibble 4 Data bits ^(1)

Bits 11:8 – DATA5[3:0] Data Nibble 5 Data bits ^(1)

Bits 7:4 – DATA6[3:0] Data Nibble 6 Data bits ^(1)

Bits 3:0 – CRC[3:0] CRC Nibble Data bits ^(1)

20.3.7 SENTx Receive Data Register High

Name: SENTxDATH

Offset: 0x96, 0xAE

Note:

  1. Register bits are read-only in Receive mode (RCVEN = 1). In Transmit mode, the CRC[3:0] bits are read-only when automatic CRC calculation is enabled (RCVEN = 0, CRCEN = 1).

Bit 15 14 13 12 11 10 9 8

STAT[3:0] DATA1[3:0]
AccessR/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0

Bit 76543210

DATA2[3:0] DATA3[3:0]
AccessR/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0

Bits 15:12 - STAT[3:0] Status Nibble Data bits ^(1)

Bits 11:8 – DATA1[3:0] Data Nibble 1 Data bits ^(1)

Bits 7:4 – DATA2[3:0] Data Nibble 2 Data bits ^(1)

Bits 3:0 – DATA3[3:0] Data Nibble 3 Data bits ^(1)

21. Timer1

Notes:

  1. This data sheet summarizes the features of the dsPIC33CK1024MP710 family of devices. It is not intended to be a comprehensive reference source. To complement the information in this data sheet, refer to "Timers" (www.microchip.com/DS70362), which is available from the Microchip website (www.microchip.com/).
  2. Some registers and associated bits described in this section may not be available on all devices. Refer to 4. Memory Organization in this data sheet for device-specific register and bit information.

The Timer1 module is a 16-bit timer that can operate as a free-running interval timer/counter.

The Timer1 module has the following unique features over other timers:

  • Can be Operated in Asynchronous Counter mode
  • Asynchronous Timer
    • Operational during CPU Sleep mode
  • Software Selectable Prescalers 1:1, 1:8, 1:64 and 1:256
    • External Clock Selection Control

- The Timer1 External Clock Input (T1CK) can Optionally be Synchronized to the Internal Device Clock and the Clock Synchronization is Performed after the Prescaler

If Timer1 is used for SCCP, the timer should be running in Synchronous mode.

The Timer1 module can operate in one of the following modes:

  • Timer mode
  • Gated Timer mode
  • Synchronous Counter mode
  • Asynchronous Counter mode

A block diagram of Timer1 is shown in Figure 21-1.

Figure 21-1. 16-Bit Timer1 Module Block Diagram
Microchip dsPIC33CK1024MP708 - Notes: - 1

flowchart
graph LR
    A["T1CK (External Clock)"] --> B["0"]
    C["TCY"] --> D["1"]
    E["2 TCY"] --> F["2"]
    G["FRC"] --> H["3"]
    B --> I["Sync"]
    D --> J["0"]
    F --> K["1"]
    H --> L["0"]
    I --> M["TCY"]
    J --> N["T1CK"]
    K --> O["TCS"]
    L --> P["T1CK"]
    M --> Q["TCS"]
    N --> R["T1CK"]
    O --> S["TCS"]
    P --> T["TCS"]
    Q --> U["TCS"]
    R --> V["TCS"]
    S --> W["TCS"]
    T --> X["TCS"]
    U --> Y["TCS"]
    V --> Z["TCS"]
    W --> AA["Prescaler"]
    X --> AB["Prescaler"]
    Y --> AC["Prescaler"]
    Z --> AD["Prescaler"]
    AA --> AE["tmr_clk"]
    AB --> AF["Comparator"]
    AC --> AG["Comparator"]
    AD --> AH["Comparator"]
    AE --> AI["PRx"]
    AF --> AJ["PRx"]
    AG --> AK["PRx"]
    AH --> AL["PRx"]
    AI --> AM["T1CK"]
    AJ --> AN["T1CK"]
    AK --> AO["T1CK"]
    AL --> AP["T1CK"]
    AM --> AQ["TGATE"]
    AN --> AR["TGATE"]
    AO --> AS["TGATE"]
    AP --> AT["TGATE"]
    AQ --> AU["TGATE"]
    AR --> AV["TGATE"]
    AS --> AW["TGATE"]
    AT --> AX["TGATE"]
    AU --> AY["TGATE"]
    AV --> AZ["TGATE"]

21.1 Timer1 Control Register

OffsetNameBit Pos. 7 6 54 3 2 1 0
0x0100 T1CON15:8 TONSIDL TMWDISTMWIP PRWIPTECS[1:0]
7:0TGATETCKPS[1:0]TSYNCTCS
0x0102 ... 0x0103Reserved
0x0104TMR115:8TMR[15:8]
7:0TMR[7:0]
0x0106 ... 0x0107Reserved
0x0108PR115:8PR[15:8]
7:0PR[7:0]

21.1.1 Timer1 Control Register

Name: T1CON

Offset: 0x100

Note:

  1. When Timer1 is enabled in External Synchronous Counter mode (TCS = 1, TSYNC = 1, TON = 1), any attempts by user software to write to the TMR1 register are ignored.

Bit 15 14 13 12 11 10 9 8

TONSIDLTMWDISTMWIPPRWIPTECS[1:0]
AccessR/WR/WR/W
Reset00 0 0 0 0 0

Bit 76543210

TGATETCKPS[1:0]TSYNCTCS
AccessR/WR/WR/WR/WR/W
Reset00000

Bit 15 - TON Timer1 On bit ^(1)

Value Description
1Starts 16-bit Timer1
0Stops 16-bit Timer1

Bit 13 – SIDL Timer1 Stop in Idle Mode bit

Value Description
1Discontinues module operation when device enters Idle mode
0Continues module operation in Idle mode

Bit 12 - TMWDIS Asynchronous Timer1 Write Disable bit

Value Description
1Timer writes are ignored while a posted write to TMR1 or PR1 is synchronized to the asynchronous clock domain
0Back-to-back writes are enabled in Asynchronous mode

Bit 11 – TMWIP Asynchronous Timer1 Write in Progress bit

Value Description
1Write to the timer in Asynchronous mode is pending
0Write to the timer in Asynchronous mode is complete

Bit 10 – PRWIP Asynchronous Period Write in Progress bit

Value Description
1Write to the Period register in Asynchronous mode is pending
0Write to the Period register in Asynchronous mode is complete

Bits 9:8 – TECS[1:0] Timer1 Extended Clock Select bits

Value Description
11FRC clock
10 2 T_CY
01 T_CY
00External Clock comes from the T1CK pin

Bit 7 – TGATE Timer1 Gated Time Accumulation Enable bit

When TCS = 1:

This bit is ignored.

When TCS = 0:

Value Description
1Gated time accumulation is enabled
0Gated time accumulation is disabled

Bits 5:4 – TCKPS[1:0] Timer1 Input Clock Prescale Select bits

Value Description
111:256
101:64
011:8
001:1

Bit 2 – TSYNC Timer1 External Clock Input Synchronization Select bit ^(1)

When TCS = 0:

This bit is ignored.

When TCS = 1:

Value Description
1Synchronizes the External Clock input
0Does not synchronize the External Clock input

Bit 1 – TCS Timer1 Clock Source Select bit ^(1)

Value Description
1External Clock source selected by TECS[1:0]
0Internal peripheral clock (Fp)

21.1.2 Timer1 Counter Register

Name: TMR1

Offset: 0x104

Bit 15 14 13 12 11 10 9 8

TMR[15:8]
AccessR/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0
Bit7 6 5 4 3 2 1 0
TMR[7:0]
AccessR/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0

Bits 15:0 - TMR[15:0] Timer1 Value bits

21.1.3 Period Register 1

Name: PR1

Offset: 0x108

Bit 15 14 13 12 11 10 9 8
PR[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
PR[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0

Bits 15:0 – PR[15:0] Period Register bits

22. Capture/Compare/PWM/Timer Modules (SCCP)

Note: This data sheet summarizes the features of the dsPIC33CK1024MP710 family of devices. It is not intended to be a comprehensive reference source. To complement the information in this data sheet, refer to "Capture/Compare/PWM/Timer (MCCP and SCCP)" (www.microchip.com/DS30003035).

dsPIC33CK1024MP710 family devices include several Capture/Compare/PWM/Timer base modules, which provide the functionality of three different peripherals from earlier PIC24F devices. The module can operate in one of three major modes:

  • General Purpose Timer
  • Input Capture
    • Output Compare/PWM

Single CCP output modules (SCCPs) provide only one PWM output.

The SCCP module can be operated only in one of the three major modes at any time. The other modes are not available unless the module is reconfigured for the new mode.

A conceptual block diagram for the module is shown in Figure 22-1. All three modes share a time base generator and a common Timer register pair (CCPxTMRH/L); other shared hardware components are added as a particular mode requires.

Each module has a total of six control and status registers:

  • CCPxCON1L
  • CCPxCON1H
  • CCPxCON2L
  • CCPxCON2H
  • CCPxCON3H
  • CCPxSTATL

Each module also includes eight buffer/counter registers that serve as Timer Value registers or data holding buffers:

  • CCPxTMRH/CCPxTMRL (CCPx Timer High/Low Counters)
  • CCPxPRH/CCPxPRL (CCPx Timer Period High/Low)
  • CCPxRA (CCPx Primary Output Compare Data Buffer)
  • CCPxRB (CCPx Secondary Output Compare Data Buffer)
  • CCPxBUFH/CCPxBUFL (CCPx Input Capture High/Low Buffers)

Figure 22-1. SCCPx Conceptual Block Diagram
Microchip dsPIC33CK1024MP708 - Capture/Compare/PWM/Timer Modules (SCCP) - 1

flowchart
graph TD
    A["Clock Sources"] --> B["Time Base Generator"]
    C["External Capture Input"] --> D["Input Capture"]
    D --> E["CCPxTMRH/L"]
    E --> F["Output Compare/PWM"]
    F --> G["OEFb/OEFb"]
    G --> H["Compare/PWM Output(s)"]
    I["Clock Sources"] --> J["16/32-Bit Timer"]
    K["Clock Sources"] --> L["Clock Sources"]
    M["Clock Sources"] --> N["Clock Sources"]
    O["Clock Sources"] --> P["Clock Sources"]
    Q["T32"] --> R["Clock Sources"]
    S["CCSEL"] --> T["Clock Sources"]
    U["MOD<3:0>"] --> V["Clock Sources"]
    W["Sync and Gating Sources"] --> X["Clock Sources"]
    Y["Clock Sources"] --> Z["Clock Sources"]
    AA["Clock Sources"] --> AB["Clock Sources"]
    AC["Clock Sources"] --> AD["Clock Sources"]
    AE["Clock Sources"] --> AF["Clock Sources"]
    AG["Clock Sources"] --> AH["Clock Sources"]
    AI["Clock Sources"] --> AJ["Clock Sources"]
    AK["Clock Sources"] --> AL["Clock Sources"]
    AM["Clock Sources"] --> AN["Clock Sources"]
    AO["Clock Sources"] --> AP["Clock Sources"]
    AQ["Clock Sources"] --> AR["Clock Sources"]
    AS["Clock Sources"] --> AT["Clock Sources"]
    AU["Clock Sources"] --> AV["Clock Sources"]
    AW["Clock Sources"] --> AX["Clock Sources"]
    AY["Clock Sources"] --> AZ["Clock Sources"]
    BA["Clock Sources"] --> BB["Clock Sources"]
    BC["Clock Sources"] --> BD["Clock Sources"]
    BE["Clock Sources"] --> BF["Clock Sources"]
    BG["Clock Sources"] --> BH["Clock Sources"]
    BI["Clock Sources"] --> BJ["Clock Sources"]
    BK["Clock Sources"] --> BL["Clock Sources"]
    BM["Clock Sources"] --> BN["Clock Sources"]
    BO["Clock Sources"] --> BP["Clock Sources"]
    BQ["Clock Sources"] --> BR["Clock Sources"]
    BS["Clock Sources"] --> BT["Clock Sources"]
    BU["Clock Sources"] --> BV["Clock Sources"]
    BW["Clock Sources"] --> BX["Clock Sources"]
    BY["Clock Sources"] --> BZ["Clock Sources"]
    CA["Clock Sources"] --> CB["Clock Sources"]
    CC["Clock Sources"] --> CD["Clock Sources"]
    DD["Clock Sources"] --> DE["Clock Sources"]
    DF["Clock Sources"] --> DG["Clock Sources"]
    DH["Clock Sources"] --> DI["Clock Sources"]
    DJ["Clock Sources"] --> DK["Clock Sources"]
    DL["Clock Sources"] --> DV["Clock Sources"]
    DW["Clock Sources"] --> DX["Clock Sources"]
    DXN["Clock Sources"] --> DXB["Clock Sources"]
    DXN --> DXC["Clock Sources"]
    DXC --> DXD["Clock Sources"]
    DXD --> DXE["Clock Sources"]
    DXE --> DXF["Clock Sources"]

22.1 Time Base Generator

The Timer Clock Generator (TCG) generates a clock for the module's internal time base, using one of the clock signals already available on the microcontroller. This is used as the time reference for the module in its three major modes. The internal time base is shown in Figure 22-2.

There are eight inputs available to the clock generator, which are selected using the CLKSEL[2:0] bits (CCPxCON1L[10:8]). Available sources include the FRC, the Secondary Oscillator and the TCLKI External Clock inputs. The system clock is the default source (CLKSEL[2:0] = 0 0 0).

Figure 22-2. Timer Clock Generator
Microchip dsPIC33CK1024MP708 - Time Base Generator - 1

flowchart
graph LR
    A["Clock Sources"] --> B((Block))
    C["CLKSEL[2:0"]] --> B
    B --> D["Prescaler"]
    D --> E["Clock Synchronizer"]
    E --> F["Gate(1)"]
    F --> G["To Rest of Module"]
    H["TMRPS[1:0"]] --> D
    I["TMRSYNC"] --> E
    J["SSDG"] --> F

Note 1: Gating is available in Timer modes only.

22.2 General Purpose Timer

Timer mode is selected when CCSEL = 0 and MOD[3:0] = 0000. The timer can function as a 32-bit timer or a dual 16-bit timer, depending on the setting of the T32 bit (Table 22-1).

Table 22-1. Timer Operation Mode

T32 (CCPxCON1L[5]) Operating Mode
0Dual Timer Mode (16-bit)

......continued

T32 (CCPxCON1L[5]) Operating Mode

1

Timer Mode (32-bit)

Dual 16-Bit Timer mode provides a simple timer function with two independent 16-bit timer/counters. The primary timer uses CCPxTMRL and CCPxPRL. Only the primary timer can interact with other modules on the device. It generates the SCCPx Sync out signals for use by other SCCP modules. It can also use the SYNC[4:0] bits' signal generated by other modules.

The secondary timer uses CCPxTMRH and CCPxPRH. It is intended to be used only as a periodic interrupt source for scheduling CPU events. It does not generate an output Sync/trigger signal like the primary time base. In Dual Timer mode, the CCPx Secondary Timer Period register, CCPxPRH, generates the SCCP compare event (CCPxIF) used by many other modules on the device.

The 32-Bit Timer mode uses the CCPxTMRL and CCPxTMRH registers, together, as a single 32-bit timer. When CCPxTMRL overflows, CCPxTMRH increments by one. This mode provides a simple timer function when it is important to track long time periods. Note that the T32 bit (CCPxCON1L[5]) should be set before the CCPxTMRL or CCPxPRH registers are written to initialize the 32-bit timer.

22.3 Output Compare Mode

Output Compare mode compares the Timer register value with the value of one or two Compare registers, depending on its mode of operation. The Output Compare x module, on compare match events, has the ability to generate a single output transition or a train of output pulses. Like most PIC MCU peripherals, the Output Compare x module can also generate interrupts on a compare match event.

Table 22-2 shows the various modes available in Output Compare modes.

Table 22-2. Output Compare x/PWMx Modes

MOD[3:0] (CCPxCON1L[3:0]) T32 (CCPxCON1L[5]) Operating Mode
0001 0Output High on Compare (16-bit) Single Edge Mode
0001 1Output High on Compare (32-bit)
0010 0Output Low on Compare (16-bit)
0010 1Output Low on Compare (32-bit)
0011 0Output Toggle on Compare (16-bit)
0011 1Output Toggle on Compare (32-bit)
0100 0Dual Edge Compare (16-bit) Dual Edge Mode
0101 0Dual Edge Compare (16-bit buffered)PWM Mode

Figure 22-3. Output Compare x Block Diagram
Microchip dsPIC33CK1024MP708 - Output Compare Mode - 1

flowchart
graph TD
    A["CCPxCON1H/L"] --> B["Comparator"]
    C["CCPxCON2H/L"] --> B
    D["CCPxCON3H"] --> B
    B --> E["CCPxRA"]
    E --> F["CCPxRA Buffer"]
    F --> G["Comparator"]
    G --> H["CCPxTMRH/L"]
    H --> I["Comparator"]
    I --> J["CCPxRB Buffer"]
    J --> K["CCPxRB"]
    K --> L["Fault Logic"]
    M["OCx Clock Sources"] --> N["Time Base Generator"]
    O["Trigger and Sync Sources"] --> P["Trigger and Sync Logic"]
    Q["Reset"] --> H
    R["Increment Reset"] --> H
    S["Rollover/Reset"] --> G
    T["Match Event"] --> G
    U["Match Event"] --> I
    V["Rollover/Reset"] --> J
    W["Edge Detect"] --> I
    X["Output Compare Interrupt"] --> Y["Fault Logic"]
    Z["CCPx Pin(s)"] --> AA["Fault Logic"]
    AB["OCFA/OCFB"] --> AC["Fault Logic"]
    AD["CCPxPRL"] --> AE["Comparator"]
    AF["CCPxRB Buffer"] --> AG["CCPxRB Buffer"]
    AH["CCPxRA Buffer"] --> AI["Comparator"]
    AJ["CCPxTMRH/L"] --> AK["Comparator"]
    AL["CCPxCON1H/L"] --> AM["Comparator"]

22.4 Input Capture Mode

Input Capture mode is used to capture a timer value from an independent timer base, upon an event, on an input pin or other internal trigger source. The input capture features are useful in applications requiring frequency (time period) and pulse measurement. Figure 22-4 depicts a simplified block diagram of Input Capture mode.

Input Capture mode uses a dedicated 16/32-bit, synchronous, up counting timer for the capture function. The timer value is written to the FIFO when a capture event occurs. The internal value may be read (with a synchronization delay) using the CCPxTMRH/L registers.

To use Input Capture mode, the CCSEL bit (CCPxCON1L[4]) must be set. The T32 and the MOD[3:0] bits are used to select the proper Capture mode, as shown in Table 22-3.

Table 22-3. Input Capture x Modes

MOD[3:0] (CCPxCON1L[3:0]) T32 (CCPxCON1L[5]) Operating Mode
0000 0Edge Detect (16-bit capture)
0000 1Edge Detect (32-bit capture)
0001 0Every Rising (16-bit capture)
0001 1Every Rising (32-bit capture)
0010 0Every Falling (16-bit capture)
0010 1Every Falling (32-bit capture)
0011 0Every Rising/Falling (16-bit capture)
0011 1Every Rising/Falling (32-bit capture)
0100 0Every 4th Rising (16-bit capture)
0100 1Every 4th Rising (32-bit capture)
0101 0Every 16th Rising (16-bit capture)
0101 1Every 16th Rising (32-bit capture)

Figure 22-4. Input Capture x Block Diagram

Microchip dsPIC33CK1024MP708 - Input Capture Mode - 1

flowchart
graph TD
    A["ICx Clock Sources"] --> B["Clock Select"]
    C["ICS[2:0"]] --> B
    B --> D["Edge Detect Logic and Clock Synchronizer"]
    D --> E["Event and Interrupt Logic"]
    E --> F["Set CCPxIF"]
    G["Trigger and Sync Sources"] --> H["Trigger and Sync Logic"]
    H --> I["Reset"]
    I --> J["CCPxTMRH/L"]
    J --> K["T32"]
    K --> L["4-Level FIFO Buffer"]
    L --> M["CCPxBUFx"]
    M --> N["System Bus"]
    D --> O["MOD[3:0"]]
    E --> P["OPS[3:0"]]
    style A fill:#f9f,stroke:#333
    style C fill:#f9f,stroke:#333
    style G fill:#f9f,stroke:#333
    style H fill:#f9f,stroke:#333
    style I fill:#f9f,stroke:#333
    style J fill:#f9f,stroke:#333
    style K fill:#f9f,stroke:#333
    style L fill:#f9f,stroke:#333
    style M fill:#f9f,stroke:#333
    style N fill:#ccf,stroke:#333

22.5 Auxiliary Output

The SCCPx modules have an auxiliary (secondary) output that provides other peripherals access to internal module signals. The auxiliary output is intended to connect to other SCCP modules, or other digital peripherals, to provide these types of functions:

• Time Base Synchronization
• Peripheral Trigger and Clock Inputs
- Signal Gating

The type of output signal is selected using the AUXOUT[1:0] control bits (CCPxCON2H[4:3]). The type of output signal is also dependent on the module operating mode.

Table 22-4. Auxiliary Output

AUXOUT[1:0] CCSEL MOD[3:0] Comments Signal Description
00 x xxxxAuxiliary output disabled No Output
01 0 0000Time Base modes Time Base Period Reset or Rollover
10
11
01 0 0001through 1111Output Compare modes TimeBase Period Reset or Rollover
10Output Compare Event Signal
11Output Compare Signal
01 1 xxxxInput Capture modes TimeBase Period Reset or Rollover
10Reflects the Value of the ICDIS bit
11Input Capture Event Signal

22.6 SCCP Control/Status Registers

OffsetName Bit Pos. 7 6 5 4 3 2 1 0
0x0950 CCP1CON1L15:8 CCPON CCPSIDL CCPSLP TMRSYNC CLKSEL[2:0]
7:0 TMRPS[1:0] T32 CCSELMOD[3:0]
0x0952CCP1CON1H15:8 OPSSRC RTRGENOPS3[3:0]
7:0TRIGENONESHOTALTSYNCSYNC[4:0]
0x0954 CCP1CON2L15:8PWMRSENASDGMSSDG
7:0ASDG[7:0]
0x0956CCP1CON2H15:8OENSYNCOCAEN
7:0ICGSM[1:0]AUXOUT[1:0]ICS[2:0]
0x0958 ... 0x0959Reserved
0x095ACCP1CON3H15:8OETRIGOSCNT[2:0]
7:0POLACEPSSACE[1:0]PSSBDF[1:0]
0x095C CCP1STATL15:8ICGARM
7:0CCPTRIGTRSETTRCLRASEVTSCEVTICDISICOVICBNE
0x095E ... 0x095FReserved
0x0960CCP1TMRL15:8TMRL[15:8]
7:0TMRL[7:0]
0x0962 CCP1TMRH15:8TMRH[31:24]
7:0TMRH[23:16]
0x0964CCP1PRL15:8PRL[15:8]
7:0PRL[7:0]
0x0966CCP1PRH15:8PRH[31:24]
7:0PRH[23:16]
0x0968CCP1RA15:8CMP[15:8]
7:0CMP[7:0]
0x096A ... 0x096BReserved
0x096CCCP1RB15:8CMP[15:8]
7:0CMP[7:0]
0x096E ... 0x096FReserved
0x0970 CCP1BUFL15:8BUF[15:8]
7:0BUF[7:0]
0x0972 CCP1BUFH15:8BUF[31:24]
7:0BUF[23:16]
0x0974 CCP2CON1L15:8 CCPON CCPSIDL CCPSLP TMRSYNC CLKSEL[2:0]
7:0 TMRPS[1:0] T32 CCSELMOD[3:0]
0x0974 CCP2CON2L15:8PWMRSENASDGMSSDG
7:0ASDG[7:0]
0x0976CCP2CON1H15:8 OPSSRC RTRGENOPS3[3:0]
7:0TRIGENONESHOTALTSYNCSYNC[4:0]
0x0976CCP2CON2H15:8OENSYNCOCAEN
7:0ICGSM[1:0]AUXOUT[1:0]ICS[2:0]
0x0978 ... 0x097DReserved
0x097ECCP2CON3H15:8OETRIGOSCNT[2:0]
7:0POLACEPSSACE[1:0]PSSBDF[1:0]
0x0980 CCP2STATL15:8ICGARM
7:0CCPTRIGTRSETTRCLRASEVTSCEVTICDISICOVICBNE
0x0982 ... 0x0983Reserved

......continued

OffsetName Bit Pos. 76543210
0x0984 CCP2TMRL15:8 TMRL[15:8]
7:0 TMRL[7:0]
0x0986 CCP2TMRH15:8 TMRH[31:24]
7:0 TMRH[23:16]
0x0988 CCP2PRL15:8 PRL[15:8]
7:0 PRL[7:0]
0x098A CCP2PRH15:8 PRH[31:24]
7:0 PRH[23:16]
0x098CCCP2RA15:8CMP[15:8]
7:0CMP[7:0]
0x098E ... 0x098FReserved
0x0990CCP2RB15:8CMP[15:8]
7:0CMP[7:0]
0x0992 ... 0x0993Reserved
0x0994 CCP2BUFL15:8 BUF[15:8]
7:0BUF[7:0]
0x0996 CCP2BUFH15:8 BUF[31:24]
7:0 BUF[23:16]
0x0998CCP3CON1L15:8CCPONCCPSIDLCCPSLPTMRSYNCCLKSEL[2:0]
7:0TMRPS[1:0]T32CCSELMOD[3:0]
0x099ACCP3CON1H15:8OPSSRCRTRGENOPS3[3:0]
7:0TRIGENONESHOTALTSYNCSYNC[4:0]
0x099CCCP3CON2L15:8PWMRSENASDGMSSDG
7:0 ASDG[7:0]
0x099ECCP3CON2H15:8OENSYNCOCAEN
7:0ICGSM[1:0]AUXOUT[1:0]ICS[2:0]
0x09A0 ... 0x09A1Reserved
0x09A2CCP3CON3H15:8OETRIGOSCNT[2:0]
7:0POLACEPSSACE[1:0]PSSBDF[1:0]
0x09A4CCP3STATL15:8ICGARM
7:0CCPTRIGTRSETTRCLRASEVTSCEVTICDISICOV
0x09A6 ... 0x09A7Reserved
0x09A8CCP3TMRL15:8 TMRL[15:8]
7:0 TMRL[7:0]
0x09AACCP3TMRH15:8 TMRH[31:24]
7:0 TMRH[23:16]
0x09ACCCP3PRL15:8 PRL[15:8]
7:0 PRL[7:0]
0x09AE CCP3PRH15:8 PRH[31:24]
7:0 PRH[23:16]
0x09B0CCP3RA15:8CMP[15:8]
7:0CMP[7:0]
0x09B2 ... 0x09B3Reserved
0x09B4CCP3RB15:8CMP[15:8]
7:0CMP[7:0]
0x09B6 ... 0x09B7Reserved
0x09B8 CCP3BUFL15:8 BUF[15:8]
7:0BUF[7:0]

......continued

OffsetNameBit Pos. 76543210
0x09BACCP3BUFH15:8 BUF[31:24]
7:0 BUF[23:16]
0x09BCCCP4CON1L15:8 CCPON CCPSIDL CCPSLP TMRSYNC CLKSEL[2:0]
7:0 TMRPS[1:0] T32 CCSELMOD[3:0]
0x09BECCP4CON1H15:8 OPSSRC RTRGENOPS3[3:0]
7:0TRIGENONESHOTALTSYNCSYNC[4:0]
0x09C0CCP4CON2L15:8PWMRSENASDGMSSDG
7:0ASDG[7:0]
0x09C2CCP4CON2H15:8OENSYNCOCAEN
7:0ICGSM[1:0]AUXOUT[1:0]ICS[2:0]
0x09C4...0x09C5Reserved
0x09C6CCP4CON3H15:8OETRIGOSCNT[2:0]
7:0POLACEPSSACE[1:0]PSSBDF[1:0]
0x09C8CCP4STATL15:8ICGARM
7:0CCPTRIGTRSETTRCLRASEVTSCEVTICDISICOVICBNE
0x09CA...0x09CBReserved
0x09CCCCP4TMRL15:8TMRL[15:8]
7:0TMRL[7:0]
0x09CECCP4TMRH15:8TMRH[31:24]
7:0TMRH[23:16]
0x09D0CCP4PRL15:8PRL[15:8]
7:0PRL[7:0]
0x09D2CCP4PRH15:8 PRH[31:24]
7:0 PRH[23:16]
0x09D4CCP4RA15:8CMP[15:8]
7:0CMP[7:0]
0x09D6...0x09D7Reserved
0x09D8CCP4RB15:8CMP[15:8]
7:0CMP[7:0]
0x09DA...0x09DBReserved
0x09DCCCP4BUFL15:8 BUF[15:8]
7:0BUF[7:0]
0x09DECCP4BUFH15:8 BUF[31:24]
7:0 BUF[23:16]
0x09E0CCP5CON1L15:8 CCPON CCPSIDL CCPSLP TMRSYNC CLKSEL[2:0]
7:0 TMRPS[1:0] T32 CCSELMOD[3:0]
0x09E2CCP5CON1H15:8 OPSSRC RTRGENOPS3[3:0]
7:0TRIGENONESHOTALTSYNCSYNC[4:0]
0x09E4CCP5CON2L15:8PWMRSENASDGMSSDG
7:0ASDG[7:0]
0x09E6CCP5CON2H15:8OENSYNCOCAEN
7:0ICGSM[1:0]AUXOUT[1:0]ICS[2:0]
0x09E8...0x09E9Reserved
0x09EACCP5CON3H15:8OETRIGOSCNT[2:0]
7:0POLACEPSSACE[1:0]PSSBDF[1:0]
0x09ECCCP5STATL15:8ICGARM
7:0CCPTRIGTRSETTRCLRASEVTSCEVTICDISICOVICBNE
0x09EE...0x09EFReserved
0x09F0CCPSTMRL15:8TMRL[15:8]
7:0TMRL[7:0]
0x09F2CCPSTMRH15:8TMRH[31:24]
7:0TMRH[23:16]
0x09F4CCP5PRL15:8PRL[15:8]
7:0PRL[7:0]
0x09F6CCP5PRH15:8PRH[31:24]
7:0PRH[23:16]
0x09F8CCP5RA15:8CMP[15:8]
7:0CMP[7:0]
0x09FA...0x09FBReserved
0x09FCCCP5RB15:8CMP[15:8]
7:0CMP[7:0]
0x09FE...0x09FFReserved
0x0A00CCPSBUFL15:8BUF[15:8]
7:0BUF[7:0]
0x0A02CCPSBUFH15:8BUF[31:24]
7:0BUF[23:16]
0x0A04CCP6CON1L15:8CCPONCCPSIDLCCPSLPTMRSYNCCLKSEL[2:0]
7:0TMRPS[1:0]T32CCSELMOD[3:0]
0x0A06CCP6CON1H15:8OPSSRCRTRGENOPS3[3:0]
7:0TRIGENONESHOTALTSYNCSYNC[4:0]
0x0A08CCP6CON2L15:8PWMRSENASDGMSSDG
7:0ASDG[7:0]
0x0A0ACCP6CON2H15:8OENSYNCOCAEN
7:0ICGSM[1:0]AUXOUT[1:0]ICS[2:0]
0x0A0C...0x0A0DReserved
0x0A0ECCP6CON3H15:8OETRIGOSCNT[2:0]
7:0POLACEPSSACE[1:0]PSSBDF[1:0]
0x0A10CCP6STATL15:8ICGARM
7:0CCPTRIGTRSETTRCLRASEVTSCEVTICDISICOVICBNE
0x0A12...0x0A13Reserved
0x0A14CCP6TMRL15:8TMRL[15:8]
7:0TMRL[7:0]
0x0A16CCP6TMRH15:8TMRH[31:24]
7:0TMRH[23:16]
0x0A18CCP6PRL15:8PRL[15:8]
7:0PRL[7:0]
0x0A1ACCP6PRH15:8PRH[31:24]
7:0PRH[23:16]
0x0A1CCCP6RA15:8CMP[15:8]
7:0CMP[7:0]
0x0A1E...0x0A1FReserved
0x0A20CCP6RB15:8CMP[15:8]
7:0CMP[7:0]
0x0A22...0x0A23Reserved
0x0A24CCP6BUFL15:8BUF[15:8]
7:0BUF[7:0]
0x0A26CCP6BUFH15:8 BUF[31:24]
7:0 BUF[23:16]
0x0A28CCP7CON1L15:8 CCPON CCPSIDL CCPSLP TMRSYNC CLKSEL[2:0]
7:0 TMRPS[1:0] T32 CCSELMOD[3:0]
0x0A2ACCP7CON1H15:8 OPSSRC RTRGENOPS3[3:0]
7:0TRIGENONESHOTALTSYNCSYNC[4:0]
0x0A2CCCP7CON2L15:8PWMRSENASDGMSSDG
7:0ASDG[7:0]
0x0A2ECCP7CON2H15:8OENSYNCOCAEN
7:0ICGSM[1:0]AUXOUT[1:0]ICS[2:0]
0x0A30...0x0A31Reserved
0x0A32CCP7CON3H15:8OETRIGOSCNT[2:0]
7:0POLACEPSSACE[1:0]PSSBDF[1:0]
0x0A34CCP7STATL15:8ICGARM
7:0CCPTRIGTRSETTRCLRASEVTSCEVTICDISICOVICBNE
0x0A36...0x0A37Reserved
0x0A38CCP7TMRL15:8TMRL[15:8]
7:0TMRL[7:0]
0x0A3ACCP7TMRH15:8TMRH[31:24]
7:0TMRH[23:16]
0x0A3CCCP7PRL15:8PRL[15:8]
7:0PRL[7:0]
0x0A3ECCP7PRH15:8 PRH[31:24]
7:0 PRH[23:16]
0x0A40CCP7RA15:8CMP[15:8]
7:0CMP[7:0]
0x0A42...0x0A43Reserved
0x0A44CCP7RB15:8CMP[15:8]
7:0CMP[7:0]
0x0A46...0x0A47Reserved
0x0A48CCP7BUFL15:8 BUF[15:8]
7:0BUF[7:0]
0x0A4ACCP7BUFH15:8 BUF[31:24]
7:0 BUF[23:16]
0x0A4CCCP8CON1L15:8 CCPON CCPSIDL CCPSLP TMRSYNC CLKSEL[2:0]
7:0 TMRPS[1:0] T32 CCSELMOD[3:0]
0x0A4ECCP8CON1H15:8 OPSSRC RTRGENOPS3[3:0]
7:0TRIGENONESHOTALTSYNCSYNC[4:0]
0x0A50CCP8CON2L15:8PWMRSENASDGMSSDG
7:0ASDG[7:0]
0x0A52CCP8CON2H15:8OENSYNCOCAEN
7:0ICGSM[1:0]AUXOUT[1:0]ICS[2:0]
0x0A54...0x0A55Reserved
0x0A56CCP8CON3H15:8OETRIGOSCNT[2:0]
7:0POLACEPSSACE[1:0]PSSBDF[1:0]
0x0A58CCP8STATL15:8ICGARM
7:0CCPTRIGTRSETTRCLRASEVTSCEVTICDISICOVICBNE
0x0A5A...0x0A5FReserved
0x0A60CCP8PRL15:8 PRL[15:8]
7:0 PRL[7:0]
0x0A62CCP8PRH15:8 PRH[31:24]
7:0 PRH[23:16]
0x0A64CCP8RA15:8 CMP[15:8]
7:0 CMP[7:0]
0x0A66Reserved
...
0x0A67
0x0A68CCP8RB15:8 CMP[15:8]
7:0 CMP[7:0]
0x0A6AReserved
...
0x0A6B
0x0A6CCCP8BUFL15:8 BUF[15:8]
7:0BUF[7:0]
0x0A6ECCP8BUFH15:8 BUF[31:24]
7:0 BUF[23:16]
0x0A70CCP9CON1L15:8CCPONCCPSIDLCCPSLPTMRSYNCCLKSEL[2:0]
7:0TMRPS[1:0]T32CCSELMOD[3:0]
0x0A72CCP9CON1H15:8OPSSRCRTRGENOPS3[3:0]
7:0TRIGENONESHOTALTSYNCSYNC[4:0]
0x0A74CCP9CON2L15:8PWMRSENASDGMSSDG
7:0ASDG[7:0]
0x0A74CCP9CON3H15:8OETRIGOSCNT[2:0]
7:0POLACEPSSACE[1:0]PSSBDF[1:0]
0x0A76CCP9CON2H15:8OENSYNCOCAEN
7:0ICGSM[1:0]AUXOUT[1:0]ICS[2:0]
0x0A78Reserved
...
0x0A7B
0x0A7CCCP9STATL15:8ICGARM
7:0CCPTRIGTRSETTRCLRASEVTSCEVTICDISICOVICBNE
0x0A7EReserved
...
0x0A83
0x0A84CCP9PRL15:8 PRL[15:8]
7:0 PRL[7:0]
0x0A86CCP9PRH15:8 PRH[31:24]
7:0 PRH[23:16]
0x0A88CCP9RA15:8 CMP[15:8]
7:0 CMP[7:0]
0x0A8AReserved
...
0x0A8B
0x0A8CCCP9RB15:8 CMP[15:8]
7:0 CMP[7:0]
0x0A8EReserved
...
0x0A8F
0x0A90CCP9BUFL15:8 BUF[15:8]
7:0BUF[7:0]
0x0A92CCP9BUFH15:8 BUF[31:24]
7:0 BUF[23:16]

22.6.1 CCPx Control 1 Low Register

Name: CCPxCON1L

Offset: 0x950, 0x974, 0x998, 0x9BC, 0x9E0, 0xA04, 0xA28, 0xA4C, 0xA70

Note:

  1. Only available on the MCCP.

Bit 15 14 13 12 11 10 9 8

CCPONCCPSIDLCCPSLPTMRSYNCCLKSEL[2:0]
AccessR/WR/WR/WR/WR/WR/W
Reset00 0 0 0 0 0

Bit 76543210

TMRPS[1:0]T32CCSELMOD[3:0]
AccessR/WR/WR/WR/WR/WR/WR/WR/W
Reset0 0 0 0 0 0 0

Bit 15 – CCPON CCPx Module Enable bit

ValueDescription
1Module is enabled with an operating mode specified by the MOD[3:0] control bits
0Module is disabled

Bit 13 - CCPSIDL CCPx Stop in Idle Mode Bit

ValueDescription
1Discontinues module operation when device enters Idle mode
0Continues module operation in Idle mode

Bit 12 - CCPSLP CCPx Sleep Mode Enable bit

ValueDescription
1Module continues to operate in Sleep modes
0Module does not operate in Sleep modes

Bit 11 - TMRSYNC Time Base Clock Synchronization bit

ValueDescription
1Asynchronous module time base clock is selected and synchronized to the internal system clocks (CLKSEL[2:0] ≠ 000)
0Synchronous module time base clock is selected and does not require synchronization (CLKSEL[2:0] = 000)

Bits 10:8 – CLKSEL[2:0] CCPx Time Base Clock Select bits

ValueDescription
111External CCP TCKIx
110CLC4
101CLC3
100CLC2
011CLC1
010 F_OSC
001Reference Clock (REFCLKO)
000 F_OSC/2(F_P)

Bits 7:6 – TMRPS[1:0] Time Base Prescale Select bits

ValueDescription
111:64 Prescaler
101:16 Prescaler
011:4 Prescaler

Value Description

001:1 Prescaler

Bit 5 - T32 32-Bit Time Base Select bit

Value Description
1Uses 32-bit time base for timer, single edge output compare or input capture function
0Uses 16-bit time base for timer, single edge output compare or input capture function

Bit 4 – CCSEL Capture/Compare Mode Select bit

Value Description
1Input Capture peripheral
0Output Compare/PWM/Timer peripheral (exact function is selected by the MOD[3:0] bits)

Bits 3:0 - MOD[3:0] CCPx Mode Select bits

For CCSEL = 1 (Input Capture modes):

Value Description
1xxxReserved
011xReserved
0101Capture every 16th rising edge
0100Capture every 4th rising edge
0011Capture every rising and falling edge
0010Capture every falling edge
0001Capture every rising edge
0000Capture every rising and falling edge (Edge Detect mode)

For CCSEL = 0 (Output Compare/Timer modes):

Value Description
1111External Input mode: Pulse generator is disabled, source is selected by ICS[2:0]
1110Reserved
110xReserved
10xxReserved
0111Variable Frequency Pulse mode ^(1)
0110Center Aligned Pulse Compare mode, buffered ^(1)
0101Dual Edge Compare mode, buffered
0100Dual Edge Compare mode
001116-Bit/32-Bit Single Edge mode, toggles output on compare match
001016-Bit/32-Bit Single Edge mode, drives output low on compare match
000116-Bit/32-Bit Single Edge mode, drives output high on compare match
000016-Bit/32-Bit Timer mode, output functions are disabled

22.6.2 CCPx Control 1 High Register

Name: CCPxCON1H

Offset: 0x952, 0x976, 0x99A, 0x9BE, 0x9E2, 0xA06, 0xA2A, 0xA4E, 0xA72

Notes:

  1. This control bit has no function in Input Capture modes.

  2. This control bit has no function when TRIGEN = 0.

  3. Output postscale settings, from 1:5 to 1:16 (0100-1111), will result in a FIFO buffer overflow for Input Capture modes.

Bit 15 14 13 12 11 10 9 8

OPSSRC RTRGEN OPS3[3:0]
AccessR/WR/WR/W
Reset0 00 0 0 0

Bit 76543210

TRIGENONESHOT ALSYNCSYNC[4:0]
AccessR/WR/WR/WR/WR/WR/WR/WR/W
Reset0 0 0 0 0 0 0 0

Bit 15 - OPSSRC Output Postscaler Source Select bit ^(1)

ValueDescription
1Output postscaler scales module trigger output events
0Output postscaler scales time base interrupt events

Bit 14 - RTRGEN Retrigger Enable bit ^(2)

ValueDescription
1Time base can be retriggered when TRIGEN bit = 1
0Time base may not be retriggered when TRIGEN bit = 1

Bits 11:8 – OPS3[3:0] CCPx Interrupt Output Postscale Select bits ^(3)

ValueDescription
1111Interrupt every 16th time base period match
1110Interrupt every 15th time base period match
. . .
0100Interrupt every 5th time base period match
0011Interrupt every 4th time base period match or 4th input capture event
0010Interrupt every 3rd time base period match or 3rd input capture event
0001Interrupt every 2nd time base period match or 2nd input capture event
0000Interrupt after each time base period match or input capture event

Bit 7 – TRIGEN CCPx Trigger Enable bit

ValueDescription
1Trigger operation of time base is enabled
0Trigger operation of time base is disabled

Bit 6 – ONESHOT One-Shot Trigger Mode Enable bit

ValueDescription
1One-Shot Trigger mode is enabled; trigger duration is set by OSCNT[2:0]
0One-Shot Trigger mode is disabled

Bit 5 – ALTSYNC CCPx Clock Select bits

Value Description

1An alternate signal is used as the module synchronization output signal
0The module synchronization output signal is the Time Base Reset/rollover event

Bits 4:0 – SYNC[4:0] CCPx Synchronization Source Select bits

See 22.6.15. Synchronization Sources for the definition of inputs.

22.6.3 CCPx Control 2 Low Register

Name: CCPxCON2L

Offset: 0x954, 0x974, 0x99C, 0x9C0, 0x9E4, 0xA08, 0xA2C, 0xA50, 0xA74

Bit 15 14 13 12 11 10 9 8

PWMRSEN A$DGM SSDG
AccessR/W R/W R/W
Reset0 00

Bit 76543210

ASDG[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 15 – PWMRSEN CCPx PWM Restart Enable bit

ValueDescription
1ASEVT bit clears automatically at the beginning of the next PWM period, after the shutdown input has ended
0ASEVT bit must be cleared in software to resume PWM activity on output pins

Bit 14 – ASDGM CCPx Auto-Shutdown Gate Mode Enable bit

ValueDescription
1Waits until the next Time Base Reset or rollover for shutdown to occur
0Shutdown event occurs immediately

Bit 12 – SSDG CCPx Software Shutdown/Gate Control bit

ValueDescription
1Manually forces auto-shutdown, timer clock gate or input capture signal gate event (setting of ASDGM bit still applies)
0Normal module operation

Bits 7:0 – ASDG[7:0] CCPx Auto-Shutdown/Gating Source Enable bits

ValueDescription
1ASDGx Source n is enabled (see 22.6.16. Auto-Shutdown and Gating Sources for auto-shutdown/gating sources)
0ASDGx Source n is disabled

22.6.4 CCPx Control 2 High Register

Name: CCPxCON2H

Offset: 0x956, 0x976, 0x99E, 0x9C2, 0x9E6, 0xA0A, 0xA2E, 0xA52, 0xA76

Bit 15 14 13 12 11 10 9 8

OENSYNCOCAEN
AccessR/WR/W
Reset00

Bit 76543210

ICGSM[1:0]AUXOUT[1:0]ICS[2:0]
AccessR/WR/WR/WR/WR/WR/WR/W
Reset 0 00 0 0 0 0

Bit 15 - OENSYNC Output Enable Synchronization bit

ValueDescription
1Update by output enable bits occurs on the next Time Base Reset or rollover
0Update by output enable bits occurs immediately

Bit 8 – OCAEN Output Enable/Steering Control bit

ValueDescription
1OCx pin is controlled by the CCPx module and produces an output compare or PWM signal
0OCx pin is not controlled by the CCPx module; the pin is available to the port logic or another peripheral multiplexed on the pin

Bits 7:6 – ICGSM[1:0] Input Capture Gating Source Mode Control bits

ValueDescription
11Reserved
10One-Shot mode: Falling edge from gating source disables future capture events (ICDIS = 1)
01One-Shot mode: Rising edge from gating source enables future capture events (ICDIS = 0)
00Level-Sensitive mode: A high level from gating source will enable future capture events; a low level will disable future capture events

Bits 4:3 - AUXOUT[1:0] Auxiliary Output Signal on Event Selection bits

ValueDescription
11Input capture or output compare event; no signal in Timer mode
10Signal output is defined by module operating mode (see 22.5. Auxiliary Output)
01Time base rollover event (all modes)
00Disabled

Bits 2:0 – ICS[2:0] Input Capture Source Select bits

ValueDescription
111CLC4 Output
110CLC3 Output
101CLC2 Output
100CLC1 Output
011Comparator 3
010Comparator 2
001Comparator 1
000SCCP Input Capture x (ICx) pin (PPS)

22.6.5 CCPx Control 3 High Register

Name: CCPxCON3H

Offset: 0x95A, 0x97E, 0x9A2, 0x9C6, 0x9EA, 0xA0E, 0xA32, 0xA56, 0xA74

Bit 15 14 13 12 11 10 9 8

OETRIG OS\CNT[2:0]
AccessR/W R/W R/W R/W
Reset0 0 0 0

Bit 76543210

POLACEPSSACE[1:0]PSSBDF[1:0]
AccessR/WR/W R/W R/W R/W
Reset00 0 0 0

Bit 15 - OETRIG CCPx Dead-Time Select bit

ValueDescription
1For Triggered mode (TRIGEN = 1): Module does not drive enabled output pins until triggered
0Normal output pin operation

Bits 14:12 - OSCNT[2:0] One-Shot Event Count bits

ValueDescription
111Extends one-shot event by 7 time base periods (8 time base periods total)
110Extends one-shot event by 6 time base periods (7 time base periods total)
101Extends one-shot event by 5 time base periods (6 time base periods total)
100Extends one-shot event by 4 time base periods (5 time base periods total)
011Extends one-shot event by 3 time base periods (4 time base periods total)
010Extends one-shot event by 2 time base periods (3 time base periods total)
001Extends one-shot event by 1 time base period (2 time base periods total)
000Does not extend one-shot trigger event

Bit 5 – POLACE CCPx Output Pins, OCxA, OCxC and OCxE, Polarity Control bit

ValueDescription
1Output pin polarity is active-low
0Output pin polarity is active-high

Bits 3:2 – PSSACE[1:0] PWMx Output Pins, OCxA, OCxC and OCxE, Shutdown State Control bits

ValueDescription
11Pins are driven active when a shutdown event occurs
10Pins are driven inactive when a shutdown event occurs
0xPins are in a High-Impedance state when a shutdown event occurs

Bits 1:0 – PSSBDF[1:0] PWMx Output Pins, OCMxB, OCMxD and OCMxF, Shutdown State Control bits

ValueDescription
11Pins are driven active when a shutdown event occurs
10Pins are driven inactive when a shutdown event occurs
0xPins are in a High-Impedance state when a shutdown event occurs

22.6.6 CCPx Status Register

Name: CCPxSTATL

Offset: 0x95C, 0x980, 0x9A4, 0x9C8, 0x9EC, 0xA10, 0xA34, 0xA58, 0xA7C

Legend: C = Clearable bit; W1 = Write '1' Only bit

Bit 15 14 13 12 11 10 9 8

ICGARM
Access Reset 0R

Bit 76543210

CCPTRIGTRSETTRCLRASEVTSCEVTICDISICOVICBNE
AccessRW1W1R/CR/CR/CR/CR/C
Reset0 0 0 0 0 0 0

Bit 10 - ICGARM Input Capture Gate Arm bit

ValueDescription
1Input capture gating logic is armed for a one-shot gate event when ICGSM[1:0] = 01 or 10; bit always reads as ‘0’
0Input capture gating logic is not armed for a one-shot gate event when ICGSM[1:0] = 01 or 10; bit always reads as ‘0’

Bit 7 – CCPTRIG CCPx Trigger Status bit

ValueDescription
1Timer has been triggered and is running
0Timer has not been triggered and is held in Reset

Bit 6 – TRSET CCPx Trigger Set Request bit

Writes '1' to this location to trigger the timer when TRIGEN = 1 (location always reads as '0').

Bit 5 - TRCLR CCPx Trigger Clear Request bit

Writes '1' to this location to cancel the timer trigger when TRIGEN = 1 (location always reads as '0').

Bit 4 – ASEVT CCPx Auto-Shutdown Event Status/Control bit

ValueDescription
1A shutdown event is in progress; CCPx outputs are in the Shutdown state
0CCPx outputs operate normally

Bit 3 – SCEVT Single Edge Compare Event Status bit

ValueDescription
1A single edge compare event has occurred
0A single edge compare event has not occurred

Bit 2 – ICDIS Input Capture x Disable bit

ValueDescription
1Event on Input Capture x pin (ICx) does not generate a capture event
0Event on Input Capture x pin will generate a capture event

Bit 1 – ICOV Input Capture x Buffer Overflow Status bit

ValueDescription
1The Input Capture x FIFO buffer has overflowed
0The Input Capture x FIFO buffer has not overflowed

Bit 0 – ICBNE Input Capture x Buffer Status bit

Value Description

1Input Capture x buffer has data available
0Input Capture x buffer is empty

22.6.7 CCPx Time Base Register Low

Name: CCPxTMRL

Offset: 0x960, 0x984, 0x9A8, 0x9CC, 0x9F0, 0xA14, 0xA38, A5C, A80

Microchip dsPIC33CK1024MP708 - CCPx Time Base Register Low - 1

text_image Bit 15 14 13 12 11 10 9 8 TMRL[15:8] Access R R R R R R R R Reset 0 0 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 TMRL[7:0] Access R R R R R R R R R Reset 0 0 0 0 0 0 0 0

Bits 15:0 – TMRL[15:0] CCPx 16-Bit Time Base Value bits

22.6.8 CCPx Time Base High Register

Name: CCPxTMRH

Offset: 0x962, 0x986, 0x9AA, 0x9CE, 0x9F2, 0xA16, 0xA3A, A5E, A82

Bit 15 14 13 12 11 10 9 8

TMRH[31:24]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

TMRH[23:16]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 15:0 - TMRH[31:16] CCPx 16-Bit Time Base Value bits

22.6.9 CCPx Period Low Register

Name: CCPxPRL

Offset: 0x964, 0x988, 0x9AC, 0x9D0, 0x9F4, 0xA18, 0xA3C, 0xA60, 0xA84

Bit 15 14 13 12 11 10 9 8

PRL[15:8]
AccessR/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0
Bit7 6 5 4 3 2 1 0
PRL[7:0]
AccessR/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0

Bits 15:0 – PRL[15:0] CCPx Period Low Register bits

22.6.10 CCPx Period High Register

Name: CCPxPRH

Offset: 0x966, 0x98A, 0x9AE, 0x9D2, 0x9F6, 0xA1A, 0xA3E, 0xA62, 0xA86

Bit 15 14 13 12 11 10 9 8

PRH[31:24]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

PRH[23:16]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 15:0 - PRH[31:16] CCPx Period High Register bits

22.6.11 CCPx Primary Compare Register (Timer/Compare Modes Only)

Name: CCPxRA

Offset: 0x968, 0x98C, 0x9B0, 0x9D4, 0x9F8, 0xA1C, 0xA40, 0xA64, 0xA88

Bit 15 14 13 12 11 10 9 8

CMP[15:8]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

CMP[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 15:0 - CMP[15:0] CCPx Primary Compare Value bits

The 16-bit value to be compared against the CCP time base.

22.6.12 CCPx Secondary Compare Register (Timer/Compare Modes Only)

Name: CCPxRB

Offset: 0x96C, 0x990, 0x9B4, 0x9D8, 0x9FC, 0xA20, 0xA44, 0xA68, 0xA8C

Bit 15 14 13 12 11 10 9 8

CMP[15:8]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

CMP[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 15:0 - CMP[15:0] CCPx Secondary Compare Value bits

The 16-bit value to be compared against the CCP time base.

22.6.13 CCPx Capture Buffer Register Low (Capture Modes Only)

Name: CCPxBUFL

Offset: 0x970, 0x994, 0x9B8, 0x9DC, 0xA00, 0xA24, 0xA48, 0xA6C, 0xA90

Bit 15 14 13 12 11 10 9 8

BUF[15:8]
AccessR/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0
Bit7 6 5 4 3 2 1 0
BUF[7:0]
AccessR/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0

Bits 15:0 - BUF[15:0] CCPx Compare Buffer Value bits

Indicates the oldest captured time base value in the FIFO.

22.6.14 CCPx Capture Buffer High Register (Capture Modes Only)

Name: CCPxBUFH

Offset: 0x972, 0x996, 0x9BA, 0x9DE, 0xA02, 0xA26, 0xA4A, 0xA6E, 0xA92

Bit 15 14 13 12 11 10 9 8

BUF[31:24]
AccessR/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0
Bit7 6 5 4 3 2 1 0
BUF[23:16]
AccessR/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0

Bits 15:0 - BUF[31:16] CCPx Compare Buffer Value bits

22.6.15 Synchronization Sources

Table 22-5. Synchronization Sources

SYNC[4:0] Synchronization Source
00000None; Timer with Rollover on CCPxPR Match or FFFFh
00001Module's Own Timer Sync Out
00010Sync Output SCCP2
00011Sync Output SCCP3
00100Sync Output SCCP4
00101Sync Output SCCP5
00110Sync Output SCCP6
00111Sync Output SCCP7
01000Sync Output SCCP8
01001INT0
01010INT1
01011INT2
01100UART1 RX Edge Detect
01101UART1 TX Edge Detect
01110UART2 RX Edge Detect
01111UART2 TX Edge Detect
10000CLC1 Output
10001CLC2 Output
10010CLC3 Output
10011CLC4 Output
10100UART3 RX Edge Detect
10101UART3 TX Edge Detect
10110Sync Output MCCP9
10111Comparator 1 Output
11000Comparator 2 Output
11001Comparator 3 Output
11010-11110Reserved
11111None; Timer with Auto-Rollover (FFFFh → 0000h)

22.6.16 Auto-Shutdown and Gating Sources

Table 22-6. Auto-Shutdown and Gating Sources

ASDG[x] BitAuto-Shutdown/Gating Source
SCCP1 SCCP2 SCCP3 SCCP4 SCCP5 SCCP6 SCCP7 SCCP8 MCCP9
0 Comparator 1 Output
1 Comparator 2 Output
2 OCFC
3 OCFD
4 ICM1(1)ICM2(1)ICM3(1)ICM4(1)ICM5(1)ICM6(1)ICM7(1)ICM8(1)ICM9(1)
5 CLC1(1)
6 OCFA(1)
7 OCFB(1)
Note:1. Selected by Peripheral Pin Select (PPS).

23. Configurable Logic Cell (CLC)

Note: This data sheet summarizes the features of the dsPIC33CK1024MP710 family of devices. It is not intended to be a comprehensive reference source. For more information, refer to "Configurable Logic Cell (CLC)" (www.microchip.com/DS70005298). The information in this data sheet supersedes the information in the FRM.

The Configurable Logic Cell (CLC) module allows the user to specify combinations of signals as inputs to a logic function and to use the logic output to control other peripherals or I/O pins. This provides greater flexibility and potential in embedded designs, since the CLC module can operate outside the limitations of software execution, and supports a vast amount of output designs.

There are four input gates to the selected logic function. These four input gates select from a pool of up to 32 signals that are selected using four data source selection multiplexers.

Figure 23-1 shows the details of the data source multiplexers and Figure 23-2 shows the logic input gate connections.

Figure 23-1. CLCx Module
Microchip dsPIC33CK1024MP708 - Configurable Logic Cell (CLC) - 1

flowchart
graph LR
    A["Input Data Selection Gates"] --> B["Logic Function"]
    B --> C["Logic Output"]
    C --> D["CLCx Output"]
    D --> E["Interrupt det"]
    D --> F["Interrupt det"]
    E --> G["INTP"]
    F --> H["INTN"]
    G --> I["Set CLCxIF"]
    H --> J["TRISx Control"]
    K["CLC Inputs (32)"] --> A
    L["DS1[2:0"] G1POL] --> A
    M["DS2[2:0"] G2POL] --> A
    N["DS3[2:0"] G3POL] --> A
    O["DS4[2:0"] G4POL] --> A
    P["LCEN"] --> Q["LCPOL"]
    Q --> D
    R["Fcy"] --> S["D Q CLK"]
    S --> T["LCOE"]
    T --> U["LCOUT"]

Figure 23-2. CLCx Logic Function Combinatorial Options

AND - ORMicrochip dsPIC33CK1024MP708 - Configurable Logic Cell (CLC) - 2MODE[2:0] = 000OR - XORMicrochip dsPIC33CK1024MP708 - Configurable Logic Cell (CLC) - 3MODE[2:0] = 001
4-Input ANDMicrochip dsPIC33CK1024MP708 - Configurable Logic Cell (CLC) - 4MODE[2:0] = 010S-R LatchMicrochip dsPIC33CK1024MP708 - Configurable Logic Cell (CLC) - 5MODE[2:0] = 011
1-Input D Flip-Flop with S and RMicrochip dsPIC33CK1024MP708 - Configurable Logic Cell (CLC) - 6MODE[2:0] = 1002-Input D Flip-Flop with RMicrochip dsPIC33CK1024MP708 - Configurable Logic Cell (CLC) - 7MODE[2:0] = 101
J-K Flip-Flop with RMicrochip dsPIC33CK1024MP708 - Configurable Logic Cell (CLC) - 8MODE[2:0] = 1101-Input Transparent Latch with S and RMicrochip dsPIC33CK1024MP708 - Configurable Logic Cell (CLC) - 9MODE[2:0] = 111

Figure 23-3. CLCx Input Source Selection Diagram
Microchip dsPIC33CK1024MP708 - Configurable Logic Cell (CLC) - 10

Note: All controls are undefined at power-up.

23.1 CLC Control Registers

OffsetNameBit Pos. 76543210
0xC0CLC1CONL15:8LCENINTP INTN
7:0LCOELCOUT LCPOLMODE[2:0]
0xC2CLC1CONH15:8
7:0G4POLG3POLG2POLG1POL
0xC4CLC1SELL15:8DS4[2:0]DS3[2:0]
7:0DS2[2:0]DS1[2:0]
0xC6...0xC7Reserved
0xC8CLC1GLSL15:8G2D4TG2D4NG2D3TG2D3NG2D2TG2D2NG2D1TG2D1N
7:0G1D4TG1D4NG1D3TG1D3NG1D2TG1D2NG1D1TG1D1N
0xCACLC1GLSH15:8G4D4TG4D4NG4D3TG4D3NG4D2TG4D2NG4D1TG4D1N
7:0G3D4TG3D4NG3D3TG3D3NG3D2TG3D2NG3D1TG3D1N
0xCCCLC2CONL15:8LCENINTP INTN
7:0LCOELCOUT LCPOLMODE[2:0]
0xCECLC2CONH15:8
7:0G4POLG3POLG2POLG1POL
0xD0CLC2SELL15:8DS4[2:0]DS3[2:0]
7:0DS2[2:0]DS1[2:0]
0xD2...0xD3Reserved
0xD4CLC2GLSL15:8G2D4TG2D4NG2D3TG2D3NG2D2TG2D2NG2D1TG2D1N
7:0G1D4TG1D4NG1D3TG1D3NG1D2TG1D2N2G1D1TG1D1N
0xD6CLC2GLSH15:8G4D4TG4D4NG4D3TG4D3NG4D2TG4D2NG4D1TG4D1N
7:0G3D4TG3D4NG3D3TG3D3NG3D2TG3D2N2G3D1TG3D1N
0xD8CLC3CONL15:8LCENINTP INTN
7:0LCOELCOUT LCPOLMODE[2:0]
0xDACLC3CONH15:8
7:0G4POLG3POLG2POLG1POL
0xDCCLC3SELL15:8DS4[2:0]DS3[2:0]
7:0DS2[2:0]DS1[2:0]
0xDE...0xDFReserved
0xE0CLC3GLSL15:8G2D4TG2D4NG2D3TG2D3NG2D2TG2D2NG2D1TG2D1N
7:0G1D4TG1D4NG1D3TG1D3NG1D2TG1D2N 2G1D1TG1D1N
0xE2CLC3GLSH15:8G4D4TG4D4NG4D3TG4D3NG4D2TG4D2NG4D1TG4D1N
7:0G3D4TG3D4NG3D3TG3D3NG3D2TG3D2N 2G3D1TG3D1N
0xE4CLC4CONL15:8LCENINTP INTN
7:0LCOELCOUTLCPOL MODE[2:0]
0xE6CLC4CONH15:8
7:0G4POLG3POLG2POLG1POL
0xE8CLC4SELL15:8DS4[2:0]DS3[2:0]
7:0DS2[2:0]DS1[2:0]
0xEA...0xEBReserved
0xECCLC4GLSL15:8G2D4TG2D4NG2D3TG2D3NG2D2TG2D2NG2D1TG2D1N
7:0G1D4TG1D4NG1D3TG1D3NG1D2TG1D2N.G1D1TG1D1N
0xEECLC4GLSH15:8G4D4TG4D4NG4D3TG4D3NG4D2TG4D2NG4D1TG4D1N
7:0G3D4TG3D4NG3D3TG3D3NG3D2TG3D2N.G3D1TG3D1N
0xF0...0xOF27Reserved
0xOF28CLC5CONL15:8LCENINTP INTN
7:0LCOELCOUTLCPOL MODE[2:0]
0xOF2ACLC5CONH15:8
7:0G4POLG3POLG2POLG1POL
OffsetName Bit Pos. 765 43210
0x0F2C CLC5SELL15:8 DS4[2:0] DS3[2:0]
7:0 DS2[2:0] DS1[2:0]
0x0F2E ... 0x0F2FReserved
0x0F30 CLC5GLSL15:8 G2D4T G2D4N G2D3T G2D3N G2D2T G2D2N G2D1T G2D1N
7:0 G1D4T G1D4N G1D3T G1D3N G1D2T G1D2N G1D1T G1D1N
0x0F32 CLC5GLSH15:8 G4D4T G4D4N G4D3T G4D3N G4D2T G4D2N G4D1T G4D1N
7:0 G3D4T G3D4N G3D3T G3D3N G3D2T G3D2N G3D1T G3D1N
0x0F34 CLC6CONL15:8LCENINTPINTN
7:0LCOELCOUTLCPOLMODE[2:0]
0x0F36 CLC6CONH15:8
7:0G4POL G3POL G2POL G1POL
0x0F38 CLC6SELL15:8 DS4[2:0] DS3[2:0]
7:0 DS2[2:0] DS1[2:0]
0x0F3A ... 0x0F3BReserved
0x0F3C CLC6GLSL15:8 G2D4T G2D4N G2D3T G2D3N G2D2T G2D2N G2D1T G2D1N
7:0 G1D4T G1D4N G1D3T G1D3N G1D2T G1D2N G1D1T C1D1N
0x0F3E CLC6GLSH15:8 G4D4T G4D4N G4D3T G4D3N G4D2T G4D2N G4D1T G4D1N
7:0 G3D4T G3D4N G3D3T G3D3N G3D2T G3D2N G3D1T C3D1N
0x0F40 CLC7CONL15:8LCENINTPINTN
7:0LCOELCOUTLCPOLMODE[2:0]
0x0F42 CLC7CONH15:8
7:0G4POL G3POL G2POL G1POL
0x0F44 CLC7SELL15:8 DS4[2:0] DS3[2:0]
7:0 DS2[2:0] DS1[2:0]
0x0F46 ... 0x0F47Reserved
0x0F48 CLC7GLSL15:8 G2D4T G2D4N G2D3T G2D3N G2D2T G2D2N G2D1T G2D1N
7:0 G1D4T G1D4N G1D3T G1D3N G1D2T G1D2N G1D1T A1D1N
0x0F4A CLC7GLSH15:8 G4D4T G4D4N G4D3T G4D3N G4D2T G4D2N G4D1T G4D1N
7:0 G3D4T G3D4N G3D3T G3D3N G3D2T G3D2N G3D1T A3D1N
0x0F4C CLC8CONL15:8LCENINTPINTN
7:0LCOELCOUTLCPOLMODE[2:0]
0x0F4E CLC8CONH15:8
7:0G4POL G3POL G2POL G1POL
0x0F50 CLC8SELL15:8 DS4[2:0] DS3[2:0]
7:0 DS2[2:0] DS1[2:0]
0x0F52 ... 0x0F53Reserved
0x0F54 CLC8GLSL15:8 G2D4T G2D4N G2D3T G2D3N G2D2T G2D2N G2D1T G2D1N
7:0 G1D4T G1D4N G1D3T G1D3N G1D2T G1D2N G1D1T B1D1N
0x0F56 CLC8GLSH15:8 G4D4T G4D4N G4D3T G4D3N G4D2T G4D2N G4D1T G4D1N
7:0 G3D4T G3D4N G3D3T G3D3N G3D2T G3D2N G3D1T B3D1N

23.1.1 CLCx Control Register Low

Name: CLCxCONL

Offset: 0x0C0, 0x0CC, 0x0D8, 0x0E4, 0x0F28, 0xF34, 0xF40, 0xF4C

Bit 15 14 13 12 11 10 9 8

LCENINTPINTN
AccessR/WR/WR/W
Reset00 0

Bit 76543210

LCOELCOUTLCPOLMODE[2:0]
AccessR/WRR/WR/WR/WR/W
Reset0 0 00 0 0

Bit 15 - LCEN CLCx Enable bit

ValueDescription
1CLCx is enabled and mixing input signals
0CLCx is disabled and has logic zero outputs

Bit 11 - INTP CLCx Positive Edge Interrupt Enable bit

ValueDescription
1Interrupt will be generated when a rising edge occurs on LCOUT
0Interrupt will not be generated

Bit 10 - INTN CLCx Negative Edge Interrupt Enable bit

ValueDescription
1Interrupt will be generated when a falling edge occurs on LCOUT
0Interrupt will not be generated

Bit 7 – LCOE CLCx Port Enable bit

ValueDescription
1CLCx port pin output is enabled
0CLCx port pin output is disabled

Bit 6 – LCOUT CLCx Data Output Status bit

ValueDescription
1CLCx output high
0CLCx output low

Bit 5 – LCPOL CLCx Output Polarity Control bit

ValueDescription
1The output of the module is inverted
0The output of the module is not inverted

Bits 2:0 - MODE[2:0] CLCx Mode bits

ValueDescription
111Single input transparent latch with S and R
110JK flip-flop with R
101Two-input D flip-flop with R
100Single input D flip-flop with S and R
011SR latch
010Four-input AND
001Four-input OR-XOR
000Four-input AND-OR

23.1.2 CLCx Control Register High

Name: CLCxCONH

Offset: 0x0C2, 0x0CE, 0x0DA, 0x0E6, 0xF2A, 0xF36, 0xF42, 0xF4E

Bit 15 14 13 12 11 10 9 8

Access Reset

Bit 76543210

G4POL G3POL G2POL G1POL
Access ResetR/W RW 0000RWRW

Bit 3 – G4POL Gate 4 Polarity Control bit

ValueDescription
1Channel 4 logic output is inverted when applied to the logic cell
0Channel 4 logic output is not inverted

Bit 2 – G3POL Gate 3 Polarity Control bit

ValueDescription
1Channel 3 logic output is inverted when applied to the logic cell
0Channel 3 logic output is not inverted

Bit 1 – G2POL Gate 2 Polarity Control bit

ValueDescription
1Channel 2 logic output is inverted when applied to the logic cell
0Channel 2 logic output is not inverted

Bit 0 - G1POL Gate 1 Polarity Control bit

ValueDescription
1Channel 1 logic output is inverted when applied to the logic cell
0Channel 1 logic output is not inverted

23.1.3 CLCx Input MUX Select Register

Name: CLCxSELL

Offset: 0x0C4, 0x0D0, 0x0DC, 0x0E8, 0x0F2C, 0xF38, 0xF44, 0xF50

Bit 15 14 13 12 11 10 9 8

ValueDescription
111SCCP4 auxiliary out
110SCCP2 auxiliary out
101CLC6 Out
100REFCLKO output

Value Description

011INTRC/LPRC clock source
010CLC3 out
001System clock ( F_CY )
000CLCINA I/O pin

23.1.4 CLCx Gate Logic Input Select Low Register

Name: CLCxGLSL

Offset: 0x0C8, 0x0D4, 0x0E0, 0x0EC, 0xF30, 0xF3C, 0xF48, 0xF54

Bit 15 14 13 12 11 10 9 8

G2D4T G2D4N G2D3T G2D3N G2D2T G2D2NG2D1T G2D1N

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

G1D4TG1D4N G1D3TG1D3N G1D2TG1D2N G1D1TG1D1N

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 15 - G2D4T Gate 2 Data Source 4 True Enable bit

Value Description
1Data Source 4 signal is enabled for Gate 2
0Data Source 4 signal is disabled for Gate 2

Bit 14 - G2D4N Gate 2 Data Source 4 Negated Enable bit

Value Description
1Data Source 4 inverted signal is enabled for Gate 2
0Data Source 4 inverted signal is disabled for Gate 2

Bit 13 - G2D3T Gate 2 Data Source 3 True Enable bit

Value Description
1Data Source 3 signal is enabled for Gate 2
0Data Source 3 signal is disabled for Gate 2

Bit 12 - G2D3N Gate 2 Data Source 3 Negated Enable bit

Value Description
1Data Source 3 inverted signal is enabled for Gate 2
0Data Source 3 inverted signal is disabled for Gate 2

Bit 11 - G2D2T Gate 2 Data Source 2 True Enable bit

Value Description
1Data Source 2 signal is enabled for Gate 2
0Data Source 2 signal is disabled for Gate 2

Bit 10 - G2D2N Gate 2 Data Source 2 Negated Enable bit

Value Description
1Data Source 2 inverted signal is enabled for Gate 2
0Data Source 2 inverted signal is disabled for Gate 2

Bit 9 - G2D1T Gate 2 Data Source 1 True Enable bit

Value Description
1Data Source 1 signal is enabled for Gate 2
0Data Source 1 signal is disabled for Gate 2

Bit 8 – G2D1N Gate 2 Data Source 1 Negated Enable bit

Value Description
1Data Source 1 inverted signal is enabled for Gate 2
0Data Source 1 inverted signal is disabled for Gate 2

Bit 7 – G1D4T Gate 1 Data Source 4 True Enable bit

Value Description
1Data Source 4 signal is enabled for Gate 1
0Data Source 4 signal is disabled for Gate 1

Bit 6 – G1D4N Gate 1 Data Source 4 Negated Enable bit

Value Description
1Data Source 4 inverted signal is enabled for Gate 1
0Data Source 4 inverted signal is disabled for Gate 1

Bit 5 – G1D3T Gate 1 Data Source 3 True Enable bit

Value Description
1Data Source 3 signal is enabled for Gate 1
0Data Source 3 signal is disabled for Gate 1

Bit 4 – G1D3N Gate 1 Data Source 3 Negated Enable bit

Value Description
1Data Source 3 inverted signal is enabled for Gate 1
0Data Source 3 inverted signal is disabled for Gate 1

Bit 3 – G1D2T Gate 1 Data Source 2 True Enable bit

Value Description
1Data Source 2 signal is enabled for Gate 1
0Data Source 2 signal is disabled for Gate 1

Bit 2 - G1D2N Gate 1 Data Source 2 Negated Enable bit

Value Description
1Data Source 2 inverted signal is enabled for Gate 1
0Data Source 2 inverted signal is disabled for Gate 1

Bit 1 – G1D1T Gate 1 Data Source 1 True Enable bit

Value Description
1Data Source 1 signal is enabled for Gate 1
0Data Source 1 signal is disabled for Gate 1

Bit 0 - G1D1N Gate 1 Data Source 1 Negated Enable bit

Value Description
1Data Source 1 inverted signal is enabled for Gate 1
0Data Source 1 inverted signal is disabled for Gate 1

23.1.5 CLCx Gate Logic Input Select High Register

Name: CLCxGLSH

Offset: 0x0CA, 0x0D6, 0x0E2, 0x0EE, 0xF32, 0xF3E, 0xF4A, 0xF56

Bit 15 14 13 12 11 10 9 8

G4D4T G4D4N G4D3T G4D3N G4D2T G4D2N G4D1T G4D1N

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

G3D4T G3D4NG3D3T G3D3NG3D2T G3D2NG3D1T G3D1N

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 15 - G4D4T Gate 4 Data Source 4 True Enable bit

Value Description

1Data Source 4 signal is enabled for Gate 4
0Data Source 4 signal is disabled for Gate 4

Bit 14 - G4D4N Gate 4 Data Source 4 Negated Enable bit

Value Description

1Data Source 4 inverted signal is enabled for Gate 4
0Data Source 4 inverted signal is disabled for Gate 4

Bit 13 - G4D3T Gate 4 Data Source 3 True Enable bit

Value Description

1Data Source 3 signal is enabled for Gate 4
0Data Source 3 signal is disabled for Gate 4

Bit 12 - G4D3N Gate 4 Data Source 3 Negated Enable bit

Value Description

1Data Source 3 inverted signal is enabled for Gate 4
0Data Source 3 inverted signal is disabled for Gate 4

Bit 11 - G4D2T Gate 4 Data Source 2 True Enable bit

Value Description

1Data Source 2 signal is enabled for Gate 4
0Data Source 2 signal is disabled for Gate 4

Bit 10 - G4D2N Gate 4 Data Source 2 Negated Enable bit

Value Description

1Data Source 2 inverted signal is enabled for Gate 4
0Data Source 2 inverted signal is disabled for Gate 4

Bit 9 – G4D1T Gate 4 Data Source 1 True Enable bit

Value Description

1Data Source 1 signal is enabled for Gate 4
0Data Source 1 signal is disabled for Gate 4

Bit 8 – G4D1N Gate 4 Data Source 1 Negated Enable bit

Value Description

1Data Source 1 inverted signal is enabled for Gate 4
0Data Source 1 inverted signal is disabled for Gate 4

Bit 7 – G3D4T Gate 3 Data Source 4 True Enable bit

Value Description
1Data Source 4 signal is enabled for Gate 3
0Data Source 4 signal is disabled for Gate 3

Bit 6 – G3D4N Gate 3 Data Source 4 Negated Enable bit

Value Description
1Data Source 4 inverted signal is enabled for Gate 3
0Data Source 4 inverted signal is disabled for Gate 3

Bit 5 – G3D3T Gate 3 Data Source 3 True Enable bit

Value Description
1Data Source 3 signal is enabled for Gate 3
0Data Source 3 signal is disabled for Gate 3

Bit 4 – G3D3N Gate 3 Data Source 3 Negated Enable bit

Value Description
1Data Source 3 inverted signal is enabled for Gate 3
0Data Source 3 inverted signal is disabled for Gate 3

Bit 3 – G3D2T Gate 3 Data Source 2 True Enable bit

Value Description
1Data Source 2 signal is enabled for Gate 3
0Data Source 2 signal is disabled for Gate 3

Bit 2 - G3D2N Gate 3 Data Source 2 Negated Enable bit

Value Description
1Data Source 2 inverted signal is enabled for Gate 3
0Data Source 2 inverted signal is disabled for Gate 3

Bit 1 – G3D1T Gate 3 Data Source 1 True Enable bit

Value Description
1Data Source 1 signal is enabled for Gate 3
0Data Source 1 signal is disabled for Gate 3

Bit 0 - G3D1N Gate 3 Data Source 1 Negated Enable bit

Value Description
1Data Source 1 inverted signal is enabled for Gate 3
0Data Source 1 inverted signal is disabled for Gate 3

24. Peripheral Trigger Generator (PTG)

Note: This data sheet summarizes the features of the dsPIC33CK1024MP710 family of devices. It is not intended to be a comprehensive reference source. To complement the information in this data sheet, refer to “Peripheral Trigger Generator (PTG)” (www.microchip.com/DS70000669).

The dsPIC33CK1024MP710 family Peripheral Trigger Generator (PTG) module is a user-programmable sequencer that is capable of generating complex trigger signal sequences to coordinate the operation of other peripherals. The PTG module is designed to interface with other modules, such as an Analog-to-Digital Converter (ADC), output compare and PWM modules, timers and interrupt controllers.

24.1 Features

- Behavior is Step Command Driven:

- Step commands are eight bits wide

- Commands are Stored in a Step Queue:

– Queue depth is up to 32 entries

- Programmable Step execution time (Step delay)

• Supports the Command Sequence Loop:

- Can be nested one-level deep

– Conditional or unconditional loop

- Two 16-bit loop counters

• 15 Hardware Input Triggers:

- Sensitive to either positive or negative edges, or a high or low level

• One Software Input Trigger

- Generates up to 32 Unique Output Trigger Signals

- Generates Two Types of Trigger Outputs:

- Individual

- Broadcast

• Strobed Output Port for Literal Data Values:

- 5-bit literal write (literal part of a command)

- 16-bit literal write (literal held in the PTGL0 register)

- Generates up to Ten Unique Interrupt Signals

- Two 16-Bit General Purpose Timers

- Flexible Self-Contained Watchdog Timer (WDT) to Set an Upper Limit to Trigger Wait Time

- Single-Step Command Capability in Debug mode

- Selectable Clock (System, Pulse-Width Modulator (PWM) or ADC)

• Programmable Clock Divider

Figure 24-1. PTG Block Diagram
Microchip dsPIC33CK1024MP708 - Features - 1

flowchart
graph TD
    A["PTGHOLD"] --> B["PTGADJ"]
    B --> C["PTGDBTE[31:0"]]
    C --> D["PTGCST[15:0"]]
    D --> E["PTGCON[15:0"]]
    E --> F["PTGDIV[4:0"]]
    F --> G["PTGCLK[2:0"]]
    G --> H["Clock Inputs"]
    H --> I["÷"]
    I --> J["PTGControl Logic"]
    J --> K["PTGLDIM[15:0"]]
    K --> L["PTGCLIM[15:0"]]
    L --> M["PTGGeneral Purpose Timer x"]
    M --> N["PTGLoop Counter x"]
    N --> O["PTGStep Delay Timer"]
    O --> P["Trigger Outputs"]
    P --> Q["PTGO0"]
    P --> R["PTGO31"]
    J --> S["Trigger Inputs"]
    S --> T["PTGQPTR[4:0"]]
    T --> U["PTGQPTR"]
    U --> V["PTGQVE0"]
    U --> W["PTGQVE1"]
    U --> X["PTGQVE2"]
    U --> Y["PTGQVE3"]
    U --> Z["PTGQVE4"]
    U --> AA["PTGQVE5"]
    U --> AB["PTGQVE6"]
    U --> AC["PTGQVE7"]
    U --> AD["..."]
    U --> AE["PTGQVE15"]
    J --> AF["Command Decoder"]
    AF --> AG["PTGWatchdog Timer(1)"]
    AG --> AH["PTGWDTIF"]
    J --> AI["Strobe Output[15:0"]]
    AI --> AJ["PTG0IF"]
    AI --> AK["PTG7IF"]
    J --> AL["Step Command"]
    AL --> AM["Trigger Outputs"]
    AM --> AN["PTGStep Delay Timer"]
    AN --> AO["PTGSDLIM[15:0"]]
    AO --> AP["PTGCLIM[15:0"]]
    AP --> AQ["PTGGeneral Purpose Timer x"]
    AQ --> AR["PTGTxLIM[15:0"]]
    AR --> AS["PTGLO[15:0"]]
    AS --> AT["PTGGL0[15:0"]]
    AT --> AU["PTGCLM[15:0"]]
    AU --> AV["PTGCLM[15:0"]]
    AV --> AW["PTGCLM[15:0"]]
    AW --> AX["PTGCLM[15:0"]]
    AX --> AY["PTGCLM[15:0"]]
    AY --> AZ["PTGCLM[15:0"]]
    AZ --> BA["PTGCLM[15:0"]]
    BA --> BB["PTGCLM[15:0"]]
    BB --> BC["PTGCLM[15:0"]]
    BC --> BD["PTGCLM[15:0"]]
    BD --> BE["PTGCLM[15:0"]]
    BE --> BF["PTGCLM[15:0"]]
    BF --> BG["PTGCLM[15:0"]]
    BG --> BH["PTGCLM[15:0"]]
    BH --> BI["PTGCLM[15:0"]]
    BI --> BJ["PTGCLM[15:0"]]
    BJ --> BK["PTGCLM[15:0"]]
    BK --> BL["PTGCLM[15:0"]]
    BL --> BM["PTGCLM[15:0"]]
    BM --> BN["PTGCLM[15:0"]]
    BN --> BO["PTGCLM[15:0"]]
    BO --> BP["PTGCLM[15:0"]]
    BP --> BQ["PTGCLM[15:0"]]
    BQ --> BR["PTGCLM[15:0"]]
    BR --> BS["PTGCLM[15:0"]]
    BS --> BT["PTGCLM[15:0"]]
    BT --> BU["PTGCLM[15:0"]]
    BU --> BV["PTGCLM[15:0"]]
    BV --> BW["PTGCLM[15:0"]]
    BW --> BX["PTGCLM[15:0"]]
    BX --> BY["PTGCLM[15:0"]]
    BY --> BZ["PTGCLM[15:0"]]
    BZ --> CA["PTGCLM[15:0"]]
    CA --> CB["PTGCLM[15:0"]]
    CB --> CC["PTGCLM[15:0"]]
    CC --> CD["PTGCLM[15:0"]]
    CD --> CE["PTGCLM[15:0"]]
    CE --> CF["PTGCLM[15:0"]]
    CF --> CG["PTGCLM[15:0"]]
    CG --> CH["PTGCLM[15:0"]]
    CH --> CI["PTGCLM[15:0"]]
    CI --> CJ["PTGCLM[15:0"]]
    CJ --> CK["PTGCLM[15:0"]]
    CK --> CL

Note:
1. This is a dedicated Watchdog Timer for the PTG module and is independent of the device Watchdog Timer.

24.2 PTG Registers

OffsetNameBit Pos. 76543210
0x0900PTGCST15:8PTGENPTGSIDLPTGTOGLPTGSWTPTGSSENPTGIVIS
7:0PTGSTRTPTGWDTOPTGBUSYPTGITM[1:0]
0x0902PTGCON15:8PTGCLK[2:0]PTGDIV[4:0]
7:0PTGPWD[3:0]PTGWDT[2:0]
0x0904PTGBTE(1)15:8PTGBTE[15:8]
7:0PTGBTE[7:0]
0x0906PTGBTEH(1)15:8PTGBTE[31:24]
7:0PTGBTE[23:17]
0x0908PTGHOLD(1)15:8PTGHOLD[15:8]
7:0PTGHOLD[7:0]
0x090A...0x090BReserved
0x090CPTGTOLIM(1)15:8PTGTOLIM[15:8]
7:0PTGTOLIM[7:0]
0x090E...0x090FReserved
0x0910PTGT1LIM(1)15:8PTGT1LIM[15:8]
7:0PTGT1LIM[7:0]
0x0912...0x0913Reserved
0x0914PTGSDLIM(1)15:8PTGSDLIM[15:8]
7:0PTGSDLIM[7:0]
0x0916...0x0917Reserved
0x0918PTGCOLIM(1)15:8PTGCOLIM[15:8]
7:0PTGCOLIM[7:0]
0x091A...0x091BReserved
0x091CPTGC1LIM(1)15:8PTGC1LIM[15:8]
7:0PTGC1LIM[7:0]
0x091E...0x091FReserved
0x0920PTGADJ(1)15:8PTGADJ[15:8]
7:0PTGADJ[7:0]
0x0922...0x0923Reserved
0x0924PTGLO(1,2)15:8PTGLO[15:8]
7:0PTGLO[7:0]
0x0926...0x0927Reserved
0x0928PTGQPTR(1)15:8
7:0PTGQPTR[4:0]
0x092A...0x092FReserved
0x0930PTGQUEO(1)15:8STEP2n[7:0]
7:0STEP2n[7:0]
0x0932PTGQUE1(1)15:8STEP2n[7:0]
7:0STEP2n[7:0]
0x0934PTGQUE2(1)15:8STEP2n[7:0]
7:0STEP2n[7:0]
OffsetName Bit Pos. 7 6 5 4 3 2 1 0
0x0936 PTGQUE3(1)15:8 STEP2n[7:0]
7:0 STEP2n[7:0]
0x0938 PTGQUE4(1)15:8 STEP2n[7:0]
7:0 STEP2n[7:0]
0x093A PTGQUE5(1)15:8 STEP2n[7:0]
7:0 STEP2n[7:0]
0x093C PTGQUE6(1)15:8 STEP2n[7:0]
7:0 STEP2n[7:0]
0x093E PTGQUE7(1)15:8 STEP2n[7:0]
7:0 STEP2n[7:0]
0x0940 PTGQUE8(1)15:8 STEP2n[7:0]
7:0 STEP2n[7:0]
0x0942 PTGQUE9(1)15:8 STEP2n[7:0]
7:0 STEP2n[7:0]
0x0944 PTGQUE10(1)15:8 STEP2n[7:0]
7:0 STEP2n[7:0]
0x0946 PTGQUE11(1)15:8 STEP2n[7:0]
7:0 STEP2n[7:0]
0x0948 PTGQUE12(1)15:8 STEP2n[7:0]
7:0 STEP2n[7:0]
0x094A PTGQUE13(1)15:8 STEP2n[7:0]
7:0 STEP2n[7:0]
0x094C PTGQUE14(1)15:8 STEP2n[7:0]
7:0 STEP2n[7:0]
0x094E PTGQUE15(1)15:8 STEP2n[7:0]
7:0 STEP2n[7:0]

24.2.1 PTG Control/Status Low Register

Name: PTGCST

Offset: 0x900

Notes:

  1. These bits apply to the PTGWHI and PTGWLO commands only.
  2. This bit is only used with the PTGCTRL Step command software trigger option.
  3. The PTGSSEN bit may only be written when in Debug mode.

Bit 15 14 13 12 11 10 9 8

PTGENPTGSIDLPTGTOGLPTGSWTPTGS$ENPTGIVIS
AccessR/WR/WR/WR/WR/WR/WR/W
Reset0000000

Bit 76543210

PTGSTRTPTGWDTOPTGBUSYPTGITM[1:0]
AccessR/WR/W R/WR/W R/W
Reset0 0 00 0

Bit 15 – PTGEN PTG Broadcast Trigger Enable bit

ValueDescription
1PTG is enabled
0PTG is disabled

Bit 13 – PTGSIDL PTG Freeze in Debug Mode bit

ValueDescription
1Halts PTG operation when device is Idle
0PTG operation continues when device is Idle

Bit 12 - PTGTOGL PTG Toggle Trigger Output bit

ValueDescription
1Toggles state of TRIG output for each execution of PTGTRIG
0Generates a single TRIG pulse for each execution of PTGTRIG

Bit 10 - PTGSWT PTG Software Trigger bit ^(2)

ValueDescription
1If the PTG state machine is executing the “Wait for software trigger” Step command (OPTION[3:0] = 1010 or 1011), the command will complete and execution will continue
0No action other than to clear the bit

Bit 9 – PTGSSEN PTG Single-Step Command bit ^(3)

ValueDescription
1Enables single Step when in Debug mode
0Disables single Step

Bit 8 – PTGIVIS PTG Counter/Timer Visibility bit

ValueDescription
1Reading the PTGSDLIM, PTGCxLIM or PTGTxLIM register returns the current values of their corresponding Counter/Timer registers (PTGSDLIM, PTGCxLIM and PTGTxLIM)
0Reading the PTGSDLIM, PTGCxLIM or PTGTxLIM register returns the value of these Limit registers

Bit 7 – PTGSTRT PTG Start Sequencer bit

ValueDescription
1Starts to sequentially execute the commands (Continuous mode)

Value Description

0Stops executing the commands

Bit 6 – PTGWDTO PTG Watchdog Timer Time-out Status bit

Value Description
1PTG Watchdog Timer has timed out
0PTG Watchdog Timer has not timed out

Bit 5 – PTGBUSY PTG State Machine Busy bit

Value Description
1PTG is running on the selected clock source; no SFR writes are allowed to PTGCLK[2:0] or PTGDIV[4:0]
0PTG state machine is not running

Bits 1:0 – PTGITM[1:0] PTG Input Trigger Operation Selection bits ^(1)

Value Description
11Single-level detect with Step delay not executed on exit of command (regardless of the PTGCTRL command) (Mode 3)
10Single-level detect with Step delay executed on exit of command (Mode 2)
01Continuous edge detect with Step delay not executed on exit of command (regardless of the PTGCTRL command) (Mode 1)
00Continuous edge detect with Step delay executed on exit of command (Mode 0)

24.2.2 PTG Control/Status Register

Name: PTGCON

Offset: 0x902

Bit 15 14 13 12 11 10 9 8

PTGCLK[2:0] PTGDIV[4:0]
AccessR/W R/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0

Bit 76543210

PTGPWD[3:0] PTGWDT[2:0]
AccessR/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 00 0 0

Bits 15:13 – PTGCLK[2:0] PTG Module Clock Source Selection bits

ValueDescription
111CLC1 output
110 F_VCO/4
101Reserved
100Reserved
011Input from Timer1 Clock pin, T1CK
010ADC clock
001 F_CY
000 F_P

Bits 12:8 – PTGDIV[4:0] PTG Module Clock Prescaler (Divider) bits

ValueDescription
11111Divide-by-32
11110Divide-by-31
. . .
00001Divide-by-2
00000Divide-by-1

Bits 7:4 – PTGPWD[3:0] PTG Trigger Output Pulse-Width (in PTG clock cycles) bits

ValueDescription
1111All trigger outputs are 16 PTG clock cycles wide
1110All trigger outputs are 15 PTG clock cycles wide
...
0001All trigger outputs are 2 PTG clock cycles wide
0000All trigger outputs are 1 PTG clock cycle wide

Bits 2:0 – PTGWDT[2:0] PTG Watchdog Timer Time-out Selection bits

ValueDescription
111Watchdog Timer will time out after 512 PTG clocks
110Watchdog Timer will time out after 256 PTG clocks
101Watchdog Timer will time out after 128 PTG clocks
100Watchdog Timer will time out after 64 PTG clocks
011Watchdog Timer will time out after 32 PTG clocks
010Watchdog Timer will time out after 16 PTG clocks
001Watchdog Timer will time out after 8 PTG clocks
000Watchdog Timer is disabled

24.2.3 PTG Broadcast Trigger Enable Register Low

Name: PTGBTE (1)

Offset: 0x904

Note:

  1. This register is read-only when the module is executing Step commands.

Bit 15 14 13 12 11 10 9 8

PTGBTE[15:8]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

PTGBTE[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 15:0 – PTGBTE[15:0] PTG Broadcast Trigger Enable bits

Value Description

1Generates trigger when the broadcast command is executed
0Does not generate trigger when the broadcast command is executed

24.2.4 PTG Broadcast Trigger Enable Low Register

Name: PTGBTEH (1)

Offset: 0x906

Note:

  1. This register is read-only when the module is executing Step commands.

Bit 15 14 13 12 11 10 9 8

PTGBTE[31:24]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

PTGBTE[23:17]

Access R/W R/W R/W R/W R/W R/W R/W

Reset 0000000

Bits 15:8 – PTGBTE[31:24] PTG Broadcast Trigger Enable bits

Value Description

1Generates trigger when the broadcast command is executed
0Does not generate trigger when the broadcast command is executed

Bits 6:0 – PTGBTE[23:17] PTG Broadcast Trigger Enable bits

Value Description

1Generates trigger when the broadcast command is executed
0Does not generate trigger when the broadcast command is executed

24.2.5 PTG Hold Register

Name: PTGHOLD (1)

Offset: 0x908

Note:

  1. This register is read-only when the module is executing Step commands.

Bit 15 14 13 12 11 10 9 8

PTGHOLD[15:8]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

PTGHOLD[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 15:0 – PTGHOLD[15:0] PTG General Purpose Hold Register bits

This register holds the user-supplied data to be copied to the PTGTxLIM, PTGCxLIM, PTGSDLIM or PTGL0 register using the PTGCOPY command.

24.2.6 PTG Timer0 Limit Register

Name: PTGTOLIM (1)

Offset: 0x90C

Note:

  1. This register is read-only when the module is executing Step commands.

Bit 15 14 13 12 11 10 9 8

PTGTOLIM[15:8]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

PTGTOLIM[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 15:0 – PTGTOLIM[15:0] PTG Timer0 Limit Register bits

General Purpose Timer0 Limit register.

24.2.7 PTG Timer1 Limit Register

Name: PTGT1LIM (1)

Offset: 0x910

Note:

  1. This register is read-only when the module is executing Step commands.

Bit 15 14 13 12 11 10 9 8

PTGT1LIM[15:8]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

PTGT1LIM[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 15:0 – PTGT1LIM[15:0] PTG Timer1 Limit Register bits

General Purpose Timer1 Limit register.

24.2.8 PTG Step Delay Limit Register

Name: PTGSDLIM (1)

Offset: 0x914

Note:

  1. This register is read-only when the module is executing Step commands.

Bit 15 14 13 12 11 10 9 8

PTGSDLIM[15:8]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

PTGSDLIM[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 15:0 – PTGSDLIM[15:0] PTG Step Delay Limit Register bits

This register holds a PTG Step delay value representing the number of additional PTG clocks between the start of a Step command and the completion of a Step command.

24.2.9 PTG Counter 0 Limit Register

Name: PTGCOLIM (1)

Offset: 0x918

Note:

  1. This register is read-only when the module is executing Step commands.

Bit 15 14 13 12 11 10 9 8

PTGCOLIM[15:8]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

PTGC0LIM[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 15:0 – PTGCOLIM[15:0] PTG Counter 0 Limit Register bits

This register is used to specify the loop count for the PTGJMPC0 Step command or as a Limit register for the General Purpose Counter 0.

24.2.10 PTG Counter 1 Limit Register

Name: PTGC1LIM (1)

Offset: 0x91C

Note:

  1. This register is read-only when the module is executing Step commands.

Bit 15 14 13 12 11 10 9 8

PTGC1LIM[15:8]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

PTGC1LIM[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 15:0 – PTGC1LIM[15:0] PTG Counter 1 Limit Register bits

This register is used to specify the loop count for the PTGJMPC1 Step command or as a Limit register for the General Purpose Counter 1.

24.2.11 PTG Adjust Register

Name: PTGADJ (1)

Offset: 0x920

Note:

  1. This register is read-only when the module is executing Step commands.

Bit 15 14 13 12 11 10 9 8

PTGADJ[15:8]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

PTGADJ[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 15:0 – PTGADJ[15:0] PTG Adjust Register bits

This register holds the user-supplied data to be added to the PTGTxLIM, PTGCxLIM, PTGSDLIM or PTGL0 register using the PTGADD command.

24.2.12 PTG Literal 0 Register

Name: PTGLO (1,2)

Offset: 0x924

Notes:

  1. This register is read-only when the module is executing Step commands.

  2. The PTG strobe output is typically connected to the ADC Channel Select register. This allows the PTG to directly control ADC channel switching. See the specific device data sheet for connections of the PTG output.

Bit 15 14 13 12 11 10 9 8

PTGLO[15:8]
AccessR/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0
Bit7 6 5 4 3 2 1 0
PTGLO[7:0]
AccessR/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0

Bits 15:0 – PTGL0[15:0] PTG Literal 0 Register bits

This register holds the 6-bit value to be written to the CNVCHSEL[5:0] bits (ADCON3L[5:0]) with the PTGCTRL Step command.

24.2.13 PTG Step Queue Pointer Register

Name: PTGQPTR (1)

Offset: 0x928

Note:

  1. This register is read-only when the module is executing Step commands.

Microchip dsPIC33CK1024MP708 - Note: - 1

text_image Bit 15 14 13 12 11 10 9 8 Access Reset Bit 7 6 5 4 3 2 1 0 PTGQPTR[4:0] Access R/W R/W R/W R/W R/W Reset 0 0 0 0 0

Bits 4:0 – PTGQPTR[4:0] PTG Step Queue Pointer Register bits This register points to the currently active Step command in the Step queue.

24.2.14 PTG Step Queue x Pointer Register (x = 0-15)

Name: PTGQUEx (1)

Offset: 0x930, 0x932, 0x934, 0x936, 0x938, 0x93A, 0x93C, 0x93E, 0x940, 0x942, 0x944, 0x946, 0x948, 0x94A, 0x94C, 0x94E

Notes:

  1. This register is read-only when the module is executing Step commands.

  2. Refer to Table 24-1 for the Step command encoding.

Bit 15 14 13 12 11 10 9 8

Microchip dsPIC33CK1024MP708 - Notes: - 1

text_image STEP2n[7:0] Access R/W R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 STEP2n[7:0] Access R/W R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0 0

Bits 15:8 - STEP2n[7:0] PTG Command 2n bits ^(2)

A queue location for storage of the STEP2n command byte, , where 'n' is the even numbered Step Queue Pointers.

Bits 7:0 - STEP2n[7:0] PTG Command 2n bits ^(2)

A queue location for storage of the STEP2n command byte, where 'n' is the odd numbered Step Queue Pointers.

24.3 PTG Step Commands

Table 24-1. PTG Step Command Format and Description

Step Command Byte
STEPx[7:0]
CMD[3:0] OPTION[3:0]
bit 7 bit 4 bit 3bit 0

Table 24-2. PTG Command Options

bit 7-4Step CommandCMD[3:0]Command Description
FTGCTRL 0000Execute the control command as described by the OPTION[3:0] bits.
PTGADD0001Add contents of the PTGADI register to the target register as described by the OPTION[3:0] bits.
FTGCOPYCopy contents of the PTGHOLD register to the target register as described by the OPTION[3:0] bits.
FTGSTRB 001xCopy the values contained in the bits, CMD[0]:OPTION[3:0], to the strobe output bits[4:0].
PTGWHI0103Wait for a low-to-high edge input from a selected PTG trigger Input as described by the OPTION[3:0] bits.
PTGMLO0101Wait for a high-to-low edge input from a selected PTG trigger Input as described by the OPTION[3:0] bits.
0110Reserved; do not use.[1]
PTGIRQ0111Generate Individual Interrupt request as described by the OPTION[3:0] bits.
FTGTRIG 100xGenerate individual trigger output as described by the bits, CMD[0]:OPTION[3:0].
FTGJME101xCopy the values contained in the bits, CMD[0]:OPTION[3:0], to the PTGQPTR register and jump to that Step queue.
PTGCMPCO110xPTGCO = PTGCOLIM: Increment the PTGQPTR register.
PTGCO ≠ PTGCOLIM: Increment Counter 0 (PTGCO) and copy the values contained in the bits, CMD[0]:OPTION[3:0], to the PTGQPTR register, and jump to that Step queue.
PTGZMPCI111xPTGC1 = PTGC1LIM: Increment the PTGQPTR register.
PTGC1 ≠ PTGC1LIM: Increment Counter 1 (PTGC1) and copy the values contained in the bits, CMD[0]:OPTION[3:0], to the PTGQPTR register, and jump to that Step queue.
bit 3-0 PTGCTRLMC000NOF.
C001Reserved; do not use.
C010Disable Step delay timer (PTGSD).
C011Reserved; do not use.
C100Reserved; do not use.
C101Reserved; do not use.
C110Enable Step delay timer (PTGSD).
C111Reserved; do not use.
1000Start and wait for the PTG Timer0 to match the PTGTOLIM register.
1001Start and wait for the PTG Timer1 to match the PTGT1LIM register.
1010Wait for the software trigger (level, PTGSWT = 1).
1011Wait for the software trigger (positive edge, PTGSWT = 0 to 1).
1100Copy the PTGCOLIM register contents to the strobe output.
1101Copy the PTGC1LIM register contents to the strobe output.
1110Copy the PTGL0 register contents to the strobe output.
1111Generate the triggers indicated in the PTGBTE register.
PTGADDMC000Add the PTGADJ register contents to the PTGCOLIM register.
C001Add the PTGADJ register contents to the PTGC1LIM register.
C010Add the PTGADJ register contents to the PTGTOLIM register.
C011Add the PTGADJ register contents to the PTGT1LIM register.
C100Add the PTGADJ register contents to the PTGSDLIM register.
C101Add the PTGADJ register contents to the PTGL0 register.
C110Reserved; do not use.
C111Reserved; do not use.
PTGCOPYM1000Copy the PTGHOLD register contents to the PTGCOLIM register.
1001Copy the PTGHOLD register contents to the PTGC1LIM register.
1010Copy the PTGHOLD register contents to the PTGTOLIM register.
1011Copy the PTGHOLD register contents to the PTGT1LIM register.
1100Copy the PTGHOLD register contents to the PTGSDLIM register.
1101Copy the PTGHOLD register contents to the PTGL0 register.
1110Reserved; do not use.
1111Reserved; do not use.
PTGWHI® or PTGWLOMC000PTGI0 (see Table 24-3 for input assignments).
*** ***
1111PTGI15 (see Table 24-3 for input assignments).
PTGIRQNC000Generate PTG Interrupt 0.
*** ***
C111Generate PTG Interrupt 7.
1000Reserved; do not use.
*** ***
1111Reserved; do not use.
PTGTRIG C000PTGO0 (see Table 24-4 for input assignments).
C001PTGO1 (see Table 24-4 for input assignments).
*** ***
1110PTGO30 (see Table 24-4 for input assignments).
1111PTGO31 (see Table 24-4 for input assignments).
PTGWHI® or PTGWLOMC000PTGI0 (see specific device data sheet for interrupt assignments).
*** ***
1111PTGI15 (see specific device data sheet for interrupt assignments).
PTGIRQNC000Generate PTG Interrupt 0 (see specific device data sheet for interrupt assignments).
*** ***
C111Generate PTG Interrupt 7 (see specific device data sheet for interrupt assignments).
1000Reserved; do not use.
*** ***
1111Reserved; do not use.
PTGTRIG S000PTGO0 (see specific device data sheet for interrupt assignments).
C001PTGO1 (see specific device data sheet for interrupt assignments).

Table 24-3. PTG Input Descriptions

PTG Input Number PTG Input Description
PTG Trigger Input 0 Trigger Input from PWM1 ADC Trigger 2
PTG Trigger Input 1 Trigger Input from PWM2 ADC Trigger 2
PTG Trigger Input 2 Trigger Input from PWM3 ADC Trigger 2
PTG Trigger Input 3 Trigger Input from PWM4 ADC Trigger 2
PTG Trigger Input 4 Trigger Input from PWM5 ADC Trigger 2
PTG Trigger Input 5 Trigger Input from PWM6 ADC Trigger 2
PTG Trigger Input 6 Trigger Input from PWM7 ADC Trigger 2
PTG Trigger Input 7 Trigger Input from APWM1 ADC Trigger 2
PTG Trigger Input 8 Trigger Input from APWM2 ADC Trigger 2
PTG Trigger Input 9 Trigger Input from Comparator 1
PTG Trigger Input 10 Trigger Input from Comparator 2
PTG Trigger Input 11 Trigger Input from Comparator 3
PTG Trigger Input 12 Trigger Input from CLC1
PTG Trigger Input 13 Trigger Input ADC Done Group Interrupt
PTG Trigger Input 14 Trigger Input from CLC2
PTG Trigger Input 15 Trigger Input from INT2 PPS

Table 24-4. PTG Output Descriptions

PTG Output Number PTG Output Description
PTGO0 to PTGO11 Reserved
PTGO12 ADC TRGSRC[30]
PTGO13 to PTGO23 Reserved
PTGO24 PPS Output RP46
PTGO25 PPS Output RP47
PTGO26 PPS Input RP6
PTGO27 PPS Input RP7
PTGO28 to PTGO31 Reserved

25. 32-Bit Programmable Cyclic Redundancy Check (CRC) Generator

Note: This data sheet summarizes the features of the dsPIC33CK1024MP710 family of devices. It is not intended to be a comprehensive reference source. For more information, refer to "32-Bit Programmable Cyclic Redundancy Check (CRC)" (www.microchip.com/DS30009729).

The 32-bit programmable CRC generator provides a hardware implemented method of quickly generating checksums for various networking and security applications. It offers the following features:

  • User-Programmable CRC Polynomial Equation, Up to 32 Bits
    • Programmable Shift Direction (little or big-endian)
  • Independent Data and Polynomial Lengths
  • Configurable Interrupt Output
  • Data FIFO

Figure 25-1 displays a simplified block diagram of the CRC generator.
Figure 25-1. CRC Module Block Diagram
Microchip dsPIC33CK1024MP708 - 32-Bit Programmable Cyclic Redundancy Check (CRC) Generator - 1

flowchart
graph TD
    A["CRCDATHCRCDATL"] --> B["Variable FIFO (4x32, 8x16 or 16x8)"]
    B --> C["Shift Buffer"]
    C --> D["LENDIAN"]
    D --> E["CRC Shift Engine"]
    E --> F["Shift Complete"]
    F --> G["CRCISEL"]
    G --> H["FIFO Empty"]
    H --> I["1"]
    I --> J["CRC Interrupt"]
    E --> K["Shifter Clock 2 * FcY"]
    K --> C
    style A fill:#f9f,stroke:#333
    style I fill:#ccf,stroke:#333

25.1 CRC Control Registers

OffsetNameBit Pos. 7 6 54 3 2 1 0
0xB0CRCCONL15:8 CRCEN CSIDL VWORD[4:0]
7:0 CRCFUL CRCMPT CRCISEL CRCGO LENDIAN MOD
0xB2CRCCONH15:8DWIDTH[4:0]
7:0PLEN[4:0]
0xB4CRCXORL15:8X[15:8]
7:0X[7:1]
0xB6CRCXORH15:8X[31:24]
7:0X[23:16]

25.1.1 CRC Control Register Low

Name: CRCCONL

Offset: 0x0B0

Legend: HC = Hardware Clearable bit, HSC = Hardware Settable/Clearable bit

Bit 15 14 13 12 11 10 9 8

CRCEN CSIDL VWORD[4:0]
AccessR/W R/W HSC/R HSC/R HSC/R HSC/R HSC/R
Reset00 0 0 0 0 0

Bit 76543210

CRCFULCRCMPTCRCISELCRCGOLENDIANMOD
AccessHSC/RHSC/R R/WHC/R/WR/WR/W
Reset01000

Bit 15 - CRCEN CRC Enable bit

ValueDescription
1Enables module
0Disables module

Bit 13 - CSIDL CRC Stop in Idle Mode bit

ValueDescription
1Discontinues module operation when device enters Idle mode
0Continues module operation in Idle mode

Bits 12:8 – VWORD[4:0] Pointer Value bits

Indicates the number of valid words in the FIFO. Has a maximum value of 8 when PLEN[4:0] ≥ 7 or 16 when PLEN[4:0] ≤ 7 .

Bit 7 - CRCFUL CRC FIFO Full bit

ValueDescription
1FIFO is full
0FIFO is not full

Bit 6 – CRCMPT CRC FIFO Empty bit

ValueDescription
1FIFO is empty
0FIFO is not empty

Bit 5 – CRCISEL CRC Interrupt Selection bit

ValueDescription
1Interrupt on FIFO is empty; the final word of data is still shifting through the CRC
0Interrupt on shift is complete and results are ready

Bit 4 - CRCGO CRC Start bit

ValueDescription
1Starts CRC serial shifter
0CRC serial shifter is turned off

Bit 3 – LENDIAN Data Shift Direction Select bit

ValueDescription
1Data word is shifted into the FIFO, starting with the LSb (little-endian)
0Data word is shifted into the FIFO, starting with the MSb (big-endian)

Bit 2 – MOD CRC Calculation Mode bit

Value Description
1Alternate mode
0Legacy mode bit

25.1.2 CRC Control Register High

Name: CRCCONH

Offset: 0x0B2

Bit 15 14 13 12 11 10 9 8

DWIDTH[4:0]
Access Reset 0 0 0 0 0R/W R/W R/W R/W R/W
Bit 7 6 5 4 3 2 1 0
PLEN[4:0]
Access Reset 0 0 0 0 0R/W R/W R/W R/W R/W

Bits 12:8 – DWIDTH[4:0] Data Word Width Configuration bits

Configures the width of the data word (Data Word Width - 1).

Bits 4:0 – PLEN[4:0] Polynomial Length Configuration bits

Configures the length of the polynomial (Polynomial Length - 1).

25.1.3 CRC XOR Polynomial Register, Low Byte

Name: CRCXORL

Offset: 0x0B4

Microchip dsPIC33CK1024MP708 - CRC XOR Polynomial Register, Low Byte - 1

text_image Bit 15 14 13 12 11 10 9 8 X[15:8] Access R/W R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 X[7:1] Access R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0

Bits 15:8 - X[15:8] XOR of Polynomial Term x^n Enable bits

Bits 7:1 - X[7:1] XOR of Polynomial Term x^n Enable bits

25.1.4 CRC XOR Polynomial Register, High Byte

Name: CRCXORH

Offset: 0x0B6

Bit 15 14 13 12 11 10 9 8

X[31:24]
AccessR/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0
Bit7 6 5 4 3 2 1 0
X[23:16]
AccessR/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0

Bits 15:0 - X[31:16] XOR of Polynomial Term x^n Enable bits

26. Current Bias Generator (CBG)

Note: This data sheet summarizes the features of the dsPIC33CK1024MP710 family of devices. It is not intended to be a comprehensive reference source. To complement the information in this data sheet, refer to "Current Bias Generator (CBG)" (www.microchip.com/DS70005253) in the "dsPIC33/PIC24 Family Reference Manual".

The Current Bias Generator (CBG) consists of two classes of current sources: 10 A and 50 A sources. The major features of each current source are:

• 10 μA Current Sources:

  • Current sourcing only
  • Up to four independent sources

- 50 μA Current Sources:

  • Selectable current sourcing or sinking
    – Selectable current mirroring for sourcing and sinking

Table 26-1. CBG Channel Availability

Package Type ISRCx IBIASx
100-Pin 0,1,2,3 0,1,2,3
80-Pin 0,1,2,3 0,1,2,3
64-Pin 0,1,2,3 0,1,2,3
48-Pin 0,1,2,3 0,1,2,3

A simplified block diagram of the CBG module is shown in Figure 26-1.

Figure 26-1. Constant-Current Source Module Block Diagram ^(2)
10 μA Source 50 μA Source
Microchip dsPIC33CK1024MP708 - Current Bias Generator (CBG) - 1

text_image ON I10ENx AVDD ADC RESD(1) I/O Pin

Microchip dsPIC33CK1024MP708 - Current Bias Generator (CBG) - 2

flowchart
graph TD
    A["AV_DD"] --> B["↓"]
    C["SRCEN"] --> B
    D["SNKEN"] --> E["↓"]
    F["AVSS"] --> E
    G["ADC"] --> H["Resd(1)"]
    H --> I["I/O Pin"]
    I --> J["Resd(1)"]
    J --> K["RESD(1)"]
    K --> L["RESD(1)"]

Notes:

  1. RESD is typically 350 Ohms.
  2. The ADC analog input is shown only for clarity. Each analog peripheral connected to the pin has a separate Electrostatic Discharge (ESD) resistor.

26.1 Current Bias Generator Control Registers

OffsetNameBit Pos. 7 6 54 3 2 1 0
0x08F0 BIASCON15:8 ON
7:0I10EN3 I10EN2I10EN1 I10ENO
0x08F2 ... 0x08F3Reserved
0x08F4 IBIASCONOL15:8SHRSRCEN1SHRSNKEN1GENSRCEN1GENSNKEN1SRCEN1SNKEN1
7:0SHRSRCENOSHRSNKENOGENSRCENOGENSNKENOSRCENOSNKENO
0x08F6IBIASCONOH15:8SHRSRCEN3SHRSNKEN3GENSRCEN3GENSNKEN3SRCEN3SNKEN3
7:0SHRSRCEN2SHRSNKEN2GENSRCEN2GENSNKEN2SRCEN2SNKEN2

26.1.1 Current Bias Generator Control Register

Name: BIASCON

Offset: 0x8F0

Bit 15 14 13 12 11 10 9 8

ON
AccessR/W
Reset 0

Bit 76543210

I10EN3 I10EN2 I10EN1 I10ENO
Access ResetR/WR/WR/WR/W
0 0 0 0

Bit 15 - ON Current Bias Module Enable bit

ValueDescription
1Module is enabled
0Module is disabled

Bit 3 - I10EN3 10 μA Enable for Output 3 bit

ValueDescription
110 μA output is enabled
010 μA output is disabled

Bit 2 – I10EN2 10 μA Enable for Output 2 bit

ValueDescription
110 μA output is enabled
010 μA output is disabled

Bit 1 - I10EN1 10 μA Enable for Output 1 bit

ValueDescription
110 μA output is enabled
010 μA output is disabled

Bit 0 - I10ENO 10 μA Enable for Output 0 bit

ValueDescription
110 μA output is enabled
010 μA output is disabled

26.1.2 Current Bias Generator 50 A Current Source Control Low Register

Name: IBIASCONOL

Offset: 0x8F4

Bit 15 14 13 12 11 10 9 8

SHRSRCEN1SHRSNKEN1GENSRCEN1GENSNKEN1SRCEN1SNKEN1
AccessR/WR/WR/WR/WR/WR/W
Reset00000

Bit 76543210

SHRSRCENOSHRSNKENOGENSRCENOGENSNKENOSRCENOSNKENO
AccessR/WR/WR/WR/WR/WR/W
Reset00000

Bit 13 – SHRSRCEN1 Share Source Enable for Output #1 bit

ValueDescription
1Sourcing Current Mirror mode is enabled (uses reference from another source)
0Sourcing Current Mirror mode is disabled

Bit 12 – SHRSNKEN1 Share Sink Enable for Output #1 bit

ValueDescription
1Sinking Current Mirror mode is enabled (uses reference from another source)
0Sinking Current Mirror mode is disabled

Bit 11 – GENSRCEN1 Generated Source Enable for Output #1 bit

ValueDescription
1Source generates the current source mirror reference
0Source does not generate the current source mirror reference

Bit 10 – GENSNKEN1 Generated Sink Enable for Output #1 bit

ValueDescription
1Source generates the current source mirror reference
0Source does not generate the current source mirror reference

Bit 9 – SRCEN1 Source Enable for Output #1 bit

ValueDescription
1Current source is enabled
0Current source is disabled

Bit 8 – SNKEN1 Sink Enable for Output #1 bit

ValueDescription
1Current sink is enabled
0Current sink is disabled

Bit 5 – SHRSRCENO Share Source Enable for Output #0 bit

ValueDescription
1Sourcing Current Mirror mode is enabled (uses reference from another source)
0Sourcing Current Mirror mode is disabled

Bit 4 – SHRSNKENO Share Sink Enable for Output #0 bit

ValueDescription
1Sinking Current Mirror mode is enabled (uses reference from another source)
0Sinking Current Mirror mode is disabled

Bit 3 – GENSRCENO Generated Source Enable for Output #0 bit

Value Description
1Source generates the current source mirror reference
0Source does not generate the current source mirror reference

Bit 2 – GENSNKENO Generated Sink Enable for Output #0 bit

Value Description
1Source generates the current source mirror reference
0Source does not generate the current source mirror reference

Bit 1 – SRCENO Source Enable for Output #0 bit

Value Description
1Current source is enabled
0Current source is disabled

Bit 0 – SNKENO Sink Enable for Output #0 bit

Value Description
1Current sink is enabled
0Current sink is disabled

26.1.3 Current Bias Generator 50 μA Current Source Control High Register

Name: IBIASCONOH

Offset: 0x8F6

Bit 15 14 13 12 11 10 9 8

SHRSRCEN3SHRSNKEN3GENSRCEN3GENSNKEN3SRCEN3SNKEN3
AccessR/WR/WR/WR/WR/WR/W
Reset00000

Bit 76543210

SHRSRCEN2SHRSNKEN2GENSRCEN2GENSNKEN2SRCEN2SNKEN2
AccessR/WR/WR/WR/WR/WR/WR/W
Reset0 0 0 0 0 0

Bit 13 – SHRSRCEN3 Share Source Enable for Output #3 bit

ValueDescription
1Sourcing Current Mirror mode is enabled (uses reference from another source)
0Sourcing Current Mirror mode is disabled

Bit 12 – SHRSNKEN3 Share Sink Enable for Output #3 bit

ValueDescription
1Sinking Current Mirror mode is enabled (uses reference from another source)
0Sinking Current Mirror mode is disabled

Bit 11 – GENSRCEN3 Generated Source Enable for Output #3 bit

ValueDescription
1Source generates the current source mirror reference
0Source does not generate the current source mirror reference

Bit 10 – GENSNKEN3 Generated Sink Enable for Output #3 bit

ValueDescription
1Source generates the current source mirror reference
0Source does not generate the current source mirror reference

Bit 9 – SRCEN3 Source Enable for Output #3 bit

ValueDescription
1Current source is enabled
0Current source is disabled

Bit 8 – SNKEN3 Sink Enable for Output #3 bit

ValueDescription
1Current sink is enabled
0Current sink is disabled

Bit 5 – SHRSRCEN2 Share Source Enable for Output #2 bit

ValueDescription
1Sourcing Current Mirror mode is enabled (uses reference from another source)
0Sourcing Current Mirror mode is disabled

Bit 4 – SHRSNKEN2 Share Sink Enable for Output #2 bit

ValueDescription
1Sinking Current Mirror mode is enabled (uses reference from another source)
0Sinking Current Mirror mode is disabled

Bit 3 – GENSRCEN2 Generated Source Enable for Output #2 bit

Value Description
1Source generates the current source mirror reference
0Source does not generate the current source mirror reference

Bit 2 – GENSNKEN2 Generated Sink Enable for Output #2 bit

Value Description
1Source generates the current source mirror reference
0Source does not generate the current source mirror reference

Bit 1 – SRCEN2 Source Enable for Output #2 bit

Value Description
1Current source is enabled
0Current source is disabled

Bit 0 – SNKEN2 Sink Enable for Output #2 bit

Value Description
1Current sink is enabled
0Current sink is disabled

27. Operational Amplifier

Note: Some device variants support only two op amp instances. Refer to dsPIC33CK1024MP710 Product Families for availability.

The dsPIC33CK1024MP710 family implements three instances of operational amplifiers (op amps). The op amps can be used for a wide variety of purposes, including signal conditioning and filtering. The three op amps are functionally identical. The block diagram for a single amplifier is shown in Figure 27-1.

Figure 27-1. Single Operational Amplifier Block Diagram
Microchip dsPIC33CK1024MP708 - Operational Amplifier - 1

flowchart
graph LR
    A["OA Austin-"] --> C["+"]
    B["OA Austin+"] --> C["+"]
    C --> D["OA Austin OUT"]

The op amps are controlled by two SFR registers: AMPCON1L and AMPCON1H. They remain in a Low-Power state until the AMPON bit is set. Each op amp can then be enabled independently by setting the corresponding AMPENx bit (x = 1, 2, 3).

The NCHDISx bit provides some flexibility regarding input range versus Integral Nonlinearity (INL). When NCHDISx = 0 (default), the op amps have a wider input voltage range (see 33.2. AC Characteristics and Timing Parameters in 33. Electrical Characteristics). When NCHDISx = 1, the wider input range is traded for improved INL performance (lower INL).

27.1 Operational Amplifier Control Registers

OffsetName Bit Pos. 7 6 5 4 3 2 1 0
0x08DC AMPCON1L15:8 AMPON
7:0AMPEN3 AMPEN2 AMPEN1
0x08DE AMPCON1H15:8
7:0NCHDIS3NCHDIS2NCHDIS1

27.1.1 Op Amp Control Register Low

Name: AMPCON1L

Offset: 0x8DC

Bit 15 14 13 12 11 10 9 8

AMPON
AccessR/W
Reset 0

Bit 76543210

AMPEN3AMPEN2AMPEN1
AccessR/WR/WR/W
Reset0 0 0

Bit 15 – AMPON Op Amp Enable/On bit

ValueDescription
1Enables op amp modules if their respective AMPENx bits are also asserted
0Disables all op amp modules

Bit 2 – AMPEN3 Op Amp #3 Enable bit

ValueDescription
1Enables Op Amp #3 if the AMPON bit is also asserted
0Disables Op Amp #3

Bit 1 – AMPEN2 Op Amp #2 Enable bit

ValueDescription
1Enables Op Amp #2 if the AMPON bit is also asserted
0Disables Op Amp #2

Bit 0 – AMPEN1 Op Amp #1 Enable bit

ValueDescription
1Enables Op Amp #1 if the AMPON bit is also asserted
0Disables Op Amp #1

27.1.2 Op Amp Control Register High

Name: AMPCON1H

Offset: 0x8DE

Microchip dsPIC33CK1024MP708 - Op Amp Control Register High - 1

text_image Bit 15 14 13 12 11 10 9 8 Access Reset Bit 7 6 5 4 3 2 1 0 NCHDIS3 NCHDIS2 NCHDIS1 Access R/W R/W R/W Reset 0 0 0

Bit 2 – NCHDIS3 Op Amp #3 N Channel Disable bit

ValueDescription
1Disables Op Amp #3 N channels input stage; reduced INL, but lowered input voltage range
0Wide input range for Op Amp #3

Bit 1 – NCHDIS2 Op Amp #2 N Channel Disable bit

ValueDescription
1Disables Op Amp #2 N channels input stage; reduced INL, but lowered input voltage range
0Wide input range for Op Amp #2

Bit 0 - NCHDIS1 Op Amp #1 N Channel Disable bit

ValueDescription
1Disables Op Amp #1 N channels input stage; reduced INL, but lowered input voltage range
0Wide input range for Op Amp #1

28. Deadman Timer (DMT)

Note: This data sheet summarizes the features of the dsPIC33CK1024MP710 family of devices. It is not intended to be a comprehensive reference source. To complement the information in this data sheet, refer to “Deadman Timer (DMT)” (www.microchip.com/DS70005155).

The primary function of the Deadman Timer (DMT) is to interrupt the processor in the event of a software malfunction. The DMT, which works on the system clock, is a free-running instruction fetch timer, which is clocked whenever an instruction fetch occurs, until a count match occurs. Instructions are not fetched when the processor is in Sleep mode.

DMT can be enabled in the Configuration fuse or by software in the DMTCON register by setting the ON bit. The DMT consists of a 32-bit counter with a time-out count match value, as specified by the two 16-bit Configuration Fuse registers: FDMTCNTL and FDMTCNTH.

A DMT is typically used in mission-critical and safety-critical applications, where any single failure of the software functionality and sequencing must be detected.

Figure 28-1 shows a block diagram of the Deadman Timer module.

Figure 28-1. Deadman Timer Block Diagram
Microchip dsPIC33CK1024MP708 - Deadman Timer (DMT) - 1

flowchart
graph LR
    A["Instruction Fetched Strobe(2)"] --> B["DMT Enable"]
    C["System Clock"] --> B
    B --> D["32-Bit Counter"]
    D --> E["(Counter) = DMT Max Count(1)"]
    E --> F["Improper Sequence Flag"]
    F --> G["DMT Event"]
    H["BAD1"] --> F
    I["BAD2"] --> F

Notes:

  1. DMT Max Count is controlled by the initial value of the FDMTCNTL and FDMTCNTH Configuration registers.
  2. DMT window interval is controlled by the value of the FDMTIVTL and FDMTIVTH Configuration registers.

28.1 Deadman Timer Control/Status Registers

OffsetNameBit Pos. 7 6 54 3 2 1 0
0x5CDMTCON15:8 ON
7:0
0x5E...0x5FReserved
0x60DMTPRECLR15:8 STEP1[7:0]
7:0
0x62...0x63Reserved
0x64DMTCLR15:8
7:0STEP2[7:0]
0x66...0x67Reserved
0x68DMTSTAT15:8
7:0BAD1BAD2DMTEVENTWINOPN
0x6A...0x6BReserved
0x6CDMTCNTL15:8COUNTER[15:8]
7:0COUNTER[7:0]
0x6EDMTCNTH15:8COUNTER[31:24]
7:0COUNTER[23:16]
0x70DMTHOLDREG(1)15:8UPRCNT[15:8]
7:0UPRCNT[7:0]
0x72...0x73Reserved
0x74PSCNTL15:8PSCNT[15:8]
7:0PSCNT[7:0]
0x76PSCNTH15:8PSCNT[31:24]
7:0PSCNT[23:16]
0x78PSINTVL15:8PSINTV[15:8]
7:0 PSINTV[7:0]
0x7APSINTVH15:8PSINTV[31:24]
7:0PSINTV[23:16]

28.1.1 Deadman Timer Control Register

Name: DMTCON

Offset: 0x05C

Legend: SO = Settable Only bit

Notes:

  1. This bit has control only when DMTDIS = 0 in the FDMT register.
  2. DMT cannot be disabled in software. Writing '0' to this bit has no effect.

Bit 15 14 13 12 11 10 9 8

ON
AccessR/SO
Reset 0

Bit 76543210

Access Reset

Bit 15 - ON DMT Enable bit ^(1,2)

ValueDescription
1Deadman Timer is enabled
0Deadman Timer is not enabled

28.1.2 Deadman Timer Preclear Register

Name: DMTPRECLR

Offset: 0x060

Note:

  1. Bits 15:8 are cleared when the DMT Counter is reset by writing a correct sequence of STEP1 and STEP2. STEP1 is also cleared if DMTCLR[STEP2] is loaded with the correct value in the correct sequence.

Microchip dsPIC33CK1024MP708 - Note: - 1

text_image Bit 15 14 13 12 11 10 9 8 STEP1[7:0] Access R/W R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0 0 Bit 7 6 5 4 3 2 1 0 Access Reset

Bits 15:8 – STEP1[7:0] DMT Preclear Enable bits

Value Description
01000000Enables the Deadman Timer preclear (Step 1)
All Other Write PatternsSets the BAD1 flag(1)

28.1.3 Deadman Timer Clear Register

Name: DMTCLR

Offset: 0x064

Note:

  1. Bits 7:0 are cleared when the DMT Counter is reset by writing a correct sequence of STEP1 and STEP2.

Microchip dsPIC33CK1024MP708 - Note: - 1

text_image Bit 15 14 13 12 11 10 9 8 Access Reset Bit 7 6 5 4 3 2 1 0 STEP2[7:0] Access R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0

Bits 7:0 – STEP2[7:0] DMT Clear Timer bits

Value Description
00001000Clears STEP1[7:0], STEP2[7:0] and the Deadman Timer if preceded by the correct loading of the STEP1[7:0] bits in the correct sequence. The write to these bits may be verified by reading the DMTCNTL/H registers and observing the counter being reset.
All OtherWrite PatternsSets the BAD2 bit; the value of STEP1[7:0] will remain unchanged and the new value being written to STEP2[7:0] will be captured.(1)

28.1.4 Deadman Timer Status Register

Name: DMTSTAT

Offset: 0x068

Note:

  1. BAD1, BAD2 and DMTEVENT bits are cleared only on a Reset.

Microchip dsPIC33CK1024MP708 - Note: - 1

text_image Bit 15 14 13 12 11 10 9 8 Access Reset Bit 7 6 5 4 3 2 1 0 BAD1 BAD2 DMTEVENT WINOPN R/W R/W R/W R/W R/W Access Reset 0 0 0 0

Bit 7 - BAD1 Deadman Timer Bad STEP1[7:0] Value Detect bit ^(1)

ValueDescription
1Incorrect STEP1[7:0] value was detected
0Incorrect STEP1[7:0] value was not detected

Bit 6 - BAD2 Deadman Timer Bad STEP2[7:0] Value Detect bit ^(1)

ValueDescription
1Incorrect STEP2[7:0] value was detected
0Incorrect STEP2[7:0] value was not detected

Bit 5 – DMTEVENT Deadman Timer Event bit ^(1)

ValueDescription
1Deadman Timer event was detected (counter expired, or bad STEP1[7:0] or STEP2[7:0] value was entered prior to counter increment)
0Deadman Timer event was not detected

Bit 0 - WINOPN Deadman Timer Clear Window bit

ValueDescription
1Deadman Timer clear window is open
0Deadman Timer clear window is not open

28.1.5 Deadman Timer Count Register Low

Name: DMTCNTL

Offset: 0x06C

Bit 15 14 13 12 11 10 9 8
COUNTER[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
COUNTER[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0

Bits 15:0 – COUNTER[15:0] Read Current Contents of Lower DMT Counter bits

28.1.6 Deadman Timer Count Register High

Name: DMTCNTH

Offset: 0x06E

Bit 15 14 13 12 11 10 9 8
COUNTER[31:24]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
COUNTER[23:16]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0

Bits 15:0 – COUNTER[31:16] Read Current Contents of Higher DMT Counter bits

28.1.7 DMT Hold Register

Name: DMTHOLDREG (1)

Offset: 0x070

Note:

  1. The DMTHOLDREG register is initialized to '0' on Reset, and is only loaded when the DMTCNTL and DMTCNTH registers are read.

Bit 15 14 13 12 11 10 9 8

UPRCNT[15:8]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

UPRCNT[7:0]

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bits 15:0 – UPRCNT[15:0] DMTCNTH Register Value when DMTCNTL and DMTCNTH were Last Read bits

28.1.8 DMT Post-Configure Count Status Register Low

Name: PSCNTL

Offset: 0x074

Bit 15 14 13 12 11 10 9 8
PSCNT[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
PSCNT[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0

Bits 15:0 – PSCNT[15:0] Lower DMT Instruction Count Value Configuration Status bits This is always the value of the FDMTCNTL Configuration register.

28.1.9 DMT Post-Configure Count Status Register High

Name: PSCNTH

Offset: 0x076

Bit 15 14 13 12 11 10 9 8
PSCNT[31:24]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
PSCNT[23:16]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0

Bits 15:0 – PSCNT[31:16] Higher DMT Instruction Count Value Configuration Status bits This is always the value of the FDMTCNTH Configuration register.

28.1.10 DMT Post-Configure Interval Status Register Low

Name: PSINTVL

Offset: 0x078

Bit 15 14 13 12 11 10 9 8
PSINTV[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
PSINTV[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0

Bits 15:0 – PSINTV[15:0] Lower DMT Window Interval Configuration Status bits This is always the value of the FDMTIVTL Configuration register.

28.1.11 DMT Post-Configure Interval Status Register High

Name: PSINTVH

Offset: 0x07A

Bit 15 14 13 12 11 10 9 8

PSINTV[31:24]
AccessR/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0
Bit7 6 5 4 3 2 1 0
PSINTV[23:16]
AccessR/W R/W R/W R/W R/W R/W R/W R/W
Reset0 0 0 0 0 0 0

Bits 15:0 – PSINTV[31:16] Higher DMT Window Interval Configuration Status bits This is always the value of the FDMTIVTH Configuration register.

29. Power-Saving Features

Note: This data sheet summarizes the features of the dsPIC33CK1024MP710 family of devices. It is not intended to be a comprehensive reference source. To complement the information in this data sheet, refer to "Watchdog Timer and Power-Saving Modes" (www.microchip.com/DS70615).

The dsPIC33CK1024MP710 family devices provide the ability to manage power consumption by selectively managing clocking to the CPU and the peripherals. In general, a lower clock frequency and a reduction in the number of peripherals being clocked constitutes lower consumed power.

dsPIC33CK1024MP710 family devices can manage power consumption in four ways:

  • Clock Frequency
    • Instruction-Based Sleep and Idle modes
  • Software-Controlled Doze mode
  • Selective Peripheral Control in Software

Combinations of these methods can be used to selectively tailor an application's power consumption while still maintaining critical application features, such as timing-sensitive communications.

29.1 Clock Frequency and Clock Switching

The dsPIC33CK1024MP710 family devices allow a wide range of clock frequencies to be selected under application control. If the system clock configuration is not locked, users can choose low-power or high-precision oscillators by simply changing the NOSCx bits (OSCCON[10:8]). The process of changing a system clock during operation, as well as limitations to the process, are discussed in more detail in 9. Oscillator with High-Frequency PLL.

29.2 Instruction-Based Power-Saving Modes

The dsPIC33CK1024MP710 family devices have two special power-saving modes that are entered through the execution of a special PWRSAV instruction. Sleep mode stops clock operation and halts all code execution. Idle mode halts the CPU and code execution, but allows peripheral modules to continue operation. The assembler syntax of the PWRSAV instruction is shown in Example 29-1 and Example 29-2.

Note: SLEEP_MODE and IDLE_MODE are constants defined in the assembler include file for the selected device.

Sleep and Idle modes can be exited as a result of an enabled interrupt, WDT time-out or a device Reset. When the device exits these modes, it is said to “wake-up”.

Example 29-1. PWRSAV Instruction Syntax in Assembly

PWRSAV #SLEEP_MODE ; Put the device into Sleep mode
PWRSAV #IDLE_MODE ; Put the device into Idle mode 

Example 29-2. PWRSAV Instruction Syntax in C Language

Sleep() // Put the device into Sleep mode
Idle () // Put the device into Idle mode 

29.2.1 Sleep Mode

The following occurs in Sleep mode:

  • The system clock source is shut down. If an on-chip oscillator is used, it is turned off.
  • The device current consumption is reduced to a minimum, provided that no I/O pin is sourcing current.
  • The Fail-Safe Clock Monitor does not operate, since the system clock source is disabled.
  • The WDT, if enabled, is automatically cleared prior to entering Sleep or Idle mode.
  • Some device features or peripherals can continue to operate. This includes items such as the Input Change Notification on the I/O ports or peripherals that use an External Clock input.
  • Any peripheral that requires the system clock source for its operation is disabled.

The device wakes up from Sleep mode on any of these events:

  • Any interrupt source that is individually enabled
  • Any form of device Reset
    • A WDT time-out

On wake-up from Sleep mode, the processor restarts with the same clock source that was active when Sleep mode was entered.

For optimal power savings, the internal regulator and the Flash regulator can be configured to go into standby when Sleep mode is entered by clearing the VREGS (RCON[8]) bit (default configuration).

If the application requires a faster wake-up time and can accept higher current requirements, the VREGS (RCON[8]) bit can be set to keep the internal regulator and the Flash regulator active during Sleep mode. The available Low-Power Sleep modes are shown in Table 29-1. Additional regulator information is available in 30.5. On-Chip Voltage Regulators.

Table 29-1. Low-Power Sleep Modes

Relative Power LPWREN VREGS Mode
Highest01Full power, active
00Full power, standby
— 1(1)1Low power, active
Lowest 1(1)0Low power, standby

Note:
1. Low-Power modes, when LPWREN = 1, can only be used in the industrial temperature range.

29.2.2 Idle Mode

The following occurs in Idle mode:

  • The CPU stops executing instructions.
    • The WDT is automatically cleared.
  • The system clock source remains active. By default, all peripheral modules continue to operate normally from the system clock source, but can also be selectively disabled (see 29.4. Peripheral Module Disable).

The device wakes up from Idle mode on any of these events:

  • Any interrupt that is individually enabled
  • Any device Reset
  • A WDT time-out

On wake-up from Idle mode, the clock is reapplied to the CPU and instruction execution will begin (two to four clock cycles later), starting with the instruction following the PWRSAV instruction or the first instruction in the ISR.

All peripherals also have the option to discontinue operation when Idle mode is entered to allow for increased power savings. This option is selectable in the control register of each peripheral; for example, the SIDL bit in the Timer1 Control register (T1CON[13]).

29.2.3 Interrupts Coincident with Power Save Instructions

Any interrupt that coincides with the execution of a PWRSAV instruction is held off until entry into Sleep or Idle mode has completed. The device then wakes up from Sleep or Idle mode.

29.3 Doze Mode

The preferred strategies for reducing power consumption are changing clock speed and invoking one of the power-saving modes. In some circumstances, this cannot be practical. For example, it may be necessary for an application to maintain uninterrupted synchronous communication, even while it is doing nothing else. Reducing system clock speed can introduce communication errors, while using a power-saving mode can stop communications completely.

Doze mode is a simple and effective alternative method to reduce power consumption while the device is still executing code. In this mode, the system clock continues to operate from the same source and at the same speed. Peripheral modules continue to be clocked at the same speed, while the CPU clock speed is reduced. Synchronization between the two clock domains is maintained, allowing the peripherals to access the SFRs while the CPU executes code at a slower rate.

Doze mode is enabled by setting the DOZEN bit (CLKDIV[11]). The ratio between peripheral and core clock speed is determined by the DOZE[2:0] bits (CLKDIV[14:12]). There are eight possible configurations, from 1:1 to 1:128, with 1:1 being the default setting.

Programs can use Doze mode to selectively reduce power consumption in event-driven applications. This allows clock-sensitive functions, such as synchronous communications, to continue without interruption while the CPU is not in Idle, waiting for something to invoke an interrupt routine. An automatic return to full-speed CPU operation on interrupts can be enabled by setting the ROI bit (CLKDIV[15]). By default, interrupt events have no effect on Doze mode operation.

29.4 Peripheral Module Disable

The Peripheral Module Disable (PMD) registers provide a method to disable a peripheral module by stopping all clock sources supplied to that module. When a peripheral is disabled using the appropriate PMD control bit, the peripheral is in a Minimum Power Consumption state. The control and status registers associated with the peripheral are also disabled, so writes to those registers do not have any effect and read values are invalid.

A peripheral module is enabled only if both the associated bit in the PMD register is cleared and the peripheral is supported by the specific dsPIC ^® DSC variant. If the peripheral is present in the device, it is enabled in the PMD register by default.

Note: If a PMD bit is set, the corresponding module is disabled after a delay of one instruction cycle. Similarly, if a PMD bit is cleared, the corresponding module is enabled after a delay of one instruction cycle (assuming the module control registers are already configured to enable module operation).

29.5 Power-Saving Resources

Many useful resources are provided on the main product page of the Microchip website for the devices listed in this data sheet. This product page contains the latest updates and additional information.

29.5.1 Key Resources

  • "Watchdog Timer and Power-Saving Modes" (www.microchip.com/DS70615)
  • Code Samples
  • Application Notes
  • Software Libraries
  • Webinars
  • Development Tools

29.6 Power-Saving Control Registers

OffsetName Bit Pos. 7 6 5 4 3 2 1 0
0x0FA0 PMDCONL15:8PMDLOCK
7:0
0x0FA2 ... 0x0FA3Reserved
0x0FA4 PMD115:8TAMD QEIMD PWMMD
7:0I2C1MDU2MDU1MDSPI2MDSPI1MDC2MDC1MDADC1MD
0x0FA6PMD2(1)15:8CCP9MD
7:0CCP8MDCCP7MDCCP6MDCCP5MDCCP4MDCCP3MDCCP2MDCCP1MD
0x0FA8 PMD315:8PMPMD
7:0CRCMDQE12MDU3MDI2C3MDI2C2MD
0x0FAAPMD415:8APWMCLC8MDCLC7MD
7:0CLC6MDCLC5MDREFOMD
0x0FAC ... 0x0FADReserved
0x0FAE PMD615:8DMA7MDDMA6MDDMA5MDDMA4MDDMA3MDDMA2MDDMA1MDDMA0MD
7:0 QE13MDSPI3MD
0x0FB0PMD715:8PDC6MDPDC5MDPDC4MDPDC3MDPDC2MDPDC1MD
7:0PTGMD
0x0FB2PMD815:8OPAMPMDSENT2MDSENT1MDDMTMD
7:0CLC4MDCLC3MDCLC2MDCLC1MDBIASMD

29.6.1 Peripheral Module Disable Control Register Low

Name: PMDCONL

Offset: 0xFA0

Microchip dsPIC33CK1024MP708 - Peripheral Module Disable Control Register Low - 1

text_image Bit 15 14 13 12 11 10 9 8 PM/DLOCK Access R/W Reset 0 Bit 7 6 5 4 3 2 1 0 Access Reset

Bit 11 - PMDLOCK PMD Lock bit

ValueDescription
1All PMD registers are locked and cannot be written
0All PMD registers are unlocked and can be written

29.6.2 Peripheral Module Disable 1 Register

Name: PMD1

Offset: 0xFA4

Bit 15 14 13 12 11 10 9 8

TAMD QEIMD PWMMD
Access ResetR/W R/W R/W
0 0 0

Bit 76543210

I2C1MDU2MDU1MDSPI2MDSPI1MDC2MDC1MDADC1MD
AccessR/WR/WR/WR/WR/WR/WR/W
Reset0000000

Bit 11 - TAMD Timer A Module Disable bit

Value Description
1Timer A module is disabled
0Timer A module is enabled

Bit 10 - QEIMD QEI Module Disable bit

Value Description
1QEI module is disabled
0QEI module is enabled

Bit 9 – PWMMD PWM Module Disable bit

Value Description
1PWM module is disabled
0PWM module is enabled

Bit 7 - I2C1MD I2C1 Module Disable bit

Value Description
1I2C1 module is disabled
0I2C1 module is enabled

Bit 6 – U2MD UART2 Module Disable bit

Value Description
1UART2 module is disabled
0UART2 module is enabled

Bit 5 – U1MD UART1 Module Disable bit

Value Description
1UART1 module is disabled
0UART1 module is enabled

Bit 4 – SPI2MD SPI2 Module Disable bit

Value Description
1SPI2 module is disabled
0SPI2 module is enabled

Bit 3 – SPI1MD SPI1 Module Disable bit

Value Description
1SPI1 module is disabled
0SPI1 module is enabled

Bit 2 – C2MD CAN2 Module Disable bit

Value Description
1CAN2 module is disabled
0CAN2 module is enabled

Bit 1-C1MD CAN1 Module Disable bit

Value Description
1CAN1 module is disabled
0CAN1 module is enabled

Bit 0 - ADC1MD ADC Module Disable bit

Value Description
1ADC module is disabled
0ADC module is enabled

29.6.3 Peripheral Module Disable 2 Register

Name: PMD2 (1)

Offset: 0xFA6

Note:

  1. Availability is dependent on the supported peripherals, refer to Table 1 and Table 2.

Bit 15 14 13 12 11 10 9 8

Microchip dsPIC33CK1024MP708 - Note: - 1

text_image CCP9MD Access Reset 0 R/W

Bit 76543210

Microchip dsPIC33CK1024MP708 - Note: - 2

text_image CCP8MD CC P7MD CCP6MD CCP5MD CCP4M D CCP3MD CCP2MD CCP1MD Access R/W R/W R/W R/W R/W R/W R/W R/W Reset 0 0 0 0 0 0 0

Bit 8 – CCP9MD SCCP9 Module Disable bit

ValueDescription
1SCCP9 module is disabled
0SCCP9 module is enabled

Bit 7 – CCP8MD SCCP8 Module Disable bit

ValueDescription
1SCCP8 module is disabled
0SCCP8 module is enabled

Bit 6 – CCP7MD SCCP7 Module Disable bit

ValueDescription
1SCCP7 module is disabled
0SCCP7 module is enabled

Bit 5 – CCP6MD SCCP6 Module Disable bit

ValueDescription
1SCCP6 module is disabled
0SCCP6 module is enabled

Bit 4 – CCP5MD SCCP5 Module Disable bit

ValueDescription
1SCCP5 module is disabled
0SCCP5 module is enabled

Bit 3 – CCP4MD SCCP4 Module Disable bit

ValueDescription
1SCCP4 module is disabled
0SCCP4 module is enabled

Bit 2 – CCP3MD SCCP3 Module Disable bit

ValueDescription
1SCCP3 module is disabled
0SCCP3 module is enabled

Bit 1 – CCP2MD SCCP2 Module Disable bit

ValueDescription
1SCCP2 module is disabled

Value Description

0SCCP2 module is enabled

Bit 0 – CCP1MD SCCP1 Module Disable bit
Value Description

1SCCP1 module is disabled
0SCCP1 module is enabled

29.6.4 Peripheral Module Disable 3 Register

Name: PMD3

Offset: 0xFA8

Bit 15 14 13 12 11 10 9 8

PMPMD
Access Reset 0R/W

Bit 76543210

CRCMDQE12MDU3MDI2C3MDI2C2MD
AccessR/WR/WR/W R/W R/W
Reset000 0 0

Bit 8 – PMPMD Peripheral Port Module Disable bit

ValueDescription
1Peripheral port module is disabled
0Peripheral port module is enabled

Bit 7 – CRCMD CRC Module Disable bit

ValueDescription
1CRC module is disabled
0CRC module is enabled

Bit 5 – QEI2MD QEI Module 2 Disable bit

ValueDescription
1QE12 module is disabled
0QE12 module is enabled

Bit 3 - U3MD UART3 Module Disable bit

ValueDescription
1UART3 module is disabled
0UART3 module is enabled

Bit 2 - I2C3MD I2C3 Module Disable bit

ValueDescription
1I2C3 module is disabled
0I2C3 module is enabled

Bit 1 – I2C2MD I2C2 Module Disable bit

ValueDescription
1I2C2 module is disabled
0I2C2 module is enabled

29.6.5 Peripheral Module Disable 4 Register

Name: PMD4

Offset: 0xFAA

Bit 15 14 13 12 11 10 9 8

APWM CLC8MD CLC7MD
Access Reset 0 0 0R/W R/W R/W

Bit 76543210

CLC6MD CLC5MDREFOMD
AccessR/W R/WR/W
Reset0 00

Bit 10 - APWM Auxiliary PWM Disable bit

ValueDescription
1Auxiliary PWM is disabled
0Auxiliary PWM is enabled

Bit 9 – CLC8MD CLC8 Module Disable bit

ValueDescription
1CLC8 module is disabled
0CLC8 module is enabled

Bit 8 – CLC7MD CLC7 Module Disable bit

ValueDescription
1CLC7 module is disabled
0CLC7 module is enabled

Bit 7 – CLC6MD CLC6 Module Disable bit

ValueDescription
1CLC6 module is disabled
0CLC6 module is enabled

Bit 6 – CLC5MD CLC5 Module Disable bit

ValueDescription
1CLC5 module is disabled
0CLC5 module is enabled

Bit 3 – REFOMD Reference Clock Module Disable bit

ValueDescription
1Reference clock module is disabled
0Reference clock module is enabled

29.6.6 Peripheral Module Disable 6 Register

Name: PMD6

Offset: 0xFAE

Bit 15 14 13 12 11 10 9 8

DMA7MD DMA6MD DMA5MD DMA4MD DMA3MD DMA2MD DMA1MD DMA0MD

Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset 00000000

Bit 76543210

QE13MDSPI3MD

Access R/W

Reset 0

R/W

0

Bit 15 - DMA7MD DMA7 Module Disable bit

ValueDescription
1DMA7 module is disabled
0DMA7 module is enabled

Bit 14 - DMA6MD DMA6 Module Disable bit

ValueDescription
1DMA6 module is disabled
0DMA6 module is enabled

Bit 13 - DMA5MD DMA5 Module Disable bit

ValueDescription
1DMA5 module is disabled
0DMA5 module is enabled

Bit 12 - DMA4MD DMA4 Module Disable bit

ValueDescription
1DMA4 module is disabled
0DMA4 module is enabled

Bit 11 - DMA3MD DMA3 Module Disable bit

ValueDescription
1DMA3 module is disabled
0DMA3 module is enabled

Bit 10 - DMA2MD DMA2 Module Disable bit

ValueDescription
1DMA2 module is disabled
0DMA2 module is enabled

Bit 9 – DMA1MD DMA1 Module Disable bit

ValueDescription
1DMA1 module is disabled
0DMA1 module is enabled

Bit 8 – DMA0MD DMA0 Module Disable bit

ValueDescription
1DMA0 module is disabled
0DMA0 module is enabled

Bit 7 – QEI3MD QEI3 Module Disable bit

Value Description
1QE13 module is disabled
0QE13 module is enabled

Bit 0 – SPI3MD SPI3 Module Disable bit

Value Description
1SPI3 module is disabled
0SPI3 module is enabled

29.6.7 Peripheral Module Disable 7 Register

Name: PMD7

Offset: 0xFBO

Bit 15 14 13 12 11 10 9 8

PDC6MD PDC5MD PDC4MD PDC3MDPDC2MD PDC1MD
AccessR/W R/W R/W R/W R/W R/W
Reset 000000

Bit 76543210

PTGMD
Access ResetR/W
0

Bit 13 – PDC6MD Peripheral DMA Controller 6 Module Disable bit

ValueDescription
1PDC6 module is disabled
0PDC6 module is enabled

Bit 12 – PDC5MD Peripheral DMA Controller 5 Module Disable bit

ValueDescription
1PDC5 module is disabled
0PDC5 module is enabled

Bit 11 – PDC4MD Peripheral DMA Controller 4 Module Disable bit

ValueDescription
1PDC4 module is disabled
0PDC4 module is enabled

Bit 10 – PDC3MD Peripheral DMA Controller 3 Module Disable bit

ValueDescription
1PDC3 module is disabled
0PDC3 module is enabled

Bit 9 – PDC2MD Peripheral DMA Controller 2 Module Disable bit

ValueDescription
1PDC2 module is disabled
0PDC2 module is enabled

Bit 8 – PDC1MD Peripheral DMA Controller 1 Module Disable bit

ValueDescription
1PDC1 module is disabled
0PDC1 module is enabled

Bit 3 – PTGMD PTG Module Disable bit

ValueDescription
1PTG module is disabled
0PTG module is enabled

29.6.8 Peripheral Module Disable 8 Register

Name: PMD8

Offset: 0xFB2

Bit 15 14 13 12 11 10 9 8

OPAMPMD SENT2MDSENT1MDDM1TMD
Access ResetR/W R/W R/WR/W
0 0 00

Bit 76543210

CLC4MDCLC3MDCLC2MDCLC1MDBIASMD
Access ResetR/W R/W R/W R/WR/W
0 0 0 0 0

Bit 13 - OPAMPMD Op Amp Module Disable bit

ValueDescription
1Op amp module is disabled
0Op amp module is enabled

Bit 12 - SENT2MD SENT2 Module Disable bit

ValueDescription
1SENT2 module is disabled
0SENT2 module is enabled

Bit 11 - SENT1MD SENT1 Module Disable bit

ValueDescription
1SENT1 module is disabled
0SENT1 module is enabled

Bit 8 – DMTMD Deadman Timer Module Disable bit

ValueDescription
1Deadman Timer module is disabled
0Deadman Timer module is enabled

Bit 5 – CLC4MD CLC4 Module Disable bit

ValueDescription
1CLC4 module is disabled
0CLC4 module is enabled

Bit 4 – CLC3MD CLC3 Module Disable bit

ValueDescription
1CLC3 module is disabled
0CLC3 module is enabled

Bit 3 – CLC2MD CLC2 Module Disable bit

ValueDescription
1CLC2 module is disabled
0CLC2 module is enabled

Bit 2 – CLC1MD CLC1 Module Disable bit

ValueDescription
1CLC1 module is disabled
0CLC1 module is enabled
Table of contents Click a title to access it
Manual assistant
Powered by Anthropic
Waiting for your message
Product information

Brand : Microchip

Model : dsPIC33CK1024MP708

Category : Electronic component