AN2497 Freescale Semiconductor / Motorola, AN2497 Datasheet

no-image

AN2497

Manufacturer Part Number
AN2497
Description
HCS08 Background Debug Mode versus HC08 Monitor Mode
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
Application Note
AN2497/D
6/2003
HCS08 Background Debug
Mode versus HC08 Monitor
Mode
By Kazue Kikuchi and John Suchyta
Introduction
8/16 Bit Microcontroller Applications Engineering
Austin, Texas
Motorola’s 8-bit HCS08 Family microcontrollers (MCUs) are upwardly
compatible with the M68HC08 (HC08) Family. The HCS08 Family has an
enhanced CPU core that preserves the HC08 CPU registers and offers
additional improvements for efficiency, compiler support, and development
support.
Regarding microcontroller application development, a good development tool
environment is important to reduce total development time and cost. Users
want to debug their application program under conditions that imitate the actual
setup of their system. Because of that, the capability to debug a user program
in an actual target system is required. This is known as in-circuit debugging.
Furthermore, most new MCUs have nonvolatile memory such as FLASH so
that programming code on the target system is also required. This is known as
in-circuit programming.
To support in-circuit debugging and programming requirements, the HC08
Family has the monitor mode and the HCS08 has the background debug mode
(BDM). The background debug hardware on the HCS08 consists of a
background debug controller (BDC) and debug module (DBG).
This application note has two purposes. The first is to describe the differences
between the HC08 monitor mode and the HCS08 BDM. The second is to
introduce the new BDC feature available in the HCS08 Family.
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
© Motorola, Inc., 2003

Related parts for AN2497

AN2497 Summary of contents

Page 1

... Freescale Semiconductor, Inc. Application Note AN2497/D 6/2003 HCS08 Background Debug Mode versus HC08 Monitor Mode By Kazue Kikuchi and John Suchyta 8/16 Bit Microcontroller Applications Engineering Austin, Texas Introduction Motorola’s 8-bit HCS08 Family microcontrollers (MCUs) are upwardly compatible with the M68HC08 (HC08) Family. The HCS08 Family has an ...

Page 2

... Freescale Semiconductor, Inc. AN2497/D Differences Between HC08 Monitor Mode and HCS08 BDM The HC08 Family has firmware embedded in ROM to support the monitor mode, which is a privileged non-user mode. To enter the monitor mode, specific general-purpose I/O pins must satisfy certain conditions out of reset. A high voltage may also be required on the IRQ pin at the same time ...

Page 3

... For More Information On This Product, Differences Between HC08 Monitor Mode and HCS08 BDM shows the summary of the differences between HC08 monitor and HC08 Monitor Mode Go to: www.freescale.com AN2497/D HCS08 Background Debug Mode Only BKGD pin required No high voltage required Hardware module ...

Page 4

... Freescale Semiconductor, Inc. AN2497/D Table 1. Differences Between HC08 Monitor Mode and HCS08 Background Debug Mode Total 5 commands * User program can be executed from the monitor (RUN) * CPU registers can be accessed Commands indirectly * Memory can be accessed in monitor mode but not while user program is ...

Page 5

... NO CONNECT 3 NO CONNECT 5 Figure 1. BDM Connector HOST PC BDM INTERFACE POD PARALLEL CABLE BDM MULTILINK Figure 2. Typical HCS08 System with BDM Access Go to: www.freescale.com AN2497/D Background Debug Mode Interface Figure 2 shows the BDM 2 GND 4 RESET TARGET SYSTEM 6-PIN BDM CONNECTOR ...

Page 6

... Freescale Semiconductor, Inc. AN2497/D HCS08 Background Debug Controller (BDC) and Registers The major benefit of the BDC is that it does not interfere with normal application resources. It does not share any on-chip peripherals. The single BKGD interface pin is a separate dedicated pin that is not accessible to user programs ...

Page 7

... CPU (the CPU is in stop or wait mode) but also the validity of the read/write data. MOTOROLA HCS08 Background Debug Mode versus HC08 Monitor Mode For More Information On This Product, BDC Commands – Active Background Mode and Non-Intrusive Go to: www.freescale.com AN2497/D 7 ...

Page 8

... Freescale Semiconductor, Inc. AN2497/D Active Background Mode Commands READ_CCR, CPU registers such as accumulator (A), stack pointer (SP), H and X register WRITE_CCR, pair (H:X), program counter (PC) and condition code register (CCR) can be READ_A, WRITE_A, directly read or written by the active background commands. The non-intrusive READ_HX, commands cannot access these registers. ...

Page 9

... The following three methods are used to enter active background mode. MOTOROLA HCS08 Background Debug Mode versus HC08 Monitor Mode For More Information On This Product, Go to: www.freescale.com AN2497/D Background Mode Entry 9 ...

Page 10

... Freescale Semiconductor, Inc. AN2497/D With background mode enabled (ENBDM = 1), the host can send the BACKGROUND command to the BDC and change the operating mode from user program to active background mode. At this point, all of the active background mode and non-intrusive BDC commands can be used by the debugger ...

Page 11

... The above benefits reduce the total development complexity, time, and cost. Furthermore, MCU application developers can build their code in the actual application setup. MOTOROLA HCS08 Background Debug Mode versus HC08 Monitor Mode For More Information On This Product, Figure 4. CodeWarrior Debugger Go to: www.freescale.com AN2497/D Summary 11 ...

Page 12

... MOTOROLA and the Stylized M Logo are registered in the US Patent and Trademark Office. All other product or service names are the property of their respective owners. Motorola, Inc Equal Opportunity/Affirmative Action Employer. © Motorola Inc. 2003 AN2497/D 6/2003 For More Information On This Product, ...

Related keywords