NEC V850E/Dx3 User manual

Preliminary User’s Manual
V850E/Dx3
32-bit Single-Chip Microcontroller
Hardware
µPD70F3420, µPD703420
µPD70F3421, µPD703421
µPD70F3422, µPD703422
µPD70F3423
µPD70F3424
µPD70F3425
µPD70F3426
µPD70F3427
Document No. U17566EE1V2UM00
Date Published 18/7/06
©NEC Electronics 2006
Printed in Germany
Downloaded from Elcodis.com electronic components distributor

3
Preliminary User’s Manual U17566EE1V2UM00
Notes for CMOS Devices
1. Precaution against ESD for semiconductors
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 once, when it has occurred.
Environmental control must be adequate. When it is dry, humidifier should
be used. It is recommended to avoid using insulators that easily build 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 bench and floor should be
grounded. The operator should be grounded using wrist strap.
Semiconductor devices must not be touched with bare hands. Similar
precautions need to be taken for PW boards with semiconductor devices
on it.
2. Handling of unused input pins for CMOS
No connection for CMOS device inputs can be cause of malfunction. If no
connection is provided to the input pins, it is possible that an internal input
level may be generated due to noise, etc., hence causing malfunction.
CMOS devices behave differently than Bipolar or NMOS devices. Input
levels of CMOS devices must be fixed high or low by using a pull-up or pull-
down circuitry. Each unused pin should be connected to VDD or GND with
a resistor, if it is considered to have a possibility of being an output pin. All
handling related to the unused pins must be judged device by device and
related specifications governing the devices.
3. Status before initialization of MOS devices
Power-on does not necessarily define initial status of MOS device.
Production process of MOS does not define the initial operation status of
the device. Immediately after the power source is turned ON, the devices
with reset function have not yet been initialized. Hence, power-on does not
guarantee out-pin levels, I/O settings or contents of registers. Device is not
initialized until the reset signal is received. Reset operation must be
executed immediately after power-on for devices having reset function.
Downloaded from Elcodis.com electronic components distributor

4V850E/Dx3 Preliminary User’s Manual U17566EE1V2UM00
Legal Notes
• The information in this document is current as of 18/7/06. 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 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 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 NEC Electronics 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 customer's equipment shall be
done under the full responsibility of 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 customer-designated “quality assurance program” for
a specific application. The recommended applications of 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": Computers, office equipment, communications
equipment, test and measurement equipment, audio
and visual equipment, home electronic appliances,
machine tools, personal electronic equipment and
industrial robots.
"Special": 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).
"Specific": Aircraft, aerospace equipment, submersible repeaters,
nuclear reactor control systems, life support systems and
medical equipment for life support, etc.
Downloaded from Elcodis.com electronic components distributor

5
Preliminary User’s Manual U17566EE1V2UM00
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 NEC Electronics sales
representative in advance to determine NEC Electronics 's 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).
3. SuperFlash®is a registered trademark of Silicon Storage Technology, Inc.
in several countries including the United States and Japan. This product
uses SuperFlash®technology licensed from Silicon Storage Technology,
Inc.
Downloaded from Elcodis.com electronic components distributor

