XC800 Debugger | 22
©
1989-2021
Lauterbach GmbH
SYStem.Option.TRAPEN
Change the TRAP_EN bit
When the
check box is checked, the debugger sets the TRAP_EN flag in the
Extended Operation (EO) register before executing the next GO command.
•
The XC800 extends the 8051 instruction set with the special command
MOVC @(DPTR++),A
to write data (e.g. from a I2C LPC memory IC) into program RAM. As the 8051 instruction set is
only 8 bit wide, and there were no unused opcodes available, the TRAP opcode 0A5h is re-used
for this instruction.
•
The functionality of the 0A5h opcode is determined by the bit TRAP_EN in the Extended
Operations (EO) register (usually EO.4).
-
When TRAP_EN=1 (set), 0A5h means “TRAP”.
-
When TRAP_EN=0 (reset), 0A5h means “MOVC @(DPTR++),A.
•
This conflicts with the operation of software breakpoints. Software breakpoints are set by
replacing an instruction with a “TRAP“ instruction. When the processor stops in debug mode, the
original instruction is restored. The next STEP or GO command then executes the instruction.
•
Therefore a software breakpoint may be illegally interpreted as an MOVC operation if you
-
disable the TRAP_EN check box.
-
Manually reset the TRAP_EN bit (EO.4)
Format:
SYStem.Option.TRAPEN
[
ON
|
OFF
]
Содержание XC800
Страница 1: ...MANUAL Release 09 2021 XC800 Debugger ...