ATmega4809 Curiosity Nano ATmega4809 Curiosity Nano Hardware User Guide

Preface

The ATmega4809 Curiosity Nano Evaluation Kit is a hardware platform to evaluate in the megaAVR® 0-series Family. This board has the ATmega4809 (MCU) mounted. Supported by both MPLAB® X IDE and Atmel Studio 7, the board provides easy access to the features of the ATmega4809 to explore how to integrate the device into a custom design. The Curiosity Nano series of evaluation boards include an on-board debugger. No external tools are necessary to program and debug the ATmega4809.

• MPLAB® X IDE and Atmel Studio - Software to discover, configure, develop, program, and debug Microchip microcontrollers. • Code examples in Atmel START - Get started with code examples or generate drivers for a custom application. • Code examples on GitHub - Get started with code examples. • ATmega4809 website - Find documentation, datasheets, sample, and purchase microcontrollers. • ATmega4809 Curiosity Nano website - Kit information, latest user guide, and design documentation.

© 2020 Microchip Technology Inc. User Guide DS50002804B-page 1 ATmega4809 Curiosity Nano

Table of Contents

Preface...... 1

1. Introduction...... 4 1.1. Features...... 4 1.2. Board Overview...... 4

2. Getting Started...... 5 2.1. Quick Start...... 5 2.2. Design Documentation and Relevant Links...... 5

3. Curiosity Nano...... 7 3.1. On-Board Debugger Overview...... 7 3.2. Curiosity Nano Standard Pinout...... 13 3.3. Power Supply...... 14 3.4. Low-Power Measurement...... 18 3.5. Programming External Microcontrollers...... 19 3.6. Connecting External Debuggers...... 22

4. Hardware User Guide...... 25 4.1. Connectors...... 25 4.2. Peripherals...... 26 4.3. On-Board Debugger Implementation...... 28

5. Hardware Revision History and Known Issues...... 29 5.1. Identifying Product ID and Revision...... 29 5.2. Revision 8...... 29 5.3. Revision 7...... 29 5.4. Revision 5...... 29

6. Document Revision History...... 30

7. Appendix...... 31 7.1. Schematic...... 31 7.2. Assembly Drawing...... 33 7.3. Curiosity Nano Base for Click boards™...... 34 7.4. Disconnecting the On-Board Debugger...... 35 7.5. Getting Started with IAR™...... 36

The Microchip Website...... 39

Product Change Notification Service...... 39

Customer Support...... 39

Microchip Devices Code Protection Feature...... 39

Legal Notice...... 40

Trademarks...... 40

© 2020 Microchip Technology Inc. User Guide DS50002804B-page 2 ATmega4809 Curiosity Nano

Quality Management System...... 41

Worldwide Sales and Service...... 42

© 2020 Microchip Technology Inc. User Guide DS50002804B-page 3 ATmega4809 Curiosity Nano Introduction

1. Introduction

1.1 Features • ATmega4809 Microcontroller • One Yellow User LED • One Mechanical User Switch • Footprint for 32.768 kHz Crystal • On-Board Debugger: – Board identification in Microchip MPLAB® X IDE and Atmel Studio 7 – One green power and status LED – Programming and – Virtual serial port (CDC) – Two debug GPIO channels (DGI GPIO) • USB Powered • Adjustable Target Voltage: – MIC5353 LDO regulator controlled by the on-board debugger – 1.8–5.1V output voltage (limited by USB input voltage) – 500 mA maximum output current (limited by ambient temperature and output voltage)

1.2 Board Overview The Microchip ATmega4809 Curiosity Nano Evaluation Kit is a hardware platform to evaluate the ATmega4809 microcontroller. Figure 1-1. ATmega4809 Curiosity Nano Board Overview

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

© 2020 Microchip Technology Inc. User Guide DS50002804B-page 4 ATmega4809 Curiosity Nano Getting Started

2. Getting Started

2.1 Quick Start Steps to start exploring the ATmega4809 Curiosity Nano board: 1. Download Microchip MPLAB® X IDE and MPLAB® XC C Compiler, or download Atmel Studio 7. 2. Launch MPLAB® X IDE or Atmel Studio 7. 3. Optional: Use MPLAB® Code Configurator or Atmel START to generate drivers and examples. 4. Write your application code. 5. Connect a USB cable (Standard-A to Micro-B or Micro-AB) between the PC and the debug USB port on the board.

Info: • MPLAB® X IDE supports XC C compilers and the AVR® and Arm® Toolchains (GCC Compilers) • Microchip’s XC8 C Compiler supports all 8-bit PIC® and AVR® microcontrollers • Included in the Atmel Studio 7 download are the AVR® and Arm® Toolchains (GCC Compilers)

2.1.1 Driver Installation

When the board 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 board are included with both MPLAB® X IDE and Atmel Studio 7.

2.1.2 Kit Window

Once the board is powered, the green status LED will be lit, and both MPLAB® X IDE and Atmel Studio 7 will auto- detect which boards are connected. The Kit Window in MPLAB® X IDE and Atmel Studio 7 will present relevant information like data sheets and board documentation. The ATmega4809 device on the ATmega4809 Curiosity Nano board is programmed and debugged by the on-board debugger and, therefore, no external or debugger tool is required.

Tip: The Kit Window can be opened in MPLAB® X IDE through the menu bar Window > Kit Window.

2.2 Design Documentation and Relevant Links The following list contains links to the most relevant documents and software for the ATmega4809 Curiosity Nano board:

• 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 AVR microcontrollers. There is a 30-day evaluation version as well as a 4 KB code-size-limited kick-start version available from their website.

© 2020 Microchip Technology Inc. User Guide DS50002804B-page 5 ATmega4809 Curiosity Nano Getting Started

• MPLAB® XC Compilers - MPLAB® XC8 C Compiler is available as a free, unrestricted-use download. Microchips MPLAB® XC8 C Compiler is a comprehensive solution for your project’s software development on Windows®, macOS® or Linux®. MPLAB® XC8 supports all 8-bit PIC® and AVR® microcontrollers (MCUs). • MPLAB® Code Configurator - MPLAB Code Configurator (MCC) is a free software plug-in that provides a graphical interface to configure peripherals and functions specific to your application. • Atmel START - Atmel START is an online tool that hosts code examples, 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. • MPLAB Data Visualizer - MPLAB Data Visualizer is a program used for processing and visualizing data. The Data Visualizer can receive data from various sources such as serial ports and on-board debugger’s Data Gateway Interface, as found on Curiosity Nano and Xplained Pro boards. • Studio Data Visualizer - Studio Data Visualizer is a program used for processing and visualizing data. The Data Visualizer can receive data from various sources such as serial ports, on-board debugger’s Data Gateway Interface as found on Curiosity Nano and Xplained Pro boards, and power data from the Power Debugger. • Microchip PIC® and AVR® Examples - Microchip PIC and AVR Device Examples is a collection of examples and labs that use Microchip development boards to showcase the use of PIC and AVR device peripherals. • Microchip PIC® and AVR® Solutions - Microchip PIC and AVR Device Solutions contains complete applications for use with Microchip development boards, ready to be adapted and extended. • ATmega4809 Curiosity Nano website - Kit information, latest user guide, and design documentation. • ATmega4809 Curiosity Nano on microchipDIRECT - Purchase this kit on microchipDIRECT.

© 2020 Microchip Technology Inc. User Guide DS50002804B-page 6 ATmega4809 Curiosity Nano Curiosity Nano

3. Curiosity Nano Curiosity Nano is an evaluation platform 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 with on-board debuggers, which are integrated with MPLAB® X IDE and Atmel Studio 7. Each board is identified in the IDE. When plugged in, a Kit Window is displayed with links to key documentation, including relevant user guides, application notes, data sheets, and example code. Everything is easy to find. The on-board debugger features a virtual serial port (CDC) for serial communication to a host PC and a Data Gateway Interface (DGI) with debug GPIO pin(s).

3.1 On-Board Debugger Overview ATmega4809 Curiosity Nano contains an on-board debugger for programming and debugging. The on-board debugger is a composite USB device consisting of several interfaces: • A debugger that can program and debug the ATmega4809 in both MPLAB® X IDE and Atmel Studio 7 • A mass storage device that allows drag-and-drop programming of the ATmega4809 • A virtual serial port (CDC) that is connected to a Universal Asynchronous Receiver/Transmitter (UART) on the ATmega4809, and provides an easy way to communicate with the target application through terminal software • A Data Gateway Interface (DGI) for code instrumentation with logic analyzer channels (debug GPIO) to visualize program flow The on-board debugger controls a 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. On-Board Debugger LED Control

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/debugging Drag-and-drop Success: The LED blinks slowly for 2 sec. programming Failure: The LED blinks rapidly for 2 sec.

Fault The LED blinks rapidly if a power fault is detected Sleep/Off The LED is OFF. The on-board debugger is either in a sleep mode or powered down. This can occur if the board is externally powered.

Info: Slow blinking is approximately 1 Hz, and rapid blinking is approximately 5 Hz.

3.1.1 Debugger The on-board debugger on the ATmega4809 Curiosity Nano board appears as a Human Interface Device (HID) on the host computer’s USB subsystem. The debugger supports full-featured programming and debugging of the ATmega4809 using both MPLAB® X IDE and Atmel Studio 7, as well as some third-party IDEs.

© 2020 Microchip Technology Inc. User Guide DS50002804B-page 7 ATmega4809 Curiosity Nano Curiosity Nano

Remember: Keep the debugger’s up-to-date. Firmware upgrades are automatically done when using MPLAB® X IDE or Atmel Studio 7.

3.1.2 Virtual Serial Port (CDC) The virtual serial port (CDC) is a general purpose serial bridge between a host PC and a target device. 3.1.2.1 Overview The on-board debugger implements a composite USB device that includes a standard Communications Device Class (CDC) interface, which appears on the host as a virtual serial port. The CDC can be used to stream arbitrary data in both directions between the host computer and the target: All characters sent through the virtual serial port on the host computer will be transmitted as UART on the debugger’s CDC TX pin, and UART characters captured on the debugger’s CDC RX pin will be returned to the host computer through the virtual serial port. Figure 3-1. CDC Connection

PC Terminal Debugger Target Target MCU Send Receive Terminal CDC TX UART RX USB CDC RX UART TX Software Terminal Target Receive Send

Info: As shown in Figure 3-1, the debugger’s CDC TX pin is connected to a UART RX pin on the target for receiving characters from the host computer. Similarly, the debugger’s CDC RX pin is connected to a UART TX pin on the target for transmitting characters to the host computer.

3.1.2.2 Operating System Support On Windows machines, the CDC will enumerate as Curiosity Virtual COM Port and appear in the Ports section of the Windows Device Manager. The COM port number can also be found there.

Info: On older Windows systems, a USB driver is required for CDC. This driver is included in installations of both MPLAB® X IDE and Atmel Studio 7.

On Linux machines, the CDC will enumerate and appear as /dev/ttyACM#.

Info: tty* devices belong to the “dialout” group in Linux, so it may be necessary to become a member of that group to have permissions to access the CDC.

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#.

