![NXP Semiconductors freescale semiconductor ColdFire MCF51CN128 Series Скачать руководство пользователя страница 448](http://html1.mh-extra.com/html/nxp-semiconductors/freescale-semiconductor-coldfire-mcf51cn128-series/freescale-semiconductor-coldfire-mcf51cn128-series_reference-manual_1721790448.webp)
Version 1 ColdFire Debug (CF1_DEBUG)
MCF51CN128 Reference Manual, Rev. 6
Freescale Semiconductor
20-29
The processor’s run/stop/halt status is always accessible in XCSR[CPUHALT,CPUSTOP]. Additionally,
CSR[27–24] indicate the halt source, showing the highest priority source for multiple halt conditions. This
field is cleared by a read of the CSR. A processor halt due to the PSTB full condition as indicated by
CSR2[PSTH] is also reflected in CSR[BKPT]. The debug GO command clears CSR[26–24] and
CSR2[PSTBH].
20.4.1.2
Background Debug Serial Interface Controller (BDC)
BDC serial communications use a custom serial protocol first introduced on the M68HC12 Family of
microcontrollers and later used in the M68HCS08 family. This protocol assumes that the host knows the
BACKGROUND
command
Pending
BDM disabled or
flash secure
Illegal command response and BACKGROUND command is ignored.
BDM enabled and
flash unsecure
Processor is
running
Halt is made pending in the processor. The processor
samples for pending halt and interrupt conditions
once per instruction. When a pending condition is
asserted, the processor halts execution at the next
sample point.
Processor is
stopped
Processing of the BACKGROUND command is
treated in a special manner. The processor exits the
stopped mode and enters the halted state, at which
point all BDM commands may be exercised. When
restarted, the processor continues by executing the
next sequential instruction (the instruction following
STOP).
PSTB full condition
Pending
PSTB
PSTB obtrusive recording mode pends halt in the processor if the trace
buffer reaches its full threshold (full is defined as before the buffer is
overwritten). When a pending condition is asserted, the processor halts
at the next sample point.
BKGD held low
for
≥
2 bus clocks
after reset negated
for POR or BDM
reset
Immediate
Flash unsecure
Enters debug mode with XCSR[ENBDM, CLKSW] set. The full set of
BDM commands is available and debug can proceed.
If the core is reset into a debug halt condition, the processor’s response
to the GO command depends on the BDM command(s) performed while
it was halted. Specifically, if the PC register was loaded, the GO
command causes the processor to exit halted state and pass control to
the instruction address in the PC, bypassing normal reset exception
processing. If the PC was not loaded, the GO command causes the
processor to exit halted state and continue reset exception processing.
Flash secure
Enters debug mode with XCSR[ENBDM, CLKSW] set. The allowable
commands are limited to the always-available group. A GO command to
start the processor is not allowed. The only recovery actions in this mode
are:
• Issue a BDM reset setting CSR2[BDFR] with CSR2[BDHBR] cleared
and the BKGD pin held high to reset into normal operating mode
• Erase the flash to unsecure the memory and then proceed with debug
• Power cycle the device with the BKGD pin held high to reset into the
normal operating mode
Table 20-23. CPU Halt Sources (continued)
Halt Source
Halt Timing
Description