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.
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 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 I2C interfaces available
•GPIOs for accurate status indication
•Extension board identification
•Indication of power and status through LEDs
•Sleep mode to minimize power consumption
Atmel EDBG [USER GUIDE]
Atmel-42096C-EDBG_User Guide-10/2016
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.
Atmel EDBG [USER GUIDE]
Atmel-42096C-EDBG_User Guide-10/2016
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.
Atmel EDBG [USER GUIDE]
Atmel-42096C-EDBG_User Guide-10/2016
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 through four digital signals; MOSI, MISO, SCK, and
CS. The 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 SPI that it should expect data to be received and/or
sent. If the master expects to receive data from the slave, 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 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 required inter-byte delay is
expected. For sending data to the target device DMA is always used.
4.3. I2C Interface
The Two-Wire Interface (I2C) is connected to through two signals; SDA and SCL. The two-wire interface
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 I2C interface can be configured, but is default set to 0x28.
Communication from the target device to I2C DGI is done by sending the slave address with the write bit,
followed by the data bytes. The master must poll the DGI for data by sending the slave address with the
read bit. Then the DGI will send a 1 byte length, directly followed by the data.
Atmel EDBG [USER GUIDE]
Atmel-42096C-EDBG_User Guide-10/2016
6
Important: An I2C write transaction (could be of length zero) must take place before an I2C
read transaction is acknowledged by the EDBG.
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
•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 TWI-bus. 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 powerup 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 is 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)
Atmel EDBG [USER GUIDE]
Atmel-42096C-EDBG_User Guide-10/2016
7
•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 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.
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.
Atmel EDBG [USER GUIDE]
Atmel-42096C-EDBG_User Guide-10/2016
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 to 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 the table below.
Table 5-1. EDBG LED Control
Operation modePower LEDStatus LED
Normal operationPower LED is lit when power is
applied to the board.
Bootloader mode
(idle)
Bootloader mode
(firmware upgrade)
The power LED and the status LED blinks simultaneously.
The power LED and the status LED blinks in an alternating pattern.
Activity indicator, LED flashes every time
something happens on the EDBG.
Atmel EDBG [USER GUIDE]
Atmel-42096C-EDBG_User Guide-10/2016
9
6. Document Revision History
Doc. Rev.DateComments
42096C10/2016Updated Firmware Release History
42096B02/2014Added details about TWI info interface
42096A02/2013Initial document release
Atmel EDBG [USER GUIDE]
Atmel-42096C-EDBG_User Guide-10/2016
10
7. Firmware Release History
Table 7-1. Public Firmware Revisions
Firmware version
DateRelevant changes
(decimal)
3.3129.09.2016Added support for UPDI interface (tinyX devices)
Atmel®, Atmel logo and combinations thereof, Enabling Unlimited Possibilities®, AVR®, megaAVR®, XMEGA®, and others are registered trademarks or trademarks of
Atmel Corporation in U.S. and other countries. ARM®, ARM Connected® logo, Cortex®, and others are the registered trademarks or 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.
SAFETY-CRITICAL, MILITARY, AND AUTOMOTIVE APPLICATIONS DISCLAIMER: Atmel products are not designed for and will not be used in connection with any
applications where the failure of such products would reasonably be expected to result in significant personal injury or death (“Safety-Critical Applications”) without
an Atmel officer's specific written consent. Safety-Critical Applications include, without limitation, life support devices and systems, equipment or systems for the
operation of nuclear facilities and weapons systems. Atmel products are not designed nor intended for use in military or aerospace applications or environments
unless specifically designated by Atmel as military-grade. Atmel products are not designed nor intended for use in automotive applications unless specifically
designated by Atmel as automotive-grade.
Mouser Electronics
Authorized Distributor
Click to View Pricing, Inventory, Delivery & Lifecycle Information:
Microchip: ATSAM4L8-XSTK
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.