Information in this manual may be changed without prior notice.
Mitsubishi Electric Corporation
Mitsubishi Electric Semiconductor Systems Corporation
Keep safety first in your circuit designs!
●
Mitsubishi Electric Corporation puts the maximum effort into making semiconductor
products better and more reliable, but there is always the possibility that trouble may
occur with them. Trouble with semiconductors may lead to personal injury, fire or
property damage. Remember to give due consideration to safety when making your
circuit designs, with appropriate measures such as (i) placement of substitutive,
auxiliary circuits, (ii) use of non-flammable material or (iii) prevention against any
malfunction or mishap.
Notes regarding these materials
●
These materials are intended as a reference to assist our customers in the selection
of the Mitsubishi semiconductor product best suited to the customer's application;
they do not convey any license under any intellectual property rights, or any other
rights, belonging to Mitsubishi Electric Corporation or a third party.
●
Mitsubishi Electric Corporation assumes no responsibility for any damage, or
infringement of any third-party's rights, originating in the use of any product data,
diagrams, charts, programs, algorithms, or circuit application examples contained in
these materials.
●
All information contained in these materials, including product data, diagrams, charts,
programs and algorithms represents information on products at the time of publication
of these materials, and are subject to change by Mitsubishi Electric Corporation
without notice due to product improvements or other reasons. It is therefore
recommended that customers contact Mitsubishi Electric Corporation or an authorized
Mitsubishi Semiconductor product distributor for the latest product information before
purchasing a product listed herein.
The information described here may contain technical inaccuracies or typographical
errors. Mitsubishi Electric Corporation assumes no responsibility for any damage,
liability, or other loss rising from these inaccuracies or errors.
Please also pay attention to information published by Mitsubishi Electric Corporation
by various means, including the Mitsubishi Semiconductor home page (http://
www.mitsubishichips.com).
●
When using any or all of the information contained in these materials, including
product data, diagrams, charts, programs, and algorithms, please be sure to evaluate
all information as a total system before making a final decision on the applicability of
the information and products. Mitsubishi Electric Corporation assumes no
responsibility for any damage, liability or other loss resulting from the information
contained herein.
●
Mitsubishi Electric Corporation semiconductors are not designed or manufactured
for use in a device or system that is used under circumstances in which human life is
potentially at stake. Please contact Mitsubishi Electric Corporation or an authorized
Mitsubishi Semiconductor product distributor when considering the use of a product
contained herein for any specific purposes, such as apparatus or systems for
transportation, vehicular, medical, aerospace, nuclear, or undersea repeater use.
●
The prior written approval of Mitsubishi Electric Corporation is necessary to reprint
or reproduce in whole or in part these materials.
●
If these products or technologies are subject to the Japanese export control
restrictions, they must be exported under a license from the Japanese government
and cannot be imported into a country other than the approved destination.
Any diversion or reexport contrary to the export control laws and regulations of Japan
and/or the country of destination is prohibited.
●
Please contact Mitsubishi Electric Corporation or an authorized Mitsubishi Semicon
ductor product distributor for further details on these materials or the products con
tained therein.
PREFACE
This manual describes the hardware specifications of Mitsubishi’s 32170 group of 32-bit
CMOS microcomputers.
This manual was created to help you understand the hardware specifications of the
32170-group microcomputers so you can take
full advantage of the versatile performance capabilities of these microcomputers. The CPU
features and the functionality of each internal
peripheral circuit are described in detail, which
we hope will prove useful for your circuit design.
For details about the M32R-family software
products and development support tools,
please refer to the user’s manuals and related
other documentation included with your products and tools.
How to read internal I/O register tables
➀ Bit Numbers: Each register is connected with an internal bus of 16-bit
wide, so the bit numbers of the registers located at even
addresses are D0-D7, and those at odd addresses are
D8-D15.
➁ State of Register at Reset: Represents the initial state of each register
immediately after reset with hexadecimal numbers
(undefined bits after reset are indicated each in column ➂.)
➂ At read: ... read enabled
? ... read disabled (read value invalid)
0 ... Read always as 0
1 ... Read always as 1
④ At write:: Write enabled
: Write enable conditionally
(include some conditions at write)
- : Write disabled (Written value invalid)
<Example of representation>
Not implemented
in the shaded portion.
1
Bit nameFunction
D
0
Not assigned.
Abit
1
(...................)
2
Bbit
(...................)
3
Cbit
(...................)
1234D0
Abit
BbitCbit
0: ----1: -----
0: ----1: -----
0: ----1: -----
Registers represented with thick rectangles
are accessible only with halfwords or words
(not accessible with bytes).
<at reset: H'04>
2
WR
0
34
Contents
CHAPTER 1 OVERVIEW
1.1 Outline of the 32170..........................................................................................1-2
1.1.1 M32R Family CPU Core .............................................................................1-2
1.1.2 Built-in Multiply-Accumulate Operation Function ........................................1-3
1.1.3 Built-in Flash Memory and RAM .................................................................1-3
1.1.4 Built-in Clock Frequency Multiplier ............................................................. 1-4
10.5.1 Outline of TMS.................................................................................... 10-140
10.5.2 Outline of TMS Operation ...................................................................10-140
Operation in TIO Single-shot Output Mode (without Correction Function)..
Operation in TIO Delayed Single-shot Output Mode (without Correction Function)..
Operation in TIO Continuous Output Mode (Without Correction Function).
10-134
10-136
10-138
(6)
10.5.3 TMS Related Register Map ................................................................ 10-142
10.5.4 TMS Control Registers ....................................................................... 10-143
• The 32170 is a 32-bit RISC single-chip microcomputer which is built around the M32R family
CPU core (hereafter referred to as the M32R) and incorporates flash memory, RAM, and
various other peripheral functions-all integrated into a single chip.
• The M32R is based on RISC architecture. Memory access is performed using load and store
instructions, and various arithmetic operations are executed using register-to-register
operation instructions. The M32R internally contains sixteen 32-bit general-purpose registers
and has 83 distinct instructions.
• The M32R supports compound instructions such as Load & Address Update and Store &
Address Update, in addition to ordinary load and store instructions. These compound
instructions help to speed up data transfers.
OVERVIEW
1.1 Outline of the 32170
(2) 5-stage pipelined processing
• The M32R uses 5-stage pipelined instruction processing consisting of Instruction Fetch,
Decode, Execute, Memory Access, and Write Back. Not just load and store instructions or
register-to-register operation instructions, compound instructions such as Load & Address
Update and Store & Address Update also are executed in one cycle.
• Instructions are entered into the execution stage in the order they are fetched, but this does not
always mean that the first instruction entered is executed first. If the execution of a load or
store instruction entered earlier is delayed by one or more wait cycles inserted in memory
access, a register-to-register operation instruction entered later may be executed before said
load or store instruction. By using "out-of-order-completion" like this, the M32R controls
instruction execution without wasting clock cycles.
(3) Compact instruction code
• The M32R instructions come in two types: one consisting of 16 bits in length, and the other
consisting of 32 bits in length. Use of the 16-bit length instruction format especially helps to
suppress the program code size.
• Some 32-bit long instructions can branch directly to a location 32 Mbytes forward or backward
from the instruction address being executed. Compared to architectures where address space
is segmented, this direct jump allows for easy programming.
1-2Ver.0.10
1
1.1.2 Built-in Multiply-Accumulate Operation Function
(1) Built-in high-speed multiplier
• The M32R incorporates a 32-bit × 16-bit high-speed multiplier which enables it to execute a
32-bit × 32-bit integral multiplication instruction in three cycles (1 cycle = 25 ns when using a 40
MHz internal CPU clock).
(2) Supports Multiply-Accumulate operation instructions comparable to DSP
• The M32R supports the following four modes of Multiply-Accumulate operation instructions (or
multiplication instructions) using a 56-bit accumulator. Any of these operations can be
executed in one cycle.
• The M32R has instructions to round off the value stored in the accumulator to 16 or 32 bits, as
well as instructions to shift the accumulator value to adjust digits and store the digit-adjusted
value in a register. These instructions also can be executed in one cycle, so that when
combined with high-speed data transfer instructions such as Load & Address Update and
Store & Address Update, they enable the M32R to exhibit high data processing capability
comparable to that of DSP.
1.1.3 Built-in Flash Memory and RAM
• The 32170 contains flash memory and RAM which can be accessed with no wait states,
allowing you to build a high-speed embedded system.
• The internal flash memory allows for on-board programming (you can write to it while being
mounted on the printed circuit board). Use of flash memory means the chip engineered at the
development phase can be used directly in mass-production, so that you can smoothly
migrate from prototype to mass-production without changing the printed circuit board.
• The internal flash memory can be rewritten 100 times.
• The internal flash memory has a pseudo-flash emulation function, allowing the internal RAM to
be artificially mapped into part of the internal flash memory. This function, when combined with
the internal Real-Time Debugger (RTD), facilitates data tuning on ROM tables.
• The internal RAM can be accessed for read or rewrite from an external device independently
of the M32R by using RTD (real-time debugger). It is communicated with external devices by
RTD's exclusive clock-synchronized serial I/O.
1-3Ver.0.10
1
1.1.4 Built-in Clock Frequency Multiplier
• The 32170 internally multiplies the input clock signal frequency by 4 and the internal peripheral
clock by 2. If the input clock frequency is 10.0 MHz, the CPU clock frequency will be 40 MHz
and the internal clock frequency 20 MHz.
1.1.5 Built-in Powerful Peripheral Functions
(1) Built-in multijunction timer (MJT)
• The multijunction timer is configured with the following timers:
Each timer has multiple modes of operation, which can be selected according of the purpose of use.
• The multijunction timer has internal clock bus, input event bus, and output event bus, allowing
multiple timers to be combined for use internally. This provides a flexible way to make use of
timer functions.
• The output-related timers (TOP) have a correction function. This function allows the timer's
count value in progress to be increased or reduced as desired, thus materializing real-time
output control.
(2) Built-in 10-channel DMA
• The 10-channel DMA is built-in, supporting data transfers between internal peripheral I/Os or
between internal peripheral I/O and internal RAM. Not only can DMA transfer requests be
generated in software, but can also be triggered by a signal generated by an internal
peripheral I/O (e.g., A-D converter, MJT, or serial I/O).
• Cascaded connection between DMA channels (DMA transfer in a channel is started by
completion of transfer in another) is also supported, allowing for high-speed transfer
processing without imposing any extra load on the CPU.
(3) Built-in 16-channel A-D converters
• The 32170 contains two 16-channel A-D converters which can convert data in 10-bit
resolution. In addition to single A-D conversion in each channel, successive A-D conversion in
four, eight, or 16 channels combined into one unit is possible.
• In addition to ordinary A-D conversion, a comparator mode is supported in which the A-D
conversion result is compared with a given set value to determine the relative magnitudes of
two quantities.
• When A-D conversion is completed, the 32170 can generate not only an interrupt, but can also
generate a DMA transfer request.
• The 32170 supports two read out modes, so that A-D conversion results can be read out in 8
bits or 10 bits.
1-4Ver.0.10
1
(4) High-speed serial I/O
• The 32170 incorporates 6 channels of serial I/O, which can be set for clock-synchronized
serial I/O or UART.
• When set for clock-synchronized serial I/O, the data transfer rate is a high 2 Mbits per second.
• When data reception is completed or the transmit buffer becomes empty, the serial I/O can
generate a DMA transfer request signal.
(5) Built-in Real-Time Debugger (RTD)
• The Real-Time Debugger (RTD) provides a function for the M32R/E's internal RAM to be
accessed directly from an external device. The debugger communicates with external devices
through its exclusive clock-synchronized serial I/O.
• By using the RTD, you can read the contents of the internal RAM or rewrite its data from an
external device independently of the M32R.
• The debugger can generate an RTD interrupt to notify that RTD-based data transmission or
reception is completed.
OVERVIEW
1.1 Outline of the 32170
(6) Eight-level interrupt controller
• The interrupt controller manages interrupt requests from each internal peripheral I/O by
resolving interrupt priority in eight levels including an interrupt-disabled state. Also, it can
accept external interrupt requests due to power-down detection or generated by a watchdog
timer as a System Break Interrupt (SBI).
(7) Three operation modes
• The M32R/E has three operation modes-single-chip mode, extended external mode, and
processor mode. The address space and external pin functions of the M32R/E are switched
over according to a mode in which it operates. The MOD0 and MOD1 pins are used to set a
mode.
(8) Wait controller
• The wait controller supports access to external devices by the M32R. In all but single-chip
mode, the extended external area provides 4 Mbytes of space.
1-5Ver.0.10
1
1.1.6 Built-in Full-CAN Function
• The 32170 contains CAN Specification V2.0B-compliant CAN module, thereby providing 16
message slots.
1.1.7 Built-in Debug Function
• The 32170 supports JTAG interface. Boundary scan test can be performed using this JTAG
interface.
OVERVIEW
1.1 Outline of the 32170
1-6Ver.0.10
1
1.2 Block Diagram
1.2 Block Diagram
Figure 1.2.1 shows a block diagram of the 32170. Features of each block are shown in Tables 1.2.1
through 1.2.3.
• Capable of flexible timer configuration by mutual connection between each channel.
OVERVIEW
1.2 Block Diagram
A-D converter• 16-channel, 10-bit resolution A-D converter × 2 units
• Incorporates comparator mode
•
Can generate interrupt or start DMA transfer upon completion of A-D conversion.
• Can read out conversion results in 8 or 10 bits.
Serial I/O• 6-channel serial I/O
• Can be set for clock-synchronized serial I/O or UART.
• Capable of high-speed data transfer at 2 Mbits per second when clock synchronized or
156 Kbits per second during UART.
Real-time debugger • Can rewrite or monitor the internal RAM independently of the CPU by command input
from an external source.
• Has its exclusive clock-synchronized serial port.
Interrupt controller• Accepts and manages interrupt requests from internal peripheral I/O.
• Resolves interrupt priority in 8 levels including interrupt-disabled state.
Wait controller• Controls wait state for access to extended external areas.
• Can insert 1 to 4 wait cycles by setting in software and extend wait period by external
WAIT signal.
Clock PLL• Multiply-by-4 clock generator circuit
• Maximum 40 MHz of CPU clock (CPU, internal ROM, internal RAM access)
• Maximum 20 MHz of internal peripheral clock (peripheral module access)
• Maximum external input clock frequency=10 MHz
CAN• Sixteen message slots
JTAG• Capable of boundary scan
1-9Ver.0.10
1
1.3 Pin Function
Figure 1.3.1 shows a pin function diagram of the 32170 in 240QFP package. Figure 1.3.2
shows a pin function diagram of the 32170 in 255FBGA package. Table 1.3.1 explains the
function of each pin of the 32170. Table 1.3.2 explains the function of the dedicated debug pins
of the 32170 in 255FBGA package.
ClockXIN,ClockInputClock input/output pins. These pins contains a PLL-based
VCCIPower supply —Power supply to internal logic (3.3 V).
VDD
FVCC
VSSGround—Connect all VSS to ground (GND).
XOUTOutputfrequency multiplier circuit. Apply a clock whose frequency
BCLK/WR System clockOutputThis pin outputs a clock whose frequency is twice that of
OSC-VCC Power supply —Power supply for PLL circuit. Connect OSC-VCC to the
RAM power supply
FLASH power supply
Input/Output
—Power supply for internal RAM backup (3.3 V).
—Power supply for internal flash memory (3.3 V).
Function
is 1/4 the operating frequency. (When using 40 MHz CPU
clock, XIN input = 10.0 MHz)
external input clock. (When using 10 MHz external input
clock, BCLK output = 20 MHz). Use this output when
external operation needs to be synchronized.
power supply rail.
OSC-VSS Ground—
VCNTPLL controlInputThis pin controls the PLL circuit. Connect a resistor and
ResetRESETResetInputThis pin resets the internal circuit.
ModeMOD0ModeInputThese pins set operation mode.
MOD1MOD0 MOD1Mode
Address A11 – A30 AddressOutputThe device has 20 address lines (A11-A30) to allow two
BusBuschannels of up to 2 MB of memory space to be added
Note: For boot mode, refer to Chapter 6, "Internal Memory."
Connect OSC-VSS to ground.
capacitor to it. (For external circuits, refer to Section 18.1.1,