USER GUIDE EDBG. Description



Similar documents
SMARTCARD XPRO. Preface. SMART ARM-based Microcontrollers USER GUIDE

APPLICATION NOTE. AT07175: SAM-BA Bootloader for SAM D21. Atmel SAM D21. Introduction. Features

AVR151: Setup and Use of the SPI. Introduction. Features. Atmel AVR 8-bit Microcontroller APPLICATION NOTE

USER GUIDE. ZigBit USB Stick User Guide. Introduction

Atmel AVR4921: ASF - USB Device Stack Differences between ASF V1 and V2. 8-bit Atmel Microcontrollers. Application Note. Features.

AVR1309: Using the XMEGA SPI. 8-bit Microcontrollers. Application Note. Features. 1 Introduction SCK MOSI MISO SS

AVR317: Using the Master SPI Mode of the USART module. 8-bit Microcontrollers. Application Note. Features. Introduction

AVR1510: Xplain training - XMEGA USART. 8-bit Microcontrollers. Application Note. Prerequisites. 1 Introduction

AT15007: Differences between ATmega328/P and ATmega328PB. Introduction. Features. Atmel AVR 8-bit Microcontrollers APPLICATION NOTE

How To Use An Atmel Atmel Avr32848 Demo For Android (32Bit) With A Microcontroller (32B) And An Android Accessory (32D) On A Microcontroller (32Gb) On An Android Phone Or

CryptoAuth Xplained Pro

SAM D21 Xplained Pro. Preface. SMART ARM-based Microcontrollers USER GUIDE

AVR319: Using the USI module for SPI communication. 8-bit Microcontrollers. Application Note. Features. Introduction

AVR1922: Xplain Board Controller Firmware. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

APPLICATION NOTE. Atmel AVR134: Real Time Clock (RTC) Using the Asynchronous Timer. Atmel AVR 8-bit Microcontroller. Introduction.

Atmel AVR4920: ASF - USB Device Stack - Compliance and Performance Figures. Atmel Microcontrollers. Application Note. Features.

APPLICATION NOTE Atmel AT02509: In House Unit with Bluetooth Low Energy Module Hardware User Guide 8-bit Atmel Microcontroller Features Description

Two mechanical buttons Two user LEDs Four expansion headers. Board controller with USB interface. One power LED and one status LED

AT88CK490 Evaluation Kit

Using CryptoMemory in Full I 2 C Compliant Mode. Using CryptoMemory in Full I 2 C Compliant Mode AT88SC0104CA AT88SC0204CA AT88SC0404CA AT88SC0808CA

SAM G55 Xplained Pro. Preface. SMART ARM-based Microcontrollers USER GUIDE

8-bit. Application Note. Microcontrollers. AVR282: USB Firmware Upgrade for AT90USB

QT1 Xplained Pro. Preface. Atmel QTouch USER GUIDE

APPLICATION NOTE. Atmel AT02985: User s Guide for USB-CAN Demo on SAM4E-EK. Atmel AVR 32-bit Microcontroller. Features. Description.

AVR115: Data Logging with Atmel File System on ATmega32U4. Microcontrollers. Application Note. 1 Introduction. Atmel

APPLICATION NOTE. AT16268: JD Smart Cloud Based Smart Plug Getting. Started Guide ATSAMW25. Introduction. Features

Application Note. 8-bit Microcontrollers. AVR270: USB Mouse Demonstration

AVR1900: Getting started with ATxmega128A1 on STK bit Microcontrollers. Application Note. 1 Introduction

APPLICATION NOTE. Atmel AT04389: Connecting SAMD20E to the AT86RF233 Transceiver. Atmel SAMD20. Description. Features

SAM D20 Xplained Pro. Preface. SMART ARM-based Microcontrollers USER GUIDE

AVR1301: Using the XMEGA DAC. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

