3.10.10.4 Software Breakpoints

The debugWIRE supports program memory breakpoints by hardware breakpoints and the AVR BREAK instruction. Setting a breakpoint in AVR Studio sets a breakpoint register, or insert a BREAK instruction in the program memory (ATA8510 only). The instruction replaced by the BREAK instruction is stored. When the program execution is continued, the stored instruction is executed before continuing from the program memory. A break can be inserted manually by putting the BREAK instruction in the program. The Flash must be re-programmed each time a breakpoint is changed. This is automatically handled by AVR Studio through the debugWIRE interface. The use of breakpoints, therefore, reduces the Flash data retention. Devices used for debugging purposes must not be shipped to end customers.