Technical information
AN2317/D
2 Low-Cost Programming and Debugging Options for M68HC08 MCUs
What is Monitor Mode?
Monitor mode was developed as a feature of the M68HC08 MCU architecture
to provide basic in-circuit debugging, as well as programming of nonvolatile
memories. Monitor mode is not a substitute for full chip emulation, but it allows
a low-cost connection to a host computer, which sends commands serially to
the MCU. These commands perform read and write operations on the MCU’s
registers and memory. The system developer does not have to be concerned
about the monitor commands since these are embedded in the
programming/debugging tools. However, there are some practical limitations
that must be considered when designing a system that will be programmed or
debugged in-circuit using monitor mode.
Monitor mode uses a single I/O pin to communicate with a host PC. This pin is
controlled by the monitor mode firmware in the MCU. The pin is switched
between input and output as it emulates the serial protocol to the PC. This
limitation only applies during monitor mode. As soon as the chip is released
from monitor mode, the pin reverts to its I/O function.
Monitor mode must have a clock frequency that will allow the MCU to match the
serial baud rate of the PC. In most cases the debug connector can provide a
clock signal that can overdrive the crystal on the target board. The
MON08-Cyclone tool mentioned below does this, as well as offering an
“autobaud” function to adapt to the operating frequency of the target.
Several MCU pins must also be biased when configuring an MCU to enter
monitor mode. These pins and their functions are described in later sections.
The host software that communicates with the MCU in-circuit is usually part of
the development tool that the system developer obtains when starting a project.
The development tool vendors all use the M68HC08’s monitor mode as the
preferred debug interface.
Some protection features are disabled in monitor mode. Care must be taken to
understand the operation of the computer operating properly (COP) watchdog,
SWI instruction, and FLASH protection features while in monitor mode.
To use monitor mode for in-circuit programming and debugging, a developer
will need:
• Host software for the personal computer or work station
• A serial cable and pod (serial communications and biasing circuit) that
translates host commands to monitor mode signals
• A suitable connection method on the target application to bias the MCU
into the proper mode
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc
.
..