32-bit AVR UC3 Microcontrollers. 32-bit AtmelAVR Application Note. AVR32769: How to Compile the standalone AVR32 Software Framework in AVR32 Studio V2

Atmel Norway XMEGA Introduction

AVR32701: AVR32AP7 USB Performance. 32-bit Microcontrollers. Application Note. Features. 1 Introduction

Atmel AVR4903: ASF - USB Device HID Mouse Application. Atmel Microcontrollers. Application Note. Features. 1 Introduction

AVR305: Half Duplex Compact Software UART. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

Atmel AT32UC3A3256 microcontroller 64MBit SDRAM Analog input (to ADC) Temperature sensor RC filter

Implementing SPI Master and Slave Functionality Using the Z8 Encore! F083A

SAM4L Xplained Pro. Preface. SMART ARM-based MCUs USER GUIDE

AVR033: Getting Started with the CodeVisionAVR C Compiler. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

AT91SAM ARM-based Flash MCU. Application Note

APPLICATION NOTE. Authentication Counting. Atmel CryptoAuthentication. Features. Introduction

AVR1318: Using the XMEGA built-in AES accelerator. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

Application Note. 8-bit Microcontrollers. AVR272: USB CDC Demonstration UART to USB Bridge

APPLICATION NOTE. Secure Personalization with Transport Key Authentication. ATSHA204A, ATECC108A, and ATECC508A. Introduction.

AN LPC1700 timer triggered memory to GPIO data transfer. Document information. LPC1700, GPIO, DMA, Timer0, Sleep Mode

AVR32788: AVR 32 How to use the SSC in I2S mode. 32-bit Microcontrollers. Application Note. Features. 1 Introduction

APPLICATION NOTE. AT12405: Low Power Sensor Design with PTC. Atmel MCU Integrated Touch. Introduction

Atmel AVR1017: XMEGA - USB Hardware Design Recommendations. 8-bit Atmel Microcontrollers. Application Note. Features.

Atmel Power Line Communications. Solutions for the Smart Grid

AVR106: C Functions for Reading and Writing to Flash Memory. Introduction. Features. AVR 8-bit Microcontrollers APPLICATION NOTE

Introducing a platform to facilitate reliable and highly productive embedded developments

AT12181: ATWINC1500 Wi-Fi Network Controller - AP Provision Mode. Introduction. Features. Atmel SmartConnect APPLICATION NOTE

AVR32138: How to optimize the ADC usage on AT32UC3A0/1, AT32UC3A3 and AT32UC3B0/1 series. 32-bit Microcontrollers. Application Note.

AVR315: Using the TWI Module as I2C Master. Introduction. Features. AVR 8-bit Microcontrollers APPLICATION NOTE

AVR311: Using the TWI Module as I2C Slave. Introduction. Features. AVR 8-bit Microcontrollers APPLICATION NOTE

AVR287: USB Host HID and Mass Storage Demonstration. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

AVR131: Using the AVR s High-speed PWM. Introduction. Features. AVR 8-bit Microcontrollers APPLICATION NOTE

Atmel AVR ATxmega384C3 microcontroller OLED display with pixels resolution Analog sensors. Ambient light sensor Temperature sensor

Designing Feature-Rich User Interfaces for Home and Industrial Controllers

AVR1321: Using the Atmel AVR XMEGA 32-bit Real Time Counter and Battery Backup System. 8-bit Microcontrollers. Application Note.

APPLICATION NOTE. Atmel AT01095: Joystick Game Controller Reference Design. 8-/16-bit Atmel Microcontrollers. Features.

Application Note. Atmel ATSHA204 Authentication Modes. Prerequisites. Overview. Introduction

AND8336. Design Examples of On Board Dual Supply Voltage Logic Translators. Prepared by: Jim Lepkowski ON Semiconductor.

AN10866 LPC1700 secondary USB bootloader

AVR353: Voltage Reference Calibration and Voltage ADC Usage. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

