Tip:
Be sure to check the "use external reset" checkbox in both the programming dialog and debug
options dialog in order to allow the Atmel-ICE to assert the RESET line and re-enable the JTAG
interface on devices which are running code which disables the JTAG interface by setting the
JTD bit.
IDR/OCDR events
The IDR (In-out Data Register) is also known as the OCDR (On Chip Debug Register), and is used
extensively by the debugger to read and write information to the MCU when in stopped mode during a
debug session. When the application program in run mode writes a byte of data to the OCDR register of
the AVR device being debugged, the Atmel-ICE reads this value out and displays it in the message
window of the software front-end. The OCDR register is polled every 50ms, so writing to it at a higher
frequency will NOT yield reliable results. When the AVR device loses power while it is being debugged,
spurious OCDR events may be reported. This happens because the Atmel-ICE may still poll the device
as the target voltage drops below the AVR’s minimum operating voltage.
4.4.13. AVR XMEGA Special Considerations
OCD and clocking
When the MCU enters stopped mode, the OCD clock is used as MCU clock. The OCD clock is either the
JTAG TCK if the JTAG interface is being used, or the PDI_CLK if the PDI interface is being used.
I/O modules in stopped mode
In contrast to earlier Atmel megaAVR devices, in XMEGA the I/O modules are stopped in stop mode. This
means that USART transmissions will be interrupted, timers (and PWM) will be stopped.
Hardware breakpoints
There are four hardware breakpoint comparators - two address comparators and two value comparators.
They have certain restrictions:
• All breakpoints must be of the same type (program or data)
• All data breakpoints must be in the same memory area (I/O, SRAM, or XRAM)
• There can only be one breakpoint if address range is used
Here are the different combinations that can be set:
• Two single data or program address breakpoints
• One data or program address range breakpoint
• Two single data address breakpoints with single value compare
• One data breakpoint with address range, value range, or both
Atmel Studio will tell you if the breakpoint can't be set, and why. Data breakpoints have priority over
program breakpoints, if software breakpoints are available.
External reset and PDI physical
The PDI physical interface uses the reset line as clock. While debugging, the reset pullup should be 10k
or more or be removed. Any reset capacitors should be removed. Other external reset sources should be
disconnected.
Atmel Atmel-ICE [USER GUIDE]
Atmel-42330C-Atmel-ICE_User Guide-10/2016
45