For the information for microcontroller supports, see the following website.
http://edevice.fujitsu.com/micom/en-support/
FUJITSU SEMICONDUCTOR LIMITED
Page 4
Page 5
PREFACE
■ The Purpose and Intended Readership of This Manual
Thank you very much for your continued special support for Fujitsu Semiconductor products.
The MB95630H Series is a line of products developed as general-purpose products in the New
8FX family of proprietary 8-bit single-chip microcon trollers applicable as application-specific
integrated circuits (ASICs). The MB95630H Series can be used for a wide range of
applications from consumer products including portable devices to industrial equi pm ent.
Intended for engineers who actually develop products using the MB95630H Series of
microcontrollers, this manual describes its functions, features, and operations. You sh ould read
through the manual.
This manual is written to explain the respective configurations and operations of peripheral
functions, but not to provide specifications of a device.
For detailed specifications of a device, refer to its data sheet.
2
MC-8FX Programming Manual".
■ Trademark
For details on individual instructions, refer to "F
2
Note: F
The company names and brand names in this document are the trademarks or registered
trademarks of their respective owners.
MC is the abbreviation of FUJITSU Flexible Microcontroller.
■ Sample Programs
Fujitsu Semiconductor provides sample programs free of charge to operate the peripheral
resources of the New 8FX family of microcontrollers. Feel free to use such sample programs to
check the operational specifications and usages of Fujitsu microcontrollers.
Note that sample programs are subject to change without notice. As these pieces of software
are offered to show standard operations and usages, evaluate them sufficiently before use wi th
your system. Fujitsu Semiconductor assumes no liability for any damages whatsoever arising
out of the use of sample programs.
i
Page 6
How to Use This Manual
■ Finding a Function
The following methods can be used to search for details of a function in this manual:
•Searching from CONTENTS
CONTENTS lists the contents in this manual in the order of description.
•Searching from registers
The address at which a register is located is not mentioned in this manual. To check the
address of a register, refer to "■ I/O MAP" in the device data sheet.
■ Chapters
This manual explains one peripheral function in one chapter.
■ Terminology
This manual uses the following terminology.
TermExplanation
WordIndicates an access in unit of 16 bits.
ByteIndicates an access in unit of 8 bits.
■ Notations
The notations in "■ Register Configuration" in this manual are explained bel ow:
•bit: bit number
•Field: bit field name
•Attribute: Attributes for read access and write access of each bit
- R: Read-only
- W: Write-only
- R/W: Readable/Writable
- —: Undefined
•Initial value: Initial value of a bit after a reset
- 0: The initial value is "0".
- 1: The initial value is "1".
- X: The initial value is undefined.
Multiple bits are indicated in this manual in the following way.
- Example 1: bit7:0 represents bit7 to bit0.
- Example 2: SCM[2:0] represents SCM2 to SCM0.
The values such as those indicating addresses are written in this manual in the following ways:
- Hexadecimal number: The prefix "0x" is attached to the beginning of a value
(e.g.: 0xFFFF).
- Binary number: The prefix "0b" is attached to the beginning of a value (e.g.: 0b1111).
- Decimal number: Only the number is used (e.g.: 1234).
In this manual, "n" in a pin name and a register abbreviation represents the channel number.
ii
Page 7
• FUJITSU SEMICONDUCTOR LIMITED, its subsidiaries and affiliates (collectively, "FUJITSU
SEMICONDUCTOR") reserves the right to make changes to the information contained in this document without
notice. Please contact your FUJITSU SEMICONDUCTOR sales representatives before order of FUJITSU
SEMICONDUCTOR device.
Customers are advised to consult with sales representatives before ordering.
• Information contained in this document, such as descriptions of function and application circuit examples is
presented solely for reference to examples of operations and uses of FUJITSU SEMICONDUCTOR device.
FUJITSU SEMICONDUCTOR disclaims any and all warranties of any kind, whether express or implied, related to
such information, including, without limitation, quality, accuracy, performance, proper operation of the device or
non-infringement. If you develop equipment or product incorporating the FUJITSU SEMICONDUCTOR device
based on such information, you must assume any responsibility or liability arising out of or in connection with such
information or any use thereof. FUJITSU SEMICONDUCTOR assumes no responsibility or liability for any
damages whatsoever arising out of or in connection with such information or any use thereof.
• Nothing contained in this document shall be construed as granting or conferring any right under any patents,
copyrights, or any other intellectual property rights of FUJITSU SEMICONDUCTOR or any third party by license
or otherwise, express or implied. FUJITSU SEMICONDUCTOR assumes no responsibility or liability for any
infringement of any intellectual property rights or other rights of third parties resulting from or in connection with
the information contained herein or use thereof.
• The products described in this document are designed, developed and manufactured as contemplated for general
use including without limitation, ordinary industrial use, general office use, personal use, and household use, but
are not designed, developed and manufactured as contemplated (1) for use accompanying fatal risks or dangers
that, unless extremely high levels of safety is secured, could lead directly to death, personal injury, severe physical
damage or other loss (including, without limitation, use in nuclear facility, aircraft flight control system, air traffic
control system, mass transport control system, medical life support system and military application), or (2) for use
requiring extremely high level of reliability (including, without limitation, submersible repeater and artificial
satellite). FUJITSU SEMICONDUCTOR shall not be liable for you and/or any third party for any claims or
damages arising out of or in connection with above-mentioned uses of the products.
• Any semiconductor devices fail or malfunction with some probability. You are responsible for providing adequate
designs and safeguards against injury, damage or loss from such failures or malfunctions, by incorporating safety
design measures into your facility, equipments and products such as redundancy, fire protection, and prevention of
overcurrent levels and other abnormal operating conditions.
• The products and technical information described in this document are subject to the Foreign Exchange and
Foreign Trade Control Law of Japan, and
countries. You are responsible for ensuring compliance with such laws and regulations relating to export or reexport of the products and technical information described herein.
• All company names, brand names and trademarks herein are property of their respective owners.
may be subject to export or import laws or regulations in U.S. or other
A change on a page is indicated by a vertical line drawn on the left of that page.
PageRevisions (For details, see their respe ctive pages.)
17CHAPTER 3 CLOCK
CONTROLLER
3.1Overview of Clock Controller
■ Block Diagram of Clock Controller
Figure 3.1-1
63CHAPTER 4 RESET
4.1Reset Operation
■ Reset Sources
● Low-voltage detection reset
(optional)
674.2.1 Reset Source Register
(RSRR)
■ Register Functions
Corrected the connection between the main CR PLL clock
oscillator circuit and the PLLC control register (PLLC).
Added the following statement.
However, the LVD reset voltage selection ID register (LVDR)
of the low-voltage detection reset circuit is not reset by the
low-voltage detection reset.
Revised the following statement in details of the EXTS bit.
This bit reads "0" when read by a read access. A write access
(writing "0" or "1") to this bit sets it to "0".
→
A read access or a write access (writing "0" or "1") to this bit
sets it to "0".
Revised the following statement in details of the WDTR bit.
This bit reads "0" when read by a read access. A write access
(writing "0" or "1") to this bit sets it to "0".
→
A read access or a write access (writing "0" or "1") to this bit
sets it to "0".
Revised the following statement in details of the PONR bit.
This bit reads "0" when read by a read access. A write access
(writing "0" or "1") to this bit sets it to "0".
→
A read access or a write access (writing "0" or "1") to this bit
sets it to "0".
68Revised the following statement in details of the HWR bit.
This bit reads "0" when read by a read access. A write access
(writing "0" or "1") to this bit sets it to "0".
→
A read access or a write access (writing "0" or "1") to this bit
sets it to "0".
Revised the following statement in details of the SWR bit.
This bit reads "0" when read by a read access. A write access
(writing "0" or "1") to this bit or a power on-reset sets it to "0".
→
A read access or a write access (writing "0" or "1") to this bit
or a power-on reset sets it to "0".
Page 20
PageRevisions (For details, see their respective pages.)
265CHAPTER 15 8/10-BIT A/D
CONVERTER
15.2Configuration of 8/10-bit A/D
Converter
15.2Configuration of 8/10-bit A/D
Converter
■ Block Diagram of 8/10-bit A/D
converter
Figure 15.2-1
Corrected the register name of the ADDH and ADDL
registers.
A/D converter data registers (ADDH, ADDL)
→
8/10-bit A/D converter data registers (ADDH, ADDL)
Corrected the register name of the ADC1 register.
A/D converter control register 1 (ADC1)
→
8/10-bit A/D converter control register 1 (ADC1)
Corrected the register name of the ADC2 register.
A/D converter control register 2 (ADC2)
→
8/10-bit A/D converter control register 2 (ADC2)
Added statements on analog input pins and analog channels.
Corrected the register name of the ADDH and ADDL
registers.
A/D converter data registers (ADDH, ADDL)
→
8/10-bit A/D converter data registers (ADDH, ADDL)
Corrected the register name of the ADC1 register.
A/D converter control register 1 (ADC1)
→
8/10-bit A/D converter control register 1 (ADC1)
26615.2Configuration of 8/10-bit A/D
Converter
■ Block Diagram of 8/10-bit A/D
converter
26715.3Pins
■ Pins of 8/10-bit A/D Converter
15.3Pins
■ Pins of 8/10-bit A/D Converter
● ANn pin
27815.7Notes on Using 8/10-bit A/D
Converter
■ Notes on Using 8/10-bit A/D
Converter
● 8/10-bit A/D converter analog
input sequences
Corrected the register name of the ADC2 register.
A/D converter control register 2 (ADC2)
→
8/10-bit A/D converter control register 2 (ADC2)
Renamed the section "● A/D converter data registers (ADDH/
ADDL)" to "● 8/10-bit A/D converter data registers (ADDH,
ADDL)".
Renamed the section "● A/D converter control register 1
(ADC1)" to "● 8/10-bit A/D converter control register 1
(ADC1)".
Renamed the section "● A/D converter control register 2
(ADC2)" to "● 8/10-bit A/D converter control register 2
(ADC2)".
Renamed the section "● AN pin" to "● ANn pin".
Corrected the name of the analog input pin.
AN → ANn
Corrected the name of the analog input pin.
AN → ANn
xvi
Page 21
PageRevisions (For details, see their respe ctive pages.)
498
CHAPTER 24 I
INTERFACE
24.3Channel
■ Channel of I
Table 24.3-2
2
C BUS
2
C Bus Interface
Corrected the register name of the IBCR0n register.
2
C bus control register 0
I
→
2
C bus control register 0 ch. n
I
Corrected the register name of the IBCR1n register.
2
C bus control register 1
I
→
2
C bus control register 1 ch. n
I
Corrected the register name of the IBSRn register.
2
C bus status register
I
→
2
C bus status register ch. n
I
Corrected the register name of the IDDRn register.
2
C data register
I
→
2
C data register ch. n
I
Corrected the register name of the IAARn register.
2
C address register
I
→
2
C address register ch. n
I
531
534
CHAPTER 25 EXAMPLE OF
to
SERIAL PROGRAMMING
CONNECTION
568CHAPTER 26 DUAL OPERATION
FLASH MEMORY
26.8.2 Flash Memory Status Register
(FSR)
■ Register Functions
588CHAPTER 27 NON-VOLATILE
REGISTER (NVR) INTERFACE
27.3.4 Watchdog Timer Selection ID
Register (Upper/Lower)
(WDTH/WDTL)
■ Register Configuration
Corrected the register name of the ICCRn register.
2
C clock control register
I
→
2
C clock control register ch. n
I
New chapter
Corrected Figure 26.8-1.
Corrected the R/W attribute of the WDTH[7:0] bits in the
WDTH register.
R/W → R
Corrected the R/W attribute of the WDTL[7:0] bits in the
WDTL register.
R/W → R
xvii
Page 22
xviii
Page 23
CHAPTER 1
MEMORY ACCESS MODE
This chapter describes the memory access
mode.
1.1Memory Access Mode
MN702-00009-2v0-EFUJITSU SEMICONDUCTOR LIMITED1
Page 24
CHAPTER 1 MEMORY ACCESS MODE
Address
0xFFFD
Data
0x00
Other than 0x00 Reserved. Do not set mode data to any value other than 0x00.
Selectssingle-chip mode.
Operation
bit7bit6bit5bit4bit3bit2bit1bit0
1.1 Memory Access Mode
MB95630H Series
1.1Memory Access Mode
The MB95630H Series supports only one memory access mode: single-chip
mode.
■ Single-chip Mode
In single-chip mode, only the internal RAM and the Flash memory are used, and no external
bus access is executed.
● Mode data
Mode data is the data used to determine the memory access mode of the CPU.
The mode data address is fixed at "0xFFFD". Always set the mode data of the Flash memory to
"0x00" to select the single-chip mode.
Figure 1.1-1 Mode Data Settings
After a reset is released, the CPU fetches mode data first.
The CPU then fetches the reset vector after the mode data. It starts executing instructions from
the address set in the reset vector.
2FUJITSU SEMICONDUCTOR LIMITEDMN702-00009-2v0-E
Page 25
CHAPTER 2
CPU
This chapter describes the functions and
operations of the CPU.
2.1Dedicated Registers
2.2General-purpose Register
2.3Placement of 16-bit Data in Memory
MN702-00009-2v0-EFUJITSU SEMICONDUCTOR LIMITED3
Page 26
CHAPTER 2 CPU
Initial value
0xFFFDProgram counter
Indicates the address of the current instruction.
0x0000Accumulator (A)
Temporary storage register for arithmetic operation and transfer
0x0000Temporary accumulator (T)
Performs arithmetic operations with the accumulator.
0x0000Index register
Indicates an index address.
0x0000Extra pointer
Indicates a me
mory address.
0x0000Stack point er
Indicates the current stack location.
0x0030Program status
Stores a register bank pointer,
a direct bank p oin ter, and a condition code.
16 bits
PS
SP
EP
IX
PC
THTL
AHAL
RPDPCCR
:
:
:
:
:
:
:
2.1 Dedicated Registers
MB95630H Series
2.1Dedicated Registers
The CPU has dedicated registers: a program counter (PC), two registers for
arithmetic operations (A and T), three address pointers (IX, EP, and SP), and the
program status (PS) register. Each of the registers is 16 bits long. The PS
register consists of the register bank pointer (RP), direct bank pointer (DP), and
condition code register (CCR).
■ Configuration of Dedicated Registers
The dedicated registers in the CPU consist of seven 16-bit registers. As for the accumulator (A)
and the temporary accumulator (T), using only the lower eight bits of the respective registers is
also supported.
Figure 2.1-1 shows the configuration of the dedicated registers.
Figure 2.1-1 Configuration of Dedicated Registers
■ Functions of Dedicated Registers
Program counter (PC)
●
● Accumulator (A)
4FUJITSU SEMICONDUCTOR LIMITEDMN702-00009-2v0-E
The program counter is a 16-bit counter which contains the memory address of the instruction
currently executed by the CPU. The program counter is updated whenever an instruction is
executed or an interrupt or a reset occurs. The initial value set immediately after a reset is the
mode data read address (0xFFFD).
The accumulator is a 16-bit register for arithmetic operation. It is used for a variety of
arithmetic and transfer operations of data in memory or data in other registers such as the
temporary accumulator (T). The data in the accumulator can be handled either as word (16-bit)
data or byte (8-bit) data. For byte-length arithmetic and transfer operations, only the lower
eight bits (AL) of the accumulator are used with the upper eight bits (AH) left unchanged. The
initial value set immediately after a reset is "0x0000".
Page 27
MB95630H Series
● Temporary accumulator (T)
The temporary accumulator is an auxiliary 16-bit register for arithmetic operation. It is used to
perform arithmetic operations with the data in the accumulator (A). The data in the temporary
accumulator is handled as word data for word-length (16-bit) operations with the accumulator
(A) and as byte data for byte-length (8-bit) operations. For byte-length operations, only the
lower eight bits (TL) of the temporary accumulator are used and the upper eight bits (TH) are
not used.
When a MOV instruction is used to transfer data to the accumulator (A), the previous contents
of the accumulator are automatically transferred to the temporary accumulator. When
transferring byte-length data, the upper eight bits (TH) of the temporary accumulator remain
unchanged. The initial value after a reset is "0x0000".
● Index register (IX)
The index register is a 16-bit register used to hold the index address. The index register is used
with a single-byte offset (-128 to +127). The offset value is added to the index address to
generate the memory address for data access. The initial value after a reset is "0x0000".
● Extra pointer (EP)
CHAPTER 2 CPU
2.1 Dedicated Registers
The extra pointer is a 16-bit register which contains the value indicating the memory address
for data access. The initial value after a reset is "0x0000".
● Stack pointer (SP)
The stack pointer is a 16-bit register which holds the address referenced when an interrupt or a
sub-routine call occurs and by the stack push and pop instructions. During program execut ion,
the value of the stack pointer indicates the address of the most recent data pushed onto the
stack. The initial value after a reset is "0x0000".
● Program status (PS)
The program status is a 16-bit control register. The upper eight bits consists of the register bank
pointer (RP) and direct bank pointer ( DP); the lower eight bits consists of the condition code
register (CCR).
In the upper eight bits, the upper five bits consists of the register bank pointer used to contain
the address of the general-purpose register bank. The lower three bits consists of the direct
bank pointer which locates the area to be accessed at high-speed by direct addressing.
The lower eight bits consists of the condition code register (CCR) which consists of flags that
represent the state of the CPU.
The instructions that can access the program status are "MOVW A,PS" and "MOVW PS,A".
The register bank pointer (RP) and direct bank pointer (DP) in the program status register can
also be read from and written to by accessing the mirror address (0x0078).
Note that the condition code register (CCR) is a part of the program status register and cannot
be accessed independently.
Refer to the "F
2
MC-8FX Programming Manual" for details on using the dedicated registers.
The register bank pointer (RP) in bit15 to bit11 of the program status (PS)
register contains the address of the general-purpose register bank that is
currently in use and is translated into a real address when general-purpose
register addressing is used.
■ Configuration of Register Bank Pointer (RP)
Figure 2.1-2 shows the configuration of the register bank pointer.
Figure 2.1-2 Configuration of Register Bank Pointer
The register bank pointer contains the address of the register bank currently in use. The content
of the register bank pointer is translated into a real address according to the rule shown in
Figure 2.1-3.
Figure 2.1-3 Rule for Translation into Real Addresses in Ge neral-purpose Register Area
Fixed valueRP: UpperOp-code: Lower
Generated
address
“0” “0”
↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
A15 A14 A13 A12 A11 A10 A9 A8A7A6 A5A4 A3A2 A1A0
“0” “0”“0”“0” “0”“1” R4 R3 R2 R1 R0b2b1b0
The register bank pointer specifies the register bank used as general-purpose registers in the
RAM area. There are a total of 32 register banks, which are specified by setting a value
between 0 and 31 in the upper five bits of the register bank pointer. Each register bank has
eight 8-bit general-purpose registers which are selected by the lower three bits of the op-code.
The register bank pointer allows the space from "0x0100" to "0x01FF"(max) to be used as a
general-purpose register area. However, certain products have restrictions on the size of the
area available for the general-purpose register area. The initial value of the register bank
pointer after a reset is "0x0000".
■ Mirror Address for Register Bank and Direct Bank Pointer
Values can be written to the register bank pointer (RP) and the direct bank pointer (DP) by
accessing the program status (PS) register with the "MOVW PS,A" instruction; the two
pointers can be read by accessing PS with the "MOVW A,PS" instruction. Values can also be
directly written to and read from the two pointers by accessing "0x0078", the mirror address of
the register bank pointer.
The direct bank pointer (DP) in bit10 to bit8 of the program status (PS) register
specifies the area to be accessed by direct addressing.
■ Configuration of Direct Bank Pointer (DP)
Figure 2.1-4 shows the configuration of the direct bank pointer.
Figure 2.1-4 Configuration of Direct Bank Pointer
The area of "0x0000 to 0x007F" and that of "0x0090 to 0x047F" can be accessed by direct
addressing. Access to 0x0000 to 0x007F is specified by an operand regardless of the value in
the direct bank pointer. Access to 0x0090 to 0x047F is specified by the value of the direct bank
pointer and the operand.
Table 2.1-1 shows the relationship between the direct bank pointer (DP) and the access area;
Table 2.1-2 lists the direct addressing instructions.
Table 2.1-1 Direct Bank Pointer and Access Area
Direct bank pointer (DP[2:0])Operand-specified dirAccess area*
0bXXX (It does not affect mapping.)0x0000 to 0x007F0x0000 to 0x007F
0b000 (Initial value)0x0090 to 0x00FF0x0090 to 0x00FF
0b001
0b0100x0180 to 0x01FF
0b0110x0200 to 0x027F
0b1000x0280 to 0x02FF
0b1010x0300 to 0x037F
0b1100x0380 to 0x03FF
0b1110x0400 to 0x047F
*: The available access area varies among products. For details, refer to the device data sheet.
0x0080 to 0x00FF
0x0100 to 0x017F
MN702-00009-2v0-EFUJITSU SEMICONDUCTOR LIMITED7
Page 30
CHAPTER 2 CPU
2.1 Dedicated Registers
Table 2.1-2 Direct Address Instruction List
MB95630H Series
Applicable instructions
CLRB dir:bit
SETB dir:bit
BBC dir:bit,rel
BBS dir:bit,rel
MOV A,dir
CMP A,dir
ADDC A,dir
SUBC A,dir
MOV dir,A
XOR A,dir
AND A,dir
OR A,dir
MOV dir,#im m
CMP dir,#imm
MOVW A,dir
MOVW dir,A
8FUJITSU SEMICONDUCTOR LIMITEDMN702-00009-2v0-E
Page 31
CHAPTER 2 CPU
MB95630H Series
2.1 Dedicated Registers
2.1.3Condition Code Register (CCR)
The condition code register (CCR) in the lower eight bits of the program status
(PS) register consists of the bits (H, N, Z, V, and C) containing information
about the arithmetic result or transfer data and the bits (I, IL1, and IL0) used to
control the acceptance of interrupt requests.
■ Configuration of Condition Code Register (CCR)
Figure 2.1-5 Configuration of Condition Code Register (CCR)
Half carry flag
Interrupt enable flag
Interrupt level bits
Negative flag
Zero flag
Overflow flag
Carry flag
CCR
initial value
The condition code register is a part of the program status (PS) register and therefore cannot be
accessed independently.
■ Bits Showing Operation Results
● Half carry flag (H)
This flag is set to "1" when a carry from bit3 to bit4 or a borrow from bit4 to bit3 occurs due to
the result of an operation. Otherwise, the flag is set to "0". Do not use this flag for any
operation other than addition and subtraction as the flag is intended for decimal-adjusted
instructions.
● Negative flag (N)
This flag is set to "1" when the value of the most significant bit is "1 " due to the result of an
operation, and is set to "0" when the value of the most significant bit is "0".
● Zero flag (Z)
This flag is set to "1" when the result of an operation is "0", and is set to "0" when the result of
an operation is a value other than "0".
● Overflow flag (V)
This flag indicates whether the result of an operation has caused an overflow, with the operand
used in the operation being regarded as an integer expressed as a complement of two. If an
overflow occurs, the overflow flag is set to "1"; otherwise, it is set to "0".
MN702-00009-2v0-EFUJITSU SEMICONDUCTOR LIMITED9
Page 32
CHAPTER 2 CPU
Right-shift (RORC)•Left-shift (ROLC)•
bit0bit7
C
bit0bit7
C
2.1 Dedicated Registers
● Carry flag (C)
This flag is set to "1" when a carry from bit7 or a borrow to bit7 occurs due to the result of an
operation. Otherwise, the flag is set to "0". When a shift instruction is executed, the flag is set
to the shift-out value.
Figure 2.1-6 shows how the carry flag is updated by a shift instruction.
Figure 2.1-6 Carry Flag Updated by Shift Instruction
■ Interrupt Acceptance Control Bits
● Interrupt enable flag (I)
When this flag is set to "1", interrupts are enabled and accepted by the CPU. When this flag is
set to "0", interrupts are disabled and rejected by the CPU.
The initial value after a reset is "0".
The SETI and CLRI instructions set and clear the flag to "1" and "0", respectively.
MB95630H Series
● Interrupt level bits (IL[1:0])
These bits indicate the level of the interrupt currently accepted by the CPU.
The interrupt level is compared with the value of the i nterrupt level setting register (ILR0 to
ILR5) that corresponds to the interrupt request (IR Q00 to IRQ23) of each peripheral fu nction .
The CPU services an interrupt request only wh en its interrupt l evel is smaller th an the value of
these bits with the interrupt enable flag set (CCR:I = 1). Table 2.1-3 lists interrupt level
priorities. The initial value after a reset is "0b11".
Table 2.1-3 Interrupt Levels
IL1IL0Interrupt levelPriority
000High
011
102
113Low (No interrupt)
The interrupt level bits (IL[1:0]) are usually "0b11" when the CPU does not service an interrupt
(with the main program running).
For details of interrupts, see "5.1 Interrupts".
10FUJITSU SEMICONDUCTOR LIMITEDMN702-00009-2v0-E
Page 33
CHAPTER 2 CPU
MB95630H Series
2.2 General-purpose Register
2.2General-purpose Register
The general-purpose registers are a memory block in which each bank consists
of eight 8-bit registers. Up to 32 register banks can be used in total. The
register bank pointer (RP) is used to specify a register bank.
Register banks are useful for interrupt handling, vector call processing, and
sub-routine calls.
■ Configuration of General-purpose Register
• The general-purpose register is an 8-bit register and is located in a register bank in the
general-purpose register area (in RAM).
• Up to 32 banks can be used, each of which consists of eight registers (R0 to R7).
• The register bank pointer (RP) specifies the register bank currently being used and the lower
three bits of the op-code specify the general-purpose register 0 (R0) to the general-purpose
register 7 (R7).
Figure 2.2-1 shows the configuration of the register banks.
Figure 2.2-1 Configuration of Register Banks
Thisaddress = 0x0100+ 8 × (RP)
Address 0x100
For information on the general-purpose register area available on each product, see "■ AREAS
FOR SPECIFIC APPLICATIONS" in the device data sheet.
0x107
R0
R1
R2
R3
R4
R5
R6
R7
Bank 0
Memory area
R0
R1
R2
R3
R4
R5
R6
R7
8bits
R0
R1
R2
R3
R4
R5
R6
R7
0x1F8
0x1FF
Bank 31
32 banks
The number of banksavailable is restricted by
the available RAM size.
MN702-00009-2v0-EFUJITSU SEMICONDUCTOR LIMITED11
Page 34
CHAPTER 2 CPU
2.2 General-purpose Register
■ Features of General-purpose Registers
The general-purpose register has the following features.
• High-speed access to RAM with short instructions (general-purpose register addressing).
• Groupi ng registers into a block of register banks facilitates data protection and division of
registers in terms of functions.
A general-purpose register bank can be allocated exclusively to an interrupt service routine or a
vector call (CALLV #0 to #7) service routine. For instance, the fourth register bank is always
assigned to the second interrupt.
Data of a general-purpose register before an interrupt can be saved to a dedicated register bank
by just specifying that register bank at the beginning of an interrupt service routine. This
therefore eliminates the need to save data of a general-purpose register in a stack, thereby
enabling the CPU to receive interrupts at high speed.
Note:
In an interrupt service routine, include one of the following in a program to ensure that
values of the interrupt level bits (CCR:IL[1:0]) of the condition code register are not
modified when modifying a register bank pointer (RP) to specify a re gister bank.
• Read the interrupt level bits and save their values before writing a value to the RP.
• Directly write a new value to the RP mirror address "0x0078" to update the RP.
• As for a product whose RAM size is 256 bytes, the area available for general-purpose
registers is from "0x0100" to "0x018 F", which is half of that of the product whos e RAM
size is 512 bytes or above. Therefore, when using a program development tool such
as a C compiler to set a general-purpose register area, ensure that the area used as a
general-purpose register area does not exceed the size of RAM installed.
MB95630H Series
12FUJITSU SEMICONDUCTOR LIMITEDMN702-00009-2v0-E
Page 35
MB95630H Series
Before
execution
MemoryMemory
A 0x1234
MOVW 0091H, A
0x0090
0x0091
0x0092
0x0093
0x0090
0x0091
0x0092
0x0093
0x12
0x34
A 0x1234
After
execution
2.3 Placement of 16-bit Data in Memory
2.3Placement of 16-bit Data in Memory
This section describes how 16-bit data is stored in memory.
■ Placement of 16-bit Data in Memory
● State of 16-bit data stored in RAM
When 16-bit data is written to memory, the upper byte of the data is stored at a smaller address
and the lower byte is stored at the next address. When 16-bit data is read, it is handled in the
same way.
Figure 2.3-1 shows how 16-bit data is placed in memory.
Figure 2.3-1 Placement of 16-bit Data in Memory
CHAPTER 2 CPU
● Storage state of 16-bit data specified by an operand
Even when the operand in an instruction specifies 16-bit data, the upper byte is stored at the
address closer to the op-code (instruction) and the lower byte is stored at the address next to the
one at which the upper byte is stored.
That is true whether an operand is either a memory address or 16-bit immediate data.
Figure 2.3-2 shows how 16-bit data in an instruction is placed.
Figure 2.3-2 Placement of 16-bit Data in Instruction
Extended address
[Example]
MOV A, 5678H
MOVW A, #1234H
0xXXX0
0xXXX2
0xXXX5
0xXXX8
XX XX
60 56 78
E4 12 34
XX
;
16-bit immediate data
;
Assemble
Extended address
;
16-bit immediate data
;
● Storage state of 16-bit data in the stack
When 16-bit register data is saved in a stack on an interrupt, the upper byte is stored at a lower
address in the same way as 16-bit data specified by an operand.
MN702-00009-2v0-EFUJITSU SEMICONDUCTOR LIMITED13
Page 36
CHAPTER 2 CPU
2.3 Placement of 16-bit Data in Memory
MB95630H Series
14FUJITSU SEMICONDUCTOR LIMITEDMN702-00009-2v0-E
Page 37
CHAPTER 3
CLOCK CONTROLLER
This chapter describes the functions and
operations of the clock controller.
3.1Overview
3.2Oscillation Stabilization Wait Time
3.3Registers
3.4Clock Modes
3.5Operations in Low Power Consumption Mode (Standby
Mode)
3.6Clock Oscillator Circuit
3.7Overview of Prescaler
3.8Configuration of Prescaler
3.9Operation of Prescaler
3.10 Notes on Using Prescaler
MN702-00009-2v0-EFUJITSU SEMICONDUCTOR LIMITED15
Page 38
CHAPTER 3 CLOCK CONTROLLER
3.1 Overview
MB95630H Series
3.1Overview
The New 8FX family has a built-in clock controller that optimizes its power
consumption. It supports both of the external main clock and the external
subclock.
The clock controller enables/disables clock oscillation, enables/disables the
supply of clock signals to the internal circuit, selects the clock source, and
controls the internal CR oscillator and frequency divider circuits.
■ Overview of Clock Controller
The clock controller enables/disables clock oscillation, enables/disables clock supply to the
internal circuit, selects the clock source, and controls the internal CR oscillator and frequency
divider circuits.
The clock controller controls the internal clock according to the clock mode, standby mode
settings and the reset operation. The clock mode is used to select an internal operating clock;
the standby mode is used to enable or disable clock oscillation and signal supply.
The clock controller selects the optimum power consumption and funct ions depending on the
combination of clock mode and standby mode.
This device has five source clocks: a main clock formed by dividing the main oscillation clock
by two, a subclock formed by dividing the suboscillation clock b y two, a main CR clock, a
main CR PLL clock formed by multiplying the main CR oscillation clock by the PLL
multiplication rate, and a sub-CR clock formed by dividing the sub-CR oscillation clock by
two.
Oscillation stabilization wait time setting register (WATR)
PLL control register (PLLC)
SWT3MWT3 MWT2 MWT1 MWT0SWT2 SWT1 SWT0
Prescaler
No division
Divide by 4
Divide by 8
Divide by 16
■ Block Diagram of Clock Controller
Figure 3.1-1 is the block diagram of the clock controller.
Figure 3.1-1 Block Diagram of Clock Controller
CHAPTER 3 CLOCK CONTROLLER
3.1 Overview
MN702-00009-2v0-EFUJITSU SEMICONDUCTOR LIMITED17
Page 40
CHAPTER 3 CLOCK CONTROLLER
3.1 Overview
■ Configuration of Clock Controller
● Main clock oscillator circuit
This block is the oscillator circuit for the main clock.
● Subclock oscillator circuit
This block is the oscillator circuit for the subclock.
● Main CR clock oscillator circuit
This block is the oscillator circuit for the main CR clock.
● Main CR PLL clock oscillator circuit
This block is the oscillator circuit for the main CR PLL clock.
● Sub-CR clock oscillator circuit
This block is the oscillator circuit for the sub-CR clock.
MB95630H Series
● System clock selector
This block selects a clock according to the clock mode used from the following five types of
source clock: main clock, subclock, main CR clock, main CR PLL clock and sub-CR clock.
The source clock selected is divided by the prescaler. The divided clock is called "machine
clock", which is to be supplied to the clock control circuit.
● Clock control circuit
This block controls the supply of the machine clock to the CPU and each peripheral function
according to the standby mode used or oscillation stabilization wait time.
● Oscillation stabilization wait circuit
This block outputs oscillation stabilization wait time signals according to clocks that are
enabled to operate.
In the case of main clock, its oscillation stabilization signal can be selected from 14 types of
oscillation stabilization signals created by a dedicated timer in the oscillation stabilization wait
circuit. In case of subclock, its oscillation stabilization signal can be selected from 15 types of
oscillation stabilization signals created by the same dedicated timer.
● System clock control register (SYCC)
This register selects a clock mode and a machine clock divide ratio, and indicates the current
clock mode.
● PLL control register (PLLC)
This register controls the main CR PLL clock multiplication rate settings.
● Standby control register (STBC)
This register controls the transition from RUN state to standby mode, the setting of pin states in
stop mode, time-base timer mode, or watch mode, and the generation of software resets.
18FUJITSU SEMICONDUCTOR LIMITEDMN702-00009-2v0-E
Page 41
MB95630H Series
● System clock control register 2 (SYCC2)
This register enables or disables the oscillations of the main clock, main CR clock, subclock,
and sub-CR clock, and displays the ready signals of main clock oscillation, main CR clock
oscillation, subclock oscillation and sub-CR clock oscillation.
● Oscillation stabilization wait time setting register (WATR)
This register sets the oscillation stabilization wait times for the main clock and subclock.
● Standby control register 2 (STBC2)
This register controls the deep standby mode.
CHAPTER 3 CLOCK CONTROLLER
3.1 Overview
MN702-00009-2v0-EFUJITSU SEMICONDUCTOR LIMITED19
Page 42
CHAPTER 3 CLOCK CONTROLLER
3.1 Overview
MB95630H Series
■ Clock Modes
There are five clock modes:
•Main clock mode
•Main CR clock mode
•Main CR PLL clock mode
•Subclock mode
•Sub-CR clock mode.
Table 3.1-1 shows the relationships between the clock modes and the machine clock (operating
clock for the CPU and peripheral functions).
Table 3.1-1 Clock Modes and Machine Clock Selection
Clock modeMachine clock
Main clock modeThe machine clock is generated by dividing the main clock by two.
Main CR clock modeThe machine clock is generated from the main CR clock.
Main CR PLL clock mode
Subclock modeThe machine clock is generated by dividing the subclock by two.
Sub-CR clock modeThe machine clock is generated by dividing the sub-CR clock by two.
In any clock mode, the frequency of a selected clock can be divided.
The machine clock is generated by multiplying the main CR clock by a PLL
multiplication rate.
20FUJITSU SEMICONDUCTOR LIMITEDMN702-00009-2v0-E
Page 43
MB95630H Series
■ Standby Mode
The clock controller selects whether to enable or disable clock oscillation and clock supply to
the internal circuitry according to the standby mode selected. With the exception of time-base
timer mode and watch mode, the standby mode can be set independently of the clock mode.
Table 3.1-2 shows the relationships between standby modes and clock supply states.
Table 3.1-2Standby Mode and Clock Supply States
Standby modeClock supply state
Sleep mode
Time-base timer mode
Watch mode
Stop mode
Clock supply to the CPU is stopped. As a result, the CPU stops operating, but other
peripheral functions continue operating.
Clock signals are only supplied to the time-base timer and the watch p rescale r, while the
clock supply to other circuits is stopped. As a result, all the functions other than the timebase timer, watch prescaler, external interrupt, and low-voltage detection reset (option)
are stopped.
The time-base timer mode can be used in main clock mode, main CR clock mode and
main CR PLL clock mode.
Main clock oscillation is stopped. Clock signals are supplied only to the watch prescaler,
while clock supply to other circuits is stopped. As a result, all the functions other than
the watch prescaler, external interrupt, and low-voltage detection reset (option) are
stopped.
The watch mode is the standby mode that can be used in subclock mode and sub-CR
clock mode.
Main clock oscillation and subclock oscillation are stopped, and clock supply to all
circuits is stopped. As a result, all the functions other than external interrupt and lowvoltage detection reset (option) are stopped.
CHAPTER 3 CLOCK CONTROLLER
3.1 Overview
Note:
In every standby mode, two further operating mode options, normal standby mod e and deep
standby mode, can be selected by the deep standby mode control bit in the standby control
register 2 (STBC2:DSTBYX).
For details, see "3.5.1 Notes on Using Standby Mode".
Clocks that are not mentioned in Table 3.1-2 are supplied under particular settings.
For example, with main clock mode being used in stop mode, when SYCC2:SOSCE or
SYCC2:SCRE has been set to "1", the watch prescaler continues its operation.
In addition, with the hardware watchdog timer already started, the watchdog timer
operates also in standby mode, depending on the settings of the non-volatile register
(NVR) interface. For details of the non-volatile register (NVR) interface, see "CHAPTER
27 NON-VOLATILE REGISTER (NVR) INTERFACE".
MN702-00009-2v0-EFUJITSU SEMICONDUCTOR LIMITED21
Page 44
CHAPTER 3 CLOCK CONTROLLER
3.1 Overview
MB95630H Series
■ Combinations of Clock Mode and Standby Mode
Table 3.1-3 and Table 3.1-4 list the combinations of clock mode and standby mode, and the
respective operating states of different internal circuits with different combinations of clock
mode and standby mode.
Table 3.1-3Combinations of Standby Mode and Clock Mode, and Internal Operating Sta tes (1)
RUNSleep
Function
Main clock
mode
Main CR
clock mode/
Main CR PLL
Subclock
mode
Sub-CR
clock mode
Main clock
mode
clock mode
Main clockOper ati ng
Main CR clock/
Main CR PLL
clock
Subclock
Sub-CR clock
CPUOperatingOperatingStoppedStopped
Flash memoryOperatingOperating
RAMOperatingOperatingValue heldValue held
I/O portsOperatingOperatingOutput heldOutput held
Ti m e - b a s e t i m e rOperatingStoppedOperatingStopped
Watch prescaler
External interruptOperatingOperatingOperatingOperating
Hardware
watchdog timer
Software watchdog
timer
Low-voltage
detection reset
Other peripheral
functions
*2
Stopped
Operating
Operating
Operating
OperatingOperating
OperatingOperatingStoppedStopped
OperatingOperatingOperatingOperating
OperatingOperatingOperatingOperating
*1
Stopped
OperatingStopped
*3
*4
*3, *4
StoppedOperating
Operating
*4
Operating
Operating
Operating
Operating
Stopped
*3
Operating
Main CR
clock mode/
Main CR PLL
clock mode
*1
Stopped
*2
OperatingStopped
*3
Operating
*4
Operating
Operating
*6
*3, *4
*5
Value he l d
Subclock
mode
Operating
*4
Operating
Value held
Operating
Operating
clock mode
Stopped
Sub-CR
Operating
Operating
*6
*5
*3
*1: The main clock runs when the main clock oscillation enable bit in the system clock control register 2
(SYCC2:MOSCE) is set to "1".
*2: The main CR clock or the main CR PLL clock runs when main CR clock oscillation enable b it in the syst em
clock control register 2 (SYCC2:MCRE) is set to "1".
*3: The module runs when the subclock oscillation enable bit in the system clock control register 2
(SYCC2:SOSCE) is set to "1".
*4: The module runs when the sub-CR clock oscillation enable bit in the system clock control register 2
(SYCC2:SCRE) is set to "1".
*5: The hardware watchdog timer stops when the hardware watchdog timer is disabled by the non-volatile
register (NVR) interface.
*6: The state of the Flash memory in a standby mode can be selected from two options, normal state and low-
power state, by the deep standby mode control bit in the standby control register 2 (STBC2:DSTBYX).
22FUJITSU SEMICONDUCTOR LIMITEDMN702-00009-2v0-E
Page 45
CHAPTER 3 CLOCK CONTROLLER
MB95630H Series
3.1 Overview
Table 3.1-4Combinations of Standby Mode and Clock Mode and Internal Operating States (2)
Time-base timerWatchStop
Function
Main clock
mode
Main CR
clock mode/
Main CR PLL
Subclock
mode
Sub-CR
clock mode
Main clock
mode
clock mode
Main clockOper ati ng
Main CR clock/
Main CR PLL
clock
Subclock
Sub-CR clock
CPUStoppedStoppedStopped
Flash memory
RAMValue heldValue heldValue held
I/O portsOutput held / Hi-ZOutput held/Hi-ZOutput held/Hi-Z
Ti m e - b a s e t i m e rOperatingStoppedStopp ed
Watch prescaler
External interruptOperatingOperatingOperating
Hardware
watchdog timer
Software watchdog
timer
Low-voltage
detection reset
Other peripheral
functions
*2
Stopped
Operating
Operating
Value held
Operating
Operating
StoppedStoppedStopped
OperatingOperatingOperating
StoppedStoppedStopped
*1
Stopped
OperatingStoppedStopped
*3
*4
*6
*3, *4
*5
StoppedStopped
Operating
Operating
*4
Value held
Operating
Operating
Operating
Operating
*6
*5
*3
Operating
Operating
Operating
Main CR
clock mode/
Main CR PLL
clock mode
*3
*4
Value he l d
*3, 4
Operating
Subclock
mode
*6
*5
Sub-CR
clock mode
Stopped
Stopped
Stopped
*1: The main clock runs when the main clock oscillation enable bit in the system clock control register 2
(SYCC2:MOSCE) is set to "1".
*2: The main CR clock or the main CR PLL clock runs when main CR clock oscillation enable bit in the sy stem
clock control register 2 (SYCC2:MCRE) is set to "1".
*3: The module runs when the subclock oscillation enable bit in the system clock control register 2
(SYCC2:SOSCE) is set to "1".
*4: The module runs when the sub-CR clock oscillation enable bit in the system clock control register 2
(SYCC2:SCRE) is set to "1".
*5: The hardware watchdog timer stops when the hardware watchdog timer is disabled by the non-volatile
register (NVR) interface.
*6: The state of the Flash memory in a standby mode can be selected from two options, normal state and low-
power state, by the deep standby mode control bit in the standby control register 2 (STBC2:DSTBYX).
MN702-00009-2v0-EFUJITSU SEMICONDUCTOR LIMITED23
Page 46
CHAPTER 3 CLOCK CONTROLLER
Oscillation stabilization
wait time
()
Normal operation
Operation after returning
from stop mode or a reset
Oscillation started
X1
Oscillation time of
oscillator
Oscillation stabilized
3.2 Oscillation Stabilization Wait Time
MB95630H Series
3.2Oscillation Stabilization Wait Time
The oscillation stabilization wait time is the time after the oscillator circuit
stops oscillation until the oscillator resumes its stable oscillation at its natural
frequency. The clock controller obtains the oscillation stabilization wait time
after the start of oscillation by counting a specific number of oscillation clock
cycles. During the oscillation stabilization wait time, the clock controller stops
clock supply to internal circuits.
■ Oscillation Stabilization Wait Time
The clock controller obtains the oscillation stabilization wait time after the start of oscillation
by counting a specific number of oscillation clock cycles. During the oscillation stabilization
wait time, the clock controller stops clock supply to internal circuits.
When the power is switched on, or when a state transition request making the oscillator start
from the oscillation stop state is generated due to a change of clock mode caused by a reset, by
an interrupt in stop mode or by the software operation, before making the clock m ode transit to
another mode, the clock controller automatically waits for the oscillation stabilization wait time
of the clock for that mode to elapse.
Figure 3.2-1 shows how the oscillator runs immediately after starting oscillating.
Figure 3.2-1 Behavior of Oscilla tor Immediately after Starting Oscillation
Oscillation stabilization wait time of main clock, subclock, main CR clock, main CR PLL
clock or sub-CR clock is counted by using a dedicated counter. The count value can be set in
the oscillation stabilization wait time setting register (WATR). Set it in keeping with the
oscillator characteristics.
When a power-on reset occurs, the oscillation stabilization wait time is fixed at the initial
value.
Table 3.2-1 shows the length of oscillation stabilization wait time.
Table 3.2-1Oscillation Stabilization Wait Time
ClockReset sourceOscillation stabilization wait time
Main clock
Subclock
Power-on reset
Other than power-on reset Register settings (WATR:MWT[3:0])
Power-on reset
Other than power-on reset Register settings (WATR:SWT[3:0])
Initial value: (2
Initial value: (2
14
-2)/FCH (FCH: main clock frequency)
15
-2)/FCL (FCL: subclock frequency)
24FUJITSU SEMICONDUCTOR LIMITEDMN702-00009-2v0-E
Page 47
MB95630H Series
■ PLL Clock Oscillation Stabilization W ait Time
As with the oscillation stabilization wait time of the oscillator, when a request for state
transition from PLL oscillation stopped state to PLL oscillation start is generated due to an
interrupt in stop mode or a change of clock mode by software, the clock controller first waits
for the main CR clock oscillation stabilization wait time to elapse, and then automatically waits
for the PLL clock oscillation stabilization wa it time to elapse.
Table 3.2-2 shows the PLL oscillation stabilization wait time.
Table 3.2-2PLL Oscillation Stabilization Wait Time
PLL oscillation stabilization wait time
Main CR PLL clock
2
12
/F
MCRPLL
CHAPTER 3 CLOCK CONTROLLER
3.2 Oscillation Stabilization Wait Time
*
*: F
MCRPLL
= 16 MHz
■ CR Clock Oscillation Stabilization Wait Time
As with the oscillation stabilization wait tim e of the oscillator, when a state transition request
making CR oscillation start from the CR oscillation stop stat e is generated due to a change of
clock mode caused by an interrupt in standby mode or by the software operation, the clock
controller automatically waits for the CR oscillation stabilization wait time to elapse.
Table 3.2-3 shows the CR oscillation stabilization wait time.
Table 3.2-3CR Oscillation Stabilization Wait Time
CR oscillation stabilization wait time
CRH
CRL
*1
*2
*1: F
*2: F
CRH
CRL
Main CR clock
Sub-CR clock
= 4 MHz
= 150 kHz
210/F
25/F
■ Oscillation Stabilization Wait Time and Clock Mode/Standby Mode Transition
If state transition occurs, the clock controller automatically waits for the oscillation
stabilization wait time to elapse whenever necessary. Depending on the circumstances under
which state transition occurs, the clock controller does not wait for the oscillation stabilization
wait time to elapse even if state transition occurs.
For details on state transition, see "3.4 Clock Modes" and "3.5 Operations in Low Power
Consumption Mode (Standby Mode)".
MN702-00009-2v0-EFUJITSU SEMICONDUCTOR LIMITED25
Page 48
CHAPTER 3 CLOCK CONTROLLER
3.2 Oscillation Stabilization Wait Time
MB95630H Series
■ Order of Priority for Oscillation Stabilization Wait Times
When multiple clocks are enabled simultaneously, the clock controller counts the respective
oscillation stabilization wait times of clocks according to a designated order of priority. Below
are the respective orders of priority for counting different oscillation stabilizati on wait times in
different clock modes.
•Main clock mode
Sub-CR clock > Subclock > Main CR clock > Main CR PLL clock
•Main CR clock mode
Sub-CR clock > Subclock > Main CR PLL clock > Main clock
•Subclock mode
Sub-CR clock > Main CR clock or main clock > Main CR PLL clock
•Sub-CR clock mode
Main CR clock or main clock > Subclock > Main CR PLL clock
26FUJITSU SEMICONDUCTOR LIMITEDMN702-00009-2v0-E
Page 49
CHAPTER 3 CLOCK CONTROLLER
MB95630H Series
3.3Registers
This section provides details of registers of the clock controller.
Table 3.3-1List of Clock Controller Registers
3.3 Registers
Register
abbreviation
SYCCSystem clock control register3.3.1
PLLCPLL control register3.3.2
WATROscilla tion stabilization wait time setting register3.3.3
STBCStandby control register3.3.4
SYCC2System clock control register 23.3.5
STBC2Standby control register 23.3.6
Register nameReference
MN702-00009-2v0-EFUJITSU SEMICONDUCTOR LIMITED27
Page 50
CHAPTER 3 CLOCK CONTROLLER
3.3 Registers
MB95630H Series
3.3.1System Clock Control Register (SYCC)
The system clock control register (SYCC) selects a machine clock divide ratio
and a clock mode, and indicates the current clock mode.
■ Register Configuration
bit76543210
FieldSCM2SCM1SCM0SCS2SCS1SCS0DIV1DIV0
AttributeRRRR/WR/WR/WR/WR/W
Initial valueXXX11011
■ Register Functions
[bit7:5] SCM[2:0]: Clock mode monitor bits
These bits indicate the current clock mode.
These bits are read-only bits. Writing values to these bits has no effect on operation.
bit7:5Details
Reading "000"Indicates that the current clock mode is subclock mode.
Reading "010"Indicates that the current cloc k mode is main clock mode.
Reading "100"Indicates that the current clock mode is sub-CR clock mode.
Reading "110"Indicates that the current cloc k mode is main CR clock mode.
Reading "111"Indicates that the current clock mode is main CR PLL clock mode.
[bit4:2] SCS[2:0]: Clock mode select bits
These bits select a clock mode.
bit4:2Details
Writing "000"Selects subclock mode.
Writing "010"Selects main clock mode.
Writing "100"Selects sub-CR clock mode.
Writing "110"Selects main CR clock mode.
Writing "111"Selects main CR PLL clock mode.
Note: Do not write to SCS[2:0] any value other than those listed in the table above.
[bit1:0] DIV[1:0]: Machine clock divide ratio select bits
These bits select the machine clock divide ratio for the source clock.
The machine clock is generated from the source clock according to the divide ratio set by these bits.
The PLL control register (PLLC) controls the main CR PLL clock multiplication
rate settings.
■ Register Configuration
bit76543210
FieldMPENMPMC1MPMC0MPRDY————
AttributeR/WR/WR/WR————
Initial value000X0000
■ Register Functions
[bit7] MPEN: Main CR PLL clock enable bit
This bit enables or disables the main CR PLL clock.
When SCS[2:0] are set to "0b111", this bit is automatically set to "1".
When SCS[2:0] or SCM[2:0] are set to "0b111", writing "0" to this bit has no effect on oper ation.
This bit is automatically set to "0" when the clock mode transi ts from one mo de to another mode excep t m ain
CR PLL clock mode.
When the current clock mode is subclock mode or sub-CR clock mode, writing "1" to this bit has no effect on
operation.
bit7Details
Writing "0"Disables the main CR PLL clock.
Writing "1"Enables the main CR PLL clock.
[bit6:5] MPMC[1:0]: Main CR PLL clock multiplication rate select bits
These bits select a main CR PLL clock multiplication rate.
The settings of these bits can be modified only when the main CR PLL clock is stopped. Thus these bits can
be modified in main clock mode, main CR clock mode, subclock mode or sub-CR clock mode.
About 1.0 s
About 0.5 s
About 0.25 s
About 0.125 s
About 62.44 ms
About 31.19 ms
About 15.56 ms
About 7.75 ms
About 3.85 ms
About 1.89 ms
About 915.5 µs
About 427.2 µs
About 183.1 µs
About 61.0 µs
0.0 µs
0.0 µs
The number of cycles in the above table is the minimum value. The maximum value is the number of cycles
in the above table plus 1/F
CL
.
Note: Do not modify these bi ts during subclock oscillation stabilization wait time. Modify them when the
subclock oscillation stabilization bit in the sy stem clock control register 2 (SYCC2:SRDY) has been
set to "1". These bits can be modified when the subclock is stopped with the subclock oscillation stop
bit in the system clock control register 2 (SYCC2:SOSCE) set to "0" in main clock mode, main CR
clock mode, main CR PLL clock mode, or sub-CR clock mode.
30FUJITSU SEMICONDUCTOR LIMITEDMN702-00009-2v0-E
Page 53
MB95630H Series
[bit3:0] MWT[3:0]: Main clock oscillation stabilization wait time select bits
These bits select the main clock oscillation stabilization wait time.
About 4.10 ms
About 2.05 ms
About 1.02 ms
About 511.5 µs
About 255.5 µs
About 127.5 µs
About 63.5 µs
About 31.5 µs
About 15.5 µs
About 7.5 µs
About 3.5 µs
About 1.5 µs
About 0.5 µs
0.0 µs
0.0 µs
0.0 µs
The number of cycles in the above table is the minimum value. The maximum value is the number of cycles
in the above table plus 1/F
CH
.
Note: Do not modify these bits during main clock oscillation stabil ization wait time. Modify them when the
main clock oscillation stabilization bit in the system clock control register 2 (SYCC2:MRDY) has
been set to "1". These bits can be modified when the main clock is stopped with the main clock
oscillation stop bit in the system clock control register 2 (SYCC2:MOSCE) set to "0" in main CR
clock mode, main CR PLL clock mode, subclock mode, or sub-CR clock mode.
MN702-00009-2v0-EFUJITSU SEMICONDUCTOR LIMITED31
Page 54
CHAPTER 3 CLOCK CONTROLLER
3.3 Registers
MB95630H Series
3.3.4Standby Control Register (STBC)
The standby control register (STBC) controls transition from the RUN state to
sleep mode, stop mode, time-base timer mode, or watch mode, sets the pin
state in stop mode, time-base timer mode, and watch mode, and controls the
generation of software resets.
■ Register Configuration
bit76543210
FieldSTPSLPSPLSRSTTMD———
AttributeWWR/WWW———
Initial value00000000
■ Register Functions
[bit7] STP: Stop bit
This bit sets the transition to stop mode.
The read value of this bit is always "0".
bit7Details
Writing "0"Has no effect on operation.
Writing "1"Causes the device to transit to stop mode.
Note: After an interrupt requ est is generated, writing "1" to this bit is ignored. For details, see "3.5.1 Notes
on Using Standby Mode".
[bit6] SLP: Sleep bit
This bit sets the transition to sleep mode.
The read value of this bit is always "0".
bit6Details
Writing "0"Has no effect on operation.
Writing "1"Causes the device to transit to sleep mode.
Note: After an interrupt r equest is generated, writin g "1" to this bit is ignored. For details, see "3.5.1 Notes
on Using Standby Mode".
[bit5] SPL: Pin state setting bit
This bit sets the states of external pins in stop mode, time-base timer mode, and watch mode.
bit5Details
Writing "0"The state (level) of an external pin in stop mode, time-base timer mode and watch mode is kept.
An external pin becomes high impedance in stop mode, time-base timer mode and watch mode.
Writing "1"
(A pin for which connection to a pull-up resistor has been selected in the pull-up register is pulled
up.)
32FUJITSU SEMICONDUCTOR LIMITEDMN702-00009-2v0-E
Page 55
CHAPTER 3 CLOCK CONTROLLER
MB95630H Series
3.3 Registers
[bit4] SRST: Software reset bit
This bit sets the software reset.
The read value of this bit is always "0".
bit4Details
Writing "0"Has no effect on operation.
Writing "1"Generates a 3-machine clock reset signal.
[bit3] TMD: Watch bit
This bit sets transition to time-base timer mode or watch mode.
Writing "1" to this bit in main clock mode, main CR clock mode, or main CR PLL clock mode causes the
device to transit to time-base timer mode.
Writing "1" to this bit in subclock mode or sub-CR clock mode causes the device to transit to watch mod e.
Writing "0" to this bit has no effect on operation.
The read value of this bit is always "0".
Details
bit3
Writing "0"Has no effect on operation.Has no effect on operation.
Writing "1"
In main clock mode, main CR clock mode
or main CR PLL clock mode
Causes the device to transit to time-base timer
mode.
In subclock mode or sub-CR clock mode
Causes the device to transit to watch mode
Note: After an interrupt requ est is generated, writing "1" to this bit is ignored. For details, see "3.5.1 Notes
on Using Standby Mode".
[bit2:0] Undefined bits
Their read values are always "0". Writing values to these bits has no effect on operation.
Notes:
•Set a standby mode after making sure that the transition to clock mode has been
completed by comparing the values of the clock mode monitor bits (SYCC:SCM[2:0])
and clock mode select bits (SYCC:SCS[2:0]) in the system clock control register.
•If two or more of the following bits, stop bit (STP), sleep bit (SLP), software reset bit
(SRST) and watch bit (TMD), are s et to "1" together, the o rder of priority for such b its
is as follows:
(1) Software reset bit (SRST)
(2) Stop bit (STP)
(3) Watch bit (TMD)
(4) Sleep bit (SLP)
When released from standby mode, the device returns to the normal operating state.
MN702-00009-2v0-EFUJITSU SEMICONDUCTOR LIMITED33
Page 56
CHAPTER 3 CLOCK CONTROLLER
3.3 Registers
MB95630H Series
3.3.5System Clock Control Register 2 (SYCC2)
The system clock control register 2 (SYCC2) indicates the respective
stabilization conditions of main clock oscillation, subclock oscillation, main CR
clock oscillation and sub-CR clock oscillation, and controls main clock
oscillation, subclock oscillation, main CR clock oscillation and sub-CR clock
oscillation.
■ Register Configuration
bit76543210
FieldSRDYMRDYSCRDYMCRDYSOSCEMOSCESCREMCRE
AttributeRRRRR/WR/WR/WR/W
Initial valueXXXX0011
■ Register Functions
[bit7] SRDY: Subclock oscillation stabilization bit
This bit indicates whether the subclock oscillation has become stable.
This bit is read-only. Writing a value to this bit has no effect on operation.
bit7Details
Reading "0"
Reading "1"Indicates that the subclock oscillation wait time is over.
Indicates that the clock controller is in the subclock oscillation stabilization wait state or that the
subclock oscillation has stopped.
[bit6] MRDY: Main clock oscillation stabilization bit
This bit indicates whether the main clock oscillation has become stable.
This bit is read-only. Writing a value to this bit has no effect on operation.
bit6Details
Reading "0"
Reading "1"Indicates that the main clock oscillation wait time is over.
Indicates that the clock controller is in the main clock oscillation stabilization wai t state or that the
main clock oscillation has stopped.
[bit5] SCRDY: Sub-CR clock oscillation stabilization bit
This bit indicates whether the sub-CR clock oscillation has become stable.
This bit is read-only. Writing a value to this bit has no effect on operation.
bit5Details
Reading "0"
Reading "1"Indicates that the sub-CR clock oscillation wait time is over.
Indicates that the clock controller is in the sub- CR clock oscillation stabilizat ion wa it state or that
the sub-CR clock oscillation has stopped.
[bit4] MCRDY: Main CR clock oscillation stabilization bit
This bit indicates whether the main CR clock oscillation has become stable.
This bit is read-only. Writing a value to this bit has no effect on operation.
bit4Details
Reading "0"
Reading "1"Indicates that the main CR clock oscillation wait time is ov e r.
Indicates that the clock controller is in the main CR clock oscillation stabilization wait state or
that the main CR clock oscillation has stopped.
34FUJITSU SEMICONDUCTOR LIMITEDMN702-00009-2v0-E
Page 57
CHAPTER 3 CLOCK CONTROLLER
MB95630H Series
3.3 Registers
[bit3] SOSCE: Subclock oscillation enable bit
This bit enables or disables the subclock oscillation.
When SCS[2:0] are set to "0b000", this bit is automatically set to "1".
When SCS[2:0] or SCM[2:0] are set to "0b000", writing "0" to this bit has no effect on oper ation.
bit3Details
Writing "0"Disables the subclock oscillation.
Writing "1"Enables the subclock oscillation.
[bit2] MOSCE: Main clock oscillation enable bit
This bit enables or disables the main clock oscillation.
When SCS[2:0] are set to "0b010", this bit is automatically set to "1".
When SCS[2:0] or SCM[2:0] are set to "0b010", writing "0" to this bit has no effect on oper ation.
This bit is automatically set to "0" when the clock mode is changed from one mode to anoth er mode other
than main clock mode.
When the current clock mode is subclock mode or sub-CR clock mode, writing "1" to this bit has no effect on
operation.
bit2Details
Writing "0"Disables the main clock oscillation.
Writing "1"Enables the main clock oscillation.
[bit1] SCRE: Sub-CR clock oscillation enable bit
This bit enables or disables the sub-CR clock oscillation.
When SCS[2:0] are set to "0b100", this bit is automatically set to "1".
When SCS[2:0] or SCM[2:0] are set to "0b100", writing "0" to this bit has no effect on oper ation.
When SCS[2:0] and SCM[2:0] are not set to "0b100", this bit can be modified independently of other bits.
bit1Details
Writing "0"Disables the sub-CR clock oscillation.
Writing "1"Enables the sub-CR clock oscillation.
[bit0] MCRE: Main CR clock oscillation enable bit
This bit enables or disables the main CR clock oscillation.
When SCS[2:0] are set to "0b110" or "0b111", this bit is automat i cal ly set to "1".
When SCS[2:0] or SCM[2:0] are set to "0b110" or "0b111", writing "0" to this bit has no effect on operation.
This bit is automatically set to "0" when the clock mode is changed from one m ode to another mode except
main CR clock mode or from main CR PLL clock mode.
When the current clock mode is subclock mode or sub-CR clock mode, writing "1" to this bit has no effect on
operation.
bit0Details
Writing "0"Disables the main CR clock oscillation.
Writing "1"Enables the main CR clock oscillation.
MN702-00009-2v0-EFUJITSU SEMICONDUCTOR LIMITED35
Page 58
CHAPTER 3 CLOCK CONTROLLER
3.3 Registers
MB95630H Series
3.3.6Standby Control Register 2 (STBC2)
The standby control register 2 (STBC2) contr o ls the deep standby mode.
■ Register Configuration
bit76543210
Field———————DSTBYX
Attribute———————R/W
Initial value00000000
■ Register Functions
[bit7:1] Undefined bits
Their read values are always "0". Writing values to these bits has no effect on operation.
[bit0] DSTBYX: Deep standby mode control bit
This bit makes the device transit to deep standby mode by setting the Flash memo ry to th e low-po wer stat e in
standby mode.
Writing "0"
Writing "1"
Notes:
bit0Details
Sets the Flash memory to the low-power state when the device enters standby mode according to
the setting of the standby control register (STBC). (deep standby mode)
Keeps the Flash memory at the normal state when the device enters standby mode according to
the setting of the standby control register (STBC). (normal standby mode)
•Waking up the device from deep standby mode and waking up the device from the
normal standby mode have the following difference.
Maximum time required to wake up the device from deep
standby mode
(SCLK: source clock, MCLK: machine clock)
In main clock mode, main CR clock
mode, or main CR PLL clock mode
In subclock mode or sub-CR clock
mode
(10 SCLK + 150 µs + 6 MCLK) +
(2 SCLK + 150 µs + 6 MCLK) +
time required to wake up the
device from normal standby mode
time required to wake up the
device from normal standby mode
•Refer to "■ ELECTRICAL CHARACTERISTICS" in the device data sheet for the
difference between the deep standby mode and the normal standby mode in power
consumption.
•Do not make the device transit to deep standby mode when a Flash command
sequence (except read/reset) has been invoked.
36FUJITSU SEMICONDUCTOR LIMITEDMN702-00009-2v0-E
Page 59
CHAPTER 3 CLOCK CONTROLLER
MB95630H Series
3.4 Clock Modes
3.4Clock Modes
There are five clock modes: main clock mode, subclock mode, main CR clock
mode, main CR PLL clock mode, and sub-CR clock mode. The clock mode
switches according to the settings in the system clock control register (SYCC).
■ Operations in Main Clock Mode
In main clock mode, the main clock is used as the machine clock for the CPU and peripheral
functions.
The time-base timer operates using the main clock.
The watch prescaler operates using the subclock or the sub-CR clock.
While the device is operating in main clock mode, it can be set to transit to one of the
following standby mode: sleep mode, stop mode, or time-base timer mode.
After a reset, the device always enters main CR clock mode regardless of the clock mode used
before that reset.
■ Operations in Subclock Mode
In subclock mode, main clock oscillation is stopped* and the subclock is used as the machine
clock for the CPU and peripheral functions. In this mode, the time-base timer stops as it
requires the main clock for operation.
While the device is operating in subclock mode, it can be set to transit to one of the following
standby mode: sleep mode, stop mode, or watch mode.
■ Operations in Main CR Clock Mode or Main CR PLL Clock Mode
In main CR clock mode or main CR PLL clock mode, the main CR clock or the m ain CR PLL
clock is used as the machine clock for the CPU and peripheral functions. The time-base timer
and the watchdog timer operate using the main CR clock or the main CR PLL clock.
The watch prescaler operates using the subclock or the sub-CR clock.
While the device is operating in main CR clock mode or the main CR PLL cloc k mode, it can
be set to transit to one of the following standby m ode: sleep mode, stop mode, or time-base
timer mode.
■ Operations in Sub-CR Clock Mode
In sub-CR clock mode, main clock oscillation is stopped* an d the sub-CR clock is used as the
machine clock for the CPU and peripheral functions. In this mode, the time-base timer stops as
it requires the main clock for operation. The watch prescaler operates using the sub-CR clock.
While the device is operating in sub-CR clock mode, it can be set to transit to one of the
following standby mode: sleep mode, stop mode, or watch mode.
*: The oscillation of the main clock, main CR clock, or main CR PLL clock is automatically disabled
(writing "0" to SYCC2:MOSCE, SYCC2:MCRE or PLLC:MPEN respectively) when the clock mode
transits from main clock mode, main CR clock mode or main CR PLL clock mode to subclock mode or
sub-CR clock mode. In subclock mode or sub-CR clock mode, writing "1" to SYCC2:MOSCE,
SYCC2:MCRE or PLLC:MPEN cannot enable the main clock, the main CR clock, or the main CR
PLL clock respectively.
MN702-00009-2v0-EFUJITSU SEMICONDUCTOR LIMITED37
Page 60
CHAPTER 3 CLOCK CONTROLLER
3.4 Clock Modes
■ Clock Mode State Transition Diagram
There are five clock modes: main clock mode, subclock mode, main CR clock mode, main CR
PLL clock mode and sub-CR clock mode. The device can switch between these modes
according to the settings in the system clock control register (SYCC).
Figure 3.4-1 Clock Mode State Transition Diagram
Power on
MB95630H Series
(4)
Sub-CR clock
oscillation
stabilization
wait time
Reset state
<1>
Main CR clock
oscillation stabilization
wait time
+
sub-CR clock
oscillation stabilization
wait time
Main CR clock mode
Main CR clock mode
(or main CR PLL
clock mode)
(2)
(1)
(or main CR PLL clock)
oscillation stabilization
(3)
Main CR clock
A reset occurs in any other state.
Main CR PLL clock
(or main CR clock)
oscillation stabilization
wait time
(5)
(6)
Main clock
oscillation
stabilization
wait time
(7)
(10)
(8)
(9)
Subclock
oscillation
stabilization
wait time
Main clock mode
(12)
(11)
Main clock
oscillation
stabilization
wait time
Sub-CR clock mode
(14)
(13)
(16)
(15)
Sub-CR clock
oscillation
stabilization
wait time
Subclock
oscillation
stabilization
wait time
(19)
(20)
Subclock mode
(18)
(17)
38FUJITSU SEMICONDUCTOR LIMITEDMN702-00009-2v0-E
Page 61
MB95630H Series
Table 3.4-1Clock Mode State Transition Table (1 / 2)
CHAPTER 3 CLOCK CONTROLLER
3.4 Clock Modes
Current
State
<1> Reset stateMain CR clock
(1)
(2)
(3)
Main CR clock/
Main CR PLL
clock
(4)
(5)
(6)
(7)
Main clock
(8)
(9)
(10)
(11)
(12)
Next StateDescription
Sub-CR clock
Subclock
Main clock
Main CR clock/
Main CR PLL
clock
Sub-CR clock
Subclock
After a reset, the device w aits for the main CR clock oscillation stabilizati on wait time
and the sub-CR clock oscillation stabilization wait time to elapse and transits to main
CR clock mode. Even if that reset is a watchdog reset, software reset or external reset
caused in any clock mode, the device waits for the sub-CR clock oscillation
stabilization wait time and the main CR clock oscillation stabilization wait time to
elapse.
The device transits to sub-CR clock mode when the clock mode select bits in the
system clock control register (SYCC:SCS[2:0]) are set to "0b100".
However, when the sub-CR has been stopped according to the setting of the sub-CR
clock oscillation enable bit in the system clock control register 2 (SYCC2:SCRE), the
device waits for the sub-CR clock oscillation stabilization wait time to elapse before
transiting to sub-CR clock mode. In other words, when the sub-CR clock oscillation is
enabled in advance, and the sub-CR clock oscillation stabilization bit in the system
clock control register 2 (SYCC2:SCRDY) is "1", the device transits to sub-CR clock
mode immediately after the clock mode select bits (SYCC:SCS[2:0]) are set to
"0b100".
When the clock mode select bits in the system clock control register (SYCC:SCS[2:0])
are set to "0b000", the device transits to subclock mode after waiting for the subclock
oscillation stabilization wait time.
When the subclock oscillation is enabled by the setting of the subclock oscillation
enable bit in the system clock control register 2 (SYCC2:SOSCE), and the subclock
oscillation stabilization bit in the system clock control register 2 (SYCC2:SRDY) is
"1", the device transits to subclock mode immediately after the clock mode select bits
(SYCC:SCS[2:0]) are set to "0b000".
When the clock mode select bits in the system clock control register (SYCC:SCS[2:0])
are set to "0b010", the device transits to main clock mode after waiting for the main
clock oscillation stabilization wait time.
When the main clock oscillation is enabled by the setting of the main clock oscillation
enable bit in the system clock control reg ister 2 (SYCC2:MOSCE), a nd the main clock
oscillation stabilization bit in the system clock control register 2 (SYCC2:MRDY) is
"1", the device transits to main clock mode immediately after the clock mode select
bits (SYCC:SCS[2:0]) are set to "0b010".
When the clock mode select bits in the system clock control register (SYCC:SCS[2:0])
are set to "0b110", the device transits to main CR clock mode after waiting for the
main CR clock oscillation stabilization wait time . When t he main CR c lock osc illa tion
is enabled by the setting of the main CR clock oscillation enable bit in the system
clock control register 2 (SYCC2:MCRE), and the main CR clock oscillation
stabilization bit in the system clock control register 2 (SYCC2:MCRDY) is "1", the
device transits to main CR clock mode immediately after the clock mode select bits
(SYCC:SCS[2:0]) are set to "0b110".
When the clock mode select bits in the system clock control register (SYCC:SCS[2:0])
are set to "0b111", the device transits to main CR PLL clock mode after waiting for the
main CR PLL clock oscillation stabilization wait time. When the main CR PLL clock
oscillation is enabled by the setting of the main CR PLL clock enable bit in the PLL
control register (PLLC:MPEN), and the
bit in the PLL control register (PLLC:MPRDY) is "1", the device transits to main CR
PLL clock mode immediately after the clock mode select bits (SYCC:SCS[2:0]) are
set to "0b111".
Same as (1) and (2)
Same as (3) and (4)
main CR PLL clock oscillation stabilization
MN702-00009-2v0-EFUJITSU SEMICONDUCTOR LIMITED39
Page 62
CHAPTER 3 CLOCK CONTROLLER
3.4 Clock Modes
Table 3.4-1Clock Mode State Transition Table (2 / 2)
MB95630H Series
Current
State
(13)
Sub-CR clock
(14)Main clock
(15)
(16)
(17)
Subclock
(18)Main clockSame as (14)
(19)
(20)
Next StateDescription
When the clock mode select bits in the system clock control register (SYCC:SCS[2:0])
Main CR clock/
Main CR PLL
clock
SubclockSame as (3) and (4)
Main CR clock/
Main CR PLL
clock
Sub-CR clock Same as (1) and (2)
are set to "0b110", the device transits to main CR clock mode after waiting for the
main CR clock oscillation stabilization wait time.
When the clock mode select bits in the system clock control register (SYCC:SCS[2:0])
are set to "0b111", the device transits to main CR PLL clock mode after waiting for the
main CR PLL clock oscillation stabilization wait time.
When the clock mode select bits in the system clock control register (SYCC:SCS[2:0])
are set to "0b010", the device transits to main clock mode after waiting for the main
clock oscillation stabilization wait time.
Same as (13)
40FUJITSU SEMICONDUCTOR LIMITEDMN702-00009-2v0-E
Page 63
CHAPTER 3 CLOCK CONTROLLER
MB95630H Series
3.5 Operations in Low Power Consumption
Mode (Standby Mode)
3.5Operations in Low Power Consumption Mode
(Standby Mode)
There are four standby modes: sleep mode, stop mode, time-base timer mode
and watch mode.
■ Overview of Transiting to and Returning from Standby Mode
There are four standby modes: sleep mode, stop mode, time-base timer mode, and watch mode.
The device transits to standby mode according to the settings in the standby control register
(STBC).
The device is released from standby mode by an interrupt or a reset. Before transiting to
normal operation, the device may wait for the oscillation stabilization wait time to elapse if
necessary.
When the clock mode returns from standby mode due to a reset, the device returns to main CR
clock mode. When the clock mode returns from standby mode due to an interrupt, the device
returns to the previous clock mode before transiting to standby mode.
■ Pin States in Standby Mode
The pin state setting bit (STBC:SPL) of the standby control register can be used to keep the
preceding state of an I/O port or a peripheral function pin before its transition to stop mode,
time-base timer mode or watch mode, and to set an I/O port or a peripheral functi on pin t o high
impedance in stop mode, time-base timer mode or watch mode.
Refer to the device data sheet for the states of all pins in standby mode.
MN702-00009-2v0-EFUJITSU SEMICONDUCTOR LIMITED41
Page 64
CHAPTER 3 CLOCK CONTROLLER
3.5 Operations in Low Power Consumption
Mode (Standby Mode)
MB95630H Series
3.5.1Notes on Using Standby Mode
Even if the standby control register (STBC) sets standby mode, transition to
standby mode does not occur when an interrupt request has been generated
from a peripheral function. When the device returns from standby mode to the
normal operating state in response to an interrupt, the operation that follows
varies depending on whether the interrupt request is accepted or not.
■ Insert at least three NOP instructions immediately after a standby mode
setting instruction.
The device requires four machine clock cycles before entering standby mode after it is set in
the standby control register. During that period, the CPU executes the program. To avoid
program execution during this transition to standby mode, insert at least three NOP
instructions.
The device still runs normally even if instructions other than NOP instructions are inserted
after the instruction that sets the device to transit to standby mode. On this occasion, the
following two events may occur. Firstly, an instruction that should be executed after the
standby mode is released may be executed before the device transits to standby mode.
Secondly, the device may transit to standby mode while an instruction is bei ng executed, and
the execution of that same instruction is resumed after the device is released from standby
mode (increasing the number of instruction execution cycles).
■ Check that clock mode transition has been completed before setting the
standby mode.
Before setting the standby mode, ensure that clock-mode transition has been completed by
comparing the values of the clock mode monitor bits (SYC C:SCM[2:0]) and clock m ode select
bits (SYCC:SCS[2:0]) in the system clock control register.
■ An interrupt request may suppress the transition to standby mode.
When the standby mode is set with an interrupt request whose in terrupt level is higher than
"0b11" having been issued, the device ignores the value written to the standby control register
and continues executing instructions without transiting to the standby mode set . Even after the
interrupt of that interrupt request is processed, the device does not transit to t he standby mode
set.
The same operations are executed when interrupts are disabled by the interrupt enable flag
(CCR:I) and the interrupt level bits (CCR:IL[1:0]) of the condition code register of the CPU.
■ The standby mode is also released when the CPU rejects interrupts.
When an interrupt request whose interrupt level is higher than "0b11" is issued in standby
mode, the device is released from standby mode, regardless of the settings of the interrupt
enable flag (CCR:I) and the interrupt level bits (CCR:IL[1:0]) of the condition code register
(CCR) of the CPU.
After being released from standby mode, the device processes interrupts if interrupts are to be
accepted according to the settings of the condition code register (CCR) of the CPU. If
interrupts are not to be accepted according to the settings of CCR, the device resumes
instruction execution from the instruction followi ng the one executed before the device transits
to standby mode.
42FUJITSU SEMICONDUCTOR LIMITEDMN702-00009-2v0-E
Page 65
CHAPTER 3 CLOCK CONTROLLER
MB95630H Series
3.5 Operations in Low Power Consumption
Mode (Standby Mode)
■ In every standby mode, the following two operating modes can be selected.
1. Deep standby mode (STBC2:DSTBYX = 0)
In standby mode, the power consumption in deep standby mode is lower than that in normal
standby mode. However, since the device has to wait for the Flash recov ery wait time to
elapse before being woken up from deep standby mode by a reset or an interru pt source, it
takes more time to wake up the device from deep standby mode than from normal stand by
mode.
2. Normal standby mode (STBC2:DSTBYX = 1)
In standby mode, the power consumption in normal standby mode is higher than that in
deep standby mode. However, since the device does not have to wait for the Flash recovery
wait time to elapse before being woken up from normal standby mode by a reset or an
interrupt source, it takes lesser time to wake up the device from deep standby mode than
from normal standby mode.
For details of the Flash recovery wait time, see Table 3.5-2. For the difference between deep
standby mode and normal standby mode in power consumption, refer to "■ ELECTRICAL
CHARACTERISTICS" in the device data sheet.
MN702-00009-2v0-EFUJITSU SEMICONDUCTOR LIMITED43
Page 66
CHAPTER 3 CLOCK CONTROLLER
Power on
Reset state
Normal
(RUN) state
Watch mode
Main clock/main CR clock/
main CR PLL clock/
subclock/
sub-CR clock oscillation
stabilization wait time
Time-base
timer mode
Stop mode
Sleep mode
(1)
(2)
(3)
(5)
(6)
A reset occurs in any state.
<1>
(4)
(8)
(7)
Main CR clock
oscillation stabilization
wait time
+
sub-CR clock
oscillation stabilization
wait time
3.5 Operations in Low Power Consumption
Mode (Standby Mode)
MB95630H Series
■ Standby Mode State Transition Diagram (with Deep Standby Mode Disabled)
Figure 3.5-1 shows a standby mode state transition diagram (with deep standby mode
disabled).
Figure 3.5-1 Standby Mode State Transition Diagram (with Deep Standby Mode Disabled)
Table 3.5-1T able of State Transition with Deep Standby Mode Disabled (Transition to and
from Standby Mode) (1 / 2)
State transitionDescription
After a reset, the device transits to main CR clock mode.
Normal operation after reset
<1>
state
(1)
Sleep mode
(2)
(3)
Stop mode
(4)
(5)
Time-base timer mode
(6)
44FUJITSU SEMICONDUCTOR LIMITEDMN702-00009-2v0-E
If the reset that has occurred is a power-on reset, a watchdog reset, a software reset,
or an external reset, the device always waits for the main CR clock oscillation
stabilization wait time and the sub-CR clock oscillation stabilization wait time to
elapse.
The device transits to sleep mode when "1" is written to the sleep bit in the standby
control register (STBC:SLP).
The device returns to the RUN state in response to an interrupt from a peripheral
function.
The device transits to stop mode when "1" is written to the stop bit in the standby
control register (STBC:STP).
In response to an external interrupt, after waiting for the elapse of the oscillation
stabilization wait time required according to the current clock mode, the device
returns to the RUN state.
The device transits to time-base timer mode when "1" is written to the watch bit in
the standby control register (STBC:TMD) in main clock mode, main CR clock mode,
or main CR PLL clock mode.
The device returns to the RUN state in response to an interrupt from a peripheral
function.
Page 67
CHAPTER 3 CLOCK CONTROLLER
MB95630H Series
3.5 Operations in Low Power Consumption
Mode (Standby Mode)
Table 3.5-1Table of State Transition with Deep Standby Mode Disabled (Transition to and
from Standby Mode) (2 / 2)
State transitionDescription
(7)
Watch mode
(8)
The device transits to watch mode when "1" is written to the watch bit in the standby
control register (STBC:TMD) in subclock mode or sub-CR clock mode.
The device returns to the RUN state in response to an interrupt from a peripheral
function.
MN702-00009-2v0-EFUJITSU SEMICONDUCTOR LIMITED45
Page 68
CHAPTER 3 CLOCK CONTROLLER
Power on
Reset state
Normal
(RUN) state
Watch mode
Main clock/main CR clock/main CR PLL clock/
subclock/sub-CR clock
oscillation stabilization wait time
Sleep mode (Flash recovery wait time*)
Sleep mode (Flash recovery wait time*)
Time-base
timer mode
Stop mode
Sleep mode
(1)
(2)
(3)
(5)
(6)
A reset occurs in any state.
<1>
(4)
(8)
(7)
Main CR clock
oscillation stabilization
wait time
+
sub-CR clock
oscillation stabilization
wait time
Sleep mode (Flash recovery wait time*)
Sleep mode (Flash recovery wait time*)
3.5 Operations in Low Power Consumption
Mode (Standby Mode)
MB95630H Series
■ Standby Mode State Transition Diagram (with Deep Standby Mode Enabled)
Figure 3.5-2 shows a standby mode state transition diagram (with deep standby mode enabled).
Figure 3.5-2 Standby Mode State Transition Diagram (with Deep Standby Mode Enabled)
3.5 Operations in Low Power Consumption
Mode (Standby Mode)
Table 3.5-2Table of State Transition with Deep Standby Mode Enabled (Transition to and from
Standby Mode)
State transitionDescription
After a reset, the device transits to main CR clock mode.
Normal operation after reset
<1>
state
(1)
Sleep mode
(2)
(3)
Stop mode
(4)
(5)
Time-base timer mode
(6)
(7)
Watch mode
(8)
If the reset that has occurred is a power-on reset, a watchdog reset, a software reset,
or an external reset, the device always wait for the main CR clock oscillation
stabilization wait time and the sub-CR clock oscillation stabilization wait time to
elapse.
The device transits to sleep mode when "1" is written to the sleep bit in the standby
control register (STBC:SLP).
In response to an interrupt from a peripheral function, after the Flash recovery wait
time elapses, the device returns to the RUN state.
During the Flash recovery wait time, the device transits to sleep mode. (The CPU
stops its operation; the peripheral function resumes its operation.)
However, if a program is being executed on the RAM, no Flash recovery wait time
occurs.
The device transits to stop mode when "1" is written to the stop bit in the standby
control register (STBC:STP).
In response to an external interrupt, after the oscillation stabilization wait time
required according to the current clock mode and the Fla sh reco v e ry wait time elapse,
the device returns to the RUN state.
When the oscillation stabilization wait time is shorter than the Flash recovery wait
time, after the oscillation stabilization wait time elapses, the device transits to sleep
mode and remains in sleep mode until the Flash recovery wait time elapses.
When the oscillation stabilization wait time is longer than the Flash recovery wait
time, after the oscillation stabilization wait time elapses, the device returns to the
RUN state.
However, if a program is being executed on the RAM, no Flash recovery wait time
occurs.
The device transits to time-base timer mode when "1" is written to the watch bit in
the standby control register (STBC:TMD) in main clock mode or main CR clock
mode.
In response to an interrupt from a peripheral function, after the Flash recovery wait
time elapses, the device returns to the RUN state.
During the Flash recovery wait time, the device transits to sleep mode. (The CPU
stops its operation; the peripheral function resumes its operation.)
However, if a program is being executed on the RAM, no Flash recovery wait time
occurs.
The device transits to watch mode when "1" is written to the watch bit in the standby
control register (STBC:TMD) in subclock mode or sub-CR clock mode.
In response to an interrupt from a peripheral function, after the Flash recovery wait
time elapses, the device returns to the RUN state.
During the Flash recovery wait time, the device transits to sleep mode. (The CPU
stops its operation; the peripheral function resumes its operation.)
However, if a program is being executed on the RAM, no Flash recovery wait time
occurs.
MN702-00009-2v0-EFUJITSU SEMICONDUCTOR LIMITED47
Page 70
CHAPTER 3 CLOCK CONTROLLER
3.5 Operations in Low Power Consumption
Mode (Standby Mode)
MB95630H Series
3.5.2Sleep Mode
In sleep mode, the operations of the CPU and watchdog timer are stopped.
■ Operations in Sleep Mode
In sleep mode, the CPU and the operating clock for the watchdog timer are stopped. The CPU
retains the contents of registers and RAM existing at the point immediately before the device
transits to sleep mode and stops; however, all peripheral functions except the watchdog timer
continue their operations.
In the case of hardware watchdog timer, if it is enabled in standby mode b y the non-volatile
register function, in sleep mode, the sub-CR clock does not stop and the hardware watchdog
timer continues its operation. For details, see "CHAPTER 27 NO N-VOLATILE REGISTER
(NVR) INTERFACE".
● Transition to sleep mode
Writing "1" to the sleep bit in the standby contro l register (STBC:SLP) causes the device to
enter sleep mode.
● Release from sleep mode
A reset or an interrupt from a peripheral function releases the device from sleep mode.
With the deep standby mode control bit (STBC2 :DSTBYX) set to "0", even after a reset occurs
or an interrupt is generated by a peripheral function, the device conti nues operating in sleep
mode until the Flash recovery wait time elapses.
However, if a program is being executed on the RAM, no Flash recovery wait time occurs.
48FUJITSU SEMICONDUCTOR LIMITEDMN702-00009-2v0-E
Page 71
CHAPTER 3 CLOCK CONTROLLER
MB95630H Series
3.5 Operations in Low Power Consumption
Mode (Standby Mode)
3.5.3Stop Mode
In stop mode, the main clock, the main CR clock, the main CR PLL clock and
the subclock are stopped.
■ Operations in Stop Mode
In stop mode, the main clock, the main CR clock, the main CR PLL clock and the su bclock are
stopped. In this mode, while retaining the contents of registers and RAM existing at the point
immediately before the device transits to stop mode, the device stops all functions except
external interrupt and low-voltage detection reset.
As for hardware watchdog timer, if it is enabled in standby mode by the non-volatile register
function, in stop mode, the sub-CR clock does not stop and the hardware watchdog timer
continues its operation. For details, see "CHAPTER 27 NON-VOLATILE REGISTER (NVR)
INTERFACE".
● Transition to stop mode
Writing "1" to the stop bit in the standby control register (STBC:STP) causes the device to
transit to stop mode. At that point, if the pin state setting bit in the standby control register
(STBC:SPL) is "0", the states of the external pins are kept; if the SPL bit is "1", the states of
the external pins become high impedance (a pin is pulled up if the pull-up resistor co nnection
for that pin is selected in the pull-up register).
● Release from stop mode
The device is released from stop mode by a reset or an external interrupt. In any clock mode, if
the hardware watchdog timer is enabled in standby mode by the non-volatile reg ister function,
the sub-CR clock does not stop, and the watchdog ti mer and the watch prescaler operate in stop
mode. The device can also be released from stop mode by an interrupt from the watch
prescaler. For details, see "CHAPTER 27 NON-VOLATILE REGISTER (NVR)
INTERFACE".
With the deep standby mode control bit (STBC2:DSTBYX) set to "0", after a reset occurs or an
interrupt is generated by a peripheral function, the device executes different operations,
depending on the relation between the oscillation stabilization wait time and the F lash recovery
wait time as explained below.
•When the oscillation stabilization wait time is shorter than the Flash recovery wait time
After the oscillation stabilization wait time elapses, the device transits to sleep mode and
remains in sleep mode until the Flash recovery wait time elapses.
•When the oscillation stabilization wait time is longer than the Flash recovery wait time
After the oscillation stabilization wait time elapses, the device returns to the RUN state.
However, if a program is being executed on the RAM, no Flash recovery wait time occurs.
MN702-00009-2v0-EFUJITSU SEMICONDUCTOR LIMITED49
Page 72
CHAPTER 3 CLOCK CONTROLLER
3.5 Operations in Low Power Consumption
Mode (Standby Mode)
Note:
If the device is released from stop mode by an interrupt, a peripheral function having
transited to stop mode during operation resumes operating from the point at which it
transited to stop mode. Therefore, some settings of that peripheral function, such as the
initial interval time of the interval timer, become undefined. Initialize that peripheral
function if necessary after releasin g the device from stop mode.
MB95630H Series
50FUJITSU SEMICONDUCTOR LIMITEDMN702-00009-2v0-E
Page 73
CHAPTER 3 CLOCK CONTROLLER
MB95630H Series
3.5 Operations in Low Power Consumption
Mode (Standby Mode)
3.5.4Time-base Timer Mode
In time-base timer mode, only the main clock oscillator, the subclock oscillator,
the time-base timer, and the watch prescaler operate. The CPU and the
operating clock for peripheral functions are stopped in this mode.
■ Operations in Time-base Timer Mode
The time-base timer mode is a mode in which main clock supply is stopped except th e clock
supply to the time-base timer. In this mode, while retaining the contents of registers and RAM
existing at the point immediately before the device transits to time-base timer mode, the device
stops all functions except the time-base timer, external interrupt and low-voltage detection
reset.
Subclock oscillation and sub-CR clock oscillation can be enabled or disabled by the subclock
oscillation enable bit and the sub-CR clock oscillation enable bit in the system clock control
register 2 (SYCC2:SOSCE, SCRE) respectively. If the subclock oscillates, the watch prescaler
continues its operation.
In the case of hardware watchdog timer, if it is enabled in standby mode by t he non-volatile
register function, in time-base timer mode, the sub-CR clock does not stop and the hard ware
watchdog timer continues its operation. For details, see "CHAPTER 27 NON-VOLATILE
REGISTER (NVR) INTERFACE".
● Transition to time-base timer mode
If the clock mode monitor bits in the system clock control register (SYCC:SCM[2:0]) are
"0b010", "0b110", or "0b111", writing "1" to the watch bit in the standby control register
(STBC:TMD) causes the device to transit to time-base timer mode.
The device can transit to time-base timer mode only when the clock mode is main clock mode,
main CR clock mode or main CR PLL clock mode.
After the device transits to time-base timer mode, if the pin state setting bit in the standby
control register (STBC:SPL) is "0", the states of the external pins are kept; if the SPL bit is "1",
the states of the external pins become high impedance (a pin is pulled up i f the pull-up resistor
connection for that pin is selected in the pull-up register).
● Release from time-base timer mode
The device is released from time-base timer mode by a reset, a time-base timer interrupt, or an
external interrupt.
Subclock oscillation and sub-CR clock oscillation can be enabled or disabled by setting the
subclock oscillation enable bit (SOSCE) and the sub-CR clock oscillation enable bit (SCRE) in
the system clock control register 2 (SYCC2). When the subclock oscillates, the device can be
released from time-base timer mode by an interrupt from the watch prescaler.
With the deep standby mode control bit (STBC2 :DSTBYX) set to "0", even after a reset occurs
or an interrupt is generated by a peripheral function, the device conti nues operating in sleep
mode until the Flash recovery wait time elapses.
However, if a program is being executed on the RAM, no Flash recovery wait time occurs.
MN702-00009-2v0-EFUJITSU SEMICONDUCTOR LIMITED51
Page 74
CHAPTER 3 CLOCK CONTROLLER
3.5 Operations in Low Power Consumption
Mode (Standby Mode)
Note:
If the device is released from time-base timer mode by an interrupt, a peripheral function
having transited to time-base timer mode during operation resumes operating from the
point at which it transited to time-base timer mode. Therefore, some settings of that
peripheral function, such as the initial interval time of the interval timer, become
undefined. Initialize that periph eral function if necessary after releasing the device from
time-base timer mode.
MB95630H Series
52FUJITSU SEMICONDUCTOR LIMITEDMN702-00009-2v0-E
Page 75
CHAPTER 3 CLOCK CONTROLLER
MB95630H Series
3.5 Operations in Low Power Consumption
Mode (Standby Mode)
3.5.5Watch Mode
In watch mode, only the subclock, the sub-CR clock and the watch prescaler
operate. The CPU and the operating clock for peripheral functions are stopped
in this mode.
■ Operations in Watch Mode
In watch mode, while retaining the contents of registers and RAM existing at the point
immediately before the device transits to watch mode, the device stops all functions except the
watch prescaler, external interrupt and low-voltage detection reset.
In the case of hardware watchdog timer, if it is enabled in standby mode by t he non-volatile
register function, in watch mode, the sub-CR cloc k does not stop and the hardware watchdog
timer continues its operation. For details, see "CHAPTER 27 NO N-VOLATILE REGISTER
(NVR) INTERFACE".
● Transition to watch mode
Note:
If the clock mode monitor bits in the system clock control register (SYCC:SCM[2:0]) are
"0b000" or "0b100", writing "1" to the watch bit in the st andby control register (STBC:TMD)
causes the device to transit to watch mode.
The device can transit to watch mode only when the clock mode is subclock mode or sub-CR
clock mode.
After the device transits to watch mode, if the pin state setting bit in the standby control
register (STBC:SPL) is "0", the states of the external pins are kept; if the SPL bit is "1", the
states of the external pins become high impedance (a pin is pulled up if the pull-up resistor
connection for that pin is selected in the pull-up register).
● Release from watch mode
The device is released from watch mode by a reset, a watch interrupt, or an external interrupt.
With the deep standby mode control bit (STBC2 :DSTBYX) set to "0", even after a reset occurs
or an interrupt is generated by a peripheral function, the device continues operat ing sleep m ode
until the Flash recovery wait time elapses.
However, if a program is being executed on the RAM, no Flash recovery wait time occurs.
If the device is released from watch mode by an interrupt, a peripheral function having
transited to watch mode during operation resumes operating from the point at which it
transited to watch mode. Th erefore, some setting s of that peripheral function, such as the
initial interval time of the interval timer, become undefined. Initialize that peripheral
function if necessary after releasing the device from watch mode.
MN702-00009-2v0-EFUJITSU SEMICONDUCTOR LIMITED53
Page 76
CHAPTER 3 CLOCK CONTROLLER
CCCC
X0X1X0AX1A
Main clock
oscillator circuit
Subclock
oscillator circuit
Connecting to two external clocks
OpenOpen
X0X1X0AX1A
Main clock
oscillator circuit
Subclock
oscillator circuit
X1 open
Open
X0X1X0AX1A
Main clock
oscillator circuit
Subclock
oscillator circuit
Inverted X0 input to X1
3.6 Clock Oscillator Circuit
MB95630H Series
3.6Clock Oscillator Circuit
The clock oscillator circuit generates an internal clock with an oscillator
connected to the clock oscillation pin or by inputting a clock signal to the clock
oscillation pin.
■ Clock Oscillator Circuit
● Using crystal oscillators and ceramic oscillators
Connect crystal oscillators or ceramic oscillators as shown in Figure 3.6-1.
Figure 3.6-1 Sample Connection of Crystal Oscillators and Ceramic Oscillators
● Using external clock
As shown in Figure 3.6-2, connect the external clock to the X0 pin while leaving the X1 pin
unconnected or supplying inverted clock of the X0 pin to the X1 pin (refer to the device data
sheet). To supply clock signals to the subclock from an external clock, connect that external
clock to the X0A pin while leaving the X1A pin unconnected.
Figure 3.6-2 Sample Connection of External Clocks
54FUJITSU SEMICONDUCTOR LIMITEDMN702-00009-2v0-E
Page 77
CHAPTER 3 CLOCK CONTROLLER
MB95630H Series
3.7 Overview of Prescaler
3.7Overview of Prescaler
The prescaler generates the count clock source to be supplied to various
peripheral functions from the machine clock (MCLK) and the count clock
output from the time-base timer.
■ Prescaler
The prescaler generates the count clock source to be supplied to various periph eral functions
from the machine clock (MCLK) with which the CPU operates and from the count clock
/27, FCH/28, F
(F
CH
timer. The count clock source is a clock whose frequency is divided by the prescaler or a
buffered clock. The peripheral functions listed below use the clock whose frequ ency is divided
by the prescaler as the count clock source.
The prescaler has no control register and always operates with the machine clock (MCLK) and
the count clock (F
base timer.
/26, F
CRH
/27, FCH/28, F
CH
CRH
/27, F
CRH
MCRPLL
/26, F
CRH
/26, or F
/27, F
MCRPLL
MCRPLL
/27) output from the time-base
/26, or F
MCRPLL
/27) of the time-
•8/16-bit composite timer
•8/10-bit A/D converter
•8/16-bit PPG
•16-bit PPG timer
•16-bit reload timer
•UART/SIO dedicated baud rate generator
MN702-00009-2v0-EFUJITSU SEMICONDUCTOR LIMITED55
Page 78
CHAPTER 3 CLOCK CONTROLLER
3.8 Configuration of Prescaler
3.8Configuration of Prescaler
Figure 3.8-1 is the block diagram of the prescaler.
■ Block Diagram of Prescaler
Figure 3.8-1 Block Diagram of Prescaler
Prescaler
Counter value
From
time-base
timer
CH/2
F
FCH/2
MCLK (machine clock)
7
FCRH/2
or
8
FCRH/2
FMCRPLL/2
FMCRPLL/2
6
7
6
or
7
5-bit
counter
Output
control circuit
MB95630H Series
MCLK/2
MCLK/4
MCLK/8
MCLK/16
MCLK/32
FCH/27, FCRH/26 or FMCRPLL/2
FCH/28, FCRH/27 or FMCRPLL/2
Count
clock
source
to
different
peripheral
functions
6
7
MCLK
F
FCRH
FMCRPLL
•5-bit counter
•Output control circuit
■ Input Clock
The prescaler uses the machine clock, or the output clock of the time-base timer as the input
clock.
■ Output Clock
The prescaler supplies clocks to the following peripheral functions:
•8/16-bit composite timer
•8/10-bit A/D converter
•8/16-bit PPG
•16-bit PPG timer
•16-bit reload timer
•UART/SIO dedicated baud rate generator
: Machine clock (internal operating frequency)
: Main clock frequency
CH
: Main CR clock frequency
: Main CR PLL clock frequency
This counter counts the machine clock (MCLK) and outputs the count value to the output
control circuit.
Based on the 5-bit counter value, this circuit supplies clocks generated by dividing the
machine clock (MCLK) by 2, 4, 8, 16, or 32 to individual peripheral functions. The circuit
also buffers the clock from the time-base timer (F
F
MCRPLL
/26, or F
MCRPLL
/27) and supplies it to peripheral functions.
/27, FCH/28, F
CH
CRH
/26, F
CRH
/27,
56FUJITSU SEMICONDUCTOR LIMITEDMN702-00009-2v0-E
Page 79
CHAPTER 3 CLOCK CONTROLLER
MB95630H Series
3.9 Operation of Prescaler
3.9Operation of Prescaler
The prescaler generates count clock sources to different peripheral functions.
■ Operation of Prescaler
The prescaler generates count clock sources from a clock whose frequency is generated by
dividing the machine clock(MCLK),or from buffered signals from the time-base timer(F
F
CH
/28, F
CRH
/26, F
CRH
/27, F
MCRPLL
/26, or F
MCRPLL
/27), and then supplies them to different
peripheral functions. The prescaler keeps operating while the machine clock and the clocks
from the time-base timer are being supplied.
Table 3.9-1, Table 3.9-2 and Table 3.9-3 list the count clock sources generated by the
prescaler.
CH
/27,
Table 3.9-1Count Clock Sources Generated by Prescaler (F
This section provides notes on using the prescaler.
The prescaler operates with the machine clock and the clock generated from the time-base
timer, and keeps operating while those clocks are being supplied. Therefore, in the operation
immediately after a peripheral function is started, an error of up to one cycle of the clock
source captured by that peripheral function will occur, depending on the output v alue of the
prescaler.
Figure 3.10-1 Clock Capture Error Occurring Immediatel y after a Peripheral Function Starts
Prescaler output
Start of peripheral function
Clock captured by
peripheral function
Clock capture error
immediately after
a peripheral function starts
The prescaler count value affects the following peripheral functions:
•8/16-bit composite timer
•8/10-bit A/D converter
•8/16-bit PPG
•16-bit PPG timer
•16-bit reload timer
•UART/SIO dedicated baud rate generator
MN702-00009-2v0-EFUJITSU SEMICONDUCTOR LIMITED59
Page 82
CHAPTER 3 CLOCK CONTROLLER
3.10 Notes on Using Prescaler
MB95630H Series
60FUJITSU SEMICONDUCTOR LIMITEDMN702-00009-2v0-E
Page 83
CHAPTER 4
RESET
This section describes the reset operation.
4.1Reset Operation
4.2Register
4.3Notes on Using Reset
MN702-00009-2v0-EFUJITSU SEMICONDUCTOR LIMITED61
Page 84
CHAPTER 4 RESET
4.1 Reset Operation
MB95630H Series
4.1Reset Operation
When a reset source occurs, the CPU immediately stops the process being
executed and enters the reset release wait state. When the reset is released,
the CPU reads mode data and the reset vector from the Flash memory (mode
fetch). When the power is switched on or when the device is released from a
reset in subclock mode, sub-CR clock mode, or stop mode, the CPU performs
mode fetch after the oscillation stabilization wait time has elapsed.
■ Reset Sources
There are five reset sources for the reset.
Table 4.1-1 Reset Sources
Reset sourceReset condition
External reset"L" level is input to the external reset pin.
Software reset
Watchdog resetThe watchdog timer overflows.
Power-on resetThe power is switched on.
Low-voltage detection reset (optional)The supply voltage falls below the detection voltage.
"1" is written to the software reset bit in the standby control register
(STBC:SRST).
● External reset
An external reset is generated if "L" level is input to the external reset pin (RST
An external input reset signal is received asynchronously with the operating clock of the
microcontroller via the internal noise filter and then generates an internal reset signal that is
synchronized with the machine clock to initialize the internal circu it. Therefore, the operating
clock of the microcontroller is necessary for initializing the internal circuit. In order to operate
with the external clock, external clock signals must be input. However, the external pins
(including I/O ports and peripheral functions) are reset asynchronously. In addit ion, there is a
standard value of the pulse width for external reset input. If the value is below the standard
value, a reset signal may not be accepted.
The standard value is shown in the device data sheet. Design an external reset circuit that
satisfies the standard value.
● Software reset
Writing "1" to the software reset bit of the standby control register (STBC:SRST) generates a
software reset.
● Watchdog reset
After the watchdog timer starts, a watchdog reset is generated if the watchdog timer is not
cleared within a predetermined period of time.
).
● Power-on reset
A power-on reset is generated when the power is switched on.
62FUJITSU SEMICONDUCTOR LIMITEDMN702-00009-2v0-E
Page 85
MB95630H Series
● Low-voltage detection reset (optional)
The circuit is only available on certain products. Check the availability of the circuit in the
device data sheet.
The low-voltage detection reset circuit generates a reset if the power supply v oltage f alls below
a predetermined level.
The logical function of the low-voltage detection reset is equivalent to that of the power-on
reset. All information relating to the power-on reset of this hardware manual also applies to the
low-voltage detection reset.
However, the LVD reset voltage selection ID register (LVDR) of the low-voltage detection
reset circuit is not reset by the low-voltage detection reset.
For details of the low-voltage detection reset, see "CHAPTER 16 LOW-VOLTAGE
DETECTION RESET CIRCUIT".
■ Reset Time
The reset time varies according to the reset source.
•In the case of software reset, watchdog reset and external reset:
The reset time is affected by the number of machine cycles selected before a reset, the
RAM access protection function inhibiting resets during the RAM access, and the sub-CR
clock oscillation stabilization wait time. The effective time of the RAM access protection
function lengthens according to the number of machine clock cycles selected before a reset.
When a reset occurs with the sub-CR clock oscillation stabilization bit in the system clock
control register 2 (SYCC2:SCRDY) set to "1", the device is released from the reset state
after the main CR clock oscillation stabilization wait time elapses.
When a reset occurs with the sub-CR clock oscillation stabilization bit in the system clock
control register 2 (SYCC2:SCRDY) set to "0", the device is released from the reset state
after both sub-CR clock oscillation stabilization wait time and main CR clock oscillation
stabilization wait time elapse.
•In the case of power-on reset and low-voltage detection reset:
The device is released from the reset state after both sub-CR clock oscillation stabilization
wait time and main CR clock oscillation stabilization wait time elapse.
■ Reset Output
When the reset input function is effective and the reset output function is effective, th e RST pin
outputs "L" level while resetting it. However, the function to output "L" level is not provided
for external reset in the reset pin.
For details of the reset input function and the reset o utput function setting, see "CHAPTER 29
SYSTEM CONFIGURATION CONTROLLER".
CHAPTER 4 RESET
4.1 Reset Operation
MN702-00009-2v0-EFUJITSU SEMICONDUCTOR LIMITED63
Page 86
CHAPTER 4 RESET
4.1 Reset Operation
■ Overview of Reset Operation
Figure 4.1-1 Reset Operation Flow
Software reset
Watchdog reset
Suppress resets
During reset
YES
during RAM access
Sub-CR clock is ready?
External reset input
Supress resets
during RAM access
Sub-CR clock is ready?
YES
NO
MB95630H Series
Power-on reset/
low-voltage delection
reset
Mode fetch
Normal operation
(Run state)
NO
Sub-CR clock
oscillation stabilization
wait time reset state
Sub-CR clock
oscillation stabilization
wait time reset state
Released from
external reset?
YES
Main CR clock oscillation
stabilization wait time
Capture mode data
Capture reset vector
NO
Sub-CR clock
oscillation stabilization
wait time reset state
Capture instruction code from the
address indicated by the reset
vector and execute the instruction.
In any reset, the CPU performs mode fetch after the main CR clock oscillation stabilization
wait time elapses.
■ Effect of Reset on RAM Contents
When a reset occurs, the CPU halts the operation of the command currently being executed,
and enters the reset state. However, during RAM access execution, in order to protect the RAM
access, an internal reset signal synchronized with the machine clock is generated after an RAM
access ends. This function prevents a word-data write operation from being interrupted by a
reset while data of two bytes is being written.
64FUJITSU SEMICONDUCTOR LIMITEDMN702-00009-2v0-E
Page 87
MB95630H Series
■ Pin State During a Reset
When a reset occurs, an I/O port or a peripheral function pin remains high impedance until the
setting of that I/O port or that peripheral function pin by software is executed after the reset is
released.
Note:
Connect a pull-up resistor to a pin that becomes high impedance during a reset to prevent
the device from malfunctioning.
For details of the states of all pins during a reset, refer to the device data sheet.
CHAPTER 4 RESET
4.1 Reset Operation
MN702-00009-2v0-EFUJITSU SEMICONDUCTOR LIMITED65
Page 88
CHAPTER 4 RESET
4.2 Register
4.2Register
This section provides details of the register for reset.
Table 4.2-1List of Register for Reset
MB95630H Series
Register
abbreviation
RSRRReset source register4.2.1
Register nameReference
66FUJITSU SEMICONDUCTOR LIMITEDMN702-00009-2v0-E
Page 89
CHAPTER 4 RESET
MB95630H Series
4.2 Register
4.2.1Reset Source Register (RSRR)
The reset source register (RSRR) indicates the source of a reset generated.
■ Register Configuration
bit76543210
Field———EXTSWDTRPONRHWRSWR
Attribute———R/WR/WR/WR/WR/W
Initial value000XXXXX
■ Register Functions
[bit7:5] Undefined bits
Their read values are always "0". Writing values to these bits has no effect on operation.
[bit4] EXTS: External reset flag bit
When this bit is set to "1", that indicates an external reset has occurred.
When any other reset occurs, this bit retains the value that has existed before such reset occurs.
A read access or a write access (writing "0" or "1") to this bit sets it to "0".
bit4Details
Read accessSets this bit to "0".
Being set to "1"Indicates that the an external reset has occurred.
Write accessSets this bit to "0".
[bit3] WDTR: Watchdog reset flag bit
When this bit is set to "1", that indicates a watchdog reset has occurred.
When any other reset occurs, this bit retains the value that has existed before such reset occurs.
A read access or a write access (writing "0" or "1") to this bit sets it to "0".
bit3Details
Read accessSets this bit to "0".
Being set to "1"Indicates that the a watchdog reset has occurred.
Write accessSets this bit to "0".
[bit2] PONR: Power-on reset flag bit
When this bit is set to "1", that indicates a power- on reset or a low-voltage detection reset (optional) has
occurred.
When any other reset occurs, this bit retains the value that has existed before such reset occurs
The circuit is only available on certain products. Check the availability of the circuit in the device data sheet.
A read access or a write access (writing "0" or "1") to this bit sets it to "0".
bit2Details
Read accessSets this bit to "0".
Being set to "1"Indicates that the a power-on reset or a low-voltage detection reset (optional) has occurred.
Write accessSets this bit to "0".
MN702-00009-2v0-EFUJITSU SEMICONDUCTOR LIMITED67
Page 90
CHAPTER 4 RESET
4.2 Register
MB95630H Series
[bit1] HWR: Hardware reset flag bit
When this bit is set to "1", that indicates a hardware reset (power-on reset, low-voltage detection reset
(optional), external reset or watchdog reset) other than software reset has occurred. Therefore, when any of
bit4 to bit2 is set to "1", this bit is set to "1" as well.
When a software reset occurs, the bit retains the value that has existed before the software reset occurs.
A read access or a write access (writing "0" or "1") to this bit sets it to "0".
bit1Details
Read accessSets this bit to "0".
Being set to "1"Indica te s that the a hardware reset has occurred.
Write accessSets this bit to "0".
[bit0] SWR: Software reset flag bit
When this bit is set to "1", that indicates a software reset has occurred.
When a hardware reset occurs, the bit retains the value that has existed before the hardware reset occurs.
A read access or a write access (writing "0" or "1") to this bit or a power-on reset sets it to "0".
bit0Details
Read accessSets this bit to "0".
Being set to "1"Indicates that the a software reset has occurred.
Write accessSets this bit to "0".
Note:
Since reading the reset source register clears its contents, save the contents of this
register to the RAM before using those contents for calculation.
:Previous state kept
×:Indeterminate
EXTS: When this bit is set to "1", that indicates an external reset has occurred.
WDTR: When this bit is set to "1", that indicates a watchdog reset has occurred.
PONR: When this bit is set to "1", that indicates a power-on reset or low-vol tage detection reset (optional) has
occurred.
HWR:When this bit is set to "1", that indicates one of the following reset has occurred: an external reset, a
watchdog reset, a power-on reset or a low-voltage detection reset (optional).
SWR:Wh en this bit is set to "1", that indicates that a software reset has occurred.
MN702-00009-2v0-EFUJITSU SEMICONDUCTOR LIMITED69
Page 92
CHAPTER 4 RESET
4.3 Notes on Using Reset
4.3Notes on Using Reset
This section provides notes on using the reset.
■ Notes on Using Reset
● Initialization of registers and bits by reset source
Some registers and bits are initialized only by a certain reset source.
•The type of reset source determines which bit in the reset source register (RSRR) is to be
initialized.
•The oscillation stabilization wait time setting r egister (WATR) of the clock controller can
only be initialized by a power-on reset.
MB95630H Series
70FUJITSU SEMICONDUCTOR LIMITEDMN702-00009-2v0-E
Page 93
CHAPTER 5
INTERRUPTS
This chapter describes the interrupts.
5.1Interrupts
MN702-00009-2v0-EFUJITSU SEMICONDUCTOR LIMITED71
Page 94
CHAPTER 5 INTERRUPTS
5.1 Interrupts
5.1Interrupts
This section describes the interrupts.
■ Overview of Interrupts
The New 8FX family has 24 interrupt request inputs for respect ive peripheral functions, for
each of which an interrupt level can be set independently to each other.
When a peripheral function generates an interrupt request, the interrupt request is outp ut to the
interrupt controller. The interrupt controller checks the inte rrupt level of that interrupt request
and then notifies the CPU of the generation of the interrupt. The CPU processes that interrupt
according to the interrupt acceptance status. The device wakes up from standby mode by an
interrupt request generated in standby mode and resumes executing instructions.
■ Interrupt Requests from Peripheral Functions
When the CPU receives an interrupt request, it branches to the interrupt service routine with
the interrupt vector table address corresponding to the interrupt request as the address of the
branch destination.
The priority of each interrupt request in interrupt processing can be set to one of the four levels
by the interrupt level setting registers (ILR0 to ILR5).
While an interrupt is being processed in the i nterru pt ser vice ro uti ne, if an other i nterru pt whose
interrupt request is of the same level or below the one of the interrupt being processed is
generated, it is processed after the current interrupt service routine is completed. In addition, if
multiple interrupt requests that are set to the same i nterrupt level are made , IRQ00 is at the top
of the priority order.
MB95630H Series
For interrupt sources, refer to "■ INTERRU PT SOURCE TABLE" in the device data sheet.
72FUJITSU SEMICONDUCTOR LIMITEDMN702-00009-2v0-E
Page 95
CHAPTER 5 INTERRUPTS
MB95630H Series
5.1 Interrupts
5.1.1Interrupt Level Setting Registers (ILR0 to ILR5)
The interrupt level setting registers (ILR0 to ILR5) contain 24 pairs of 2-bit data
assigned to the interrupt requests of different peripheral functions. Each pair
of bits (interrupt level setting bits) is used to set the interrupt level of an
interrupt request.
■ Register Configuration
ILR0
bit76543210
FieldL03[1:0]L02[1:0]L01[1:0]L00[1:0]
AttributeR/WR/WR/WR/WR/WR/WR/WR/W
Initial value11111111
ILR1
bit76543210
FieldL07[1:0]L06[1:0]L05[1:0]L04[1:0]
AttributeR/WR/WR/WR/WR/WR/WR/WR/W
Initial value11111111
ILR2
bit76543210
FieldL11[1:0]L10[1:0]L09[1:0]L08[1:0]
AttributeR/WR/WR/WR/WR/WR/WR/WR/W
Initial value11111111
ILR3
bit76543210
FieldL15[1:0]L14[1:0]L13[1:0]L12[1:0]
AttributeR/WR/WR/WR/WR/WR/WR/WR/W
Initial value11111111
ILR4
bit76543210
FieldL19[1:0]L18[1:0]L17[1:0]L16[1:0]
AttributeR/WR/WR/WR/WR/WR/WR/WR/W
Initial value11111111
ILR5
bit76543210
FieldL23[1:0]L22[1:0]L21[1:0]L20[1:0]
AttributeR/WR/WR/WR/WR/WR/WR/WR/W
Initial value11111111
The interrupt level setting registers assign a pair of bits to every interrupt request. The values
of interrupt level setting bits in these registers represent the priority of an interrupt request
(interrupt level: 0 to 3) in interrupt processing.
MN702-00009-2v0-EFUJITSU SEMICONDUCTOR LIMITED73
Page 96
CHAPTER 5 INTERRUPTS
5.1 Interrupts
The interrupt level setting bits are compared with the interrupt level bits in the condition code
register (CCR:IL[1:0]).
If the interrupt level of an interrupt request is 3, the CPU ignores that interrupt request.
Table 5.1-1 shows the relationships between interrupt level setting bits and interrupt levels.
Table 5.1-1 Relationships Between Interrupt Level Setting Bits and Interrupt Levels
LXX[1:0]Interrupt levelPriority
000Highest
011
102
113Lowest (No interrupt)
XX:00 to 23 Number of an interrupt request
While the main program is being executed, the interrupt level bits in th e conditi on code regist er
(CCR:IL[1:0]) are "0b11".
MB95630H Series
74FUJITSU SEMICONDUCTOR LIMITEDMN702-00009-2v0-E
Page 97
CHAPTER 5 INTERRUPTS
Interrupt
from peripheral
resource?
Peripheral
resource interrupt request
output enabled?
Determine interrupt priority and
transfer interrupt level to CPU
Compare interrupt level
with IL bit in PS
START
Execute main program
Restore PC and PS
Initialize peripheral resources
Interrupt level higher
than IL value?
I flag = 1?
Clear interrupt request
Execute interrupt processing
RETI
Update IL in PS
PC ← interrupt vector
Save PC and PS to stack
Level comparator
Interrupt
controller
AND
Interrupt request
flag
Interrupt request
enabled
Condition code register (CCR)
Comparator
Check
CPU
RAM
Internal databus
I
IL
Release from stop mode
Release from sleep mode
Release from time-base
timer mode or watch mode
(1)
(2)
(3)
(4)
(5)
(6)
(7)
(3)
(4)
(5)
(6)
(7)
NO
NO
NO
NO
YES
YES
YES
YES
Interrupt service routine
Each peripheral resource
MB95630H Series
5.1 Interrupts
5.1.2Interrupt Processing
When an interrupt request is made by a peripheral function, the interrupt
controller notifies the CPU of the interrupt level of that interrupt request. When
the CPU is ready to accept interrupts, it halts the program it is executing and
executes an interrupt service routine.
■ Interrupt Processing
The procedure for processing an interrupt is as follows: the generation of an interrupt source in a
peripheral function, the execution of the main program, the setting of the interrupt request flag bit,
the checking of the interrupt request enable bit, the determination of the interrupt level (ILR0 to
ILR5 and CCR:IL[1:0]), the checking for interrupt requests of the same interrupt level made
simultaneously, and the checking of the interrupt enable flag (CCR:I).
Figure 5.1-1 shows the interrupt processing.
Figure 5.1-1 Interrupt Processing
MN702-00009-2v0-EFUJITSU SEMICONDUCTOR LIMITED75
Page 98
CHAPTER 5 INTERRUPTS
5.1 Interrupts
(1) All interrupt requests are disabled immediately after a reset. In the peripheral function
initialization program, initialize those peripheral function s that generate interrupts and set
their interrupt levels in their respective interrupt level setting registers (ILR0 to ILR5)
before starting operating such peripheral functions. The interrupt level can be set to 0, 1, 2,
or 3. Level 0 is given the highest priority, and level 1 the second highest . Assigning level 3
to a peripheral function disables interrupts from that peripheral function.
(2) Execute the main program (or the interrupt service routine in the case of nested interrupts).
(3) When an interrupt source is generated in a peripheral function, the interrupt request flag b it
for that peripheral function is set to "1". Provided that the interrupt request enable bit fo r
that peripheral function has been set to the value that enables interrupts, an interrupt request
of that peripheral function is output to the interrupt controller.
(4) The interrupt controller keeps monitoring interrupt requests from individual peripheral
functions and notifies the CPU of the interrupt level having priority over the others among
interrupt levels already made. If there are interrupt requests having the same interrupt level,
their positions in the priority order are also compared in the interrupt controller.
(5) If the interrupt level received has priority over (smaller interrupt level number) the level set
in the interrupt level bits in the condition code register (CCR:IL[1:0]), the CPU checks the
content of the interrupt enable flag (CCR:I), and accepts the interrupt provided that
interrupts have been enabled (CCR:I = 1).
(6) The CPU saves the contents of the program counter (PC) and the program status (PS) to the
stack, captures the start address of the interrupt service routine from the corresponding
interrupt vector table address, modifies the values of the interrupt level bit s in the condition
code register (CCR:IL[1:0]) to the values of the interrupt level received, then starts
executing the interrupt service routine.
(7) Finally, the CPU uses the RETI instruction to restore the values of the program counter
(PC) and the program status (PS) from the stack and resumes executing the instruction
following the one executed just before the interrupt.
MB95630H Series
Note:
The interrupt request flag bit for a peripheral function is not automatically cleared to "0"
after an interrupt request is accepted. Therefore, clear such bit to "0" by using a program
(writing "0" to the interrupt request flag bit) in the interrupt service routine.
The low power consumption mode (standby mode) is released by an interrupt. For details, see
"3.5 Operations in Low Power Consumption Mode (Standby Mode)".
76FUJITSU SEMICONDUCTOR LIMITEDMN702-00009-2v0-E
Page 99
CHAPTER 5 INTERRUPTS
MB95630H Series
5.1 Interrupts
5.1.3Nested Interrupts
Different interrupt levels can be assigned to multiple interrupt requests from
peripheral functions in the interrupt level setting registers (ILR0 to ILR5) to
process nested interrupts.
■ Nested Interrupts
During the execution of an interrupt service routine, if another interrupt request whose interrupt
level has priority over the in terrupt level of the interrupt being processed is made, the CPU
suspends the current interrupt processing and accepts the interrupt request given priority. The
interrupt level of an interrupt request can be set to 0 to 3. If it is set to 3, the CPU does n ot
accept that interrupt request.
[Example: Nested interrupts]
In the following example of nested interrupts, assuming that the external interrupt is to be
given priority over the timer interrupt, the i nterrupt level of the timer interrupt is set to 2 and
that of the external interrupt to 1. If the external interrupt is generated while the tim er interrupt
is being processed, they are processed as shown in Figure 5.1-2.
(6) Process timer interrupt
(7) Return from timer interrupt
(4) Process external interrupt
(5) Return from external interrupt
Initialize peripheral resources (1)
Timer interrupt occurs (2)
Resume main program
(8)
Interrupt level 2
(CCR:IL[1:0]=0b10)
Suspend
Resume
• While the timer interrupt is being processed, the interrupt level bits in th e condition code
register (CCR:IL[1:0]) hold the same value as that of the interrupt level setting registers
(ILR0 to ILR5) corresponding to the timer interrup t (level 2 in the above example). If an
interrupt request whose interrupt level has priority over the interrupt level of the timer
interrupt (level 1 in the above example) is made, that interrupt is processed first.
• To temporarily disable nested interrupts processing while the timer interrupt is being
processed, disable interrupts by setting the interrupt enable flag in the condition code
register (CCR:I) to "0", or set the interrupt level bits (CCR:IL[1:0]) to "0b00".
• After the interrupt processing is completed, if the interrupt return instruction (RETI) is
executed, the value of the program counter (PC) and that of the program status (PS) are
restored, and the CPU resumes executing the program interrupted. In addition, the values of
the condition code register (CCR) return to the ones existing before the interrupt due to the
restoration of the value of the program status (PS).
MN702-00009-2v0-EFUJITSU SEMICONDUCTOR LIMITED77
Page 100
CHAPTER 5 INTERRUPTS
CPU operation
Interrupt wait time
Interrupt request
sampling wait time
Normal instruction execution
Interrupt handling time
(9 machine clock cycles)
Interrupt handlingInterrupt service routine
Interrupt request generated
: Last instruction cycle in which the interrupt request issampled
5.1 Interrupts
MB95630H Series
5.1.4Interrupt Processing Time
Before the CPU enters the interrupt service routine after an interrupt request is
made, it needs to wait for the interrupt processing time, which consists of the
time between the occurrence of an interrupt request and the end of the
execution of the instruction being executed, and the interrupt handling time
(the time required to initiate interrupt processing) to elapse. The maximum
interrupt processing time is 26 machine clock cycles.
■ Interrupt Processing Time
Before executing the interrupt service routine after an interrupt request is made, the CPU needs
to wait for the interrupt request sampling wait time and the interrupt handling time to elapse.
● Interr u pt reque st sa mp lin g wait time
The CPU decides whether an interrupt request has occurred by samp ling the interrupt request
during the last cycle of each instruction. Therefore, the CPU cannot recognize interrupt
requests while executing an instruction. This sampling wait time reaches its maximum when an
interrupt request occurs immediately after the CPU starts executing the DIVU instruction,
whose execution cycle is the longest (17 machine clock cycles).
● Interrupt handling time
After accepting an interrupt, the CPU requires nine machine clock cycles to perform the
following interrupt processing setup:
• Saves the value of the program counter (PC) and that of the program status (PS) to the
stack.
• Sets the PC to the start address (interrupt vector) of interrupt service routine.
• Updates the interrupt level bits (CCR:IL[1:0]) in the program status (PS).
Figure 5.1-3 Interrupt Processing Time
When an interrupt request occurs immediately after the CPU starts executing the DIVU
instruction, whose execution cycle is the longest (17 machine clock cycles), the interrupt
processing time spans 26 machine clock cycles.
The span of a machine clock cycle varies depending on the clock mode and main clock speed
change (gear function). For details, see "CHAPTER 3 CLOCK CONTROLLER".
78FUJITSU SEMICONDUCTOR LIMITEDMN702-00009-2v0-E
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.