Microchip Technology ATmega4809 Curiosity Nano User Manual

ATmega4809 Curiosity Nano
ATmega4809 Curiosity Nano Hardware User Guide

Preface

The ATmega4809 Curiosity Nano evaluation kit is a hardware platform to evaluate the ATmega4809 microcontroller.
Supported by the Atmel Studio/Microchip MPLAB® X integrated development platform, the kit provides easy access to the features of the ATmega4809 and explains how to integrate the device into a custom design.
The Curiosity Nano series of evaluation kits include an onboard debugger, and no external tools are necessary to program the ATmega4809.
© 2018 Microchip Technology Inc.
User Guide
DS50002804A-page 1
ATmega4809 Curiosity Nano

Table of Contents

Preface............................................................................................................................ 1
1. Introduction................................................................................................................4
1.1. Features....................................................................................................................................... 4
1.2. Kit Overview................................................................................................................................. 4
2. Getting Started.......................................................................................................... 5
2.1. Curiosity Nano Quick Start........................................................................................................... 5
2.2. Design Documentation and Relevant Links................................................................................. 5
3. Curiosity Nano........................................................................................................... 6
3.1. Onboard Debugger.......................................................................................................................6
3.1.1. Virtual COM Port............................................................................................................6
3.1.2. Mass Storage Disk.........................................................................................................8
3.2. Curiosity Nano Standard Pinout................................................................................................... 9
3.3. Power Supply............................................................................................................................. 10
3.3.1. Target Regulator.......................................................................................................... 10
3.3.2. External Supply............................................................................................................11
3.4. Disconnecting the Onboard Debugger....................................................................................... 11
3.5. Current Measurement................................................................................................................ 13
4. Hardware User Guide..............................................................................................14
4.1. Connectors.................................................................................................................................14
4.1.1. ATmega4809 Curiosity Nano Pinout............................................................................14
4.2. Peripherals................................................................................................................................. 15
4.2.1. LED..............................................................................................................................15
4.2.2. Mechanical Switch.......................................................................................................15
4.2.3. Crystal..........................................................................................................................15
4.3. Onboard Debugger Implementation........................................................................................... 16
4.3.1. Onboard Debugger Connections.................................................................................16
5. Hardware Revision History...................................................................................... 17
5.1. Identifying Product ID and Revision........................................................................................... 17
5.2. Revision 5...................................................................................................................................17
6. Document Revision History..................................................................................... 18
7. Appendix..................................................................................................................19
7.1. Schematic...................................................................................................................................19
7.2. Connecting External Debuggers................................................................................................ 21
7.3. Getting Started with IAR.............................................................................................................22
The Microchip Web Site................................................................................................ 25
Customer Change Notification Service..........................................................................25
© 2018 Microchip Technology Inc.
User Guide
DS50002804A-page 2
ATmega4809 Curiosity Nano
Customer Support......................................................................................................... 25
Microchip Devices Code Protection Feature................................................................. 25
Legal Notice...................................................................................................................26
Trademarks................................................................................................................... 26
Quality Management System Certified by DNV.............................................................27
Worldwide Sales and Service........................................................................................28
© 2018 Microchip Technology Inc.
User Guide
DS50002804A-page 3

1. Introduction

Micro USB
Connector
Debugger
Power/Status
LED
32.768 kHz
Crystal
User LED
(LED0)
User Switch
(SW0)
ATmega4809
MCU

1.1 Features

ATmega4809-MFR microcontroller
One yellow user LED
One mechanical user switch
One 32.768 kHz crystal
Onboard debugger
Board identification in Atmel Studio/Microchip MPLAB® X
One green power and status LED
Programming and debugging
Virtual COM port (CDC)
Two logic analyzer channels (DGI GPIO)
USB powered
Adjustable target voltage
MIC5353 LDO regulator controlled by the onboard debugger
1.8-5.1V output voltage (limited by USB input voltage)
500 mA maximum output current (limited by ambient temperature and output voltage)
ATmega4809 Curiosity Nano
Introduction

1.2 Kit Overview

The Microchip ATmega4809 Curiosity Nano evaluation kit is a hardware platform to evaluate the Microchip ATmega4809.
Figure 1-1. ATmega4809 Curiosity Nano Evaluation Kit Overview
© 2018 Microchip Technology Inc.
User Guide
DS50002804A-page 4

2. Getting Started

2.1 Curiosity Nano Quick Start

