Waveform distortion due to input noise or a reflected wave may cause malfunction. If the input of the
CMOS device stays in the area between V
malfunction. Take care to prevent chattering noise from entering the device when the input level is fixed,
and also in the transition period when the input level passes through the area between V
V
IH
(MIN).
HANDLING OF UNUSED INPUT PINS
2
Unconnected CMOS device inputs can be cause of malfunction. If an input pin is unconnected, it is
possible that an internal input level may be generated due to noise, etc., causing malfunction. CMOS
devices behave differently than Bipolar or NMOS devices. Input levels of CMOS devices must be fixed
high or low by using pull-up or pull-down circuitry. Each unused pin should be connected to V
via a resistor if there is a possibility that it will be an output pin. All handling related to unused pins must
be judged separately for each device and according to related specifications governing the device.
3
PRECAUTION AGAINST ESD
A strong electric field, when exposed to a MOS device, can cause destruction of the gate oxide and
ultimately degrade the device operation. Steps must be taken to stop generation of static electricity as
much as possible, and quickly dissipate it when it has occurred. Environmental control must be
adequate. When it is dry, a humidifier should be used. It is recommended to avoid using insulators that
easily build up static electricity. Semiconductor devices must be stored and transported in an anti-static
container, static shielding bag or conductive material. All test and measurement tools including work
benches and floors should be grounded. The operator should be grounded using a wrist strap.
Semiconductor devices must not be touched with bare hands. Similar precautions need to be taken for
PW boards with mounted semiconductor devices.
IL
(MAX) and VIH (MIN) due to noise, etc., the device may
IL
(MAX) and
DD
or GND
4
STATUS BEFORE INITIALIZATION
Power-on does not necessarily define the initial status of a MOS device. Immediately after the power
source is turned ON, devices with reset functions have not yet been initialized. Hence, power-on does
not guarantee output pin levels, I/O settings or contents of registers. A device is not initialized until the
reset signal is received. A reset operation must be executed immediately after power-on for devices
with reset functions.
INPUT OF SIGNAL DURING POWER OFF STATE
5
Do not input signals or an I/O pull-up power supply while the device is not powered. The current
injection that results from input of such a signal or I/O pull-up power supply may cause malfunction and
the abnormal current that passes in the device at this time may cause degradation of internal elements.
Input of signals during the power off state must be judged separately for each device and according to
related specifications governing the device.
All (other) product, brand, or trade names used in this pamphlet are the trademarks or
registered trademarks of their respective owners.
Product specifications are subject to change without notice. To ensure that you have
the latest product data, please contact your local NEC Electronics sales office.
2
User’s Manual U16580EE3V1UD00
•
The information in this document is current as of October, 2006. The information is subject to
change without notice. For actual design-in, refer to the latest publications of NEC Electronics data
sheets or data books, etc., for the most up-to-date specifications of NEC Electronics products. Not
all products and/or types are available in every country. Please check with an NEC Electronics sales
representative for availability and additional information.
•
No part of this document may be copied or reproduced in any form or by any means without the prior
written consent of NEC Electronics. NEC Electronics assumes no responsibility for any errors that may
appear in this document.
•
NEC Electronics does not assume any liability for infringement of patents, copyrights or other intellectual
property rights of third parties by or arising from the use of NEC Electronics products listed in this document
or any other liability arising from the use of such products. No license, express, implied or otherwise, is
granted under any patents, copyrights or other intellectual property rights of NEC Electronics or others.
Descriptions of circuits, software and other related information in this document are provided for illustrative
•
purposes in semiconductor product operation and application examples. The incorporation of these
circuits, software and information in the design of a customer's equipment shall be done under the full
responsibility of the customer. NEC Electronics assumes no responsibility for any losses incurred by
customers or third parties arising from the use of these circuits, software and information.
•
While NEC Electronics endeavors to enhance the quality, reliability and safety of NEC Electronics products,
customers agree and acknowledge that the possibility of defects thereof cannot be eliminated entirely. To
minimize risks of damage to property or injury (including death) to persons arising from defects in NEC
Electronics products, customers must incorporate sufficient safety measures in their design, such as
redundancy, fire-containment and anti-failure features.
•
NEC Electronics products are classified into the following three quality grades: "Standard", "Special" and
"Specific".
The "Specific" quality grade applies only to NEC Electronics products developed based on a customerdesignated "quality assurance program" for a specific application. The recommended applications of an NEC
Electronics product depend on its quality grade, as indicated below. Customers must check the quality grade of
each NEC Electronics product before using it in a particular application.
"Standard":
"Special":
"Specific":
Computers, office equipment, communications equipment, test and measurement equipment, audio
and visual equipment, home electronic appliances, machine tools, personal electronic equipment
and industrial robots.
Transportation equipment (automobiles, trains, ships, etc.), traffic control systems, anti-disaster
systems, anti-crime systems, safety equipment and medical equipment (not specifically designed
for life support).
Aircraft, aerospace equipment, submersible repeaters, nuclear reactor control systems, life
support systems and medical equipment for life support, etc.
The quality grade of NEC Electronics products is "Standard" unless otherwise expressly specified in NEC
Electronics data sheets or data books, etc. If customers wish to use NEC Electronics products in applications
not intended by NEC Electronics, they must contact an NEC Electronics sales representative in advance to
determine NEC Electronics' willingness to support a given application.
(Note)
(1)
"NEC Electronics" as used in this statement means NEC Electronics Corporation and also includes its
majority-owned subsidiaries.
(2)
"NEC Electronics products" means any product developed or manufactured by or for NEC Electronics (as
defined above).
M8E 02. 11-1
User’s Manual U16580EE3V1UD00
3
u
For further information,
6
please contact:
NEC Electronics Corporation
1753, Shimonumabe, Nakahara-ku,
Kawasaki, Kanagawa 211-8668,
Japan
Tel: 044-435-5111
http://www.necel.com/
[America]
[Europe]
[Asia & Oceania]
NEC Electronics America, Inc.
2880 Scott Blvd.
Santa Clara, CA 95050-2554, U.S.A.
Room 2511-2512, Bank of China To w e r,
200 Yincheng Road Central,
Pudong New Area, Shanghai P.R. China P.C:
Tel: 021-5888-5400
http://www.cn.necel.com/
NEC Electronics Hong Kong Ltd.
12/F., Cityplaza 4,
12 Taikoo Wan Road, Hong Kong
Te l : 2886-9318
http://www.hk.necel.com/
NEC Electronics Taiwan Ltd.
7F, No. 363 Fu Shing North Road
Taipei, Taiwan, R. O. C.
Tel: 02-8175-9600
http://www.tw.necel.com/
Figure 12-21:Example of TMENC10 Operation When Interval Operation and Transfer
Operation are Combined ........................................................................................... 563
Figure 12-22:Example of TM1Operation in UDC Mode.................................................................. 564
Figure 12-23:Clear Operation upon Match with CM100 During TMENC10 Up Count Operation ... 566
Figure 12-24:Clear Operation upon Match with CM101 during TMENC10
Down Count Operation .............................................................................................. 566
Figure 12-25:Count Value Clear Operation upon Compare Match................................................. 567
Figure 12-26:Internal Operation During Transfer Operation ........................................................... 567
Figure 12-27:Interrupt Output upon Compare Match (CM101 with Operation Mode
set to General-Purpose Timer Mode and Count Clock Set to f
/8) ......................... 568
XX
Figure 12-28:TM1UBDn Flag Operation......................................................................................... 568
Figure 13-1:Block Diagram of Auxiliary Frequency Output Function ............................................ 569
The V850E/PH2 (PHOENIX-F
“V850 series™”. This chapter gives a short outline of the V850E/PH2 microcontroller.
Note
) is a product of the NEC Electronics single-chip microcontrollers
1.1 Outline
The V850E/PH2 is a 32-bit single-chip microcontroller that realizes high-precision inverter control of a
motor due to high-speed operation. It uses the V850E1 CPU (NU85EFC) of the V850 Series including
single-precision floating point unit, and has on-chip ROM, RAM, bus interface, DMA controller, a realtime pulse unit including 3-phase PWM timer for inverter control, various serial interfaces including
AFCAN, and peripheral facilities such as A/D converters, as well as an on-chip debug interface.
(1)V850E1 CPU
The V850E1 CPU (NU85EFC) supports a RISC instruction set that enhances the performance of
the V850 CPU, which is the CPU core integrated in the V850 Series, and has added instructions
supporting high-level languages, such as C-language switch statement processing, table look-up
branching, stack frame creation/deletion, and data conversion. This enhances the performance of
both data processing and control. It is possible to use the software resources of the V850 CPU
integrated system since the instruction codes of the V850E1 are upwardly compatible at the object
code level with those of the V850 CPU.
In addition, the V850E1 CPU (NU85EFC) incorporates a single-precision floating point unit, which
supports high speed floating point arithmetic operations.
(2)External memory interface function
The V850E/PH2 microcontroller features n on-chip external memory interface including separately
configured address (22 bits) and data (32 bits) buses. SRAM and ROM can be connected.
(3)On-chip flash memory
The V850E/PH2 microcontroller has a quickly accessible flash memory on-chip, that can shorten
system development time since it is possible to rewrite a program with the V850E/PH2
microcontroller mounted in an application system. Moreover, it can greatly improve maintain ability
after system ships.
(4)A full range of development environment products
A development environment system that includes an optimized C compiler, debugger, in-circuit
emulator, simulator, system performance analyser, and other elements is also available.
Note: PHOENIX-F is the European name of the V850E/PH2 microcontroller.
The V850E/PH2 microcontroller is ideally suited for automotive applications, like
electrical power steering and electric car control. It is also an excellent choice for other applications
where a combination of general-purpose inverter control functions and CAN network support is
required.
A0 to A21: Address bus
ADTRG0, ADTRG1: A/D trigger input
AFO: Auxiliary frequency output
ANI00 to ANI09,
ANI10 to ANI19: Analog input
: Analog power supply
AV
DD
AV
AV
BEN0
CS0
CV
CV
, AV
REF0
, AV
SS0
to BEN3: Byte enable
, CS1, CS3, CS4: Chip select
: Power supply for oscillator
DD
: Oscillator ground
SS
: Analog reference voltage
REF1
: Analog ground
SS1
D0 to D31: Data bus
DCK: Debug clock input
DDI: Debug data input
DDO: Debug data output
DMS: Debug mode select
: Debug reset
DRST
ESO0, ESO1: Emergency shut-off
FCRXD0, FCRXD1: FCAN receive data input
FCTXD0, FCTXD1: FCAN transmit data output
INTP0 to INTP12: External interrupt request
MODE0 to MODE2: Mode
NMI:Non-maskable interrupt
request
NC:Not connected
P00 to P04: Port 0
P10 to P17: Port 1
P20 to P27: Port 2
P30 to P37: Port 3
P40 to P45: Port 4
P50 to P57: Port 5
P60 to P67: Port 6
P70 to P75: Port 7
P80 to P86: Port 8
P90 to P96: Port 9
P100 to P102: Port 10
PAL0 to PAL15: Port AL
PAH0 to PAH5: Port AH
PCD2 to PCD5: Port CD
PCM0, PCM1,
PCM6, PCM7: Port CM
PCS0, PCS1,
PCS3, PCS4: Port CS
PCT4, PCT5: Port CT
PDL0 to PDL15: Port DH
PDH0 to PDH15: Port DL
: Read strobe
RD
RESET
: Reset
RXDC0, RXDC1: Receive data input
SCK30
SCKB0
, SCK31,
, SCKB1: Serial clock
SCS300 to SCS303,
SCS310 to SCS313: Serial chip select
TOR00 to TOR07
TOR10 to TOR17
TOP00 to TOP70
TOP011to TOP8
CSC300 to CSC303
CSC310 to CSC313
NMI
ESO0, ESO1
TTRGR1
TIR10 to TIR13
TIP00 to TIP70
TIP01 to TIP71
TIT00, TIT01
TIT10, TIT11
TEVTT1
TTRGT1
TICC10
TICC11
TCLR1
TCUD1,TIUD1
TOT00, TOT01
TOT10, TOT11
TO1
TXDC0
RXDC0
TXDC1
RXDC1
SOB0
SIB0
SCKB0
SSB0
SOB1
SIB1
SCKB1
SSB1
SO30
SI30
SCK30
SO31
SI31
SCK31
FCRXD0
FCTXD0
FCRXD1
FCTXD1
INTC
RPU
TMR: 2ch
TMP: 9ch
TMT: 2ch
TMENC10:1ch
UARTC0
UARTC1
CSIB0
BRG0
CSIB1
BRG1
CSI30
CSI31
FCAN0
FCAN1
ROMBCUCPU
PC
512 KB
32-bit
Barrel
Shifter
System
Registers
RAM
General
Registers
P40 to P45
P30 to P37
32-bit
x 32
P50 to P57
P60 to P67
AFO
P70 to P75
32 KB
DMAC
P00 to P04
P10 to P17
RNG
BRG2
P20 to P27
Floating Point
Multiplier
32 x 32
ALU
Por ts
P80 to P86
P90 to P96
P100 to P102
PCS0, PCS1, PCS3, PCS4
Instruction
Queue
Unit
64
PCT4, PCT5
PAH0 to PAH5
PAL0 to PAL15
PCD2 to PCD5
PCM0, PCM1, PCM6, PCM7
PDL0 to PDL15
PDH0 to PDH15
MEMC
SRAM
ROM
DCU
A/D
Converter 0
A/D
Converter 1
Clock
Generator
&
System
Control
RD
WR
WAIT
BE0 BE3to
CS0 CS1,
CS3 CS4,
D0 to D31
A0 to A21
DCK, DMS
DDI, DDO
DRST
ANI00 to ANI09
ADTRG0
AV
DD
AVSS0
REF
0
AV
ANI10 to ANI19
ADTRG1
AV
DD
AVSS1
REF
1
AV
RESET
MODEn
X1
X2
V
DD1
V
SS1
V
DD3
V
SS3
CV
DD
CV
SS
44
User’s Manual U16580EE3V1UD00
Chapter 1 Introduction
Figure 1-4: Internal Block Diagram of μPD70F3447
INTP0 to INTP12
TEVTP0 to TEVTP8
TTRGP0 to TTRGP8
TEVTT0,
TTRGT0,
TOR00 to TOR07
TOR10 to TOR17
TOP00 to TOP70
TOP011to TOP8
CSC300 to CSC303
NMI
ESO0, ESO1
TTRGR1
TIR10 to TIR13
TIP00 to TIP70
TIP01 to TIP71
TIT00, TIT01
TIT10, TIT11
TECRT0
TECRT1
TEVTT1
TTRGT1
TOT00, TOT01
TOT10, TOT11
TXDC0
RXDC0
TXDC1
RXDC1
SOB0
SIB0
SCKB0
SSB0
SO30
SI30
SCK30
FCRXD0
FCTXD0
INTC
RPU
TMR: 2ch
TMP: 9ch
TMT: 2ch
UARTC0
UARTC1
CSIB0
BRG0
BRG1
CSI30
FCAN0
ROMCPU
PC
384 KB
32-bit
Barrel
Shifter
System
Registers
RAM
General
Registers
P40 to P45
P30 to P37
32-bit
x 32
P50 to P57
P60 to P67
AFO
P70 to P75
24 KB
DMAC
P00 to P04
P10 to P17
BRG2
P20 to P27
Por ts
P80 to P86
P90 to P96
Floating Point
Multiplier
32 x 32
ALU
P100 to P102
BCU
Instruction
Queue
Unit
64
PCT4, PCT5
PAH0 to PAH5
PAL0 to PAL15
PCD2 to PCD5
PDH0 to PDH15
PCS0, PCS1, PCS3, PCS4
PCM0, PCM1, PCM6, PCM7
PDL0 to PDL15
DCU
A/D
Converter 0
A/D
Converter 1
Clock
Generator
&
System
Control
DCK, DMS
DDI, DDO
DRST
ANI00 to ANI09
ADTRG0
AV
DD
AVSS0
REF
0
AV
ANI10 to ANI19
ADTRG1
DD
AV
AVSS1
AV
REF
1
RESET
MODEn
X1
X2
V
DD1
V
SS1
V
DD3
V
SS3
CV
DD
CV
SS
User’s Manual U16580EE3V1UD00
45
Chapter 1 Introduction
1.6.2 On-chip units
(1) CPU
The CPU uses five-stage pipeline control to enable single-clock execution of address calculations,
arithmetic logic operations, data transfers, and almost all other instruction processing.
Other dedicated on-chip hardware, such as a multiplier (16 bits × 16 bits → 32 bits
or 32 bits
× 32 bits → 64 bits) and a barrel shifter (32 bits), help accelerate processing of complex
instructions.
(2) Bus control unit (BCU)
The BCU starts the required external bus cycle based on the physical address obtained by the
CPU. When an instruction is fetched from external memory area and the CPU does not send a bus
cycle start request, the BCU generates a prefetch address and prefetches the instruction code.
The prefetched instruction code is stored in an instruction queue in the CPU.
The BCU controls a memory controller (MEMC) and DMA controller (DMAC) and performs
external memory access and DMA transfer.
(a) Memory controller (MEMC)
Note2
The MEMC controls SRAM, ROM, and various I/O for external memory expansion.
• SRAM, external ROM, external I/O interface
Supports access to SRAM, external ROM, and external I/O.
(b) DMA controller (DMAC)
The DMAC performs data transfers b/w internal on-chip RAM and peripheral I/O. For this purpose
eight DMA channels are provided for particular transfer functions of serial I/O interfaces, real-time
pulse unit (TMR), and A/D converter.
(3) ROM
There is on-chip flash memory of 512 KB provided in the μPD70F3187, and 384 KB in the
μPD70F3447.
On an instruction fetch, the ROM can be accessed by the CPU in one clock.
When single-chip mode 0 or flash memory programming mode is set, ROM is mapped starting
from address 00000000H.
Note2
When single-chip mode 1
ROM cannot be accessed if ROM-less mode
is set, it is mapped starting from address 00100000H.
Note2
is set.
(4) RAM
There is on-chip RAM of 32 KB provided in the μPD70F3187, and 24 KB in the μPD70F3447. Onchip RAM is mapped starting from address 03FF0000H for both, μPD70F3187 and μPD70F3447.
It can be accessed by the CPU in one clock on an instruction fetch or data access.
(5) Interrupt controller (INTC)
The INTC services hardware interrupt requests from on-chip peripheral I/O and external sources
(NMI, INTP0 to INTP12). Eight levels of interrupt priorities can be specified for these interrupt
requests, and multiple-interrupt servicing control can be performed for interrupt sources
46
User’s Manual U16580EE3V1UD00
Chapter 1 Introduction
(6) Clock generator (CG)
The CG provides a frequency that is 4 times the input clock (f
internal system clock (f
). As the input clock, connect an external crystal or resonator to pins X1
CPU
) (using the on-chip PLL) as the
X
and X2 or input an external clock from the X1 pin.
(7) Real-time pulse unit (RPU)
The RPU incorporates a 2-channel 16-bit timer (TMR) for 3/6-phase sine wave PWM inverter
control, an 1-channel 16-bit up/down counter (TMENC10), μPD70F3187 only and a 2-channel
16-bit up/down counter (TMT) that can be used for 2-phase encoder input or as a general-purpose
timer, a 9-channel 16-bit general-purpose timer unit (TMP).
The RPU can measure pulse interval or frequency and can output programmable pulses.
(8) Serial interface (SIO)
The serial interfaces consist of 2 channels asynchronous serial interface C (UARTC), up to 2
channels clocked serial interface B (CSIB), up to 2 channels clocked serial interface 3 (CSI3), and
up to 2 channels FCAN interface (AFCAN).
The UARTC performs data transfer using pins TXDCn and RXDCn (n = 0, 1).
The CSIB performs data transfer using pins SOBn, SIBn, SCKBn
The CSI3 performs data transfer using pins SO3n, SI3n, SCK3n
, SSIn, and SSOn
, SCS3n0 to SCS3
The AFCAN performs data transfer using pins FCTXDn and FCRXDn
Note1
.
Note1
Note1
.
.
(9) Baud rate generator (BRG)
The baud rate generator comprises 3 channels of 8-bit counters and comparators that can be
used for clock supply of serial interfaces (CSIB), auxiliary frequency output (AFO) or interval timer.
(10) A/D converter (ADC)
The two units of high-speed, high-resolution 10-bit A/D converter include 10 analog input pins for
each unit. Conversion is performed using the successive approximation method.
(11) Random number generator (RNG)
For encryption purpose a random number generator is provided.
(12) Debug control unit (DCU)
On-chip debugging can be performed via a debug control unit (n-wire interface).
Notes: 1. n = 0, 1 for μPD70F3187
n = 0 for μPD70F3447
2. Not available on µPD70F3447
User’s Manual U16580EE3V1UD00
47
Chapter 1 Introduction
(13) Ports
As shown below, the following ports have general-purpose port functions and control pin functions.
Port 38-bit I/OSerial interface I/O, external interrupt input
Port 46-bit I/OSerial interface I/O
Port 58-bit I/OReal-time pulse unit I/O
Port 68-bit I/OReal-time pulse unit I/O
Port 76-bit I/OReal-time pulse unit I/O, external interrupt input
Port 87-bit I/OSerial interface I/O, external interrupt input
Port 97-bit I/OSerial interface I/O, external interrupt
input
Port 103-bit I/OReal-time pulse unit I/O
Port AL16-bit I/OExternal address busNone
Port AH6-bit I/OExternal address busNone
Port DL16-bit I/OExternal data busNone
Port DH16-bit I/OExternal data busNone
Port CD4-bit I/OExternal bus interface control signal
output
Port CM4-bit I/OWait insertion signal inputNone
Port CS4-bit I/OExternal bus interface control signal
output
Port CT2-bit I/OExternal bus interface control signal
output
External interrupt input
None
None
None
48
User’s Manual U16580EE3V1UD00
Chapter 2Pin Functions
2.1 List of Pin Functions
The names and functions of the V850E/PH2 microcontroller pins are listed below. These pins can be
divided into port pins and non-port pins according to their functions.
(1) Port pins
Table 2-1: Port Pins (1/5)
Pin NameI/OFunctionAlternate Function
μPD70F3187μPD70F3447
P00IPort 0
P01INTP0, ESO0
P02INTP1, ESO1
P03INTP2, ADTRG0
P04INTP3, ADTRG1
P10I/OPort 1
P11TIP01, TTRGP1, TOP01
P12TIP10, TTRGP0, TOP10
P13TIP11, TEVTP0, TOP11
P14TIP20, TEVTP3, TOP20
P15TIP21, TTRGP3, TOP21
P16TIP30, TTRGP2, TOP30
P17TIP31, TEVTP2, TOP31
P20I/OPort 2
P21TIP41, TTRGP5, TOP41
P22TIP50, TTRGP4, TOP50
P23TIP51, TEVTP4, TOP51
P24TIP60, TEVTP7, TOP60
P25TIP61, TTRGP7, TOP61
P26TIP70, TTRGP6, TOP70
P27TIP71, TEVTP6, TOP71
P30I/OPort 3
P31TXDC0
P32RXDC1, INTP5
P33TXDC1
P34FCRXD0
P35FCTXD0
P36FCRXD1–
P37FCTXD1–
5-bit input-only port
8-bit I/O port
Input or output direction can be specified in 1-bit
units
8-bit I/O port
Input or output direction can be specified in 1-bit
units
8-bit I/O port
Input or output direction can be specified in 1-bit
units
NMI
TIP00, TEVTP1, TOP00
TIP40, TEVTP5, TOP40
RXDC0, INTP4
User’s Manual U16580EE3V1UD00
49
Chapter 2 Pin Functions
Table 2-1:Port Pins (2/5)
Pin NameI/OFunctionAlternate Function
μPD70F3187μPD70F3447
P40I/OPort 4
P41SOB0
P42SCKB0
P43SIB1–
P44SOB1–
P45SCKB1
P50I/OPort 5
P51TOR01
P52TOR02
P53TOR03
P54TOR04
P55TOR05
P56TOR06
P57TOR07
P60I/OPort 6
P61TOR11, TIR10
P62TOR12, TIR11
P63TOR13, TIR12
P64TOR14, TIR13
P65TOR15
P66TOR16
P67TOR17, TEVTR1
P70I/OPort 7
P71TIT01, TTRGT1, TOT01, TENCT01
P72TECRT0, INTP12
P73TIT10, TTRGT0, TOT10, TENCT10
P74TIT11, TEVTT0, TOT11, TENCT11
P75TECRT1, AFO
P80I/OPort 8
P81SO30
P82SCK30
P83SCS300, INTP6
P84SCS301, INTP7
P85SCS302, INTP8
P86SCS303, SSB0
6-bit I/O port
Input or output direction can be specified in 1-bit
units
8-bit I/O port
Input or output direction can be specified in 1-bit
units
8-bit I/O port
Input or output direction can be specified in 1-bit
units
6-bit I/O port
Input or output direction can be specified in 1-bit
units
7-bit I/O port
Input or output direction can be specified in 1-bit
units
SIB0
–
TOR00
TOR10, TTRGR1
TIT00, TEVTT1, TOT00, TENCT00
SI30
50
User’s Manual U16580EE3V1UD00
Chapter 2 Pin Functions
Table 2-1: Port Pins (3/5)
Pin NameI/OFunctionAlternate Function
μPD70F3187μPD70F3447
P90I/OPort 9
P91SO31–
P92SCK31
P93SCS310, INTP9INTP9
P94SCS311, INTP10INTP10
P95SCS312, INTP11INTP11
P96SCS313, SSB1
P100I/OPort 10
P101TCUD1, TICC11–
P102TIUD1, TO1–
PA L 0I / OPor t A L
PA L1A 1
PA L2A 2
PA L3A 3
PA L4A 4
PA L5A 5
PA L6A 6
PA L7A 7
PA L8A 8
PA L9A 9
PAL10A10
PAL11A11
PAL12A12
PAL13A13
PAL14A14
PAL15A15
PA H 0I / OP o r t A H
PA H1A1 7
PA H2A1 8
PA H3A1 9
PA H4A2 0
PA H5A2 1
7-bit I/O port
Input or output direction can be specified in 1-bit
units
3-bit I/O port
Input or output direction can be specified in 1-bit
units
16-bit I/O port
Input or output direction can be specified in 1-bit
units
6-bit I/O port
Input or output direction can be specified in 1-bit
units
SI31–
TCLR1, TICC10,
TOP81
A0–
A16–
–
–
TOP81
User’s Manual U16580EE3V1UD00
51
Chapter 2 Pin Functions
Table 2-1:Port Pins (4/5)
Pin NameI/OFunctionAlternate Function
μPD70F3187μPD70F3447
PDL0I/OPort DL
PDL1D1
PDL2D2
PDL3D3
PDL4D4
PDL5D5
PDL6D6
PDL7D7
PDL8D8
PDL9D9
PDL10D10
PDL11D11
PDL12D12
PDL13D13
PDL14D14
PDL15D15
PDH0I/OPort DH
PDH1D17
PDH2D18
PDH3D19
PDH4D20
PDH5D21
PDH6D22
PDH7D23
PDH8D24
PDH9D25
PDH10D26
PDH11D27
PDH12D28
PDH13D29
PDH14D30
PDH15D31
PCD2I/OPort CD
PCD3BEN1
PCD4BEN2
PCD5BEN3
16-bit I/O port
Input or output direction can be specified in 1-bit
units
16-bit I/O port
Input or output direction can be specified in 1-bit
units
4-bit I/O port
Input or output direction can be specified in 1-bit
units
D0–
D16–
BEN0
–
52
User’s Manual U16580EE3V1UD00
Chapter 2 Pin Functions
Table 2-1: Port Pins (5/5)
Pin NameI/OFunctionAlternate Function
μPD70F3187μPD70F3447
PCM0I/OPort CM
PCM1–
PCM6–
PCM7–
PCS0I/OPort CS
PCS1CS1
PCS3CS3
PCS4CS4
PCT4I/OPort CT
PCT5WR
4-bit I/O port
Input or output direction can be specified in 1-bit
units
4-bit I/O port
Input or output direction can be specified in 1-bit
units
2-bit I/O port
Input or output direction can be specified in 1-bit
units
A0 to A15 (PAL0 to PAL15)Hi-ZHi-ZOperatingOperating
A16 to A21 (PAH0 to PAH5)Hi-ZHi-ZOperatingOperating
D0 to D15 (PDL0 to PDL15)Hi-ZHi-ZOperatingOperating
D16 to D31 (PDH0 to PDH15)Hi-ZHi-ZOperatingOperating
BEN0
to BEN3 (PCD2 to PCD5)Hi-ZHi-ZOperatingOperating
CS0
(PCS0)Hi-ZHi-ZOperatingOperating
CS1 (PCS1)Hi-ZHi-ZOperatingOperating
CS3 (PCS3)Hi-ZHi-ZOperatingOperating
CS4 (PCS4)Hi-ZHi-ZOperatingOperating
RD
(PCT4)Hi-ZHi-ZOperatingOperating
WR (PCT5)Hi-ZHi-ZOperatingOperating
WAIT (PCM0)Hi-ZHi-ZOperatingOperating
PCM1, PCM6, PCM7Hi-ZHi-ZHi-ZOperating
DCKOperatingOperatingOperatingOperating
DDIOperatingOperatingOperatingOperating
DDOOperatingOperatingOperatingOperating
DMSOperatingOperatingOperatingOperating
DRST
INTP0 to INTP3 (P01 to P04)
INTP4 (P30)
INTP5 (P32)
INTP6 to INTP8 (P83 to P85)
INTP9 to INTP11 (P93 to P95)
NMI (P00)
Peripheral input pin other than
above
Peripheral output pin other than
above
Port input pin other than aboveHi-ZHi-ZHi-Z
Port output pin other than above×××Hold
OperatingOperatingOperatingOperating
–
–
–
–
–
–
Hi-ZHi-ZHi-ZOperating
×××Operating
Single-chip
Mode 0
After reset releaseHALT Mode
Single-chip
Mode 1
InputInputOperating
InputInputOperating
InputInputOperating
InputInputOperating
InputInputOperating
InputInputOperating
Note
ROM-less
Note
Mode
–
Remark:Hi-Z: High Impedance
–:Input data is not sampled
×:No function selected at reset
Note: Not available on μPD70F3447
60
User’s Manual U16580EE3V1UD00
Chapter 2 Pin Functions
2.3 Description of Pin Functions
(1) P00 to P04 (Port 0) … Input
Port 0 is an 8-bit input-only port in which all pins are fixed for input.
Besides functioning as a port, in control mode, P00 to P04 operate as NMI input, external interrupt
request signal, real-time pulse unit (RPU) emergency shut off signal input, and A/D converter
(ADC) external trigger input. Normally, if function pins also serve as ports, one mode or the other
is selected using a port mode control register. However, there is no such register for P00 to P04.
Therefore, the input port cannot be switched with the NMI input pin, external interrupt request
input pin, RPU emergency shut off signal input pin, and A/D converter (ADC) external trigger input
pin. Read the status of each pin by reading the port.
(a) Port mode
P00 to P04 are input-only.
(b) Control mode
P00 to P04 also serve as NMI, INTP0 to INTP3, ESO0, ESO1, ADTRG0, and ADTRG1 pins, but
the control function cannot be disabled.
(i) NMI (Non-maskable interrupt request) … Input
This is non-maskable interrupt request input.
(ii) INTP0 to INTP3 (Interrupt request from peripherals) … Input
These are external interrupt request input pins.
(iii) ESO0, ESO1 (Emergency shut off) … Input
These pins input timer TMR0 and timer TMR1 emergency shut off signals.
(iv) ADTRG0, ADTRG1 (A/D trigger input) … Input
These are A/D converter external trigger input pins.
User’s Manual U16580EE3V1UD00
61
Chapter 2 Pin Functions
(2) P10 to P17 (Port 1) … Input/Output
Port 1 is an 8-bit I/O port in which input or output can be set for each port pin individually.
Besides functioning as an I/O port, in control mode, P10 to P17 operate as RPU input or output.
The operation mode can be specified by the port 1 mode control register (PMC1) to port or control
mode for each port pin individually.
(a) Port mode
P10 to P17 can be set to input or output in 1-bit units using the port 1 mode register (PM1).
(b) Control mode
P10 to P17 can be set to port or control mode in 1-bit units using the PMC1 register.
These pins output timer TMP0 to TMP3 pulse signals.
(3) P20 to P27 (Port 2) … Input/Output
Port 2 is an 8-bit I/O port in which input or output can be set for each port pin individually.
Besides functioning as an I/O port, in control mode, P20 to P27 operate as RPU input or output.
The operation mode can be specified by the port 2 mode control register (PMC2) to port or control
mode for each port pin individually.
(a) Port mode
P20 to P27 can be set to input or output in 1-bit units using the port 2 mode register (PM2).
(b) Control mode
P20 to P27 can be set to port or control mode in 1-bit units using the PMC2 register.
These pins output timer TMP4 to TMP7 pulse signals.
User’s Manual U16580EE3V1UD00
Chapter 2 Pin Functions
(4) P30 to P37 (Port 3) … Input/Output
Port 3 is an 8-bit I/O port in which input or output can be set for each port pin individually.
Besides functioning as an I/O port, in control mode, P30 to P37 operate as serial interface
Note
(UARTC0, UARTC1, AFCAN0, AFCAN1
). Additionally external interrupt request signal inputs
are available in port input mode.
The operation mode can be specified by the port 3 mode control register (PMC3) to port or control
mode for each port pin individually.
(a) Port mode
P30 to P37 can be set to input or output in 1-bit units using the port 3 mode register (PM3).
(i) INTP4, INTP5 (Interrupt request from peripherals) … Input
These are external interrupt request input pins, which are simultaneously enabled in port input
mode.
(b) Control mode
P30 to P37 can be set to port or control mode in 1-bit units using the PMC3 register.
(i) TXDC0, TXDC1 (Transmit data) … Output
These pins output serial transmit data of UARTC0 and UARTC1.
(ii) RXDC0, RXDC1 (Receive data) … Input
These pins input serial receive data of UARTC0 and UARTC1.
Note
(iii) FCTXD0, FCTXD1
(Transmit data for controller area network) … Output
These pins output AFCAN0 and AFCAN1
(iv) FCRXD 0, FCRXD1
Note
These pins input AFCAN0 and AFCAN1
Note: Not available on μPD70F3447
Note
serial transmit data.
(Receive data for controller area network) … Input
Note
serial receive data.
User’s Manual U16580EE3V1UD00
63
Chapter 2 Pin Functions
(5) P40 to P45 (Port 10) … Input/Output
Port 4 is a 6-bit I/O port in which input or output can be set for each port pin individually.
Besides functioning as an I/O port, in control mode, P40 to P45 operate as serial interface (CSIB0,
Note
CSIB1
).
The operation mode can be specified by the port 4 mode control register (PMC4) to port or control
mode for each port pin individually.
(a) Port mode
P40 to P45 can be set to input or output in 1-bit units using the port 4 mode register (PM4).
(b) Control mode
P40 to P45 can be set to port or control mode in 1-bit units using the PMC4 register.
Note
(i) SOB0, SOB1
These pins output CSIB0 and CSIB1
(ii) SIB0, SIB1
These pins input CSIB0 and CSIB1
(Serial output) … Output
Note
(Serial input) … Input
Note
serial transmit data.
Note
serial receive data.
(iii) SCKB0
, SCKB1
Note
(Serial clock) … I/O
These are the CSIB0 and CSIB1
Note: Not available on μPD70F3447
Note
serial clock I/O pins.
64
User’s Manual U16580EE3V1UD00
Chapter 2 Pin Functions
(6) P50 to P57 (Port 5) … Input/Output
Port 5 is an 8-bit I/O port in which input or output can be set for each port pin individually.
Besides functioning as an I/O port, in control mode, P50 to P57 operate as RPU input or output.
The operation mode can be specified by the port 5 mode control register (PMC5) to port or control
mode for each port pin individually.
(a) Port mode
P50 to P57 can be set to input or output in 1-bit units using the port 5 mode register (PM5).
(b) Control mode
P50 to P57 can be set to port or control mode in 1-bit units using the PMC5 register.
Port 6 is an 8-bit I/O port in which input or output can be set for each port pin individually.
Besides functioning as an I/O port, in control mode, P60 to P67 operate as RPU input or output.
The operation mode can be specified by the port 6 mode control register (PMC6) to port or control
mode for each port pin individually.
(a) Port mode
P60 to P67 can be set to input or output in 1-bit units using the port 6 mode register (PM6).
(b) Control mode
P60 to P67 can be set to port or control mode in 1-bit units using the PMC6 register.
Port 7 is a 6-bit I/O port in which input or output can be set for each port pin individually.
Besides functioning as an I/O port, in control mode, P70 to P75 operate as RPU input or output,
and auxiliary frequency output. Additionally an external interrupt request signal input is available in
port input mode.
The operation mode can be specified by the port 7 mode control register (PMC7) to port or control
mode for each port pin individually.
(a) Port mode
P70 to P75 can be set to input or output in 1-bit units using the port 7 mode register (PM7).
(i) INTP12 (Interrupt request from peripherals) … Input
This is an external interrupt request input pin, which is simultaneously enabled in port input
mode.
(b) Control mode
P70 to P75 can be set to port or control mode in 1-bit units using the PMC7 register.
These pins output timer TMT0 and TMT1 pulse signals.
(vii)AFO (Auxiliary frequency) … Output
This is an auxiliary frequency output signal pin of baudrate generator BGR2.
66
User’s Manual U16580EE3V1UD00
Chapter 2 Pin Functions
(9) P80 to P86 (Port 8) … Input/Output
Port 8 is a 7-bit I/O port in which input or output can be set for each port pin individually.
Besides functioning as an I/O port, in control mode, P80 to P86 operate as serial interface (CSI30,
CSIB0). Additionally external interrupt request signal inputs are available in port input mode.
The operation mode can be specified by the port 8 mode control register (PMC8) to port or control
mode for each port pin individually.
(a) Port mode
P80 to P86 can be set to input or output in 1-bit units using the port 8 mode register (PM8).
(i) INTP6, INTP7, INTP8 (Interrupt request from peripherals) … Input
These are external interrupt request input pins, which are simultaneously enabled in port input
mode.
(b) Control mode
P80 to P86 can be set to port or control mode in 1-bit units using the PMC8 register.
(i) SO30 (Serial output) … Output
This pin outputs CSI30 serial transmit data.
(ii) SI30 (Serial input) … Input
This pin inputs CSI30 serial receive data.
(iii) SCK30
This is the CSI30 serial clock I/O pin.
(iv) SCS300 to SCS303 (Serial chip select) … Output
These pins output CSI30 serial chip select signals.
(v) SSB0
This pin inputs CSIB0 slave select signal.
(Serial clock) … I/O
(Serial slave select signal) … Input
User’s Manual U16580EE3V1UD00
67
Chapter 2 Pin Functions
(10) P90 to P96 (Port 9) … Input/Output
Port 9 is a 7-bit I/O port in which input or output can be set for each port pin individually.
Besides functioning as an I/O port, in control mode, P90 to P96 operate as serial interface
(CSI31
Note
, CSIB1
Note
). Additionally external interrupt request signal inputs are available in port
input mode.
The operation mode can be specified by the port 9 mode control register (PMC9) to port or control
mode for each port pin individually.
(a) Port mode
P90 to P96 can be set to input or output in 1-bit units using the port 9 mode register (PM9).
(i) INTP9, INTP10, INTP11 (Interrupt request from peripherals) … Input
These are external interrupt request input pins, which are simultaneously enabled in port input
mode.
(b) Control mode
P90 to P96 can be set to port or control mode in 1-bit units using the PMC9 register.
(i) SO31 (Serial output) … Output
This pin outputs CSI31 serial transmit data.
(ii) SI31 (Serial input) … Input
This pin inputs CSI31 serial receive data.
(iii) SCK31
(Serial clock) … I/O
This is the CSI31 serial clock I/O pin.
(iv) SCS310 to SCS313 (Serial chip select) … Output
These pins output CSI31 serial chip select signals.
(v) SSB1
(Serial slave select input) … Input
This pin inputs CSIB1 slave select signal.
Note: not available on μPD70F3447
Note
Note
Note
Note
Note
68
User’s Manual U16580EE3V1UD00
Chapter 2 Pin Functions
(11) P100 to P102 (Port 10) … Input/Output
Port 10 is a 3-bit I/O port in which input or output can be set for each port pin individually.
Besides functioning as an I/O port, in control mode, P100 to P102 operate as RPU input or output
The operation mode can be specified by the port 10 mode control register (PMC10) to port or
control mode for each port pin individually.
(a) Port mode
P100 to P102 can be set to input or output in 1-bit units using the port 10 mode register (PM10).
(b) Control mode
P100 to P102 can be set to port or control mode in 1-bit units using the PMC4 register.
(i) TIUD1 (Timer count pulse input) … Input
Note
This is an external count clock input pin to the up/down counter (TMENC10).
(ii) TCUD1 (Timer control pulse input) … Input
Note
This is an input count operation switching signal to the up/down counter (TMENC10).
(iii) TCLR1 (Timer clear) … Input
Note
This is a clear signal input pin to the up/down counter (TMENC10).
(iv) TICC10, TICC11 (Timer capture input) … Input
Note
These are timer TMENC10 external capture trigger input pins.
(v) TO1 (Timer output) … Output
Note
This pin outputs timer TMENC10 pulse signals.
(vi) TOP80 (Timer output) … Output
This pin outputs timer TMP8 pulse signals.
(12) PAL0 to PAL15 (Port AL) … I/O
Port AL is an 8-bit or a 16-bit I/O port in which input or output can be set for each port pin
individually.
Besides functioning as a port, in control mode, these pins operate as the address bus (A0 to A15)
when memory is expanded externally.
The operation mode can be specified by the port AL mode control register (PMCAL) to port or
control mode for each port pin individually.
(a) Port mode
PAL0 to PAL15 can be set to input or output in 1-bit units using the port AL mode register (PMAL).
(b) Control mode
PAL0 to PAL15 can be set to port or control mode in 1-bit units using the PMCAL register.
(i) A0 to A15 (Address bus) … 3-state output
Note
These are the address output pins of the lower 16 bits of the 22-bit address bus when the
external memory is accessed.
Note: not available on μPD70F3447
User’s Manual U16580EE3V1UD00
69
Chapter 2 Pin Functions
(13) PAH0 to PAH5 (Port AH) … I/O
Port AH is a 6-bit I/O port in which input or output can be set for each port pin individually.
Besides functioning as a port, in control mode, these pins operate as the address bus (A16 to
A21) when memory is expanded externally.
The operation mode can be specified by the port AH mode control register (PMCAH) to port or
control mode for each port pin individually.
(a) Port mode
PAH0 to PAH5 can be set to input or output in 1-bit units using the port AH mode register (PMAH).
(b) Control mode
PAH0 to PAH6 can be set to port or control mode in 1-bit units using the PMCAH register.
(i) A16 to A21 (Address bus) … 3-state output
Note
These are the address output pins of the higher 6 bits of the 22-bit address bus when the
external memory is accessed.
(14) PDL0 to PDL15 (Port DL) … I/O
Port DL is an 8-bit or a 16-bit I/O port in which input or output can be set for each port pin
individually.
Besides functioning as a port, in control mode, these pins operate as the data bus (D0 to D15)
when memory is expanded externally.
The operation mode can be specified by the port DL mode control register (PMCDL) to port or
control mode for each port pin individually.
(a) Port mode
PDL0 to PDL15 can be set to input or output in 1-bit units using the port DL mode register (PMDL).
(b) Control mode
PDL0 to PDL15 can be set to port or control mode in 1-bit units using the PMCDL register.
(i) D0 to D15 (Address bus) … 3-state I/O
Note
These are the data I/O pins of the lower 16 bits of the 32-bit data bus when the external
memory is accessed.
Note: not available on μPD70F3447
70
User’s Manual U16580EE3V1UD00
Chapter 2 Pin Functions
(15) PDH0 to PDH15 (Port DH) … I/O
Port DH is an 8-bit or a 16-bit I/O port in which input or output can be set for each port pin
individually.
Besides functioning as a port, in control mode, these pins operate as the data bus
Note
(D16 to D31) when memory is expanded externally.
The operation mode can be specified by the port DH mode control register (PMCDH) to port or
control mode for each port pin individually.
(a) Port mode
PDH0 to PDH15 can be set to input or output in 1-bit units using the port DH mode register
(PMDH).
(b) Control mode
PDH0 to PDH15 can be set to port or control mode in 1-bit units using the PMCDH register.
(i) D16 to D31 (Address bus) … 3-state I/O
Note
These are the data I/O pins of the higher 16 bits of the 32-bit data bus when the external
memory is accessed.
(16) PCD2 to PCD5 (Port CD) … I/O
Port CD is a 4-bit I/O port in which input or output can be set for each port pin individually.
Besides functioning as a port, in control mode, these pins operate as control signal outputs
when memory is expanded externally.
The operation mode can be specified by the port CD mode control register (PMCCD) to port or
control mode for each port pin individually.
(a) Port mode
PCD2 to PCD5 can be set to input or output in 1-bit units using the port CD mode register
(PMCD).
(b) Control mode
PCD2 to PCD5 can be set to port or control mode in 1-bit units using the PMCCD register.
(i) BEN0
to BEN3 (Byte enable) … 3-state output
Note
These are the byte enable control signal pins, which indicate the validity of the corresponding
byte on the 32-bit data bus.
Note
Note: not available on μPD70F3447
User’s Manual U16580EE3V1UD00
71
Chapter 2 Pin Functions
(17) PCM0, PCM1, PCM6, PCM7 (Port CM) … I/O
Port CM is a 4-bit I/O port in which input or output can be set for each port pin individually.
Besides functioning as a port, in control mode, these pins operate as control signal input
memory is expanded externally.
The operation mode can be specified by the port CM mode control register (PMCCM) to port or
control mode for each port pin individually.
(a) Port mode
PCM0, PCM1, PCM6, and PCM7 can be set to input or output in 1-bit units using the port CM
mode register (PMCM).
(b) Control mode
PCM0 can be set to port or control mode in 1-bit units using the PMCCM register.
Note
when
(i) WAIT
(Wait) … Input
Note
This is the control signal input pin at which an external data wait is inserted into the bus cycle.
The WAIT
signal can be input asynchronously, and is sampled at the falling edge of the BCLK
signal. When the setup or hold time is terminated within the sampling timing, wait insertion
may not be executed.
(18) PCS0, PCS1, PCS3, PCS4 (Port CS) … I/O
Port CS is a 4-bit I/O port in which input or output can be set for each port pin individually.
Besides functioning as a port, in control mode, these pins operate as control signal outputs
when
memory is expanded externally.
The operation mode can be specified by the port CS mode control register (PMCCS) to port or
control mode for each port pin individually.
(a) Port mode
PCS0, PCS1, PCS3, and PCS4 can be set to input or output in 1-bit units using the port CS mode
register (PMCS).
(b) Control mode
PCS0, PCS1, PCS3, and PCS4 can be set to port or control mode in 1-bit units using the PMCCS
register.
Note
(i) CS0
, CS1, CS3, CS4 (Chip select) … 3-state output
These are the chip select signal output pins for the external memory or peripheral I/O
extension areas.
The CSn
signal is assigned to the memory block n (n = 0, 1, 3, 4).
It becomes active while the bus cycle that accesses the corresponding memory block is
activated. In the idle state (TI), it becomes inactive.
Note: not available on μPD70F3447
72
User’s Manual U16580EE3V1UD00
Note
Chapter 2 Pin Functions
(19) PCT4, PCT5 (Port CT) … I/O
Port CT is a 2-bit I/O port in which input or output can be set for each port pin individually.
Besides functioning as a port, in control mode, these pins operate as control signal outputs
when memory is expanded externally.
The operation mode can be specified by the port CT mode control register (PMCCT) to port or
control mode for each port pin individually.
(a) Port mode
PCT4 and PCT5 can be set to input or output in 1-bit units using the port CT mode register
(PMCT).
(b) Control mode
PCT4 and PCT5 can be set to port or control mode in 1-bit units using the PMCCT register.
Note
(i) RD
(Read strobe) … 3-state output
This is a strobe signal output pin that shows whether the bus cycle currently being executed is
a read cycle for the external memory or peripheral I/O extension area. In the idle state (TI), it
becomes inactive.
(ii) WR
(Write strobe) … 3-state output
This is a strobe signal output pin that shows whether the bus cycle currently being executed is
a write cycle for the external memory or peripheral I/O extension area.
Note: not available on μPD70F3447
Note
Note
User’s Manual U16580EE3V1UD00
73
Chapter 2 Pin Functions
(20) DCK (Debug clock) … Input
This pin inputs a debug clock. At the rising edge of the DCK signal, the DMS and DDI signals are
sampled, and data is output from the DDO pin at the falling edge of the DCK signal. Keep this pin
high when the debug function is not used.
(21) DDI (Debug data input) … Input
This pin inputs debug data, which is sampled at the rising edge of the DCK signal when the debug
serial interface is in the shift state. Data is input with the LSB first. Keep this pin high when the
debug function is not used.
(22) DDO (Debug data output) … Output
This pin outputs debug data at the falling edge of the DCK signal when the debug serial interface
is in the shift state. Data is output with the LSB first.
(23) DMS (Debug mode select) … Input
This input pin selects a debug mode. Depending on the level of the DMS signal, the state machine
of the debug serial interface changes. This pin is sampled at the rising edge of the DCK signal.
Keep this pin high when the debug function is not used.
(24) DRST
(Debug reset) … Input
This pin inputs a debug reset signal that is a negative-logic signal to initialize the DCU
asynchronously.
When this signal goes low, the DCU is reset/invalidated. Keep this pin low when the debug
function is not used.
(25) MODE0 to MODE2 (Mode) … Input
These are input pins used to specify the operating mode.
(26) FLMD0, FLMD1 (flash programming mode)
These are input pins used to specify the flash programming mode.
(27) RESET
RESET
(Reset) … Input
is a signal that is input asynchronously and that has a constant low level width regardless
of the operating clock’s status. When this signal is input, a system reset is executed as the first
priority ahead of all other operations.
In addition to being used for ordinary initialization/start operations, this pin can also be used to
release a standby mode (HALT).
(28) X1, X2 (Crystal)
These pins are used to connect the resonator that generates the system clock.
(29) ANI00 to ANI09, ANI10 to ANI19 (Analog input) … Input
These are analog input pins of the corresponding A/D converter (ADC0, ADC1).
(30) AV
REF0
, AV
(Analog reference voltage) … Input
REF1
These are reference voltage supply pins for the corresponding A/D converter (ADC0, ADC1).
(31) AV
(Analog power supply)
DD
This is the positive power supply pin for the A/D converters.
74
User’s Manual U16580EE3V1UD00
Chapter 2 Pin Functions
(32) AV
(Analog ground)
SS
This is the analog ground pin for the A/D converters.
(33) CV
(Power supply for clock generator)
DD
This is the positive power supply pin for the clock generator.
(34) CV
(Ground for clock oscillator)
SS
This is the ground pin for the clock generator.
(35) V
DD10
to V
(Power supply)
DD15
These are the positive power supply pins for the internal CPU.
(36) V
DD30
to V
(Power supply)
DD37
These are the positive power supply pins for the peripheral interface.
(37) V
SS10
to V
SS15
(Ground)
These are the ground pins for the internal CPU.
(38) V
SS30
to V
SS37
(Ground)
These are the ground pins for the peripheral interface.
User’s Manual U16580EE3V1UD00
75
Chapter 2 Pin Functions
2.4 Pin I/O Circuits and Recommended Connection of Unused Pins
Table 2-4: I/O Circuit Types (1/4)
TerminalI/O circuit typeRecommended termination
μPD70F3187μPD70F3447
P00/NMI2Connect independently to V
P01/INTP0/ESO0
P02/INTP1/ESO1
P03INTP2/ADTRG0
P04INTP3/ADTRG1
P10/TIP00/TEVTP1/TOP005-KInput: Connect independently to V
P11/TIP01/TTRGP1/TOP01
P12/TIP10/TTRGP0/TOP10
P13/TIP11/TEVTP0/TOP11
P14/TIP20/TEVTP3/TOP20
P15/TIP21/TTRGP3/TOP21
P16/TIP30/TTRGP2/TOP30
P17/TIP31/TEVTP2/TOP31
P20/TIP40/TEVTP5/TOP40
P21/TIP41/TTRGP5/TOP41
P22/TIP50/TTRGP4/TOP50
P23/TIP51/TEVTP4/TOP51
P24/TIP60/TEVTP7/TOP60
P25/TIP61/TTRGP7/TOP61
P26/TIP70/TTRGP6/TOP70
P27/TIP71/TEVTP6/TOP71
P30/RXDC0/INTP4
P31/TXDC0
P32/RXDC1/INTP5
P33/TXDC1
P34/FCRXD0
P35/FCTXD0
P36/FCRXD1P36
P37/FCTXD1P37
P40/SIB0
P41/SOB0
P42/SCKB0
P43/SIB1P43
P44/SOB1P44
P45/SCKB1
P50/TOR00 to P57/TOR07
P45
resistor
Output: leave open
SS3
via a resistor
or V
DD3
SS3
via a
76
User’s Manual U16580EE3V1UD00
Chapter 2 Pin Functions
Table 2-4: I/O Circuit Types (2/4)
TerminalI/O circuit typeRecommended termination
μPD70F3187μPD70F3447
P60/TOR10/TTRGR15-KInput: Connect independently to V
P61/TOR11/TIR10
P62/TOR12/TIR11
P63/TOR13/TIR12
P64/TOR14/TIR13
P65/TOR15
P66/TOR16
P67/TOR17/TEVTR1
P70/TIT00/TEVTT1/TOT00/TENCT00
P71/TIT01/TTRGT1/TOT01/TENCT01
P72/TECRT0/INTP12
P73/TIT10/TTRGT0/TOT10/TENCT10
P74/TIT11/TEVTT0/TOT11/TENCT11
P75/TECRT1/AFO
P80/SI30
P81/SO30
P82/SCK30
P83/SCS300/INTP6
P84/SCS301/INTP7
P85/SCS302/INTP8
P86/SCS303/SSB0
P90/SI31P90
P91/SO31P91
P92/SCK31
P93/SCS310/
INTP9
P94/SCS311/
INTP10
P95/SCS312
/INTP11
P96/SCS313/
SSB1
P100/TCLR1/
TICC10/TOP80
P101/TCUD1/
TICC11
P102/TIUD1/TO1P102
P92
P93/INTP9
P94/INTP10
P95/INTP11
P96
P100/TOP80
P101
resistor
Output: leave open
DD3
or V
SS3
via a
User’s Manual U16580EE3V1UD00
77
Chapter 2 Pin Functions
Table 2-4: I/O Circuit Types (3/4)
TerminalI/O circuit typeRecommended termination
μPD70F3187μPD70F3447
PAH0/A16 to
PA H5 /A 2 1
PA L 0 / A 0 t o
PAL15/A15
PDH0/D16 to
PDH15/D31
PDL0/D0 to
PDL15/D15
PCS0/CS0PCS0
PCS1/CS1PCS1
PCS3/CS3
PCS4/CS4
PCD2/BEN0 to
PCD5/BEN3
PCT4/RDPCT45Input: Connect independently to V
PCT5/WRPCT5
PCM0/WAIT
PCM1PCM1
PCM6PCM6
PCM7PCM7
RESET
X1
X2
MODE0/FLMD02
MODE1/FLMD12
MODE22
DCK1Connect independently to V
DRST
DMS1Connect independently to V
DDI
DDO3Leave open (always level output during reset)
ANI00 to ANI097Connect independently to AV
ANI10 to ANI19
AV
REF0
AV
REF1
PAH0 to PAH55Input: Connect independently to V
resistor
PAL0 to PAL15
Output: leave open
PDH0 to PDH15
PDL0 to PDL15
PCS3
PCS4
PCD2 to PCD5
resistor
Output: leave open
PCM0
2Pin must be used in the intended way
–
–
via a resistor
DD3
2-ILeave open (on-chip pull-down resistor
via a resistor
DD3
or AVSS via a resis-
DD
tor
–
Connect independently to AVSS via a resistor
DD3
DD3
or V
or V
SS3
SS3
via a
via a
78
User’s Manual U16580EE3V1UD00
TerminalI/O circuit typeRecommended termination
μPD70F3187μPD70F3447
AV
DD
AV
SS0
AV
SS1
V
to V
V
V
V
CV
CV
DD10
SS10
DD30
SS30
DD
SS
to V
to V
to V
DD15
SS15
DD37
SS37
Chapter 2 Pin Functions
Table 2-4: I/O Circuit Types (4/4)
–
Pin must be used in the intended way
User’s Manual U16580EE3V1UD00
79
Chapter 2 Pin Functions
Figure 2-1: Pin I/O Circuits
Type 1
V
DD
IN
P-ch
N-ch
Type 2
IN
Schmitt trigger input with hysteresis characteristics
Type 5
data
output
disable
input
enable
Type 5-K
data
output
disable
input
enable
V
V
DD
P-ch
N-ch
DD
P-ch
N-ch
IN/OUT
IN/OUT
Type 2-I
IN
Schmitt trigger input with hysteresis characteristics
Type 3
V
DD
P-ch
N-ch
OUT
Type 7
IN
P-ch
N-ch
V
(threshold voltage)
REF
comparator
80
User’s Manual U16580EE3V1UD00
Chapter 2 Pin Functions
2.5 Noise Suppression
The V850E/PH2 has a digital or analog delay circuits for noise suppression on all edge sensitive inputs.
The digital delay circuit suppresses input pulses shorter than the internally generated edge detection
signal to assure the hold time for these signals. The noise suppression is only effective on alternate pin
functions, and it is not effective when the port input function is selected.
Table 2-5: Noise Suppression Timing
Pin FunctionNoise removal timeClock Source
NMI 4 to 5 clocks f
INTP0, INTP1, ESO0, ESO1Analog delay (60ns to 200ns)
The NRC register specifies the noise removal clock setting for different edge sensitive inputs.
This register can be read or written in 8-bit or 1-bit units.
Reset input clears this register to 00H.
Figure 2-2: Noise Removal Time Control Register (1/2)
After reset:00HR/WAddress: FFFFF7A0H
76543210
NRCNCR7NCR6NCR5NCR4NCR3NCR2NCR1NCR0
NCR7Noise removal clock setting for input pins TIR10 to TIR13, TEVTR1, TTRGR1
Note: Input pins TIC00, TIC01, TCRL0, TCUD0, and TIUD0 are not available on μPD70F3447
82
User’s Manual U16580EE3V1UD00
Chapter 2 Pin Functions
Figure 2-2: Noise Removal Time Control Register (2/2)
NCR1Noise removal clock setting for input pins INTP2 to INTP11, ADTRG0,
ADTRG1
0fXX/16
1fXX/64
NCR0Noise removal clock setting for NMI input pin
0f
1fXX/64
XX
/16
User’s Manual U16580EE3V1UD00
83
[MEMO]
Chapter 2 Pin Functions
84
User’s Manual U16580EE3V1UD00
Chapter 3CPU Functions
The CPU of the V850E/PH2 microcontroller is based on the RISC architecture and executes most
instructions in one clock cycle by using a 5-stage pipeline control.
•Multiply/divide instructions (32 bits × 32 bits → 64 bits in 1 to 2 clocks)
•Saturated operation instructions
•Floating point arithmetic unit (single precision, 32 bits, IEEE754-85 standard)
•32-bit shift instruction: 1 clock
•Load/store instruction with long/short format
•Four types of bit manipulation instructions
- SET1
- CLR1
-NOT1
-TST1
User’s Manual U16580EE3V1UD00
85
Chapter 3 CPU Functions
3.2 CPU Register Set
The CPU registers of the V850E/PH2 can be classified into three categories: a general-purpose program register set, a dedicated system register set and a dedicated floating point arithmetic register set.
All the registers have 32-bit width.
In addition, the V850E/PH2 contains special system control registers that should be initialized before
CPU operation, and a specific register controlling its clock.
For detailed description of V850E1 core, refer to V850E1 Core Architecture Manual and the
addendum for floating point arithmetic.
Figure 3-1: CPU Register Set
(1) Program register set(2) System register set
310
r0(Zero register)
r1(Assembler-reserved register)
r2
r3
r4
r5(Text pointer (TP))
r6
r7
r8
r9
r10
r11
r12
r13
r14
r15
r16
r17
r18
r19
r20
r21
r22
r23
r24
r25
r26
r27
r28
r29
r30(Element pointer (EP))
r31(Link pointer (LP))
310
PC(Program counter)
(Stack pointer (SP))
(Global pointer (GP))
310
EIPC
EIPSW
FEPC
FEPSW
ECR
PSW(Program status word)
CTPC
CTPSW
DBPC
DBPSW
CTBP(CALLT base pointer)
(Status saving register during interrupt)
(Status saving register during interrupt)
(Status saving register during NMI)
(Status saving register during NMI)
(Interrrupt source register)
(Status saving register during CALLT execution)
(Status saving register during CALLT execution)
(Status saving register during exception/debug trap)
(Status saving register during exception/debug trap)
(3) Floating point arithmetic register set
310
EFG
ECT(Control register)
(Flag register)
86
User’s Manual U16580EE3V1UD00
Chapter 3 CPU Functions
3.2.1 Program register set
The program register set includes general-purpose registers and a program counter.
(1) General-purpose registers (r0 to r31)
Thirty-two general-purpose registers, r0 to r31, are available. All of these registers can be used as
a data variable or address variable.
However, r0 and r30 are implicitly used by instructions and care must be exercised when using
these registers. r0 always holds 0 and is used for operations that use 0 or offset 0 addressing. r30
is used as a base pointer when performing memory access with the SLD and SST short
instructions.
Also, r1, r3 to r5, and r31 are implicitly used by the assembler and C compiler. Therefore, before
using these registers, their contents must be saved so that they are not lost, and they must be
restored to the registers after use. There are cases when r2 is used by the real-time OS. If r2 is not
used by the real-time OS, r2 can be used as a variable register.
Table 3-1: Program Registers
NameUsageOperation
r0Zero registerAlways holds 0
r1Assembler-reserved register Working register for generating 32-bit immediate
r2Address/data variable register (when r2 is not used by the real-time OS to be used)
r3Stack pointerUsed to generate stack frame when function is called
r4Global pointerUsed to access global variable in data area
r5Text pointerRegister to indicate the start of the text area (area for placing program
code)
r6 to r29 Address/data variable register
r30Element pointerBase pointer when memory is accessed
r31Link pointerUsed by compiler when calling function
(2) Program counter (PC)
This register holds the address of the instruction under execution. The lower 26 bits of this register
are valid, and bits 31 to 26 are fixed to 0. If a carry occurs from bit 25 to bit 26, it is ignored.
Bit 0 is fixed to 0, and branching to an odd address cannot be performed.
Figure 3-2: Program Counter (PC)
3126 2510
PCFixed to 0Instruction address under execution
0
User’s Manual U16580EE3V1UD00
After reset
00000000H
87
Chapter 3 CPU Functions
3.2.2 System register set
System registers control the status of the CPU and hold interrupt information.
Read from and write to system registers are performed by setting the system register numbers shown
below with the system register load/store instructions (LDSR, STSR instructions).
Table 3-2: System Register Numbers
System Register Operand Specification
Enabled for instruction
No.NameFunctionLDSRSTSR
0EIPC
1EIPSW
2FEPCPC value at NMI handler entryYesYes
3FEPSWPSW value at NMI handler entryYesYes
4ECRException Cause RegisterNoYes
5PSWProgram status wordYesYes
6 to 15-Reserved numbers for future function expansion
16CTPC
17CTPSW
18DBPCPC value at exception/debug trap entryYesYes
19DBPSWPSW value at exception/debug trap entryYesYes
20CTBPCALLT base pointerYesYes
21 to 31-Reserved numbers for future function expansion
PC value at Interrupt handler entry
PSW value at Interrupt handler entry
(The operation is not guaranteed if accessed.)
PC value at CALLT subroutine entry
PSW value at CALLT subroutine entry
(The operation is not guaranteed if accessed.)
Note 1
Note 1
Note 2
Note 2
Ye sYe s
Ye sYe s
NoNo
Ye sYe s
Ye sYe s
NoNo
Notes: 1. Since only one set of registers is available, the contents of these registers must be saved by
the program when multiple interrupt servicing is enabled.
2. Since only one set of registers is available, the contents of these registers must be saved by
the program when CALLT instructions nesting is used.
Caution: Even if bit 0 of EIPC, FEPC, or CTPC is set to (1) by the LDSR instruction, bit 0 is
ignored during return with the RETI instruction following interrupt servicing
(because bit 0 of PC is fixed to 0). If setting a value to EIPC, FEPC, and CTPC, set an
even number (bit 0 = 0).
88
User’s Manual U16580EE3V1UD00
Chapter 3 CPU Functions
(1) Interrupt status saving registers (EIPC, EIPSW)
There are two context saving registers, EIPC and EIPSW.
Upon occurrence of a software exception or a maskable interrupt, the content of the program
counter (PC) is saved to EIPC and the content of the program status word (PSW) is saved to
EIPSW (upon occurrence of a non-maskable interrupt (NMI), the contents are saved to the NMI
status saving registers (FEPC, FEPSW)).
The address of the next instruction following the instruction executed when a software exception or
maskable interrupt occurs is saved to EIPC, except for the DIVH instruction (see Chapter
7 ”Interrupt/Exception Processing Function” on page 219).
Since there is only one set of interrupt status saving registers, the contents of these registers must
be saved by the program when multiple interrupt servicing is enabled.
Bits 31 to 26 of EIPC and bits 31 to 8 of EIPSW are reserved (fixed to 0) for future function
expansion.
Figure 3-3: Interrupt Status Saving Registers (EIPC, EIPSW)
3126 250
EIPC
EIPSW
000000
31870
000000000000000000000000
(PC contents)
(PSW contents)
The values of EIPC and EIPSW are restored to PC and PSW during execution of a RETI
instruction.
After reset
0xxxxxxxH
(x: Undefined)
After reset
000000xxH
(x: Undefined)
User’s Manual U16580EE3V1UD00
89
Chapter 3 CPU Functions
(2) NMI status saving registers (FEPC, FEPSW)
There are two NMI status saving registers, FEPC and FEPSW.
Upon occurrence of a non-maskable interrupt (NMI), the content of the program counter (PC) is
saved to FEPC and the content of the program status word (PSW) is saved to FEPSW.
The address of the next instruction following the instruction executed when a non-maskable
interrupt occurs is saved to FEPC, except for the DIVH instruction.
Bits 31 to 26 of FEPC and bits 31 to 8 of FEPSW are reserved (fixed to 0) for future function
expansion.
Figure 3-4: NMI Status Saving Registers (FEPC, FEPSW)
3126 250
FEPC
FEPSW
000000
31870
000000000000000000000000
(PC contents)
(PSW contents)
The values of FEPC and FEPSW are restored to PC and PSW during execution of a RETI
instruction.
(3) Exception cause register (ECR)
Upon occurrence of an interrupt or an exception, the Exception Cause Register (ECR) holds the
source of the interrupt or the exception. The value held by ECR is an exception code, coded for
each interrupt source. This register is a read-only register, and thus data cannot be written to it
using the LDSR instruction.
Figure 3-5: Interrupt Source Register (ECR)
After reset
0xxxxxxxH
(x: Undefined)
After reset
000000xxH
(x: Undefined)
3116 150
ECRFECCEICC
Bit positionBit nameDescription
31 to 16FECCNon-maskable interrupt (NMI) exception code
15 to 0EICCException, maskable interrupt exception code
The list of exception codes is tabulated in Table 7-1, “Interrupt/Exception Source List,” on
page 219.
90
User’s Manual U16580EE3V1UD00
After reset
00000000H
Chapter 3 CPU Functions
(4) Program status word (PSW)
The program status word (PSW) is a collection of flags that indicate the program status
(instruction execution result) and the CPU status.
When the contents of this register are changed using the LDSR instruction, the new contents
become valid immediately following completion of the LDSR instruction execution. However, if the
ID flag is set to 1, interrupt request acknowledgement during LDSR instruction execution is
prohibited.
Bits 31 to 8 are reserved (fixed to 0) for future function expansion.
Figure 3-6: Program Status Word (PSW)
3126258765 4 3210
PSWRFU
Bit positionBit nameDescription
31 to 8RFUReserved field. Fixed to 0.
7NPIndicates that non-maskable interrupt (NMI) servicing is in progress. This flag is set to
1 when a NMI request is acknowledged, and disables multiple interrupts.
0: NMI servicing not in progress
1: NMI servicing in progress
6EPIndicates that exception processing is in progress. This flag is set to 1 when an
exception occurs. Moreover, interrupt requests can be acknowledged even when this
bit is set.
0: Exception processing not in progress
1: Exception processing in progress
5IDIndicates whether maskable interrupt request acknowledgment is enabled.
0: Interrupt enabled
1: Interrupt disabled
Note
4
3CYIndicates whether carry or borrow occurred as the result of an operation.
2
1
0ZIndicates whether operation result is 0.
SAT
OV
S
Note
Indicates that the result of executing a saturated operation instruction has overflowed
and that the calculation result is saturated. Since this is a cumulative flag, it is set to 1
when the result of a saturated operation instruction becomes saturated, and it is not
cleared to 0 even if the operation results of successive instructions do not become
saturated. This flag is neither set nor cleared when arithmetic operation instructions
are executed.
0: Not saturated
1: Saturated
0: No carry or borrow occurred
1: Carry or borrow occurred
Note
Indicates whether overflow occurred during an operation.
0: No overflow occurred
1: Overflow occurred.
Indicates whether the result of an operation is negative.
0: Operation result is positive or 0.
1: Operation result is negative.
0: Operation result is not 0.
1: Operation result is 0.
NP EP ID SAT CY OV S
Z
After reset
00000020H
Note: During saturated operation, the saturated operation results are determined by the contents of
the OV flag and S flag. The SAT flag is set to 1 only when the OV flag is set to 1 during
saturated operation. This is explained on the following table.
User’s Manual U16580EE3V1UD00
91
Chapter 3 CPU Functions
Table 3-3:Saturated Operation Results
Operation result statusFlag statusSaturated
SATOVS
Maximum positive value exceeded1107FFFFFFFH
Maximum negative value exceeded11180000000H
Positive (maximum value not exceeded)Holds value
Negative (maximum value not exceeded)1
before operation
00Actual
operation result
operation result
(5) CALLT execution status saving registers (CTPC, CTPSW)
There are two CALLT execution status saving registers, CTPC and CTPSW.
When the CALLT instruction is executed, the contents of the program counter (PC) are saved to
CTPC, and the program status word (PSW) contents are saved to CTPSW.
The contents saved to CTPC consist of the address of the next instruction after the CALLT
instruction.
Bits 31 to 26 CTPC and bits 31 to 8 of CTPSW are reserved (fixed to 0) for future function
expansion.
Figure 3-7: CALLT Execution Status Saving Registers (CTPC, CTPSW)
3126 250
CTPC
CTPSW
000000
31870
000000000000000000000000
(PC contents)
(x: Undefined)
(PSW contents)
(x: Undefined)
The values of CTPC and CTPSW are restored to PC and PSW during execution of the CTRET
instruction.
After reset
0xxxxxxxH
After reset
000000xxH
92
User’s Manual U16580EE3V1UD00
Chapter 3 CPU Functions
(6) Exception/debug trap status saving registers (DBPC, DBPSW)
There are two exception/debug trap status saving registers, DBPC and DBPSW.
Upon occurrence of an exception trap or debug trap, the contents of the program counter (PC) are
saved to DBPC, and the program status word (PSW) contents are saved to DBPSW.
The contents saved to DBPC consist of the address of the next instruction after the instruction
executed when an exception trap or debug trap occurs.
Bits 31 to 26 of DBPC and bits 31 to 8 of DBPSW are reserved (fixed to 0) for future function
expansion.
Figure 3-8: Exception/Debug Trap Status Saving Registers (DBPC, DBPSW)
3126 250
DBPC
DBPSW
000000
31870
000000000000000000000000
(PC contents)
(PSW contents)
The values of DBPC and DBPSW are restored to PC and PSW during execution of the DBRET
instruction.
(7) CALLT base pointer (CTBP)
The CALLT base pointer (CTBP) is used to specify CALLT table start address and generate target
addresses (bit 0 is fixed to 0).
Bits 31 to 26 are reserved (fixed to 0) for future function expansion.
Figure 3-9: CALLT Base Pointer (CTBP)
After reset
0xxxxxxxH
(x: Undefined)
After reset
000000xxH
(x: Undefined)
CTBP
3126 2510
000000
(Base address)
0
(x: Undefined)
User’s Manual U16580EE3V1UD00
After reset
0xxxxxxxH
93
Chapter 3 CPU Functions
3.2.3 Floating point arithmetic unit register set
The floating point arithmetic unit is provided with one flag register and one control register.
Table 3-4:Floating Point Arithmetic Unit Registers
NameUsageOperation
ECTControl registerSets the operation of the EFG register
EFGFlag registerHolds the status of the FPU
(1) Floating point arithmetic control register (ECT)
This register is used for controlling the setting conditions of the TR flag:
TR is a logical OR between all the invalid operations the FPU can detect and each bit of ECT is a
mask bit for each condition.
Figure 3-10: Floating Point Arithmetic Control Register (ECT)
311312111098765 4 3210
ECTRFU
ITZTVTUTPT000 0 000
0
After reset
00000000H
Bit positionBit nameDescription
31 to 13RFUReserved field. Fixed to 0.
12ITEnables invalid operation detection in the TR value calculation
0: IV is set when an invalid operation is detected
1: IV and TR are set when an invalid operation is detected
11ZTEnables zero divide operation detection in the TR value calculation
0: ZD is set when a zero divide operation is detected
1: ZD and TR are set when a zero divide operation is detected
10VTEnables overflow detection in the TR value calculation
0: VF is set when an overflow is detected
1: VF and TR are set when an overflow is detected
9UTEnables underflow detection in the TR value calculation
0: UD is set when an underflow is detected
1: UD and TR are set when an underflow is detected
8PTEnables accuracy fail detection in the TR value calculation
0: PR is set when an accuracy fail is detected
1: PR and TR are set when an accuracy fail is detected
7 to 00Reserved field. Fixed to 0.
94
User’s Manual U16580EE3V1UD00
Chapter 3 CPU Functions
(2) Floating point arithmetic status register (EFG)
Figure 3-11: Floating Point Arithmetic Status Register (EFG)
31141312111098765 4 3210
EFGRFU
Bit positionBit nameDescription
31 to 14RFUReserved field. Fixed to 0.
13RORunning Operation: indicates whether the floating point arithmetic unit is running
0: operation in progress
1: FPU idle
12IVInValid operation: Indicates that an invalid operation has been requested.
0: normal operation
1: invalid operation detected
11ZDZero Divide: Indicates whether a division by 0 has been detected.
0: normal operation
1: division by 0 detected
10VFoVerFlow: indicates that the result of executing a floating point operation has
overflowed.
0: no overflow generated
1: overflow generated
9UDUndervalue: indicates that the result of executing a floating point operation has
underflowed.
0: no underflow generated
1: underflow generated
8PRPRecision error: indicates that an accuracy failure occurred.
0: no accuracy failure occurred
1: accuracy failure occurred
7 to 50Reserved field. Fixed to 0.
4TRThis flag summarizes the state of the FPU:
0: normal state
1: abnormal condition detected: one of the bits 13 to 8 is set.
The setting conditions of this flag depends on the ECT register value.
30Reserved field. Fixed to 0.
2OVIndicates whether an overflow occurred during floating point to integer conversion
0: no overflow generated
1: overflow generated
1SIndicates whether floating point operation result is negative.
0: Operation result is not negative.
1: Operation result is negative.
0ZIndicates whether floating point operation result is 0.
0: Operation result is not 0.
1: Operation result is 0.
RO IV ZD VF UD PR 000TR0 OV S
After reset
Z
00000000H
User’s Manual U16580EE3V1UD00
95
Chapter 3 CPU Functions
3.3 Operating Modes
The V850E/PH2 has the following operating modes.
3.3.1 Operating modes outline
(1) Normal operating mode
(a) Single-chip mode 0
Access to the internal ROM is enabled.
In single-chip mode 0, after the system reset is released, each pin related to the bus interface
enters the port mode, program execution branches to the reset entry address of the internal ROM,
and instruction processing starts. By setting the PMCDH, PMCDL, PMCCS, PMCCT, and PMCCM
registers to control mode by instruction, an external device can be connected to the external memory area.
(b) Single-chip mode 1 (μPD70F3187 only)
Note
In single-chip mode 1
enters the control mode, program execution branches to the external device’s (memory) reset
entry address, and instruction processing starts. The internal ROM area is mapped from address
100000H.
, after the system reset is released, each pin related to the bus interface
(c) ROM-less mode (μPD70F3187 only)
After the system reset is released, each pin related to the bus interface enters the control mode,
program execution branches to the external device’s (memory) reset entry address, and
instruction processing starts. Fetching of instructions and data access for internal ROM becomes
impossible.
In ROM-less mode the data bus width is 32 bits.
(2) Flash memory programming mode
In this mode the internal flash memory can be written or erased with an external flash writer, using
the CSIB0 or UARTC0 as serial interface.
Note: Single-chip mode 1 is not available on μPD70F3447.
96
User’s Manual U16580EE3V1UD00
Chapter 3 CPU Functions
3.3.2 Operation mode specification
The operation mode is specified according to the status of pins MODE0 to MODE2. In an
application system fix the specification of these pins and do not change them during operation.
Operation is not guaranteed if these pins are changed during operation.
MODE2 MODE1MODE0ModeRemark
LLLSingle chip mode 0Internal ROM area is allocated from
address 00000000H.
LLHFlash memory programming modeCSIB0/IUARTC0 selected by
MODE0 pin toggling.
LHL
LHH
other value than aboveSetting prohibited
ROM-less mode
Single chip mode 1
Note 2
Note 1
External 32-bit data bus
Internal ROM area is allocated from
address 00100000H.
External 32-bit data bus
Remark:L: Low-level input
H: High-level input
Notes: 1. Single-chip mode 1 is not available on μPD70F3447.
2. ROM-less mode is not available on μPD70F3447.
User’s Manual U16580EE3V1UD00
97
Chapter 3 CPU Functions
3.4 Address Space
3.4.1 CPU address space
The CPU of the V850E/PH2 uses a 32-bit architecture and supports up to 4 GB of linear address space
(data space) during operand addressing (data access). When addressing instructions, a linear address
space (program space) of up to 64 MB is supported. However, both the program and data spaces
include areas whose use is prohibited.
For details, refer to Figure 3-13, “Address Space Image,” on page 99.
Figure 3-12 shows the CPU address space.
Figure 3-12: CPU Address Space
CPU address space
FFFFFFFFH
04000000H
03FFFFFFH
00000000H
Data area
(4 GB linear)
Program area
(64 MB linear)
98
User’s Manual U16580EE3V1UD00
Chapter 3 CPU Functions
3.4.2 Images
When addressing an instruction address, up to 64 MB of linear address space (program space) and
Internal RAM area are supported.
For operand addressing (data access), up to 4 GB of linear address space (data area) is supported. On
this 4 GB address space, however, 256 MB physical address spaces can be seen as an image.
Therefore, whatever the values of bits 31 to 29 of an address may be, a physical address space of the
same 256 MB is accessed.
Figure 3-13: Address Space Image
CPU address space
FFFFFFFFH
Image
F0000000H
EFFFFFFFH
E0000000H
DFFFFFFFH
20000000H
1FFFFFFFH
10000000H
0FFFFFFFH
00000000H
Image
Image
Image
Image
Physical address space
Peripheral I/O
Internal RAM
External memory
Internal ROM
FFFFFFFH
0000000H
User’s Manual U16580EE3V1UD00
99
Chapter 3 CPU Functions
3.4.3 Wrap-around of CPU address space
(1) Program space
Of the 32 bits of the program counter (PC), the higher 6 bits are fixed to 0 and only the lower
26 bits are valid. Even if a carry or borrow occurs from bit 25 to bit 26 as a result of branch address
calculation, the higher 6 bits ignore this and remain 0.
Therefore, the lower-limit address of the program space, 00000000H, and the upper-limit address,
03FFFFFFH, are contiguous addresses, and the program space is wrapped around at the
boundary of these addresses.
Caution: No instructions can be fetched from the 4 KB area of 03FFF000H to 03FFFFFFH
because this area is a peripheral I/O area. Therefore, do not execute any branch
operation instructions in which the destination address will reside in any part of this
area.
Figure 3-14: Program Space
03FFFFFEH
03FFFFFFH
00000000H
00000001H
Program space
(+) direction(–) direction
Program space
(2) Data space
The result of an operand address calculation that exceeds 32 bits is truncated to 32 bits.
Therefore, the lower-limit address of the data space, address 00000000H, and the upper-limit
address, FFFFFFFFH, are contiguous addresses, and the data space is wrapped around at the
boundary of these addresses.
Figure 3-15: Data Space
100
FFFFFFFEH
FFFFFFFFH
00000000H
00000001H
Data space
(+) direction(–) direction
Data space
User’s Manual U16580EE3V1UD00
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.