Motorola MC68340 User Manual page 222

Integrated processor with dma
Hide thumbs Also See for MC68340:
Table of Contents

Advertisement

Command Sequence:
CALL
???
"NOT READY"
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
BNE.B
MOVE.B
MISSING:
ANDI.B
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.
MOTOROLA
Freescale Semiconductor, Inc.
MS ADDR
LS ADDR
"NOT READY"
XXX
NEXT CMD
"ILLEGAL"
"NOT READY"
SRA,D0
CHKSTAT
TBA,OUTPUT
#3,D0
MC68340 USER'S MANUAL
For More Information On This Product,
Go to: www.freescale.com
STACK
RETURN PC
FREEZE
NEGATED
NORMAL
PREFETCH
MODE
STARTED
XXX
BERR/AERR
Move serial status to D0
Loop until condition true
Transmit character
Check for TxEMP flag
NEXT CMD
"NOT READY"
5- 85

Advertisement

Table of Contents
loading

Table of Contents