Steps to start exploring the Microchip Curiosity Nano platform:
1. Download Atmel Studio/Microchip MPLAB® X.
2. Launch Atmel Studio/Microchip MPLAB® X.
3. Connect a USB cable (Standard-A to Micro-B or Micro-AB) between the PC and the debug USB port on the kit.
ATmega4809 Curiosity Nano
Getting Started
When the Curiosity Nano kit is connected to your computer for the first time, the operating system will perform a driver software installation. The driver file supports both 32- 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 Atmel Studio/Microchip MPLAB® X.
Once the Curiosity Nano board is powered the green status LED will be lit and Atmel Studio/Microchip MPLAB® X will auto-detect which Curiosity Nano board is connected. Atmel Studio/Microchip MPLAB® X will present relevant information like data sheets and kit documentation. The ATmega4809 device is programmed by the onboard debugger and therefore no external programmer tool is required.

2.2 Design Documentation and Relevant Links

The following list contains links to the most relevant documents and software for the ATmega4809 Curiosity Nano.
MPLAB® X IDE - MPLAB® X IDE is a software program that runs on a PC (Windows®, Mac OS®, Linux®) to develop applications for Microchip microcontrollers and digital signal controllers. It is called an Integrated Development Environment (IDE) because it provides a single integrated "environment" to develop code for embedded microcontrollers.
Atmel Studio - Free IDE for the development of C/C++ and assembler code for microcontrollers.
IAR Embedded Workbench® for AVR® - This is a commercial C/C++ compiler that is available for 8-bit AVR. There is a 30-day evaluation version as well as a 4 KB code-size-limited kick-start version available from their website.
Atmel START - Atmel START is an online tool that helps the user to select and configure software components and tailor your embedded application in a usable and optimized manner.
Microchip Sample Store - Microchip sample store where you can order samples of devices.
Data Visualizer - Data Visualizer is a program used for processing and visualizing data. The Data Visualizer can receive data from various sources such as the EDBG Data Gateway Interface found on Curiosity Nano and Xplained Pro boards and COM Ports.
ATmega4809 Curiosity Nano website - Kit information, latest user guide and design documentation.
ATmega4809 Curiosity Nano on Microchip Direct - Purchase this kit on Microchip Direct.
®
© 2018 Microchip Technology Inc.
User Guide
DS50002804A-page 5

3. Curiosity Nano

Curiosity Nano is an evaluation platform that provides a set of small boards with access to most of the microcontrollers I/Os. The platform consists of a series of low pin-count microcontroller (MCU) boards, which are integrated with Atmel Studio/Microchip MPLAB® X to present relevant user guides, application notes, data sheets, and example code. The platform features a Virtual COM port (CDC) for serial communication to a host PC and a Data Gateway Interface (DGI) GPIO.

3.1 Onboard Debugger

