13 Appendix

13.1 Glossary

Table 13-1. Glossary of Terms
TermDescription
DebuggerThe physical hardware device used to interface between an embedded system and a host computer
Embedded debuggerA debugger device that is permanently mounted on a larger embedded system
KitA printed circuit board assembly containing both a target device and an embedded debugger, typically used for firmware development before custom hardware is available
CNANOCuriosity Nano
EDBGMicrochip Embedded Debugger, which is used on various development boards
nEDBGThe Nano variant of the EDBG, also known as PKOB nano and the Nano Debugger
PKOBMicrochip PICkit® on-Board debugger, which is used on various development boards
CMSIS-DAPThe standardized, USB-based interface that allows a hardware debugger to provide a host computer with access to the CoreSight Debug Access Port (DAP) of Arm Cortex processors
SWDSerial Wire Debug - a two-wire programming and debugging protocol developed by Arm
UPDIUnified Program and Debug Interface - a single-wire progrmaming and debugging protocol developed by Microchip, used on AVR devices
ICSPIn-Circuit Serial Programming - a two-wire programming and debugging interface used on PIC16, PIC18, PIC24 and dsPIC devices (using different protocols)
CDCCommunication Device Class, or Virtual Serial Port, typically used for printf() debugging
MSCMass Storage Class - a USB protocol for implementing removable storage, also known as MSD (Mass Storage Device)
DGIData Gateway Interface - a data-streaming mechanism developed by Microchip that allows timestamped data to be streamed from an embedded debugger to a host computer for visualization

13.2 Target Device Interfaces

The Nano Debugger supports a variety of target device interfaces through a standardised set of pins.

Table 13-2. Target Device Interface Connections
SignalArm/SWDAVR UPDIICSPImplementation
DBG0Serial Wire Data SWDIOUPDIPGDBi-directional, direct or level-shifted
DBG1Serial Wire Clock SWCLK-PGCBi-directional, direct or level-shifted
DBG2Serial Wire Output SWO--Bi-directional, direct or level-shifted
DBG3/RESET/RESETMCLROpen-drain connection
: DBG2 is used for DGI-GPIO. For AVR boards, DBG1 is also available for DGI-GPIO.

13.3 Auxilliary Interfaces

Virtual Serial Port/CDC

The Nano Debugger features a Virtual Serial Port (CDC), which is always included during USB enumeration.

Connect the RX and TX lines according to the guidance provided in the relevant schematic.

If you do not wish to use the Virtual Serial Port, leave the PA00 pin of the Nano Debugger unconnected and install a pull-up resistor between PA01 and the 3.3V supply rail.

Data Gateway Interface/DGI

The Nano Debugger features Data Gateway Interfaces (DGI), which are always included during USB enumeration. Depending on the number of signals required by the target debug interface and your specific needs, zero, one, or two DGI GPIO channels can be supported.

If you do not wish to use a DGI GPIO channel, leave it unconnected and ensure it is disabled in the configuration. Refer to the default configuration table to determine whether DGI GPIO is enabled by default.

13.4 Nano Debugger Configuration

13.4.1 Introduction

The Microchip Nano Debugger is versatile and can be used in a range of scenarios as described above. All implementations operate using a single, identical firmware binary image. The specific behavior for each scenario is determined by the "board configuration," while information about the device connected to the Nano Debugger on a development board is managed through its "device configuration."

Both the board configuration and the device configuration are defined in XML format but are stored in a dedicated section of flash memory within the Nano Debugger.

Board Configuration

All implementations that use the Nano Debugger must include a board configuration. Without a board configuration, the Nano Debugger will not function correctly.

The board configuration is stored in two separate locations within the Nano Debugger’s non-volatile memory:

  1. The user-config is designed to be easily modified by the user.

  2. The factory-config serves as a rollback backup, allowing a modified user-config to be restored to its original factory state.

The board configuration can be put in place in several ways:

  1. The Nano Debugger firmware zip package includes several complete images, each containing a valid board configuration that corresponds to the board types described in this document. While the bootloader and application are identical across these images, the board configurations provide a suitable "default" state for each of the primary scenarios or use cases.

  2. The pydebuggerconfig tool, available on pypi.org, can be used to:

    • Write, replace, or upload an entirely new XML configuration file to a running Nano Debugger

    • Modify the default board configuration on a running Nano Debugger

Device Configuration

The device configuration in the Nano Debugger provides information about the device that is permanently connected to the debugger. Its primary purpose is to enable drag-and-drop programming, which operates independently of an IDE. While the device configuration can be left empty (unprogrammed), it is recommended to program a null or dummy device configuration in cases where drag-and-drop programming is not supported (such as with Arm target devices) or when no target device is present (such as in a standalone debugger scenario).

The device configuration exists as a single instance and is not intended to be modified by the user.

The images included in the Nano Debugger firmware ZIP package contain the null device configuration.

The pydebuggerconfig tool, available on pypi.org, can be used to write or replace the device configuration on a running Nano Debugger.

13.4.2 Board Configuration Details

With the pydebuggerconfig tool, available on pypi.org, you can program a complete board configuration XML file or modify individual configuration fields as needed.

Many of the fields available in the board configuration are not intended to be modified, as they are either reserved for future use or intended specifically for Microchip kits.

Basic Configuaration Fields

The following fields can be modified by kit developers using the Nano Debugger. These basic fields are intended to personalize a kit or board, making it easily identifiable for users.

Table 13-3. Basic Configuration
RegisterDescriptionWhat its for
DEVNAME

