Version 1 ColdFire Debug (CF1_DEBUG)
MCF51CN128 Reference Manual
,
Rev. 6
20-28
Freescale Semiconductor
Based on these features, BDM is useful for the following reasons:
•
In-circuit emulation is not needed, so physical and electrical characteristics of the system are not
affected.
•
BDM is always available for debugging the system and provides a communication link for
upgrading firmware in existing systems.
•
Provides high-speed memory downloading, especially useful for flash programming
•
Provides absolute control of the processor, and thus the system. This feature allows quick hardware
debugging with the same tool set used for firmware development.
20.4.1.1
CPU Halt
Although certain BDM operations can occur in parallel with CPU operations, unrestricted BDM operation
requires the CPU to be halted. The sources that can cause the CPU to halt are listed below in order of
priority. Recall that the default configuration of the Version 1 ColdFire core (CF1Core) defines the
occurrence of certain exception types to automatically generate a system reset. Some of these fault types
include illegal instructions, privilege errors, address errors, and bus error terminations, with the response
under control of the processor’s CPUCR[ARD, IRD] bits.
Table 20-23. CPU Halt Sources
Halt Source
Halt Timing
Description
Fault-on-fault
Immediate
Refers to the occurrence of any fault while exception processing. For example, a bus error is
signaled during exception stack frame writes or while fetching the first instruction in the
exception service routine.
CPUCR[ARD] = 1 Immediately enters halt.
CPUCR[ARD] = 0 Reset event is initiated.
Hardware
breakpoint trigger
Pending
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.
HALT instruction
Immediate
BDM disabled
CPUCR[IRD] = 0
A reset is initiated since attempted execution of an
illegal instruction
CPUCR[IRD] = 1 An illegal instruction exception is generated.
BDM enabled,
supervisor mode
Processor immediately halts execution at the next instruction sample
point. The processor can be restarted by a BDM GO command.
Execution continues at the instruction after HALT.
BDM enabled,
user mode
CSR[UHE] = 0
CPUCR[IRD] = 0
A reset event is initiated, because a privileged
instruction was attempted in user mode.
CSR[UHE] = 0
CPUCR[IRD] = 1
A privilege violation exception is generated.
CSR[UHE] = 1
Processor immediately halts execution at the next
instruction sample point. The processor can be
restarted by a BDM GO command. Execution
continues at the instruction after HALT.