11.3.5 debugWIRE Related

  • debugWIRE communication is lost when part code forces the part into reset. BOD, WDT, or other reset sources cause the part to lose debugWIRE communication. High voltage programming is required to get communication re-established.

  • If a breakpoint is set at the last address of program memory, it is not possible to continue executing after reaching that breakpoint. Stepping or run will not cause the part to run. The instruction at the breakpoint will not be executed after breaking once.

  • Stepping over the end of a non-terminated source code will cause the dW to produce error messages. This could be because the part contains code here, which has not been erased. Note that flash pages which are not used are not erased when starting debugging.

  • Do not change the target voltage or frequency during a debug session. The debug session must be terminated first.

  • OSCCAL and CLKPR register cannot be written in the application during debugging. This will cause the Atmel AVR JTAGICE mkII to lose synchronization and Atmel Studio will not be able to communicate with the JTAGICE mkII. Restart the debug session to fix this problem.

  • The PRSPI bit (Power Reduction Serial Peripheral Interface bit) in parts with PRR register (Power Reduction Register) must not be written to 1. If this bit is written to 1 it will disable the clock to the debugWIRE module and all communication between the JTAGICE mkII and the debugWIRE interface will stop. Currently this bug is present in ATmega48/88/168.

  • Inserting too many breakpoints may cause communication to be lost at very low target clock frequencies. When inserting or removing breakpoints, for each Flash page containing a modified breakpoint, the JTAGICE mkII must read, modify, and write the entire Flash page to the target device. When running at very low clock frequencies (kHz range), this may cause Atmel Studio to timeout. Workaround: insert breakpoints in groups, single stepping between inserts.

  • When running off a 128kHz clock source, do not set the CLKDIV8 fuse. This will cause the debug session to fail since the interface speed is too low. The recommended minimum clock speed for successful debugging is 128kHz.

  • Setting the CLKDIV8 fuse can cause connection problems when using debugWIRE. For best results, leave this fuse un-programmed during debugging.