EasyManua.ls Logo

ROHS MC9S08QE128 - Page 40

Default Icon
345 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Chapter 3 Modes of Operation
MC9S08QE128 MCU Series Reference Manual, Rev. 2
Freescale Semiconductor 41
3.4 Active Background Mode
The active background mode functions are managed through the background debug controller (BDC) in
the HCS08 core. The BDC, together with the on-chip debug module (DBG), provide the means for
analyzing MCU operation during software development.
Active background mode is entered in any of six ways:
When the BKGD/MS pin is low during POR
When the BKGD/MS pin is low immediately after issuing a background debug force reset (see
Section 5.8.3, “System Background Debug Force Reset Register (SBDFR)”)
When a BACKGROUND command is received through the BKGD/MS pin
When a BGND instruction is executed
When encountering a BDC breakpoint
When encountering a DBG breakpoint
After entering active background mode, the CPU is held in a suspended state waiting for serial background
commands rather than executing instructions from the user application program.
Background commands are of two types:
Non-intrusive commands, defined as commands that can be issued while the user program is
running. Non-intrusive commands can be issued through the BKGD pin while the MCU is in run
mode; non-intrusive commands can also be executed when the MCU is in the active background
mode. Non-intrusive commands include:
Memory access commands
Memory-access-with-status commands
BDC register access commands
The BACKGROUND command
Active background commands, which can only be executed while the MCU is in active background
mode. Active background commands include commands to:
Read or write CPU registers
Trace one user program instruction at a time
Leave active background mode to return to the user application program (GO)
The active background mode is used to program a bootloader or user application program into the flash
program memory before the MCU is operated in run mode for the first time. When the MC9S08QE128
Series is shipped from the Freescale Semiconductor factory, the flash program memory is erased by default
unless specifically noted, so there is no program that could be executed in run mode until the flash memory
is initially programmed. The active background mode can also be used to erase and reprogram the flash
memory after it has been previously programmed.
For additional information about the active background mode, refer to the Development Support chapter.

Table of Contents