4.5
Embedded Debugger Implementation
The evaluation kit contains an Embedded Debugger (EDBG) that can be used to program and debug the PIC32CM
JH01 using Serial Wire Debug (SWD). The Embedded Debugger also includes a Virtual COM port interface over the
UART, a Data Gateway Interface over SPI, TWI (I²C), and four of the PIC32CM JH01 GPIOs.
MPLAB X IDE can be used as a front end for the Embedded Debugger.
4.5.1
Serial Wire Debug
The Serial Wire Debug (SWD) uses two pins to communicate with the target. For additional information on using the
programming and debugging capabilities of the EDBG, refer to the
Table 4-32. SWD Connections
PIC32CM JH01 pin
Function
Schematic Net Name
Shared Functionality
RESET
Reset
TARGET_RESET
RESET button, Arduino, Cortex Debug
RESET, TA100
PA30
Serial Wire Clock
SWCLK
Cortex Debug SWCLK
PA31
Serial Wire Data IN/OUT SWDIO
Cortex Debug SWDIO
4.5.2
Virtual COM Port
The Embedded Debugger acts as a Virtual COM Port gateway by using one of the PIC32CM JH01 UARTs. For
additional information on using the Virtual COM port, refer to the
Table 4-33. Virtual COM Port Connections
PIC32CM JH01 pin
Function
Schematics Net Name
Shared functionality
PB10
SERCOM4/PAD[2] UART TX
PB10_CDC_UART_TX
-
PB11
SERCOM4/PAD[3] UART RX
PB11_CDC_UART_RX
-
4.5.3
Data Gateway Interface
The Embedded Debugger features a Data Gateway Interface (DGI) by using either a SPI or I²C interface. The DGI
can be used to send a variety of data from the PIC32CM JH01 to the Host PC. For additional information on using the
DGI interface, refer to the
Data Gateway Interface User’s Guide
Table 4-34. DGI Interface Connections When Using SPI
PIC32CM JH01 pin
Function
Schematic Net Name
Shared functionality
PC09
GPIO SPI SS
PC09_DGI_SPI_LEVEL (SS)
-
PC12
SERCOM7/PAD[0] SPI MISO
PC12_SPI_MISO
EXT3, Arduino
PC14
SERCOM7/PAD[3] SPI SCK
PC15_SPI_SCK
EXT3, Arduino
PC15
SERCOM7/PAD[2] SPI MOSI
PC14_SPI_MOSI
EXT3, Arduino
Table 4-35. DGI Interface Connections When Using I
2
C
PIC32CM JH01 pin
Function
Schematic Net Name
Shared functionality
PA16
SERCOM1/PAD[0] I
2
C SDA
PA16_I2C_SDA
EXT2, EXT3, Arduino
PA17
SERCOM1/PAD[1] I
2
C SCL
PA17_I2C_SCL
EXT2, EXT3, Arduino
Four GPIO lines are connected to the Embedded Debugger. The EDBG can monitor these lines and time stamp pin
value changes. This makes it possible to accurately time stamp events in the PIC32CM JH01 application code.
EV81X90A
Hardware User Guide
©
2022 Microchip Technology Inc.
and its subsidiaries
User Guide
DS70005482B-page 29