Device name.

Maximum length: 32 ASCII characters.

Specify the exact device name here if a device is permanently mounted on the board.

If the target device is not mounted on the board this field must be left blank.

KITNAMEKit name.

Maximum length: 60 ASCII characters.

Give your kit a nice name here
MNFRNAME

Manufacturer name.

Maximum length: 60 ASCII characters.

Specify who you are as a vendor

Advanced Configuration Fields

The following fields can be modified by kit developers using the Nano Debugger when configuring more advanced boards.

Table 13-4. Advanced Configuration
RegisterDescriptionWhat its for
SERNUMUSB serial number

A specific USB serial number can be set here. It is recommended to use exactly 20 upper-case alphanumeric characters and no spaces.

Setting the "automatic serial number" bit will override this at enumeration-time, but the original value will remain in the configuration stored in Flash memory.

Length: Always 20 characters.

REDIRECTRedirect IDSee the tip below.
DATEManufacturing dateOptionally, specify the manufacturing date of the kit in the format YYYYMMDD
INSTANCEContent revision

This is a simple version field and can be incremented for each change made to the configuration.

Length: 8-bit.

TARGET_DEBUG_INTERFACESSet of programing and debugging interfaces supported

Set the bits in this bitfield to indicate which physical interface(s) are supported in this implementation.

Relevant bits are:

  • bit 1: SWD for Arm devices
  • bit 8: UPDI for AVR devices
  • bit 10: SWO for Arm devices
  • bit 11: ICSP for PIC and dsPIC devices

Length: 32-bit.

TARGET_DEBUG_FEATURESSet of programming and debugging features implemented

Set the bits in this bitfield to enable individual features:

Relevant bits are:

  • bit 0: SINGLE_DEVICE - set this bit if the device is permanently mounted to the board
  • bit 1: PROG_ENABLED - set this bit to enable programming
  • bit 2: DEBUG_ENABLED - set this bit to enable debugging
  • bit 3: FUSE_CONFIG_PROTECTION - set this bit to enable protection of fuses/configuration bytes. A set of protection masks must be provided in the device configuration for this to work!
  • bit 4: AUTO_SERIAL_NUMBER - set this bit to automatically generate a USB serial number

Length: 8-bit.

DGI_INTERFACESSet of DGI interfaces supported

Set the bits in this bitfield to indicate to the debugger which DGI interfaces are connected.

Relevant bits are:

  • bit 0: GPIO

Length: 32-bit.

DGI_GPIO_MAPMap of DGI GPIO channels

Set the bits in this bitfield to indicate to the debugger which DGI GPIO lines are connected.

Relevant bits are:

  • bit 0: DGI_GPIO0
  • bit 1: DGI_GPIO1

Length: 8-bit.

ANALOG_FEATURESAnalog features

Set the bits in this bitfield to indicate to the debugger which analog implementation is present on the board.

Relevant bits are:

  • bit 0: TVS - the debugger can control the target voltage
  • bit 1: TVR - the debugger can measure the target voltage
  • bit 2: LVC - level shifters are present between the debugger and the target

Length: 32-bit.

VMINMinimum voltageFor adjustable-voltage boards, specify the minimum voltage in decivolts
VMAXMaximum voltageFor adjustable-voltage boards, specify the maximum voltage in decivolts
VTGDefault voltageFor adjustable-voltage boards, specify the default voltage in decivolts
VREGVoltage regulator

For adjustable-voltage boards, specify the voltage regulation circuit implemented.

Values are:

  • 0x00 - not adjustable
  • 0x01 - adjustable regulator configuration 0x01 controlled by the Nano Debugger
Tip: The REDIRECT field is a four‑character string used to configure the KIT‑INFO.HTM link in the Curiosity Nano virtual disk drive implementation. This field can optionally be customized on a per-design basis (not per manufactured unit). To request a custom REDIRECT configuration, contact Microchip Support or email edbg@microchip.com.

Configuration Fields That Must not be Modified

These fields must remain unchanged when using the Nano Debugger.

Table 13-5. Do not Modify Configuration
Register(s)DescriptionMandatory Value

CONFIG_FORMAT_MAJOR

CONFIG_FORMAT_MINOR

CONFIG_FORMAT_BUILD

The version of the configuration specification being used. If new fields are added, this version is updated, and this document will be updated accordingly(latest)
HARDWARE_MODSpecify hardware modifications that affect the firmware0x00
USB_ENUMERATIONUSB enumeration0x03
MSD_SETTINGSMass storage content settings0x00
CLICK_ME_TYPEClick-me type configuration0xFF
ID_CHANNELSChannels for extension identification0x00
I2C_ADDR_0, I2C_ADDR_1I2C address, alternative I2C address0x00
LABSActivate experimental firmware features0x00
KEYx_TYPE, KEYx_LEN, KEYxKey x type, length, value0x00... 0x00

13.5 Nano Debugger Firmware Images

The Nano Debugger composite hex files are included in the PKOB Nano Support Tool Pack version 1.19 or newer, which can be downloaded from packs.download.microchip.com/.

The Tool Pack contains a ZIP file with a title starting with nedbg-composite, which contains:
Select one of the hex files for use during manufacturing. For additional information, refer toImportant Considerations Before You Start
:

All hex files include the same bootloader and application but feature different default configurations. Any of these files can be reconfigured during manufacturing to meet your specific requirements.

13.6 Schematics

Figure 13-1. Standalone Nano Debugger
Figure 13-2. Fixed 3V3 Nano Debugger