AVR1600: Using the XMEGA Quadrature Decoder. 8-bit Microcontrollers. Application Note. Features. 1 Introduction. Sensors

In-System Programmer USER MANUAL RN-ISP-UM RN-WIFLYCR-UM

PC Base Adapter Daughter Card UART GPIO. Figure 1. ToolStick Development Platform Block Diagram

TCP/IP MODULE CA-ETHR-A INSTALLATION MANUAL

Develop a Dallas 1-Wire Master Using the Z8F1680 Series of MCUs

USER GUIDE. Atmel SAM4S Xplained Pro. Preface

APPLICATION NOTE. Atmel AVR443: Sensor-based Control of Three Phase Brushless DC Motor. Atmel AVR 8-bit Microcontrollers. Features.

Hardware Development Kit

General Porting Considerations. Memory EEPROM XRAM

APPLICATION NOTE. Atmel LF-RFID Kits Overview. Atmel LF-RFID Kit. LF-RFID Kit Introduction

udrive-usd-g1 Embedded DOS micro-drive Module Data Sheet

APPLICATION NOTE. AT05558: Wireless Manufacturing Test Kit. Atmel ATmega256RFR2. Description. Features

AVR125: ADC of tinyavr in Single Ended Mode. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

TURBO PROGRAMMER USB, MMC, SIM DEVELOPMENT KIT

AVR127: Understanding ADC Parameters. Introduction. Features. Atmel 8-bit and 32-bit Microcontrollers APPLICATION NOTE

Arduino Due Back. Warning: Unlike other Arduino boards, the Arduino Due board runs at 3.3V. The maximum. Overview

AN3354 Application note

Serial Communications

Application Note. Atmel CryptoAuthentication Product Uses. Atmel ATSHA204. Abstract. Overview

ES_LPC4357/53/37/33. Errata sheet LPC4357/53/37/33. Document information

APPLICATION NOTE. Atmel AVR600: STK600 Expansion, Routing and Socket Boards. Atmel Microcontrollers. Introduction

Serial Communications

SN 132 SNAPstick QUICK START GUIDE

Atmel SMART ARM Core-based Embedded Microprocessors

AVR030: Getting Started with IAR Embedded Workbench for Atmel AVR. 8-bit Microcontrollers. Application Note. Features.

Complete Integrated Development Platform Copyright Atmel Corporation

SAMA5D2. Scope. Reference Documents. Atmel SMART ARM-based MPU ERRATA

The Atmel-ICE Debugger

Using Xbee in Serial Communication

UG103.8 APPLICATION DEVELOPMENT FUNDAMENTALS: TOOLS

More Secure, Less Costly IoT Edge Node Security Provisioning

MODFLEX MINI GATEWAY ETHERNET USER S GUIDE

AVR134: Real Time Clock (RTC) using the Asynchronous Timer. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

Application Note. 8-bit Microcontrollers. AVR293: USB Composite Device

Transcription:

USER GUIDE EDBG Description The Atmel Embedded Debugger (EDBG) is an onboard debugger for integration into development kits with Atmel MCUs. In addition to programming and debugging support through Atmel Studio, the EDBG offers data streaming capabilities between the host computer and the target MCU.

Table of Contents Description... 1 1. Overview... 3 1.1. Features... 3 2. Programming and Debugging... 4 3. Virtual COM Port... 5 4. Data Gateway Interface... 6 4.1. SPI Interface... 6 4.2. USART Interface... 6 4.3. TWI Interface... 6 4.3.1. Information Interface... 6 4.4. GPIO Interface... 7 4.5. Timestamp module... 8 5. Technical Overview... 9 5.1. Pin Usage... 9 5.2. Power Consumption... 9 5.3. LED Control... 9 6. Document Revision History... 10 2

