Using MPLAB® Harmony MHC to Control PIC32M JTAG
JTAG can be enabled or disabled in MPLAB® Harmony using MPLAB Harmony Configurator (MHC).
Open MHC and expand the following selection tree to find the Enable JTAG? checkbox:
Harmony Framework Configuration > System Services > Device Control > Use Device Control System Service?
The state of this checkbox determines which of the following lines of code are added to the SYS_Initialize function:
- SYS_DEVCON_JTAGDisable();
- SYS_DEVCON_JTAGEnable() ;