
23. On-chip Debug Function (OCD)
The TMP89FH46L has an on-chip debug function. Using a combination of this function and the TOSHIBA on-
chip debug emulator RTE870/C1, the user is able to perform software debugging in the on-board environment. This
emulator can be operated from a debugger installed on a PC so that the emulation and debugging functions of an
application program can be used to modify a program or for other purposes.
This chapter describes the control pins needed to use the on-chip debug function and how a target system is connected
to the on-chip debug function. For more detailed information on how to use the on-chip debug emulator RTE870/C1,
refer to the emulator operating manual.
23.1 Features
The on-chip debug function of the TMP89FH46L has the following features:
·
Debugging can be performed in much the same way as when a microcontroller packaged with the MCU is
used.
·
The debugging function can be realized using two communication control pins.
·
Useful on-chip debug functions include the following:
-
8 breaks function are provided (one of which can also be used as an event function).
-
A trace function that allows the newest two branch instructions to be stored in real time is provided.
-
Functions to display active memory and to overwrite active memory are provided.
·
Built-in flash memory can be erased and written.
23.2 Control Pins
The on-chip debug function uses two pins for communication and four pins for power supply, reset and mode
control. The pins used for the on-chip debug function are shown in
Table 23-1.Ports P20 and P21 are used as communication control pins of the on-chip debug function. If the RTE870/C1 On-
Chip Debug Emulator is used, therefore, Ports P20 and P21 cannot be debugged as port pins or UART0 and SIO0
pins. However, because the UART0 and SIO0 functions can be assigned to other ports by using SERSEL<SRSEL2>,
these communication functions can also be used during on-chip debug operation. For details, refer to the section of I/
O ports.
Table 23-1 Pins Used for the On-chip Debug Function
Pin name
(during on-chip debugging)
Input/out-
put
Function
Pin name
(in MCU mode)
OCDCK
Input
Communication control pin (clock control)
(Note 1)
P20 / TXD0 / SO0
OCDIO
I/O
Communication control pin (data control)
P21 / RXD0 / SI0
RESET
Input
Reset control pin
RESET
MODE
Input
Mode control pin
MODE
VDD
Power sup-
ply
3.0 V to 3.6 V (Note 1)
VSS
Power sup-
ply
0 V
Input and output ports other than
P20 and P21
I/O
Can be used for an application in a target system
XIN
Input
To be connected to an oscillator to put these pins in a state of self-oscillation
XOUT
Output
TMP89FH46L
Page 389
RA000