© 2020 Microchip Technology Inc. User Guide DS50002804B-page 8 ATmega4809 Curiosity Nano Curiosity Nano

Info: For all operating systems: Be sure to use a terminal emulator that supports DTR signaling. See 3.1.2.4 Signaling.

3.1.2.3 Limitations Not all UART features are implemented in the on-board debugger CDC. The constraints are outlined here: • Baud rate: Must be in the range of 1200 bps to 500 kbps. Any baud rate outside this range will be set to the closest limit, 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.2.4 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 the 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. As this is a virtual control signal implemented on the USB interface, it is not physically present on the board. Asserting the DTR signal from the host will indicate to the on-board debugger that a CDC session is active. The debugger will then enable its level shifters (if available) and start the CDC data send and receive mechanisms. Deasserting DTR in debugger firmware version 1.20 or earlier has the following behavior: • Debugger UART receiver is disabled, so no further data will be transferred to the host computer • Debugger UART transmitter will continue to send data that is queued for sending, but no new data is accepted from the host computer • Level shifters (if available) are not disabled, so the debugger CDC TX line remains driven Deasserting DTR in debugger firmware version 1.21 or later has the following behavior: • Debugger UART receiver is disabled, so no further data will be transferred to the host computer • Debugger UART transmitter will continue to send data that is queued for sending, but no new data is accepted from the host computer • Once the ongoing transmission is complete, level shifters (if available) are disabled, so the debugger CDC TX line will become high-impedance

Remember: Set up the terminal emulator to assert the DTR signal. Without the signal, the on-board debugger will not send or receive any data through its UART.

Tip: The on-board debugger’s CDC TX pin will not be driven until the CDC interface is enabled by the host computer. Also, there are no external pull-up resistors on the CDC lines connecting the debugger and the target, which means that during power-up, these lines are floating. To avoid any glitches resulting in unpredictable behavior like framing errors, the target device should enable the internal pull-up resistor on the pin connected to the debugger’s CDC TX pin.

© 2020 Microchip Technology Inc. User Guide DS50002804B-page 9 ATmega4809 Curiosity Nano Curiosity Nano

3.1.2.5 Advanced Use

CDC Override Mode In normal operation, the on-board debugger is a true UART bridge between the host and the device. However, in certain use cases, the on-board debugger can override the basic operating mode and use the CDC TX and RX pins for other purposes. Dropping a text file into the on-board debugger’s mass storage drive can be used to send characters out of the debugger’s CDC TX pin. The filename and extension are trivial, but the text file must start with the characters: CMD:SEND_UART=

Debugger firmware version 1.20 or earlier has the following limitations: • The maximum message length is 50 characters – all remaining data in the frame are ignored • The default baud rate used in this mode is 9600 bps, but if the CDC is already active or has been configured, the previously used baud rate still applies Debugger firmware version 1.21 and later has the following limitations/features: • The maximum message length may vary depending on the MSC/SCSI layer timeouts on the host computer and/or operating system. A single SCSI frame of 512 bytes (498 characters of payload) is ensured, and files of up to 4 KB will work on most systems. The transfer will complete on the first NULL character encountered in the file. • The baud rate used is always 9600 bps for the default command: CMD:SEND_UART=

The CDC Override Mode should not be used simultaneously with data transfer over the CDC/terminal. If a CDC terminal session is active at the time a file is received via CDC Override Mode, it will be suspended for the duration of the operation and resumed once complete. • Additional commands are supported with explicit baud rates: CMD:SEND_9600=

CMD:SEND_115200=

