4 On-Board Nano Debugger
This section describes the features and interfaces of the on-board debugger for programming and debugging.
4.1 Overview
- Debugger: Enables programming and debugging of the target device.
- Virtual serial port (CDC): Provides access to the target device’s UART interface.
- Data Gateway Interface (DGI): Microchip’s proprietary interface for streaming data to the host computer.
- Mass storage device: Provides kit information files and supports utility commands.
4.2 Power and Status LED
The on-board debugger controls a Power and Status LED (marked PS) on the PIC32CM Px DIP-28 Curiosity Nano board. The table below shows how the different operation modes control the LED.
| Operation Mode | Power and Status LED |
|---|---|
| Boot Loader mode | The LED blinks slowly during power-up |
| Power-up | The LED is ON |
| Normal operation | The LED is ON |
| Programming | Activity indicator: The LED blinks slowly during programming or debugging |
| Fault | The LED blinks rapidly if a power fault is detected |
| Off | When the on-board debugger is powered down, the LED is OFF |
4.3 Connections
The table below lists the connections between the target device and the debugger. When the debugger is inactive, these connections are set to high-impedance (tri-state) mode. This allows users to use these pins for any function without interference from the debugger. The debugger lines include series resistors to prevent short-circuits and potential damage to the target I/O pins when both the debugger and target attempt to drive a pin simultaneously.
| Debugger Pin | Device Pin | Description | |
|---|---|---|---|
| CDC TX | PA05 | SERCOM0 RX | USB CDC TX line |
| CDC RX | PA04 | SERCOM0 TX | USB CDC RX line |
| DBG0 | PA20 | SWDIO | Debug data line |
| DBG1 | PA31 | SWCLK | Debug clock line |
| DBG2 | PA02 | SW0/GPIO0 | Debug GPIO0/SW0 |
| DBG3 | PA30 | RESET | Reset line |
| VOFF | — | Pull VOFF low to disable the on-board regulator and allow external power on VTG; VOFF is monitored by the debugger | |
| ID | — | Identification of supported base boards and extensions at power-up | |
4.4 Disconnecting the On-Board Debugger
- Evaluating the target device’s power consumption in isolation removes the on-board debugger's influence on current measurements
- Using the target device with an external programmer/debugger
- Using the on-board debugger as a standalone programmer/debugger for other devices
- Debugger Pins (J105, J106, J107, J108, J109, 110)
- Power Supply Cut Straps
4.5 Connecting External Debuggers
Although the board includes an on-board debugger, external debuggers can also be connected directly to the target device for programming and debugging. When the on-board debugger is not actively in use, it keeps all pins connected to the board edge and the target device in a tri-state condition. This ensures that the on-board debugger does not interfere with external debug tools. The target device’s programming and debugging lines are available on the board edge connector and on a Cortex® debug header, as shown in the figure below.
The Cortex® debug header may also be used with target devices other than Arm® Cortex® devices. Refer to the connection table below for information on how to use the header with devices that use UPDI and ICSP interfaces.
| Cortex® Pin | Signal Name | Connect To |
|---|---|---|
| 1 | VCC | VCC |
| 2 | SWDIO | |
| 4 | SWCLK | ICSPCLK |
| 6 | SWO/TDO | UPDI/ICSPDAT |
| 10 | nRESET | RESET/MCLR |
| 3, 5, 9 | GND | GND |