ATmega4809 Curiosity Nano contains an onboard debugger for programming and debugging. The onboard debugger is a composite USB device of several interfaces: a debugger, a mass storage device, a data gateway, and a Virtual COM port (CDC).
Together with Atmel Studio/Microchip MPLAB® X, the onboard debugger interface can program and debug the ATmega4809.
A Data Gateway Interface (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.
ATmega4809 Curiosity Nano
Curiosity Nano
The Virtual COM port is connected to a UART on the ATmega4809 and provides an easy way to communicate with the target application through terminal software.
The onboard debugger controls one Power and Status LED (marked PS) on the ATmega4809 Curiosity Nano board. The table below shows how the LED is controlled in different operation modes.
Table 3-1. Onboard Debugger LED Control
Operation Mode Status LED
Boot loader mode LED blink at 1 Hz during power up.
Power-up LED is lit - constant.
Normal operation LED is lit - constant.
Programming Activity indicator; the LED flashes slowly during
Fault The LED flashes fast if a power fault is detected.
Sleep/Off LED is off. The onboard debugger is either in Sleep

3.1.1 Virtual COM Port

A general purpose USB serial bridge between a host PC and a target device.
programming/debugging.
mode or powered down. This can occur if the kit is externally powered.
3.1.1.1 Overview
The debugger implements a composite 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.
© 2018 Microchip Technology Inc.
User Guide
DS50002804A-page 6
On Windows machines, the CDC will enumerate as Curiosity Virtual COM Port and appear in the Ports section of the device manager. The COM port number is usually shown here. Info:  On older Windows systems a USB driver is required for CDC. This driver is included in Atmel Studio and MPLAB X 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#.
3.1.1.2 Limitations
Not all UART features are implemented in the debugger CDC. The constraints are outlined here:
Baud rate must be in the range 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.
Parity: can be odd, even, or none.
Hardware flow control: not supported.
Stop bits: one or two bits are supported.
3.1.1.3 Signaling
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 back baud rate and other UART parameters of the CDC, but data sending and receiving will not be enabled.
ATmega4809 Curiosity Nano
Curiosity Nano
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, so 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
CDC Override Mode
In normal operation, the onboard 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 - 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 baud rate last used 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 such 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, since the debugger buffers
© 2018 Microchip Technology Inc.
User Guide
DS50002804A-page 7
frames, not bytes. A maximum of 4 x 64-byte frames can be active at any time, the debugger will throttle the incoming frames accordingly. Sending full 64-byte 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-of-frame 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.

3.1.2 Mass Storage Disk

A simple way to program the target device through drag and drop with .hex-files.
3.1.2.1 Mass Storage Device
The debugger implements a highly optimized variant of the FAT12 file-system that has a number of limitations, partly due to the nature of FAT12 itself, and partly due to optimizations made to fulfill its purpose in this development kit.
ATmega4809 Curiosity Nano
Curiosity Nano
The CURIOSITY drive is USB Chapter 9 compliant as a mass storage device but does not in any way fulfill the expectations of a general purpose mass storage device. This behavior is intentional.
The debugger enumerates as a Curiosity Nano USB device that can be found in the disk drives section of the Windows device manager. The CURIOSITY drive appears in the file manager and claims the next available drive letter in the system.
The CURIOSITY drive contains approximately 1 MB of free space. This does not reflect the size of the target device's flash in any way. When programming a hex file, the binary data is encoded in ASCII with metadata providing a large overhead, so 1 MB is a trivially chosen value for disk size.
It is not possible to format the CURIOSITY drive. When programming a file to the target, the filename may appear in the disk directory listing - this is merely the operating system's view of the directory, which, in reality, has not been updated. It is not possible to read out the file contents. Removing and replugging the kit will return the file system to its original state, but the target will still contain the application that has been previously programmed.
To erase the target device, simply copy a text file starting with "CMD:ERASE" onto the disk.
By default the CURIOSITY drive contains several read-only files for generating icons as well as reporting status and linking to further information:
AUTORUN.ICO - Icon file for the Microchip logo.
AUTORUN.INF - System file required for Windows Explorer to show the icon file.
KIT-INFO.HTM - Redirect to the development board web site.
KIT-INFO.TXT - A text file containing details about the kit firmware, name, serial number, and device.
STATUS.TXT - A text file containing the programming status of the board.
Info:  When STATUS.TXT is updated by the debugger dynamically, the contents may be cached by the OS and not reflect the correct status.
© 2018 Microchip Technology Inc.
User Guide
DS50002804A-page 8
3.1.2.2 Configuration Words/Fuse Bytes
USB
DEBUGGER
PS LED
NC
ID
CDC RX
CDC TX
DBG1
DBG2
VBUS
VOFF
DBG3
DBG0
GND
VTG
CURIOSITY NANO
Fuse Bytes (AVR® Targets)
The debugger does not mask any fuse bits or combinations when writing fuses. It is not possible to disable UPDI by fuse setting on devices with a dedicated UPDI pin. For devices with a shared/ configurable UPDI pin, be sure not to select an alternate pin function for UPDI either by fuse setting in Programming mode or by using the I/O view or memory views to modify the memory-mapped fuse values. Disabling UPDI will render the debugger unable to contact the target device — an external programmer capable of 12V UPDI activation will be required.

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/debug pins have different functions depending on the target programming interface as shown in the table and figure below.
Table 3-2. Curiosity Nano Standard Pinout
Debugger Signal UPDI Target Description
ATmega4809 Curiosity Nano
Curiosity Nano
ID - ID line for extensions.
CDC TX UART RX USB CDC TX line.
CDC RX UART TX USB CDC RX line.
DBG0 UPDI Debug data line.
DBG1 GPIO1 Debug clock line/DGI GPIO
DBG2 GPIO0 DGI GPIO
DBG3 RESET Reset line.
NC - No connect.
VBUS - VBUS voltage for external use.
VOFF - Voltage Off input.
VTG - Target voltage.
GND - Common ground.
Figure 3-1. Curiosity Nano Standard Pinout
© 2018 Microchip Technology Inc.
User Guide
DS50002804A-page 9
Loading...
+ 19 hidden pages