AVR 8-bit Microcontrollers

Embedded Debugger

The ATmega324PB Xplained Pro contains the Atmel Embedded Debugger (EDBG) for on-board debugging. The EDBG is a composite USB device of three interfaces; a debugger, Virtual COM Port, and a Data Gateway Interface (DGI).

Together with Atmel Studio, the EDBG debugger interface can program and debug the ATmega324PB. On ATmega324PB Xplained Pro, the JTAG interface is connected between the EDBG and the ATmega324PB.

The Virtual COM Port is connected to a UART on the ATmega324PB and provides an easy way to communicate with the target application through terminal software. It offers variable baud rate, parity, and stop bit settings. Note that the settings on the ATmega324PB must match the settings given in the terminal software.

Info: The virtual COM port in the EDBG requires the terminal software to set the data terminal ready (DTR) signal to enable the UART pins connected to the ATmega324PB. If the DTR signal is not enabled the UART pins on the EDBG is kept in high-z (tristate) rendering the COM port unusable. The DTR signal is set automatically by some terminal software, but it may have to be manually enabled in your terminal.

The DGI consists of several physical interfaces for communication with the host computer. Communication over the interfaces is bidirectional. It can be used to send events and values from the ATmega324PB or as a generic printf-style data channel. Traffic over the interfaces can be timestamped on the EDBG for more accurate tracing of events. Note that timestamping imposes an overhead that reduces maximal throughput. Atmel Data Visualizer is used to send and receive data through DGI.

The EDBG controls two LEDs on ATmega324PB Xplained Pro; a power LED and a status LED. The table below shows how the LEDs are controlled in different operation modes.

Table 1. EDBG LED Control
Operation mode Power LED Status LED
Normal operation Power LED is lit when power is applied to the board. Activity indicator, LED flashes when any communication happens to the EDBG.
Bootloader mode (idle) The power LED and the status LED blinks simultaneously.
Bootloader mode (firmware upgrade) The power LED and the status LED blinks in an alternating pattern.

For further documentation on the EDBG, see the EDBG User Guide.