User manual

Atmel-ICE [USER GUIDE]
42330A-MCU-07/2014
32
9. Special Considerations
9.1 Atmel AVR XMEGA OCD
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 (IO, 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.
Debugging with sleep for ATxmegaA1 rev H and earlier
There was a bug in the early versions of the ATxmegaA1 family that prevented the OCD to be enabled while
the device was in certain sleep modes. There are two methods to use to get back on the debugging:
Go into the Atmel-ICE Options in the Tools menu and enable "Always activate external reset when
reprogramming device"
Perform a chip erase
The sleep modes that trigger this bug are:
Power-down
Power-save
Standby
Extended standby
9.2 Atmel megaAVR OCD and debugWIRE OCD
IO Peripherals
Most I/O peripherals will continue to run even though the program execution is stopped by a breakpoint.
Example: If a breakpoint is reached during a UART transmission, the transmission will be completed and