AN2104 Freescale Semiconductor, AN2104 Datasheet - Page 8

no-image

AN2104

Manufacturer Part Number
AN2104
Description
Using Background Debug Mode
Manufacturer
Freescale Semiconductor
Datasheet
Application Note
M68HC12 Operating Modes
8
During exit from the BDM, the user’s register values are restored and a
value is stored in the BDM STATUS register. Then a jump command is
executed to resume execution of the user’s program.
The two basic modes of operation (see
Family are:
If any of the normal operating modes are entered (BKGD high), the BDM
is available, but must be enabled and/or made active.
If the special single-chip mode is selected (BKGD, MODA, and MODB
all low), the BDM comes up enabled and active.
Table 4
determine a specific mode where the port A and port B pins are
configured for different functions.
Freescale Semiconductor, Inc.
For More Information On This Product,
Next the BDM firmware saves the contents of the user’s D register
in another temporary register and then saves the user’s CCR
register in the CCRSAV register.
The BDM firmware then checks the ENBDM bit in the STATUS
register to see if it will be allowed to go into the active BDM. If it is,
the BDM firmware enters a software loop and waits for a valid
firmware command in which to execute. The user’s program
counter (PC), stack pointer (SP), and X and Y registers are not
changed by the BDM firmware, so the user doesn’t need to save
or stack these values.
Normal modes — Provide protection for control registers from
being accidentally modified
Special modes — Allow access to these control registers for
system development and special testing
also shows that the states of the BKGD, MODA, and MODB pins
Go to: www.freescale.com
Table
4) for the M68HC12
AN2104

Related parts for AN2104