6.1.3 Debug Options

When debugging an Atmel AVR device using Atmel Studio, the 'Tool' tab in the project properties view contains some important configuration options. The options, which need further explanation are:

  • Target Clock Frequency

    Target clock frequency: Accurately setting the target clock frequency is vital to achieve reliable debugging of an Atmel megaAVR device over the JTAG interface. This setting should be less than one fourth of the lowest operating frequency of your AVR target device in the application being debugged.

    Debug sessions on debugWIRE target devices are clocked by the target device itself, and thus no frequency setting is required. The Atmel JTAGICE3 will automatically select the correct baud rate for communicating at the start of a debug session. However, if you are experiencing reliability problems related to a noisy debug environment, it is possible to force the debugWIRE speed to a fraction of its "recommended" setting.

    Debug sessions on AVR XMEGA target devices can be clocked at up to the maximum speed of the device itself (usually 32MHz).

    Debug sessions on AVR UC3 target devices over the JTAG interface can be clocked at up to the maximum speed of the device itself (limited to 33MHz). However, the optimal frequency will be slightly below the current SAB clock on the target device.

    Debug sessions on UC3 target devices over the aWire interface will be automatically tuned to the optimal baud rate by the JTAGICE3 itself. However, if you are experiencing reliability problems related to a noisy debug environment, it is possible to force the aWire speed below a configurable limit.

    Debug sessions on SAM D20 ARM target devices over the SWD interface can be clocked at up to the target CPU clock *10 (limited to 2MHz maximum).

  • Preserve EEPROM

    Select this option to avoid erasing the EEPROM during reprogramming of the target before a debug session.

  • Use External Reset

    If your target application disables the JTAG interface, the external reset must be pulled low during programming. Selecting this option avoids repeatedly being asked whether to use the external reset.