6V850E/Dx3 Preliminary User’s Manual U17566EE1V2UM00
Regional Information
Some information contained in this document may vary from country to
country. Before using any NEC product in your application, please contact the
NEC office in your country to obtain a list of authorized representatives and
distributors. They will verify:
• Device availability
• Ordering information
• Product release schedule
• Availability of related technical literature
• Development environment specifications (for example, specifications for
third-party tools and components, host computers, power plugs, AC supply
voltages, and so forth)
• Network requirements
In addition, trademarks, registered trademarks, export restrictions, and other
legal issues may also vary from country to country.
NEC Electronics Inc. (U.S.)
Santa Clara, California
Tel: 408-588-6000
800-366-9782
Fax: 408-588-6130
800-729-9288
NEC Electronics (Europe) GmbH
Duesseldorf, Germany
Tel: 0211-65 03 01
Fax: 0211-65 03 327
Sucursal en España
Madrid, Spain
Tel: 091- 504 27 87
Fax: 091- 504 28 60
Succursale Française
Vélizy-Villacoublay, France
Tel: 01-30-67 58 00
Fax: 01-30-67 58 99
Filiale Italiana
Milano, Italy
Tel: 02-66 75 41
Fax: 02-66 75 42 99
Branch The Netherlands
Eindhoven, The Netherlands
Tel: 040-244 58 45
Fax: 040-244 45 80
Branch Sweden
Taeby, Sweden
Tel: 08-63 80 820
Fax: 08-63 80 388
United Kingdom Branch
Milton Keynes, UK
Tel: 01908-691-133
Fax: 01908-670-290
NEC Electronics Hong Kong Ltd.
Hong Kong
Tel: 2886-9318
Fax: 2886-9022/9044
NEC Electronics Hong Kong Ltd.
Seoul Branch
Seoul, Korea
Tel: 02-528-0303
Fax: 02-528-4411
NEC Electronics Singapore Pte. Ltd.
Singapore
Tel: 65-6253-8311
Fax: 65-6250-3583
NEC Electronics Taiwan Ltd.
Taipei, Taiwan
Tel: 02-2719-2377
Fax: 02-2719-5951
NEC do Brasil S.A.
Electron Devices Division
Guarulhos, Brasil
Tel: 55-11-6465-6810
Fax: 55-11-6465-6829
Downloaded from Elcodis.com electronic components distributor

7
Preliminary User’s Manual U17566EE1V2UM00
Preface
Readers This manual is intended for users who want to understand the functions of the
concerned microcontrollers.
Purpose This manual presents the hardware manual for the concerned microcontrollers.
Organization This system specification describes the following sections:
• Pin function
• CPU function
• Internal peripheral function
Module instances These microcontrollers may contain several instances of a dedicated module.
In general the different instances of such modules are identified by the index
“n”, where “n” counts from 0 to the number of instances minus one.
Legend Symbols and notation are used as follows:
• Weight in data notation: Left is high order column, right is low order
column
• Active low notation: xxx (pin or signal name is over-scored) or
/xxx (slash before signal name)
• Memory map address: High order at high stage and low order at low
stage
Note Additional remark or tip
Caution Item deserving extra attention
Numeric notation • Binary: xxxx or xxxB
• Decimal: xxxx
• Hexadecimal: xxxxHor 0x xxxx
Prefixes representing powers of 2 (address space, memory capacity):
•K(Kilo): 2
10 = 1024
• M (Mega): 220 = 10242= 1,048,576
•G(Giga): 2
30 = 10243= 1,073,741,824
Register contents X, x = don’t care
Diagrams Block diagrams do not necessarily show the exact wiring in hardware but the
functional structure.
Timing diagrams are for functional explanation purposes only, without any
relevance to the real hardware implementation.
Further information For further information see http://www.eu.necel.com.
Downloaded from Elcodis.com electronic components distributor

9
Preliminary User’s Manual U17566EE1V2UM00
Table of Contents
Chapter 1 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
1.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
1.2 Features Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
1.3 Product Series Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
1.4 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
1.5 Ordering Information. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Chapter 2 Pin Functions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
2.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
2.1.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
2.1.2 Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
2.1.3 Noise elimination. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
2.2 Port Group Configuration Registers . . . . . . . . . . . . . . . . . . . . . . . 40
2.2.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
2.2.2 Pin function configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
2.2.3 Pin data input/output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
2.2.4 Configuration of electrical characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
2.2.5 Alternative input selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
2.3 Port Types Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
2.4 Port Group Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
2.4.1 Port group configuration lists. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
2.4.2 Alphabetic pin function list. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
2.4.3 External memory interface of µPD70F3427 . . . . . . . . . . . . . . . . . . . . . . . . . 71
2.4.4 Port group 0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
2.4.5 Port group 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
2.4.6 Port group 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
2.4.7 Port group 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
2.4.8 Port group 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
2.4.9 Port group 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
2.4.10 Port group 6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
2.4.11 Port group 7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
2.4.12 Port group 8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
2.4.13 Port group 9 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
2.4.14 Port group 10 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
2.4.15 Port group 11 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
2.4.16 Port group 12 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
2.4.17 Port group 13 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
2.4.18 Port group 14 (µPD70F3427 only) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
2.5 Noise Elimination . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
2.5.1 Analog filtered inputs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
2.5.2 Digitally filtered inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
Downloaded from Elcodis.com electronic components distributor

