1. Hitachi neither warrants nor grants licenses of any rights of Hitachi’s or any third party’s
patent, copyright, trademark, or other intellectual property rights for information contained in
this document. Hitachi bears no responsibility for problems that may arise with third party’s
rights, including intellectual property rights, in connection with use of the information
contained in this document.
2. Products and product specifications may be subject to change without notice. Confirm that you
have received the latest product standards or specifications before final design, purchase or
use.
3. Hitachi makes every attempt to ensure that its products are of high quality and reliability.
However, contact Hitachi’s sales office before using the product in an application that
demands especially high qua lity and reliability or where its failure or malfunction m a y dir ectly
threaten human life or cause risk of bodily injury, such as aerospace, aeronautics, nuclear
power, combustion control, transportation, traffic, safety equipment or medical equipment for
life support.
4. Design your application so that the product is used within the ranges guaranteed by Hitachi
particularly for maximum rating, operating supply voltage range, heat radiation characteristics,
installation conditions and other characteristics. Hitachi bears no respon sib ility for failure or
damage when used beyond the guaranteed ranges. Even within the guaranteed ranges,
consider normally foreseeable failure rates or failure modes in semiconductor devices and
employ systemic measures such as fail-safes, so that the equipment incorporating Hitachi
product does not cause bodily injury, fire or other consequential damage due to operation of
the Hitachi product.
5. This product is not designed to be radiation resistant.
6. No one is permitted to reproduce or duplicate, in any form, the whole or part of this document
without written approval from Hitachi.
7. Contact Hitachi’s sales office for any questions regarding this document or Hitachi
semiconductor products.
Rev. 3.0, 10/02, page ii of lviii
Page 3
General Precautions on the Handling of Products
1. Treatment of NC Pins
Note:Do not connect anything to the NC pins.
The NC (not connected) pins are either not connected to any of the internal circuitry or are
used as test pins or to reduce noise. If something is connected to the NC pins, the operation
of the LSI is not guaranteed.
2. Treatment of Unused Input Pins
Note:Fix all unused input pins to high or low level.
Generally, the input pins of CMOS products are high-impedance input pins. If unused pins
are in their open states, intermediate levels are induced by noise in the vicinity, a passthrough current flows internally, and a malf unction may occur.
3. Processing before Initialization
Note:When power is first supplied, the product’s state is undefined. The states of internal
circuits are undefined until full power is supplied throughout the chip and a low level is
input on the reset pin. During the period where the states are undefined, the register
settings and the output state of each pin are also undefined. Design your system so that it
does not malfunction because of processing while it is in this undefined state. For those
products which have a reset function, reset the LSI immediately after the power supply has
been turned on.
4. Prohibition of Access to Undefined or Reserved Address
Note:Access to undefined or reserved addresses is prohibited.
The undefined or reserved addresses may be used to expand functions, or test registers
may have been be allocated to these address. Do not access these registers: the system’s
operation is not guaranteed if they are accessed.
Rev. 3.0, 10/02, page iii of lviii
Page 4
Rev. 3.0, 10/02, page iv of lviii
Page 5
Configuration of this Manual
This manual comprises the fo llowing items:
1. Precautions in Relation to this Product
2. Configuration of this Manual
3. Overview
4. Table of Contents
5. Summary
6. Description of Functional Modules
•CPU and System-Control Modules
•On-chip Peripheral Modules
The configuration of the functional description of each module differs according to the module.
However, the generic style includes the following items:
i)Features
ii) I/O pins
iii) Description of Registers
iv) Description of Operation
v) Usage: Points for Caution
When designing an app lication system that includes this LSI, take the points for caution into
account. Each section includes points for caution in relation to the descriptions given, and points
for caution in usage are given, as required, as the final part of each section.
7. List of Registers
8. Electrical Characteristics
9. Appendix
•Product-type codes and external dimensions
•Major revisions or addenda in this version of the manual (only for revised versions)
The history of revisions is a summary of sections that have been revised and sections that have
been added to earlier versions. This does not include all of the revised contents. For details,
confirm by referring to the main description of this manual.
10.Appendix/Appendices
Rev. 3.0, 10/02, page v of lviii
Page 6
Rev. 3.0, 10/02, page vi of lviii
Page 7
Preface
This LSI is a high-performance microcomputer (MCU) made up of the H8S/2000 CPU with
Hitachi's original architecture as its co r e, and th e perip heral functions required to configure a
system.
The H8S/2000 CPU has an internal 32-bit configuration, sixteen 16-bit general registers, and a
simple and optimized instruction set for high-speed operation. The H8S/2000 CPU can handle a
16-Mbyte linear address space. The instruction set of the H8S/2000 CPU maintains upward
compatibility at the object level with the H8/300 and H8/300H CPUs. This allows the H8/300,
H8/300L, or H8/300H user to easily utilize the H8S/2000 CPU.
This LSI is equipped with ROM, RAM, a direct memory access controller (DMAC), a bus master
for a data transfer controller (DTC), a 16-bit timer pulse unit (TPU), an 8-bit timer (TMR), a
watchdog timer (WDT), a universal serial bus (USB), two types of serial communication interfaces
(SCIs), an A/D converter, a D/A converter, and I/O ports as on-chip peripheral modules for system
configuration.
TM
A single-power flash memory (F-ZTAT
) version and masked ROM version are available for this
LSI's ROM. The F-ZTAT version provides flexibility as it can be reprogrammed in no time to
cope with all situations from the early stages of mass production to full-scale mass production.
This is particularly applicable to application devices with specifications that will most probably
change.
This manual describes this LSI's hardware.
TM
Note: * F-ZTAT
is a trademark of Hitachi, Ltd.
Target Users:This manual was written for users who will be using the H8S/2215 Ser ies in the
design of application systems. Target users are expected to understand the
fundamentals of electrical circuits, logical circuits, and microcomputers.
Objective:This manual was written to explain the h ardware fun ctions and electrical
characteristics of the H8S/2215 Series to the target users.
Refer to the H8S/2600 Series, H8S/2000 Series Programming Manual for a
detailed description of th e instruction set.
Notes on reading this manual:
• In order to understand the overall functions of the chip
Read the manual according to the contents. This manual can be roughly categorized into parts
on the CPU, system control functions, peripheral functions and electrical characteristics.
• In order to understand the details of the CPU's functions
Read the H8S/2600 Series, H8S/2000 Series Programming Manual.
Rev. 3.0, 10/02, page vii of lviii
Page 8
• In order to understand the details of a register when its name is known
Read the index that is the final part of the manual to find the page number of the entry on the
register. The addresses, bits, and initial v alues of the registers are summarized in Appen dix A,
On-Chip I/O Register.
Examples:Register name:The following notation is used for cases when the same or a
similar function, e.g. 16-bit timer pulse unit or serial
communication, is implemented on more than one channel:
XXX_N (XXX is the register name and N is the channel
number)
Bit order:The MSB is on the left and the LSB is on the right.
Related Manuals:The latest versions of all related manuals ar e available from our web site.
Please ensure you have the latest versions of all documents you require.
http://www.hitachisemiconductor.com/
H8S/2215 Series manuals:
Manual TitleADE No.
H8S/2215 Series Hardware ManualThis manual
H8S/2600 Series, H8S/2000 Series Programming ManualADE-602-083
Base clock with 460.784 kbps average transfer rate
1234 657 8912 13 14 15 1610 11
7.3725 MHz
8 MHz
123456789101112 13141516
(average)
Base clock
16 MHz/2 = 8 MHz
8 MHz × (47/51)= 7.3725 MHz
1 bit = base clock × 16*
Average transfer rate = 7.3725 MHz/16= 460.784 kbps
Average error = -0.004%
2425125678
11 12 13 14 15 16 17 18 19 20 212322
12345678910
Base clock with 720 kbps average transfer rate
12 345 67 8
12 345 67 8
5.76 MHz
8 MHz
123 45 678
(average)
Base clock
16 MHz/2 = 8 MHz
8 MHz × (18/25)= 5.76 MHz
Average transfer rate = 5.76 MHz/8= 720 kbps
Average error = ±0%
1 bit = base clock × 8*
As the base clock synchronization varies, so does the length of one bit.
*
Note:
Rev. 3.0, 10/02, page xii of lviii
Page 13
Section
Page
Description
Figure 13.4 Example of
Average Transfer Rate
Setting with TPU Clock
Input
374
Newly added
1
56789101112
234
1
12345678
5
91011121
234567891011121312345678910111213
11
Main clock: 16 MHz
TIOCA1(TPU_1) output = 8 MHz
TMDR_1 = TMDR_2 = H'C2 [PWM mode 1]
TCR_1 = H'20 [TCNT_1 incremented on rising edge of ø/1, TCNT_1 cleared by TGRA_1 compare match]
TGRB_1 = H'0000, TGRA_1 = H'0001
TIOR_1 = H'21 [1 output on TGRB_1 compare match, TIOCA1 initial output 0, 0 output on TGRA_1 compare match]
TCR_2 = H'2C [TCNT_2 incremented on falling edge of TCLKA (TIOCA1), TCNT_2 cleared by TGRA_2 compare match]
TGRB_2 = H'0000, TGRA_2 = H'000C
TIOR_2 = H'21 [1 output on TGRB_2 compare match, TIOCA2 initial output 0, 0 output on TGRA_2 compare match]
Example for 921.6 kbps when ø = 16 MHz
Generation of clock with 923.077 kbps average transfer rate by means of TPU
(1) An 8 MHz base clock provided by TPU_1 is multiplied by 12/13 by TPU_2 to generate a 7.3846 MHz base clock
(2) By making 1 bit = 8 base clocks, the average transfer rate is made 7.3846 MHz/8 = 923.077 kbps.
Sample TPU and SCI settings
SEMR_0 = H'0C (ABCS = 1, ACS2-0 = B'100)
12345678
TIOCA2 (TPU_2) output
1234678
8 MHz
7.3846 MHz
1 bit = 8 base clocks*
12345678
= 7.3846 MHz
= 8 MHz x 12/13
Internal base clock
Average error relative to 921.6 kbps = +0.16%
Average transfer rate = 7.3846 MHz/8 = 923.077 kbps
Note: * As the base clock synchronization varies, so does the length of one bit.
Rev. 3.0, 10/02, page xiii of lviii
Page 14
Section
Page
Description
13.7 SCI Select Function
Figure 13.24 Example of
Communication Using the
SCI Select Function
Figure 13.25 Operation of
Communication Using the
SCI Select Function
14.3.2 IDCODE Register
(IDCODE)
Table 14.3 IDCODE
Register Configuration
406
407
422
Added
Note: * The selection signals (SEL_A and SEL_B) of the LSI
must be switched while the serial clock (M_SCK) is high after
the end bit of the transm it data has been send. Note that one
selection signal can be brought low at the same tim e.
Figure title amended
Added
Note: * The selection signals (SEL_A and SEL_B) of the LSI
must be switched while the serial clock (M_SCK) is high after
the end bit of the transm it data has been send. Note that one
selection signal can be brought low at the same tim e.
3rd line changed as follows
The HD64F2215, HD64F2215U, HD6432215A,
HD6432215B, and HD6432215C output fixed codes
H’0002200F, H’0003200F, H’001B200F, and H’001C200F,
respectively, from the TDO.
Code amended
(Incorrect) HD64F2215 code
(Correct) HD64F2215 code,
HD64F2215U code
15.1 Features
Endpoint configuratio n
•
selectable
433Replaced
The FIFO buffer for bulk transfer and isochronous transfer
has a double-buffer configuration
Total 1288-byte FIFO
—EP0s fixed: Control_setup FIFO, 8 bytes
—EP0i fixed: Control_in FIFO, 64 bytes
—EP0o fixed: Control_out FIFO, 64 bytes
—EPn selectable: Interrupt_in FIFO, variable 0 to 64 bytes
—EPn selectable: Bulk_in FIFO, 64 bytes x 2 (double-buffer
configuration)
—EPn selectable: Bulk_out FIFO, 64 bytes x 2 (double-buffer
configuration)
—EPn selectable: Isochronous_in FIFO, variable 0 to 128
bytes x 2 (double-buffer configuration)
—EPn selectable: Isochronous_out FIFO, variable 0 to 128
bytes x 2 (double-buffer configuration)
—EPn selectable: Bulk_in FIFO, 64 bytes x 2 (double-buffer
configuration)
—EPn selectable: Bulk_out FIFO, 64 bytes x 2 (double-buffer
configuration)
—EPn selectable: Interrupt_in FIFO, variable 0 to 64 bytes
Rev. 3.0, 10/02, page xiv of lviii
Page 15
Section
Page
Description
15.1 Features
•Maximum
Configuration,
InterfaceNumber, and
AlternateSetting
configuration
specifications of this
LSI Configuration
Figure 15.1 Block
Diagram of USB
15.3.1 USB Endpoint
Information Registers 00_0
to 22_4 (UEPIR00_0 to
UEPIR22_4)
434
435
438
Endpoint configuration based on Bluetooth standard 1.0 can
be specified.
Deleted
Newly added
Maximum Configuration, InterfaceNumber, an d
•
AlternateSetting configuration specificatio ns of this LSI
Configuration 1 ----- InterfaceNumber 0 to 2 ----AlternateSetting 0 to 7 ----- EP0, EP1 to EP8
Figure amented
1288-byte FIFO
EP0o
EP2iEP0s
EP2o
EP3i
EP3oEP1i
EP4i
EP4oEP0i
EP5i
Explanation added to 23th line as follows
UEPIR is used to set
23 kinds of endpoint (EPINFO data).
• UEPIRnn_0439
Replaced
•••• UEPIRnn_0
BitBit NameInitial ValueR/WDescription
7
D39 –D36—R/WEndpoint number (4-bit configuration, settable
to4
32D35
D34
10D33
D32
—
—
—
—
R/W
R/W
R/W
R/W
values: 0 to 8)
0000: Control transfer (EP0)
0001 to 1000: Other than Control transfer (EP1 to
EP8)
There are restrictions on settable endpoint
numbers according to the Interface number and
Alternate number to which the endpoint belongs.
Restriction 1: Set different endpoint numbers
under one Alternate.
However, there is no problem with
use of the same endpoint number if
the transfer directions (IN/OUT) are
different. (Ex: Alt0 -- EP1, EP2i,
EP2o)
Restriction 2: Do not set the same endpoint
number under different Interface
numbers. (Ex: Int0 -- Alt0 -- EP1,
EP2, Int1 -- Alt0 -- EP3)
Configuration number to which endpoint belongs
(2-bit configuration, settable values: 0, 1)
00: Control transfer
01: Other than Control transfer
Interface number to which endpoint belongs (2-bit
configuration, settable values: 0 to 2)
00: Control transfer
00 to 10: Other than Control transfer
Rev. 3.0, 10/02, page xv of lviii
Page 16
Section
Page
Description
15.3.1 USB Endpoint
Information Registers 00_0
to 22_4 (UEPIR00_0 to
UEPIR22_4)
UEPIRnn_1
•
UEPIRnn_2
•
440
Replaced
UEPIRnn_1
BitBit NameInitial ValueR/WDescription
7 to5D31 –D29—R/WAlternate number to which endpoint belongs (3-bit
43D28
D27
2D26 —R/WEndpoint transfer direction (1-bit configuration)
10D25
D24
UEPIRnn_2
BitBit NameInitial ValueR/WDescription
7 to0D23 –D16—R/WEndpoint maximum packet size (D25 to D16 10-bit
—
—
—
—
R/W
R/W
R/W
R/W
configuration, settable values: 0 to 7)
000: Control transfer
001 to 111: Other than Control transfer
Endpoint transfer type (2-bit configuration)
00: Control(UEPIR00)
01: Isochronous(UEPIR04 to UEPIR19)
10: Bulk(UEPIR02,UEPIR03,UEPIR20,UEPIR21)
11: Interrupt(UEPIR01,UEPIR22)
0: out (UEPIR00,03,05,07,09,11,13,15,17,19,21)
1: in (UEPIR01,02,04,06,08,10,12,14,16,18,20,22)
Endpoint maximum packet size (D25 to D16 10-bit
configuration)
Control transfer = 64 only (UEPIR00)
Interrupt transfer = 0 to 64 (UEPIR01, UEPIR22)
Bulk transfer = 0 or 64 (UEPIR02, UEPIR03,
UEPIR20, UEPIR21)
Isochronous transfer = 0 to 128 (UEPIR04 to
UEPIR19)
configuration)
Control transfer = 64 only (UEPIR00)Interrupt
transfer = 0 to 64 (UEPIR01, UEPIR22)
Bulk transfer = 0 or 64 (UEPIR02,UEPIR03,
UEPIR20, UEPIR21)
Isochronous transfer = 0 to 128 (UEPIR04 to
UEPIR19)
• UEPIRnn_3441
• UEPIRnn_4
Table 15.2 EPINFO Data
444
Settings
Replaced
UEPIRnn_3
BitBit NameInitial ValueR/WDescription
7 to0D15 –D8—R/WEndpoint internal address (D15 to D0 16-bit
UEPIRnn_4
BitBit NameInitial ValueR/WDescription
7 to0D7 –D0—R/WEndpoint internal address (D15 to D0 16-bit
configuration)
Set UEPIR00_3, UEPIR00_4 = H'0000
Set UEPIR01_3, UEPIR01_4 = H'0001
:
Set UEPIR21_3, UEPIR21_4 = H'0015
Set UEPIR22_3, UEPIR22_4 = H'0016
configuration)
Set UEPIR00_3, UEPIR00_4 = H'0000
Set UEPIR01_3, UEPIR01_4 = H'0001
:
Set UEPIR21_3, UEPIR21_4 = H'0015
Set UEPIR22_3, UEPIR22_4 = H'0016
Note amended
Notes:*5
Maximum packet size of Isochronous transfer
must be from 0 to 128.
Rev. 3.0, 10/02, page xvi of lviii
Page 17
Section
Page
Description
15.3.11 USB Endpoint
Data Register 0s
(UEDR0s)
15.3.12 USB Endpoint
Data Register 0i (UEDR0i)
15.3.13 USB Endpoint
Data Register 0o
(UEDR0o)
15.3.14 USB Endpoint
Data Register 1i (UEDR1i)
15.3.15 USB Endpoint
Data Register 2i (UEDR2i)
15.3.16 USB Endpoint
Data Register 2o
(UEDR2o)
457
458
2nd line changed as follows
(Incorrect) Endpoint0
(Correct) Endpoint0
s
9th line changed as follows
(Incorrect) Endpoint0
(Correct) Endpoint0
i
15th line changed as follows
(Incorrect) Endpoint0
(Correct) Endpoint0
o
2nd line changed as follows
(Incorrect) Endpoint1
(Correct) Endpoint1
i
8th line changed as follows
(Incorrect) Endpoint2
(Correct) Endpoint2
i
14th line changed as follows
(Incorrect) Endpoint2
(Correct) Endpoint2
o
15.3.17 USB Endpoint
Data Register 3i (UEDR3i)
15.3.18 USB Endpoint
Data Register 3o
(UEDR3o)
15.3.19 USB Endpoint
Data Register 4i (UEDR4i)
15.3.20 USB Endpoint
Data Register 4o
(UEDR4o)
15.3.21 USB Endpoint
Data Register 5i (UEDR5i)
15.3.22 USB Endpoint
Receive Data Size
Register 0o (UESZ0o)
459
460
2nd line changed as follows
(Incorrect) Endpoint3
(Correct) Endpoint3
i
9th line changed as follows
(Incorrect) Endpoint3
(Correct) Endpoint3
o
15th line changed as follows
(Incorrect) Endpoint4
(Correct) Endpoint4
i
2nd line changed as follows
(Incorrect) Endpoint4
(Correct) Endpoint4
o
7th line changed as follows
(Incorrect) Endpoint5
(Correct) Endpoint5
i
13th line changed as follows
(Incorrect) Endpoint0
(Correct) Endpoint0
o
Rev. 3.0, 10/02, page xvii of lviii
Page 18
Section
Page
Description
15.3.23 USB Endpoint
Receive Data Size
Register 2o (UESZ2o)
15.3.24 USB Endpoint
Receive Data Size
Register 3o (UESZ3o)
15.3.25 USB Endpoint
Receive Data Size
Register 4o (UESZ4o)
461
2nd line changed as follows
(Incorrect) Endpoint2
(Correct) Endpoint2
o
4th line changed as follows
(Incorrect) The FIFO for endpoint 2 out transfer has a dual-
FIFO configuration
(Correct) The FIFO for endpoint 2
o (for Bulk_out transfer) has
a dual-FIFO configuration
th
line changed as follows
7
(Incorrect) Endpoint3
(Correct) Endpoint3o
9th line changed as follows
(Incorrect) The FIFO for endpoint 3 out transfer has a dual-
FIFO configuration.
(Correct) The FIFO for endpoint 3
o (for Isochronous_out
transfer) has a dual-FIFO configuration.
th
line changed as follows
12
(Incorrect) Endpoint4
(Correct) Endpoint4o
15.3.30 USB Interrupt
Enable Register 0 (UIER0)
15.3.34 USB Interrupt
Select Register 0 (UISR0)
470
472
14th line changed as follows
(Incorrect) The FIFO for endpoint 4 out transfer has a dual-
FIFO configuration.
(Correct) The FIFO for endpoint 4o (for Bulk_out transfer) has
a dual-FIFO configuration.
Bit table amended
BitBit NameInitial Value R/WDescription
7BRSTE0R/WEnables the BRST interrupt.
6—0RReserved
This bit is always read as 0.
5EP1iTRE0R/WEnables the EP1iTR interrupt.
4EP1iTSE0R/WEnables the EP1iTS interrupt.
Bit table amended
BitBit NameInitial ValueR/WDescription
7BRSTS0R/WSelects the BRST interrupt output pin.
6—0RReserved
This bit is always read as 0.
5EP1iTRS0R/WSelects the EP1iTR interrupt output pin.
4EP1iTSS0R/WSelects the EP1iTS interrupt output pin.
3EP0oTSS0R/WSelects the EP0oTS interrupt output pin.
2EP0iTRS0R/WSelects the EP0iTR interrupt output pin.
1EP0iTSS0R/WSelects the EP0iTS interrupt output pin.
0SetupTSS0R/WSelects the SetupTS interrupt output pin.
Rev. 3.0, 10/02, page xviii of lviii
Page 19
Section
Page
Description
15.3.42 USB Test
Register 1 (UTSTR1)
15.3.42 USB Test
Register 1 (UTSTR1)
Table 15.4
Relationship between the
UTSTR1 Settings and Pin
Inputs
479
480
Bit table amended and Note added
BitBit NameInitial Value R/WDescription
76VBUS
UBPM
5 to 3 —0RReserved
2
RCV
1
VP
0
VM
Note:* An asterisk indicates an undefined value.
—
*
—
*
—
*
—
*
—
*
R
Internal/External Transceiver Input Signal Monitor Bits
R
VBUS: Monitors VBUS pin
UBPM: Monitors UBPM pin
These bits are always read as 0 and cannot be
modified.
R
Internal/External Transceiver Input Signal Monitor Bits
R
RCV: Monitors the RCV signal of the internal/external
transceiver
R
VP: Monitors the VP signal of the internal/external
transceiver
VM: Monitors the VM signal of the internal/external
15.5.9 Isochronous–Out
Transfer (Dual-FIFO)
(When EP3o is Specified
as Endpoint)
Figure 15.21 EP3o
Isochronous-Out Transfer
Operation
507
Figure amended
USB function
Receive SOF
Switch to FIFO
Receive OUT token
Receive data from the host
Receive data
error?
Set EP3o normal
receive status to 1
(Set internal EP3o TS to 1)
B-side UIFR1/EP3oTS, EP3oTF update
FIFO A
No
Yes
Set EP3o abnormal
receive status to 1
(Set internal EP3o TF to 1)
Receive SOF
Switch to FIFO
Receive OUT token
Receive data from the host
Receive data
error?
Yes
Set EP3o normal
receive status to 1
(Set Internal EP3o TS to 1
A-side UIFR1/EP3oTS, EP3oTF update
FIFO B
No
Set EP3o abnormal
)
receive status to 1
(Set Internal EP3o TF to 1)
15.5.10 Processing of
508
USB Standard Commands
and Class/Vendor
Commands
Rev. 3.0, 10/02, page xx of lviii
11th line changed as follows
(Incorrect) EXIROx pin
(Correct) EXIROx
Page 21
Section
Page
Description
15.8 USB External Circuit
Example
Figure 15.27 USB
External Circuit in BusPowered Mode (When OnChip Transceiver is Used)
Figure 15.28 USB
External Circuit in SelfPowered Mode (When OnChip Transceiver is Used)
Figure 15.29 USB
External Circuit in BusPowered Mode (W hen
External Transceiver is
Used)
Figure 15.30 USB
External Circuit in SelfPowered Mode (W hen
External Transceiver is
Used)
521 to
524
Note *3 amended
In HD64F2215, HD6432215A, HD6432215B, and HD6432215C, Pxx should be assigned
*
3
to an output port as the D+ pull-up control pin.
In HD64F2215U, in which on-chip ROM can be programmed by using the USB, P36
should be used as the D+ pull-up control pin.
15.9.7 EP3o Isochronous
Transfer
Figure 15.32 EP3o Date
Reception
528
Figure amended
[In frame N]
Receive USB
data (1)
[In frame N+1]
Receive USB
data (2)
[In frame N+2]
Receive USB
data (3)
EP3o FIFO A
Data (1)Modify
EP3o FIFO B
———
EP3o FIFO AInternal flag (A-side)
Data (1)
EP3o FIFO B
Data (2)
EP3o FIFO AInternal flag (A-side)
Data (3)
EP3o FIFO B
Data (2)
Internal flag (A-side) UIFR1
TSTF
Internal flag (B-side)
Next frame
TSTF
Internal flag (B-side)
TSTF
Next frame
TSTF
Internal flag (B-side)
TSTF
Modify
Modify
No change
——
UIFR1
A-side flag update
TSTF
Can be read
Data (1) can be read in
frame [N+1]
UIFR1
B-side flag update
Can be read
TSTF
Data (2) can only be read in
frame [N+2]
Rev. 3.0, 10/02, page xxi of lviii
Page 22
Section
Page
Description
15.9.8 Reset529
16.3.3 A/D Control
538
Register (ADCR)
Explanation amended to 2nd line chang ed as foll ow s
A manual reset should not be performed during USB
communication as the LSI will stop with the USD+USD- pin
state maintained.This USB module uses synchronous reset
for some registers. The reset state of these registers must be
cancelled after the clock oscillation stabilizatio n time has
passed. At initialization, reset must be cancelled using the
following procedure.
Table amended
BitBit Name Initial ValueR/WDescription
54—
—
32CKS1
CKS000
10—
—
1
1
1
1
——Reserved
These bits are always read as 1 cannot be modified.
R/W
Clock Select 0 and 1
R/W
These bits specify the A/D conversion time. The
conversion time should be changed only when ADST =
0. Specify a setting that gives a value within the range
shown in table 24.7.
00: Conversion time = 530 states (max.)
01: Conversion time = 266 states (max.)
10: Conversion time = 134 states (max.)
11: Conversion time = 68 states (max.)
The conversion time setting should exceed the
conversion time shown in section 24.6, A/D Converter
Characteristics.
——Reserved
These bits are always read as 1 cannot be modified.
18. RAM555
Lineup added
Product ClassROM TypeRAM SizeRAM Address
H8S/2215
series
HD64F2215
HD64F2215U
HD6432215A
HD6432215B
HD6432215C
Flash memory Version
Masked ROM Version
16 kbytesH'FFB000 to H'FFEFBF
H'FFFFC0 to H'FFFFFF
8 kbytesH'FFD000 to H'FFEFBF
H'FFFFC0 to H'FFFFFF
Rev. 3.0, 10/02, page xxii of lviii
Page 23
Section
Page
Description
19.1 Features
• Size
Two flash memory
•
operating modes
• Automatic bit rate
adjustment
(SCI boot
mode)
19.2 Mode Transitions
559
559
Table newly added
Product Category
H8S/2215 SeriesHD64F2215,HD64F2215U
Description added
Boot mode
(SCI boot mode: HD64F2215, USB boot
mode: HD64F2215U)
User program mode
On-board programming/erasing can be done in boot
mode in which the boot program built into the chip is
started for erase or programming of the entire flash
memory. In normal user program mode, individual
blocks can be erased or programmed.
With data transfer in
bit rate can be automatically adjusted to match
the transfer bit rate of the host
Figure amended
ROM SizeROM Addresses
256 kbytes
H'000000 to H'03FFFF
(Modes 6 and 7)
SCI boot mode, this LSI’s
Figure 19.2 Flash
Memory State Transitions
Table 19.1 Differences
between Boot Mode and
User Program Mode
19.2 Mode Transitions
Figure 19.3 Boot Mode
Figure 19.4 Boot Mode
560
561
562
User
program mode
SCI,USB
Boot mode
On-board programming mode
(Incorrect) Boot Mode
(Correct)
SCI,USB Boot Mode
Description amended in 5th line of "2. Programming control
program transfer" in Figure 19.3, Boot Mode
When boot mode is entered, the boot program in this LSI
(originally incorporated in the chip) is started and the
programming control program in the host is transferre d to
RAM via SCI
or USB
Figures 1 to 4 amended
(Incorrect) SCI
(Correct) SCI
or USB
Rev. 3.0, 10/02, page xxiii of lviii
Page 24
Section
Page
Description
19.4 Input/Output Pins
Table 19.2 Pin
Configuration
19.6 On-Board
Programming Modes
Table 19.3 Setting OnBoard Programming
Modes
19.6.1 SCI Boot Mode
(HD64F2215)
564
571
571 to
574
Figure amended
Pin NameI/OFunction
RESInputReset
FWEInputFlash program/erase protection by hardware
MD2,MD1,MD0 InputSets this LSI's operating mode
PF3,PF0,P16,
P14
TxD2OutputSerial transmit data output
RxD2InputSerial receive data input
USB+,USB-Input/OutputUSB data output
VBUSInputUSB cable connection/disconnection detection
UBPMInputUSB bus power mode/self power mode setting
USPNDOutputUSB suspend output
P36OutputD+ pull-up control
InputSets this LSI's operating mode in
programmer mode
(Incorrect) Boot mode
(Correct)
SCI boot mode(HD64F2215)
USB boot mode(HD64F2215U)
Amended
(Incorrect) Boot Mode
(Correct) SCI Boot Mode
HD64F2215
and
HD64F2215U
HD64F2215
HD64F2215U
Figure 19.6 SCI System
Configuration in Boot
Mode
19.6.2 USB Boot Mode
(HD64F2215U)
19.8.1 Program/ProgramVerify
572Figure amended
1
01XMD2 to 0*
Note added to figure
Note: * FWE pin and mode pin input must satisfy the mode
programming setup time (t
when a reset is released.
575 to
Newly added
579
583
33th line changed as follows
Verify data can be read in words from the address to which a
dummy write was performed.
FWE*
H8S/2215 Series
Flash memory
= 200 ns)
MDS
19.8.2 Erase/Erase-Verify 585
Rev. 3.0, 10/02, page xxiv of lviii
11th line changed as follows
Verify data can be read in
words from the address to which a
dummy write was performed.
Page 25
Section
Page
Description
21.1.2 Low-Power
Control Register
(LPWRCR)
21.2.2 Inputting an
External Clock
21.6.1 Connecting a
Ceramic Resonator
Figure 21.6 Connection
of Ceramic Resonator
598
601
602
Bit name amended
BitBit Name Initial Value R/WDescription
7 to4—0R/W These bits can be read from or written to, but the write
3RFCUT0R/W Built-in Feedback Resistor Control:
value should always be 0.
Selects whether the oscillator’s built-in feedback resistor
and duty adjustment circuit are used with external clock
input. This bit should not be accessed when a crystal
oscillator is used.
After this bit is set when using external clock input, a
transition should initially be made to software standby
mode. Switching between use and non-use of the
oscillator’s built-in feedback resistor and dut y adjustment
circuit is performed when the transition is made to software
standby mode.
0: System clock oscillator’s built-in feedback resistor
and duty adjustment circuit are used
1: System clock oscillator’s built-in feedback resistor
and duty adjustment circuit are not used
3rd line changed as follows
The external clock input conditions when the duty adjustment circuit is not used are shown in table
21.4. When the duty adjustment circuit is not used, note that the maximum operating frequency
= T
depends on the external clock input waveform. For example, if t
= 6.25 ns, the maximum operating frequency becomes 13.3 MHz depending on the clcok cycle
time of 75 ns.
EXL
= 31.25ns and t
EXH
= t
EXr
EXf
Condition amended
EXTAL48
XTAL48
R
Ceramic
f
Resonator
R
d
Ta = 0 to 70 C
Contact the representative mentioned below for details of Rf and Rd values.
• High-speed H8S/2000 central processing unit with 16-bit architecture
Upwar d -compatible with H8/300 and H8/300H CPUs on an object level
Sixteen 16-bit general registers
65 basic instructions
• Various peripheral functions
DMA controller (DMAC)
Data tran sf er controller (DTC)
16-bit timer-pulse unit (TPU)
8- bit timer (TMR)
Watchdog timer (WDT)
Asynchronous or clocked synchronous serial communication interface (SCI)
Boundary scan
Univ ersal serial bus (USB)
10 - bit A/D converter
8-bit D/A converter
Clock pulse generator
• On-chip memory
ROMProduct CodeROMRAMRemarks
F-ZTAT Version
Masked ROM
Version
HD64F2215256 kbytes16 kbytesSCI boot version
HD64F2215U256 kbytes16 kbytesUSB boot version
HD6432215A256 kbytes16 kbytesIn planning
HD6432215B128 kbytes16 kbytes
HD6432215C64 kbytes8 kbytes
• General I/O portsModes 4 and 5Mode 6Mode 7
I/O pins:414168
Input-only pins:15237
PLLCAP63K11OutputExternal capacitor pin for an on-chip
XTAL74F9InputFor connection to a crystal resonator.
EXTAL76F10InputFor connection to a crystal resonator.
12
61
73
G10
Power supply pins. Connect all these
pins to the system power supply.
Ground pins. Connect all these pins
to the system power supply (0 V).
oscillator. Connect this pin to the
system power supply.
oscillator.
PLL oscillator.
For examples of crystal resonator
connection and externa l clock inpu t,
see section 21, Clock Pulse
Generator.
(An external clock can be supplied
from the EXTAL pin.) For examples
of crystal resonator connection and
external clock input, see section 21,
Clock Pulse Generator.
Operating
Mode Control
XTAL4865J10Input
EXTAL4866J11Input
φ78E11OutputSupplies the system clock to external
MD2
MD1
MD0
77
68
67
F8
H10
H9
InputSet the operating mode. Inputs at
USB operating clock input pins.
48-MHz clock for USB
communications is inp ut. For
examples of using an on-chip PLL,
EXTAL48 must be fixed low and
XTAL48 must be open.
devices.
these pins cannot be modified during
operation.
Rev. 3.0, 10/02, page 10 of 686
Page 69
Pin No.
TypeSymbolTFP-120BP-112I/OFunction
System
Control
Interrupts
RES72G11InputReset input pin. When this pin is
driven low, the chip is reset.
STBY71G9Input When this pin is driven low, a
transition is made to hardware
standby mode.
MRES96A9InputWhen this pin is driven low, a
transition is made to manual reset
mode.
BREQ87D9InputUsed by an external bus master to
issue a bus request to this LSI
BACK86C11OutputIndicates that the bus has been
released to an external bus master.
FWE69H11InputPin for use by flash memory. This pin
is only used in the flash memory
version. In the mask ROM version it
should be fixed at 0.
NMI70G8InputNonmaskable interrupt pin. If this pin
TMCI01100D7InputInput pins for the external clock input
to the counter.
TMRI01100D7InputThe counter reset input pins.
TxD2
TxD1
TxD0
RxD2
RxD1
RxD0
SCK2
SCK1
SCK0
AN15
AN14
AN3
31
91
88
32
92
89
33
93
90
44
45
46
K2
B10
C10
L2
A10
B11
H4
D8
C9
J6
L6
K6
OutputData output pins
InputData input pins
I/OClock input/output pins
InputAnalog input pins for the A/D
converter.
AN2
AN1
AN0
47
48
49
ADTRG83E8InputPin for input of an external trigger to
Rev. 3.0, 10/02, page 14 of 686
H6
L7
K7
start A/D conversion
Page 73
Pin No.
TypeSymbolTFP-120BP-112I/OFunction
D/A converter DA1
DA0
A/D converter
AVCC51L8InputPower supply pin for the A/D and D/A
D/A converter
AVSS43K5InputThe ground pin for the A/D and D/A
Vref50J7InputThe reference voltage input pin for
Boundary
TMS108A5InputControl signal input pin for the
scan
TCK107D6InputClock input pin for the boundary scan
TD0106B6OutputData output pin for the boundary scan
44
45
J6
L6
OutputAnalog output pins for the D/A
converter.
converter. When the D/A converter is
not used, connect this pin to the
system power supply(VCC).
converter. Connect this pin to the
system power supply (0 V).
the A/D and D/A converter. When the
A/D and D/A converter is not used,
this pin should be connected to the
system power supply (VCC).
boundary scan
TDI110C5InputData input pin for the boundary scan
TRST109B5InputReset pin for the TAP controller
USD+58K9I/OUSB data input/output pinUSB
USD-59L10
VBUS55K8InputConnection/di sconnection detecting
Input/output pin for the USB cable
USPND53H7OutputUSB suspend output
This pin is driven high when a
transition is made to suspend state.
VM
VP
35
36
K3
L3
Input
Pins to be connected to the
transceiver (PDIUSBP11A)
manufactured by Philips Electronics.
RCV
VPO
FSE0
OE
SUSPND
37
38
40
42
33
J4
K4
H5
L5
H4
Output
Rev. 3.0, 10/02, page 15 of 686
Page 74
Pin No.
TypeSymbolTFP-120BP-112I/OFunction
USBUBPM56L9InputBus power/self power mode setting
Input.
When the USB is used in bus power
mode, this input pin must be fixed
low.
When the USB is used in self power
mode, this input pin must be fixed
high.
DrVCC57J8Power supply for the on-chip
transceiver. Connect this pin to the
system power supply.
These pins should be open and
should not be connected to any
device.
112
114
Rev. 3.0, 10/02, page 18 of 686
Page 77
Section 2 CPU
The H8S/2000 CPU is a high-speed central processing unit with an internal 32-bit architecture that
is upward compatible with the H8/300 and H8/300H CPUs. The H8S/2000 CPU has sixteen 16-bit
general registers, can address a 16-Mbyte linear address space, and is ideal for realtime con trol.
This section describes the H8S/2000 CPU. The usable modes and address spaces differ depending
on the product. For details on each product, refer to section 3, MCU Operating Modes.
2.1Features
• Upward-compatible with H8 /3 00 an d H8/300H CPUs
Can execute H8/300 and H8/300H CPU object programs
• General-register architecture
Sixteen 16-bit general registers also usable as sixteen 8-bit registers or eight 32-bit registers
• Sixty-five basic instructions
8/1 6/32-bit arithmetic and logic instructions
Multip ly and divide instructions
Power ful bit-manipulation instructions
• Eight addressing modes
Register direct [Rn]
Register indirect [@ERn]
Register indirect with displacement [@(d:16,ERn) or @(d:32,ERn)]
Register indirect with post-increment or pre-decrement [@ERn+ or @–ERn]
Absolute address [@aa:8, @aa:16, @aa:24, or @aa:32]
Immediate [#xx:8, #xx:16, or #xx:32]
Program-counter relative [@(d:8,PC) or @(d:16,PC)]
Memory indirect [@@aa:8]
• High-speed operation
All frequently-used instructions execute in one or two states
8/16/32-bit register-register add/subtract: 1 state
8 × 8-bit r e gister-register multiply: 12 states
16 ÷ 8-bit register-register divide: 12 states
16 × 16-bit register-register multiply: 20 states
32 ÷ 16-bit register-register divide: 20 states
CPUS211A_010020020100
Rev. 3.0, 10/02, page 19 of 686
Page 78
• Two CPU operating modes
Normal mode*
Advanced mode
Note : * Normal mode is not available in this LSI.
• Power-down state
Transition to power-down state by SLEEP instruction
CPU clock speed selection
2.1.1Differences between H8S/2600 CPU and H8S/2000 CPU
The differences between the H8S/2600 CPU and the H8S/2000 CPU are as shown below.
• Register configuration
The MAC register is supported only by the H8S/2600 CPU.
• Basic instru c tions
The four instructions MAC, CLRMAC, LDMAC, and STMAC are supported only by the
H8S/2600 CPU.
• The number of execution states of the MULXU and MULXS instructions
Execution States
InstructionMnemonicH8S/2600H8S/2000
MULXUMULXU.B Rs, Rd312
MULXU.W Rs, ERd420
MULXSMULXS.B Rs, Rd413
MULXS.W Rs, ERd521
In addition, there are differences in address space, CCR and EXR register fu nctions, power-down
modes, etc., depending on the model.
Rev. 3.0, 10/02, page 20 of 686
Page 79
2.1.2Differences from H8/300 CPU
In comparison to the H8/300 CPU, the H8S/2000 CPU has the following enhancements.
• More general registers and control registers
Eight 16-bit extended registers, and one 8-bit and two 32-bit control registers, have been
added.
• Extended address space
Normal mode supports the same 64-kbyte address space as the H8/300 CPU.
Advanced mode supports a maximum 16-Mbyte address sp ace.
• Enhanced addressing
The addressing modes have been enhanced to make effective use of the 16-Mbyte address
space.
• Enhanced instructions
Addressing modes of bit-manipulation instructions have been enhanced.
Sign e d multiply and divide instructions have been added.
Two-bit shift instructions have been added.
In structions for saving and resto ring multiple registers have been ad ded.
A test and set instruction has been added.
• Higher speed
Basic instructions execute twice as fast.
2.1.3Differences from H8/300H CPU
In comparison to the H8/300H CPU, the H8S/2000 CPU has the following enhancements.
• Additional control register
One 8-bit control registers have been added.
• Enhanced instructions
Addressing modes of bit-manipulation instructions have been enhanced.
Two-bit shift instructions have been added.
In structions for saving and resto ring multiple registers have been ad ded.
A test and set instruction has been added.
• Higher speed
Basic instructions execute twice as fast.
Rev. 3.0, 10/02, page 21 of 686
Page 80
2.2CPU Operating Modes
The H8S/2000 CPU has two operating modes: normal and advanced. Normal mode supports a
maximum 64-kbyte address space. Advanced mode supports a maximum 16-Mbyte total address
space. The mode is selected by the mode pins.
2.2.1Normal Mode
The exception vector table and stack have the same structure as in the H8/300 CPU.
• Address Space
A maximum address space of 64 kbytes can be accessed.
• Extended Registers (En)
The extended registers (E0 to E7) can be used as 16-bit registers, or as the upper 16-bit
segments of 32-bit registers. When En is used as a 16-bit register it can contain any value, even
when the corresponding general register (Rn) is used as an address register. If the general
register is referenced in the register indirect addressing mode with pre-decrement (@–Rn) or
post-increment (@Rn+) and a carry or borrow occurs, however, the value in the corresponding
extended register (En) will be affected.
• Instruction Set
All instructions and addressing modes can be used. Only the lower 16 bits of effective
addresses (EA) are valid.
• Exception Vector Table and Memory Indirect Branch Addresses
In normal mode the top area starting at H'0000 is allocated to the exception vector table. One
branch address is stored per 16 bits. The exception vector table in normal mode is shown in
figure 2.1. For details of the exception vector table, see section 4, Exception Handling.
The memory indirect addressing mode (@@aa:8) employed in the JMP and JSR instructions
uses an 8-bit absolute address included in the instruction code to specify a memory operand
that contains a branch address. In normal mode the operand is a 16-bit (word) operand,
providing a 16-bit branch address. Branch addresses can be stored in the top area from H'0000
to H'00FF. Note that this area is also used for the exception vector table.
• Stack Structure
When the program counter (PC) is pushed onto the stack in a subroutine call, and the PC,
condition-code register (CCR), and extended control register (EXR) are pushed onto the stack
in exception handling, they are stored as shown in figure 2.2. EXR is not pushed onto the stack
in interrupt control mode 0. For details, see section 4, Exception Handling.
When EXR is not used, it is not stored on the stack.
SP when EXR is not used.
*2
Ignored when returning.
*3
Figure 2.2 Stack Structure in Normal Mode
2.2.2Advanced Mode
• Address Space
PC
(16 bits)
SP
2
*
( )
SP
1
EXR*
Reserved*1*
CCR
3
CCR*
PC
(16 bits)
3
Linear access is provided to a 16-Mbyte maximum address space.
• Extended Registers (En)
The extended registers (E0 to E7) can be used as 16-bit registers, or as the upper 16-bit
segments of 32-bit registers or address registers.
• Instruction Set
All instructions and addressing modes can be used.
Rev. 3.0, 10/02, page 23 of 686
Page 82
• Exception Vector Table and Memory Indirect Branch Addresses
In advanced mode the top area starting at H'00000000 is allocated to the exception vector table
in units of 32 bits. In each 32 bits, the upper 8 bits are ignored and a branch address is stored in
the lower 24 bits (figure 2.3). For details of the exception vector table, see section 4, Exception
Handling.
H'00000000
H'00000003
H'00000004
H'00000007
H'00000008
H'0000000B
H'0000000C
H'00000010
Reserved
Reset exception vector
Reserved
(Reserved for system use)
Exception vector table
(Reserved for system use)
Reserved
Exception vector 1
Figure 2.3 Exception Vector Table (Advanced Mode)
The memory indirect addressing mode (@@aa:8) employed in the JMP and JSR instructions
uses an 8-bit absolute address included in the instruction code to specify a memory operand
that contains a branch address. In advanced mode the operand is a 32-bit longword operand,
providing a 32-bit branch address. The upper 8 bits of these 32 bits are a reserved area that is
regarded as H'00. Branch addresses can be stored in the area from H'00000000 to H'000000FF.
Note that the first part of this range is also the ex ception vector table.
• Stack Structure
In advanced mode, when the program counter (PC) is pushed onto the stack in a subroutine
call, and the PC, condition-code register (CCR), and extended control register (EXR) are
pushed onto the stack in exception handling, they are stored as shown in figure 2.4. When EXR
is invalid, it is not pushed onto the stack. For details, see section 4, Exception Handling.
Rev. 3.0, 10/02, page 24 of 686
Page 83
SP
1
SP
Reserved
PC
(24 bits)
(a) Subroutine Branch(b) Exception Handling
2
*
(SP )
EXR*
Reserved*1*
CCR
PC
(24 bits)
3
Notes: *1
*2
*3
When EXR is not used, it is not stored on the stack.
SP when EXR is not used.
Ignored when returning.
Figure 2.4 Stack Structure in Advanced Mode
Rev. 3.0, 10/02, page 25 of 686
Page 84
2.3Address Space
Figure 2.5 shows a memory map of the H8S/2000 CPU. The H8S/2000 CPU provides linear
access to a maximum 64-kbyte address space in normal mode, and a maximum 16-Mbyte
(architecturally 4-Gbyte) address space in advanced mode. The usable modes and address spaces
differ depending on the product. For details on each product, refer to section 3, MCU Operating
Modes.
H'0000
H'FFFF
H'00000000
64 kbytes16 Mbytes
H'00FFFFFF
H'FFFFFFFF
(b) Advanced Mode(a) Normal Mode *
Note : * Not available in this LSI.
Program area
Data area
Figure 2.5 Memory Map
Rev. 3.0, 10/02, page 26 of 686
Page 85
2.4Register Configuration
The H8S/2000 CPU has the internal registers shown in figure 2.6. There are two types of registers:
general registers and contro l registers. Control registers are a 24-bit program counter (PC), an 8-bit
extended control register (EXR), and an 8-bit condition code register (CCR).
General Registers (Rn) and Extended Registers (En)
150 70 70
ER0
ER1
ER2
ER3
ER4
ER5
ER6
ER7 (SP)
Control Registers (CR)
E0
E1
E2
E3
E4
E5
E6
E7
230
R0H
R1H
R2H
R3H
R4H
R5H
R6H
R7H
PC
R0L
R1L
R2L
R3L
R4L
R5L
R6L
R7L
Legend
SP
PC
EXR
T
I2 to I0
CCR
I
UI
:Stack pointer
:Program counter
:Extended control register
:Trace bit
:Interrupt mask bits
:Condition-code register
:Interrupt mask bit
:User bit or interrupt mask bit
Note: * Cannot be used as an interrupt mask bit in this LSI.
Figure 2.6 CPU Registers
H
U
N
Z
V
C
76543210
TI2I1I0
EXR
----
76543210
CCR
IUIHUNZVC
:Half-carry flag
:User bit
:Negative flag
:Zero flag
:Overflow flag
:Carry flag
Rev. 3.0, 10/02, page 27 of 686
Page 86
2.4.1General Registers
The H8S/2000 CPU has eight 32-bit general registers. These general registers are all functionally
alike and can be used as both address registers and data registers. When a general register is used
as a data register, it can be accessed as a 32-bit, 16-bit, or 8-bit register. Figure 2.7 illu strates th e
usage of the general registers. When the general registers are used as 32-bit registers or address
registers, they are designated by the letter s ER ( E R0 to ER7).
The ER registers divide into 16-bit general registers designated by the letters E (E0 to E7) and R
(R0 to R7). These registers are functionally equivalent, providing a maximum sixteen 16-bit
registers. The E registers (E0 to E7) are also referred to as extended registers.
The R registers divide into 8-bit general registers designated by the letters RH (R0H to R7H) and
RL (R0L to R7L). These registers are functionally equivalent, providing a maximum sixteen 8-bit
registers.
The usage of each register can be selected independently.
General register ER7 has the function of stack pointer (SP) in addition to its general-register
function, and is used implicitly in exception handling and subrou tine calls. Figure 2.8 shows the
stack.
• Address registers
• 32-bit registers
ER registers
(ER0 to ER7)
• 16-bit registers• 8-bit registers
E registers (extended registers)
(E0 to E7)
RH registers
(R0H to R7H)
R registers
(R0 to R7)
RL registers
(R0L to R7L)
Figure 2.7 Usage of General Registers
Rev. 3.0, 10/02, page 28 of 686
Page 87
Free area
SP (ER7)
Stack area
Figure 2.8 Stack
2.4.2Program Counter (PC)
This 24-bit counter indicates the address of the next instruction the CPU will execute. The length
of all CPU instructions is two bytes (one word), so the least significant PC bit is ignored. (When an
instruction is fetched, the least significant PC bit is regarded as 0.)
2.4.3Extended Control Register (EXR)
EXR is an 8-bit register that ma nipulates the LDC, STC, ANDC, ORC, and XORC instru ctions.
When these instructions except for the STC instruction is executed, all interrupts including NMI
will be masked for three states after execution is completed.
BitBit NameInitial ValueR/WDescription
7T0R/WTrace Bit
When this bit is set to 1, a trace exception is
generated each time an instruct ion is execu ted. Whe n
this bit is cleared to 0, instructions are execut ed in
sequence.
6 to3–1–Reserved
These bits are always read as 1.
2 to 0 I2
I1
1R/WThese bits designate the interrupt mask level (0 to 7).
For details, refer to section 5, Interrupt Controller.
I0
Rev. 3.0, 10/02, page 29 of 686
Page 88
2.4.4Condition-Code Register (CCR)
This 8-bit register contains intern al CPU status information, including an in ter rup t mask bit (I) and
half-carry (H), negative (N), zero (Z), overflow (V), and carry (C) flags.
Operation s can be performed on the CCR bits by the LDC, STC, ANDC, ORC, and XORC
instructions. The N, Z, V, and C flags are used as branching conditions for conditional branch
(Bcc) instructions.
Rev. 3.0, 10/02, page 30 of 686
Page 89
BitBit NameInitial ValueR/W Description
7I1R/W Interrupt Mask Bit
Masks interrupts other than NMI when set to 1. NMI is
accepted regardless of the I bit setting. The I bit is set to 1
by hardware at the start of an exception-handling
sequence. For details, refer to section 5, Interrupt
Controller.
6UIundefinedR/W User Bit or Interrupt Mask Bit
Can be written and read by software using the LDC, STC,
ANDC, ORC, and XORC instructions. This bit c a nnot be
used as an interrupt mask bit in this LSI.
5HundefinedR/W Half-Carry Flag
When the ADD.B, ADDX.B, SUB.B, SUBX.B, CMP.B or
NEG.B instruction is executed, this flag is set to 1 if there is
a carry or borrow at bit 3, and cleared to 0 otherwise. When
the ADD.W, SUB.W, CMP.W, or NEG.W instruction is
executed, the H flag is set to 1 if there is a carry or borrow
at bit 11, and cleared to 0 otherwise. When the ADD.L,
SUB.L, CMP.L, or NEG.L instruction is executed, the H flag
is set to 1 if there is a carry or borrow at bit 27, and cleared
to 0 otherwise.
4UundefinedR/W User Bit
Can be written and read by software using the LDC, STC,
ANDC, ORC, and XORC instructions.
3NundefinedR/W Negative Flag
Stores the value of the most significant bit of data as a sign
bit.
2ZundefinedR/W Zero Flag
Set to 1 to indicate zero data, and cleared to 0 to indicate
non-zero data.
1VundefinedR/W Overflow Flag
Set to 1 when an arithmetic overflow occurs, and cleared to
0 at other times.
0CundefinedR/W Carry Flag
Set to 1 when a carry occurs, and cleared to 0 otherwise.
Used by:
•Add instructions, to indi cate a carry
Subtract instructions, to indicate a carry
•
Shift and rotate instructions, to indicate a carry
•
They carry flag is also used as a bit accumulator by bit
manipulation instructions.
Rev. 3.0, 10/02, page 31 of 686
Page 90
2.4.5Initial Register Values
Reset exception handling loads the CPU's program counter (PC) from the vector table, clears the
trace bit in EXR to 0, and sets the in ter rupt mask bits in CCR and EXR to 1. The other CCR bits
and the general registers are not initialized. In particular, the stack pointer (ER7) is not in itialized.
The stack pointer should therefore be initialized by an MOV.L instruction executed immediately
after a reset.
2.5Data Formats
The H8S/2000 CPU can process 1-bit, 4-bit (BCD), 8-bit (byte), 16-bit (word), and 32-bit
(longword) data. Bit-manipulation instructions operate on 1-bit data by accessing bit n (n = 0, 1, 2,
…, 7) of byte operand data. The DAA and DAS decimal-adjust instructions treat byte data as two
digits of 4-bit BCD data.
2.5.1General Register Data Formats
Figure 2.9 shows the data formats in general registers.
Data TypeRegister NumberData Image
70
1-bit data
1-bit data
4-bit BCD data
4-bit BCD data
Byte data
RnH
RnL
RnH
RnL
RnH
65432710
7043
UpperLower
70
MSBLSB
Don't care
Don't care
Don't care
70
65432710
Don't care
7043
UpperLower
Don't care
Byte data
RnL
Figure 2.9 General Register Data Formats (1)
Rev. 3.0, 10/02, page 32 of 686
70
Don't care
MSBLSB
Page 91
Data TypeData ImageRegister Number
Word data
Word data
150
MSBLSB
Longword data
3116
MSB
Legend
: General register ER
ERn
: General register E
En
: General register R
Rn
: General register RH
RnH
: General register RL
RnL
: Most significant bit
MSB
: Least significant bit
LSB
Rn
150
MSBLSB
En
ERn
150
EnRn
LSB
Figure 2.9 General Register Data Formats (2)
Rev. 3.0, 10/02, page 33 of 686
Page 92
2.5.2Memory Data Formats
Figure 2.10 shows the data formats in memory. The H8S/2000 CPU can access word data and
longword data in memory , but word or longword data must begin at an even address. If an attempt
is made to access word or longword data at an odd address, no address error occurs but the least
significant bit of the address is regarded as 0, so the access starts at the preceding address. This
also applies to instructio n fetches.
When SP (ER7) is used as an address register to access the stack, the operand size should be word
size or longword size.
Data TypeAddress
1-bit data
Byte data
Word data
Longword dataAddress 2N
Address L
Address L
Address 2M
Address 2M+1
Address 2N+1
Address 2N+2
Address 2N+3
Data Image
70
76 543210
MSB
MSB
MSB
LSB
LSB
LSB
Figure 2.10 Memory Data Formats
Rev. 3.0, 10/02, page 34 of 686
Page 93
2.6Instruction Set
The H8S/2000 CPU has 65 types of instructions. The instructions are classified by function in
table 2.1.
Bit manipulationBSET, BCLR, BNOT, BTST, BLD, BILD, BST, BIST, BAND,
B14
BIAND, BOR, BIOR, BXOR, BIXOR
BranchBCC*2, JMP, BSR, JSR, RTS–5
System controlTRAPA, RTE, SLEEP, LDC, STC, ANDC, ORC, XORC,
–9
NOP
Block data transferEEPMOV–1
Total: 65
Notes: B:byte size; W:word size; L:longword size.
*1 POP.W Rn and PUSH.W Rn are identical to MOV.W @SP+, Rn and MOV.W Rn, @-
SP. POP.L ERn and PUSH.L ERn are identical to MOV.L @SP+, ERn and MOV.L ERn,
@-SP.
*2 Bcc is the general name for conditional branch instructions.
*3 Cannot be used in this LSI.
*4 Only register ER0, ER1, ER4, or ER5 should be used when using the TAS instruction.
Rev. 3.0, 10/02, page 35 of 686
Page 94
2.6.1Table of Instructions Classified by Function
Tables 2.3 to 2.10 summarizes the instructions in each functional category. The notation used in
tables 2.3 to 2.10 is defined below.
Table 2.2Operation Notation
SymbolDescription
RdGeneral register (destination)*
RsGeneral register (source) *
RnGeneral register*
ERnGeneral register (32-bi t register)
(EAd)Destination operand
(EAs)Source operand
EXRExten ded cont rol regi ster
CCRCondition-code register
NN (negative) flag in CCR
ZZ (zero) flag in CCR
VV (overflow) flag in CCR
CC (carry) flag in CCR
PCProgram counter
SPStack pointer
#IMMImmediate data
dispDisplacement
+Addition
–Subtraction
×Multiplication
÷Division
∧Logical AND
∨Logical OR
⊕Logical exclusive OR
→Move
∼NOT (logical complement)
:8/:16/:24/:328-, 16-, 24-, or 32-bit length
Note: *General registers include 8-bit registers (R0H to R7H, R0L to R7L), 16-bit registers (R0 to
R7, E0 to E7), and 32-bit registers (ER0 to ER7).
Rev. 3.0, 10/02, page 36 of 686
Page 95
Table 2.3Data Transfer Instructions
InstructionSize*
1
Function
MOVB/W/L(EAs) → Rd, Rs → (EAd)
Moves data between two general registers or between a general register
and memory, or moves immediate data to a general register.
MOVFPEBCannot be used in this LSI.
MOVTPEBCannot be used in this LSI.
POPW/L@SP+ → Rn
Pops a general register from the stack. POP.W Rn is identical to MOV.W
@SP+, Rn. POP.L ERn is identical to MOV.L @SP+, ERn
PUSHW/LRn → @-SP
Pushes a general register onto the stack. PUSH.W Rn is identical to
MOV.W Rn, @-SP. PUSH.L ERn is identical to MOV.L ERn, @-SP.
LDM*
2
L@SP+ → Rn (register list)
Pops two or more general registers from the stack.
STM*
2
LRn (register list) → @-SP
Pushes two or more general registers onto the stack.
Notes: *1 Size refers to the operand size.
B:Byte
W: Word
L : Longword
*2 ER7 is used as a stack pointer in STM and LDM instructions. ER7, therefore, should not
be used as a saving (STM) or restoring (LDM) register.
Rev. 3.0, 10/02, page 37 of 686
Page 96
Table 2.4Arithmetic Operations Instructions (1)
InstructionSize*Function
ADD
SUB
ADDX
SUBX
INC
DEC
ADDS
SUBS
DAA
DAS
B/W/LRd ± Rs → Rd, Rd ± #IMM → Rd
Performs addition or subtraction on data in two general registers, or on
immediate data and data in a general register. (Immediate byte data
cannot be subtracted from byte data in a general register. Use the SUBX
or ADD instruction.)
BRd ± Rs ± C → Rd, Rd ± #IMM ± C → Rd
Performs addition or subtraction with carry or borrow on byte data in two
general registers, or on immediate data and data in a general register.
B/W/LRd ± 1 → Rd, Rd ± 2 → Rd
Increments or decrements a general register by 1 or 2. (Byte operands
can be incremented or decremented by 1 only.)
LRd ± 1 → Rd, Rd ± 2 → Rd, Rd ± 4 → Rd
Adds or subtracts the value 1,2, or 4 to or from data in a 32-bit register.
BRd (decimal adjust) → Rd
Decimal-adjusts an addition or subtraction result in a general register by
referring to the OCR to produce 4-bit BCD data.
MULXUB/WRd × Rs → Rd
Performs unsigned multiplication on data in two general registers: either
8 bits × 8 bits → 16 bits or 16 bits × 16 bits → 32 bits.
MULXSB/WRd × Rs → Rd
Performs signed multiplication on data in two general registers: either 8
bits × 8 bits → 16 bits or 16 bits × 16 bits → 32 bits.
DIVXUB/WRd ÷ Rs → Rd
Performs unsigned division on data in two general registers: either 16
bits ÷ 8 bits → 8-bit quotient and 8-bit remainder or 32 bits ÷ 16 bits →
16-bit quotient and 16-bit remainder.
Note: *Size refers to the operand size.
B: Byte
W: Word
L:Longword
Rev. 3.0, 10/02, page 38 of 686
Page 97
Table 2.4Arithmetic Operations Instructions (2)
InstructionSize*
1
Function
DIVXSB/WRd ÷ Rs → Rd
Performs signed division on data in two general registers: either 16 bits ÷
8 bits → 8-bit quotient and 8-bit remainder or 32 bits ÷ 16 bits → 16-bit
quotient and 16-bit remainder.
CMPB/W/LRd – Rs, Rd – #IMM
Compares data in a general register with data in another general register
or with immediate data, and sets CCR bits acc ording to the result.
NEGB/W/L0 – Rd → Rd
Takes the two's complement (arithmetic complement) of data in a
general register.
EXTUW/LRd (zero extension) → Rd
Extends the lower 8 bits of a 16-bit register to word size, or the lower 16
bits of a 32-bit register to longword size, by padding with zeros on the
left.
EXTSW/LRd (sign extension) → Rd
Extends the lower 8 bits of a 16-bit register to word size, or the lower 16
bits of a 32-bit register to longword size, by extending the sign bit.
2
TAS*
B@ERd – 0, 1 → (<bit 7> of @ERd)
Tests memory contents, and sets the most significant bit (bit 7) to 1.
Notes: *1 Size refers to the operand size.
B:Byte
W: Word
L:Longword
*2 Only register ER0, ER1, ER4, or ER5 should be used when using the TAS instruction.
Rev. 3.0, 10/02, page 39 of 686
Page 98
Table 2.5Logic Operations Instructions
InstructionSize*Function
ANDB/W/LRd ∧ Rs → Rd, Rd ∧ #IMM → Rd
Performs a logical AND operation on a general register and another
general register or immediate data.
ORB/W/LRd ∨ Rs → Rd, Rd ∨ #IMM → Rd
Performs a logical OR operation on a general register and another
general register or immediate data.
XORB/W/LRd ⊕ Rs → Rd, Rd ⊕ #IMM → Rd
Performs a logical exclusive OR operation on a general register and
another general register or immediate data.
NOTB/W/L∼ Rd → Rd
Takes the one's complement (logical complement) of general register
contents.
Note: *Size refers to the operand size.
B: Byte
W: Word
L:Longword
Table 2.6Shift Instructions
InstructionSize*Function
SHAL
SHAR
SHLL
SHLR
ROTL
ROTR
ROTXL
ROTXR
B/W/LRd (shift) → Rd
Performs an arithmetic shift on general register contents. 1-bit or 2 bit
shift is possible.
B/W/LRd (shift) → Rd
Performs an logical shift on general register contents. 1-bit or 2 bit shift is
possible.
B/W/LRd (rotate) → Rd
Rotates general register contents. 1-bit or 2 bit rotation is possible.
B/W/LRd (rotate) → Rd
Rotates general register contents through the carry flag. 1-bit or 2 bit
rotation is possible.
Note: * Size refers to the operand size.
B: Byte
W: Word
L:Longword
Rev. 3.0, 10/02, page 40 of 686
Page 99
Table 2.7Bit Manipulation Instructions ( 1)
InstructionSize*Function
BSETB1 → (<bit-No.> of <EAd>)
Sets a specified bit in a general register or memory operand to 1. The bit
number is specified by 3-bit immediate data or the lower three bits of a
general register.
BCLRB0 → (<bit-No.> of <EAd>)
Clears a specified bi t in a general register or memory operand to 0. The
bit number is specified by 3-bit immediate data or the lower three bits of
a general register.
BNOTB∼ (<bit-No.> of <EAd>) → (<bit-No.> of <EAd>)
Inverts a specified bit in a general register or memory operand. The bit
number is specified by 3-bit immediate data or the lower three bits of a
general register.
BTSTB∼ (<bit-No.> of <EAd>) → Z
Tests a specified bit in a general register or memory operand and sets or
clears the Z flag accordingly. The bit number is spe cif ied by 3-bi t
immediate data or the lower three bits of a general register.
BANDBC ∧ (<bit-No.> of <EAd>) → C
ANDs the carry flag with a specified bit in a general regi ster or memory
operand and stores the result in the carry flag.
BIANDBC ∧ (<bit-No.> of <EAd>) → C
ANDs the carry flag with the inverse of a specified bit in a general
register or memory operand and stores the result in the carry flag. The
bit number is specified by 3-bit immediate data.
BORBC ∨ (<bit-No.> of <EAd>) → C
ORs the carry flag with a specified bit in a general register or memory
operand and stores the result in the carry flag.
BIORBC ∨ (∼ <bit-No.> of <EAd>) → C
ORs the carry flag with the inverse of a specified bit in a general register
or memory operand and stores the result in the carry flag. The bit
number is specified by 3-bit immediate data.
Note:* Size refers to the operand size.
B: Byte
Rev. 3.0, 10/02, page 41 of 686
Page 100
Table 2.7Bit Manipulation Instructions ( 2)
InstructionSize*Function
BXORBC ⊕ (<bit-No.> of <EAd>) → C
Exclusive-ORs the carry flag wit h a specif ied bit in a genera l regist er or
memory operand and stores the result in the carry flag.
BIXORBC ⊕ ∼ (<bit-No.> of <EAd>) → C
Exclusive-ORs the carry flag with the inverse of a specified bit in a
general register or memory operand and stores the result in the carry
flag. The bit number is specified by 3-bit immediate data.
BLDB(<bit-No.> of <EAd>) → C
Transfers a specified bit in a general register or memory to the carry
flag.
BILDB∼ (<bit-No.> of <EAd>) → C
Transfers the inverse of a specified bit in a general register or memory
operand to the carry flag. The bit number is specified by 3-bit immediate
data.
BSTBC → (<bit-No.> of <EAd>)
Transfers the carry flag value to a specified bit in a general register or
memory operand.
BISTB∼ C → (<bit-No.>. of <EAd>)
Transfers the inverse of the carry flag value to a specified bit in a
general register or memory operand. The bit number is specified by 3bit immediate data.
Note:* Size refers to the operand size.
B: Byte
Rev. 3.0, 10/02, page 42 of 686
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.