To our customers,
Old Company Name in Catalogs and Other Documents
On April 1
st
, 2010, NEC Electronics Corporation merged with Renesas Technology
Corporation, and Renesas
Electronics Corporation
took over all the business of both
companies.
Therefore, although the old company name remains in this document, it is a valid
Renesas
Electronics document. We appreciate your understanding.
Renesas Electronics website:
http://www.renesas.com
April 1
st
, 2010
Renesas Electronics Corporation
Issued by:
Renesas Electronics Corporation
(http://www.renesas.com)
Send any inquiries to
http://www.renesas.com/inquiry.
Notice
1.
All information included in this document is current as of the date this document is issued. Such information, however, is
subject to change without any prior notice. Before purchasing or using any Renesas Electronics products listed herein, please
confirm the latest product information with a Renesas Electronics sales office. Also, please pay regular and careful attention to
additional and different information to be disclosed by Renesas Electronics such as that disclosed through our website.
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.
You should not alter, modify, copy, or otherwise misappropriate any Renesas Electronics product, whether in whole or in part.
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.
When exporting the 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. You should not use Renesas
Electronics products or the 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. 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.
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.
Renesas Electronics products are classified according to the following three quality grades: “Standard”, “High Quality”, and
“Specific”. The recommended applications for each Renesas Electronics product depends on the product’s quality grade, as
indicated below. 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 categorized as “Specific” without the prior
written consent of Renesas Electronics. Further, you may not use any Renesas Electronics product for any application for
which it is not intended without the prior written consent of Renesas Electronics. 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 an
application categorized as “Specific” or for which the product is not intended where you have failed to obtain the prior written
consent of Renesas Electronics. The quality grade of each Renesas Electronics product is “Standard” unless otherwise
expressly specified in a Renesas Electronics data sheets or data books, etc.
Computers; office equipment; communications equipment; test and measurement equipment; audio and visual
equipment; home electronic appliances; machine tools; personal electronic equipment; and industrial robots.
“High Quality”: 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; medical equipment or
systems for life support (e.g. artificial life support devices or systems), surgical implantations, or healthcare
intervention (e.g. excision, etc.), and any other applications or purposes that pose a direct threat to human life.
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.
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 system
manufactured by you.
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.
This document may not be reproduced or duplicated, in any form, in whole or in part, without prior written consent of Renesas
Electronics.
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.
“Standard”:
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
(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.
M30245 Group
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
REJ03B0005-0200
Rev.2.00
Oct 16, 2006
M30245 Group
The M30245 group is a 16-bit microcomputer based on the M16C family core technology that uses a high
performance silicon gate CMOS process with an M16C/62 Series CPU core. It comes packaged in a 100-pin
molded plastic LQFP. They are single-chip USB peripheral microcontrollers that operate at Full Speed (12
Mbps) and are compliant with the Universal Serial Bus (USB) Version 2.0 specification. They also include many
built-in peripherals including: A/D converter, Timers, UARTs, Serial Sound Interface, I
2
C, DMAC, CRC and
more. These microcontrollers operate using sophisticated instructions featuring a high level of instruction effi-
ciency, making them capable of executing instructions at high speed.
Features
Number of instructions ................................ 91
Shortest instruction execution time ............. 62.5ns f(X
IN
)=16MHz, Vcc=3V with no wait
USB features: .............................................. Supports full-speed operation (12 Mbps)
3.25K programmable FIFO, 9 endpoints
Integrated transceiver
Conforms to USB V 2.0 Specification
Frequency synthesizer ................................ PLL for 48MHz clock
Memory capacity .......................................... 64K ROM / 5K RAM (M30245M8-XXXGP)
128K ROM / 10K RAM (M30245MC-XXXGP)
128K Flash /10K RAM (M30245FCGP)
Supply voltage ............................................. 3.0 to 3.6V (f(X
IN
)=16MHz)
Processor modes ....................................... Single chip, Memory expansion, Microprocessor
Interrupts ..................................................... 31 internal and 5 external interrupt sources
4 software interrupt sources
7 levels (including key input interrupt X 8)
Multifunction 16-bit timer ............................. 5 16-bit timers
Serial Communication ................................ 2 X 7/8/9, 2 X 7/8/9/16/24/32 bits
Configurable for synchronous or asynchronous mode,
Serial Sound Interface, I
2
C Bus
DMAC ........................................................... 4 channels
A/D Converter ............................................... 10 bits X 8 channels
CRC calculation circuit ................................ 2 polynomials with MSB/LSB selectable
Watchdog timer ........................................... 1 line
Key-on wake up ........................................... 8 inputs
Programmable I/O ....................................... 82 lines
AND flash control circuit .............................. Built-in
Clock-generating circuit .............................. 2 built-in clock generation circuits
(built-in feedback resistor, and external ceramic or quartz oscillator)
Rev.2.00 Oct 16, 2006
REJ03B0005-0200
page 1 of 264
M30245 Group
Description
Table of Contents
Features ................................................................................................................................................. 1
Description ............................................................................................................................................ 3
Memory ................................................................................................................................................ 12
Central Processing Unit ..................................................................................................................... 13
Reset .................................................................................................................................................... 16
Special Function Registers ................................................................................................................ 18
Processor Modes ................................................................................................................................ 26
System Clock ....................................................................................................................................... 38
Power Control ..................................................................................................................................... 45
Frequency synthesizer circuit ............................................................................................................ 47
Interrupts .............................................................................................................................................. 50
INT interrupt ......................................................................................................................................... 62
NMI Interrupt ........................................................................................................................................ 62
Key-Input Interrupt .............................................................................................................................. 62
Address-Match Interrupt ...................................................................................................................... 65
Watchdog Timer .................................................................................................................................. 68
Universal Serial Bus ............................................................................................................................ 70
Vbus Detect .......................................................................................................................................... 98
Direct memory access controller ..................................................................................................... 100
Timer A .............................................................................................................................................. 110
Serial Communication ...................................................................................................................... 125
Clock synchronous serial I/O mode ................................................................................................. 132
Clock asynchronous serial I/O (UART) mode .................................................................................. 137
UART mode (compliant with the SIM interface) ............................................................................. 142
I
2
C Bus interface mode ..................................................................................................................... 145
Serial Interface Special Function (SPI mode) ................................................................................ 151
IE mode .............................................................................................................................................. 154
Serial Sound Interface ...................................................................................................................... 156
A/D converter ..................................................................................................................................... 168
CRC calculation circuit ..................................................................................................................... 177
Programmable I/O ports ................................................................................................................... 180
AND Flash Control Circuit ................................................................................................................. 190
Flash memory .................................................................................................................................... 195
CPU Rewrite Mode ............................................................................................................................ 197
Parallel I/O Mode .............................................................................................................................. 206
Standard Serial I/O Mode ................................................................................................................. 208
Standard serial I/O mode 1 .............................................................................................................. 211
Standard serial I/O mode 2 .............................................................................................................. 223
Electrical Specifications ................................................................................................................... 234
Usage Notes ....................................................................................................................................... 250
Rev.2.00 Oct 16, 2006
REJ03B0005-0200
page 2 of 264
M30245 Group
Description
Applications
USB peripherals, such as telephones, audio systems, office equipment, communications equipment, portable
devices, scanners, digital cameras, and memory card readers.
Block Diagram
Figure 1.1 is a block diagram of the M30245 group.
8
Port P0
8
Port P1
8
Port P2
8
Port P3
8
Port P4
8
Port P5
8
Port P6
8
Port P7
Port P8
Internal Peripheral Functions
Timers
Timer TA0 (16 bits)
Timer TA1 (16 bits)
Timer TA2 (16 bits)
Timer TA3 (16 bits)
Timer TA4 (16 bits)
System Clock Generator
Xin - Xout
Xcin - Xcout
CRC Arithmetic Circuit
(X
16
+X
12
+X
5
+1, X
16
+X
15
+X
2
+1)
DMAC
(4 channels)
Memory
USB FIFO
(3.25K bytes)
ROM/FLASH
(Note 1)
RAM
(Note 2)
7
1
Port P8
5
UART/Clock Synchronous SI/O
(8 bits X 4 channels)
A/D Converter
(10 bits X 8 channels)
Watchdog Timer
(15 bits)
AND flash control circuit
M16C/62 16-bit CPU Core
Ports P90, P92, P93
Registers
R0H
R0L
R0H
R0L
R1H
R1L
R1H
R1L
R2
R2
R3
R3
A0
A0
A1
A1
FB
FB
SB
Program counter
PC
Vector table
INTB
Stack pointer
ISP
USP
3
Port P10
USB Function
with frequency synthesizer
FLG
Multiplier
8
Note 1: ROM size depends on MCU type
Note 2: RAM size depends on MCU type
Figure 1.1. Block diagram of M30245 group
Rev.2.00 Oct 16, 2006
REJ03B0005-0200
page 3 of 264