Renesas M34519T-MCU Manual De Usuario

Descargar
Página de 36
( 27 / 36 )
4.9 Program Execution (G, GB)
The PC4504 and M34519T-MCU's hardware is subject to the following restrictions with respect to
the operation of the program execution commands (G and GB).
(1) Continuous description of instructions
Hardware breakpoints set in a continuous description of instructions following one after another
do not cause a break to occur in the continuous description of instructions. A break occurs only
after fetching the address where the continuous description of instructions is discontinued. (See
Program example 4.3.)
However, a break does occur even in a continuous description of instructions when an external
trigger break or forced break is encountered. For execution to be resumed in this case, you need
to make sure that the execution start address is next to the continuous description of instructions.
(See Program example 4.4.)
Program example 4.3
LA
0
POINT:
LA
1
; Continuous description of instructions
LA
2
POINT+2:
XAM
3
If a break is set at POINT, execution is halted immediately before the XAM instruction at address
POINT+2.
Program example 4.4
LA
0
POINT:
LA
1
; Continuous description of instructions
POINT+1:
LA
2
POINT+2:
XAM
3
If a forced or external trigger break is applied at POINT, execution is halted at POINT +1. When
resuming program execution after the break, make sure that the start address is at POINT+2,
an address immediately after the continuous description of instructions is discontinued.
(2) Skip instructions (e.g. SNZP, INY, DEY, SZB, SEAM, SZC and RTS)
In cases when a skip instruction skips the next instruction, a breakpoint set in the skipped
instruction does not cause execution to halt. (See Program examples 4.5 and 4.6.)
Program example 4.5
LXY
0,0
SZD
POINT:
B
jmp_adr
; Skips when D(0)=0
POINTA:
TAM
0
If a breakpoint is set at address POINT, the program stops before executing the instruction at
POINT when D(0)=1, but does not stop running when D(0)=0 because the instruction at POINT
is skipped. To stop the program immediately after executing a skip instruction, be sure to set
a breakpoint at both POINT and POINT_A.
Program example 4.6
RC
0,0
INY
POINT:
TABP
; Skips when D(0)=0
LA
0
If a break with pass count is set at address POINT, the count is taken and execution is halted
only when the instruction at address POINT is executed.