debugWIRE

from Wikipedia, the free encyclopedia

debugWIRE is a serial communication protocol that was developed by the processor manufacturer Atmel . It is used for programming and debugging for Atmel AVR microcontrollers used.

protocol

The proprietary debugWIRE protocol is intended as a simple alternative to JTAG and is used for processors with limited resources - especially few connection pins; most modern 8-bit processors from AVR support the protocol. debugWIRE allows full read and write access to the memory and the monitoring of the program flow. Only those actions can be carried out that are also possible with a normal program sequence. Breakpoints are set by inserting a break opcode (0x9598), this is done by reprogramming the flash memory , which however only allows a limited number of write cycles (guaranteed 10000).

Programming devices

debugWIRE is supported by all current Atmel debuggers , such as B. Atmel-ICE, JTAGICE mkII, JTAGICE3 and AVR Dragon.

Protocol specification

debugWIRE can be activated by programming the fuse bit DWEN (debugWIRE enable), which is located in the "high fuse byte". The / RESET function is then no longer available and programming via ISP is no longer possible. The fuse bits cannot be programmed using debugWIRE; the debugWIRE function must be temporarily switched off by a command so that the debugger can be accessed again via ISP. This is done transparently for the user when using the Atmel-Studio development system . debugWIRE uses serial communication via a one-wire line with open-drain coupling. The standard clock rate is 1/128 of the processor clock. The communication is initiated by sending the break status (all bits 0), as a response the processor to be tested sends the byte 0x55, which consists of alternating zero and one levels. This allows the debugger to easily identify the clock rate.

Individual evidence

  1. AVR Assembler Instructions
  2. ATtiny25-ATtiny45-ATtiny85_Datasheet-Summary.pdf
  3. debugWIRE interface of the AVR Dragon
  4. debugWIRE article
  5. The debugWIRE protocol (English)
  6. Simple stand-alone debug WIRE debugger (open source)

Web links

Advanced Debugging (presentation in English)