English
Language : 

MC9S12XD256MAL Datasheet, PDF (574/1348 Pages) Freescale Semiconductor, Inc – Freescale’s Scalable Controller Area Network
Chapter 15 Background Debug Module (S12XBDMV2)
15.3.2.1 BDM Status Register (BDMSTS)
Register Global Address 0x7FFF01
R
W
Reset
Special Single-Chip Mode
Emulation Modes
All Other Modes
7
ENBDM
01
1
0
6
5
BDMACT
0
4
SDV
1
0
0
0
0
0
0
0
0
= Unimplemented, Reserved
3
2
1
0
TRACE
UNSEC
0
CLKSW
0
0
03
0
0
12
0
0
0
0
0
0
= Implemented (do not alter)
0
= Always read zero
1 ENBDM is read as 1 by a debugging environment in special single chip mode when the device is not secured or secured but
fully erased (Flash and EEPROM). This is because the ENBDM bit is set by the standard firmware before a BDM command
can be fully transmitted and executed.
2 CLKSW is read as 1 by a debugging environment in emulation modes when the device is not secured and read as 0 when
secured.
3 UNSEC is read as 1 by a debugging environment in special single chip mode when the device is secured and fully erased,
else it is 0 and can only be read if not secure (see also bit description).
Figure 15-3. BDM Status Register (BDMSTS)
Read: All modes through BDM operation when not secured
Write: All modes through BDM operation when not secured, but subject to the following:
— ENBDM should only be set via a BDM hardware command if the BDM firmware commands
are needed. (This does not apply in special single chip and emulation modes).
— BDMACT can only be set by BDM hardware upon entry into BDM. It can only be cleared by
the standard BDM firmware lookup table upon exit from BDM active mode.
— CLKSW can only be written via BDM hardware WRITE_BD commands.
— All other bits, while writable via BDM hardware or standard BDM firmware write commands,
should only be altered by the BDM hardware or standard firmware lookup table as part of BDM
command execution.
Table 15-2. BDMSTS Field Descriptions
Field
7
ENBDM
Description
Enable BDM — This bit controls whether the BDM is enabled or disabled. When enabled, BDM can be made
active to allow firmware commands to be executed. When disabled, BDM cannot be made active but BDM
hardware commands are still allowed.
0 BDM disabled
1 BDM enabled
Note: ENBDM is set by the firmware out of reset in special single chip mode and by hardware in emulation
modes. In special single chip mode with the device secured, this bit will not be set by the firmware until
after the EEPROM and Flash erase verify tests are complete. In emulation modes with the device
secured, the BDM operations are blocked.
MC9S12XDP512 Data Sheet, Rev. 2.21
574
Freescale Semiconductor