Development Support
68HC(9)12DG128
338
Development Support
MOTOROLA
Enabling BDM
lockout
Enabling the BDM lockout feature is only possible in special modes
(SMODN=0) and is accomplished by the following steps.
1.
Remove the SHADOW byte protection by clearing SHPROT bit in
EEPROT register.
Clear NOSHB bit in EEMCR register to make the SHADOW byte
visible at $0FC0.
Program bit 7 of the SHADOW byte like a regular EEPROM
location at address $0FC0 (write $7F into address $0FC0). Do not
program other bits of the SHADOW byte (location $0FC0);
otherwise some regular EEPROM array locations will not be
visible. At the next reset, the SHADOW byte is loaded into the
EEMCR register. NOBDML bit in EEMCR will be cleared and BDM
will not be operational.
Protect the SHADOW byte by setting SHPROT bit in EEPROT
register.
2.
3.
4.
Disabling BDM
lockout
Disabling the BDM lockout is only possible in special modes
(SMODN=0). Follow the same steps as for enabling the BDM lockout,
but erase the SHADOW byte.
At the next reset, the SHADOW byte is loaded into the EEMCR register.
NOBDML bit in EEMCR will be set and BDM becomes operational.
NOTE:
When the BDM lockout is enabled it is not possible to run code from the
reset vector in special single chip mode.
BDM Registers
Seven BDM registers are mapped into the standard 64-Kbyte address
space when BDM is active. Mapping is shown in
Table 54
.
Table 54 BDM registers
Address
Register
$FF00
BDM Instruction Register
$FF01
BDM Status Register
$FF02 – $FF03
BDM Shift Register
$FF04 – $FF05
BDM Address Register
$FF06
BDM CCR Holding Register
10-dev