![](http://datasheet.mmic.net.cn/370000/P9S12XEP100J1VVLR_datasheet_16728329/P9S12XEP100J1VVLR_283.png)
Chapter 7 Background Debug Module (S12XBDMV2)
MC9S12XE-Family Reference Manual Rev. 1.07
Freescale Semiconductor
283
7.3.2.1
BDM Status Register (BDMSTS)
Figure 7-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,
shouldonlybealteredbytheBDMhardwareorstandardfirmwarelookuptableaspartofBDM
command execution.
Register Global Address 0x7FFF01
7
6
5
0
4
3
2
1
0
0
R
ENBDM
BDMACT
SDV
TRACE
CLKSW
UNSEC
W
Reset
Special Single-Chip Mode
0
1
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 (non-volatile memory). 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 if emulation modes available.
1
0
0
0
0
1
2
0
3
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).
0
Emulation Modes
(if modes available)
All Other Modes
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
= Unimplemented, Reserved
= Implemented (do not alter)
0
= Always read zero
Table 7-2. BDMSTS Field Descriptions
Field
Description
7
ENBDM
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. In emulation modes (if modes
available) the ENBDM bit is set by BDM hardware out of reset. In special single chip mode with the device
secured, this bit will not be set by the firmware until after the non-volatile memory erase verify tests are
complete. In emulation modes (if modes available) with the device secured, the BDM operations are
blocked.