1. Overview The Atmel Embedded Debugger (EDBG) is an onboard debugger for kits with Atmel devices. EDBG enables the user to debug the target device without an external debugger. EDBG also brings additional features with a Data Gateway Interface (DGI) and a Virtual COM Port for streaming of data to a host PC. The Atmel EDBG will enumerate as a composite USB device with separate interfaces for each function. The Atmel EDBG is embedded on all Xplained Pro evaluation kits. All functionality of the Atmel EDBG is not necessarily available on all kits - the EDBG is factory configured depending on the specific kit capabilities. The configuration is read by Atmel Studio to present the correct capabilities and simplify the user interface. Supported extension boards connected to the kit will be detected by the EDBG and their features are reported to Atmel Studio. 1.1 Features On-board programming and debugging through SWD, JTAG and PDI Virtual COM Port interface to target via UART Data Gateway Interface (DGI) for data streaming between target MCU and PC SPI, USART and TWI interfaces available GPIOs for accurate status indication Extension board identification Indication of power and status through LEDs Sleep mode to minimize power consumption 3

2. Programming and Debugging The Atmel EDBG has the ability to program and debug Atmel AVR and Atmel ARM Cortex -M core based microcontrollers. The following interfaces are supported: Atmel ARM Cortex-M programming and debug interfaces Serial Wire Debug (SWD) Atmel megaavr programming and debug interfaces JTAG Atmel AVR XMEGA programming and debug interfaces Program and Debug Interface (PDI) Refer to the specific kit's user guide for details on connecting the interface. 4

3. Virtual COM Port The EDBG features a CDC class USB interface that implements a Virtual COM Port. A UART connected to a target device is used to enable easy communication between a computer and the target. The following configuration options are implemented Baud Rate: Flexible and accurate settings up to 2Mbps Parity: None, Even, Odd, Mark, Space Stop Bits: 1 bit, 1.5 bits, 2 bits The configuration options must be specified in the terminal application, which will propagate the configuration to the EDBG Virtual COM Port on connection. The target MCU UART must be configured to match the Virtual COM Port. Note that the UART pins of the EDBG are tri-stated when no terminal program is connected to the Virtual COM Port on the computer. This mechanism relies on the terminal program sending a DTR signal. The Virtual COM Port is supported by the terminal extension in Atmel Studio. Most other terminal applications will work as well. 5

4. Data Gateway Interface The Atmel EDBG features an interface for streaming data from the target device to a computer, called the Data Gateway Interface (DGI). This is meant as an aid in debugging and demonstration of features in the application running on the target device. DGI consists of multiple channels for data streaming. The available channels are listed in the sections below. Note that not all interfaces need to be implemented on all kits, and that different kits can implement a different subset of these interfaces. Refer to the specific kit's user guide for details. 4.1 SPI Interface The Serial Peripheral Interface (SPI) is connected to the EDBG DGI through four digital signals; MOSI, MISO, SCK and CS. The EDBG SPI is set to operate in slave mode, meaning that the target device must be set to master mode. The active low CS (Chip Select) line indicates to the EDBG SPI that it should expect data to be received and/or sent. If the master expects to receive data from the slave EDBG DGI, it must poll for them by initiating a transfer. All pins are tri-stated until the interface is activated from the PC and the CS line is driven low. It is possible to configure the mode (clock phase and data setup) of the SPI module. Valid settings are 0-3. The bit count for each transfer can also be set between 5 and 8 bits per transfer. In normal operation, DMA will automatically buffer incoming data transfers. It is also possible to enable timestamping to get a more accurate timing of incoming data. Note that the timestamping will add an overhead to each data transfer, and a lower maximal throughput and a longer required inter-byte delay is expected. For sending data to the target device DMA is always used. 4.2 USART Interface The Universal Synchronous/Asynchronous Receiver/Transmitter (USART) interface is connected to the EDBG DGI through three digital signals; RX, TX and XCK. All pins are tri-stated until the interface is activated from the PC. Both synchronous and asynchronous modes are supported. If operated in asynchronous mode, the correct baud rate setting must be supplied. The baud rate is flexible and is accurate up to 2Mbps. Supported parity settings are none, even, odd, mark and space. Stop bit can be set to 1, 1.5 and 2 stop bits. It is possible to use a transfer size of 5-8 bits. If used in synchronous mode, a clock signal must be supplied by the target device. In normal operation, DMA will automatically buffer incoming data transfers. It is also possible to enable timestamping to get a more accurate timing of incoming data. Note that the timestamping will add an overhead to each data transfer, and a lower maximal throughput and a longer requred inter-byte delay is expected. For sending data to the target device DMA is always used. 4.3 TWI Interface The Two-Wire Interface (TWI) is connected to the EDBG DGI through two signals; SDA and SCL. The two-wire interface of the EDBG is set to slave mode, meaning that communication must be initiated by a target device in master mode. The interface must be enabled from the PC before communication can begin. The slave address of the TWI interface can be configured, but is default set to 0x28. Communication from the target device to the EDBG DGI is done by sending the slave address with the write bit, followed by the data bytes. The master must poll the EDBG DGI for data by sending the slave address with the read bit. Then the EDBG DGI will send a 1 byte length, directly followed by the data. 4.3.1 Information Interface The TWI-bus can be used to request information from the EDBG. This is done by sending a special sequence as described below. START Condition Address + W Request token START Condition (repeated start) Address + R 6

