4.4
Embedded Debugger Implementation
The Curiosity Pro contains an Embedded Debugger (EDBG) that can be used to program and debug the PIC32CM
LE00/LS00/LS60 using Serial Wire Debug (SWD). The Embedded Debugger also includes a virtual COM port
interface over UART, a Data Gateway Interface (DGI) over SPI, TWI (I
2
C), and four of the PIC32CM LE00/LS00/LS60
GPIOs.
MPLAB X IDE can be used as a front end for the Embedded Debugger.
4.4.1
Serial Wire Debug (EDBG SWD)
The Serial Wire Debug (SWD) uses two pins to communicate with the target. For additional information on how to
use the programming and debugging capabilities of the EDBG, refer to the
Table 4-23. Serial Wire Debug (SWD) Connection
Schematics Text
MCU Pin
Function
Shared Functionality
[EDBG_SWD]
TARGET_CHIP_RESET
/RESET
TARGET_RESETN
Cortex Debug, PICkit 4 Interface,
Arduino, RESET button
[EDBG_SWD] SWCLK
PA30/SWCLK
SWCLK
Cortex Debug, PICkit 4 Interface
[EDBG_SWD] SWDIO
PA31/SWDIO
SWDIO
Cortex Debug, PICkit 4 Interface
4.4.2
Virtual COM Port (EDBG CDC)
The Embedded Debugger acts as a virtual COM port gateway using any one of the PIC32CM LE00/LS00/LS60
UARTs. For additional information on how to use the virtual COM port, refer to the
Table 4-24. Virtual COM Port (CDC) Connection
Schematics Text
MCU Pin
Function
Shared Functionality
[EDBG_UART] TX
PB21
SERCOM3/PAD[1] UART RX
EXT2
[EDBG_UART] RX
PB20
SERCOM3/PAD[0] UART TX
EXT2
4.4.3
Data Gateway Interface (EDBG DGI)
The Embedded Debugger features a Data Gateway Interface (DGI) using either a SPI or I
2
C. The DGI can be used
to send data from the PIC32CM LE00/LS00/LS60 to the Host PC.
For additional information on how to use the DGI interface, refer to the
Data Gateway Interface User’s Guide
and
.
Table 4-25. DGI Interface (DGI) Connections When Using SPI
Schematics Text
MCU Pin
Function
Shared Functionality
[DGI_SPI SS]
PC24
GPIO
EXT2
[DGI_SPI MOSI]
PB24
SERCOM4/PAD[0] MOSI
EXT2
[DGI_SPI MISO]
PC25
SERCOM4/PAD[3] MISO
EXT2
[DGI_SPI SCK]
PB25
SERCOM4/PAD[1] SCK
EXT2
Table 4-26. DGI Interface (DGI) When Using I
2
C
Schematics Text
MCU Pin
Function
Shared Functionality
[DGI_I2C SCL]
PB31
SERCOM5/PAD[1] I²C SCL
EXT1, EXT2, EXT3, Arduino, mikroBUS
[DGI_I2C SDA]
PB30
SERCOM5/PAD[0] I²C SDA
EXT1, EXT2, EXT3, Arduino, mikroBUS
PIC32CM LE00/LS00/LS60
Hardware User Guide
©
2022 Microchip Technology Inc.
and its subsidiaries
User Guide
DS70005443E-page 22