All information contained in these materials, including products and product specifications,
represents information on the product at the time of publication and is subject to change by
Renesas Electronics Corp. without notice. Please review the latest information published by
Renesas Electronics Corp. through various means, including the Renesas Electronics Corp.
website (http://www.renesas.com).
www.renesas.com
Rev.3.00 Aug 2012
Notice
1. Descriptions of circuits, software and other related information in this document are provided only to illustrate the operation of
semiconductor products and application examples. You are fully responsible for the incorporation of these circuits, software,
and information in the design of your equipment. Renesas Electronics assumes no responsibility for any losses incurred by you
or third parties arising from the use of these circuits, software, or information.
2. Renesas Electronics has used reasonable care in preparing the information included in this document, but Renesas Electronics
does not warrant that such information is error free. Renesas Electronics assumes no liability whatsoever for any damages
incurred by you resulting from errors in or omissions from the information included herein.
3. Renesas 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 Renesas Electronics products or technical information described in this document. No
license, express, implied or otherwise, is granted hereby under any patents, copyrights or other intellectual property rights of
Renesas Electronics or others.
4. You should not alter, modify, copy, or otherwise misappropriate any Renesas Electronics product, whether in whole or in part.
Renesas Electronics assumes no responsibility for any losses incurred by you or third parties arising from such alteration,
modification, copy or otherwise misappropriation of Renesas Electronics product.
5. Renesas Electronics products are classified according to the following two quality grades: “Standard” and “High Quality”. The
recommended applications for each Renesas Electronics product depends on the product’s quality grade, as indicated below.
“Standard”: Computers; office equipment; communications equipment; test and measurement equipment; audio and visual
equipment; home electronic appliances; machine tools; personal electronic equipment; and industrial robots etc.
Renesas Electronics products are neither intended nor authorized for use in products or systems that may pose a direct threat to
human life or bodily injury (artificial life support devices or systems, surgical implantations etc.), or may cause serious property
damages (nuclear reactor control systems, military equipment etc.). You must check the quality grade of each Renesas
Electronics product before using it in a particular application. You may not use any Renesas Electronics product for any
application for which it is not intended. Renesas Electronics shall not be in any way liable for any damages or losses incurred
by you or third parties arising from the use of any Renesas Electronics product for which the product is not intended by Renesas
Electronics.
6. You should use the Renesas Electronics products described in this document within the range specified by Renesas Electronics,
especially with respect to the maximum rating, operating supply voltage range, movement power voltage range, heat radiation
characteristics, installation and other product characteristics. Renesas Electronics shall have no liability for malfunctions or
damages arising out of the use of Renesas Electronics products beyond such specified ranges.
7. Although Renesas Electronics endeavors to improve the quality and reliability of its products, semiconductor products have
specific characteristics such as the occurrence of failure at a certain rate and malfunctions under certain use conditions. Further,
Renesas Electronics products are not subject to radiation resistance design. Please be sure to implement safety measures to
guard them against the possibility of physical injury, and injury or damage caused by fire in the event of the failure of a Renesas
Electronics product, such as safety design for hardware and software including but not limited to redundancy, fire control and
malfunction prevention, appropriate treatment for aging degradation or any other appropriate measures. Because the evaluation
of microcomputer software alone is very difficult, please evaluate the safety of the final products or systems manufactured by
you.
8. Please contact a Renesas Electronics sales office for details as to environmental matters such as the environmental compatibility
of each Renesas Electronics product. Please use Renesas Electronics products in compliance with all applicable laws and
regulations that regulate the inclusion or use of controlled substances, including without limitation, the EU RoHS Directive.
Renesas Electronics assumes no liability for damages or losses occurring as a result of your noncompliance with applicable laws
and regulations.
9. Renesas Electronics products and technology may not be used for or incorporated into any products or systems whose
manufacture, use, or sale is prohibited under any applicable domestic or foreign laws or regulations. You should not use
Renesas Electronics products or technology described in this document for any purpose relating to military applications or use
by the military, including but not limited to the development of weapons of mass destruction. When exporting the Renesas
Electronics products or technology described in this document, you should comply with the applicable export control laws and
regulations and follow the procedures required by such laws and regulations.
10. It is the responsibility of the buyer or distributor of Renesas Electronics products, who distributes, disposes of, or otherwise
places the product with a third party, to notify such third party in advance of the contents and conditions set forth in this
document, Renesas Electronics assumes no responsibility for any losses incurred by you or third parties as a result of
unauthorized use of Renesas Electronics products.
11. This document may not be reproduced or duplicated in any form, in whole or in part, without prior written consent of Renesas
Electronics.
12. Please contact a Renesas Electronics sales office if you have any questions regarding the information contained in this document
or Renesas Electronics products, or if you have any other inquiries.
(Note 1) “Renesas Electronics” as used in this document means Renesas Electronics Corporation and also includes its majority-
owned subsidiaries.
(Note 2) “Renesas Electronics product(s)” means any product developed or manufactured by or for Renesas Electronics.
(2012.4)
NOTES FOR CMOS DEVICES
1
VOLTAGE APPLICATION WAVEFORM AT INPUT PIN
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
IH
(MIN).
V
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.
5
POWER ON/OFF SEQUENCE
In the case of a device that uses different power supplies for the internal operation and external
interface, as a rule, switch on the external power supply after switching on the internal power supply.
When switching the power supply off, as a rule, switch off the external power supply and then the
internal power supply. Use of the reverse power on/off sequences may result in the application of an
overvoltage to the internal elements of the device, causing malfunction and degradation of internal
elements due to the passage of an abnormal current.
The correct power on/off sequence must be judged separately for each device and according to related
specifications governing the device.
6
INPUT OF SIGNAL DURING POWER OFF STATE
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.
How to Use This Manual
ReadersThis manual is intended for users who wish to understand the functions of the
V850ES/JG3-L and design application systems using these products.
PurposeThis manual is intended to give users an understanding of the hardware functions of the
V850ES/JG3-L shown in the Organization below.
Organization This manual is divided into two parts: Hardware (this manual) and Architecture (V850ES
Architecture User’s Manual).
Hardware Architecture
• Pin functions • Data types
• CPU function • Register set
• On-chip peripheral functions • Instruction format and instruction set
• Flash memory programming • Interrupts and exceptions
• Electrical specifications • Pipeline operation
How to Read This ManualIt is assumed that the readers of this manual have general knowledge in the fields of
electrical engineering, logic circuits, and microcontrollers.
To understand the overall functions of the V850ES/JG3-L
→ Read this manual according to the CONTENTS.
To find the details of a register where the name is known
→ Use APPENDIX C REGISTER INDEX.
Register format
→ The name of the bit whose number is in angle brackets (<>) in the figure of the register
format of each register is defined as a reserved word in the device file.
To understand the details of an instruction function
→ Refer to the V850ES Architecture User’s Manual available separately.
To know the electrical specifications of the V850ES/JG3-L
→See CHAPTER 33 ELECTRICAL SPECIFICATIONS (
70F3796)
CHAPTER 34 ELECTRICAL SPECIFICATIONS (
The “yyy bit of the xxx register” is described as the “xxx.yyy bit” in this manual. Note with
caution that if “xxx.yyy” is described as is in a program, however, the compiler/assembler
cannot recognize it correctly.
μ
PD70F3843, 70F3844)
μ
PD70F3794, 70F3795,
The mark <R> shows major revised points. The revised points can be easily searched
by copying an “<R>” in the PDF file and specifying it in the “Find what: ” field.
Conventions Data significance: Higher digits on the left and lower digits on the right
Active low representation: xxx (overscore over pin or signal name)
Memory map address: Higher addresses on the top and lower addresses on the
bottom
Note: Footnote for item marked with Note in the text
Caution: Information requiring particular attention
Remark: Supplementary information
Numeric representation: Binary ... xxxx or xxxxB
Decimal ... xxxx
Hexadecimal ... xxxxH
Prefix indicating power of 2 (address space, memory capacity):
K (kilo): 2
M (mega): 2
G (giga): 2
10
= 1,024
20
= 1,0242
30
= 1,024
3
Related Documents The related documents indicated in this publication may include preliminary versions.
However, preliminary versions are not marked as such.
Documents related to V850ES/JG3-L
Document Name Document No.
V850ES Architecture User’s Manual U15943E
V850ES/JG3-L (on-chip USB controller) Hardware User’s Manual This manual
1.6.2 Internal units ...................................................................................................................................31
3.4.3 Areas ..............................................................................................................................................63
3.4.4 Wraparound of data space..............................................................................................................70
3.4.5 Recommended use of address space.............................................................................................70
3.4.7 Special registers .............................................................................................................................85
3.4.8 Registers to be set first ...................................................................................................................89
CHAPTER 4 PORT FUNCTIONS ........................................................................................................... 92
4.1 Features .................................................................................................................................... 92
4.2 Basic Port Configuration......................................................................................................... 92
4.3 Port Configuration ................................................................................................................... 93
4.3.1 Port 0 ..............................................................................................................................................99
4.3.2 Port 1 ............................................................................................................................................103
4.3.3 Port 3 ............................................................................................................................................105
4.3.4 Port 4 ............................................................................................................................................111
4.3.5 Port 5 ............................................................................................................................................113
4.3.6 Port 7 ............................................................................................................................................118
4.3.7 Port 9 ............................................................................................................................................120
4.3.8 Port CM.........................................................................................................................................128
4.3.9 Port CT .........................................................................................................................................130
4.3.10 Port DH .........................................................................................................................................132
4.3.11 Port DL..........................................................................................................................................134
16.6.1 Data format ...................................................................................................................................558
17.6.1 Data format ...................................................................................................................................597
19.6.6 Wait state ......................................................................................................................................703
19.6.7 Wait state cancellation method .....................................................................................................705
20.5.2 Other requests ..............................................................................................................................766
22.2.3 NP flag ..........................................................................................................................................974
22.3.7 ID flag ...........................................................................................................................................987
22.4.3 EP flag ..........................................................................................................................................990
32.3 ROM Security Function ....................................................................................................... 1127
32.3.1 Security ID ..................................................................................................................................1127
33.7.3 Bus timing ...................................................................................................................................1146
33.7.4 Power on/power off/reset timing..................................................................................................1153
33.8 Peripheral Function Characteristics .................................................................................. 1154
34.7.3 Bus timing ...................................................................................................................................1180
34.7.4 Power on/power off/reset timing..................................................................................................1187
34.8 Peripheral Function Characteristics .................................................................................. 1188
R01UH0001EJ0300 Rev.3.00 Page 24 of 1248
Aug 3, 2012
V850ES/JG3-L CHAPTER 1 INTRODUCTION
1.3 Application Fields
Equipment requiring a USB interfaces such as PC peripheral device, ECR peripheral device (bar code scanner, IC card
reader/writer, printer, etc), industrial instrument, etc
R01UH0001EJ0300 Rev.3.00 Page 28 of 1248
Aug 3, 2012
V850ES/JG3-L CHAPTER 1 INTRODUCTION
Pin functions
<R>
A16 to A21:
AD0 to AD15:
ADTRG:
ANI0 to ANI11:
ANO0, ANO1:
ASCKA0:
ASTB:
AV
REF0, AVREF1:
AVSS:
CLKOUT:
DCK:
DDI:
DDO:
DMS:
DRST:
EV
DD:
EV
SS:
FLMD0, FLMD1:
HLDAK:
HLDRQ:
IC:
INTP0 to INTP7:
KR0 to KR7:
NMI:
P02 to P06:
P10, P11:
P30 to P32:
P36 to P39
P40 to P42:
P50 to P55:
P70 to P711:
P90 to P915:
PCM0 to PCM3:
PCT0, PCT1,
PCT4, PCT6:
PDH0 to PDH4
PDL0 to PDL15:
RD:
REGC:
RESET:
Address bus
Address/data bus
A/D trigger input
Analog input
Analog output
Asynchronous serial clock
Address strobe
Analog reference voltage
Analog V
SS
Clock output
Debug clock
Debug data input
Debug data output
Debug mode select
Debug reset
Power supply for external pin
Ground for external pin
Flash programming mode
Hold acknowledge
Hold request
Internal Connected
External interrupt input
Key return
Non-maskable interrupt request
Port 0
Port 1
Port 3
Port 4
Port 5
Port 7
Port 9
Port CM
Port CT
Port DH
Port DL
Read strobe
Regulator control
Reset
RTC1HZ,
RTCCL, RTCDIV
RTP00 to RTP05:
RV
DD
RXDA0 to RXDA5:
RXDC0:
SCKB0 to SCKB4:
SCL00 to SCL02:
SDA00 to SDA02:
SIB0 to SIB4:
SOB0 to SOB4:
TIP00,
TIP20, TIP21,
TIP30, TIP31,
TIP40, TIP41,
TIP50, TIP51,
TIQ00 to TIQ03:
TOP00,
TOP20, TOP21,
TOP30, TOP31,
TOP40, TOP41,
TOP50, TOP51,
TOQ00 to TOQ03:
TXDA0 to TXDA5:
TXDC0:
UCLK:
UDMF:
UDPF:
UV
DD:
VDD:
V
SS:
WAIT:
WR0:
WR1:
X1, X2:
XT1, XT2:
Real-time Counter Clock Output
Real-time output port
Power Supply for RTC
Receive data
Serial clock
Serial clock
Serial data
Serial input
Serial output
Timer input
Timer output
Transmit data
USB clock
USB data I/O (−) function
USB data I/O (+) function
Power supply for external USB
Power supply
Ground
Wait
Lower byte write strobe
Upper byte write strobe
Crystal for main clock
Crystal for subclock
R01UH0001EJ0300 Rev.3.00 Page 29 of 1248
Aug 3, 2012
V850ES/JG3-L CHAPTER 1 INTRODUCTION
1.6 Function Block Configuration
1.6.1 Internal block diagram
<R>
Timer/counter function
TIP00, TIP20 to TIP50,
TIP21 to TIP51
TOP00, TOP20 to TOP50,
TOP21 to TOP51
TIQ00 to TIQ03
TOQ00 to TOQ03
16-bit timer/
event counter P:
5 ch
16-bit timer/
event counter Q:
1 ch
16-bit interval
timer M:
1 ch
Watchdog
timer 2: 1ch
Watch timer:
1ch
ROMRAM
Note 1
CPU
Multiplier
16 × 16 → 32
ALU
32-bit barrel
registers 32 bits × 32
Note 2
PC
shifter
System
registers
General-purpose
DMA
BCU
HLDRQ
HLDAK
ASTB
RD
WAIT
WR0, WR1
A16 to A21
AD0 to AD15
Expanded
internal RAM
Note 3
(24KB)
RTC1HZ
RTCCL
RTCDIV
RTP00 to RTP05RTO : 1 ch
Serial interface function
SOB0 to SOB4
SIB0 to SIB4
SCKB0 to SCKB4
SDA00 to SDA02
SCL00 to SCL02
TXDA0 to TXDA5
RXDA0 to RXDA5
ASCKA0
TXDC0
RXDC0
UDMF
UDPF
Real-time
counter:
1 ch
CSIB: 5 ch
2
C: 3 ch
I
UARTA:
6 ch
UARTC:
1 ch
USB function
CRC
Ports
P50 to P55
P40 to P42
P90 to P915
P70 to P711
PDH0 to PDH4
PCM0 to PCM3
PDL0 to PDL15
PCT0, PCT1, PCT4, PCT6
Interrupt function
INTC
Key interrupt
function
Debug function
DCU
P30 to P32, P36 to P39
NMI
INTP0 to INTP7
KR0 to KR7
DRST
DMS
DDI
DCK
DDO
converter
P10, P11
P02 to P06
REF1
AV
A/D
converter
ADTRG
D/A
ANO0, ANO1
SS
REF0
AV
AV
ANI0 to ANI11
Regulator
Flash
controller
UV
EV
EV
PLL
CG
Internal
oscillator
CLM
LVI
Regulator
DD
DD
SS
CLKOUT
X1
X2
XT1
XT2
RESET
FLMD0
FLMD1
V
DD
V
SS
REGC
RV
DD
Notes1.
μ
PD70F3794: 256 KB
μ
PD70F3795: 384 KB
μPD70F3796: 512 KB
2.
μ
PD70F3843: 768 KB
μ
PD70F3844: 1 MB
μ
PD70F3794, 70F3795, 70F3796: 40 KB
μ
PD70F3843, 70F3844: 56 KB
3.
μ
PD70F3843, 70F3844 only
R01UH0001EJ0300 Rev.3.00 Page 30 of 1248
Aug 3, 2012
V850ES/JG3-L CHAPTER 1 INTRODUCTION
1.6.2 Internal 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) and a barrel shifter (32 bits)
contribute to faster complex processing.
(2) Bus control unit (BCU)
The BCU starts a required external bus cycle based on the physical address obtained by the CPU. When an
instruction is fetched from external memory space 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.
(3) Flash memory (ROM)
This is a 1 M/768 K/512 K/384 K/256 KB flash memory mapped to addresses 0000000H to 00FFFFFH/0000000H
to 00BFFFFH/0000000H to 007FFFFH/0000000H to 005FFFFH/0000000H to 003FFFFH.
It can be accessed from the CPU in one clock during instruction fetch.
(4) RAM
This is a 80
/3FF5000H to 3FFEFFFH. It can be accessed from the CPU in one clock during data access.
Note Including 24 KB of expanded internal RAM area.
(5) Interrupt controller (INTC)
This controller handles hardware interrupt requests (NMI, INTP0 to INTP7) from on-chip peripheral hardware and
external hardware. Eight levels of interrupt priorities can be specified for these interrupt requests, and multiplexed
interrupt servicing control can be performed.
(6) Clock generator (CG)
A main clock oscillator and subclock oscillator are provided and generate the main clock oscillation frequency (f
and subclock frequency (f
clock frequency (f
The CPU clock frequency (fCPU) can be selected from among fXX, fXX/2, fXX/4, fXX/8, fXX/16, fXX/32, and fXT.
(7) Internal oscillator
An internal oscillator is provided on chip. The oscillation frequency is 220 kHz (TYP). The internal oscillator
supplies the clock for watchdog timer 2 and timer M.
(8) Timer/counter
Six-channel 16-bit timer/event counter P (TMP), one-channel 16-bit timer/event counter Q (TMQ), and one-channel
16-bit interval timer M (TMM), are provided on chip.
(9) Watch timer
This timer counts the reference time period (0.5 s) for counting the clock (the 32.768 kHz subclock or the 32.768
kHz f
BRG clock from the prescaler). The watch timer can also be used as an interval timer based on the main clock.
Note
/40 KB RAM mapped to addresses 3FF1000H to 03FFEFFFH + 03FA000H to 03FFFFFH
XT), respectively. There are two modes: In the clock-through mode, fX is used as the main
XX) as is. In the PLL mode, fX is used multiplied by 4.
X)
R01UH0001EJ0300 Rev.3.00 Page 31 of 1248
Aug 3, 2012
V850ES/JG3-L CHAPTER 1 INTRODUCTION
(10) Real-time counter (for watch)
The real-time counter counts the reference time (one second) for watch counting based on the subclock (32.768
kHz) or main clock. This can simultaneously be used as the interval timer based on the main clock. Hardware
counters dedicated to year, month, day of week, day, hour, minute, and second are provided, and can count up to
99 years.
(11) Watchdog timer 2
A watchdog timer is provided on chip to detect inadvertent program loops, system abnormalities, etc.
The internal oscillator clock, the main clock, or the subclock can be selected as the source clock.
Watchdog timer 2 generates a non-maskable interrupt request signal (INTWDT2) or a system reset signal
(WDT2RES) after an overflow occurs.
(12) Serial interface
The V850ES/JG3-L includes three kinds of serial interfaces: asynchronous serial interface A (UARTA), 3-wire
variable-length serial interface B (CSIB), and an I
In the case of UARTA, data is transferred via the TXDA0 to TXDA2 pins and RXDA0 to RXDA2 pins.
In the case of CSIB, data is transferred via the SOB0 to SOB4 pins, SIB0 to SIB4 pins, and SCKB0 to SCKB4
pins.
In the case of I
2
C, data is transferred via the SDA00 to SDA02 and SCL00 to SCL02 pins.
In the case of USBF, data is transferred via the UDMF and UDPF pins.
(13) A/D converter
This 10-bit A/D converter includes 12 analog input pins. Conversion is performed using the successive
approximation method.
(14) D/A converter
A two-channel, 8-bit-resolution D/A converter that uses the R-2R ladder method is provided on chip.
(15) DMA controller
A 4-channel DMA controller is provided on chip. This controller transfers data between the internal RAM and on-
chip peripheral I/O devices in response to interrupt requests sent by on-chip peripheral I/O.
(16) Key interrupts function
A key interrupt request signal (INTKR) can be generated by inputting a falling edge to the key input pins (8
channels).
(17) Real-time output function
The real-time output function transfers preset 6-bit data to output latches upon the occurrence of a timer compare
register match signal.
(18) CRC function
A CRC operation circuit that generates a 16-bit CRC (Cyclic Redundancy Check) code upon the setting of 8-bit
data is provided on-chip.
2
C bus interface (I2C), USB function controller (USBF).
R01UH0001EJ0300 Rev.3.00 Page 32 of 1248
Aug 3, 2012
V850ES/JG3-L CHAPTER 1 INTRODUCTION
(19) DCU (debug control unit)
An on-chip debug function that uses the JTAG (Joint Test Action Group) communication specifications is provided.
Switching between the normal port function and on-chip debugging function is done with the control pin input
level and the OCDM register.
(20) Ports
The following general-purpose port functions and control pin functions are available.
2. The NMI pin alternately functions as the P02 pin. It functions as the P02 pin after reset. To enable the NMI
function, set the PMC0.PMC02 bit to 1. The initial setting of the NMI pin is “No edge detected”. Select the NMI
pin valid edge using the INTF0 and INTR0 registers.
Pull this pin down to the level of V
resistor with a resistance of 50 kΩ or higher.
Pull this pin down to the level of V
resistor with a resistance of 50 kΩ or higher.
Directly connect to V
Directly connect to V
Directly connect to VSS and always supply power.
Directly connect to V
flash memory programming mode.
Connection of regulator output stabilization
capacitance
μ
F (recommended value))
(4.7
SS by using a
SS by using a
DD and always supply power.
DD and always supply power.
SS in a mode other than the
−
R01UH0001EJ0300 Rev.3.00 Page 47 of 1248
Aug 3, 2012
V850ES/JG3-L CHAPTER 2 PIN FUNCTION
Figure 2-1. Pin I/O Circuits
Type 2
Type 10-N
EV
DD
IN
Schmitt-triggered input with hysteresis characteristics
Type 5
EV
DD
Data
Output
disable
Input
enable
EV
P-ch
N-ch
SS
IN/OUT
Type 10-D
EV
DD
Data
Open drain
Output
disable
Note
EV
P-ch
N-ch
SS
IN/OUT
IN/OUT
Data
Open drain
Output
disable
Input
enable
Type 11-G
Data
Output
disable
Comparator
(Threshold voltage)
Input enable
OCDM0 bit
+
_
REF0
V
Note
AV
P-ch
IN/OUT
N-ch
EV
SS
N-ch
REF0
AV
P-ch
IN/OUT
N-ch
AV
SS
P-ch
N-ch
SS
Type 10-G
Data
Open drain
Output
disable
Input
enable
Input
enable
EV
EV
DD
P-ch
IN/OUT
N-ch
SS
Type 12-D
Data
Output
disable
Input
enable
Type 16-C
Analog output
voltage
P-ch
N-ch
AV
AV
REF1
P-ch
N-ch
SS
IN/OUT
Feedback cut-off
P-ch
XT1XT2
Note Hysteresis characteristics are not available in port mode.
R01UH0001EJ0300 Rev.3.00 Page 48 of 1248
Aug 3, 2012
V850ES/JG3-L CHAPTER 2 PIN FUNCTION
2.4 Cautions
When the power is turned on, the following pins may output an undefined level temporarily even during reset.
• P10/ANO0 pin
• P11/ANO1 pin
• P53/SIB2/KR3/TIQ00/TOQ00/RTP03/DDO pin
R01UH0001EJ0300 Rev.3.00 Page 49 of 1248
Aug 3, 2012
V850ES/JG3-L CHAPTER 3 CPU FUNCTION
CHAPTER 3 CPU FUNCTION
The CPU of the V850ES/JG3-L is based on RISC architecture and executes almost all instructions in one clock cycle by
using a 5-stage pipeline.
3.1 Features
Variable length instructions (16 bits/32 bits)
Minimum instruction execution time: 50 ns (operating on main clock (fXX) of 20 MHz: VDD = 2.7 to 3.6 V,
When USB is not used)
62.5 ns (operating on main clock (f
When USB is used)
200 ns (operating on main clock (f
400 ns (operating on main clock (f
30.5
μ
s (operating on subclock (fXT) of 32.768 kHz: VDD = 2.0 to 3.6 V))
Memory space Program space: 64 MB linear
Data space: 4 GB linear
General-purpose registers: 32 bits × 32 registers
Internal 32-bit architecture
5-stage pipeline control
Multiplication/division instruction
Saturation operation instruction
32-bit shift instruction: 1 clock
Load/store instruction with long/short format
Four types of bit manipulation instructions
• SET1
• CLR1
• NOT1
• TST1
XX) of 16 MHz: VDD = 3.0 to 3.6 V,
XX) of 5 MHz: VDD = 2.2 to 3.6 V)
XX) of 2.5 MHz: VDD = 2.0 to 3.6 V)
R01UH0001EJ0300 Rev.3.00 Page 50 of 1248
Aug 3, 2012
V850ES/JG3-L CHAPTER 3 CPU FUNCTION
3.2 CPU Register Set
The registers of the V850ES/JG3-L can be classified into two types: general-purpose program registers and dedicated
system registers. All the registers are 32 bits wide.
For details, refer to the V850ES Architecture User’s Manual.
(1) Program register set
(2) System register set
310310
r0
r1
r2
r3
r4
r5
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
r31
General-purpose registers
(Zero register)
(Assembler-reserved register)
(Stack pointer (SP))
(Global pointer (GP))
(Text pointer (TP))
(Element pointer (EP))
(Link pointer (LP))
EIPC
EIPSW
FEPC
FEPSW
ECR
PSW
CTPC
CTPSW
DBPC
DBPSW
CTBP
(Interrupt status saving register)
(Interrupt status saving register)
(NMI status saving register)
(NMI status saving register)
(Interrupt source register)
(Program status word)
(CALLT execution status saving register)
(CALLT execution status saving register)
(Exception/debug trap status saving register)
(Exception/debug trap status saving register)
(CALLT base pointer)
310
PC
(Program counter)
R01UH0001EJ0300 Rev.3.00 Page 51 of 1248
Aug 3, 2012
V850ES/JG3-L CHAPTER 3 CPU FUNCTION
3.2.1 Program register set
The program registers include general-purpose registers and a program counter.
(1) General-purpose registers (r0 to r31)
Thirty-two general-purpose registers, r0 to r31, are available. Any of these registers can be used to store a data
variable or an address variable.
However, r0 and r30 are implicitly used by instructions and care must be exercised when these registers are used.
r0 always holds 0 and is used for an operation that uses 0 or addressing of offset 0. r30 is used by the SLD and
SST instructions as a base pointer when these instructions access the memory. r1, r3 to r5, and r31 are implicitly
used by the assembler and C compiler. When using these registers, save their contents for protection, and then
restore the contents after using the registers. r2 is sometimes used by the real-time OS. If the real-time OS does
not use r2, it can be used as a register for variables.
Table 3-1. Program Registers
Name Usage Operation
r0 Zero register Always holds 0.
r1 Assembler-reserved register Used as working register to create 32-bit immediate data
r2 Register for address/data variable (if real-time OS does not use r2)
r3 Stack pointer Used to create a stack frame when a function is called
r4 Global pointer Used to access a global variable in the data area
r5 Text pointer Used as register that indicates the beginning of a text area (area
where program codes are located)
r6 to r29 Register for address/data variable
r30 Element pointer Used as base pointer to access memory
r31 Link pointer Used when the compiler calls a function
PC Program counter Holds the instruction address during program execution
Remark For further details on the r1, r3 to r5, and r31 that are used in the assembler and C compiler, refer to the
CA850 (C Compiler Package) Assembly Language User’s Manual.
(2) Program counter (PC)
The program counter holds the instruction address during program execution. The lower 32 bits of this register are
valid. Bits 31 to 26 are fixed to 0. A carry from bit 25 to 26 is ignored even if it occurs.
Bit 0 is fixed to 0. This means that execution cannot branch to an odd address.
3126 251 0
PC
Fixed to 0Instruction address during program execution
0
Default value
00000000H
R01UH0001EJ0300 Rev.3.00 Page 52 of 1248
Aug 3, 2012
V850ES/JG3-L CHAPTER 3 CPU FUNCTION
3.2.2 System register set
The system registers control the status of the CPU and hold interrupt information.
These registers can be read or written by using system register load/store instructions (LDSR and STSR), using the
system register numbers listed below.
Table 3-2. System Register Numbers
System Register Name
Register
Number
Note 1
Note 1
Note 1
Note 1
0 Interrupt status saving register (EIPC)
1 Interrupt status saving register (EIPSW)
2 NMI status saving register (FEPC)
3 NMI status saving register (FEPSW)
4 Interrupt source register (ECR)
5 Program status word (PSW)
6 to 15 Reserved for future function expansion (operation is not guaranteed if these
Operand Specification System
LDSR Instruction STSR Instruction
√ √
√ √
√ √
√ √
× √
√ √
× ×
registers are accessed)
16 CALLT execution status saving register (CTPC)
17 CALLT execution status saving register (CTPSW)
18 Exception/debug trap status saving register (DBPC) √
19 Exception/debug trap status saving register (DBPSW) √
20 CALLT base pointer (CTBP)
21 to 31 Reserved for future function expansion (operation is not guaranteed if these
√ √
√ √
Note 2
√
Note 2
√
√ √
× ×
Note 2
Note 2
registers are accessed)
Notes 1. Because only one set of these registers is available, the contents of these registers must be saved by
program if multiple interrupts are enabled.
2. These registers can be accessed only during the interval between the execution of the DBTRAP instruction
or illegal opcode and DBRET instruction execution.
Caution Even if EIPC or FEPC, or bit 0 of CTPC is set to 1 by the LDSR instruction, bit 0 is ignored when
execution is returned to the main routine by the RETI instruction after interrupt servicing (this is
because bit 0 of the PC is fixed to 0). Set an even value to EIPC, FEPC, and CTPC (bit 0 = 0).
Remark √: Can be accessed
×: Access prohibited
R01UH0001EJ0300 Rev.3.00 Page 53 of 1248
Aug 3, 2012
V850ES/JG3-L CHAPTER 3 CPU FUNCTION
(1) Interrupt status saving registers (EIPC and EIPSW)
EIPC and EIPSW are used to save the status when an interrupt occurs.
If a software exception or a maskable interrupt occurs, the contents of the program counter (PC) are saved to EIPC,
and the contents of the program status word (PSW) are saved to EIPSW (these contents are saved to the NMI
status saving registers (FEPC and FEPSW) if a non-maskable interrupt occurs).
The address of the instruction next to the instruction under execution, except some instructions (see 22.9 Periods
in Which Interrupts Are Not Acknowledged by CPU), is saved to EIPC when a software exception or a maskable
interrupt occurs.
The current contents of the PSW are saved to EIPSW.
Because only one set of interrupt status saving registers is available, the contents of these registers must be saved
by program when multiple interrupts are enabled.
Bits 31 to 26 of EIPC and bits 31 to 8 of EIPSW are reserved for future function expansion (these bits are always
fixed to 0).
The value of EIPC is restored to the PC and the value of EIPSW to the PSW by the RETI instruction.
310
EIPC
EIPSW
00
310
00
26 25
0 0 0 0
0 0 0 0000 0 0 0000 0 0 0000 0 0 0
(Contents of saved PC)
87
(Contents of
saved PSW)
Default value
0xxxxxxxH
(x: Undefined)
Default value
000000xxH
(x: Undefined)
R01UH0001EJ0300 Rev.3.00 Page 54 of 1248
Aug 3, 2012
V850ES/JG3-L CHAPTER 3 CPU FUNCTION
(2) NMI status saving registers (FEPC and FEPSW)
FEPC and FEPSW are used to save the status when a non-maskable interrupt (NMI) occurs.
If an NMI occurs, the contents of the program counter (PC) are saved to FEPC, and those of the program status
word (PSW) are saved to FEPSW.
The address of the instruction next to the one of the instruction under execution, except some instructions, is saved
to FEPC when an NMI occurs.
The current contents of the PSW are saved to FEPSW.
Because only one set of NMI status saving registers is available, the contents of these registers must be saved by
program when multiple interrupts are enabled (for multiple interrupt servicing using the NMI pin and the INTWDT2
interrupt request signal).
Bits 31 to 26 of FEPC and bits 31 to 8 of FEPSW are reserved for future function expansion (these bits are always
fixed to 0).
The value of FEPC is restored to the PC and the value of FEPSW to the PSW by the RETI instruction.
310
FEPC
FEPSW
00
310
00
(3) Interrupt source register (ECR)
The interrupt source register (ECR) holds the source of an exception or interrupt if an exception or interrupt occurs.
This register holds the exception code of each interrupt source. Because this register is a read-only register, data
cannot be written to this register using the LDSR instruction.
310
ECR
Bit position Bit name Meaning
31 to 16 FECC Exception code of non-maskable interrupt (NMI)
15 to 0 EICC Exception code of exception or maskable interrupt
26 25
0 0 0 0
0 0 0 0000 0 0 0000 0 0 0000 0 0 0
FECCEICC
(Contents of saved PC)
16 15
87
(Contents of
saved PSW)
Default value
0xxxxxxxH
(x: Undefined)
Default value
000000xxH
(x: Undefined)
Default value
00000000H
R01UH0001EJ0300 Rev.3.00 Page 55 of 1248
Aug 3, 2012
V850ES/JG3-L CHAPTER 3 CPU FUNCTION
(4) Program status word (PSW)
The program status word (PSW) is a collection of flags that indicate the status of the program (result of instruction
execution) and the status of the CPU.
If the contents of a bit of this register are changed by using the LDSR instruction, the new contents are validated
immediately after completion of LDSR instruction execution. However if the ID flag is set to 1, interrupt requests will
not be acknowledged while the LDSR instruction is being executed.
Bits 31 to 8 of this register are reserved for future function expansion (these bits are fixed to 0).
(1/2)
310
PSW
Bit position Flag name Meaning
7 NP Indicates that a non-maskable interrupt (NMI) is being serviced. This bit is set to 1 when an
NMI request is acknowledged, disabling multiple interrupts.
0: NMI is not being serviced.
1: NMI is being serviced.
6 EP Indicates that an exception is being processed. This bit is set to 1 when an exception
occurs. Even if this bit is set, interrupt requests are acknowledged.
0: Exception is not being processed.
1: Exception is being processed.
5 ID Indicates whether a maskable interrupt can be acknowledged.
0: Interrupt enabled
1: Interrupt disabled
4 SAT
3 CY Indicates whether a carry or a borrow occurs as a result of an operation.
2 OV
1 S
0 Z Indicates whether the result of an operation is 0.
Note
Indicates that the result of a saturation operation has overflowed and is saturated. Because
this is a cumulative flag, it is set to 1 when the result of a saturation operation instruction is
saturated, and is not cleared to 0 even if the subsequent operation result is not saturated.
Use the LDSR instruction to clear this bit. This flag is neither set to 1 nor cleared to 0 by
execution of an arithmetic operation instruction.
0: Not saturated
1: Saturated
0: Carry or borrow does not occur.
1: Carry or borrow occurs.
Note
Indicates whether an overflow occurs during operation.
0: Overflow does not occur.
1: Overflow occurs.
Note
Indicates whether the result of an operation is negative.
0: The result is positive or 0.
1: The result is negative.
0: The result is not 0.
1: The result is 0.
87NP6EP5ID4
000000000000000000000000
SAT3CY2OV
1
SZ
Default value
00000020H
Remark Also read Note on the next page.
R01UH0001EJ0300 Rev.3.00 Page 56 of 1248
Aug 3, 2012
V850ES/JG3-L CHAPTER 3 CPU FUNCTION
(2/2)
Note The result of the operation that has performed saturation processing is determined by the contents of the
OV and S flags. The SAT flag is set to 1 only when the OV flag is set to 1 when a saturation operation is
performed.
SAT OV S
Maximum positive value is exceeded 1 1 0 7FFFFFFFH
Maximum negative value is exceeded 1 1 1 80000000H
Positive (maximum value is not exceeded) 0
Negative (maximum value is not exceeded)
Holds value
before operation
Flag Status Status of Operation Result
0
1
(5) CALLT execution status saving registers (CTPC and CTPSW)
CTPC and CTPSW are CALLT execution status saving registers.
When the CALLT instruction is executed, the contents of the program counter (PC) are saved to CTPC, and those
of the program status word (PSW) are saved to CTPSW.
The contents saved to CTPC are the address of the instruction next to CALLT.
The current contents of the PSW are saved to CTPSW.
Bits 31 to 26 of CTPC and bits 31 to 8 of CTPSW are reserved for future function expansion (fixed to 0).
CTPC
CTPSW
310
00
310
00
26 25
0 0 0 0
0 0 0 0000 0 0 0000 0 0 0000 0 0 0
(Saved PC contents)
87
(Saved PSW
contents)
Result of Operation of
Saturation Processing
Operation result itself
Default value
0xxxxxxxH
(x: Undefined)
Default value
000000xxH
(x: Undefined)
R01UH0001EJ0300 Rev.3.00 Page 57 of 1248
Aug 3, 2012
V850ES/JG3-L CHAPTER 3 CPU FUNCTION
(6) Exception/debug trap status saving registers (DBPC and DBPSW)
DBPC and DBPSW are exception/debug trap status registers.
If an exception trap or debug trap occurs, the contents of the program counter (PC) are saved to DBPC, and those
of the program status word (PSW) are saved to DBPSW.
The contents to be saved to DBPC are the address of the instruction next to the one that is being executed when
an exception trap or debug trap occurs.
The current contents of the PSW are saved to DBPSW.
This register can be read or written only during the interval between the execution of the DBTRAP instruction or
illegal opcode and the DBRET instruction.
Bits 31 to 26 of DBPC and bits 31 to 8 of DBPSW are reserved for future function expansion (fixed to 0).
The value of DBPC is restored to the PC and the value of DBPSW to the PSW by the DBRET instruction.
310
DBPC
DBPSW
00
310
00
(7) CALLT base pointer (CTBP)
The CALLT base pointer (CTBP) is used to specify a table address or generate a target address (bit 0 is fixed to 0).
Bits 31 to 26 of this register are reserved for future function expansion (fixed to 0).
310
CTBP
00
0 0 0 00
26 25
0 0 0 0
0 0 0 0000 0 0 0000 0 0 0000 0 0 0
26 25
(Saved PC contents)
(Base address)
87
(Saved PSW
contents)
Default value
0xxxxxxxH
(x: Undefined)
Default value
000000xxH
(x: Undefined)
Default value
0xxxxxxxH
(x: Undefined)
R01UH0001EJ0300 Rev.3.00 Page 58 of 1248
Aug 3, 2012
V850ES/JG3-L CHAPTER 3 CPU FUNCTION
3.3 Operation Modes
The V850ES/JG3-L has the following operation modes.
• Normal operation mode
• Flash memory programming mode
• Self programming mode
• On-chip debug mode
The operation mode is specified according to the status (input level) of the FLMD0 and FLMD1 pins.
To specify the normal operation mode, input a low level to the FLMD0 pin during the reset period.
A high level is input to the FLMD0 pin by the flash memory programmer in the flash memory programming mode if a
flash programmer is connected. In the self-programming mode, input a high level to this pin from an external circuit.
Fix the specification of these pins in the application system and do not change the setting of these pins during
operation.
FLMD0 FLMD1 Operation Mode
L
H L Flash memory programming mode
H H Setting prohibited
×
Normal operation mode
Remark H: High level
L: Low level
×: don’t care
(1) Normal operation mode
After the system has been released from the reset state, the pins related to the bus interface are set to the port
mode, execution branches to the reset entry address of the internal ROM, and instruction processing is started.
(2) Flash memory programming mode
When this mode is specified, the internal flash memory can be programmed by using a flash programmer.
(3) Self programming mode
Data can be erased and written from/to the flash memory by using a user application program. For details, see
CHAPTER 31 FLASH MEMORY.
(4) On-chip debug mode
The V850ES/JG3-L is provided with an on-chip debug function that employs the JTAG (Joint Test Action Group)
communication specifications.
For details, see CHAPTER 32 ON-CHIP DEBUG FUNCTION.
R01UH0001EJ0300 Rev.3.00 Page 59 of 1248
Aug 3, 2012
V850ES/JG3-L CHAPTER 3 CPU FUNCTION
3.4 Address Space
3.4.1 CPU address space
For instruction addressing, up to a combined total of 16 MB of external memory area and internal ROM area, plus an
internal RAM area, are supported in a linear address space (program space) of up to 64 MB. For operand addressing
(data access), up to 4 GB of a linear address space (data space) is supported. The 4 GB address space, however, is
viewed as 64 images of a 64 MB physical address space. This means that the same 64 MB physical address space is
accessed regardless of the value of bits 31 to 26.
Figure 3-1. Address Space Image
Data space
Program space
Access-prohibited area
Internal RAM area
Access-prohibited area
Image 63
Image 62
4 GB
Image 2
Image 1
On-chip peripheral I/O area
Internal RAM area
Note
Note
•
•
•
Note
Note
Access-prohibited area
Image 0
USB function area
External memory area, etc.
16 MB
Internal ROM area
(external memory)
16 MB
USB function area
External memory area, etc.
Internal ROM area
(external memory)
64 MB
Note Image 0 appears repeatedly for images 1 to 63.
R01UH0001EJ0300 Rev.3.00 Page 60 of 1248
Aug 3, 2012
V850ES/JG3-L CHAPTER 3 CPU FUNCTION
3.4.2 Memory map
The areas shown below are reserved in the V850ES/JG3-L.
Figure 3-2. Data Memory Map (Physical Addresses)
FFFFFFFFH
Image 63
FC000000H
FBFFFFFFH
Image 62
F8000000H
F7FFFFFFH
F4000000H
F3FFFFFFH
F0000000H
EFFFFFFFH
Image 61
Image 60
03FFFFFFH
03FF0000H
03FEFFFFH
(64 KB)
On-chip peripheral I/O area
(4 KB)
Internal RAM area
(60 KB)
03FFFFFFH
03FFF000H
03FFEFFFH
<R>
03FF0000H
Use prohibited
01000000H
00FFFFFFH
003FFFFFH
Note 1
003FA000H
003F9FFFH
00250000H
0024FFFFH
00200000H
001FFFFFH
00100000H
000FFFFFH
00000000H
10000000H
0FFFFFFFH
0C000000H
0BFFFFFFH
08000000H
07FFFFFFH
04000000H
03FFFFFFH
00000000H
Image 3
Image 2
Image 1
Image 0
(Physical memory
address)
00200000H
001FFFFFH
00000000H
External memory
Note 2
area
(12 MB)
(2 MB)
(2 MB)
Expanded internal
RAM area(24 KB)
Use prohibited
USB function area
External memory
Note 2
area
(1 MB)
Internal ROM
Note 3
area
(1 MB)
Notes 1.
μ
PD70F3843, 70F3844 only
2. The V850ES/JG3-L has 22 bits address bus, so the external memory area appears as a repeated 4
MB image.
3. Fetch and read accesses to addresses 00000000H to 000FFFFFH are made to the internal ROM
area. However, data write accesses to these addresses are made to the external memory area.
R01UH0001EJ0300 Rev.3.00 Page 61 of 1248
Aug 3, 2012
V850ES/JG3-L CHAPTER 3 CPU FUNCTION
Figure 3-3. Program Memory Map
03FFFFFFH
03FFF000H
03FFEFFFH
03FF0000H
03FEFFFFH
01000000H
00FFFFFFH
Use prohibited
(program fetch prohibited area)
Internal RAM area (60 KB)
Use prohibited
(program fetch prohibited area)
<R>
Note
00400000H
003FFFFFH
00200000H
001FFFFFH
00100000H
000FFFFFH
00000000H
External memory area
(program fetch prohibited area)
(12 MB)
Use prohibited
External memory area
(1 MB)
Internal ROM area
(1 MB)
Note The V850ES/JG3-L has 22 bits address bus, so the external memory area appears as a repeated 4 MB
image.
R01UH0001EJ0300 Rev.3.00 Page 62 of 1248
Aug 3, 2012
V850ES/JG3-L CHAPTER 3 CPU FUNCTION
3.4.3 Areas
(1) Internal ROM area
Up to 1 MB is reserved as an internal ROM area.
(a) Internal ROM (256 KB)
256 KB are allocated to addresses 00000000H to 0003FFFFH in the
Accessing addresses 00040000H to 000FFFFFH is prohibited.
Figure 3-4. Internal ROM Area (256 KB)
000FFFFFH
Access-prohibited
area
μ
PD70F3794.
(b) Internal ROM (384 KB)
384 KB are allocated to addresses 00000000H to 0005FFFFH in the
Accessing addresses 00060000H to 000FFFFFH is prohibited.
00040000H
0003FFFFH
Internal ROM
(256 KB)
00000000H
μ
Figure 3-5. Internal ROM Area (384 KB)
000FFFFFH
Access-prohibited
area
00060000H
0005FFFFH
PD70F3795.
Internal ROM
(384 KB)
00000000H
R01UH0001EJ0300 Rev.3.00 Page 63 of 1248
Aug 3, 2012
V850ES/JG3-L CHAPTER 3 CPU FUNCTION
(c) Internal ROM (512 KB)
512 KB are allocated to addresses 00000000H to 0007FFFFH in the μPD70F3796.
Accessing addresses 00080000H to 000FFFFFH is prohibited.
Figure 3-6. Internal ROM Area (512 KB)
000FFFFFH
Access-prohibited
00080000H
0007FFFFH
area
Internal ROM
(512 KB)
(d) Internal ROM (768 KB)
768 KB are allocated to addresses 00000000H to 000BFFFFH in the
Accessing addresses 000C0000H to 000FFFFFH is prohibited.
00000000H
μ
Figure 3-7. Internal ROM Area (768 KB)
000FFFFFH
000C0000H
000BFFFFH
Access-prohibited
area
Internal ROM
(768 KB)
PD70F3843.
00000000H
R01UH0001EJ0300 Rev.3.00 Page 64 of 1248
Aug 3, 2012
V850ES/JG3-L CHAPTER 3 CPU FUNCTION
(e) Internal ROM (1 MB)
1 MB are allocated to addresses 00000000H to 000FFFFFH in the μPD70F3844.
Figure 3-8. Internal ROM Area (1 MB)
000FFFFFH
Internal ROM
(1 MB)
00000000H
R01UH0001EJ0300 Rev.3.00 Page 65 of 1248
Aug 3, 2012
V850ES/JG3-L CHAPTER 3 CPU FUNCTION
(2) Internal RAM area
Up to 60 KB allocated to physical addresses 03FF0000H to 03FFEFFFH are reserved as the internal RAM area.
μ
PD70F3843, 70F3844 include a expanded internal RAM in addition to the internal RAM.
The RAM capacity of V850ES/JG3-L is as follows.
Table 3-3 RAM area
Product Name Internal RAM Expanded internal RAM Total RAM
μ
PD70F3794 40 KB - 40 KB
μ
PD70F3795 40 KB - 40 KB
μ
PD70F3796 40 KB - 40 KB
μ
PD70F3843 56 KB 24 KB 80 KB
μ
PD70F3844 56 KB 24 KB 80 KB
(a) Internal RAM (40 KB)
40 KB are allocated to addresses 03FF5000H to 03FFEFFFH of
Accessing addresses 03FF0000H to 03FF4FFFH is prohibited.
Figure 3-9. Internal RAM Area (40 KB)
Physical address space
03FFEFFFH
μ
PD70F3794, 70F3795, 70F3796.
Logical address space
FFFFEFFFH
03FF5000H
03FF4FFFH
03FF0000H
Internal RAM
(40 KB)
FFFF5000H
FFFF4FFFH
Access-prohibited
area
FFFF0000H
R01UH0001EJ0300 Rev.3.00 Page 66 of 1248
Aug 3, 2012
V850ES/JG3-L CHAPTER 3 CPU FUNCTION
(b) Internal RAM (56 KB)
56 KB are allocated to addresses 03FF1000H to 03FFEFFFH of μPD70F3843, 70F3844.
Accessing addresses 03FF0000H to 03FF0FFFH is prohibited.
Figure 3-10. Internal RAM Area (56 KB)
Physical address space
03FFEFFFH
Internal RAM
(56 KB)
Logical address space
FFFFEFFFH
03FF1000H
03FF0FFFH
03FF0000H
Access-prohibited
area
FFFF1000H
FFFF0FFFH
FFFF0000H
R01UH0001EJ0300 Rev.3.00 Page 67 of 1248
Aug 3, 2012
V850ES/JG3-L CHAPTER 3 CPU FUNCTION
(3) Expanded internal RAM (24 KB)
The expanded internal RAM of 24 KB is allocated to addresses 003FA000H to 003FFFFFH of the μPD70F3843,
70F3844.
The expanded internal RAM area is accessed via the external bus interface. Before accessing the expanded
internal RAM area, be sure to set the registers related to the external bus interface (initialization of the expanded
internal RAM).
Figure 3-11. Expanded internal RAM (24 KB)
Physical address space
Access-prohibited
area
003FFFFFH
Expaned internal RAM
003FA000H
003F9FFFH
The initial settings for the expanded internal RAM are shown below.
Cautions 1. If the expanded internal RAM is used with any but the following initial settings, operation
is not guaranteed.
2. When using the external memory and expanded internal RAM simultaneously, set the
external bus interface and expanded internal RAM at the same time.
• BSC register setting
Bits 2 must be set to 1.
• DWC0 register setting
Bits 6 to 4 must be set to 001.
• AWC register setting
Bits 3 to 2 must be set to 00.
• BCC register setting
Bits 3 must be set to 0.
(24 KB)
Access-prohibited
area
R01UH0001EJ0300 Rev.3.00 Page 68 of 1248
Aug 3, 2012
V850ES/JG3-L CHAPTER 3 CPU FUNCTION
(4) On-chip peripheral I/O area
4 KB allocated to physical addresses 03FFF000H to 03FFFFFFH are reserved as the on-chip peripheral I/O area.
Figure 3-12. On-Chip Peripheral I/O Area
Physical address spaceLogical address space
<R>
03FFFFFFH
On-chip peripheral I/O area
(4 KB)
03FFF000H
FFFFFFFFH
FFFFF000H
Peripheral I/O registers that have functions to specify the operation mode for and monitor the status of the on-chip
peripheral I/O are mapped to the on-chip peripheral I/O area. Program cannot be fetched from this area.
Cautions 1. When a peripheral I/O register is accessed in word units, a word area is accessed twice in
halfword units in the order of lower area then higher area, with the lower 2 bits of the address
ignored.
2. If a peripheral I/O register that can be accessed in byte units is accessed in halfword units,
the lower 8 bits are valid. The higher 8 bits are undefined when the register is read and are
invalid when the register is written.
3. Addresses not defined as registers are reserved for future expansion. The operation is
undefined and not guaranteed when these addresses are accessed.
4. The internal ROM/RAM area and on-chip peripheral I/O area are assigned to successive
addresses.
When accessing the internal ROM/RAM area by incrementing or decrementing addresses
using a pointer operation for example, be careful not to access the on-chip peripheral I/O area
by mistakenly extending over the internal ROM/RAM area boundary.
(5) External memory area
13 MB (00100000H to 001FFFFFH, 00400000H to 00FFFFFFH) are allocated as the external memory area. For
details, see CHAPTER 5 BUS CONTROL FUNCTION.
Caution The V850ES/JG3-L has 22 bits address bus, so the external memory area appears as a repeated 4
MB image.
R01UH0001EJ0300 Rev.3.00 Page 69 of 1248
Aug 3, 2012
V850ES/JG3-L CHAPTER 3 CPU FUNCTION
3.4.4 Wraparound of data space
The result of an operand address calculation operation that exceeds 32 bits is ignored.
Therefore, the highest address of the data space, FFFFFFFFH, and the lowest address, 00000000H, are contiguous,
and wraparound occurs at the boundary of these addresses.
Figure 3-13. Wraparound of Data Space
00000001H
00000000H
FFFFFFFFH
FFFFFFFEH
Data space
(+) direction(−) direction
Data space
3.4.5 Recommended use of address space
The architecture of the V850ES/JG3-L requires that a register that serves as a pointer be secured for address
generation when operand data in the data space is accessed. The address stored in this pointer ±32 KB can be directly
accessed by an instruction for operand data. Because the number of general-purpose registers that can be used as a
pointer is limited, however, by keeping the performance from dropping during address calculation when a pointer value is
changed, as many general-purpose registers as possible can be secured for variables, and the program size can be
reduced.
(1) Program space
Of the 32 bits of the PC (program counter), the higher 6 bits are fixed to 0, and only the lower 26 bits are valid.
Regarding the program space, therefore, a 64 MB space of contiguous addresses starting from 00000000H
unconditionally corresponds to the memory map.
To use the internal RAM area as the program space, access the following addresses.
Caution If a branch instruction is at the upper limit of the internal RAM area, a prefetch operation (invalid
fetch) straddling the on-chip peripheral I/O area does not occur.
Product Name RAM Size Access Address
μ
PD70F3794
μ
PD70F3795
μ
PD70F3796
μ
PD70F3843
μ
PD70F3844
40 KB 03FF5000H to 03FFEFFFH
56 KB 03FF1000H to 03FFEFFFH
R01UH0001EJ0300 Rev.3.00 Page 70 of 1248
Aug 3, 2012
V850ES/JG3-L CHAPTER 3 CPU FUNCTION
(2) Data space
With the V850ES/JG3-L, it seems that there are sixty-four 64 MB (26-bit address) physical address spaces on the 4
GB (32-bit address) CPU address space. Therefore, the most significant bit (bit 25) of a 26-bit address of these 64
MB spaces is sign-extended to 32 bits and allocated as an address.
Figure 3-14. Sign Extension in Data Space
310
00
31026 25
0 0 0 0
26 25
A 26-bit address (64 MB)
can be specified.
3FFFFFFH
0000000H
Image 0
64 MB
A 32-bit address (4 GB) can be
specified.
An image of 64 MB appears
repeatedly in the 4 GB space.
FFFFFFFFH
FC000000H
FBFFFFFFH
F8000000H
F7FFFFFFH
F4000000H
F3FFFFFFH
F0000000H
EFFFFFFFH
10000000H
0FFFFFFFH
0C000000H
0BFFFFFFH
08000000H
07FFFFFFH
04000000H
03FFFFFFH
00000000H
Image 63
Image 62
Image 61
Image 60
Image 3
Image 2
Image 1
Image 0
64 MB
64 MB
64 MB
64 MB
4 GB
64 MB
64 MB
64 MB
64 MB
R01UH0001EJ0300 Rev.3.00 Page 71 of 1248
Aug 3, 2012
V850ES/JG3-L CHAPTER 3 CPU FUNCTION
(a) Application example of wraparound
If R = r0 (zero register) is specified for the LD/ST disp16 [R] instruction, a range of addresses 00000000H ±32
KB can be addressed by sign-extended disp16. All the resources, including the internal hardware, can be
addressed by one pointer.
The zero register (r0) is a register fixed to 0 by hardware, and practically eliminates the need for registers
dedicated to pointers.
Figure 3-15. Example of Data Space Usage in
0003FFFFH
00007FFFH
μ
PD70F3794
(R = )
00000000H
FFFFF000H
FFFFEFFFH
FFFF8000H
Internal ROM area
On-chip peripheral
I/O area
Internal RAM area
32 KB
4 KB
28 KB
R01UH0001EJ0300 Rev.3.00 Page 72 of 1248
Aug 3, 2012
V850ES/JG3-L CHAPTER 3 CPU FUNCTION
Figure 3-16. Recommended Memory Map (μPD70F3794)
FFFFFFFFH
FFFFF000H
FFFFEFFFH
FFFF0000H
FFFEFFFFH
04000000H
03FFFFFFH
Access-prohibited
03FFF000H
03FFEFFFH
03FFB000H
03FFAFFFH
03FF0000H
03FEFFFFH
Internal RAM
Data spaceProgram space
On-chip
peripheral I/O
Internal RAM
On-chip
peripheral I/O
Internal RAM
Access-prohibited
FFFFFFFFH
FFFFF000H
FFFFEFFFH
FFFFB000H
FFFFAFFFH
FFFF0000H
FFFEFFFFH
<R>
Program space
64 MB
01000000H
00FFFFFFH
00100000H
000FFFFFH
00040000H
0003FFFFH
00000000H
Access-prohibited
External
Note
memory
Internal ROM
Internal ROM
External
Note
memory
Internal ROM
00100000H
000FFFFFH
00000000H
Note The V850ES/JG3-L has 22 bits address bus, so the external memory area appears as a repeated 4 MB
image.
Remark indicates the recommended area.
R01UH0001EJ0300 Rev.3.00 Page 73 of 1248
Aug 3, 2012
V850ES/JG3-L CHAPTER 3 CPU FUNCTION
3.4.6 Peripheral I/O registers
(1/11)
Manipulatable Bits Address Function Register Name Symbol R/W
<i> ld.w [r11], r10 If the decode operation of the mov instruction <ii> immediately before the sld
<ii> mov r10, r28
<iii> sld.w 0x28, r10
(b) Countermeasure
<1> When compiler (CA850) is used
Use CA850 Ver. 2.61 or later because generation of the corresponding instruction sequence can be
<2> For assembler
When executing the sld instruction immediately after instruction <ii>, avoid the above operation using
mov reg1, reg2
satadd reg1, reg2
and reg1, reg2
add reg1, reg2
mulh reg1, reg2
•
•
•
not reg1, reg2
satadd imm5, reg2
tst reg1, reg2
add imm5, reg2
shr imm5, reg2
instruction <iii> and an interrupt request conflict before execution of the ld instruction
<i> is complete, the execution result of instruction <i> may not be stored in a register.
satsubr reg1, reg2
or reg1, reg2
subr reg1, reg2
cmp reg1, reg2
sar imm5, reg2
automatically suppressed.
either of the following methods.
• Insert a nop instruction immediately before the sld instruction.
• Do not use the same register as the sld instruction destination register in the above instruction <ii>
executed immediately before the sld instruction.
R01UH0001EJ0300 Rev.3.00 Page 91 of 1248
Aug 3, 2012
V850ES/JG3-L CHAPTER 4 PORT FUNCTIONS
CHAPTER 4 PORT FUNCTIONS
4.1 Features
{ I/O port pins: 80
• N-ch open-drain output selectable: 37 (5 V tolerant: 28)
{ Input/output specifiable in 1-bit units
4.2 Basic Port Configuration
The V850ES/JG3-L features a total of 80 I/O port pins organized as ports 0, 1, 3 to 5, 7, 9, CM, CT, DH, and DL. The
port configuration is shown below.
Figure 4-1. Port Configuration
Port 0
Port 1
Port 3
Port 4
Port 5
P02
P06
P10
P11
P30
P32
P36
P39
P40
P42
P50
P55
Caution Ports 0, 3 to 5, and 9 (P90 to P96) are 5 V tolerant.
Table 4-1. I/O Buffer Power Supplies for Pins
P70
P711
P90
P915
PCM0
PCM3
PCT0
PCT1
PCT4
PCT6
PDH0
PDH4
PDL0
PDL15
Port 7
Port 9
Port CM
Port CT
Port DH
Port DL
Power Supply Corresponding Pins
AVREF0 Port 7
AVREF1 Port 1
EVDDRESET, ports 0, 3 to 5, 9, CM, CT, DH, DL
R01UH0001EJ0300 Rev.3.00 Page 92 of 1248
Aug 3, 2012
V850ES/JG3-L CHAPTER 4 PORT FUNCTIONS
4.3 Port Configuration
The ports consist of the following hardware.
Table 4-2. Port Configuration
Item Configuration
Control registers
Port pins I/O: 80
Port n mode register (PMn: n = 0, 1, 3 to 5, 7, 9, CD, CM, CT, DH, DL)
Port n mode control register (PMCn: n = 0, 3 to 5, 9, CM, CT, DH, DL)
Port n function control register (PFCn: n = 0, 3 to 5, 9)
Port n function control expansion register (PFCEn: n = 0, 3, 5, 9 )
Port n function register (PFn: n = 0, 3 to 5, 9)
R01UH0001EJ0300 Rev.3.00 Page 93 of 1248
Aug 3, 2012
V850ES/JG3-L CHAPTER 4 PORT FUNCTIONS
(1) Port n register (Pn)
Data I/O with external devices is performed by writing to and reading from the Pn register. The Pn register is made
up of a port latch that retains the output data and a circuit that reads the pin status.
Each bit of the Pn register corresponds to one pin of port n and can be read or written in 1-bit units.
After reset: 00H
Pn
Note
(output latch)R/W
Pn7
Pn6Pn5Pn4Pn3Pn2Pn1Pn0
01237567
Pnm
0
1
0 is output.
1 is output.
Control of output data (in output mode)
Note This value is undefined for input-only ports.
The operation when writing or reading the Pn register differs depending on the specified mode.