Response... STOP Condition The sequence starts by sending a normal start condition followed by an address byte (default address is 0x28) with the RW bit cleared. Then a request token identifying the requested information is sent. Normally, a received byte would be put into the DGI buffer, but a repeated start will trigger the EDBG to parse the received token. Then an address with the RW bit set. The EDBG will then start to push the requested data onto the TWIbus. All response bytes must be ACKed by the master, and the final byte must be NAKed. 4.3.1.1 Extension Boards Token: 0xE1 The EDBG has 10 pins designated for extension board identification. These pins are sampled on power-up and the extension board identification information is stored. This information can be retrieved by using the Extension Boards token. The first part of the response from this request is a 2 byte BE (1st byte is MSB) extension map containing information of which extension slots are populated. A '1' in bit 0 of the extension map means that EXT1 is populated, a '0' means not populated. If there are extension modules present the 64 byte content of each of the ID chips are sent. It will start with EXT1, if the extension is present it will send the content, otherwise no data is sent. Example: Extension boards are available in EXT2 and EXT5. The response will be 0x00 (Extension map MSB) 0x12 (Extension map MSB) 0x41 'A' (First byte in EXT2 ID content) 0x74 't' (Second byte) 0x6D 'm' (Third byte) 0x65 'e' (Fourth byte) 0x6C 'l' (Fifth byte) 0x53 'S' (Sixth byte)... Remaining 58 bytes 0x41 'A' (First byte in EXT5 ID content) 0x74 't' (Second byte) 0x6D 'm' (Third byte)... Remaining 61 bytes 0x00 (End of data) 4.3.1.2 Kit Data Token: 0xD2 The EDBG has 256 bytes for storing kit-specific data such as MAC address, calibration values etc. See the kit documentation for details on how the data is organized. The information can be retrieved by using the Kit Data token. Note that not all kits have kit-specific data, and the entire section will read as 0. After sending the token, the stored kit-specific data will be sent byte by byte starting with location 0, until a stop condition is detected. 4.4 GPIO Interface Up to four General Purpose Input/Output (GPIO) signals are connected to the EDBG DGI. In input mode, they can be used as a status indication from the target device. In output mode, they can be used as virtual control signals to simulate buttons. 7

