5.3.3 Synchronization
Some PIC32 devices can Reset the internal EJTAG state machine if the attached programmer loses synchronization with it. This can occur when noise is present on the PGCx signal.
To achieve resynchronization, the PGEDx pin is held high for 24 PGECx clock cycles. This forces five TMS events into the EJTAG controller and places the EJTAG state machine into a Test Idle Reset. See Figure 5-6 for an example of how to achieve resynchronization.
When asserting the PGEDx pin high, there may be contention on the pin as the device may attempt to drive TDO out onto the pin while the in-circuit emulator is driving in. This only occurs for a maximum of one cycle as TMS high advances the EJTAG state machine out of a Shift-IR or Shift-DR state.
Synchronization in 2-wire, 2-phase mode is not supported.