Why are there more than one programming channels on PIC32?

This is not limited to the PIC 32. There are other PICs with multiple pairs of PGC/PGD too.

The reason is to give you a choice of what other pin functions will be unavailable during debugging or if you dedicate a pair of pins to programming. Note all the other functions of those pins.


PGECx and PGEDx pin pairs are multiplexed for programming and any pair will work.

See DS61129F:

33.2.1.1.1 ICSP Interface ICSP uses two pins as the core of its interface. The programming data line (PGD) functions as both an input and an output, allowing programming data to be read in and device information to be read out on command. The programming clock line (PGC) is used to clock in data and control the overall process.

Most PIC32 devices have more than one pair of PGECx and PGEDx pins, which are multiplexed with other I/O or peripheral functions. Individual ICSP pin pairs are indicated by number, such as PGEC1/PGED1, and so on. The multiple PGECx/PGEDx pin pairs provide additional flexibility in system design by allowing users to incorporate ICSP on the pair of pins that is least constrained by the circuit design. All PGECx and PGEDx pins are functionally tied together and behave identically, and any one pair can be used for successful device programming. The only limitation is that both pins from the same pair must be used.

In addition to the PGECx and PGEDx pins, ICSP requires that all voltage supply (including the voltage regulator pin, ENVREG) and ground pins on the device must be connected. The MCLR pin, which is used with the PGECx pin to enter and control the programming process, must also be connected to the programmer.