The GPIO interface is always timestamped. It is only useful for signals with a relatively slow toggle rate (<250kHz). 4.5 Timestamp module Data received on DGI Interfaces can be routed through the timestamp module to embed timing references into the data stream. The timestamp is implemented as a counter which increments in steps of (32/60) µs, giving a timestamp accuracy of about half a microsecond. The timestamp module does not use DMA since it requires CPU intervention on each data unit received. This implies a lower maximum data throughput and demands a larger delay between each data unit. 8

5. Technical Overview 5.1 Pin Usage All pins that are not in use on the EDBG, will be tri-stated. This is done to avoid signal contention. Note that the tri-stating of serial communication lines and external interference could lead to unintended data to be received by the target MCU. 5.2 Power Consumption During enumeration, the EDBG reports a current consumption of 500mA, and must therefore be connected to a USB host that is capable of supplying this. It is impossible to predict the amount of current required by the setup, since the EDBG is a part of a flexible evaluation kit. The EDBG alone consumes approximately 100mA during usage. When the EDBG does not detect a VBUS voltage, but is otherwise powered (for example through the Xplained Pro PWR header), the EDBG will go into sleep to minimize power consumption. The power consumption during sleep mode will vary with the design, but should be well below 1mA. 5.3 LED Control The EDBG controls two LEDs, the power LED and the status LED. The power LED is on by default when the kit is powered, but can be disabled by the EDBG to lower the power consumption of the kit. The status LED is turned on when a host computer opens a connection the the USB interface. During communication activity the status LED will flash. If the EDBG enters bootloader mode, both the status LED and the power LED will flash simultaneously. When a firmware upgrade is in progress the LEDs will blink alternately. The behavior of the EDBG LEDs is summarized in Table 5-1, EDBG LED control on page 9. Table 5-1. EDBG LED control Operation mode Power LED Status LED Normal operation Bootloader mode (idle) Bootloader mode (firmware upgrade) Power LED is lit when power is applied to the board. Activity indicator, LED flashes every time something happens on the EDBG. The power LED and the status LED blinks simultaneously. The power LED and the status LED blinks in an alternating pattern. 9

6. Document Revision History Document revision Date Comment 42096B 02/2014 Added details about TWI info interface 42096A 02/2013 First release 10

Atmel Corporation 1600 Technology Drive, San Jose, CA 95110 USA T: (+1)(408) 441.0311 F: (+1)(408) 436.4200 www.atmel.com 2014 Atmel Corporation. All rights reserved. / Rev.: Atmel, Atmel logo and combinations thereof, Enabling Unlimited Possibilities, AVR, megaavr, XMEGA, and others are registered trademarks or trademarks of Atmel Corporation or its subsidiaries. ARM and Cortex are registered trademarks of ARM Ltd. Other terms and product names may be trademarks of others. Disclaimer: The information in this document is provided in connection with Atmel products. No license, express or implied, by estoppel or otherwise, to any intellectual property right is granted by this document or in connection with the sale of Atmel products. EXCEPT AS SET FORTH IN THE ATMEL TERMS AND CONDITIONS OF SALES LOCATED ON THE ATMEL WEBSITE, ATMEL ASSUMES NO LIABILITY WHATSOEVER AND DISCLAIMS ANY EXPRESS, IMPLIED OR STATUTORY WARRANTY RELATING TO ITS PRODUCTS INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, CONSEQUENTIAL, PUNITIVE, SPECIAL OR INCIDENTAL DAMAGES (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS AND PROFITS, BUSINESS INTERRUPTION, OR LOSS OF INFORMATION) ARISING OUT OF THE USE OR INABILITY TO USE THIS DOCUMENT, EVEN IF ATMEL HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. Atmel makes no representations or warranties with respect to the accuracy or completeness of the contents of this document and reserves the right to make changes to specifications and products descriptions at any time without notice. Atmel does not make any commitment to update the information contained herein. Unless specifically provided otherwise, Atmel products are not suitable for, and shall not be used in, automotive applications. Atmel products are not intended, authorized, or warranted for use as components in applications intended to support or sustain life.