SAM D21G17D Curiosity Nano Evaluation Kit User's Guide
Preface
The SAMD21G17D Curiosity Nano Evaluation Kit (DM320119) is a hardware platform to evaluate the SAMD21G17D
microcontroller (MCU), and it is supported by the MPLAB® X Integrated Development Environment (IDE). The
evaluation kit provides an easy access to the features of the SAMD21G17D to integrate the device into a custom
design. The Curiosity Nano series of evaluation kits include an On-Board Nano Debugger, hence no external tools
are necessary to program the SAMD21G17D device. The SAMD21G17D Curiosity Nano Evaluation Kit is shown
below.
The Microchip Website.................................................................................................................................18
The SAMD21G17D Curiosity Nano evaluation kit is a hardware platform used to evaluate the SAMD21G17D.
Figure 1-1. Kit Overview
SAM D21G17D
Introduction
1.1 Features
The following are features of the SAMD21G17D Curiosity Nano evaluation kit:
• SAMD21G17D microcontroller
• One yellow user LED
• One mechanical user switch
• On-Board Nano Debugger
– Board identification in MPLAB X IDE
– One green power/status LED
– Programing and debugging
– Virtual COM port (CDC)
– One logic analyzer (DGI GPIO)
• USB powered
• Adjustable target voltage
– MIC5353 LDO regulator controlled by the On-Board Nano Debugger
– 1.7V to 3.6V output voltage
– 500 mA maximum output current (limited by ambient temperature and output voltage)
Follow these steps to explore the Curiosity Nano platform:
1.Download MPLAB X IDE.
2.Launch MPLAB X IDE.
3.Connect a USB cable (Standard-A to Micro-B or Micro-AB) between the PC and the debug USB port on the
kit.
When the Curiosity Nano kit is connected to the computer for the first time, the operating system will perform a driver
software installation. The driver file supports both 32-bit and 64-bit versions of Microsoft® Windows® XP, Windows
Vista®, Windows 7, Windows 8, and Windows 10. The drivers for the kit are included with MPLAB X IDE.
After the Curiosity Nano board is powered, the green status LED will be lit and MPLAB X IDE will auto-detect which
Curiosity Nano board is connected. MPLAB X IDE will populate relevant information like data sheets and kit
documentation in the kit window. The SAMD21G17D device is programmed and debugged by the On-Board Nano
Debugger, hence no external programmer or debugger tool is required.
Curiosity Nano is an evaluation platform that provides a set of small boards with access to most of the microcontroller
I/Os. The platform consists of a series of low pin-count microcontroller (MCU) boards, which are integrated with
MPLAB X IDE to present relevant user guides, application notes, data sheets, and example codes. The platform
features a Virtual COM port (CDC) for serial communication to a host PC and a Data Gateway Interface (DGI) GPIO.
3.1 On-Board Nano Debugger
The SAMD21G17D Curiosity Nano contains an On-Board Nano Debugger for programming and debugging. The OnBoard Nano Debugger is a complex USB device consists of several interfaces, such as a debugger, a mass storage
device, a data gateway, and a Virtual COM port (CDC). Together with MPLAB X IDE, the On-Board Nano Debugger
interface can program and debug the SAMD21G17D. An DGI is available for use with the logic analyzer channels for
code instrumentation to visualize program flow. DGI GPIOs can be graphed using the Data Visualizer. The Virtual
COM port is connected to a UART on the SAMD21G17D and it provides an easy way to communicate with the target
application through terminal software. The On-Board Nano Debugger controls one Power/Status LED (marked PS)
on the SAMD21G17D Curiosity Nano board. The following table describes how the LED is controlled in different
operation modes.
Table 3-1. On-Board Nano Debugger LED Control
Operation ModeStatus LED
SAM D21G17D
Curiosity Nano
Boot Loader mode LED blink at 1 Hz during power up.
Power-upLED is lit, constant.
Normal operationLED is lit, constant.
ProgrammingActivity indicator, the LED flashes slowly during programming or debugging.
FaultThe LED flashes fast if a power fault is detected.
Sleep/OffLED is OFF. The On-Board Nano Debugger is either in Sleep mode or Power-Down mode. This
3.1.1 Virtual COM Port
A general-purpose USB serial bridge between a host PC and a target device.
3.1.1.1 Overview
The debugger implements a complex USB device that includes a standard Communications Device Class (CDC)
interface, which appears on the host as a Virtual COM Port. The CDC can be used to stream arbitrary data in both
directions between the host and the target. Characters sent from the host will appear in UART form on the CDC TX
pin, and UART characters sent into the CDC RX pin will be sent back to the host. On Windows machines, the CDC
will enumerate as the Curiosity Virtual COM Port and appear in the ports section of the device manager. The COM
port number is usually shown here.
Note: On the older version of Windows systems a USB driver is required for CDC. This driver is included in Atmel
Studio and MPLAB X IDE installations. On Linux machines, the CDC will enumerate and appear as /dev/ttyACM#.
On MAC machines, the CDC will enumerate and appear as /dev/tty.usbmodem#. Depending on which terminal
program is used, it will appear in the available list of modems as usbmodem#.
will occur only if the kit is externally powered
®
3.1.1.2 Limitations
Not all UART features are implemented in the debugger CDC, and the constraints are outlined below:
• Baud rate: Must be in the range of 1200 bps to 500 kbps. Values outside this range will be capped to these
values, without warning. Baud rate can be changed on-the-fly.
• Character format: Only 8-bit characters are supported.
During USB enumeration, the host OS will start both communication and data pipes of the CDC interface. At this
point, it is possible to set and read baud rate and other UART parameters of the CDC, but data sending and receiving
will not be enabled. When a terminal connects on the host, it must assert the DTR signal. This is a virtual control
signal that is implemented on the USB interface but not in hardware on the debugger. Asserting DTR from the host
will indicate to the debugger that a CDC session is active, and it will enable its level shifters (if available), and start
the CDC data send and receive mechanisms. Deasserting the DTR signal will not disable the level shifters, but it will
disable the receiver, hence no further data will be streamed to the host. Data packets that are already queued up for
sending to the target will continue to be sent out, but no further data will be accepted.
3.1.1.4 Advanced Use
When the CDC Override mode is in normal operation, the On-Board Nano Debugger is a true UART bridge between
the host and the device. However, under certain use cases, the debugger can override the Basic Operating mode
and use the CDC pins for other purposes. Dropping a text file (with extension .txt) into the debugger’s mass
storage drive can be used to send characters out of the CDC TX pin. The text file must start with the characters:
CMD:SEND_UART=. The maximum message length is 50 characters, and all remaining data in the frame is ignored.
The default baud rate used in this mode is 9600 bps, but if the CDC is already active or has been configured, the
recently used baud rate still applies.
USB-Level Framing Considerations
Sending data from the host to the CDC can be done byte-wise or in blocks, which will be chunked into 64-byte USB
frames. Each frame will be queued up for sending to the CDC TX pin. Sending a small amount of data per frame can
be inefficient, particularly at low-baud rates, because the debugger buffers frames, not bytes. A maximum of 4 x 64byte frames can be active at any time, the debugger will throttle the incoming frames accordingly. Sending full 64byte frames containing data is the most efficient. When receiving data from the target, the debugger will queue up
incoming bytes into 64-byte frames, which are sent to the USB queue for transmission to the host when they are full.
Incomplete frames are also pushed to the USB queue at approximately 100 ms intervals, triggered by USB start-offrame tokens. Up to 8 x 64-byte frames can be active at any time. If the host or software running on it, fails to receive
data fast enough, an overrun will occur. When this happens the last-filled buffer frame will be recycled instead of
being sent to the USB queue, and a full frame of data will be lost. To prevent this occurrence, the user must ensure
that the CDC data pipe is being read continuously, or the incoming data rate must be reduced.
Note: Mass storage disk is not supported during this release.
SAM D21G17D
Curiosity Nano
3.1.2 Mass Storage Disk
Not supported at this time.
3.2 Curiosity Nano Standard Pinout
The twelve edge connections closest to the USB connector on Curiosity Nano kits have a standardized pinout. The
program and debug pins have different functions depending on the target programming interface as shown in the
following table and figure.
The evaluation kit is powered through the USB port and contains two regulators for generating 3.3V for the debugger
and an adjustable regulator for the target. The voltage from the USB connector can vary between 4.4V-5.25V
(according to the USB specification) and will limit the maximum voltage to the target. The following figure shows the
entire power supply system on the SAMD21G17D Curiosity Nano.