Motorola Espresso Maker MC68340 ユーザーズマニュアル

ページ / 441
MOTOROLA
MC68340 USER’S MANUAL
5- 85
Command Sequence:
 
LS ADDR
"NOT READY"
STACK
RETURN PC
MS ADDR
"NOT READY"
XXX
"ILLEGAL"
NEXT CMD
"NOT READY"
CALL
???
NORMAL 
MODE
XXX
BERR/AERR
NEXT CMD
"NOT READY"
FREEZE
NEGATED
PREFETCH
STARTED
Operand Data:
The 32-bit operand data is the starting location of the patch routine, which is the initial
PC upon exiting BDM.
Result Data:
None
As an example, consider the following code segment. It outputs a character from the
MC68340 serial module channel A.
CHKSTAT:
MOVE.B
SRA,D0
Move serial status to D0
BNE.B CHKSTAT
Loop until condition true
MOVE.B
TBA,OUTPUT
Transmit character
MISSING:
ANDI.B
#3,D0
Check for TxEMP flag
RTS
BDM and the CALL command can be used to patch the code as follows:
1. Breakpoint user program at CHKSTAT
2. Enter BDM
3. Execute CALL command to MISSING
4. Exit BDM
5. Execute MISSING code
6. Return to user program
5.6.2.8.14 Reset Peripherals (RST). RST asserts 
RESET
 for 512 clock cycles. The CPU
is not reset by this command. This command is synonymous with the CPU RESET
instruction.
 
   
  
F
re
e
sc
a
le
 S
e
m
ic
o
n
d
u
c
to
r,
 I
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
 
Freescale Semiconductor, Inc.
For More Information On This Product,
   Go to: www.freescale.com
n
c
.
..