10
Table of Contents
Preliminary User’s Manual U17566EE1V2UM00
2.6 Pin Functions in Reset and Power Save Modes. . . . . . . . . . . . 97
2.7 Recommended connection of unused pins . . . . . . . . . . . . . . . . 98
2.8 Package Pins Assignment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
2.8.1 µPD70(F)3420, µPD70(F)3421, µPD70(F)3422, µPD70F3423 — 144 pin
package99
2.8.2 µPD70F3424, µPD70F3425, µPD70F3426 — 144 pin package. . . . . . . . . 100
2.8.3 µPD70F3427 — 208 pin package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
Chapter 3 CPU System Functions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
3.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
3.1.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
3.2 CPU Register Set. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
3.2.1 General purpose registers (r0 to r31) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
3.2.2 System register set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
3.3 Operation Modes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
3.3.1 Normal operation mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
3.3.2 Flash programming mode (flash memory devices only) . . . . . . . . . . . . . . . 115
3.4 Address Space. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
3.4.1 CPU address space and physical address space. . . . . . . . . . . . . . . . . . . . 115
3.4.2 Program and data space. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
3.5 Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
3.5.1 Memory areas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
3.5.2 Recommended use of data address space. . . . . . . . . . . . . . . . . . . . . . . . . 123
3.6 Write Protected Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
3.7 Instructions and Data Access Times . . . . . . . . . . . . . . . . . . . . . 126
Chapter 4 Clock Generator. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
4.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
4.1.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
4.1.2 Clock monitors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
4.1.3 Power save modes overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
4.1.4 Start conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
4.1.5 Start-up guideline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
4.2 Clock Generator Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
4.2.1 General clock generator registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
4.2.2 SSCG control registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
4.2.3 Control registers for peripheral clocks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
4.2.4 Control registers for power save modes . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
4.2.5 Clock monitor registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
4.3 Power Save Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
4.3.1 Power save modes description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
4.3.2 Clock Generator state transistions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
Downloaded from Elcodis.com electronic components distributor

11
Table of Contents
Preliminary User’s Manual U17566EE1V2UM00
4.3.3 Power save mode activation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
4.3.4 CPU operation after power save mode release . . . . . . . . . . . . . . . . . . . . . 181
4.4 Clock Generator Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
4.4.1 Ring and sub oscillator operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
4.4.2 Watch Timer and Watch Calibration Timer clocks . . . . . . . . . . . . . . . . . . . 184
4.4.3 Clock output FOUTCLK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
4.4.4 Operation of the Clock Monitors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
Chapter 5 Interrupt Controller (INTC) . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
5.1 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
5.2 Non-Maskable Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
5.2.1 Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
5.2.2 Restore . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
5.2.3 Non-maskable interrupt status flag (NP) . . . . . . . . . . . . . . . . . . . . . . . . . . . 202
5.2.4 NMI0 control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202
5.3 Maskable Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
5.3.1 Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
5.3.2 Restore . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205
5.3.3 Priorities of maskable interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
5.3.4 xxIC - Maskable interrupts control register . . . . . . . . . . . . . . . . . . . . . . . . . 210
5.3.5 IMR0 to IMR5 - Interrupt mask registers . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
5.3.6 ISPR - In-service priority register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
5.3.7 Maskable interrupt status flag (ID) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
5.3.8 External maskable interrupts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217
5.3.9 Software interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217
5.4 Edge and Level Detection Configuration . . . . . . . . . . . . . . . . . 218
5.5 Software Exception . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
5.5.1 Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
5.5.2 Restore . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
5.5.3 Exception status flag (EP). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222
5.6 Exception Trap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222
5.6.1 Illegal opcode definition. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222
5.6.2 Debug trap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224
5.7 Multiple Interrupt Processing Control . . . . . . . . . . . . . . . . . . . . 225
5.8 Interrupt Response Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227
5.9 Periods in Which Interrupts Are Not Acknowledged . . . . . . 228
Chapter 6 Flash Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
6.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
6.1.1 Flash memory address assignment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230
6.1.2 Flash memory erasure and rewrite . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
6.1.3 Flash memory programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
6.1.4 Boot block swapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
Downloaded from Elcodis.com electronic components distributor