CMD:SEND_460800=

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 debugger’s CDC TX pin. Transferring a small amount of data per frame can be inefficient, particularly at low baud rates, as the on-board debugger buffers frames and not bytes. A maximum of four 64-byte frames can be active at any time. The on-board debugger will throttle the incoming frames accordingly. Sending full 64-byte frames containing data is the most efficient method. When receiving data on the debugger’s CDC RX pin, the on-board debugger will queue up the 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 eight 64-byte frames can be active at any time. If the host (or the 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 data frame 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.3 Mass Storage Device The on-board debugger includes a simple Mass Storage Device implementation, which is accessible for read/write operations via the host operating system to which it is connected. It provides: • Read access to basic text and HTML files for detailed kit information and support

© 2020 Microchip Technology Inc. User Guide DS50002804B-page 10 ATmega4809 Curiosity Nano Curiosity Nano

• Write access for programming Intel® HEX formatted files into the target device’s memory • Write access for simple text files for utility purposes 3.1.3.1 Mass Storage Device Implementation The on-board debugger implements a highly optimized variant of the FAT12 file system that has several limitations, partly due to the nature of FAT12 itself and optimizations made to fulfill its purpose for its embedded application. The Curiosity Nano USB device 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. When using the Windows operating system, the on-board debugger enumerates as a Curiosity Nano USB Device that can be found in the disk drives section of the 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 one MB of free space. This does not reflect the size of the target device’s Flash in any way. When programming an Intel® HEX file, the binary data are encoded in ASCII with metadata providing a large overhead, so one 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 board 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, 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 website • KIT-INFO.TXT – a text file containing details about the board’s debugger firmware version, board name, USB serial number, device, and drag-and-drop support • STATUS.TXT – a text file containing the programming status of the board

Info: STATUS.TXT is dynamically updated by the on-board debugger. The contents may be cached by the OS and, therefore, do not reflect the correct status.

3.1.3.2 Limitations of Drag-and-Drop Programming

Lock Bits Lock bits included in the hex file will be ignored when using drag-and-drop programming. To program lock bits, use MPLAB® X IDE or Atmel Studio 7.

Enabling CRC Check in Fuses It is not advisable to enable the CRC check in the target device’s fuses when using drag-and-drop programming. This because a subsequent chip erase (which does not affect fuse bits) will effect a CRC mismatch, and the application will fail to boot. To recover a target from this state, a chip erase must be done using MPLAB® X IDE or Atmel Studio 7, which will automatically clear the CRC fuses after erasing. 3.1.3.3 Special Commands Several utility commands are supported by copying text files to the mass storage disk. The filename or extension is irrelevant – the command handler reacts to content only.

© 2020 Microchip Technology Inc. User Guide DS50002804B-page 11 ATmega4809 Curiosity Nano Curiosity Nano

Table 3-2. Special File Commands

Command Content Description CMD:ERASE Executes a chip erase of the target CMD:SEND_UART= Sends a string of characters to the CDC UART. See “CDC Override Mode.”

CMD:SEND_9600= Sends a string of characters to the CDC UART at the baud rate CMD:SEND_115200= specified. Note that only the baud rates explicitly specified here CMD:SEND_460800= are supported! See “CDC Override Mode” (Debugger firmware v1.21 or newer.) CMD:RESET Resets the target device by entering Programming mode and then exiting Programming mode immediately thereafter. Exact timing can vary according to the programming interface of the target device. (Debugger firmware v1.16 or newer.) CMD:POWERTOGGLE Powers down the target and restores power after a 100 ms delay. If external power is provided, this has no effect. (Debugger firmware v1.16 or newer.) CMD:0V Powers down the target device by disabling the target supply regulator. If external power is provided, this has no effect. (Debugger firmware v1.16 or newer.) CMD:1V8 Sets the target voltage to 1.8V. If external power is provided, this has no effect. (Debugger firmware v1.21 or newer.) CMD:3V3 Sets the target voltage to 3.3V. If external power is provided, this has no effect. (Debugger firmware v1.16 or newer.) CMD:5V0 Sets the target voltage to 5.0V. If external power is provided, this has no effect. (Debugger firmware v1.16 or newer.)

Info: The commands listed here are triggered by the content being sent to the mass storage emulated disk, and no feedback is provided in the case of either success or failure.

3.1.4 Data Gateway Interface (DGI) Data Gateway Interface (DGI) is a USB interface for transporting raw and timestamped data between on-board debuggers and host computer-based visualization tools. MPLAB Data Visualizer is used on the host computer to display debug GPIO data. It is available as a plug-in for MPLAB® X IDE or a stand-alone application that can be used in parallel with MPLAB® X IDE or Atmel Studio 7. Although DGI encompasses several physical data interfaces, the ATmega4809 Curiosity Nano implementation includes logic analyzer channels: • Two debug GPIO channels (also known as DGI GPIO) 3.1.4.1 Debug GPIO Debug GPIO channels are timestamped digital signal lines connecting the target application to a host computer visualization application. They are typically used to plot the occurrence of low-frequency events on a time-axis – for example, when certain application state transitions occur. The figure below shows the monitoring of the digital state of a mechanical switch connected to a debug GPIO in MPLAB Data Visualizer.

© 2020 Microchip Technology Inc. User Guide DS50002804B-page 12 ATmega4809 Curiosity Nano Curiosity Nano

Figure 3-2. Monitoring Debug GPIO with MPLAB® Data Visualizer

Debug GPIO channels are timestamped, so the resolution of DGI GPIO events is determined by the resolution of the DGI timestamp module.

Important: Although bursts of higher-frequency signals can be captured, the useful frequency range of signals for which debug GPIO can be used is up to about 2 kHz. Attempting to capture signals above this frequency will result in data saturation and overflow, which may cause the DGI session to be aborted.

3.1.4.2 Timestamping DGI sources are timestamped as they are captured by the debugger. The timestamp counter implemented in the Curiosity Nano debugger increments at 2 MHz frequency, providing a timestamp resolution of a half microsecond.

3.2 Curiosity Nano Standard Pinout The 12 edge connections closest to the USB connector on Curiosity Nano boards 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-3. Curiosity Nano Standard Pinout

Debugger Signal Target MCU Description 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 GPIO1

DBG2 GPIO0 debug GPIO0 DBG3 RESET Reset line NC — No connect

© 2020 Microchip Technology Inc. User Guide DS50002804B-page 13 ATmega4809 Curiosity Nano Curiosity Nano

...... continued Debugger Signal Target MCU Description VBUS — VBUS voltage for external use VOFF — Voltage Off input. Disables the target regulator and target voltage when pulled low. VTG — Target voltage GND — Common ground

Figure 3-3. Curiosity Nano Standard Pinout

USB

PS LED NC VBUS ID VOFF

CDC RX DEBUGGER DBG3 CDC TX DBG0 DBG1 GND

DBG2 CURIOSITY NANO VTG

3.3 Power Supply The board is powered through the USB port and contains two LDO regulators, one to generate 3.3V for the on-board debugger, and an adjustable LDO regulator for the target ATmega4809 microcontroller and its peripherals. The voltage from a USB connector can vary between 4.4V to 5.25V (according to the USB specification) and will limit the maximum voltage to the target. The figure below shows the entire power supply system on ATmega4809 Curiosity Nano. Figure 3-4. Power Supply Block Diagram VTG

Target VREG VLVL Power Target Supply Power Regulator strap strap

Measure On/Off VUSB On/Off Target USB Adjust MCU

Power consumer DEBUGGER P3V3 I/O Level I/O GPIO I/O DEBUGGER PTC Regulator shifter straps Power converter Fuse Power protection Power source Cut strap VBUS #VOFF ID system

3.3.1 Target Regulator The target voltage regulator is a MIC5353 variable output LDO. The on-board debugger can adjust the voltage output supplied to the board target section by manipulating the MIC5353’s feedback voltage. The hardware implementation

© 2020 Microchip Technology Inc. User Guide DS50002804B-page 14 ATmega4809 Curiosity Nano Curiosity Nano is limited to an approximate voltage range from 1.7V to 5.1V. Additional output voltage limits are configured in the debugger firmware to ensure that the output voltage never exceeds the hardware limits of the ATmega4809 microcontroller. The voltage limits configured in the on-board debugger on ATmega4809 Curiosity Nano are 1.8– 5.5V.

Info: The target voltage is set to 3.3V when the board is manufactured. It can be changed through MPLAB® X IDE project properties and in the Atmel Studio 7 device programming dialog. Any change to the target voltage is persistent, even after a power toggle. The resolution is less than 5 mV but may be limited to 10 mV by the adjustment program.

Info: Voltage settings that are set up in MPLAB® X IDE are not immediately applied to the board. The new voltage setting is applied to the board when the debugger is accessed in any way, like pushing the Refresh Debug Tool Status button in the project dashboard tab, or programming/reading program memory.

Info: There is a simple option to adjust the target voltage with a drag-and-drop command text file to the board. This supports a set of common target voltages. See section 3.1.3.3 Special Commands for further details.

The MIC5353 supports a maximum current load of 500 mA. It is an LDO regulator in a small package, placed on a small printed circuit board (PCB), and the thermal shutdown condition can be reached at lower loads than 500 mA. The maximum current load depends on the input voltage, the selected output voltage, and the ambient temperature. The figure below shows the safe operating area for the regulator, with an input voltage of 5.1V and an ambient temperature of 23°C. Figure 3-5. Target Regulator Safe Operation Area

The voltage output of the target regulator is continuously monitored (measured) by the on-board debugger. If it is more than 100 mV over/under the set device voltage, an error condition will be flagged, and the target voltage regulator will be turned off. This will detect and handle any short-circuit conditions. It will also detect and handle if an external voltage, which causes VCC_TARGET to move outside of the voltage setting monitoring window of ±100 mV, is suddenly applied to the VTG pin, without setting the VOFF pin low.

© 2020 Microchip Technology Inc. User Guide DS50002804B-page 15 ATmega4809 Curiosity Nano Curiosity Nano

Info: The on-board debugger has a monitoring window of VCC_TARGET±100 mV. If the external voltage is measured under this limit, the on-board debugger status LED will blink rapidly. If the external voltage is measured above this limit, the on-board debugger status LED will continue to shine. If the external voltage is removed, the status LED will start to blink rapidly until the on-board debugger detects the new situation and turns the target voltage regulator back on.

3.3.2 External Supply ATmega4809 Curiosity Nano can be powered by an external voltage instead of the on-board target regulator. When the Voltage Off (VOFF) pin is shorted to ground (GND), the on-board debugger firmware disables the target regulator, and it is safe to apply an external voltage to the VTG pin. It is also safe to apply an external voltage to the VTG pin when no USB cable is plugged into the DEBUG connector on the board. The VOFF pin can be tied low/let go at any time. This will be detected by a pin-change interrupt to the on-board debugger, which controls the target voltage regulator accordingly.

Applying an external voltage to the VTG pin without shorting VOFF to GND may cause permanent damage WARNING to the board.

Do not apply any voltage to the VOFF pin. Let the pin float to enable the power supply. WARNING

The absolute maximum external voltage is 5.5V for the on-board level shifters, and the standard operating WARNING condition of the ATmega4809 is 1.8–5.5V. Applying a higher voltage may cause permanent damage to the board.

Info: If an external voltage is applied without pulling the VOFF pin low and an external supply pulls the voltage lower than the monitoring window’s lower limit (target voltage setting – 100 mV), the on-board debugger status LED will blink rapidly and shut the on-board regulator off. If an external voltage is suddenly removed when the VOFF pin is not pulled low, the status LED will start to blink rapidly, until the on-board debugger detects the new situation and switches the target voltage regulator back on.

Programming, debugging, and data streaming is still possible with an external power supply – the debugger and signal level shifters will be powered from the USB cable. Both regulators, the debugger, and the level shifters are powered down when the USB cable is removed.

Info: In addition to the power consumed by the ATmega4809 and its peripherals, approximately 100 µA will be drawn from any external power source to power the on-board level shifters and voltage monitor circuitry when a USB cable is plugged in the DEBUG connector on the board. When a USB cable is not plugged in, some current is used to supply the level shifters voltage pins, which have a worst-case current consumption of approximately 5 µA. Typical values may be as low as 100 nA.

3.3.3 VBUS Output Pin ATmega4809 Curiosity Nano has a VBUS output pin that can be used to power external components that need a 5V supply. The VBUS output pin has a PTC fuse to protect the USB against short circuits. A side effect of the PTC fuse is a voltage drop on the VBUS output with higher current loads. The chart below shows the voltage versus the current load of the VBUS output.

© 2020 Microchip Technology Inc. User Guide DS50002804B-page 16 ATmega4809 Curiosity Nano Curiosity Nano

Figure 3-6. VBUS Output Voltage vs. Current

3.3.4 Power Supply Exceptions This is a summary of most exceptions that can occur with the power supply.

Target Voltage Shuts Down This can happen if the target section draws too much current at a given voltage. This will cause the thermal shutdown safety feature of the MIC5353 regulator to kick in. To avoid this, reduce the current load of the target section.

Target Voltage Setting is Not Reached The maximum output voltage is limited by the USB input voltage (specified to be 4.4-5.25V), and the voltage drop over the MIC5353 regulator at a given voltage setting and current consumption. If a higher output voltage is needed, use a USB power source that can provide a higher input voltage or use an external voltage supply on the VTG pin.

Target Voltage is Different From Setting This can be caused by an externally applied voltage to the VTG pin, without setting the VOFF pin low. If the target voltage differs more than 100 mV over/under the voltage setting, it will be detected by the on-board debugger, and the internal voltage regulator will be shut down. To fix this issue, remove the applied voltage from the VTG pin, and the on-board debugger will enable the on-board voltage regulator when the new condition is detected. Note that the PS LED will be blinking rapidly if the target voltage is below 100 mV of the setting, but will be lit normally when it is higher than 100 mV above the setting.

No, Or Very Low Target Voltage, and PS LED is Blinking Rapidly This can be caused by a full or partial short-circuit and is a special case of the issue mentioned above. Remove the short-circuit, and the on-board debugger will re-enable the on-board target voltage regulator.

© 2020 Microchip Technology Inc. User Guide DS50002804B-page 17 ATmega4809 Curiosity Nano Curiosity Nano

No Target Voltage and PS LED is Lit 1 This occurs if the target voltage is set to 0.0V. To fix this, set the target voltage to a value within the specified voltage range for the target device.

No Target Voltage and PS LED is Lit 2 This can be the issue if power jumper J100 and/or J101 is cut, and the target voltage regulator is set to a value within the specified voltage range for the target device. To fix this, solder a wire/bridge between the pads for J100/J101, or add a jumper on J101 if a pin header is mounted.

VBUS Output Voltage is Low or Not Present This is most likely caused by a high-current drain on VBUS, and the protection fuse (PTC) will reduce the current or cut off completely. Reduce the current consumption on the VBUS pin to fix this issue.

3.4 Low-Power Measurement Power to the ATmega4809 is connected from the on-board power supply and VTG pin through a 100 mil pin header marked with “POWER” in silkscreen (J101). To measure the power consumption of the ATmega4809 and other peripherals connected to the board, cut the Target Power strap and connect an ammeter over the strap. To measure the lowest possible power consumption, follow these steps: 1. Cut the POWER strap with a sharp tool. 2. Solder a 1x2 100 mil pin header in the footprint. 3. Connect an ammeter to the pin header. 4. Write firmware that: 4.1. Tri-states any I/O connected to the on-board debugger. 4.2. Sets the microcontroller in its lowest power sleep mode. 5. Program the firmware into the ATmega4809. Figure 3-7. Target Power Strap

Target Power strap (top side)

© 2020 Microchip Technology Inc. User Guide DS50002804B-page 18 ATmega4809 Curiosity Nano Curiosity Nano

Tip: A 100-mil pin header can be soldered into the Target Power strap (J101) footprint for easy connection of an ammeter. Once the ammeter is no longer needed, place a jumper cap on the pin header.

Info: The on-board level shifters will draw a small amount of current even when they are not in use. A maximum of 2 µA can be drawn from each I/O pin connected to a level shifter for a total of 10 µA. Keep any I/O pin connected to a level shifter in tri-state to prevent leakage. All I/Os connected to the on-board debugger are listed in 4.3.1 On-Board Debugger Connections. To prevent any leakage to the on-board level shifters, they can be disconnected completely, as described in 7.4 Disconnecting the On-Board Debugger.

3.5 Programming External Microcontrollers The on-board debugger on ATmega4809 Curiosity Nano can be used to program and debug microcontrollers on external hardware.

3.5.1 Supported Devices All external AVR microcontrollers with the UPDI interface can be programmed and debugged with the on-board debugger with Atmel Studio. External SAM microcontrollers that have a Curiosity Nano Board can be programmed and debugged with the on- board debugger with Atmel Studio. ATmega4809 Curiosity Nano can program and debug external ATmega4809 microcontrollers with MPLAB X IDE.

3.5.2 Software Configuration No software configuration is required to program and debug the same device that is mounted on the board. To program and debug a different microcontroller than what is mounted on the board, Atmel Studio must be configured to allow free selection of devices and programming interfaces. 1. Navigate to Tools > Options through the menu system at the top of the application. 2. Select the Tools > Tool settings category in the options window. 3. Set the Hide unsupported devices option to False.

© 2020 Microchip Technology Inc. User Guide DS50002804B-page 19 ATmega4809 Curiosity Nano Curiosity Nano

Figure 3-8. Hide Unsupported Devices

Info: Atmel Studio allows any microcontroller and interface to be selected when the Hide unsupported devices setting is set to False, also microcontrollers and interfaces which are not supported by the on- board debugger.

3.5.3 Hardware Modifications The on-board debugger is connected to the ATmega4809 by default. These connections must be removed before any external microcontroller can be programmed or debugged. Cut the GPIO straps shown in the figure below with a sharp tool to disconnect the ATmega4809 from the on-board debugger.

© 2020 Microchip Technology Inc. User Guide DS50002804B-page 20 ATmega4809 Curiosity Nano Curiosity Nano

Figure 3-9. Programming and Debugging Connections to Debugger GPIO straps (bottom side)

Info: Cutting the connections to the debugger will disable programming, debugging, and data streaming from the ATmega4809 mounted on the board.

Tip: Solder in 0Ω resistors across the footprints or short-circuit them with solder to reconnect the signals between the on-board debugger and the ATmega4809.

3.5.4 Connecting to External Microcontrollers The figure and table below show where the programming and debugging signals must be connected to program and debug external microcontrollers. The on-board debugger can supply power to the external hardware or use an external voltage as a reference for its level shifters. Read more about the power supply in 3.3 Power Supply. The on-board debugger and level shifters actively drive data and clock signals (DBG0, DBG1, and DBG2) used for programming and debugging, and in most cases, the external resistor on these signals can be ignored. Pull-down resistors are required on the ICSP™ data and clock signals to debug PIC® microcontrollers. DBG3 is an open-drain connection and requires a pull-up resistor to function. ATmega4809 Curiosity Nano has a pull-up resistor, R200, connected to its #RESET signal (DBG3). The location of the pull-up resistor is shown in the 7.2 Assembly Drawing in the appendix.

Remember: • Connect GND and VTG to the external microcontroller • Tie the VOFF pin to GND if the external hardware has a power supply • Make sure there are pull-down resistors on the ICSP data and clock signals (DBG0 and DBG1) to support the debugging of PIC microcontrollers

© 2020 Microchip Technology Inc. User Guide DS50002804B-page 21 ATmega4809 Curiosity Nano Curiosity Nano

Figure 3-10. Curiosity Nano Standard Pinout

USB

PS LED NC VBUS ID VOFF

CDC RX DEBUGGER DBG3 CDC TX DBG0 DBG1 GND

DBG2 CURIOSITY NANO VTG

Table 3-4. Programming and Debugging Interfaces

Curiosity Nano Pin UPDI ICSP™ SWD DBG0 UPDI DATA SWDIO DBG1 — CLK SWCLK DBG2 — — — DBG3 — #MCLR #RESET

3.6 Connecting External Debuggers Even though there is an on-board debugger, external debuggers can be connected directly to the ATmega4809 Curiosity Nano to program/debug the ATmega4809. The on-board debugger keeps all the pins connected to the ATmega4809 and board edge in tri-state when not actively used. Therefore, the on-board debugger will not interfere with any external debug tools.

© 2020 Microchip Technology Inc. User Guide DS50002804B-page 22 ATmega4809 Curiosity Nano Curiosity Nano

Figure 3-11. Connecting the MPLAB® PICkit™ 4 In-Circuit Debugger/Programmer to ATmega4809 Curiosity Nano

1 = Unused MPLAB® PICkit™ 4 2 = VDD 3 = Ground 4 = PGD 5 = Unused 6 = Unused 7 = Unused 8 = Unused

678 5 4 3 2 1

VDD Ground DATA

USB

PS LED NC VBUS ID VOFF

CDC RX DEBUGGER DBG3 CDC TX DBG0 DBG1 GND

DBG2 CURIOSITY NANO VTG

© 2020 Microchip Technology Inc. User Guide DS50002804B-page 23 ATmega4809 Curiosity Nano Curiosity Nano

Figure 3-12. Connecting the Atmel-ICE to ATmega4809 Curiosity Nano SAM AVR®

Atmel-ICE

Ground VDD 1 = Unused 6 = Unused 2 = GND 7 = Unused 3 = UPDI 8 = Unused 2 10 4 = VTG 9 = Unused 1 9 5 = Unused 10 = Unused DATA

USB

PS LED NC VBUS ID VOFF

CDC RX DEBUGGER DBG3 CDC TX DBG0 DBG1 GND

DBG2 CURIOSITY NANO VTG

To avoid contention between the external debugger and the on-board debugger, do not start any CAUTION programming/debug operation with the on-board debugger through MPLAB® X IDE or Atmel Studio 7 or mass storage programming while the external tool is active.

© 2020 Microchip Technology Inc. User Guide DS50002804B-page 24 ATmega4809 Curiosity Nano Hardware User Guide

4. Hardware User Guide

4.1 Connectors

4.1.1 ATmega4809 Curiosity Nano Pinout All the ATmega4809 I/O pins are accessible at the edge connectors on the board. The image below shows the board pinout. For all available functions on each pin, refer to the I/O Multiplexing and Considerations section in the ATmega4809 data sheet. Figure 4-1. ATmega4809 Curiosity Nano Pinout

Analog Port ATmega4809 Debug PWM I2C Power Curiosity Nano SPI Ground UART Shared pin USB Peripheral VBUS

NC PS LED NC VBUS VOFF ID ID VOFF CDC RX DBG3

PB0 USART3 TX CDC RX DEBUGGER DBG3 PF6 SW0 CDC TX DBG0 PB1 USART3 RX CDC TX DBG0 UPDI DBG1 GND PF3 DBG1 GND DBG2 VTG PF2 DBG2 DEBUGGER VTG PD7 PA0 USART0 TX PA0 ATmega4809 PD7 AIN7 PD6 PA1 USART0 RX PA1 PD6 AIN6 PD5 PA2 TWI0 SDA PA2 PD5 AIN5 TCA0 WO5 PD4 PA3 TWI0 SCL PA3 PD4 AIN4 TCA0 WO4 PD3 PA4 SPI0 MOSI PA4 PD3 AIN3 TCA0 WO3 PD2 PA5 SPI0 MISO PA5 PD2 AIN2 PD1 PA6 SPI0 SCK PA6 PD1 AIN1 PD0 PA7 SPI0 SS PA7 PD0 AIN0 GND GND GND GND PC0 PC7 USART1 TX PC0 PC7 PC1 PC6 USART1 RX PC1 PC6 PC2 PC5 PC2 PC5 ATmega4809 PC3 PC4 PC3 PC4 PB0 PF1 CDC RX USART3 TX PB0 PF1 TOSC2 PB1 PF0 CDC TX USART3 RX PB1 PF0 TOSC1 PB2 PB5 PB2 PB5 PB3 PB4 PB3 PB4 GND GND GND GND PE0 PF5 PE0 PF5 LED0 PE1 PF4 PE1 PF4 PE2 PF3 PE2 LED0 PF3 PE3 PF2 PE3 SW0 PF2

4.1.2 Using Pin Headers The edge connector footprint on ATmega4809 Curiosity Nano has a staggered design where each hole is shifted 8 mil (~0.2 mm) off-center. The hole shift allows the use of regular 100 mil pin headers on the board without soldering.

© 2020 Microchip Technology Inc. User Guide DS50002804B-page 25 ATmega4809 Curiosity Nano Hardware User Guide

Once the pin headers are firmly in place, they can be used in normal applications like pin sockets and prototyping boards without any issues. Figure 4-2. Attaching Pin-Headers to the Curiostiy Nano Board

Figure 4-3. Connecting to Curiosity Nano Base for Click boards™

Tip: Start at one end of the pin header and gradually insert the header along the length of the board. Once all the pins are in place, use a flat surface to push them in.

Tip: For applications where the pin headers will be used permanently, it is still recommended to solder them in place.

Important: Once the pin headers are in place, they are hard to remove by hand. Use a set of pliers and carefully remove the pin headers to avoid damage to the pin headers and PCB.

4.2 Peripherals

4.2.1 LED There is one yellow user LED available on the ATmega4809 Curiosity Nano board that can be controlled by either GPIO or PWM. The LED can be activated by driving the connected I/O line to GND.

© 2020 Microchip Technology Inc. User Guide DS50002804B-page 26 ATmega4809 Curiosity Nano Hardware User Guide

Table 4-1. LED Connection

ATmega4809 Pin Function Shared Functionality PF5 Yellow LED0 Edge connector

4.2.2 Mechanical Switch The ATmega4809 Curiosity Nano board has one mechanical switch. This is a generic user-configurable switch. When the switch is pressed, it will drive the I/O line to ground (GND).

Tip: There is no externally connected pull-up resistor on the switch. To use the switch, make sure that an internal pull-up resistor is enabled on pin PF6.

Table 4-2. Mechanical Switch

ATmega4809 Pin Description Shared Functionality PF6 User switch (SW0) Edge connector, On-board debugger

4.2.3 Crystal ATmega4809 Curiosity Nano has a 32.768 kHz crystal footprint made for standard 3.2 mm by 1.5 mm surface-mount crystals with two terminals. The crystal footprint is connected to the ATmega4809 by default, but the GPIOs are routed out to the edge connector through not mounted resistor footprints (J207 and J208). The two I/O lines routed to the edge connector are disconnected by default to both reduce the chance of contention to the crystal as well as removing excessive capacitance on the lines when using the crystal. To use the PF0 and PF1 pins as GPIO on the edge connector, some hardware modification is needed. • Any crystal should be disconnected when the pins are used as GPIO, as this might harm the crystal • To connect the routing solder a 0 Ω resistor or add a solder blob to the footprints J207 and J208 The crystal has a cut-strap next (J209) to it, which can be used to measure the oscillator safety factor. This is done by cutting the strap and adding a 0402 SMD resistor across the strap. More information about oscillator allowance and safety factor can be found in the AN2648 application note from Microchip. The cut straps and solder points can be seen in Figure 4-4. Table 4-3. Crystal Connections

ATmega4809 Pin Function Shared Functionality PF0 TOSC1 (crystal input) Edge connector PF1 TOSC2 (crystal output) Edge connector

© 2020 Microchip Technology Inc. User Guide DS50002804B-page 27 ATmega4809 Curiosity Nano Hardware User Guide

Figure 4-4. Crystal Connection and Solder Points J209 32.768 kHz J210 J207 Crystal Footprint J211 J208

Top side Bo�om side

4.3 On-Board Debugger Implementation ATmega4809 Curiosity Nano features an on-board debugger that can be used to program and debug the ATmega4809 using UPDI. The on-board debugger also includes a virtual serial port (CDC) interface over UART and debug GPIO. Both MPLAB® X IDE and Atmel Studio 7 can be used as a front-end for the on-board debugger for programming and debugging. MPLAB Data Visualizer can be used as a front-end for the CDC and debug GPIO.

4.3.1 On-Board Debugger Connections The table below shows the connections between the target and the debugger section. All connections between the target and the debugger are tri-stated as long as the debugger is not actively using the interface. Hence, since there are little contaminations of the signals, the pins can be configured to anything the user wants. For further information on how to use the capabilities of the on-board debugger, see 3.1 On-Board Debugger Overview. Table 4-4. On-Board Debugger Connections

ATmega4809 Pin Debugger Pin Function Shared Functionality PB1 CDC TX UART3 RX (ATmega4809 RX line) Edge connector PB0 CDC RX UART3 TX (ATmega4809 TX line) Edge connector UPDI DBG0 UPDI Edge connector PF3 DBG1 GPIO1 Edge connector PF2 DBG2 GPIO0 Edge connector PF6 DBG3 RESET Edge connector, SW0

© 2020 Microchip Technology Inc. User Guide DS50002804B-page 28 ATmega4809 Curiosity Nano Hardware Revision History and Known Issues

5. Hardware Revision History and Known Issues This user guide is written to provide information about the latest available revision of the board. The following sections contain information about known issues, a revision history of older revisions, and how older revisions differ from the latest revision.

5.1 Identifying Product ID and Revision The revision and product identifier of the ATmega4809 Curiosity Nano board can be found in two ways: Either by utilizing the MPLAB® X IDE or Atmel Studio 7 Kit Window or by looking at the sticker on the bottom side of the PCB. By connecting ATmega4809 Curiosity Nano to a computer with MPLAB® X IDE or Atmel Studio 7 running, the Kit Window will pop up. The first six digits of the serial number, which is listed under kit information, contain the product identifier and revision.

Tip: The Kit Window can be opened in MPLAB® X IDE through the menu bar Window > Kit Window.

The same information can be found on the sticker on the bottom side of the PCB. Most boards will have the identifier and revision printed in plain text as A09-nnnn\rr, where “nnnn” is the identifier, and “rr” is the revision. Boards with limited space have a sticker with only a data matrix code, containing the product identifier, revision, and serial number. The serial number string has the following format:

"nnnnrrssssssssss" n = product identifier r = revision s = serial number

The product identifier for ATmega4809 Curiosity Nano is A09-3094.

5.2 Revision 8 The 32.768 kHz crystal used on previous revisions is EOL. The crystal is no longer mounted on revision 8.

5.3 Revision 7 There is a Kyocera Corporation ST3215SB32768C0HPWBB 7 pF crystal mounted on the 32.768 kHz crystal footprint on revision 7 of ATmega4809 Curiosity Nano. Overcurrent protection improved on the VBUS pin.

5.4 Revision 5 Revision 5 is the initially released revision. There is a Kyocera Corporation ST3215SB32768C0HPWBB 7 pF crystal mounted on the 32.768 kHz crystal footprint on revision 5 of ATmega4809 Curiosity Nano.

© 2020 Microchip Technology Inc. User Guide DS50002804B-page 29 ATmega4809 Curiosity Nano Document Revision History

6. Document Revision History

Doc. rev. Date Comment B 10/2020 New hardware revisions A 10/2018 Initial document release

© 2020 Microchip Technology Inc. User Guide DS50002804B-page 30 ATmega4809 Curiosity Nano Appendix

7. Appendix

7.1 Schematic Figure 7-1. ATmega4809 Curiosity Nano Schematic B C D A 2 of 4 of 2 17.08.2020 Altium.com Designed with Designed Date: Page: 8 8

PD7_AIN7 PD6_AIN6 PD5_AIN5 PD4_TCA0WO4 PD3_TCA0WO3 PD2_AIN2 PD1_AIN1 PD0_AIN0 PC7 PC6 PC5 PC4 PB5 PB4 PF5 PF4 PF3 PF2 PF6 UPDI PF1_TOSC2 PF0_TOSC1

100k R200 VCC_TARGET RESET Pull RESET

J202 J204

DBG0

DBG3 Revision: PCB VOFF GND VCC_EDGE GND GND J207 J208 VBUS 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 0-048 7 A09-3094 A08-2838 5 5 5 7 6 4 7 6 4 7 6 4 VCC GND GND GND VOFF DBG3 DBG0 VBUS ADC1 ADC5 ADC7 ADC6 ADC2 ADC0 PWM 3 PWM PWM 4 PWM 7 7 TARGET DEBUGGER RESERVED ID RX CDC CDC TX DBG1 DBG2 0 TX RX 1 SDA2 SCL 3 MOSI 4 MISO 5 SCK 6 SS 7 GND (TX)0 (RX) 1 2 3 0 1 2 3 GND 0 1 2 3 J200 CNANO56-pin edge connector PCB Number: C sebyNme:PCBA Revision: PCB Assembly Number: 1 2 4 7 8 3 5 6 9 10 11 12 14 17 18 20 21 22 24 27 28 13 15 16 19 23 25 26 NC A3

ATmega4809_Curiosity_Nano_Target_MCU.SchDoc

NOTE on UART/CDC: the denotes header the on RX/TX signal of the direction input/output respective source. to it's DEBUGGER. CDC TX is output from the DEBUGGER. the to input is RX CDC from output TX is the TARGET device. RX is input to the TARGET device. NOTE on I2C: be should Pull-ups board. on pull-ups No mounted slave device(s). to close ID_SYS

CDC_RX Microchip Norway Engineer: HN/TF Project Title Nano ATmega4809Curiosity Sheet Title Target MCU Size File: Drawn By: Drawn

CDC_TX

DBG1 DBG2 GND GND J201 J203 J205 J206 TX RX UART 6 6 PB0_UART3_TX PB1_UART3_RX PF3 PF2 PA0_UART0_TX PA1_UART0_RX PA2_I2C_SDA PA3_I2C_SCL PA4_SPI_MOSI PA5_SPI_MISO PA6_SPI_SCK PA7_SPI_SS PC0_UART1_TX PC1_UART1_RX PC2 PC3 PB0_UART3_TX PB1_UART3_RX PB2 PB3 PE0 PE1 PE2 PE3 CDC_UART DBG0 DBG1 DBG2 DBG3 VOFF ID_SYS DEBUGGER CONNECTIONS DEBUGGER PB1 PB0 UPDI PF3 PF2 PF6 ATmega4809 aePin Name UART3 RX UART3 TX UPDI GPIO1 GPIO0 RESET 5 5 Debugger TX CDC RX CDC DBG0 DBG1 1.8V - 5.5V DBG2 DBG3 VTG GND VCC_TARGET C201 100n L200 BLM18PG471SN1 NOTE on Crystal calculations: Crystal on NOTE crystal a on based are calculations The board. this of revision earlier an on used datasheet: Crystal = 7pF Ccrystal max ESR = 70kOhm ±20ppm Accuracy ATmega4809 datasheet: 5.5pF = Cxin = 5.5pF Cxout 2.75pF ≈ ) (1/5.5pF) (1/5.5pF)+ 1/( ≈ Cl Maximum12.5pF = Load Maximum ESR = 80kOhm 0.5pF Estimated= Cpcb Estimatedload Cpcb) - Cpara (Ccrystal- 2 = C 0.5pF) - 2.75pF - (7pF 2 = C 7.5pF = C Selected after verification in design C= 10/13pF

C204 13pF

PF1_TOSC2 XOUT J211 N.M GND PF2 PF1_TOSC2 PF0_TOSC1 PE3 PE2 PE1 PE0 PD7_AIN7 PD6_AIN6 PD5_AIN5 4 4 33 26 25 28 35 34 36 32 31 30 27 29 J209 PF2 PE2 PE1 PE0 PD7 PE3 PD6 PD5 GND AVDD N.M XC200

U200 ATmega4809-AFR

32.768kHz PF3

VCC_TARGET PD4

32kHz Crystal 32kHz 37 24 PF3 PD4_TCA0WO4

(TOSC2)PF1 (TOSC1)PF0 J210 C203 10p PF4 PD3

38 23 PD3_TCA0WO3 PF4

PF5 PD2 PF0_TOSC1 XIN

39 22 PD2_AIN2

PF5 N.M

GND PF6 PD1

40 21 PD1_AIN1 PF6

UPDI PD0

41 20 UPDI PD0_AIN0

VDD PC7

42 19 PC7

GND PC6

43 18 PC6

C200 100n (EXTCLK)PA0

PC5 GND

44 17 PC5 PA0_UART0_TX

PA1 PC4

45 16 PA1_UART0_RX PC4

C205 2.2uF PA2 GND

46 15 PA2_I2C_SDA

PA3 VDD

47 14 PA3_I2C_SCL

GND C202 100n PA4 PC3

48 13 PC3 PA4_SPI_MOSI VCC_EDGE GND TARGET BULK TARGET 3 3 ATmega4809 PA5 PA6 PA7 PB0 PB1 PB2 PB3 PB4 PB5 PC0 PC1 PC2 1 2 4 7 8 3 5 6 9

10 11 12 VCC_TARGET

PF5

SML-D12Y1WT86

ELWLED YELLOW

1k

2 1 R203

PA5_SPI_MISO PA6_SPI_SCK PA7_SPI_SS PB0_UART3_TX PB1_UART3_RX PB2 PB3 PB4 PB5 PC0_UART1_TX PC1_UART1_RX PC2 D200 VCC_TARGET USER LED USER

2 2

1k

4 2 PF6

R202

GND SW200 3 1 TS604VM1-035CR USER BUTTON USER 1 1 B C D A

© 2020 Microchip Technology Inc. User Guide DS50002804B-page 31 ATmega4809 Curiosity Nano Appendix B C D A 3 of 4 of 3 18.08.2020 Altium.com Designed with Designed Date: Page: 8 8 UARTRX UART TX - UPDI UPDI GPIO GPIO RESET ID_SYS VCC_P3V3 C101 2.2uF VBUS D- D+ ID GND SHIELD1 SHIELD2 SHIELD3 SHIELD4 C Revision: PCB J105 VCC_P3V3 GND MU-MB0142AB2-269 1 2 4 7 8 3 5 6 9 2 AGTTARGET TARGET UARTRX UART TX PTC Resettable fuse: PTC Resettable Hold current: 500mA Trip current: 1000mA ICSP DAT CLK GPIO MCLR 5 1 2

MIC5528: Vin:5.5V 2.5V to Vout: 3.3V Fixed Imax: 500mA Dropout: 260mV @ 500mA SHIELD 1k

NC 0-048 7 A09-3094 A08-2838 R112

GND VOUT VOUT

EP

Interface USBD_N USBD_P 7 D100 GREEN LED VCC_P3V3

SML-P12MTT86R CDC TX CDC RX CDC - VCC Signal DBG0 DBG1 DBG2 DBG3

1 VCC_VBUS

GND

GND 3 MIC5528-3.3YMT 7 7 VIN EN ID_SYS U101 4 6 1k C sebyNme:PCBA Revision: PCB Assembly Number: PCB Number: R107 F100 MC36213 GND A3 ATmega4809_Curiosity_Nano_DEBUGGER.SchDoc VCC_VBUS C100 4.7uF Microchip Norway Engineer: HN/TF Project Title Nano ATmega4809Curiosity Sheet Title Debugger Size File: Drawn By: Drawn VBUS DEBUGGER REGULATOR DEBUGGER LED POWER/STATUS DEBUGGER CONNECTOR USB MICRO-B DEBUGGER PIN ID 6 6 GND SRST C104 100n USBD_P USBD_N ID_SYS CDC_TX_CTRL VOFF CDC_RX_CTRL VTG_EN DBG3_CTRL TP101 GND GND 21 18 23 22 33 24 19 20 17 STATUS_LED TP100 GND VCC_P3V3 PAD PA22 PA17 PA18 PA19 PA16 U100 SAMD21E18A-MUT

2 4 6 8 10

PA27 PA15

BOOT 25 16 DBG1_CTRL

RESETN PA14

USB_DM/PA24 USB_DP/PA25 26 15 SRST DBG0_CTRL

USB_SOF/PA23 PA28 PA11

27 14 VBUS_ADC

GND

GND PA10 SRST

VTref TRST

28 13 REG_ENABLE

VDDCORE PA09

GND 29 12 DBG2_GPIO

VDDIN PA08

30 11

TCK TDO TMS GND Vsup TDI DBG2_CTRL

SWDCLK/PA30 GND

J102 Testpoint Array 31

5 10 5 SWDIO/PA31 VDDANA

32 1 7 9 3 5 9 VCC_P3V3 C108 100n VCC_MCU_CORE PA00 PA01 PA02 PA03 PA04 PA05 PA06 PA07 1 2 4 7 8 3 5 6 1u C106 C107 100n SWDIO SWCLK SWCLK SWDIO GND AVR® programming for factory connector programming of DEBUGGER. GND J100: targetof regulators. separation full powerand on-board for from the levelshifters used Cut-strap measurements current - For usingmore anfor externalcut be power could supply, strap this accurate measurements. Leakagemicro the ampere range.backis in through switch the J101: measurement current easy for used be can that pin-header pitch 100mil a 1x2 for is footprint This to the target the LEDmicrocontroller and / Button. footprint: the Touse pin-header a mount and holes, the between track - Cut the MIC5353: Vin:6V 2.6V to Vout:5.1V 1.25V to Imax: 500mA Dropout (typical): 50mV@150mA, 160mV @ 500mA Accuracy:initial 2% Thermal limit and current shutdown Maximum output voltage voltagethe input voltage is limited by the dropout regulator. and in the (Vmax = Vin dropout) - DEBUGGER TESTPOINT DEBUGGER VCC_P3V3 S0_0_RX S1_0_TX S1_1_RX DAC VTG_ADC RESERVED S0_2_TX S0_3_CLK 1k J101 R108 VCC_EDGE 4 4 VCC_TARGET J100 VCC_P3V3 GND VCC_P3V3 GND VCC_P3V3 GND VCC_P3V3 GND VCC_P3V3 GND DBG3_CTRL 3 3 3 3 3 1 1 1 1 1 2 2 2 2 2 Q101 DMN65D8LFB VCC_LEVEL 1 A A A A A GND C1 A1 B1 GND GND GND GND GND VCCA VCCA VCCA VCCA VCCA

GND

74LVC1T45FW4-7 74LVC1T45FW4-7 74LVC1T45FW4-7 74LVC1T45FW4-7 74LVC1T45FW4-7 3 VOUT VOUT 2 GND VCCB DIR B VCCB DIR B VCCB DIR B VCCB DIR B VCCB DIR B U103 U104 U105 U106 U107 4 4 4 4 4 5 5 5 5 5 6 6 6 6 6 VIN VIN EN U108 MIC94163MIC94163 VTG_ADC DAC

1k

A2 B2 C2 47k R110 3 3

R111

GND VTG_EN VCC_LEVEL VCC_LEVEL VCC_LEVEL VCC_LEVEL VCC_LEVEL

DBG3 OPEN DRAIN OPEN DBG3

47k 47k

R102 R105 GND GND 33k DBG0_CTRL DBG1_CTRL CDC_TX_CTRL CDC_RX_CTRL DBG2_CTRL

R106

C103 2.2uF

47k 27k

R101 R104

GND REG_ADJUST 4 2 5 VCC_REGULATOR GND VOUT

2 2 NC/ADJ MIC5353U102 7 GND GND CDC_TX CDC_RX DBG0 DBG1 DBG2 DBG3 VOFF Adjustable output and limitations: target. to the voltage the output and 5.1V 1.25V adjust between can regulator - The DEBUGGER of the the - The level shifters have a minimalfor voltage limit the and will minimumlevel of 1.65V operating allowed voltage target communication.still allow to the target. a minimal has switch - The output volatege limit and will the minimumlevel of 1.70V voltage delivered to - Firmware configuration will limit the voltagetargetthe the specification. be within range to 0.5%. within to voltage - Firmware output the feedback adjust accuracy loop will VIN EN BYP 1 3 6 C102 100n

GND

47k R103 TX RX

REG_ENABLE

VBUS_ADC

UART

47k 47k

R109 R100 GND 1 1 VCC_VBUS TARGET ADJUSTABLE REGULATOR ADJUSTABLE TARGET DBG0 DBG1 DBG2 DBG3 VOFF CDC_UART B C D A

© 2020 Microchip Technology Inc. User Guide DS50002804B-page 32 ATmega4809 Curiosity Nano Appendix

7.2 Assembly Drawing Figure 7-2. ATmega4809 Curiosity Nano Assembly Drawing Top PAJ20000 COJ200PAJ200056 PAJ200055 PAJ200054 PAJ200053 PAJ200052 PAJ200051 PAJ200050 PAJ200049 PAJ200048 PAJ200047 PAJ200046 PAJ200045 PAJ200044 PAJ200043 PAJ200042 PAJ200041 PAJ200040 PAJ200039 PAJ200038 PAJ200037 PAJ200036 PAJ200035 PAJ200034 PAJ200033 PAJ200032 PAJ200031 PAJ200030 PAJ200029 PAJ10001COJ100 PAJ10002 PAC10002COC100 PAC10001 PAU10103 PAU10102 PAU10101PAU10100 PAC10102 COR103PAR10301 PAR10302 PAC10201COC102 PAC10202 PAR10601COR106 PAR10602 PAF10001 PAU10107 COU101 COC101 PAU10201 PAU10206 PAU1080C2 PAU1080C1 PAC20501 PAU10104 PAU10105 PAU10106 PAC10101 PAR10102 PAR10402 PAL20002 PAC20102 PAU200025 PAU200024 PAU1080B2 PAU1080B1 PAC20302 PAU200026 PAU200023 COF100 PAU10202COU102 PAU10207 PAU10205 COR101 PAC20502COC205 PAJ10101COJ101 PAXC20002 COL200PAC20101COC201 PAU200027 PAU200022 PAJ10506 PAR11001COR110 PAR11002 PAU10203 PAU10204 PAR10101 PAR10401COR104 PAU1080A2COU108 PAU1080A1 PAJ10102 PAL20001 PAU200028 PAU200021 PAF10002 PAR10002 PAR10902 PAC20301COC203 PAJ21002COJ210PAJ21001 PAU200029 PAU200020 COQ101PAQ10103 PAQ10102 PAC10301COC103PAC10302 PAJ20201COJ202 COJ208PAJ20801 PAJ20802PAU200030 PAU200019 PAQ10100PAQ10101 PAC20001 COR100 COR109 PAU10701 PAU10706 PAJ20202 COXC200 PAU200032PAU200031 PAU200018PAU200017 PASW20003 PASW20001 PAR10001 PAR10901 PAU10702PAU10705 PAJ21102COJ211 PAJ21101 PAJ105010PAJ10508 COU107PAU10700 PAU200033 PAU200016 COC200PAC20002 PAU10703PAU10704 PAXC20001 PAC20402 PAJ10501 PAC10402 PAR11102 PAC10802 PAJ20601COJ206 PAJ20602 PAU200035PAU200034COJ207PAJ20701 PAJ20702 PAU200015PAU200014 PAJ10201 PAJ10502PAJ10203 PAJ10205 COC108 PAU10601 PAU10606 PAC20401COC204 PAU200036 PAU200013 PAD20001 PAR20302 PAR20202 COR111 PAU10602PAU10605 COJ102 PAC10401COC104 PAR11101 PAU100016 PAU100015 PAU100014 PAU100013 PAU100012 PAU100011 PAU100010 PAU10009 PAC10801 COU106PAU10600 COJ209PAJ20902PAJ20901 PAJ10503 PAU10603PAU10604 PAJ20501COJ205 COU200 COLABEL1COD200 COJ105 PAU100017 PAU10008 PAJ20502 PAR20301COR203 PAR20201COR202 PAJ10202 PAJ10504PAJ10204 PAJ10206 PAU100018 PAU10007 PAR10802 PAU10501 PAU10506 COSW200 PAU10502PAU10505 PAD20002 PAJ10505 PAU100019 PAU10006 COU105PAU10500 PAJ20401COJ204 PAU200037 PAU200012 PAR10801COR108 PAU10503PAU10504 PAJ20402 PAU100020 PAU10005 PAU200038 PAU200011 COU100 PAU200039 PAU200010 PAJ105011 PAJ10500 PAU100021 PAU10004 PAR10201COR102 PAR10202 PAJ20101COJ201 PAU200040 PAU20009 PAJ10509 PAU100022 PAU100033 PAU10003 PAR10502 PAJ20102 PAU200041PAU200042 PAU20007PAU20008 C COTP101 PAU100023PATP10101 PAU10002 COR105 PAU10401 PAU10406 PAU200043 PAU20006 PASW20004 PASW20002 PAU10402PAU10405 PAU100024 PAU10001 PAR10501 COU104PAU10400 PAJ20301COJ203 PAR20002 PAC20201 PAU200044 PAU20005 PAU10403 PAU10404 PAJ20302 PAU200045 PAU20004 PAJ10507 COTP100PATP10001PAU100025 PAU100026 PAU100027 PAU100028 PAU100029 PAU100030 PAU100031 PAU100032 COR200PAR20001COC202 PAC20202 PAU200046 PAU20003 PAU10301 PAU10306 PAU200047 PAU20002 COU103PAU10300PAU10302 PAU10305 PAU200048 PAU20001 PAD10002COD100 PAD10001 PAR11201COR112 PAR11202 PAR10701COR107 PAR10702 COC106PAC10601 PAC10602 PAC10701COC107PAC10702 PAU10303PAU10304 PAJ20001 PAJ20002 PAJ20003 PAJ20004 PAJ20005 PAJ20006 PAJ20007 PAJ20008b PAJ20009 PAJ200010 PAJ200011 PAJ200012 PAJ200013 PAJ200014 PAJ200015 PAJ200016 PAJ200017 PAJ200018 PAJ200019 PAJ200020 PAJ200021 PAJ200022 PAJ200023 PAJ200024 PAJ200025 PAJ200026 PAJ200027 PAJ200028 Figure 7-3. ATmega4809 Curiosity Nano Assembly Drawing Bottom PAJ20000 PAJ20000 PAJ200029 PAJ200029 PAJ200030 PAJ200031 PAJ200032 PAJ200033 PAJ200034 PAJ200035 PAJ200036 PAJ200037 PAJ200038 PAJ200039 PAJ200040 PAJ200041 PAJ200042 PAJ200043 PAJ200044 PAJ200045 PAJ200046 PAJ200047 PAJ200048 PAJ200049 PAJ200050 PAJ200051 PAJ200052 PAJ200053 PAJ200054 PAJ200055 COJ200 PAJ200056 COJ100 PAJ10002 PAJ10001 COJ100 PAU10100 PAU10100 COR106 PAR10602 PAR10601 COR106 PAC10202 PAC10201 COC102 PAR10302 PAR10301 COR103 PAC10102 PAU10101 PAU10102 PAU10103 PAC10001 COC100 PAC10002 PAU10107 PAU10107 PAF10001 PAC20501 PAC20501 PAU1080C1 PAU1080C2 PAU10206 PAU10201 COC101 COU101 PAU200024 PAU200024 PAU200025 PAC20102 PAL20002 PAR10402 PAR10102 PAC10101 PAU10106 PAU10105 PAU10104 PAU200023 PAU200023 PAU200026 PAU1080B1 PAU1080B2 COC201 COC201 PAC20302 COJ101 PAU10205 PAU10202 COU102 PAU200022 PAU200022 PAU200027 PAC20101 COL200 PAXC20002 PAJ10101 PAC20502 COC205 COU108 COR104 COR101 PAU10207 PAR11002 PAR11001 COR110 COF100 PAU200020 PAU200020 PAU200021 PAU200028 PAU200029 PAL20001 PAC20301 COC203 PAJ10102 PAU1080A1 PAU1080A2 PAR10401 PAR10101 PAU10204 PAU10203 PAF10002 PAJ10506 PAU200019 PAU200019 PAU200030 PAJ21001 PAJ21002 COJ210 PAR10902 PAR10002 PAQ10102 PAQ10103 PAC20001 PAC20001 PAJ20802 PAJ20801 COJ208 PAJ20201 COJ202 PAC10302 PAC10301 COC103 PAQ10100 PAQ10101 COQ101 PASW20001 PASW20001 PASW20003 PAU200017 PAU200018 PAU200031 PAU200032 COXC200 PAJ20202 PAU10706 PAU10701 COR109 COR100 COJ211 PAJ21101 PAJ21102 COJ211 PAU10705 PAU10702 PAR10901 PAR10001 COC200 PAC20002 COC200 PAU200016 PAU200033 PAU10700 COU107 PAJ10508 PAJ105010 PAC20402 PAC20402 PAXC20001 PAU10704 PAU10703 PAU200014 PAU200014 PAU200015 PAJ20702 PAJ20701 COJ207 PAU200034 PAU200035 PAJ20602 PAJ20601 COJ206 PAC10802 PAR11102 PAC10402 PAJ10501 PAR20202 PAR20202 PAR20302 PAD20001 PAU200013 PAU200036 PAC20401 COC204 PAU10606 PAU10601 COC108 PAJ10205 PAJ10502 PAJ10203 PAJ10201 PAU10605 PAU10605 PAU10602 COR111 COJ209 PAJ20901 PAJ20902 COJ209 PAU10600 COU106 PAC10801 PAU10009 PAU100010 PAU100011 PAU100012 PAU100013 PAU100014 PAU100015 PAU100016 PAR11101 PAC10401 COC104 COJ102 COLABEL1 COD200 COLABEL1 COU200 PAJ20501 COJ205 PAU10604 PAU10603 PAJ10503 PAR20201 PAR20201 COR202 PAR20301 COR203 PAJ20502 PAU10008 PAU100017 COJ105 COSW200 COSW200 PAU10506 PAU10501 PAR10802 PAU10007 PAU100018 PAJ10206 PAJ10504 PAJ10204 PAJ10202 PAD20002 PAD20002 PAU10505 PAU10502 COJ204 PAJ20401 COJ204 PAU10500 COU105 c PAU10006 PAU100019 PAU200012 PAU200012 PAU200037 PAJ10505 PAJ20402 PAJ20402 PAU10504 PAU10503 PAR10801 COR108 PAU200011 PAU200011 PAU200038 PAU10005 PAU100020 PAU200010 PAU200010 PAU200039 COU100 PAU20009 PAU20009 PAU200040 COJ201 PAJ20101 PAR10202 PAR10201 COR102 PAU10004 PAU100021 PAJ10500 PAJ105011 PAU20008 PAU20008 PAU200041 PAJ20102 PAR10502 PAU10003 PAU100033 PAU100022 PAJ10509 PAU20007 PAU20007 PAU200042 COTP101 PASW20002 PASW20002 PASW20004 PAU20006 PAU200043 PAU10406 PAU10401 COR105 PAU10002 PAU100023 PATP10101 PAU10405 PAU10405 PAU10402 PAU20005 PAU20005 PAU200044 PAC20201 PAR20002 PAJ20301 COJ203 PAU10400 COU104 PAR10501 PAU10001 PAU100024 PAU20004 PAU20004 PAU200045 PAJ20302 PAU10404 PAU10403 t PAU20003 PAU20003 PAU200046 PAC20202 COC202 COR200 R COTP100 PAJ10507 PAR20001 PAR20001 PAU100032 PAU100031 PAU100030 PAU100029 PAU100028 PAU100027 PAU100026 PAU100025 PATP10001 PAU20002 PAU20002 PAU200047 PAU10306 PAU10301 PAU10305 PAU10305 PAU10302 PAU20001 PAU20001 PAU200048 PAU10300 COU103 PAU10304 PAU10304 PAU10303 PAC10702 PAC10701 COC107 PAC10602 PAC10601 COC106 PAR10702 PAR10701 COR107 PAR11202 PAR11201 COR112 PAD10001 PAD10002 COD100 PAJ200028 PAJ200028 PAJ200027 PAJ200026 PAJ200025 PAJ200024 PAJ200023 PAJ200022 PAJ200021 PAJ200020 PAJ200019 PAJ200018 PAJ200017 PAJ200016 PAJ200015 PAJ200014 PAJ200013 PAJ200012 PAJ200011 PAJ200010 PAJ20009 PAJ20008 PAJ20007 PAJ20006 PAJ20005 PAJ20004 PAJ20003 PAJ20002 PAJ20001

© 2020 Microchip Technology Inc. User Guide DS50002804B-page 33 ATmega4809 Curiosity Nano Appendix

7.3 Curiosity Nano Base for Click boards™ Figure 7-4. ATmega4809 Curiosity Nano Pinout Mapping PC4 PA3 PA2 +5V GND PD5 PA1 PA0 PC7 3 EXT1 2 1 920 19 DGND ID D PD2 PC5 PD5 PD1 PC0 PC3 PA4 PD4 PA6 PC2 +3.3V PC1 PC6 PA5 GND A PA3 PA2 NPWM INT RX TX SCL AN SDA RST +5V CS GND SCK MISO MOSI +3.3V GND TM Xplained Pro Extension PD2 PC5 PC7 PA6 PA5 PA4 GND +3.3V PD6 PA3 PA2 +5V GND PC2 PA3 PA2 +5V GND PD3 PA1 PA0 PD4 PC1 PC0 for Click boards Curiosity Nano Base 1 2 NPWM INT RX TX SCL AN SDA RST +5V CS GND SCK MISO MOSI +3.3V GND PWM INT RX TX SCL AN SDA RST +5V CS GND SCK MISO MOSI +3.3V GND PD0 PD7 PA7 PA6 PA5 PA4 GND PD1 PC3 PC6 PA6 PA5 PA4 GND +3.3V +3.3V TCA0 WO5 TCA0 WO4 TCA0 WO3 TCA0 Port PWM Power Ground pin Shared F SW0 PF6 UPDI Analog Debug I2C SPI UART Peripheral D AIN7 GND AIN6 VTG AIN5 PD7 AIN4 PD6 AIN3 PD5 AIN2 PD4 AIN1 PD3 AIN0 PD2 PD1 PD0 GND PC7 PC6 TOSC2 PC5 TOSC1 PC4 PF1 PF0 PB5 LED0 PB4 GND PF5 PF4 PF3 PF2 VBUS VOFF DBG3 DBG0

VBUS DBG3 GND PD7 PD5 PD3 PD1 GND PC6 PC4 PF0 PB4 PF5 PF3 VOFF DBG0 VTG PD6 PD4 PD2 PD0 PC7 PC5 PF1 PB5 GND PF4 PF2 USB SW0 LED0 ATmega4809 DEBUGGER DEBUGGER ATmega4809 PS LED ID CDC TX DBG2 PA1 PA3 PA5 PA7 PC0 PC2 PB0 PB2 GND PE1 PE3 NC CDC RX DBG1 PA0 PA2 PA4 PA6 GND PC1 PC3 PB1 PB3 PE0 PE2 NC ID PA0 PA1 PA2 PA3 PA4 PA5 PA6 PA7 GND PC0 PC1 PC2 PC3 PB0 PB1 PB2 PB3 GND PE0 PE1 PE2 PE3 DBG1 DBG2 CDC RX CDC TX CDC PF3 PF2 SPI0 SS SPI0 TWI0 SDA TWI0 SCL TWI0 SCK SPI0 Curiosity Nano SPI0 MOSI SPI0 MISO SPI0 USART3 TX USART3 RX USART3 USART0 TX USART0 RX USART0 TX USART1 RX USART1 TX USART3 RX USART3 ATmega4809 PB0 PB1 CDC RX CDC TX CDC

© 2020 Microchip Technology Inc. User Guide DS50002804B-page 34 ATmega4809 Curiosity Nano Appendix

7.4 Disconnecting the On-Board Debugger The on-board debugger and level shifters can be completely disconnected from the ATmega4809. The block diagram below shows all connections between the debugger and the ATmega4809. The rounded boxes represent connections to the board edge. The signal names shown are also printed in silkscreen on the bottom side of the board. To disconnect the debugger, cut the straps shown in Figure 7-6.

Attention: Cutting the GPIO straps to the on-board debugger will disable the virtual serial port, programming, debugging, and data streaming. Cutting the power supply strap will disconnect the on-board power supply.

Tip: Any connection that is cut can be reconnected using solder. Alternatively, a 0Ω 0402 resistor can be mounted.

Tip: When the debugger is disconnected, an external debugger can be connected to holes shown in Figure 7-6. Details about connecting an external debugger are described in 3.6 Connecting External Debuggers.

Figure 7-5. On-Board Debugger Connections Block Diagram VBUS VOFF VTG

VBUS Power Supply strap Target Power strap USB LDO VCC_EDGE

LDO VCC_TARGET

VCC_P3V3 VCC_LEVEL

GPIO straps PA04/PA06 DBG0 PA07 DBG1 R

E PA08 DBG2 G

G PA16 Level-Shift DBG3 TARGET U

B PA00 CDC TX UART RX E

D PA01 CDC RX UART TX DIR x 5

CDC RX DBG0 CDC TX DBG1 DBG2 DBG3

© 2020 Microchip Technology Inc. User Guide DS50002804B-page 35 ATmega4809 Curiosity Nano Appendix

Figure 7-6. On-Board Debugger Connection Cut Straps

GPIO straps (bottom side) Power Supply strap (top side)

7.5 Getting Started with IAR™ IAR Embedded Workbench® for AVR® is a proprietary high-efficiency compiler not based on GCC. Programming and debugging of ATmega4809 Curiosity Nano is supported in IAR™ Embedded Workbench for AVR using the Atmel-ICE interface. Some initial settings must be set up in the project to get the programming and debugging to work. The following steps will explain how to get your project ready for programming and debugging: 1. Make sure you have opened the project you want to configure. Open the OPTIONS dialog for the project. 2. In the category General Options, select the Target tab. Select the device for the project, or if not listed, the core of the device, as shown in Figure 7-7. 3. In the category Debugger, select the Setup tab. Select Atmel-ICE as the driver, as shown in Figure 7-8. 4. In the category Debugger > Atmel-ICE, select the Atmel-ICE 1 tab. Select UPDI as the interface and, optionally, select the UPDI frequency, as shown in Figure 7-9.

Info: If the selection of Debug Port (mentioned in step 4) is grayed out, the interface is preselected, and the user can skip this configuration step.

© 2020 Microchip Technology Inc. User Guide DS50002804B-page 36 ATmega4809 Curiosity Nano Appendix

Figure 7-7. Select Target Device

Figure 7-8. Select Debugger

© 2020 Microchip Technology Inc. User Guide DS50002804B-page 37 ATmega4809 Curiosity Nano Appendix

Figure 7-9. Configure Interface

© 2020 Microchip Technology Inc. User Guide DS50002804B-page 38 ATmega4809 Curiosity Nano

The Microchip Website

Microchip provides online support via our website at www.microchip.com/. This website is used to make files and information easily available to customers. Some of the content available includes: • Product Support – Data sheets and errata, application notes and sample programs, design resources, user’s guides and hardware support documents, latest software releases and archived software • General Technical Support – Frequently Asked Questions (FAQs), technical support requests, online discussion groups, Microchip design partner program member listing • Business of Microchip – Product selector and ordering guides, latest Microchip press releases, listing of seminars and events, listings of Microchip sales offices, distributors and factory representatives

Product Change Notification Service

Microchip’s product change notification service helps keep customers current on Microchip products. Subscribers will receive email notification whenever there are changes, updates, revisions or errata related to a specified product family or development tool of interest. To register, go to www.microchip.com/pcn and follow the registration instructions.

Customer Support

Users of Microchip products can receive assistance through several channels: • Distributor or Representative • Local Sales Office • Embedded Solutions Engineer (ESE) • Technical Support Customers should contact their distributor, representative or ESE for support. Local sales offices are also available to help customers. A listing of sales offices and locations is included in this document. Technical support is available through the website at: www.microchip.com/support

Microchip Devices Code Protection Feature

Note the following details of the code protection feature on Microchip devices: • Microchip products meet the specifications contained in their particular Microchip Data Sheet. • Microchip believes that its family of products is secure when used in the intended manner and under normal conditions. • There are dishonest and possibly illegal methods being used in attempts to breach the code protection features of the Microchip devices. We believe that these methods require using the Microchip products in a manner outside the operating specifications contained in Microchip’s Data Sheets. Attempts to breach these code protection features, most likely, cannot be accomplished without violating Microchip’s intellectual property rights. • Microchip is willing to work with any customer who is concerned about the integrity of its code. • Neither Microchip nor any other semiconductor manufacturer can guarantee the security of its code. Code protection does not mean that we are guaranteeing the product is “unbreakable.” Code protection is constantly evolving. We at Microchip are committed to continuously improving the code protection features of our products. Attempts to break Microchip’s code protection feature may be a violation of the Digital Millennium Copyright Act. If such acts allow unauthorized access to your software or other copyrighted work, you may have a right to sue for relief under that Act.

© 2020 Microchip Technology Inc. User Guide DS50002804B-page 39 ATmega4809 Curiosity Nano

Legal Notice

Information contained in this publication is provided for the sole purpose of designing with and using Microchip products. Information regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. THIS INFORMATION IS PROVIDED BY MICROCHIP “AS IS”. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION INCLUDING BUT NOT LIMITED TO ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE OR WARRANTIES RELATED TO ITS CONDITION, QUALITY, OR PERFORMANCE. IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND WHATSOEVER RELATED TO THE INFORMATION OR ITS USE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN ANY WAY RELATED TO THE INFORMATION OR ITS USE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THE INFORMATION. Use of Microchip devices in life support and/or safety applications is entirely at the buyer’s risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights unless otherwise stated.

Trademarks

The Microchip name and logo, the Microchip logo, Adaptec, AnyRate, AVR, AVR logo, AVR Freaks, BesTime, BitCloud, chipKIT, chipKIT logo, CryptoMemory, CryptoRF, dsPIC, FlashFlex, flexPWR, HELDO, IGLOO, JukeBlox, KeeLoq, Kleer, LANCheck, LinkMD, maXStylus, maXTouch, MediaLB, megaAVR, Microsemi, Microsemi logo, MOST, MOST logo, MPLAB, OptoLyzer, PackeTime, PIC, picoPower, PICSTART, PIC32 logo, PolarFire, Prochip Designer, QTouch, SAM-BA, SenGenuity, SpyNIC, SST, SST Logo, SuperFlash, Symmetricom, SyncServer, Tachyon, TempTrackr, TimeSource, tinyAVR, UNI/O, Vectron, and XMEGA are registered trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. APT, ClockWorks, The Embedded Control Solutions Company, EtherSynch, FlashTec, Hyper Speed Control, HyperLight Load, IntelliMOS, Libero, motorBench, mTouch, Powermite 3, Precision Edge, ProASIC, ProASIC Plus, ProASIC Plus logo, Quiet-Wire, SmartFusion, SyncWorld, Temux, TimeCesium, TimeHub, TimePictra, TimeProvider, Vite, WinPath, and ZL are registered trademarks of Microchip Technology Incorporated in the U.S.A. Adjacent Key Suppression, AKS, Analog-for-the-Digital Age, Any Capacitor, AnyIn, AnyOut, BlueSky, BodyCom, CodeGuard, CryptoAuthentication, CryptoAutomotive, CryptoCompanion, CryptoController, dsPICDEM, dsPICDEM.net, Dynamic Average Matching, DAM, ECAN, EtherGREEN, In-Circuit Serial Programming, ICSP, INICnet, Inter-Chip Connectivity, JitterBlocker, KleerNet, KleerNet logo, memBrain, Mindi, MiWi, MPASM, MPF, MPLAB Certified logo, MPLIB, MPLINK, MultiTRAK, NetDetach, Omniscient Code Generation, PICDEM, PICDEM.net, PICkit, PICtail, PowerSmart, PureSilicon, QMatrix, REAL ICE, Ripple Blocker, SAM-ICE, Serial Quad I/O, SMART-I.S., SQI, SuperSwitcher, SuperSwitcher II, Total Endurance, TSHARC, USBCheck, VariSense, ViewSpan, WiperLock, Wireless DNA, and ZENA are trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. SQTP is a service mark of Microchip Technology Incorporated in the U.S.A. The Adaptec logo, Frequency on Demand, Silicon Storage Technology, and Symmcom are registered trademarks of Microchip Technology Inc. in other countries. GestIC is a registered trademark of Microchip Technology Germany II GmbH & Co. KG, a subsidiary of Microchip Technology Inc., in other countries. All other trademarks mentioned herein are property of their respective companies. © 2020, Microchip Technology Incorporated, Printed in the U.S.A., All Rights Reserved. ISBN: 978-1-5224-6796-0

© 2020 Microchip Technology Inc. User Guide DS50002804B-page 40 ATmega4809 Curiosity Nano

Quality Management System

For information regarding Microchip’s Quality Management Systems, please visit www.microchip.com/quality.

© 2020 Microchip Technology Inc. User Guide DS50002804B-page 41 Worldwide Sales and Service

AMERICAS ASIA/PACIFIC ASIA/PACIFIC EUROPE Corporate Office Australia - Sydney India - Bangalore Austria - Wels 2355 West Chandler Blvd. Tel: 61-2-9868-6733 Tel: 91-80-3090-4444 Tel: 43-7242-2244-39 Chandler, AZ 85224-6199 China - Beijing India - New Delhi Fax: 43-7242-2244-393 Tel: 480-792-7200 Tel: 86-10-8569-7000 Tel: 91-11-4160-8631 Denmark - Copenhagen Fax: 480-792-7277 China - Chengdu India - Pune Tel: 45-4485-5910 Technical Support: Tel: 86-28-8665-5511 Tel: 91-20-4121-0141 Fax: 45-4485-2829 www.microchip.com/support China - Chongqing Japan - Osaka Finland - Espoo Web Address: Tel: 86-23-8980-9588 Tel: 81-6-6152-7160 Tel: 358-9-4520-820 www.microchip.com China - Dongguan Japan - Tokyo France - Paris Atlanta Tel: 86-769-8702-9880 Tel: 81-3-6880- 3770 Tel: 33-1-69-53-63-20 Duluth, GA China - Guangzhou Korea - Daegu Fax: 33-1-69-30-90-79 Tel: 678-957-9614 Tel: 86-20-8755-8029 Tel: 82-53-744-4301 Germany - Garching Fax: 678-957-1455 China - Hangzhou Korea - Seoul Tel: 49-8931-9700 Austin, TX Tel: 86-571-8792-8115 Tel: 82-2-554-7200 Germany - Haan Tel: 512-257-3370 China - Hong Kong SAR Malaysia - Kuala Lumpur Tel: 49-2129-3766400 Boston Tel: 852-2943-5100 Tel: 60-3-7651-7906 Germany - Heilbronn Westborough, MA China - Nanjing Malaysia - Penang Tel: 49-7131-72400 Tel: 774-760-0087 Tel: 86-25-8473-2460 Tel: 60-4-227-8870 Germany - Karlsruhe Fax: 774-760-0088 China - Qingdao Philippines - Manila Tel: 49-721-625370 Chicago Tel: 86-532-8502-7355 Tel: 63-2-634-9065 Germany - Munich Itasca, IL China - Shanghai Singapore Tel: 49-89-627-144-0 Tel: 630-285-0071 Tel: 86-21-3326-8000 Tel: 65-6334-8870 Fax: 49-89-627-144-44 Fax: 630-285-0075 China - Shenyang Taiwan - Hsin Chu Germany - Rosenheim Dallas Tel: 86-24-2334-2829 Tel: 886-3-577-8366 Tel: 49-8031-354-560 Addison, TX China - Shenzhen Taiwan - Kaohsiung Israel - Ra’anana Tel: 972-818-7423 Tel: 86-755-8864-2200 Tel: 886-7-213-7830 Tel: 972-9-744-7705 Fax: 972-818-2924 China - Suzhou Taiwan - Taipei Italy - Milan Detroit Tel: 86-186-6233-1526 Tel: 886-2-2508-8600 Tel: 39-0331-742611 Novi, MI China - Wuhan Thailand - Bangkok Fax: 39-0331-466781 Tel: 248-848-4000 Tel: 86-27-5980-5300 Tel: 66-2-694-1351 Italy - Padova Houston, TX China - Xian Vietnam - Ho Chi Minh Tel: 39-049-7625286 Tel: 281-894-5983 Tel: 86-29-8833-7252 Tel: 84-28-5448-2100 Netherlands - Drunen Indianapolis China - Xiamen Tel: 31-416-690399 Noblesville, IN Tel: 86-592-2388138 Fax: 31-416-690340 Tel: 317-773-8323 China - Zhuhai Norway - Trondheim Fax: 317-773-5453 Tel: 86-756-3210040 Tel: 47-72884388 Tel: 317-536-2380 Poland - Warsaw Los Angeles Tel: 48-22-3325737 Mission Viejo, CA Romania - Bucharest Tel: 949-462-9523 Tel: 40-21-407-87-50 Fax: 949-462-9608 Spain - Madrid Tel: 951-273-7800 Tel: 34-91-708-08-90 Raleigh, NC Fax: 34-91-708-08-91 Tel: 919-844-7510 Sweden - Gothenberg New York, NY Tel: 46-31-704-60-40 Tel: 631-435-6000 Sweden - Stockholm San Jose, CA Tel: 46-8-5090-4654 Tel: 408-735-9110 UK - Wokingham Tel: 408-436-4270 Tel: 44-118-921-5800 Canada - Toronto Fax: 44-118-921-5820 Tel: 905-695-1980 Fax: 905-695-2078

© 2020 Microchip Technology Inc. User Guide DS50002804B-page 42