2 software breakpoints, 3 limitations of on-chip debug – Rainbow Electronics AT89LP216 User Manual

Page 64

Advertising
background image

64

3621A–MICRO–6/06

AT89LP216 [Preliminary]

22.2

Software Breakpoints

The AT89LP216 microcontroller includes a BREAK instruction for implementing program mem-
ory breakpoints in software. A software breakpoint can be inserted manually by placing the
BREAK instruction in the program code. Some emulator systems may allow for automatic inser-
tion/deletion of software breakpoints. The Flash memory must be re-programmed each time a
software breakpoint is changed. Frequent insertions/deletions of software breakpoints will
reduce the data retention of the nonvolatile memory. Devices used for debugging purposes
should not be shipped to end customers. The BREAK instruction is treated as a two-cycle NOP
when OCD is disabled.

22.3

Limitations of On-Chip Debug

The AT89LP216 is a low-cost, low-pincount yet fully-featured microcontroller that multiplexes
several functions on its limited I/O pins. Some device functionality must be sacrificed to provide
resources for On-Chip Debugging. The On-Chip Debug System has the following limitations:

• The Debug Clock pin (DCL) is physically located on that same pin as Port Pin P1.3 and the

External Reset (RST). Therefore, neither P1.3 nor an external reset source may be emulated
when OCD is enabled.

• The Debug Data pin (DDA) is physically located on either the XTAL1/P3.2 or XTAL2/P3.3 pin.

The crystal oscillator is therefore not supported during debug. The user must select either the
Internal RC Oscillator or the External Clock source to provide the system clock. Devices
fused for the crystal oscillator will default to external clock mode when OCD is enabled.

• When using the Internal RC Oscillator during debug, DDA is located on the XTAL1/P3.2 pin.

The INT0 function cannot be emulated in this mode.

• When using the External Clock during debug, DDA is located on the XTAL2/P3.3 pin and the

system clock drives XTAL1/P3.2. The INT0, INT1 and CLKOUT functions cannot be
emulated in this mode.

• The AT89LP216 does not support In-Application Programming and therefore the device must

be reset before changing the program code during debugging. This includes the
insertion/deletion of software breakpoints.

• When using the Watchdog Overflow to generate a break in place of a reset, the state of the

Watchdog will not be reset. An OCD Reset command should be sent to the device prior to
resuming normal execution to ensure correct Watchdog behavior.

Advertising