12
Table of Contents
Preliminary User’s Manual U17566EE1V2UM00
6.2 Flash Self-Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
6.2.1 Flash self-programming registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
6.2.2 Interrupt handling during flash self-programming . . . . . . . . . . . . . . . . . . . . 236
6.3 Flash Programming via N-Wire . . . . . . . . . . . . . . . . . . . . . . . . . . . 237
6.4 Flash Programming with Flash Programmer. . . . . . . . . . . . . . 238
6.4.1 Programming environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238
6.4.2 Communication mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239
6.4.3 Pin connection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242
6.4.4 Programming method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244
Chapter 7 Bus and Memory Control (BCU, MEMC). . . . . . . . . . . . 249
7.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249
7.2 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250
7.2.1 Memory banks and chip select signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252
7.2.2 Chips select priority control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255
7.2.3 Peripheral I/O area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255
7.2.4 NPB access timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257
7.2.5 Bus properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257
7.2.6 Boundary operation conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258
7.2.7 Initialization for access to external devices . . . . . . . . . . . . . . . . . . . . . . . . . 259
7.2.8 External bus mute function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259
7.3 Registers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260
7.3.1 BCU registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261
7.3.2 Memory controller registers (µPD70F3427 only) . . . . . . . . . . . . . . . . . . . . 271
7.4 Page ROM Controller. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279
7.5 Configuration of Memory Access. . . . . . . . . . . . . . . . . . . . . . . . . 282
7.5.1 Endian format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282
7.5.2 Wait function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282
7.5.3 Idle state insertion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284
7.6 External Devices Interface Timing . . . . . . . . . . . . . . . . . . . . . . . . 284
7.6.1 Writing to external devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285
7.6.2 Reading from external devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287
7.6.3 Read-write operation on external devices. . . . . . . . . . . . . . . . . . . . . . . . . . 289
7.6.4 Write-read operation on external devices . . . . . . . . . . . . . . . . . . . . . . . . . . 290
7.7 Page ROM Access Timing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291
7.7.1 Half word/word access with 8-bit bus or word access with 16-bit bus . . . . 292
7.7.2 Byte access with 8-bit bus or byte/half word access with 16-bit bus. . . . . . 294
7.8 Data Access Order . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296
7.8.1 Access to 8-bit data busses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296
7.8.2 Access to 16-bit data busses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302
Chapter 8 DMA Controller (DMAC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309
8.1 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309
Downloaded from Elcodis.com electronic components distributor

13
Table of Contents
Preliminary User’s Manual U17566EE1V2UM00
8.2 Peripheral and CPU Clock Settings. . . . . . . . . . . . . . . . . . . . . . . 310
8.3 DMAC Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312
8.3.1 DMA Source address registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312
8.3.2 DMA destination address registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314
8.3.3 DBCn - DMA transfer count registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316
8.3.4 DADCn - DMA addressing control registers . . . . . . . . . . . . . . . . . . . . . . . . 317
8.3.5 DCHCn - DMA channel control registers . . . . . . . . . . . . . . . . . . . . . . . . . . 319
8.3.6 DRST - DMA restart register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320
8.3.7 DTFRn - DMA trigger source select register . . . . . . . . . . . . . . . . . . . . . . . . 321
8.4 Automatic Restart Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323
8.5 Transfer Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324
8.6 Transfer Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324
8.7 DMA Channel Priorities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325
8.8 DMA Transfer Start Factors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325
8.9 Forcible Interruption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325
8.10 Forcible Termination . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326
8.11 DMA Transfer Completion. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327
8.12 Transfer Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328
8.12.1 Single transfer mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328
8.12.2 Block transfer mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330
Chapter 9 ROM Correction Function (ROMC). . . . . . . . . . . . . . . . . . 331
9.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331
9.2 “DBTRAP” ROM Correction Unit . . . . . . . . . . . . . . . . . . . . . . . . . 332
9.2.1 “DBTRAP” ROM correction operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333
9.2.2 “DBTRAP” ROM correction registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335
9.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338
Chapter 10 Code Protection and Security . . . . . . . . . . . . . . . . . . . . . . . 339
10.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339
10.2 Boot ROM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339
10.3 N-Wire Debug Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339
10.4 Flash Writer and Self-Programming Protection . . . . . . . . . . . 341
10.4.1 Variable reset vector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341
Chapter 11 16-bit Timer/Event Counter P (TMP) . . . . . . . . . . . . . . . . 343
11.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343
11.2 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344
11.3 Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344
Downloaded from Elcodis.com electronic components distributor

14
Table of Contents
Preliminary User’s Manual U17566EE1V2UM00
11.4 TMP Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346
11.5 Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358
11.5.1 Interval timer mode (TPnMD2 to TPnMD0 = 000). . . . . . . . . . . . . . . . . . . . 358
11.5.2 External event count mode (TPnMD2 to TPnMD0 = 001). . . . . . . . . . . . . . 367
11.5.3 External trigger pulse output mode (TPnMD2 to TPnMD0 = 010) . . . . . . . 376
11.5.4 One-shot pulse output mode (TPnMD2 to TPnMD0 = 011) . . . . . . . . . . . . 387
11.5.5 PWM output mode (TPnMD2 to TPnMD0 = 100) . . . . . . . . . . . . . . . . . . . . 394
11.5.6 Free-running timer mode (TPnMD2 to TPnMD0 = 101) . . . . . . . . . . . . . . . 403
11.5.7 Pulse width measurement mode (TPnMD2 to TPnMD0 = 110) . . . . . . . . . 420
11.5.8 Timer output operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 426
11.6 Operating Precautions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 427
11.6.1 Capture operation in pulse width measurement and free-running mode . . 427
11.6.2 Count jitter for PCLK4 to PCLK7 count clocks . . . . . . . . . . . . . . . . . . . . . . 427
Chapter 12 16-bit Interval Timer Z (TMZ). . . . . . . . . . . . . . . . . . . . . . . . . 429
12.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 429
12.1.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 430
12.1.2 Principle of operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 430
12.2 TMZ Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 431
12.3 Timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 435
12.3.1 Steady operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 435
12.3.2 Timer start and stop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 436
Chapter 13 16-bit Multi-Purpose Timer G (TMG) . . . . . . . . . . . . . . . . 437
13.1 Features of Timer G . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 437
13.2 Function Overview of Each Timer Gn. . . . . . . . . . . . . . . . . . . . . 438
13.3 Basic Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 440
13.4 TMG Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 441
13.5 Output Delay Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 449
13.6 Explanation of Basic Operation . . . . . . . . . . . . . . . . . . . . . . . . . . 450
13.7 Operation in Free-Run Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451
13.8 Match and Clear Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 462
13.9 Edge Noise Elimination . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 473
13.10 Precautions Timer Gn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 474
Chapter 14 Watch Timer (WT) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 477
14.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 477
14.1.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 479
14.1.2 Principle of operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 480
14.2 Watch Timer Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 482
Downloaded from Elcodis.com electronic components distributor

15
Table of Contents
Preliminary User’s Manual U17566EE1V2UM00
14.3 Watch Timer Operation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 485
14.3.1 Timing of steady operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 485
14.3.2 Watch Timer start-up. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 486
14.4 Watch Calibration Timer Registers . . . . . . . . . . . . . . . . . . . . . . . 488
14.5 Watch Calibration Timer Operation. . . . . . . . . . . . . . . . . . . . . . . 493
14.5.1 INTWT0UV interval measurement with free-running counter . . . . . . . . . . . 494
14.5.2 INTWT0UV interval measurement by restarting the counter . . . . . . . . . . . 495
Chapter 15 Watchdog Timer (WDT). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 497
15.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 497
15.1.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 498
15.1.2 Principle of operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 498
15.1.3 Watchdog Timer clock. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 499
15.1.4 Reset behavior . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 500
15.2 Watchdog Timer Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 501
Chapter 16 Asynchronous Serial Interface (UARTA). . . . . . . . . . . 507
16.1 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 507
16.2 Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 508
16.3 UARTA Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 510
16.4 Interrupt Request Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 518
16.5 Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 519
16.5.1 Data format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 519
16.5.2 SBF transmission/reception format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 521
16.5.3 SBF transmission . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 523
16.5.4 SBF reception . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 523
16.5.5 UART transmission . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 525
16.5.6 Continuous transmission procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 526
16.5.7 UART reception. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 528
16.5.8 Reception errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 530
16.5.9 Parity types and operations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 530
16.5.10 Receive data noise filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 532
16.6 Baud Rate Generator. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 533
16.6.1 Baud Rate Generator configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 533
16.6.2 Baud Rate Generator registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 534
16.6.3 Baud rate calculation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 536
16.6.4 Baud rate error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 536
16.6.5 Baud rate setting example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 537
16.6.6 Allowable baud rate range during reception . . . . . . . . . . . . . . . . . . . . . . . . 537
16.6.7 Baud rate during continuous transmission . . . . . . . . . . . . . . . . . . . . . . . . . 540
16.7 Cautions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 540
Chapter 17 Clocked Serial Interface (CSIB) . . . . . . . . . . . . . . . . . . . . . 541
Downloaded from Elcodis.com electronic components distributor

16
Table of Contents
Preliminary User’s Manual U17566EE1V2UM00
17.1 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 541
17.2 Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 542
17.3 CSIB Control Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 543
17.4 Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 552
17.4.1 Single transfer mode (master mode, transmission/reception mode). . . . . . 552
17.4.2 Single transfer mode (master mode, reception mode) . . . . . . . . . . . . . . . . 554
17.4.3 Continuous mode (master mode, transmission/reception mode) . . . . . . . . 555
17.4.4 Continuous mode (master mode, reception mode) . . . . . . . . . . . . . . . . . . . 556
17.4.5 Continuous reception mode (error) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 557
17.4.6 Continuous mode (slave mode, transmission/reception mode) . . . . . . . . . 558
17.4.7 Continuous mode (slave mode, reception mode) . . . . . . . . . . . . . . . . . . . . 560
17.4.8 Clock timing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 561
17.5 Output Pins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 563
17.6 Operation Flow. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 564
17.7 Baud Rate Generator. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 570
17.7.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 570
17.7.2 Baud Rate Generator registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 571
17.7.3 Baud rate calculation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 572
Chapter 18 I2C Bus (IIC). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 573
18.1 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 573
18.2 I2C Pin Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 574
18.3 Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 575
18.4 IIC Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 578
18.5 I2C Bus Pin Functions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 593
18.6 I2C Bus Definitions and Control Methods. . . . . . . . . . . . . . . . . 594
18.6.1 Start condition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 594
18.6.2 Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 595
18.6.3 Transfer direction specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 596
18.6.4 Acknowledge signal (ACK) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 596
18.6.5 Stop condition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 598
18.6.6 Wait signal (WAIT) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 599
18.7 I2C Interrupt Request Signals (INTIICn) . . . . . . . . . . . . . . . . . . . 601
18.7.1 Master device operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 601
18.7.2 Slave device operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 604
18.7.3 Slave device operation (when receiving extension code) . . . . . . . . . . . . . . 608
18.7.4 Operation without communication. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 612
18.7.5 Arbitration loss operation (operation as slave after arbitration loss) . . . . . . 612
18.7.6 Operation when arbitration loss occurs . . . . . . . . . . . . . . . . . . . . . . . . . . . . 614
18.8 Interrupt Request Signal (INTIICn). . . . . . . . . . . . . . . . . . . . . . . . 619
18.9 Address Match Detection Method . . . . . . . . . . . . . . . . . . . . . . . . 620
Downloaded from Elcodis.com electronic components distributor

17
Table of Contents
Preliminary User’s Manual U17566EE1V2UM00
18.10 Error Detection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 620
18.11 Extension Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 621
18.12 Arbitration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 622
18.13 Wakeup Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 623
18.14 Cautions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 624
18.15 Communication Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 624
18.15.1 Master operation 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 624
18.15.2 Master operation 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 626
18.15.3 Slave operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 627
18.16 Timing of Data Communication . . . . . . . . . . . . . . . . . . . . . . . . . . 631
Chapter 19 CAN Controller (CAN) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 639
19.1 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 640
19.1.1 Overview of functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 641
19.1.2 Configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 642
19.2 CAN Protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 643
19.2.1 Frame format. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 643
19.2.2 Frame types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 644
19.2.3 Data frame and remote frame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 644
19.2.4 Error frame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 652
19.2.5 Overload frame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 653
19.3 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 654
19.3.1 Determining bus priority . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 654
19.3.2 Bit stuffing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 654
19.3.3 Multi masters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 655
19.3.4 Multi cast . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 655
19.3.5 CAN sleep mode/CAN stop mode function . . . . . . . . . . . . . . . . . . . . . . . . . 655
19.3.6 Error control function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 655
19.3.7 Baud rate control function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 662
19.4 Connection with Target System . . . . . . . . . . . . . . . . . . . . . . . . . . 665
19.5 Internal Registers of CAN Controller . . . . . . . . . . . . . . . . . . . . . 666
19.5.1 CAN module register and message buffer addresses . . . . . . . . . . . . . . . . 666
19.5.2 CAN controller configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 667
19.5.3 CAN registers overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 668
19.5.4 Register bit configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 672
19.6 Control Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 675
19.7 Bit Set/Clear Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 709
19.8 CAN Controller Initialization. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 711
19.8.1 Initialization of CAN module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 711
19.8.2 Initialization of message buffer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 711
19.8.3 Redefinition of message buffer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 711
Downloaded from Elcodis.com electronic components distributor

18
Table of Contents
Preliminary User’s Manual U17566EE1V2UM00
19.9 Transition from Initialization Mode to Operation Mode. . . . 713
19.9.1 Resetting error counter CNERC of CAN module . . . . . . . . . . . . . . . . . . . . 714
19.10 Message Reception . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 714
19.10.1 Message reception . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 714
19.10.2 Receive history list function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 715
19.10.3 Mask function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 717
19.10.4 Multi buffer receive block function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 719
19.10.5 Remote frame reception . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 720
19.11 Message Transmission. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 721
19.11.1 Message transmission . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 721
19.11.2 Transmit history list function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 723
19.11.3 Automatic block transmission (ABT) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 725
19.11.4 Transmission abort process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 727
19.11.5 Remote frame transmission . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 727
19.12 Power Saving Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 728
19.12.1 CAN sleep mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 728
19.12.2 CAN stop mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 730
19.12.3 Example of using power saving modes. . . . . . . . . . . . . . . . . . . . . . . . . . . . 731
19.13 Interrupt Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 732
19.14 Diagnosis Functions and Special Operational Modes. . . . . 733
19.14.1 Receive-only mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 733
19.14.2 Single-shot mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 734
19.14.3 Self-test mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 735
19.15 Time Stamp Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 736
19.15.1 Time stamp function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 736
19.16 Baud Rate Settings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 737
19.16.1 Baud rate setting conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 737
19.16.2 Representative examples of baud rate settings . . . . . . . . . . . . . . . . . . . . . 741
19.17 Operation of CAN Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 745
19.18 Operating Precautions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 768
19.18.1 Wake-up from sleep mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 768
Chapter 20 A/D Converter (ADC). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 769
20.1 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 769
20.2 Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 771
20.3 ADC Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 773
20.4 Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 781
20.4.1 Basic operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 781
20.4.2 Trigger mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 782
20.4.3 Operation modes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 783
20.4.4 Power-fail compare mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 785
20.5 Cautions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 788
Downloaded from Elcodis.com electronic components distributor

19
Table of Contents
Preliminary User’s Manual U17566EE1V2UM00
20.6 How to Read A/D Converter Characteristics Table. . . . . . . . 790
Chapter 21 Stepper Motor Controller/Driver (Stepper-C/D). . . . 795
21.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 795
21.1.1 Driver overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 795
21.2 Stepper Motor Controller/Driver Registers. . . . . . . . . . . . . . . . 797
21.3 Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 803
21.3.1 Stepper Motor Controller/Driver operation . . . . . . . . . . . . . . . . . . . . . . . . . 803
21.4 Timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 806
21.4.1 Timer counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 806
21.4.2 Automatic PWM phase shift . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 807
Chapter 22 LCD Controller/Driver (LCD-C/D). . . . . . . . . . . . . . . . . . . . 809
22.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 809
22.1.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 810
22.1.2 LCD panel addressing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 811
22.2 LCD-C/D Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 812
22.3 Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 816
22.3.1 Common signals and segment signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . 816
22.3.2 Activation of LCD segments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 818
22.4 Display Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 818
Chapter 23 LCD Bus Interface (LCD-I/F) . . . . . . . . . . . . . . . . . . . . . . . . . 823
23.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 823
23.1.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 824
23.1.2 LCD Bus Interface access modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 825
23.1.3 Access types to the LBDATA0 register . . . . . . . . . . . . . . . . . . . . . . . . . . . . 825
23.1.4 Interrupt generation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 826
23.2 LCD Bus Interface Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 827
23.3 Timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 834
23.3.1 Timing dependencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 834
23.3.2 LCD Bus I/F states during and after accesses . . . . . . . . . . . . . . . . . . . . . . 835
23.3.3 Writing to the LCD bus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 835
23.3.4 Reading from the LCD bus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 838
23.3.5 Write-Read-Write sequence on the LCD bus . . . . . . . . . . . . . . . . . . . . . . . 840
Chapter 24 Sound Generator (SG). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 841
24.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 841
24.1.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 842
24.1.2 Principle of operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 843
24.2 Sound Generator Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 844
Downloaded from Elcodis.com electronic components distributor

20
Table of Contents
Preliminary User’s Manual U17566EE1V2UM00
24.3 Sound Generator Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 849
24.3.1 Generating the tone . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 849
24.3.2 Generating the volume information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 850
24.4 Sound Generator Application Hints . . . . . . . . . . . . . . . . . . . . . . 853
24.4.1 Initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 853
24.4.2 Start and stop sound . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 853
24.4.3 Change sound volume . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 853
24.4.4 Generate special sounds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 853
Chapter 25 Power Supply Scheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 855
25.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 855
25.2 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 857
25.2.1 Devices µPD70(F)3420, µPD70(F)3421, µPD70(F)3422, µPD70F3423 . . 857
25.2.2 Devices µPD70F3424, µPD70F3425, µPD70F3426. . . . . . . . . . . . . . . . . . 858
25.2.3 Device µPD70F3427 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 859
25.3 Voltage regulators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 860
Chapter 26 Reset. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 861
26.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 861
26.1.1 General reset performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 861
26.1.2 Reset at power-on. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 865
26.1.3 External RESET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 866
26.1.4 Reset by Watchdog Timer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 867
26.1.5 Reset by Clock Monitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 867
26.2 Reset Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 867
Chapter 27 Voltage Comparator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 871
27.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 871
27.1.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 872
27.1.2 Comparison results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 872
27.1.3 Stand-by mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 872
27.2 Voltage Comparator Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . 873
27.3 Timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 875
Chapter 28 On-Chip Debug Unit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 877
28.1 Functional Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 877
28.1.1 Debug functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 877
28.1.2 Security function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 879
28.2 Controlling the N-Wire Interface . . . . . . . . . . . . . . . . . . . . . . . . . . 882
28.3 N-Wire Enabling Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 884
28.3.1 Starting normal operation after RESET and RESPOC . . . . . . . . . . . . . . . . 884
28.3.2 Starting debugger after RESET and RESPOC . . . . . . . . . . . . . . . . . . . . . . 884
Downloaded from Elcodis.com electronic components distributor
Table of contents
Other NEC Microcontroller manuals

NEC
NEC MuPD754202 User manual

NEC
NEC mPD780344 Series User manual

NEC
NEC V850E/MA1 User manual

NEC
NEC V850E/IA1 mPD703116 User manual

NEC
NEC mPD78F0730 User manual

NEC
NEC mPD178054 Series User manual

NEC
NEC V850E/RS1 User manual

NEC
NEC V850E/MS1 UPD703100 User manual

NEC
NEC V850/SA1 mPD703015 User manual

NEC
NEC mPD784225 Series User manual

NEC
NEC PD703114 User manual

NEC
NEC mPD78C14 A Quick start guide

NEC
NEC V850ES/KE1+ User manual

NEC
NEC V850ES/Jx3-H User manual

NEC
NEC 78K0S/KA1+ User manual

NEC
NEC mPD780208 Subseries User manual

NEC
NEC 78K0/KD1 Series User manual

NEC
NEC mPD789101 User manual

NEC
NEC V854 UPD703006 User manual

NEC
NEC mPD789426 Series User manual