Z80F91 Manual
Z80F91 Manual
® Flash Microcontrollers
eZ80F91 MCU
Product Specification
PS019217-1222
As used herein
Life support devices or systems are devices which (a) are intended for surgical implant into the body, or (b)
support or sustain life and whose failure to perform when properly used in accordance with instructions for
use provided in the labeling can be reasonably expected to result in a significant injury to the user. A
critical component is any component in a life support device or system whose failure to perform can be
reasonably expected to cause the failure of the life support device or system or to affect its safety or
effectiveness.
Document Disclaimer
©2022 by Zilog, Inc. All rights reserved. Information in this publication concerning the devices,
applications, or technology described is intended to suggest possible uses and may be superseded. ZILOG,
INC. DOES NOT ASSUME LIABILITY FOR OR PROVIDE A REPRESENTATION OF ACCURACY
OF THE INFORMATION, DEVICES, OR TECHNOLOGY DESCRIBED IN THIS DOCUMENT.
Z I L O G A L S O D O E S N O T A S S U M E L I A B I L I T Y F O R I N T E L L E C T U A L P R O P E RT Y
INFRINGEMENT RELATED IN ANY MANNER TO USE OF INFORMATION, DEVICES, OR
TECHNOLOGY DESCRIBED HEREIN OR OTHERWISE. The information contained within this
document has been verified according to the general principles of electrical and mechanical engineering.
eZ80, Z80, and eZ80Acclaim! are registered trademarks of Zilog, Inc. All other product or service names
are the property of their respective owners.
PS019217-1222
eZ80F91 MCU
Product Specification
iii
Revision History
Each instance in the Revision History reflects a change to this document from its previous
revision. For more details, refer to the corresponding pages or appropriate links given in
the table below.
Revision Page
Date Level Section Description Number
December 17 Ordering Information Removed PSI’s for MCU’s, kits, 359, 359
2022 modules, and cables that are no
longer supported. Added Acclaim!
Smart Cable. Updated Environmental
flow to “K”.
Updated title page and headers to All
Littelfuse branding
March 16 Chapter 12. Real Time Added clarification about leap year 159
2016 Clock; All compensation when BCD operation is
enabled; updated Zilog logo on title
page and in header.
September 15 All Updated logos and copyright date. All
2010
August 14 Ordering Information Updated Part Number Description 359
2008 section.
May 2008 13 Introduction, Figure 48, ZDI- Replaced ZPAK II with USB Smart 231, 232,
Supported Protocol, and Cable and 233
Figure 49
September 12 General-Purpose Input/ Updated Table 1, Figure 6, Flash 4, 53,
2007 Output, Flash Memory, Program Control Register, UART 112,174,
Universal Asynchronous Transmitter, Figure 40, Table 93, I2C 176, 201,
Receiver/Transmitter, Serial Registers and Ordering Information. 223, and 358
Peripheral Interface, Real-
Time Clock Control Register,
I2C Serial I/O Interface, Pin
Description, and Ordering
Information.
February 11 Register Map, GPIO Mode 7—Alternate Functions, Register Map - 27, 45, 54,
2007 Table 3. Low-Power Modes, Electrical Characteristics chapters. 339
Updated Table 93.
iv
Revision Page
Date Level Section Description Number
June 2006 10 Global modifications Updated for new release. All
Pin Identification on the Table 3: The description of the 6
eZ80F91 Device following pins modified: pins 55, 61,
63 and 69
General-Purpose Input/ GPIO chapter totally rewritten 49
Output
Chip Selects and Wait Input/Output chip select operation 65
States modified
Flash Memory The following sections are modified in 97
Flash memory chapter: Erasing Flash
memory, Information page
characteristics, Flash Write/Erase
protection register, Flash program
control registers, and Table 43.
Real-Time Clock Overview Added a note in real time clock 159
overview section
Universal Asynchronous Table 102 and 109 modified 175
Receiver/Transmitter
Infrared Encoder/Decoder The field [7:4] modified in Table 111 199
Control Registers
Zilog Debug Interface Updated the Introduction section, 231
Added two paragraphs to ZDI Read
Memory Registers
On-Chip Oscillators On page 349, Figure 63: 336
Recommended Crystal Oscillator
Configuration, the value of inductance
L is changed to 3.3 μH.
On page 351, Table 232, changed
serial resistance value from 40 kΩ to
50 kΩ
POR and VBO Electrical In Table 235: Min, Typ, and Max 341
Characteristics values of VBO voltage threshold
modified and added ISpor_vbo
parameter
Ordering Information Ordering information modified 358
Table of Contents
Revision History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iii
Table of Contents v
Architectural Overview 1
Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Pin Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Pin Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
System Clock Source Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Register Map 27
eZ80® CPU Core 39
Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
New Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Reset 41
External Reset Input and Indicator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Power-On Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Voltage Brownout Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Low-Power Modes 45
SLEEP Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
HALT Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Clock Peripheral Power-Down Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
General-Purpose Input/Output 49
GPIO Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
GPIO Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
GPIO Control Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Interrupt Controller 57
Maskable Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
GPIO Port Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Chip Selects and Wait States 65
Memory and I/O Chip Selects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Memory Chip Select Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Input/Output Chip Select Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Wait States . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
PS019217-1222
eZ80F91 MCU
Product Specification
vi
PS019217-1222
eZ80F91 MCU
Product Specification
vii
PS019217-1222
eZ80F91 MCU
Product Specification
viii
PS019217-1222
eZ80F91 MCU
Product Specification
ix
PS019217-1222
eZ80F91 MCU
Product Specification
Architectural Overview
Zilog’s eZ80F91 device is a member of Zilog’s family of eZ80Acclaim!® Flash micro-
controllers. The eZ80F91 is a high-speed microcontroller with a maximum clock speed
of 50 MHz and single-cycle instruction fetch. It operates in Z80®-compatible address-
ing mode (64 KB) or full 24-bit addressing mode (16 MB). The rich peripheral set of the
eZ80F91 makes it suitable for a variety of applications, including industrial control,
embedded communication, and point-of-sale terminals.
Features
Key features of eZ80F91 device include:
• Single-cycle instruction fetch, high-performance, pipelined eZ80® CPU core
(referred as The CPU in this document)
• 10/100 BaseT ethernet media access controller with Media-Independent
Interface (MII)
• 256 KB Flash memory
• 16 KB SRAM (8 KB user and 8 KB Ethernet)
• Low-power features including SLEEP mode, HALT mode, and selective peripheral
power-down control
• Two Universal Asynchronous Receiver/Transmitter (UART) with independent Baud
Rate Generators (BRG)
• Serial Peripheral Interface (SPI) with independent clock rate generator
• I2C with independent clock rate generator
• IrDA-compliant infrared encoder/decoder
• Glueless external peripheral interface with 4 Chip Selects, individual Wait State
generators, an external WAIT input pin—supports Z80-, Intel-, and Motorola-style
buses
• Fixed-priority vectored interrupts (both internal and external) and interrupt controller
• Real-time clock with separate VDD pin for battery backup and selectable on-chip
32 kHz oscillator or external 50/60 Hz input
• Four 16-bit Counter/Timers with prescalers and direct input/output drive
• Watchdog Timer with internal oscillator clocking option
• 32 bits of General-Purpose Input/Output (GPIO)
• On-Chip Instrumentation (OCI™) and Zilog Debug Interfaces (ZDI)
PS019217-1222
eZ80F91 MCU
Product Specification
Note: All signals with an overline are active Low. For example, the signal DCD1 is active when
it is a logical 0 (Low) state.
Block Diagram
Figure 1 on page 3 displays a block diagram of the eZ80F91 microcontroller.
PS019217-1222
eZ80F91 MCU
Product Specification
MII Interface
Signals (18)
Ethernet 8KB
MAC Arbiter SRAM
RTC_VDD Real-Time
Clock and
RTC_XIN
32 KHz
RTC_X OUT Oscillator
BUSACK
BUSREQ
INSTRD
Bus
Controller IORQ
SCL
I2C MREQ
Serial
Interface RD
SDA
WR
ADDR[23:0]
DATA[7:0]
SCK NMI
SPI eZ80
SS Serial CPU
MISO Parallel HALT_SLP
Interface
MOSI
256KB JTAG/ZDI
Flash Debug JTAG/ZDI Signals (5)
Memory Interface
WP
WAIT
CTS0/1 Chip Select
Interrupt CS0
Vector and
DSR0/1 Wait State CS1
(8:0)
DCD0/1 UART 8KB Generator
Universal CS2
SRAM Interrupt
DTR0/1 Asynchronous Controller CS3
RI0/1 Receiver/
Transmitter
RTS0/1 (2)
RxD0/1 DATA[7:0]
TxD0/1
ADDR[23:0]
WDT Internal
GPIO Crystal Watch-Dog RC
IrDA 8-Bit General- Oscillator Programmable
Reload Timer Osc.
Encoder/ Purpose PLL, and
Decoder I/O Port System Clock Timer/Counter
(4) Generator (4) POR/VBO RESET
TxD0/1
TxD0/1
PA[7:0]
PB[7:0]
PC[7:0]
PD[7:0]
X
X
PHI
PLL_V
LOOP_FILT
IC0/1/2/3
EC0/1
TOUT0/2
OC0/1/2/3
PWM0/1/2/3
PWM0/1/2/3
PS019217-1222
eZ80F91 MCU
Product Specification
Pin Description
Table 1 lists the pin configuration of the eZ80F91 device in the 144-BGA package.
12 11 10 9 8 7 6 5 4 3 2 1
A SDA SCL PA0 PA4 PA7 COL TxD0 VDD Rx_DV MDC WPn A0
B VSS PHI PA1 PA3 VDD TxD3 Tx_EN VSS RxD1 MDIO A2 A1
C PB6 PB7 VDD PA5 VSS TxD2 Tx_CLK Rx_ RxD3 A3 VSS VDD
CLK
D PB1 PB3 PB5 VSS CRS TxD1 Rx_ER RxD2 A4 A8 A6 A7
E PC7 VDD PB0 PB4 PA2 Tx_ER RxD0 A5 A11 VSS VDD A10
F PC3 PC4 PC5 VSS PB2 PA6 A9 A17 A15 A14 A13 A12
G VSS PC0 PC1 PC2 PC6 PLL_ VSS A23 A20 VSS VDD A16
VSS
H XOUT XIN PLL_ VDD PD7 TMS VSS D5 VSS A21 A19 A18
VDD
J VSS VDD LOOP PD4 TRIGOUT RTC_ NMIn WRn D2 CS0n VDD A22
FILT_ VDD
OUT
K PD5 PD6 PD3 TDI VSS VDD RESETn RDn VDD D1 CS2n CS1n
L PD1 PD2 TRSTn TCK RTC_ BUSACKn WAITn MREQn D6 D4 D0 CS3n
XOUT
M PD0 VSS TDO HALT RTC_ BUSREQn INSTRDn IORQn D7 D3 VSS VDD
_ XIN
SLPn
Note: Lowercase n suffix indicates an active-low signal in this table only
PS019217-1222
eZ80F91 MCU
Product Specification
Figure 2 displays the pin layout of the eZ80F91 device in the 144-pin LQFP package.
PA5/PWM1/TOUT2
PA4/PWM0/TOUT0
PA3/PWM3/OC3
PA2/PWM2/OC2
PA1/PWM1/OC1
PA0/PWM0/OC0
120 PA6/PWM2/EC1
PA7/PWM3
Rx_CLK
Tx_CLK
Rx_DV
Rx_ER
Tx_ER
130 Tx_EN
MDIO
RxD3
140 RxD2
RxD1
RxD0
TxD1
TxD2
TxD3
TxD0
MDC
CRS
SDA
COL
110 SCL
VDD
VDD
VDD
VSS
VSS
VSS
PHI
144 WP
108 VSS
A0 1
PB7/MOSI
A1 PB6/MISO
A2
PB5/IC3
A3
PB4/IC2
A4
PB3/SCK
VDD
PB2/SS
VSS
PB1/IC1
A5
100 PB0/IC0/EC0
A6
VSS
A7 10
VDD
A8
PC7/RI1
A9
PC6/DCD1
A10
PC5/DSR1
VDD
PC4/DTR1
VSS
PC3/CTS1
A11
PC2/RTS1
A12
PC1/RxD1
A13 144-Pin LQFP 90 PC0/TxD1
A14
VSS
A15 20
VDD
A16
PLL_VDD
VDD
XIN
VSS
XOUT
A17
PLL_VSS
A18
LOOP_FILT
A19
VSS
A20
VDD
A21
A22 80 PD7/RI0
A23 30 PD6/DCD0
VDD PD5/DSR0
VSS PD4/DTR0
CS0 PD3/CTS0
CS1 PD2/RTS0
CS2 PD1/RxD0/IR_RxD
CS3 36 73 PD0/TxD0/IR_TxD
D1 40
MREQ 50
VSS 60
TDO 70
IORQ
BUSREQ
WAIT
RESET
BUSACK
RD
WR
VSS
D0
D2
D3
D4
D5
D6
D7
VSS
INSTRD
VDD
VDD
VDD
RTC_XIN
NMI
TRIGOUT
TRST
HALT_SLP
TMS
TCK
VSS
TDI
VSS
RTC_VDD
RTC_XOUT
PS019217-1222
eZ80F91 MCU
Product Specification
Pin Characteristics
Table 2 lists the pins and functions of the eZ80F91 MCU’s 144-pin LQFP package and
144-BGA package.
LQFP BGA
Pin No Pin No Symbol Function Signal Direction Description
1 A1 ADDR0 Address Bus Bidirectional Configured as an output in normal
operation. The address bus selects a
2 B1 ADDR1 Address Bus Bidirectional
location in memory or I/O space to be
3 B2 ADDR2 Address Bus Bidirectional read or written. Configured as an input
during bus acknowledge cycles.
4 C3 ADDR3 Address Bus Bidirectional
Drives the Chip Select/Wait State
5 D4 ADDR4 Address Bus Bidirectional Generator block to generate Chip
Selects.
6 C1 VDD Power Supply Power Supply.
7 C2 VSS Ground Ground.
8 E5 ADDR5 Address Bus Bidirectional Configured as an output in normal
operation. The address bus selects a
9 D2 ADDR6 Address Bus Bidirectional
location in memory or I/O space to be
10 D1 ADDR7 Address Bus Bidirectional read or written. Configured as an input
during bus acknowledge cycles.
11 D3 ADDR8 Address Bus Bidirectional
Drives the Chip Select/Wait State
12 F6 ADDR9 Address Bus Bidirectional Generator block to generate Chip
Selects.
13 E1 ADDR10 Address Bus Bidirectional
14 E2 VDD Power Supply Power Supply.
15 E3 VSS Ground Ground.
16 E4 ADDR11 Address Bus Bidirectional Configured as an output in normal
operation. The address bus selects a
location in memory or I/O space to be
read or written. Configured as an input
during bus acknowledge cycles.
Drives the Chip Select/Wait State
Generator block to generate Chip
Selects.
PS019217-1222
eZ80F91 MCU
Product Specification
LQFP BGA
Pin No Pin No Symbol Function Signal Direction Description
17 F1 ADDR12 Address Bus Bidirectional Configured as an output in normal
operation. The address bus selects a
18 F2 ADDR13 Address Bus Bidirectional
location in memory or I/O space to be
19 F3 ADDR14 Address Bus Bidirectional read or written. Configured as an input
during bus acknowledge cycles.
20 F4 ADDR15 Address Bus Bidirectional
Drives the Chip Select/Wait State
21 G1 ADDR16 Address Bus Bidirectional Generator block to generate Chip
Selects.
22 G2 VDD Power Supply Power Supply.
23 G3 VSS Ground Ground.
24 F5 ADDR17 Address Bus Bidirectional Configured as an output in normal
operation. The address bus selects a
25 H1 ADDR18 Address Bus Bidirectional
location in memory or I/O space to be
26 H2 ADDR19 Address Bus Bidirectional read or written. Configured as an input
during bus acknowledge cycles.
27 G4 ADDR20 Address Bus Bidirectional
Drives the Chip Select/Wait State
28 H3 ADDR21 Address Bus Bidirectional Generator block to generate Chip
Selects.
29 J1 ADDR22 Address Bus Bidirectional
30 G5 ADDR23 Address Bus Bidirectional
31 J2 VDD Power Supply Power Supply.
32 H4 VSS Ground Ground.
33 J3 CS0 Chip Select 0 Output, Active CS0 Low indicates that an access is
Low occurring in the defined CS0 memory
or I/O address space.
34 K1 CS1 Chip Select 1 Output, Active CS1 Low indicates that an access is
Low occurring in the defined CS1 memory
or I/O address space.
35 K2 CS2 Chip Select 2 Output, Active CS2 Low indicates that an access is
Low occurring in the defined CS2 memory
or I/O address space.
36 L1 CS3 Chip Select 3 Output, Active CS3 Low indicates that an access is
Low occurring in the defined CS3 memory
or I/O address space.
37 M1 VDD Power Supply Power Supply.
38 M2 VSS Ground Ground.
PS019217-1222
eZ80F91 MCU
Product Specification
LQFP BGA
Pin No Pin No Symbol Function Signal Direction Description
39 L2 DATA0 Data Bus Bidirectional The data bus transfers data to and
from I/O and memory devices. The
40 K3 DATA1 Data Bus Bidirectional
eZ80F91 drives these lines only
41 J4 DATA2 Data Bus Bidirectional during Write cycles when the
eZ80F91 is the bus master.
42 M3 DATA3 Data Bus Bidirectional
43 L3 DATA4 Data Bus Bidirectional
44 H5 DATA5 Data Bus Bidirectional
45 L4 DATA6 Data Bus Bidirectional
46 M4 DATA7 Data Bus Bidirectional
47 K4 VDD Power Supply Power Supply.
48 G6 VSS Ground Ground.
49 M5 IORQ Input/Output Bidirectional, IORQ indicates that the CPU is
Request Active Low accessing a location in I/O space. RD
and WR indicate the type of access.
The eZ80F91 device does not drive
this line during RESET. It is an input
during bus acknowledge cycles.
50 L5 MREQ Memory Bidirectional, MREQ Low indicates that the CPU is
Request Active Low accessing a location in memory. The
RD, WR, and INSTRD signals indicate
the type of access. The eZ80F91
device does not drive this line during
RESET. It is an input during bus
acknowledge cycles.
51 K5 RD Read Output, RD Low indicates that the eZ80F91
Active Low device is reading from the current
address location. This pin is in a high-
impedance state during bus
acknowledge cycles.
52 J5 WR Write Output, Active WR indicates that the CPU is writing
Low to the current address location. This
pin is in a high-impedance state
during bus acknowledge cycles.
PS019217-1222
eZ80F91 MCU
Product Specification
LQFP BGA
Pin No Pin No Symbol Function Signal Direction Description
53 M6 INSTRD Instruction Output, Active INSTRD (with MREQ and RD)
Read Indicator Low indicates the eZ80F91 device is
fetching an instruction from memory.
This pin is in a high-impedance state
during bus acknowledge cycles.
54 L6 WAIT WAIT Request Schmitt-trigger Driving the WAIT pin Low forces the
input, Active Low CPU to wait additional clock cycles for
an external peripheral or external
memory to complete its Read or Write
operation.
55 K6 RESET Reset Bidirectional, This signal is used to initialize the
Active Low eZ80F91, and/or allow the ez80F91 to
Schmitt-trigger signal when it resets. See reset
input or open section for the timing details. This
drain output Schmitt-trigger input allows for RC rise
times.
56 J6 NMI Nonmaskable Schmitt-trigger The NMI input is a higher priority input
Interrupt input, Active Low, than the maskable interrupts. It is
edge-triggered always recognized at the end of an
interrupt instruction, regardless of the state of
the interrupt enable control bits. This
input includes a Schmitt- trigger to
allow for RC rise times.
57 M7 BUSREQ Bus Request Schmitt-trigger External devices request the eZ80F91
input, Active Low device to release the memory
interface bus for their use by driving
this pin Low.
58 L7 BUSACK Bus Output, Active The eZ80F91 device responds to a
Acknowledge Low Low on BUSREQ making the address,
data, and control signals high
impedance, and by driving the
BUSACK line Low. During bus
acknowledge cycles ADDR[23:0],
IORQ, and MREQ are inputs.
59 K7 VDD Power Supply Power Supply.
60 H6 VSS Ground Ground.
PS019217-1222
eZ80F91 MCU
Product Specification
10
LQFP BGA
Pin No Pin No Symbol Function Signal Direction Description
61 M8 RTC_XIN Real-Time Input This pin is the input to the low-power
Clock Crystal 32 kHz crystal oscillator for the Real-
Input time clock. If the Real-time clock is
disabled or not used, this input must
be left floating or tied to VSS to
minimize any input current leakage.
62 L8 RTC_XOUT Real-Time Bidirectional This pin is the output from the low-
Clock Crystal power 32 kHz crystal oscillator for the
Output Real-Time Clock. This pin is an input
when the RTC is configured to
operate from 50/60 Hz input clock
signals and the 32 kHz crystal
oscillator is disabled.
63 J7 RTC_VDD Real-Time Power supply for the Real-Time Clock
Clock Power and associated 32 kHz oscillator.
Supply Isolated from the power supply to the
remainder of the chip. A battery is
connected to this pin to supply
constant power to the Real-Time
Clock and 32 kHz oscillator. If the
Real-time clock is disabled or not
used this output must be tied to Vdd.
64 K8 VSS Ground Ground.
65 M9 HALT_SLP HALT and Output, Active A Low on this pin indicates that the
SLEEP Low CPU has entered either HALT or
Indicator SLEEP mode because of execution of
either a HALT or SLP instruction.
66 H7 TMS JTAG Test Input JTAG Mode Select Input.
Mode Select
67 L9 TCK JTAG Test Input JTAG and ZDI clock input.
Clock
68 J8 TRIGOUT JTAG Test Output Active High trigger event indicator.
Trigger Output
69 K9 TDI JTAG Test Bidirectional JTAG data input pin. Functions as ZDI
Data In data I/O pin when JTAG is disabled.
This pin has an internal pull-up
resistor in the pad.
PS019217-1222
eZ80F91 MCU
Product Specification
11
LQFP BGA
Pin No Pin No Symbol Function Signal Direction Description
70 M10 TDO JTAG Test Output JTAG data output pin.
Data Out
71 L10 TRST JTAG Reset Schmitt-trigger JTAG reset input pin.
input, Active Low
72 M11 VSS Ground Ground.
73 M12 PD0 GPIO Port D Bidirectional This pin is used for GPIO. It is
individually programmed as input or
output and is also used individually as
an interrupt input. Each Port D pin,
when programmed as output is
selected to be an open-drain or open-
source output. Port D is multiplexed
with one UART.
TxD0 UART Output This pin is used by the UART to
Transmit Data transmit asynchronous serial data.
This signal is multiplexed with PD0.
IR_TxD IrDA Transmit Output This pin is used by the IrDA encoder/
Data decoder to transmit serial data. This
signal is multiplexed with PD0.
74 L12 PD1 GPIO Port D Bidirectional This pin is used for GPIO. It is
individually programmed as input or
output and is also used individually as
an interrupt input. Each Port D pin,
when programmed as output is
selected to be an open-drain or open-
source output. Port D is multiplexed
with one UART.
RxD0 Receive Data Input This pin is used by the UART to
receive asynchronous serial data.
This signal is multiplexed with PD1.
IR_RxD IrDA Receive Input This pin is used by the IrDA encoder/
Data decoder to receive serial data. This
signal is multiplexed with PD1.
PS019217-1222
eZ80F91 MCU
Product Specification
12
LQFP BGA
Pin No Pin No Symbol Function Signal Direction Description
75 L11 PD2 GPIO Port D Bidirectional This pin is used for GPIO. It is
individually programmed as input or
output and is also used individually as
an interrupt input. Each Port D pin,
when programmed as output is
selected to be an open-drain or open-
source output. Port D is multiplexed
with one UART.
RTS0 Request to Output, Modem control signal from UART.
Send Active Low This signal is multiplexed with PD2.
76 K10 PD3 GPIO Port D Bidirectional This pin is used for GPIO. It is
individually programmed as input or
output and is also used individually as
an interrupt input. Each Port D pin,
when programmed as output is
selected to be an open-drain or open-
source output. Port D is multiplexed
with one UART.
CTS0 Clear to Send Input, Active Low Modem status signal to the UART.
This signal is multiplexed with PD3.
77 J9 PD4 GPIO Port D Bidirectional This pin is used for GPIO. It is
individually programmed as input or
output and is also used individually as
an interrupt input. Each Port D pin,
when programmed as output is
selected to be an open-drain or open-
source output. Port D is multiplexed
with one UART.
DTR0 Data Terminal Output, Modem control signal to the UART.
Ready Active Low This signal is multiplexed with PD4.
PS019217-1222
eZ80F91 MCU
Product Specification
13
LQFP BGA
Pin No Pin No Symbol Function Signal Direction Description
78 K12 PD5 GPIO Port D Bidirectional This pin is used for GPIO. It is
individually programmed as input or
output and is also used individually as
an interrupt input. Each Port D pin,
when programmed as output is
selected to be an open-drain or open-
source output. Port D is multiplexed
with one UART.
DSR0 Data Set Input, Active Low Modem status signal to the UART.
Ready This signal is multiplexed with PD5.
79 K11 PD6 GPIO Port D Bidirectional This pin is used for GPIO. It is
individually programmed as input or
output and is also used individually as
an interrupt input. Each Port D pin,
when programmed as output is
selected to be an open-drain or open-
source output. Port D is multiplexed
with one UART.
DCD0 Data Carrier Input, Active Low Modem status signal to the UART.
Detect This signal is multiplexed with PD6.
80 H8 PD7 GPIO Port D Bidirectional This pin is used for GPIO. It is
individually programmed as input or
output and is also used individually as
an interrupt input. Each Port D pin,
when programmed as output is
selected to be an open-drain or open-
source output. Port D is multiplexed
with one UART.
RI0 Ring Indicator Input, Active Low Modem status signal to the UART.
This signal is multiplexed with PD7.
81 J11 VDD Power Supply Power Supply.
82 J12 VSS Ground Ground.
83 J10 LOOP_FILT PLL Loop Filter Analog Loop Filter pin for the Analog PLL.
84 G7 PLL_VSS Ground Ground for Analog PLL.
85 H12 XOUT System Clock Output This pin is the output of the onboard
Oscillator crystal oscillator. When used, a crystal
Output must be connected between XIN and
XOUT.
PS019217-1222
eZ80F91 MCU
Product Specification
14
LQFP BGA
Pin No Pin No Symbol Function Signal Direction Description
86 H11 XIN System Clock Input This pin is the input to the onboard
Oscillator Input crystal oscillator for the primary
system clock. If an external oscillator
is used, its clock output must be
connected to this pin. When a crystal
is used, it must be connected between
XIN and XOUT.
87 H10 PLL_VDD Power Supply Power Supply for Analog PLL.
88 H9 VDD Power Supply Power Supply.
89 G12 VSS Ground Ground.
90 G11 PC0 GPIO Port C Bidirectional with This pin is used for GPIO. It is
Schmitt-trigger individually programmed as input or
input output and is also used individually as
an interrupt input. Each Port C pin,
when programmed as output is
selected to be an open-drain or open-
source output. Port C is multiplexed
with one UART.
TxD1 Transmit Data Output This pin is used by the UART to
transmit asynchronous serial data.
This signal is multiplexed with PC0.
91 G10 PC1 GPIO Port C Bidirectional with This pin is used for GPIO. It is
Schmitt-trigger individually programmed as input or
input output and is also used individually as
an interrupt input. Each Port C pin,
when programmed as output is
selected to be an open-drain or open-
source output. Port C is multiplexed
with one UART.
RxD1 Receive Data Schmitt-trigger This pin is used by the UART to
input receive asynchronous serial data.
This signal is multiplexed with PC1.
PS019217-1222
eZ80F91 MCU
Product Specification
15
LQFP BGA
Pin No Pin No Symbol Function Signal Direction Description
92 G9 PC2 GPIO Port C Bidirectional with This pin is used for GPIO. It is
Schmitt-trigger individually programmed as input or
input output and is also used individually as
an interrupt input. Each Port C pin,
when programmed as output is
selected to be an open-drain or open-
source output. Port C is multiplexed
with one UART.
RTS1 Request to Output, Active Modem control signal from UART.
Send Low This signal is multiplexed with PC2.
93 F12 PC3 GPIO Port C Bidirectional with This pin is used for GPIO. It is
Schmitt-trigger individually programmed as input or
input output and is also used individually as
an interrupt input. Each Port C pin,
when programmed as output is
selected to be an open-drain or open-
source output. Port C is multiplexed
with one UART.
CTS1 Clear to Send Schmitt-trigger Modem status signal to the UART.
input, Active Low This signal is multiplexed with PC3.
94 F11 PC4 GPIO Port C Bidirectional with This pin is used for GPIO. It is
Schmitt-trigger individually programmed as input or
input output and is also used individually as
an interrupt input. Each Port C pin,
when programmed as output is
selected to be an open-drain or open-
source output. Port C is multiplexed
with one UART.
DTR1 Data Terminal Output, Active Modem control signal to the UART.
Ready Low This signal is multiplexed with PC4.
PS019217-1222
eZ80F91 MCU
Product Specification
16
LQFP BGA
Pin No Pin No Symbol Function Signal Direction Description
95 F10 PC5 GPIO Port C Bidirectional with This pin is used for GPIO. It is
Schmitt-trigger individually programmed as input or
input output and is also used individually as
an interrupt input. Each Port C pin,
when programmed as output is
selected to be an open-drain or open-
source output. Port C is multiplexed
with one UART.
DSR1 Data Set Schmitt-trigger Modem status signal to the UART.
Ready input, Active Low This signal is multiplexed with PC5.
96 G8 PC6 GPIO Port C Bidirectional with This pin is used for GPIO. It is
Schmitt-trigger individually programmed as input or
input output and is also used individually as
an interrupt input. Each Port C pin,
when programmed as output is
selected to be an open-drain or open-
source output. Port C is multiplexed
with one UART.
DCD1 Data Carrier Schmitt-trigger Modem status signal to the UART.
Detect input, Active Low This signal is multiplexed with PC6.
97 E12 PC7 GPIO Port C Bidirectional with This pin is used for GPIO. It is
Schmitt-trigger individually programmed as input or
input output and is also used individually as
an interrupt input. Each Port C pin,
when programmed as output is
selected to be an open-drain or open-
source output. Port C is multiplexed
with one UART.
RI1 Ring Indicator Schmitt-trigger Modem status signal to the UART.
input, Active Low This signal is multiplexed with PC7.
98 E11 VDD Power Supply Power Supply.
99 F9 VSS Ground Ground.
PS019217-1222
eZ80F91 MCU
Product Specification
17
LQFP BGA
Pin No Pin No Symbol Function Signal Direction Description
100 E10 PB0 GPIO Port B Bidirectional with This pin is used for GPIO. It is
Schmitt-trigger individually programmed as input or
input output and is also used individually as
an interrupt input. Each Port B pin,
when programmed as output is
selected to be an open-drain or open-
source output.
IC0 Input Capture Schmitt-trigger Input Capture A Signal to Timer 1.
input This signal is multiplexed with PB0.
EC0 Event Counter Schmitt-trigger Event Counter Signal to Timer 1. This
input signal is multiplexed with PB0.
101 D12 PB1 GPIO Port B Bidirectional with This pin is used for GPIO. It is
Schmitt-trigger individually programmed as input or
input output and is also used individually as
an interrupt input. Each Port B pin,
when programmed as output is
selected to be an open-drain or open-
source output.
IC1 Input Capture Schmitt-trigger Input Capture B Signal to Timer 1.
input This signal is multiplexed with PB1.
102 F8 PB2 GPIO Port B Bidirectional with This pin is used for GPIO. It is
Schmitt-trigger individually programmed as input or
input output and is also used individually as
an interrupt input. Each Port B pin,
when programmed as output is
selected to be an open-drain or open-
source output.
SS SPI Slave Schmitt-trigger The slave select input line is used to
Select input, Active Low select a slave device in SPI mode.
This signal is multiplexed with PB2.
PS019217-1222
eZ80F91 MCU
Product Specification
18
LQFP BGA
Pin No Pin No Symbol Function Signal Direction Description
103 D11 PB3 GPIO Port B Bidirectional with This pin is used for GPIO. It is
Schmitt-trigger individually programmed as input or
input output and is also used individually as
an interrupt input. Each Port B pin,
when programmed as output is
selected to be an open-drain or open-
source output.
SCK SPI Serial Bidirectional with SPI serial clock. This signal is
Clock Schmitt-trigger multiplexed with PB3.
input
104 E9 PB4 GPIO Port B Bidirectional with This pin is used for GPIO. It is
Schmitt-trigger individually programmed as input or
input output and is also used individually as
an interrupt input. Each Port B pin,
when programmed as output is
selected to be an open-drain or open-
source output.
IC2 Input Capture Schmitt-trigger Input Capture A Signal to Timer 3.
input This signal is multiplexed with PB4.
105 D10 PB5 GPIO Port B Bidirectional with This pin is used for GPIO. It is
Schmitt-trigger individually programmed as input or
input output and is also used individually as
an interrupt input. Each Port B pin,
when programmed as output is
selected to be an open-drain or open-
source output.
IC3 Input Capture Schmitt-trigger Input Capture B Signal to Timer 3.
input This signal is multiplexed with PB5.
PS019217-1222
eZ80F91 MCU
Product Specification
19
LQFP BGA
Pin No Pin No Symbol Function Signal Direction Description
106 C12 PB6 GPIO Port B Bidirectional with This pin is be used for GPIO. It is
Schmitt-trigger individually programmed as input or
input output and is also used individually as
an interrupt input. Each Port B pin,
when programmed as output is
selected to be an open-drain or open-
source output.
MISO SPI Master-In/ Bidirectional with The MISO line is configured as an
Slave-Out Schmitt-trigger input when the eZ80F91 device is an
input SPI master device and as an output
when eZ80F91 is an SPI slave device.
This signal is multiplexed with PB6.
107 C11 PB7 GPIO Port B Bidirectional with This pin is used for GPIO. It is
Schmitt-trigger individually programmed as input or
input output and is also used individually as
an interrupt input. Each Port B pin,
when programmed as output is
selected to be an open-drain or open-
source output.
MOSI SPI Master Out Bidirectional with The MOSI line is configured as an
Slave In Schmitt-trigger output when the eZ80F91 device is an
input SPI master device and as an input
when the eZ80F91 device is an SPI
slave device. This signal is
multiplexed with PB7.
108 B12 VSS Ground Ground.
109 A12 SDA I2C Serial Data Bidirectional This pin carries the I2C data signal.
110 A11 SCL I2C Serial Bidirectional This pin is used to receive and
Clock transmit the I2C clock.
111 B11 PHI System Clock Output This pin is an output driven by the
internal system clock. It is used by the
system for synchronization with the
eZ80F91 device.
112 C10 VDD Power Supply Power Supply.
113 D9 VSS Ground Ground.
PS019217-1222
eZ80F91 MCU
Product Specification
20
LQFP BGA
Pin No Pin No Symbol Function Signal Direction Description
114 A10 PA0 GPIO Port A Bidirectional This pin is used for GPIO. It is
individually programmed as input or
output and is also used individually as
an interrupt input. Each Port A pin,
when programmed as output is
selected to be an open-drain or open-
source output.
PWM0 PWM Output This pin is used by Timer 3 for PWM
Output 0 0. This signal is multiplexed with PA0.
OC0 Output Output This pin is used by Timer 3 for Output
Compare 0 Compare 0. This signal is multiplexed
with PA0.
115 B10 PA1 GPIO Port A Bidirectional This pin is used for GPIO. It is
individually programmed as input or
output and is also used individually as
an interrupt input. Each Port A pin,
when programmed as output is
selected to be an open-drain or open-
source output.
PWM1 PWM Output This pin is used by Timer 3 for PWM
Output 1 1. This signal is multiplexed with PA1.
OC1 Output Output This pin is used by Timer 3 for Output
Compare 1 Compare 1. This signal is multiplexed
with PA1.
116 E8 PA2 GPIO Port A Bidirectional This pin is used for GPIO. It is
individually programmed as input or
output and is also used individually as
an interrupt input. Each Port A pin,
when programmed as output is
selected to be an open-drain or open-
source output.
PWM2 PWM Output This pin is used by Timer 3 for PWM
Output 2 2. This signal is multiplexed with PA2.
OC2 Output Output This pin is used by Timer 3 for Output
Compare 2 Compare 2. This signal is multiplexed
with PA2.
PS019217-1222
eZ80F91 MCU
Product Specification
21
LQFP BGA
Pin No Pin No Symbol Function Signal Direction Description
117 B9 PA3 GPIO Port A Bidirectional This pin is used for GPIO. It is
individually programmed as input or
output and is also used individually as
an interrupt input. Each Port A pin,
when programmed as output is
selected to be an open-drain or open-
source output.
PWM3 PWM Output 3 Output This pin is used by Timer 3 for PWM
3. This signal is multiplexed with PA3.
OC3 Output Output This pin is used by Timer 3 for Output
Compare 3 Compare 3 This signal is multiplexed
with PA3.
118 A9 PA4 GPIO Port A Bidirectional This pin is used for GPIO. It is
individually programmed as input or
output and is also used individually as
an interrupt input. Each Port A pin,
when programmed as output is
selected to be an open-drain or open-
source output.
PWM0 PWM Output 0 Output This pin is used by Timer 3 for
Inverted negative PWM 0. This signal is
multiplexed with PA4.
TOUT0 Timer Out Output This pin is used by Timer 0 timer-out
signal. This signal is multiplexed with
PA4.
119 C9 PA5 GPIO Port A Bidirectional This pin is used for GPIO. It is
individually programmed as input or
output and is also used individually as
an interrupt input. Each Port A pin,
when programmed as output is
selected to be an open-drain or open-
source output.
PWM1 PWM Output 1 Output This pin is used by Timer 3 for
Inverted negative PWM 1. This signal is
multiplexed with PA5.
TOUT2 Timer Out Output This pin is used by the Timer 2 timer-
out signal. This signal is multiplexed
with PA5.
PS019217-1222
eZ80F91 MCU
Product Specification
22
LQFP BGA
Pin No Pin No Symbol Function Signal Direction Description
120 F7 PA6 GPIO Port A Bidirectional This pin is used for GPIO. It is
individually programmed as input or
output and is also used individually as
an interrupt input. Each Port A pin,
when programmed as output is
selected to be an open-drain or open-
source output.
PWM2 PWM Output 2 Output This pin is used by Timer 3 for
Inverted negative PWM 2. This signal is
multiplexed with PA6.
EC1 Event Counter Input Event Counter Signal to Timer 2. This
signal is multiplexed with PA6.
121 A8 PA7 GPIO Port A Bidirectional This pin is used for GPIO. It is
individually programmed as input or
output and is also used individually as
an interrupt input. Each Port A pin,
when programmed as output is
selected to be an open-drain or open-
source output.
PWM3 PWM Output 3 Output This pin is used by Timer 3 for
Inverted negative PWM 3. This signal is
multiplexed with PA7.
122 B8 VDD Power Supply Power Supply.
123 C8 VSS Ground Ground.
124 D8 CRS MII Carrier Input This pin is used by the EMAC for the
Sense MII Interface to the PHY (physical
layer). Carrier Sense is an
asynchronous signal.
125 A7 COL MII Collision Input This pin is used by the EMAC for the
Detect MII Interface to the PHY. Collision
Detect is an asynchronous signal.
126 B7 TxD3 MII Transmit Output This pin is used by the EMAC for the
Data MII Interface to the PHY. Transmit
Data is synchronous to the rising-
edge of Tx_CLK.
PS019217-1222
eZ80F91 MCU
Product Specification
23
LQFP BGA
Pin No Pin No Symbol Function Signal Direction Description
127 C7 TxD2 MII Transmit Output This pin is used by the Ethernet MAC
Data for the MII Interface to the PHY.
Transmit Data is synchronous to the
rising-edge of Tx_CLK.
128 D7 TxD1 MII Transmit Output This pin is used by the Ethernet MAC
Data for the MII Interface to the PHY.
Transmit Data is synchronous to the
rising-edge of Tx_CLK.
129 A6 TxD0 MII Transmit Output This pin is used by the Ethernet MAC
Data for the MII Interface to the PHY.
Transmit Data is synchronous to the
rising-edge of Tx_CLK.
130 B6 Tx_EN MII Transmit Output This pin is used by the Ethernet MAC
Enable for the MII Interface to the PHY.
Transmit Enable is synchronous to the
rising-edge of Tx_CLK.
131 C6 Tx_CLK MII Transmit Input This pin is used by the Ethernet MAC
Clock for the MII Interface to the PHY.
Transmit Clock is the Nibble or
Symbol Clock provided by the MII
PHY interface.
132 E7 Tx_ER MII Transmit Output This pin is used by the Ethernet MAC
Error for the MII Interface to the PHY.
Transmit Error is synchronous to the
rising-edge of Tx_CLK.
133 A5 VDD Power Supply Power Supply.
134 B5 VSS Ground Ground.
135 D6 Rx_ER MII Receive Input This pin is used by the Ethernet MAC
Error for the MII Interface to the PHY.
Receive Error is provided by the MII
PHY interface synchronous to the
rising-edge of Rx_CLK.
136 C5 Rx_CLK MII Receive Input This pin is used by the Ethernet MAC
Clock for the MII Interface to the PHY.
Receive Clock is the Nibble or Symbol
Clock provided by the MII PHY
interface.
PS019217-1222
eZ80F91 MCU
Product Specification
24
LQFP BGA
Pin No Pin No Symbol Function Signal Direction Description
137 A4 Rx_DV MII Receive Input This pin is used by the Ethernet MAC
Data Valid for the MII Interface to the PHY.
Receive Data Valid is provided by the
MII PHY interface synchronous to the
rising-edge of Rx_CLK.
138 E6 RxD0 MII Receive Input This pin is used by the Ethernet MAC
Data for the MII Interface to the PHY.
Receive Data is provided by the MII
PHY interface synchronous to the
rising-edge of Rx_CLK.
139 B4 RxD1 MII Receive Input This pin is used by the Ethernet MAC
Data for the MII Interface to the PHY.
Receive Data is provided by the MII
PHY interface synchronous to the
rising-edge of Rx_CLK.
140 D5 RxD2 MII Receive Input This pin is used by the Ethernet MAC
Data for the MII Interface to the PHY.
Receive Data is provided by the MII
PHY interface synchronous to the
rising-edge of Rx_CLK.
141 C4 RxD3 MII Receive Input This pin is used by the Ethernet MAC
Data for the MII Interface to the PHY.
Receive Data is provided by the MII
PHY interface synchronous to the
rising-edge of Rx_CLK.
142 A3 MDC MII Output This pin is used by the Ethernet MAC
Management for the MII Management Interface to
Data Clock the PHY. The Ethernet MAC provides
the MII Management Data Clock to
the MII PHY interface.
PS019217-1222
eZ80F91 MCU
Product Specification
25
LQFP BGA
Pin No Pin No Symbol Function Signal Direction Description
143 B3 MDIO MII Bidirectional This pin is used by the Ethernet MAC
Management for the MII Management Interface to
Data the PHY. The Ethernet MAC sends
and receives the MII Management
Data to and from the MII PHY
interface.
144 A2 WP Write Protect Schmitt-trigger The Write Protect input is used by the
input, Active Low Flash Controller to protect the Boot
Block from Write and ERASE
operations.
System Clock—The eZ80F91 device’s internal clock, SCLK, is responsible for clocking
all internal logic. The SCLK source can be an external crystal oscillator, an internal PLL,
or an internal 32 kHz RTC oscillator. The SCLK source is selected by PLL Control Regis-
ter 0. RESET default is provided by the external crystal oscillator. For more details on
CLK_MUX values in the PLL Control Register 0, see Table 154 on page 269.
PHI—PHI is a device output driven by SCLK that is used for system synchronization to
the eZ80F91 device. PHI is used as the reference clock for all AC characteristics, see
page 344.
Real Time Clock—An internal 32 kHz real-time clock crystal oscillator driven by either
the on-chip 32768 Hz crystal oscillator or a 50/60 Hz power-line frequency input. While
intended for timekeeping, the RTC 32 kHz oscillator is selected as an SCLK. RTC_VDD
and RTC_VSS provides an isolated power supply to ensure RTC operation in the event of
loss of line power when a battery is provided. For more details, see On-Chip Oscillators on
page 335.
PS019217-1222
eZ80F91 MCU
Product Specification
26
PLL Clock—The eZ80F91 internal PLL driven by external crystals or external crystal
oscillators in the range of 1 MHz to 10 MHz generates an SCLK up to 50 MHz. For more-
details, see Phase-Locked Loop on page 265.
PS019217-1222
eZ80F91 MCU
Product Specification
27
Register Map
All on-chip peripheral registers are accessed in the I/O address space. All I/O operations
employ 16-bit addresses. The upper byte of the 24-bit address bus is undefined during all
I/O operations (ADDR[23:16] = XX). All I/O operations using 16-bit addresses within the
0000h–00FFh range are routed to the on-chip peripherals. External I/O chip selects are
not generated if the address space programmed for the I/O chip selects overlap the
0000h–00FFh address range.
Registers at unused addresses within the 0000h–00FFh range assigned to on-chip periph-
erals are not implemented. Read access to such addresses returns unpredictable values and
Write access produces no effect. Table 3 lists the register map for the eZ80F91 device.
Product ID
0000 ZDI_ID_L eZ80® Product ID Low Byte Register 08 R 252
0001 ZDI_ID_H eZ80 Product ID High Byte Register 00 R 252
0002 ZDI_ID_REV eZ80 Product ID Revision Register XX R 252
Interrupt Priority
0010 INT_P0 Interrupt Priority Register—Byte 0 00 R/W 61
0011 INT_P1 Interrupt Priority Register—Byte 1 00 R/W 61
0012 INT_P2 Interrupt Priority Register—Byte 2 00 R/W 61
0013 INT_P3 Interrupt Priority Register—Byte 3 00 R/W 61
0014 INT_P4 Interrupt Priority Register—Byte 4 00 R/W 61
0015 INT_P5 Interrupt Priority Register—Byte 5 00 R/W 61
PS019217-1222
eZ80F91 MCU
Product Specification
28
PS019217-1222
eZ80F91 MCU
Product Specification
29
PS019217-1222
eZ80F91 MCU
Product Specification
30
PLL
005C PLL_DIV_L PLL Divider Register—Low Byte 00 W 268
005D PLL_DIV_H PLL Divider Register—High Byte 00 W 269
005E PLL_CTL0 PLL Control Register 0 00 R/W 269
005F PLL_CTL1 PLL Control Register 1 00 R/W 271
PS019217-1222
eZ80F91 MCU
Product Specification
31
PS019217-1222
eZ80F91 MCU
Product Specification
32
PS019217-1222
eZ80F91 MCU
Product Specification
33
Watchdog Timer
0093 WDT_CTL Watchdog Timer Control Register 08/28 R/W 117
0094 WDT_RR Watchdog Timer Reset Register XX W 119
PS019217-1222
eZ80F91 MCU
Product Specification
34
PS019217-1222
eZ80F91 MCU
Product Specification
35
Infrared Encoder/Decoder
00BF IR_CTL Infrared Encoder/Decoder Control 00 R/W 199
PS019217-1222
eZ80F91 MCU
Product Specification
36
I2C
00C8 I2C_SAR I2C Slave Address Register 00 R/W 224
2
00C9 I2C_XSAR I C Extended Slave Address Register 00 R/W 224
00CA I2C_DR I2C Data Register 00 R/W 225
2
00CB I2C_CTL I C Control Register 00 R/W 226
General-Purpose Input/Output Ports
00CE PC_ALT0 Port C Alternate Register 0 00 W 56
00CF PD_ALT0 Port D Alternate Register 0 00 W 56
2
00CC I2C_SR I C Status Register F8 R 227
I2C_CCR I2C Clock Control Register 00 W 229
2
00CD I2C_SRR I C Software Reset Register XX W 230
Low-Power Control
PS019217-1222
eZ80F91 MCU
Product Specification
37
Real-Time Clock
00E0 RTC_SEC RTC Seconds Register XX R/W 161
00E1 RTC_MIN RTC Minutes Register XX R/W 162
00E2 RTC_HRS RTC Hours Register XX R/W 163
00E3 RTC_DOW RTC Day-of-the-Week Register 0X R/W 164
00E4 RTC_DOM RTC Day-of-the-Month Register XX R/W 165
00E5 RTC_MON RTC Month Register XX R/W 166
00E6 RTC_YR RTC Year Register XX R/W 167
00E7 RTC_CEN RTC Century Register XX R/W 168
00E8 RTC_ASEC RTC Alarm Seconds Register XX R/W 169
00E9 RTC_AMIN RTC Alarm Minutes Register XX R/W 170
00EA RTC_AHRS RTC Alarm Hours Register XX R/W 171
00EB RTC_ADOW RTC Alarm Day-of-the-Week Register 0X R/W 172
00EC RTC_ACTRL RTC Alarm Control Register 00 R/W 173
00ED RTC_CTRL RTC Control Register x0xxxx00 R/W 174
b/
x0xxxx10
b4
PS019217-1222
eZ80F91 MCU
Product Specification
38
PS019217-1222
eZ80F91 MCU
Product Specification
39
Features
The features of eZ80 CPU include:
• Code-compatible with Z80 and Z180 products
• 24-bit linear address space
• Single-cycle instruction fetch
• Pipelined fetch, decode, and execute
• Dual Stack Pointers for ADL (24-bit) and Z80 (16-bit) memory modes
• 24-bit CPU registers and Arithmetic Logic Unit (ALU)
• Debug support
• Nonmaskable Interrupt (NMI), plus support for 128 maskable vectored interrupts
New Instructions
The new instructions are listed below:
• Loads/unloads the I register with a 16-bit value. These new instructions are:
– LD I,HL (ED C7)
– LD HL,I (ED D7)
For more information on the CPU, its instruction set, and eZ80 programming, refer to
eZ80 CPU User Manual (UM0077), available on www.zilog.com.
PS019217-1222
eZ80F91 MCU
Product Specification
40
PS019217-1222
eZ80F91 MCU
Product Specification
41
Reset
The Reset controller within the eZ80F91 device features a consistent reset function for all
types of resets that affects the system. A system reset, referred in this document as RESET,
returns the eZ80F91 to a defined state. All internal registers affected by a RESET return to
their default conditions. RESET configures the GPIO port pins as inputs and clears the
CPU’s Program Counter to 000000h. Program code execution ceases during RESET.
The events that cause a RESET are:
• Power-on reset (POR).
• Low-Voltage Brownout (VBO).
• External RESET pin assertion.
• Watchdog Timer (WDT) time-out when configured to generate a RESET.
• Real-Time Clock alarm with the CPU in low-power SLEEP mode.
• Execution of a Debug RESET command.
During RESET, an internal RESET mode timer holds the system in RESET for 1025
system clock (SCLK) cycles to allow sufficient time for the primary crystal oscillator to
stabilize. For internal RESET sources, the RESET mode timer begins incrementing on the
next rising edge of SCLK following deactivation of the signal that is initiating the RESET
event. For external RESET pin assertion, the RESET mode timer begins on the next rising
edge of SCLK following assertion of the RESET pin for three consecutive SCLK cycles.
Note: The default clock source for SCLK on RESET is the crystal input (XIN). See the CLK_MUX
values in the PLL Control Register 0, (see Table 154 on page 269).
PS019217-1222
eZ80F91 MCU
Product Specification
42
Power-On Reset
A POR occurs every time the supply voltage to the part rises from below the Voltage
Brownout threshold (VVBO) to above the POR voltage threshold (VPOR). The internal
bandgap-referenced voltage detector sends a continuous RESET signal to the Reset con-
troller until the supply voltage (VCC) exceeds the POR voltage threshold. After VCC rises
above VPOR, an on-chip analog delay element briefly maintains the RESET signal to the
Reset controller. After this analog delay element times out, the Reset controller holds the
eZ80F91 in RESET until the RESET mode timer expires. POR operation is displayed in
Figure 3. The signals in Figure 3 are not drawn to scale but for displaying purposes only.
VCC = 3.3V
VPOR
VVBO
System Clock
Oscillator
Startup
Internal RESET
Signal
PS019217-1222
eZ80F91 MCU
Product Specification
43
Voltage
Program Execution Brown-out Program Execution
System Clock
Internal RESET
Signal
RESET mode
TANA timer delay
PS019217-1222
eZ80F91 MCU
Product Specification
44
PS019217-1222
eZ80F91 MCU
Product Specification
45
Low-Power Modes
The eZ80F91 device provides a range of power-saving features. The highest level of
power reduction is provided by SLEEP mode with all peripherals disabled, including
VBO. The next level of power reduction is provided by the HALT instruction. The most
basic level of power reduction is provided by the clock peripheral power-down registers.
SLEEP Mode
Execution of the CPU’s SLP instruction puts the eZ80F91 device into SLEEP mode. In
SLEEP mode, the operating characteristics are:
• The primary crystal oscillator is disabled.
• The system clock is disabled.
• The CPU is idle.
• The Program Counter (PC) stops incrementing.
• The 32 kHz crystal oscillator continues to operate and drives the real-time clock and
WDT (if WDT is configured to operate from the 32 kHz oscillator).
The CPU is brought out of SLEEP mode by any of the following operations:
• A RESET via the external RESET pin driven Low.
• A RESET via a real-time clock alarm.
• A RESET via a WDT time-out (if running out of the 32 kHz oscillator and configured
to generate a RESET on time-out).
• A RESET via execution of a Debug RESET command.
• A RESET via the Low-Voltage Brownout (VBO) detection circuit, if enabled.
After exiting SLEEP mode, the standard RESET delay occurs to allow the primary crystal
oscillator to stabilize. For more information, see Figure 4 on page 43.
HALT Mode
Execution of the CPU’s HALT instruction puts the eZ80F91 device into HALT mode.
In HALT mode, the operating characteristics are:
• The primary crystal oscillator is enabled and continues to operate.
• The system clock is enabled and continues to operate.
• The CPU is idle.
PS019217-1222
eZ80F91 MCU
Product Specification
46
The CPU is brought out of HALT mode by any of the following operations:
• A nonmaskable interrupt (NMI).
• A maskable interrupt.
• A RESET via the external RESET pin driven Low.
• A Watchdog Timer time-out (if, configured to generate either an NMI or RESET upon
time-out).
• A RESET via execution of a Debug RESET command.
• A RESET via the Low-Voltage Brownout detection circuit, if enabled.
To minimize current in HALT mode, the system clock must be gated-off for all unused
on-chip peripherals via the Clock Peripheral Power-Down Registers.
PS019217-1222
eZ80F91 MCU
Product Specification
47
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
CPU Access R/W R/W R/W R/W R/W R/W R/W R/W
Note: R/W = Read/Write.
PS019217-1222
eZ80F91 MCU
Product Specification
48
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
CPU Access R/W R/W R R R/W R/W R/W R/W
Note: R = Read Only; R/W = Read/Write.
PS019217-1222
eZ80F91 MCU
Product Specification
49
General-Purpose Input/Output
The eZ80F91 device features 32 General-Purpose Input/Output (GPIO) pins. The GPIO
pins are assembled as four 8-bit ports—Port A, Port B, Port C, and Port D. All port signals
are configured as either inputs or outputs. In addition, all the port pins are used as vectored
interrupt sources for the CPU.
The eZ80F91 microcontroller’s GPIO ports are slightly different from its eZ80®
predecessors. Specifically, Port A pins source 8 mA and sink 10 mA. In addition, the
Port B and C inputs now feature Schmitt-trigger input buffers.
GPIO Operation
GPIO operation is the same for all four GPIO ports (Ports A, B, C, and D). Each port
features eight GPIO port pins. The operating mode for each pin is controlled by four bits
that are divided between four 8-bit registers. The GPIO mode control registers are:
• Port x Data Register (Px_DR)
• Port x Data Direction Register (Px_DDR)
• Port x Alternate Register 1 (Px_ALT1)
• Port x Alternate Register 2 (Px_ALT2)
where x can be A, B, C, or D representing any of the four GPIO ports. The mode for each
pin is controlled by setting each register bit pertinent to the pin to be configured. For
example, the operating mode for port B pin 7 (PB7) is set by the values contained in
PB_DR[7], PB_DDR[7], PB_ALT1[7], and PB_ALT2[7].
The combination of the GPIO control register bits allows individual configuration of each
port pin for nine modes. In all modes, reading of the Port x Data register returns the
sampled state or level of the signal on the corresponding pin. Table 6 on page 50 lists the
function of each port signal based on these four register bits. After a RESET event, all
GPIO port pins are configured as standard digital inputs with the interrupts disabled.
In addition to the four mode control registers, each port has an 8-bit register, which is used
for clearing edge triggered interrupts. This register is the Port x Alternate register
0(Px_ALT0) where x can be A, B, C, or D representing the four GPIO ports. When a
GPIO pin is configured as an edge triggered interrupt, writing 1 to the corresponding bit of
the Px_ALT0 register clears the interrupt.
PS019217-1222
eZ80F91 MCU
Product Specification
50
Figure 5 on page 53 and Figure 6 on page 53 display the simplified block diagrams of the
GPIO port pin for the various modes.
GPIO Mode 1—Output
The port pin is configured as a standard digital output pin. The value written to the Port x
Data register (Px_DR) is driven on the pin.
GPIO Mode 2—Input
The port pin is configured as a standard digital input pin. The output is high impedance.
The value stored in the Port x Data register produces no effect. As in all modes, a read
from the Port x Data register returns the pin’s value. GPIO mode 2 is the default operating
mode following a RESET.
GPIO Mode 3—Open Drain
The port pin is configured as open-drain Input/Output. The GPIO pins do not feature an
internal pull-up to the supply voltage. To employ the GPIO pin in OPEN-DRAIN mode,
PS019217-1222
eZ80F91 MCU
Product Specification
51
an external pull-up resistor must connect the pin to the supply voltage. Writing 0 to the
Port x Data register outputs a Low at the pin. Writing 1 to the Port x Data register results in
high-impedance output.
GPIO Mode 4—Open Source
The port pin is configured as open-source I/O. The GPIO pins do not feature an internal
pull-down to the supply ground. To employ the GPIO pin in OPEN-SOURCE mode, an
external pull-down resistor must connect the pin to the supply ground. Writing 1 to the
Port x Data register outputs a High at the pin. Writing 0 to the Port x Data register results
in a high-impedance output.
GPIO Mode 5—Reserved
This mode produces a high-impedance output.
GPIO Mode 6—Dual Edge Triggered
The port pin is configured for dual edge-triggered interrupt mode. Both a rising and a
falling edge on this pin cause an interrupt request to be sent to the CPU. To select this
mode from the default mode (mode 2), you must:
1. Set Px_DR=1
2. Set Px_ALT2=1
3. Set Px_ALT1=0
4. Set Px_DDR=0
Writing a 1 to the Port x ALT0 register bit position corresponding to the interrupt request
clears the interrupt.
GPIO Mode 7—Alternate Functions
The port pin is configured to pass control over to the alternate (secondary) functions
assigned to the pin. For example, the alternate mode function for PC5 is the DSR1 input
signal to UART1 and the alternate mode function for PB4 is the timer 3 input capture.
When GPIO mode 7 is enabled, the pin output data and pin high-impedance control is
obtained from the alternate function's data output and high-impedance control,
respectively. The value in the Port x Data register produces no effect on operation. Input
signals are sampled by the system clock before being passed to the alternate input
function.
If the alternate function of a pin is an input and alternate function mode for that pin is not
enabled, the input is driven to a default non-asserted value. For example, in alternate mode
function, PC5 drives the DSR1 signal to UART1. As this signal is Low level true, the
DSR1 signal to UART1 is driven to 1 when PC5 is not in alternate mode function.
PS019217-1222
eZ80F91 MCU
Product Specification
52
PS019217-1222
eZ80F91 MCU
Product Specification
53
Mode 7(Input)
Modes 6,8,9
* Reading from the Px_DR returns
the value stored in this register
Figure 5. GPIO Port Pin Block Diagram for Input and Interrupt Modes
Mode 1
External Pull-down resistor
Mode 7 (Output) required for Mode 4
(Open source)
Figure 6. GPIO Port Pin Block Diagram for Output and Input/Output Mode
PS019217-1222
eZ80F91 MCU
Product Specification
54
GPIO Interrupts
Each port pin is used as an interrupt source. Interrupts are either level- or edge-triggered.
Level-Triggered Interrupts
When the port is configured for level-triggered interrupts (mode 8), the corresponding port
pin is open-drain. An interrupt request is generated when the level at the pin is the same as
the level stored in the Port x Data register. The port pin value is sampled by the system
clock. The input pin must be held at the selected interrupt level for a minimum of two
clock periods to initiate an interrupt. The interrupt request remains active as long as this
condition is maintained at the external source.
For example, if PA3 is programmed for low-level interrupt and the pin is forced Low for
two clock cycles, an interrupt request signal is generated from that port pin and sent to the
CPU. The interrupt request signal remains active until the external device driving PA3
forces the pin high. The CPU must be enabled to respond to interrupts for the interrupt
request signal to be acted upon.
PS019217-1222
eZ80F91 MCU
Product Specification
55
Edge triggered interrupts are cleared by writing 1 to the corresponding bit of the Px_ALT0
register. For example, if PD4 has been set up to generate an edge triggered interrupt, the
interrupt is cleared by writing a 1 to Px_ALT0[4].
Bit 7 6 5 4 3 2 1 0
Reset X X X X X X X X
CPU Access R/W R/W R/W R/W R/W R/W R/W R/W
Note: X = Undefined; R/W = Read/Write.
Bit 7 6 5 4 3 2 1 0
Reset 1 1 1 1 1 1 1 1
CPU Access R/W R/W R/W R/W R/W R/W R/W R/W
Note: R/W = Read/Write.
PS019217-1222
eZ80F91 MCU
Product Specification
56
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
CPU Access W W W W W W W W
Note: W = Write only
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
CPU Access R/W R/W R/W R/W R/W R/W R/W R/W
Note: R/W = Read/Write.
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
CPU Access R/W R/W R/W R/W R/W R/W R/W R/W
Note: R/W = Read/Write.
PS019217-1222
eZ80F91 MCU
Product Specification
57
Interrupt Controller
The interrupt controller on the eZ80F91 device routes the interrupt request signals from
the internal peripherals, external devices (via the internal port I/O), and the nonmaskable
interrupt (NMI) pin to the CPU.
Maskable Interrupts
On the eZ80F91 device, all maskable interrupts use the CPU’s vectored interrupt function.
The size of I register is modified to 16 bits in the eZ80F91 device differing from the previ-
ous versions of eZ80® CPU, to allow for a 16 MB range of interrupt vector table place-
ment. Additionally, the size of the IVECT register is increased from 8 bits to 9 bits to
provide an interrupt vector table that is expanded and more easily integrated with other
interrupts.
The vectors are 4 bytes (32 bits) apart, even though only 3 bytes (24 bits) are required.
A fourth byte is implemented for both programmability and expansion purposes.
Starting the interrupt vectors at 40h allows for easy implementation of the interrupt con-
troller vectors with the RST vectors. Table 12 lists the interrupt vector sources by priority
for each of the maskable interrupt sources. The maskable interrupt sources are listed in
order of their priority, with vector 40h being the highest-priority interrupt. In ADL mode,
the full 24-bit interrupt vector is located at starting address {I[15:1], IVECT[8:0]}, where
I[15:0] is the CPU’s Interrupt Page Address register.
PS019217-1222
eZ80F91 MCU
Product Specification
58
The program must store the interrupt service routine starting address in the
four-byte interrupt vector locations. For example in ADL mode, the three-byte address for
the SPI interrupt service routine is stored at {I[15:1], 07Ch}, {I[15:1], 07Dh}, and {I[15:1],
07Eh}. In Z80® mode, the two-byte address for the SPI interrupt service routine is stored at
{MBASE[7:0], I[7:1], 07Ch} and {MBASE, I[7:1], 07Dh}. The LSB is stored at the lower
address.
When one or more interrupt requests (IRQs) become active, an interrupt request is
generated by the interrupt controller and sent to the CPU. The corresponding 9-bit
interrupt vector for the highest-priority interrupt is placed on the 9-bit interrupt vector bus,
IVECT[8:0]. The interrupt vector bus is internal to the eZ80F91 device and is therefore
externally not visible. The response time of the CPU to an interrupt request is a function of
the current instruction being executed as well as the number of wait states being asserted.
The interrupt vector, {I[15:1], IVECT[8:0]} is visible on the address bus (ADDR[23:0]),
when the interrupt service routine begins. The response of the CPU to a vectored interrupt
on the eZ80F91 device is listed in Table 13 on page 59. Interrupt sources are required to be
active until the Interrupt Service Routine (ISR) starts.
Note: The lower bit of the I register is replaced with the MSB of the IVECT from the interrupt con-
troller. As a result, the interrupt vector table is required to be placed onto a 512-byte
PS019217-1222
eZ80F91 MCU
Product Specification
59
boundary. Setting the LSB of the I register produces no effect on the interrupt vector
address.
PS019217-1222
eZ80F91 MCU
Product Specification
60
PS019217-1222
eZ80F91 MCU
Product Specification
61
Table 14. Interrupt Priority Registers (INT_P0 = 0010h, INT_P1 = 0011h, INT_P2 = 0012h, INT_P3
= 0013h, INT_P4 = 0014h, INT_P5 = 0015h)
Bit 7 6 5 4 3 2 1 0
INT_P0 Reset 0 0 0 0 0 0 0 0
INT_P1 Reset 0 0 0 0 0 0* 0* 0
INT_P2 Reset 0 0 0 0 0 0 0 0
INT_P3 Reset 0 0 0 0 0 0 0 0
INT_P4 Reset 0 0 0 0 0 0 0 0
INT_P5 Reset 0 0 0 0 0 0 0 0
CPU Access R/W R/W R/W R/W R/W R/W R/W R/W
Note: X = Undefined; R/W = Read/Write, *Unused.
Bit
Position Value Description
7 0 Default Interrupt Priority
INT_PX
1 Level One Interrupt Priority
6 0 Default Interrupt Priority
INT_PX
1 Level One Interrupt Priority
5 0 Default Interrupt Priority
INT_PX
1 Level One Interrupt Priority
4 0 Default Interrupt Priority
INT_PX
1 Level One Interrupt Priority
3 0 Default Interrupt Priority
INT_PX
1 Level One Interrupt Priority
2 0 Default Interrupt Priority
INT_PX
1 Level One Interrupt Priority
1 0 Default Interrupt Priority
INT_PX
1 Level One Interrupt Priority
0 0 Default Interrupt Priority
INT_PX
1 Level One Interrupt Priority
PS019217-1222
eZ80F91 MCU
Product Specification
62
The Interrupt Vector Priority Control bits are listed in Table 15.
If more than one maskable interrupt is prioritized to a higher level (Level 1), the higher-
priority interrupts follow the priority order as listed in Table 14 on page 61. For example,
PS019217-1222
eZ80F91 MCU
Product Specification
63
Table 16 lists the maskable interrupts 044h (EMAC Tx), 084h (Port A 1), and 06Ch
(RTC) as elevated to priority Level 1. Table 17 lists the new interrupt priority for the top
ten maskable interrupts.
Priority
Register Setting Description
INT_P0 02h Increase 044h (EMAC Tx) to Priority Level 1
INT_P1 08h Increase 06Ch (RTC) to Priority Level 1
INT_P2 02h Increase 084h (Port A1) to Priority Level 1
INT_P3 00h Default priority
INT_P4 00h Default priority
INT_P5 00h Default priority
PS019217-1222
eZ80F91 MCU
Product Specification
64
In mode 9 operation, if the GPIO is already configured for mode 9 and if the trigger edge
must be changed (from falling to rising or from rising to falling), then the configuration
must be changed to another mode, such as Mode 2, and then changed back to mode 9. For
example, enter mode 2 by writing the registers in the sequence PxDR, Px_ALT2, Px_ALT1,
and Px_DDR. Next, change back to mode 9 by writing the registers in the sequence PxDR,
Px_ALT2, Px_ALT1, and Px_DDR.
In Mode 8 operation, if the GPIO is configured for level-sensitive interrupts, a Write value
to Px_DR after configuration must be the same Write value used when configuring the
GPIO.
PS019217-1222
eZ80F91 MCU
Product Specification
65
• On-chip Flash is not configured for the same address space, because on-chip Flash is
prioritized higher than all memory chip selects.
• On-chip RAM is not configured for the same address space, because on-chip RAM is
prioritized higher than Flash and all memory chip selects.
• No higher priority (lower number) chip select meets the above conditions.
• A memory access instruction must be executing.
If all the preceding conditions are satisfied to generate a memory chip select, then the fol-
lowing results occur:
• The appropriate chip select—CS0, CS1, CS2, or CS3 is asserted (driven Low).
• MREQ is asserted (driven Low).
• Depending on the instruction either RD or WR is asserted (driven Low).
PS019217-1222
eZ80F91 MCU
Product Specification
66
If the upper and lower bounds are set to the same value (CSx_UBR = CSx_LBR), then a
particular chip select is valid for a single 64 KB page.
Reset States
On RESET, chip select 0 is active for all addresses, because its Lower Bound register
resets to 00h and its Upper Bound register resets to FFh. All the other chip select Lower
and Upper Bound registers reset to 00h.
PS019217-1222
eZ80F91 MCU
Product Specification
67
Memory
Location
CS3_UBR = FFh FFFFFFh
CS3 Active
3 MB Address Space
CS3_LBR = D0h D00000h
CS2_UBR = CFh CFFFFFh
CS2 Active
3 MB Address Space
CS2_LBR = A0h A00000h
CS1_UBR = 9Fh 9FFFFFh
CS1 Active
2 MB Address Space
800000h
CS0_UBR = 7Fh 7FFFFFh
CS0 Active
8 MB Address Space
Table 18. Example: Register Values for Figure 7 Memory Chip Select
PS019217-1222
eZ80F91 MCU
Product Specification
68
If all of the foregoing conditions are met to generate an I/O chip select, then the following
results occur:
• The appropriate chip select—CS0, CS1, CS2, or CS3 is asserted (driven Low).
• IORQ is asserted (driven Low).
• Depending on the instruction, either RD or WR is asserted (driven Low).
Wait States
For each of the chip selects, programmable Wait states are asserted to provide external
devices with additional clock cycles to complete their Read or Write operations. The
number of wait states for a particular chip select is controlled by the 3-bit field
CSx_WAIT (CSx_CTL[7:5]). The Wait states are independently programmed to provide 0
to 7 Wait states for each chip select. The Wait states idle the CPU for the specified number
of system clock cycles.
PS019217-1222
eZ80F91 MCU
Product Specification
69
Wait eZ80
D Q CPU
Pin
System Clock
An example of wait state operation is illustrated in Figure 9 on page 70. In this example,
the chip select is configured to provide a single wait state. The external peripheral
accessed drives the WAIT pin Low to request assertion of an additional wait state. If the
WAIT pin is asserted for additional system clock cycles, wait states are added until the
WAIT pin is deasserted (active High).
PS019217-1222
eZ80F91 MCU
Product Specification
70
TCLK TWAIT
SCLK
ADDR[23:0]
DATA[7:0]
(output)
CSx
MREQ
RD
INSTRD
PS019217-1222
eZ80F91 MCU
Product Specification
71
CPU system clock cycles per bus mode state is also independently programmable. For
Intel bus mode, multiplexed address and data are selected in which both the lower byte of
the address and the data byte use the data bus, DATA[7:0]. Each of the bus modes are
explained in the following sections.
STATE T1 The Read cycle begins in State T1. The CPU drives the address onto the address bus and
the associated chip select signal is asserted.
STATE T2 During State T2, the RD signal is asserted. Depending on the instruction, either the MREQ
or IORQ signal is asserted. If the external WAIT pin is driven Low at least one CPU system
clock cycle prior to the end of State T2, additional Wait states (TWAIT) are asserted until the
WAIT pin is driven High.
STATE T3 During State T3, no bus signals are altered. The data is latched by the eZ80F91 at the rising
edge of the CPU system clock at the end of State T3.
During Write operations, Z80 Bus mode employs three states—T1, T2, and T3 as listed in
Table 20.
STATE T1 The Write cycle begins in State T1. The CPU drives the address onto the address bus, and
the associated chip select signal is asserted.
STATE T2 During State T2, the WR signal is asserted. Depending upon the instruction, either the
MREQ or IORQ signal is asserted. If the external WAIT pin is driven Low at least one CPU
system clock cycle prior to the end of State T2, additional wait states (TWAIT) are asserted
until the WAIT pin is driven High.
STATE T3 During State T3, no bus signals are altered.
PS019217-1222
eZ80F91 MCU
Product Specification
72
Z80® bus mode Read and Write timing is displayed in Figure 10 and Figure 11 on page
73. The Z80 bus mode states are configured for 1 to 15 CPU system clock cycles. In the
figures, each Z80 bus mode state is two CPU system clock cycles in duration. The figures
also display the assertion of 1 wait state (TWAIT) by the external peripheral during each
Z80 bus mode cycle.
T1 T2 TCLK T3
System Clock
ADDR[23:0]
DATA[7:0]
CSx
RD
WAIT
WR
MREQ
or IORQ
PS019217-1222
eZ80F91 MCU
Product Specification
73
T1 T2 TCLK T3
System Clock
ADDR[23:0]
DATA[7:0]
CSx
RD
WAIT
WR
MREQ
or IORQ
PS019217-1222
eZ80F91 MCU
Product Specification
74
Bus Mode
Controller
eZ80 Bus Mode Intel Bus
Signals (Pins) Signal Equvalents
INSTRD ALE
RD RD
WR WR
WAIT READY
MREQ MREQ
IORQ IORQ
ADDR[23:0] ADDR[23:0]
ADDR[7:0]
Multiplexed
DATA[7:0] Bus DATA[7:0]
Controller
Table 21. Intel Bus Mode Read States—Separate Address and Data Buses
STATE T1 The Read cycle begins in State T1. The CPU drives the address onto the address bus and
the associated chip select signal is asserted. The CPU drives the ALE signal High at the
beginning of T1. In the middle of T1, the CPU drives ALE Low to facilitate the latching of the
address.
STATE T2 During State T2, the CPU asserts the RD signal. Depending on the instruction, either the
MREQ or IORQ signal is asserted.
PS019217-1222
eZ80F91 MCU
Product Specification
75
Table 21. Intel Bus Mode Read States—Separate Address and Data Buses (Continued)
STATE T3 During State T3, no bus signals are altered. If the external READY (WAIT) pin is driven Low
at least one CPU system clock cycle prior to the beginning of State T3, additional wait states
(TWAIT) are asserted until the READY pin is driven High.
STATE T4 The CPU latches the Read data at the beginning of State T4. The CPU deasserts the RD
signal and completes the Intel bus mode cycle.
During Write operations with separate address and data buses, the Intel bus mode employs
four states—T1, T2, T3, and T4 as listed in Table 22.
Table 22. Intel Bus Mode Write States—Separate Address and Data Buses
STATE T1 The Write cycle begins in State T1. The CPU drives the address onto the address bus, the
associated chip select signal is asserted, and the data is driven onto the data bus. The CPU
drives the ALE signal High at the beginning of T1. During the middle of T1, the CPU drives
ALE Low to facilitate the latching of the address.
STATE T2 During State T2, the CPU asserts the WR signal. Depending on the instruction, either the
MREQ or IORQ signal is asserted.
STATE T3 During State T3, no bus signals are altered. If the external READY (WAIT) pin is driven Low
at least one CPU system clock cycle prior to the beginning of State T3, additional wait states
(TWAIT) are asserted until the READY pin is driven High.
STATE T4 The CPU deasserts the WR signal at the beginning of State T4. The CPU holds the data
and address buses till the end of T4. The bus cycle is completed at the end of T4.
Intel bus mode timing is displayed for a Read operation in Figure 13 on page 76 and for a
Write operation in Figure 14 on page 77. If the READY signal (external WAIT pin) is
driven Low prior to the beginning of State T3, additional wait states (TWAIT) are asserted
until the READY signal is driven High. The Intel bus mode states are configured for 2 to
15 CPU system clock cycles. In the Figure 13 on page 76 and Figure 14 on page 77, each
Intel bus mode state is 2 CPU system clock cycles in duration. Figure 13 on page 76 and
Figure 14 on page 77 also display the assertion of one Wait state (TWAIT) by the selected
peripheral.
PS019217-1222
eZ80F91 MCU
Product Specification
76
T1 T2 T3 TWAIT T4
System Clock
ADDR[23:0]
DATA[7:0]
CSx
ALE
RD
READY
WR
MREQ
or IORQ
Figure 13. Example: Intel Bus Mode Read Timing—Separate Address and Data Buses
PS019217-1222
eZ80F91 MCU
Product Specification
77
T1 T2 T3 TWAIT T4
System Clock
ADDR[23:0]
DATA[7:0]
CSx
ALE
WR
READY
RD
MREQ
or IORQ
Figure 14. Example: Intel Bus Mode Write Timing—Separate Address and Data Buses
PS019217-1222
eZ80F91 MCU
Product Specification
78
Table 23. Intel Bus Mode Read States—Multiplexed Address and Data Bus
STATE T1 The Read cycle begins in State T1. The CPU drives the address onto the DATA bus and the
associated chip select signal is asserted. The CPU drives the ALE signal High at the
beginning of T1. In the middle of T1, the CPU drives ALE Low to facilitate the latching of the
address.
STATE T2 During State T2, the CPU removes the address from the DATA bus and asserts the RD
signal. Depending upon the instruction, either the MREQ or IORQ signal is asserted.
STATE T3 During State T3, no bus signals are altered. If the external READY (WAIT) pin is driven Low
at least one CPU system clock cycle prior to the beginning of State T3, additional wait states
(TWAIT) are asserted until the READY pin is driven High.
STATE T4 The CPU latches the Read data at the beginning of State T4. The CPU deasserts the RD
signal and completes the Intel™ bus mode cycle.
During Write operations with multiplexed address and data, the Intel™ bus mode employs
four states—T1, T2, T3, and T4 as listed in Table 24.
Table 24. Intel Bus Mode Write States—Multiplexed Address and Data Bus
STATE T1 The Write cycle begins in State T1. The CPU drives the address onto the DATA bus and
drives the ALE signal High at the beginning of T1. During the middle of T1, the CPU drives
ALE Low to facilitate the latching of the address.
STATE T2 During State T2, the CPU removes the address from the DATA bus and drives the Write
data onto the DATA bus. The WR signal is asserted to indicate a Write operation.
STATE T3 During State T3, no bus signals are altered. If the external READY (WAIT) pin is driven Low
at least one CPU system clock cycle prior to the beginning of State T3, additional wait states
(TWAIT) are asserted until the READY pin is driven High.
STATE T4 The CPU deasserts the Write signal at the beginning of T4 identifying the end of the Write
operation. The CPU holds the data and address buses through the end of T4. The bus cycle
is completed at the end of T4.
Signal timing for Intel bus mode with multiplexed address and data is displayed for a Read
operation in Figure 15 on page 79 and for a Write operation in Figure 16 on page 80. In
Figure 15 on page 79 and Figure 16 on page 80, each Intel bus mode state is 2 CPU system
clock cycles in duration. Figure 15 on page 79 and Figure 16 on page 80 also display the
assertion of one wait state (TWAIT) by the selected peripheral.
PS019217-1222
eZ80F91 MCU
Product Specification
79
T1 T2 T3 TWAIT T4
System Clock
ADDR[23:0]
DATA[7:0]
CSx
ALE
RD
READY
WR
MREQ
or IORQ
Figure 15. Example: Intel Bus Mode Read Timing—Multiplexed Address and Data Bus
PS019217-1222
eZ80F91 MCU
Product Specification
80
T1 T2 T3 TWAIT T4
System Clock
ADDR[23:0]
DATA[7:0]
CSx
ALE
WR
READY
RD
MREQ
or IORQ
Figure 16. Example: Intel Bus Mode Write Timing—Multiplexed Address and Data Bus
PS019217-1222
eZ80F91 MCU
Product Specification
81
Bus Mode
Controller
eZ80 Bus Mode Motorola Bus
Signals (Pins) Signal Equvalents
INSTRD AS
RD DS
WR R/W
WAIT DTACK
MREQ MREQ
IORQ IORQ
ADDR[23:0] ADDR[23:0]
DATA[7:0] DATA[7:0]
During Write operations, the Motorola bus mode employs eight states—S0, S1, S2, S3,
S4, S5, S6, and S7 as listed in Table 25.
STATE S0 The Read cycle starts in state S0. The CPU drives R/W High to identify a Read cycle.
STATE S1 Entering state S1, the CPU drives a valid address on the address bus, ADDR[23:0].
STATE S2 On the rising edge of state S2, the CPU asserts AS and DS.
STATE S3 During state S3, no bus signals are altered.
STATE S4 During state S4, the CPU waits for a cycle termination signal DTACK (WAIT), a peripheral
signal. If the termination signal is not asserted at least one full CPU clock period prior to the
rising clock edge at the end of S4, the CPU inserts WAIT (TWAIT) states until DTACK is
asserted. Each wait state is a full bus mode cycle.
STATE S5 During state S5, no bus signals are altered.
PS019217-1222
eZ80F91 MCU
Product Specification
82
STATE S6 During state S6, data from the external peripheral device is driven onto the data bus.
STATE S7 On the rising edge of the clock entering state S7, the CPU latches data from the addressed
peripheral device and deasserts AS and DS. The peripheral device deasserts DTACK at
this time.
The eight states for a Write operation in Motorola bus mode are listed in Table 26.
STATE S0 The Write cycle starts in S0. The CPU drives R/W High (if a preceding Write cycle leaves R/
W Low).
STATE S1 Entering S1, the CPU drives a valid address on the address bus.
STATE S2 On the rising edge of S2, the CPU asserts AS and drives R/W Low.
STATE S3 During S3, the data bus is driven out of the high-impedance state as the data to be written is
placed on the bus.
STATE S4 At the rising edge of S4, the CPU asserts DS. The CPU waits for a cycle termination signal
DTACK (WAIT). If the termination signal is not asserted at least one full CPU clock period
prior to the rising clock edge at the end of S4, the CPU inserts WAIT (TWAIT) states until
DTACK is asserted. Each wait state is a full bus mode cycle.
STATE S5 During S5, no bus signals are altered.
STATE S6 During S6, no bus signals are altered.
STATE S7 On entering S7, the CPU deasserts AS and DS. As the clock rises at the end of S7, the CPU
drives R/W High. The peripheral device deasserts DTACK at this time.
Signal timing for Motorola bus mode is displayed for a Read operation in Figure 18 on
page 83 and for a Write operation in Figure 19 on page 84. In these two figures, each
Motorola bus mode state is 2 CPU system clock cycles in duration.
PS019217-1222
eZ80F91 MCU
Product Specification
83
S0 S1 S2 S3 S4 S5 S6 S7
System Clock
ADDR[23:0]
DATA[7:0]
CSx
AS
DS
R/W
DTACK
MREQ
or IORQ
PS019217-1222
eZ80F91 MCU
Product Specification
84
S0 S1 S2 S3 S4 S5 S6 S7
System Clock
ADDR[23:0]
DATA[7:0]
CSx
AS
DS
R/W
DTACK
MREQ
or IORQ
PS019217-1222
eZ80F91 MCU
Product Specification
85
Table 27. Chip Select x Lower Bound Register (CS0_LBR = 00A8h, CS1_LBR = 00ABh,
CS2_LBR = 00AEh, CS3_LBR = 00B1h)
Bit 7 6 5 4 3 2 1 0
CS0_LBR Reset 0 0 0 0 0 0 0 0
CS1_LBR Reset 0 0 0 0 0 0 0 0
CS2_LBR Reset 0 0 0 0 0 0 0 0
CS3_LBR Reset 0 0 0 0 0 0 0 0
CPU Access R/W R/W R/W R/W R/W R/W R/W R/W
Note: R/W = Read/Write.
Bit
Position Value Description
[7:0] 00h–F For Memory Chip Selects (CSx_IO = 0)
CSX_LBR Fh This byte specifies the lower bound of the chip select address
range. The upper byte of the address bus, ADDR[23:16], is
compared to the values contained in these registers for
determining whether a Memory chip select signal must be
generated.
For I/O Chip Selects (CSx_IO = 1)
This byte specifies the chip select address value. ADDR[15:8] is
compared to the values contained in these registers for
determining whether an I/O chip select signal must be generated.
PS019217-1222
eZ80F91 MCU
Product Specification
86
Table 28. Chip Select x Upper Bound Register (CS0_UBR = 00A9h, CS1_UBR = 00ACh,
CS2_UBR = 00AFh, CS3_UBR = 00B2h)
Bit 7 6 5 4 3 2 1 0
CS0_UBR Reset 1 1 1 1 1 1 1 1
CS1_UBR Reset 0 0 0 0 0 0 0 0
CS2_UBR Reset 0 0 0 0 0 0 0 0
CS3_UBR Reset 0 0 0 0 0 0 0 0
CPU Access R/W R/W R/W R/W R/W R/W R/W R/W
Note: R/W = Read/Write.
Bit
Position Value Description
[7:0] 00h–F For Memory Chip Selects (CSx_IO = 0)
CSX_UBR Fh This byte specifies the upper bound of the chip select address
range. The upper byte of the address bus, ADDR[23:16], is
compared to the values contained in these registers for
determining whether a chip select signal must be generated.
For I/O Chip Selects (CSx_IO = 1)
No effect.
PS019217-1222
eZ80F91 MCU
Product Specification
87
Table 29. Chip Select x Control Register (CS0_CTL = 00AAh, CS1_CTL = 00ADh,
CS2_CTL = 00B0h, CS3_CTL = 00B3h)
Bit 7 6 5 4 3 2 1 0
CS0_CTL Reset 1 1 1 0 1 0 0 0
CS1_CTL Reset 0 0 0 0 0 0 0 0
CS2_CTL Reset 0 0 0 0 0 0 0 0
CS3_CTL Reset 0 0 0 0 0 0 0 0
CPU Access R/W R/W R/W R/W R/W R R R
Note: R/W = Read/Write; R = Read Only.
Bit
Position Value Description
[7:5] 000 0 wait states are asserted when this chip select is active.
CSX_WAIT
001 1 wait state is asserted when this chip select is active.
010 2 wait states are asserted when this chip select is active.
011 3 wait states are asserted when this chip select is active.
100 4 wait states are asserted when this chip select is active.
101 5 wait states are asserted when this chip select is active.
110 6 wait states are asserted when this chip select is active.
111 7 wait states are asserted when this chip select is active.
4 0 Chip select is configured as a memory chip select.
CSX_IO
1 Chip select is configured as an I/O chip select.
3 0 Chip select is disabled.
CSX_EN
1 Chip select is enabled.
[2:0] 000 Reserved.
PS019217-1222
eZ80F91 MCU
Product Specification
88
Table 30. Chip Select x Bus Mode Control Register (CS0_BMC = 00F0h, CS1_BMC =
00F1h, CS2_BMC = 00F2h, CS3_BMC = 00F3h)
Bit 7 6 5 4 3 2 1 0
CS0_BMC Reset 0 0 0 0 0 0 1 0
CS1_BMC Reset 0 0 0 0 0 0 1 0
CS2_BMC Reset 0 0 0 0 0 0 1 0
CS3_BMC Reset 0 0 0 0 0 0 1 0
CPU Access R/W R/W R/W R R/W R/W R/W R/W
Note: R/W = Read/Write; R = Read Only.
Bit
Position Value Description
[7:6] 00 eZ80 bus mode
BUS_MODE
01 Z80 bus mode
10 Intel™ bus mode
11 Motorola bus mode
5 0 Separate address and data
AD_MUX
1 Multiplexed address and data—appears on data bus
DATA[7:0]
4 0 Reserved
PS019217-1222
eZ80F91 MCU
Product Specification
89
Bit
Position Value Description
[3:0] 0000 Not valid.
BUS_CYCLE
0001 Each bus mode state is 1 eZ80® clock cycle in duration.1, 2, 3
0010 Each bus mode state is 2 eZ80 clock cycles in duration.
0011 Each bus mode state is 3 eZ80 clock cycles in duration.
0100 Each bus mode state is 4 eZ80 clock cycles in duration.
0101 Each bus mode state is 5 eZ80 clock cycles in duration.
0110 Each bus mode state is 6 eZ80 clock cycles in duration.
0111 Each bus mode state is 7 eZ80 clock cycles in duration.
1000 Each bus mode state is 8 eZ80 clock cycles in duration.
1001 Each bus mode state is 9 eZ80 clock cycles in duration.
1010 Each bus mode state is 10 eZ80 clock cycles in duration.
1011 Each bus mode state is 11 eZ80 clock cycles in duration.
1100 Each bus mode state is 12 eZ80 clock cycles in duration.
1101 Each bus mode state is 13 eZ80 clock cycles in duration.
1110 Each bus mode state is 14 eZ80 clock cycles in duration.
1111 Each bus mode state is 15 eZ80 clock cycles in duration.
Notes
1. Setting the BUS_CYCLE to 1 in Intel bus mode causes the ALE pin to not function properly.
2. Use of the external WAIT input pin in Z80 mode requires that BUS_CYCLE is set to a value
greater than 1.
3. BUS_CYCLE produces no effect in eZ80 mode.
Bus Arbiter
The Bus Arbiter within the eZ80F91 allows external bus masters to gain control of the
CPU memory interface bus. During normal operation, the eZ80F91 device is the bus mas-
ter. External devices request master use of the bus by asserting the BUSREQ pin. The Bus
Arbiter forces the CPU to release the bus after completing the current instruction. When
the CPU releases the bus, the Bus Arbiter asserts the BUSACK pin to notify the external
device that it can master the bus. When an external device assumes control of the memory
interface bus, the bus acknowledge cycle is complete. Table 31 on page 90 lists the status
of the pins on the eZ80F91 device during bus acknowledge cycles.
During a bus acknowledge cycle, the bus interface pins of the eZ80F91 device are used by
an external bus master to control the memory and I/O chip selects.
PS019217-1222
eZ80F91 MCU
Product Specification
90
Normal bus operation of the eZ80F91 device using CS0 to communicate to an external
peripheral is displayed in Figure 20 on page 91. Figure 21 on page 91 displays an external
bus master communicating with an external peripheral during bus acknowledge cycles.
PS019217-1222
eZ80F91 MCU
Product Specification
91
WAIT
RD
External WR External
Master DATA
Peripheral
ADDRESS
IORQ
eZ80F91
MREQ Chip Select
Wait State
CS0
Generator
CS1
CS2
CS3
Figure 20. Memory Interface Bus Operation During CPU Bus Cycles, Normal Operation
WAIT
RD
External WR External
Master DATA
Peripheral
ADDRESS
IORQ
eZ80F91
MREQ Chip Select
Wait State
CS0
Generator
CS1
CS2
CS3
Figure 21. Memory Interface Bus Operation During Bus Acknowledge Cycles
During bus acknowledge cycles, the Memory and I/O chip select logic is controlled by the
external address bus and external IORQ and MREQ signals.
PS019217-1222
eZ80F91 MCU
Product Specification
92
The following chip select features are not available during bus acknowledge cycles:
• The chip select logic does not insert wait states during bus acknowledge cycles regard-
less of the WAIT configuration for the decoded chip select.
• The bus mode controller does not function during bus acknowledge cycles.
• Internal registers and memory addresses in the eZ80F91 device are not accessible dur-
ing bus acknowledge cycles.
PS019217-1222
eZ80F91 MCU
Product Specification
93
Memory
Location
FFFFFFh
7AFFFFh
8 KB
General-Purpose
RAM RAM_ADDR_U
7AE000h
7ADFFFh 7Ah
8 KB
EMAC SRAM
7AC000h
000000h
When enabled, on-chip RAM assumes priority over on-chip Flash memory and any mem-
ory chip selects that is also enabled in the same address space. If an address is generated in
a range that is covered by both the RAM address space and a particular memory chip
PS019217-1222
eZ80F91 MCU
Product Specification
94
select address space, the memory chip select is not activated. On-chip RAM is not accessi-
ble to external devices during bus acknowledge cycles.
Bit 7 6 5 4 3 2 1 0
Reset 1 1 0 0 0 0 0 0
Bit
Position Value Description
7 0 On-chip general-purpose RAM is disabled.
GPRAM_EN
1 On-chip general-purpose RAM is enabled.
6 0 On-chip EMAC RAM is disabled.
ERAM_EN
1 On-chip EMAC RAM is enabled.
[5:0] 000000 Reserved.
PS019217-1222
eZ80F91 MCU
Product Specification
95
Bit 7 6 5 4 3 2 1 0
Reset 1 1 1 1 1 1 1 1
CPU Access R/W R/W R/W R/W R/W R/W R/W R/W
Note: R/W = Read/Write.
Bit
Position Value Description
[7:0] 00h–F This byte defines the upper byte of the RAM address. When
RAM_ADDR_U Fh enabled, the general-purpose RAM address space ranges from
{RAM_ADDR_U, E000h} to {RAM_ADDR_U, FFFFh}. When
enabled, the EMAC RAM address space ranges from
{RAM_ADDR_U, C000h} to {RAM_ADDR_U, DFFFh}.
PS019217-1222
eZ80F91 MCU
Product Specification
96
MBIST Control
There are two Memory Built-In Self-Test (MBIST) controllers for the RAM blocks on the
eZ80F91. MBIST_GPR is for General-Purpose RAM and MBIST_EMR is for EMAC
RAM. Writing a 1 to MBIST_ON starts the MBIST testing. Writing a 0 to MBIST_ON
stops the MBIST testing. On completion of the MBIST testing, MBIST_ON is
automatically reset to 0. If RAM passes MBIST testing, MBIST_PASS is 1. The value in
MBIST_PASS is only valid when MBIST_DONE is High. See Table 34.
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
PS019217-1222
eZ80F91 MCU
Product Specification
97
Flash Memory
The eZ80F91 device features 256 KB (262,144 bytes) of non-volatile Flash memory with
Read/Write/Erase capability. The main Flash memory array is arranged in 128 pages with
8 rows per page and 256 bytes per row. In addition to main Flash memory, there are two
separately addressable rows which comprise a 512-byte information page.
In eight 32 KB blocks, 256 KB of main storage is protected. Protecting a 32 KB block
prevents Write or Erase operations. The lower 32 KB block (00000h–07FFFh) is pro-
tected using the external WP pin. This portion of memory is called the Boot block because
the CPU always starts executing code from this location at startup. If the application
requires external program memory, then the Boot block must at least contain a jump
instruction to move the Program Counter outside of the Flash memory space.
The Flash memory arrangement is displayed in Figure 23.
16 8
8 2 KB pages 256-byte rows
32 KB blocks per block per page
F
7 7
E
D
6 6
C
B
5 5
A
9
4 4
8
7
3 3
6
5
2 2
4
256
3 single-byte columns
1 1 per row
2
1
0 0 255 254 1 0
0
PS019217-1222
eZ80F91 MCU
Product Specification
98
ADDR 17
eZ80 Core FADDR 17 FDOUT 8
Interface DOUT 8
FDIN 8 Flash
256 KB
FCNTL 9 +
Flash 512 bytes
State MAIN_INFO
Machine
Flash
Control
Registers
CPUD OUT 8
FLASH_IRQ
PS019217-1222
eZ80F91 MCU
Product Specification
99
Memory Read
A memory Read operation uses the address bus and data bus of the eZ80F91 device to
read a single data byte from Flash memory. This Read operation is similar to reads from
RAM. To perform Flash memory reads, the FLASH_CTRL register must be configured to
enable memory access to Flash with the appropriate number of wait states. See Table 38
on page 105.
Only the main area of Flash memory is accessible via memory reads. The information
page must be read using I/O access.
I/O Read
A single-byte I/O Read operation uses I/O registers for setting the column, page, and row
address to be read. A Read of the FLASH_DATA register returns the contents of Flash
memory at the designated address. Each access to the FLASH_DATA register causes an
autoincrement of the Flash address stored in the Flash address registers (FLASH_PAGE,
FLASH_ROW, FLASH_COL). To allow for Flash memory access time, the
FLASH_CTRL register must be configured with the appropriate number of wait states.
See Table 38 on page 105.
1. The cumulative programming time since the last erase cannot exceed 31 ms for any
given row.
2. The same byte cannot be programmed more than once since the last erase.
PS019217-1222
eZ80F91 MCU
Product Specification
100
autoincrement of the Flash address stored in the Flash Address registers (FLASH_PAGE,
FLASH_ROW, FLASH_COL).
A typical sequence that performs a single-byte I/O Write is shown below. Because the
Write is self-timed, step 2 of the sequence is repeated back-to-back without requiring poll-
ing or interrupts.
1. Write the FLASH_PAGE, FLASH_ROW, and FLASH_COL registers with the
address of the byte to be written.
2. Write the data value to the FLASH_DATA register.
PS019217-1222
eZ80F91 MCU
Product Specification
101
without first erasing it. Otherwise, the burden is on software to ensure that the 31 ms
maximum cumulative programming time between erases is not exceeded for a row.
Memory Write
A single-byte memory Write operation uses the address bus and data bus of the eZ80F91
device for programming a single data byte to Flash memory. While the CPU executes a
Load instruction, the Flash controller asserts the internal WAIT signal to stall the CPU
until the Write is complete. A single-byte Write takes between 66 µs and 85 µs to
complete. Programming an entire row using memory Writes therefore takes no more than
21.8 ms. This duration of time does not include time required by the CPU to transfer data
to the registers, which is a function of the instructions employed and the system clock
frequency.
The memory Write function does not support multibyte row programming. Because mem-
ory Writes are self-timed, they are performed back-to-back without requiring polling or
interrupts.
Mass Erase
Performing a MASS ERASE operation on Flash memory erases all bits contained in the
main Flash memory array. The information page remains unaffected unless the
FLASH_PAGE register bit 7(INFO_EN) is set. This self-timed operation takes
approximately 200 ms to complete.
Page Erase
The smallest erasable unit in Flash memory is a page. The pages to be erased, whether they
are the 128 main Flash memory pages or the information page, are determined by the set-
ting of the FLASH_PAGE register. This self-timed operation takes approximately 10 ms to
complete.
PS019217-1222
eZ80F91 MCU
Product Specification
102
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
CPU Access W W W W W W W W
Note: W = Write Only.
Bit
Position Value Description
[7:0] B6h, Sequential Write operations of the values B6h, 49h to this
FLASH_KEY 49h register will unlock the Flash Frequency Divider and Flash
Write/Erase Protection registers.
PS019217-1222
eZ80F91 MCU
Product Specification
103
Bit 7 6 5 4 3 2 1 0
Reset X X X X X X X X
CPU Access R/W R/W R/W R/W R/W R/W R/W R/W
Note: R/W = Read/Write.
PS019217-1222
eZ80F91 MCU
Product Specification
104
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
PS019217-1222
eZ80F91 MCU
Product Specification
105
Bit 7 6 5 4 3 2 1 0
Reset 1 0 0 0 1 0 0 0
PS019217-1222
eZ80F91 MCU
Product Specification
106
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 1
CPU Access R/W* R/W* R/W* R/W* R/W* R/W* R/W* R/W
Note: R/W = Read/Write, R = Read Only. *Key sequence required to enable Writes
PS019217-1222
eZ80F91 MCU
Product Specification
107
Writes to this register is allowed only after it is unlocked via the FLASH_KEY register.
Any attempted Writes to this register while locked will set it to FFh, thereby protecting all
blocks. See Table 41.
Bit 7 6 5 4 3 2 1 0
Reset 1 1 1 1 1 1 1 1
CPU Access R/W* R/W* R/W* R/W* R/W* R/W* R/W* R/W*
Note: R/W = Read/Write if unlocked, R = Read Only if locked. *Key sequence required to unlock.
PS019217-1222
eZ80F91 MCU
Product Specification
108
Row Program Time-Out—This bit signals a time-out during Row Programming. If the
current row program operation does not complete within 4864 Flash controller clocks,
the Flash controller terminates the row program operation by clearing bit 2 of the Flash
Program Control Register and sets the RP_TM0 error bit to 1.
Page Erase Violation—This bit indicates an attempt to erase a protected block of Flash
memory (the requested page was not erased).
Mass Erase Violation—This bit indicates an attempt to MASS ERASE when there are
one or more protected blocks in Flash memory (the MASS ERASE was not performed).
If the error condition interrupt is enabled, any of these four error conditions result in an
interrupt request being sent to the eZ80F91device’s interrupt controller. Reading the Flash
Interrupt Control register clears all error condition flags and the DONE flag. See Table 42
on page 109.
PS019217-1222
eZ80F91 MCU
Product Specification
109
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
PS019217-1222
eZ80F91 MCU
Product Specification
110
FLASH_DATA register causes an autoincrement of the Flash address stored in the Flash
Address registers (FLASH_PAGE, FLASH_ROW, FLASH_COL). See Table 43.
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
CPU Access R/W R/W R/W R/W R/W R/W R/W R/W
Note: R/W = Read/Write, R = Read Only.
Bit
Position Value Description
[7] 0 Flash I/O access to PAGE ERASE operations are directed to
INFO_EN main Flash memory. Info page is NOT affected by a MASS
ERASE operation.
1 Flash I/O access to PAGE ERASE operations are directed to
the information page. PAGE ERASE operations only affect
the information page. Info page is included during a MASS
ERASE operation.
[6:0] 00h–7Fh Page address of Flash memory to be used during the PAGE
FLASH_PAGE ERASE or I/O access of main Flash memory. When
INFO_EN is set to 1, this field is ignored.
PS019217-1222
eZ80F91 MCU
Product Specification
111
Bit 7 6 5 4 3 2 1 0
Reset X X X X X 0 0 0
Bit
Position Value Description
[7:3] 00h Reserved.
[2:0] 0h–7h Row address of Flash memory to be used during an I/O access
FLASH_ROW of Flash memory. When INFO_EN is 1 in the Flash Page Select
Register, values for this field are restricted to 0h–1h, which
selects between the two rows in the information page.
PS019217-1222
eZ80F91 MCU
Product Specification
112
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
CPU Access R/W R/W R/W R/W R/W R/W R/W R/W
Note: R/W = Read/Write, R = Read Only.
Bit
Position Value Description
[7:0] 00h–FFh Column address of Flash memory to be used during an I/O
FLASH_COL access of Flash memory.
PS019217-1222
eZ80F91 MCU
Product Specification
113
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
CPU Access R R R R R R/W R/W R/W
Note: R/W = Read/Write, R = Read Only.
Bit
Position Value Description
[7:3] 00h Reserved.
[2] 0 Row Program Disable or Row Program completed.
ROW_PGM
1 Row Program Enable. This bit automatically resets to 0 when
the row address reaches 256 or when the Row Program
operation times out.
[1] 0 Page Erase Disable (Page Erase completed).
PG_ERASE
1 Page Erase Enable. This bit automatically resets to 0 when the
PAGE ERASE operation is complete.
[0] 0 Mass Erase Disable (Mass Erase completed).
MASS_ERASE
1 Mass Erase Enable. This bit automatically resets to 0 when the
MASS ERASE operation is complete.
PS019217-1222
eZ80F91 MCU
Product Specification
114
PS019217-1222
eZ80F91 MCU
Product Specification
115
Watchdog Timer
The Watchdog Timer (WDT) helps protect against corrupt or unreliable software, power
faults, and other system-level problems which places the CPU into unsuitable operating
states. The eZ80F91 WDT features:
• Four programmable time-out ranges (depending on the WDT clock source). The four
ranges are:
– 03.2–5.20 ms
– 51.2–83.9 ms
– 0.50–0.82 sec
– 2.68–4.00 sec
Data[7:0]
Control Register/
Reset Register
WDT_CLK
RTC Clock
28-Bit
System Clock WDT Control Logic
Upcounter
RESET
PS019217-1222
eZ80F91 MCU
Product Specification
116
Table 47. WDT Approximate Time-Out Delays for Possible Clock Sources
WDT_CLK[ 00 01 10 11
3:2]
50 MHz system 32.768 kHz RTC Internal RC Reserved
clock clock oscillator (~10
kHz)
PS019217-1222
eZ80F91 MCU
Product Specification
117
If the NMI_OUT bit in the WDT_CTL register is set to 1, then on time-out, the WDT
asserts an NMI for CPU processing. The NMI_FLAG bit is polled by the CPU to deter-
mine the source of the NMI event.
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0/1 0 1 0 0 0
Bit
Position Value Description
7 0 WDT is disabled.
WDT_EN
1 WDT is enabled. When enabled, the WDT cannot be disabled
without a RESET.
6 0 WDT time-out resets the CPU.
NMI_OUT
1 WDT time-out generates a NMI to the CPU.
5 0 RESET caused by external full-chip reset or ZDI reset.
RST_FLAG
1 RESET caused by WDT time-out. This flag is set by the WDT
time-out, only if the NMI_OUT flag is set to 0. The CPU polls
this bit to determine the source of the RESET. This flag is
cleared by a non-WDT generated reset.
4 0 NMI caused by external source.
NMI_FLAG
1 NMI caused by WDT time-out. This flag is set by the WDT time-
out, only if the NMI_OUT flag is set to 1. The CPU polls this bit
to determine the source of the NMI. This flag is cleared by a
non-WDT NMI.
PS019217-1222
eZ80F91 MCU
Product Specification
118
Bit
Position Value Description
[3:2] 00 WDT clock source is system clock.
WDT_CLK
01 WDT clock source is Real-Time Clock source (32 kHz on-chip
oscillator or 50/60 Hz input as set by RTC_CTRL[4]).
10 WDT clock source is internal RC oscillator (10 kHz typical).
11 Reserved.
[1:0] 00 WDT_CLK = 00 WDT time-out period is 227 clock cycles.
WDT_PERIOD
WDT_CLK = 01 WDT time-out period is 217 clock cycles.
WDT_CLK = 10 WDT time-out period is 215 clock cycles.
WDT_CLK = 11 Reserved.
01 WDT_CLK = 00 WDT time-out period is 225 clock cycles.
WDT_CLK = 01 WDT time-out period is 214 clock cycles.
WDT_CLK = 10 WDT time-out period is 213 clock cycles.
WDT_CLK = 11 Reserved.
10 WDT_CLK = 00 WDT time-out period is 222 clock cycles.
WDT_CLK = 01 WDT time-out period is 211 clock cycles.
WDT_CLK = 10 WDT time-out period is 29 clock cycles.
WDT_CLK = 11 Reserved.
11 WDT_CLK = 00 WDT time-out period is 218 clock cycles.
WDT_CLK = 01 WDT time-out period is 27 clock cycles.
WDT_CLK = 10 WDT time-out period is 25 clock cycles.
WDT_CLK = 11 Reserved.
Note: When the WDT is enabled, no Writes are allowed to the WDT_CTL register.
PS019217-1222
eZ80F91 MCU
Product Specification
119
Bit 7 6 5 4 3 2 1 0
Reset X X X X X X X X
CPU Access W W W W W W W W
Note: X = Undefined; W = Write Only.
Bit
Position Value Description
[7:0] A5h The first Write value required to reset the WDT prior to a time-
WDT_RR out.
5Ah The second Write value required to reset the WDT prior to a
time-out. If an A5h, 5Ah sequence is written to WDT_RR, the
WDT timer is reset to its initial count value and counting
resumes.
PS019217-1222
eZ80F91 MCU
Product Specification
120
PS019217-1222
eZ80F91 MCU
Product Specification
121
Input Capture
CONTROL ICx
Registers
R
E
L 16-Bit
Comparator OCx
O Down Counter
A 16
D
16
PWM PWM
EOC IC OC PWR Trip PWM
Control
IRQ Control
IRQ
PS019217-1222
eZ80F91 MCU
Product Specification
122
To calculate the time-out period with the above equation while using an initial value of
0000h, enter a reload value of 65536 (FFFFh + 1).
PS019217-1222
eZ80F91 MCU
Product Specification
123
Minimum time-out duration is four times longer than the input clock period and is gener-
ated by setting the clock divider ratio to 1:4 and the reload value to 0001h. Maximum
time-out duration is 224 (16,777,216) times longer than the input clock period and is gen-
erated by setting the clock divider ratio to 1:256 and the reload value to 0000h.
System Clock
Clock Enable
TMR3_CTL Write
(Timer Enable)
T3 Count 0 4 3 2 1 0
Interrupt Request
CONTINUOUS Mode
In CONTINUOUS mode, when the end-of-count value, 0000h, is reached, the timer
automatically reloads the 16-bit start value from the Timer Reload registers,
PS019217-1222
eZ80F91 MCU
Product Specification
124
TMRx_RR_H and TMRx_RR_L. Downcounting continues on the next clock edge and
the timer continues to count until disabled. An example of the timer operating in
CONTINUOUS mode is displayed in Figure 28. Timer register information is listed in
Table 51.
System Clock
Clock Enable
TMR3_CTL Write
(Timer Enable)
T3 Count X 4 3 2 1 4 3 2 1
Interrupt
Request
Timer Interrupts
The terminal count flag (TMRx_IIR[EOC]) is set to 1 whenever the timer reaches 0000h,
its end-of-count value in SINGLE PASS mode, or when the timer reloads the start value in
CONTINUOUS mode. The terminal count flag is only set when the timer reaches 0000h
(or reloads) from 0001h. The timer interrupt flag is not set to 1 when the timer is loaded
with the value 0000h, which selects the maximum time-out period.
The CPU is programmed to poll the EOC bit for the time-out event. Alternatively, an inter-
rupt service request signal is sent to the CPU by setting the TMRx_IER[EOC] bit to 1.
PS019217-1222
eZ80F91 MCU
Product Specification
125
And when the end-of-count value (0000h) is reached, the EOC bit is set to 1 and an inter-
rupt service request signal is passed to the CPU. The interrupt service request signal is
deactivated by a CPU read of the timer interrupt identification register, TMRx_IIR.
All bits in that register are reset by the Read.
The response of the CPU to this interrupt service request is a function of the CPU’s inter-
rupt enable flag, IEF1. For more information about this flag, refer to the eZ80® CPU User
Manual (UM0077) available on www.zilog.com.
Timer Output
The timer count is directed to the GPIO output pins, if required. To enable the Timer
Output feature, the GPIO port pin must be configured as an output and for alternate func-
tions. The GPIO output pin toggles each time the timer reaches its end-of-count value.
In CONTINUOUS mode operation, enabling the Timer Output feature results in a Timer
Output signal period which is twice the timer time-out period. Examples of Timer Output
operation is displayed in Figure 29 on page 126 and listed in Table 52 on page 126. The
initial value for the timer output is zero.
Logic to support timer output exists in all timers; but for the eZ80F91 device, only Timer
0 and 2 route the actual timer output to the pins. Because Timer 3 uses the TOUT pins for
PWMxN signals, the timer outputs are not available when using complementary PWM
outputs. See Table 52 on page 126 for details.
PS019217-1222
eZ80F91 MCU
Product Specification
126
System Clock
Clock Enable
TMR3_CTL Write
(Timer Enable)
T3 Count 0 4 3 2 1 4 3 2 1
Timer Out
(internal)
Timer Out
(at pad)
When the eZ80F91 device is running in DEBUG mode, encountering a break point causes
all CPU functions to halt. However, the timers keep running. This instance makes debug-
ging timer-related software much more difficult. Therefore, the control
register contains a BRK_STP bit. Setting this bit causes the count value to be held during
debug break points.
PS019217-1222
eZ80F91 MCU
Product Specification
127
• Timer 0
– No special functions
• Timer 1
– One event counter (EC0)
– Two input captures (IC0 and IC1)
• Timer 2
– One event counter (EC1)
• Timer 3
– Two input captures (IC2 and IC3)
– Four output compares (OC0, OC1, OC2, and OC3)
– Four PWM outputs (PWM0, PWM1, PWM2, and PWM3)
Timer 3 consists of three specialty modes. Each of these modes are enabled using bits in
their respective control registers (TMR3_CAP_CTL, TMR3_OC_CTL1,
TMR3_PWM_CTL1). When PWM mode is enabled, the OUTPUT COMPARE and
INPUT CAPTURE modes are not available. This instance is due to address space sharing
requirements. However, INPUT CAPTURE and OUTPUT COMPARE modes run
simultaneously.
Timers with specialty modes offer multiple ways to generate an interrupt. When the inter-
rupt controller services a timer interrupt, the software must read the timers interrupt iden-
tification register (TMRx_IIR) to determine the causes for an interrupt request. This
register is cleared each time it is read, allowing subsequent events to be identified without
interference from prior events.
Event Counter
When a timer is configured to take its input from a port input pin (ECx), it functions as an
event counter. For event counting, the clock prescaler is automatically bypassed and edges
(events) cause the timer to decrement. You must select the rising or the falling edge for
counting. Also, the port pins must be configured as inputs.
Input sampling on the port pins results in the counter being updated on the third rising
edge of the system clock after the edge event occurs at the port pin. Due to sampling, the
frequency of the event input is limited to one-half the system clock frequency under ideal
conditions. In practice, the event frequency must be less than this value due to duty cycle
variation and system clock jitter.
This EVENT COUNT mode is identical to basic timer operation, except for the clock
source. Therefore, interrupts are managed in the same manner.
PS019217-1222
eZ80F91 MCU
Product Specification
128
Input Capture
INPUT CAPTURE mode allows the CPU to determine the timing of specified events on a
set of external pins.
A timer intended for use in INPUT CAPTURE mode is setup the same way as in BASIC
mode, with one exception. The CPU must also write the TMRx_CAP_CTL register to
select the edge on which to capture: rising, falling, or both. When one of these events
occurs on an input capture pin, the current 16 bit timer value is latched into the capture
value register pair (TMRx_CAP_A or TMRx_CAP_B depending on the IC pin exhibiting
the event).
Reading the Low byte of the register pair causes the timer to ignore other capture events
on the associated external pin until the High byte is read. This instance prevents a
subsequent capture event from overwriting the High byte between the two Reads and
generating an invalid capture value. The capture value registers are Read Only.
A capture flag (ICA or ICB) in the TMRx_IIR register is set whenever a capture event
occurs. Setting the interrupt identification register bit TMRx_IER[IRQ_ICx_EN] enables
the capture event to generate a timer interrupt. The port pins must be configured as
alternate functions, see GPIO Mode 7—Alternate Functions on page 51.
Output Compare
The output compare function reverses the input capture function. Rather than store a timer
value when an external event occurs, OUTPUT COMPARE mode waits until the timer
reaches a specified value, then generates an external event. Although the same base timer
is used, up to four separate external pins are driven each with its own compare value.
To use OUTPUT COMPARE mode, the CPU must first configure the basic timer
parameters. Then it must load up to four 16-bit compare values into the four TMR3_OCx
register pairs. Next, it must load the TMR3_ OC_CTL2 register to specify the event that
occurs on comparison. You can select the following events: SET, CLEAR, and TOGGLE.
Finally, the CPU must enable OUTPUT COMPARE mode by asserting
TMR3_OC_CTL1[OC_EN].
The initial value for the OCx pins in OUTPUT COMPARE mode is 0 by default. It is
possible to initialize this value to 1 or force a value at a later time. Setting the
TMR3_OC_CTL2[OCx_MODE] value to 0 forces the OCx pin to the selected state
provided by the TMR3_OC_CTL1[OCx_INIT] bits. Regardless of any compare events,
the pin stays at the forced value until OCx_MODE is changed. After release, it retains the
forced value until modified by an OUTPUT COMPARE event.
PS019217-1222
eZ80F91 MCU
Product Specification
129
Timer Function
GPIO Port GPIO Port PWM_CTL1 PWM_CTL1
Port Bits Mode MPWM_EN = 0 MPWM_EN = 1
A PA0 7 OC0 PWM0
PA1 7 OC1 PWM1
PA2 7 OC2 PWM2
PA3 7 OC3 PWM3
PWM_CTL1 PWM_CTL1
PAIR_EN = 0 PAIR_EN = 1
PA4 7 TOUT0 PWM0
PA5 7 TOUT2 PWM1
PA6 7 EC1 PWM2
PA7 7 PWM3
B PB0 7 IC0/EC0
PB1 7 IC1
PB4 7 IC2
PB5 7 IC3
PS019217-1222
eZ80F91 MCU
Product Specification
130
Timer Registers
The CPU monitors and controls the timer using seven 8-bit registers. These registers are
the control register, the interrupt identification register, the interrupt enable register and
the reload register pair (High and Low byte). There are also a pair of data registers used to
read the current timer count value.
The variable x can be 0, 1, 2, or 3 to represent each of the four available timers.
The Timer Data Register is Read Only, when the Timer Reload Register is Write Only.
The address space for these two registers is shared.
PS019217-1222
eZ80F91 MCU
Product Specification
131
– TMR3_OC_CTL2
• Compare Value Registers
– TMR3_OC3_H
– TMR3_OC3_L
– TMR3_OC2_H
– TMR3_OC2_L
– TMR3_OC1_H
– TMR3_OC1_L
– TMR3_OC0_H
– TMR3_OC0_L
PS019217-1222
eZ80F91 MCU
Product Specification
132
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
CPU Access R/W R/W R/W R/W R/W R/W R/W R/W
Note: R = Read only; R/W = Read/Write.
Bit
Position Value Description
0 The timer continues to operate during debug break points.
7
BRK_STOP 1 The timer stops operation and holds count value during debug
break points.
00 Timer source is the system clock divided by the prescaler.
01 Timer source is the Real Time Clock Input.
Timer source is the Event Count (ECx) input—falling edge.
[6:5] 10 For Timer 1 this is EC0.
CLK_SEL For Timer 2, this is EC1.
Timer source is the Event Count (ECx) input—rising edge.
11 For Timer 1 this is EC0.
For Timer 2, this is EC1.
00 System clock divider = 4.
PS019217-1222
eZ80F91 MCU
Product Specification
133
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
CPU Access R/W R/W R/W R/W R/W R/W R/W R/W
Note: R = Read only; R/W = Read/Write.
Bit
Position Value Description
7 0 Unused.
Interrupt requests for OC3 are disabled (valid only in
0
6 OUTPUT COMPARE mode). OC operations occur in Timer 3.
IRQ_OC3_EN Interrupt requests for OC3 are enabled (valid only in OUTPUT
1
COMPARE mode). OC operations occur in Timer 3.
Interrupt requests for OC2 are disabled (valid only in
0
5 OUTPUT COMPARE mode). OC operations occur in Timer 3.
IRQ_OC2_EN Interrupt requests for OC2 are enabled (valid only in OUTPUT
1
COMPARE mode). OC operations occur in Timer 3.
Interrupt requests for OC1 are disabled (valid only in
0
4 OUTPUT COMPARE mode). OC operations occur in Timer 3.
IRQ_OC1_EN Interrupt requests for OC1 are enabled (valid only in OUTPUT
1
COMPARE mode). OC operations occur in Timer 3.
Interrupt requests for OC0 are disabled (valid only in
0
3 OUTPUT COMPARE mode). OC operations occur in Timer 3.
IRQ_OC0_EN Interrupt requests for OC0 are enabled (valid only in OUTPUT
1
COMPARE mode). OC operations occur in Timer 3.
PS019217-1222
eZ80F91 MCU
Product Specification
134
PS019217-1222
eZ80F91 MCU
Product Specification
135
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
CPU Access R R R R R R R R
Note: R = Read only;
Bit
Position Value Description
7 0 Unused.
PS019217-1222
eZ80F91 MCU
Product Specification
136
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
CPU Access R R R R R R R R
Note: R = Read only.
Bit
Position Value Description
These bits represent the Low byte of the 2-byte timer data
[7:0] value, {TMRx_DR_H[7:0], TMRx_DR_L[7:0]}. Bit 7 is bit 7
00h–FFh
TMR_DR_L of the 16-bit timer data value. Bit 0 is bit 0 (lsb) of the 16-bit
timer data value.
PS019217-1222
eZ80F91 MCU
Product Specification
137
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
CPU Access R R R R R R R R
Note: R = Read only.
Bit
Position Value Description
These bits represent the High byte of the 2-byte timer data
[7:0] value, {TMRx_DR_H[7:0], TMRx_DR_L[7:0]}. Bit 7 is bit 15
00h–FFh
TMR_DR_H (msb) of the 16-bit timer data value. Bit 0 is bit 8 of the 16-bit
timer data value.
PS019217-1222
eZ80F91 MCU
Product Specification
138
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
CPU Access W W W W W W W W
Note: W = Write Only.
Bit
Position Value Description
These bits represent the Low byte of the 2-byte timer
[7:0] reload value, {TMRx_RR_H[7:0], TMRx_RR_L[7:0]}. Bit 7
00h–FFh
TMR_RR_L is bit 7 of the 16-bit timer reload value. Bit 0 is bit 0 (lsb) of
the 16-bit timer reload value.
PS019217-1222
eZ80F91 MCU
Product Specification
139
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
CPU Access W W W W W W W W
Note: W = Write Only.
Bit
Position Value Description
These bits represent the High byte of the 2-byte timer
[7:0] reload value, {TMRx_RR_H[7:0], TMRx_RR_L[7:0]}. Bit 7
00h–FFh
TMR_RR_H is bit 15 (msb) of the 16-bit timer reload value. Bit 0 is bit 8
of the 16-bit timer reload value.
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
CPU Access R/W R/W R/W R/W R/W R/W R/W R/W
Note: R = Read only; R/W = Read/Write.
Bit
Position Value Description
[7:4] 0000 Reserved
PS019217-1222
eZ80F91 MCU
Product Specification
140
Table 62. Timer Input Capture Value Register A—Low Byte (TMR1_CAPA_L =
006Bh, TMR3_CAPA_L = 007Ch)
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
CPU Access R R R R R R R R
Note: R = Read only.
Bit
Position Value Description
These bits represent the Low byte of the 2-byte capture
[7:0] value, {TMRx_CAPA_H[7:0], TMRx_CAPA_L[7:0]}. Bit 7 is
00h–FFh
TMRx_CAPA_L bit 7 of the 16-bit data value. Bit 0 is bit 0 (lsb) of the 16-bit
timer data value.
PS019217-1222
eZ80F91 MCU
Product Specification
141
Table 63. Timer Input Capture Value Register A—High Byte (TMR1_CAPA_H
= 006Ch, TMR3_CAPA_H = 007Dh)
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
CPU Access R R R R R R R R
Note: R = Read only.
Bit
Position Value Description
These bits represent the High byte of the 2-byte capture
[7:0] value, {TMRx_CAPA_H[7:0], TMRx_CAPA_L[7:0]}. Bit 7 is
00h–FFh
TMRx_CAPA_H bit 15 (msb) of the 16-bit data value. Bit 0 is bit 8 of the 16-
bit timer data value.
Table 64. Timer Input Capture Value Register B—Low Byte (TMR1_CAPB_L =
006Dh, TMR3_CAPB_L = 007Eh)
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
CPU Access R R R R R R R R
Note: R = Read only.
Bit
Position Value Description
These bits represent the Low byte of the 2-byte capture
[7:0] value, {TMRx_CAPB_H[7:0], TMRx_CAPB_L[7:0]}. Bit 7 is
00h–FFh
TMRx_CAPB_L bit 7 of the 16-bit data value. Bit 0 is bit 0 (lsb) of the
16-bit timer data value.
PS019217-1222
eZ80F91 MCU
Product Specification
142
Table 65. Timer Input Capture Value Register B—High Byte (TMR1_CAPB_H
= 006Eh, TMR3_CAPB_H = 007Fh)
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
CPU Access R R R R R R R R
Note: R = Read only.
Bit
Position Value Description
These bits represent the High byte of the 2-byte capture
[7:0] value, {TMRx_CAPB_H[7:0], TMRx_CAPB_L[7:0]}. Bit 7 is
00h–FFh
TMRx_CAPB_H bit 15 (msb) of the 16-bit data value. Bit 0 is bit 8 of the 16-
bit timer data value.
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
CPU Access R/W R/W R/W R/W R/W R/W R/W R/W
Note: R = Read only; R/W = Read/Write.
Bit
Position Value Description
[7:6] 00 Unused.
PS019217-1222
eZ80F91 MCU
Product Specification
143
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
CPU Access R/W R/W R/W R/W R/W R/W R/W R/W
Note: R/W = Read/Write.
Bit
Position Value Description
Initialize OC pin to value specified in
00
TMR3_OC_CTL1[OC3_INT].
[7:6] 01 OC pin is cleared upon timer compare.
OC3_MODE
10 OC pin is set upon timer compare.
11 OC pin toggles upon timer compare.
Initialize OC pin to value specified in
00
TMR3_OC_CTL1[OC2_INT].
[5:4] 01 OC pin is cleared upon timer compare.
OC2_MODE
10 OC pin is set upon timer compare.
11 OC pin toggles upon timer compare.
PS019217-1222
eZ80F91 MCU
Product Specification
144
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
CPU Access R/W R/W R/W R/W R/W R/W R/W R/W
Note: R/W = Read/Write.
Bit
Position Value Description
These bits represent the Low byte of the 2-byte compare
[7:0] value, {TMR3_OCx_H[7:0], TMR3_OCx_L[7:0]}. Bit 7 is bit
00h–FFh
TMR3_OCx_L 7 of the 16-bit data value. Bit 0 is bit 0 (lsb) of the 16-bit
timer compare value.
PS019217-1222
eZ80F91 MCU
Product Specification
145
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
CPU Access R/W R/W R/W R/W R/W R/W R/W R/W
Note: R/W = Read/Write.
Bit
Position Value Description
These bits represent the High byte of the 2-byte compare
[7:0] value, {TMR3_OCx_H[7:0], TMR3_OCx_L[7:0]}. Bit 7 is bit
00h–FFh
TMR3_OCx_H 15 (msb) of the 16-bit data value. Bit 0 is bit 8
of the 16-bit timer compare value.
Multi-PWM Mode
The special Multi-PWM mode uses the Timer 3 16-bit counter as the primary timekeeper
to control up to four PWM generators. The 16-bit reload value for Timer 3 sets a common
period for each of the PWM signals. However, the duty cycle and phase for each generator
are independent that is, the High and Low periods for each PWM generator are set inde-
pendently. In addition, each of the four PWM generators are enabled independently.
The eight PWM signals (four PWM output signals and their inverses) are output via Port
A. A functional block diagram of the Multi-PWM is displayed in Figure 30 on page 146.
PS019217-1222
eZ80F91 MCU
Product Specification
146
16
PWM0 PA0 PWM0 Output
Generator
16
Timer 3 PWM1 PA1 PWM1 Output
16-Bit Binary Generator
Downcounter
16
PWM2 PA2 PWM2 Output
Generator
16
PWM3 PA3 PWM3 Output
Generator
PS019217-1222
eZ80F91 MCU
Product Specification
147
The inverted PWM outputs PWM0, PWM1, PWM2, and PWM3 are globally enabled by
setting TMR3_PWM_CTL1[PAIR_EN] to 1. The individual PWM generators must be
enabled for the associated inverted PWM signals to be output.
For each of the 4 PWM generators, there is a 16-bit rising edge value
{TMR3_PWMxR_H[PWMxR_H], TMR3_PWMxR_L[PWMxR_L]} and a 16-bit falling
edge value {TMR3_PWMxF_H[PWMxF_H], TMR3_PWMxF_L[PWMxF_L]} for a total
of 16 registers. The rising-edge byte pairs define the timer count at which the PWMx
output transitions from Low to High. Conversely, the falling-edge byte pairs define the
timer count at which the PWMx output transitions from High to Low. On reset, all enabled
PWM outputs begin Low and all PWMx outputs begin High. When the PWMx output is
Low, the logic is looking for a match between the timer count and the rising edge value,
and vice versa. Therefore, in a case in which the rising edge value is the same as the falling
edge value, the PWM output frequency is one-half the rate at which the counter passes
through its entire count cycle (from reload value down to 0000h).
Figure 31and Figure 32 display a simple Multi-PWM output and an expanded view of the
timing, respectively. Associated control values are listed in Table 71 on page 148.
T3 Count 0 C B A 9 8 7 6 5 4 3 2 1 C B A 9 8 7 6 5 4 3 2 1 C B A 9 8 7 6 5 4 3 2 1 C B A
PWM0
PWM0
PWM1
PWM1
System Clock
Clock Enable
T3 Count A 9 8 7 6 5 4
PS019217-1222
eZ80F91 MCU
Product Specification
148
Without special consideration, if a PWM generator looks for a particular count to make a
state transition and if the edge transition value changes to a value that already occurred in
PS019217-1222
eZ80F91 MCU
Product Specification
149
the current counter count-down cycle, then the transition is missed. The PWM generator
holds the current output state until the counter reloads and cycles through to the
appropriate edge transition value again. In effect, an entire cycle of the PWM waveform is
skipped with the signal held at a DC value. The change in PWM waveform duty cycle
from cycle to cycle must be limited to some fraction of a period to avoid rough running.
To avoid unintentional roughness due to timing of the load operation for the register val-
ues in question, the PWM edge transition values are double-buffered and exhibit the
following behavior:
• When the PWM generators are disabled, PWM edge transition values written by the
CPU are immediately loaded into the PWM edge transition registers.
• When the PWM generators are enabled, a PWM edge transition value is loaded into a
buffer register and transferred to its destination register only during a specific transition
event. A rising edge transition value is only loaded upon a falling edge transition event,
and a falling edge transition value is only loaded upon a rising edge transition event.
PS019217-1222
eZ80F91 MCU
Product Specification
150
00
01
PWM0 Signal PADR0 PA0 PWM0 Output
10
11
TMR3_PWM_CTL2[5:4]
00
01
PWM0 Signal PADR4 PA4 PWM0 Output
10
11
TMR3_PWM_CTL2[7:6]
If you enable the OR function on all PWM outputs and PADR0 is set to 1, then the PWM0
output on PA0 is forced High. Similarly, if you select the AND function on all PWM
outputs and PADR0 is set to a 0, then the PWM0 output on PA0 is forced Low.
PS019217-1222
eZ80F91 MCU
Product Specification
151
setting of 0000b represents a delay of 0 system clock periods and a setting of 1111b rep-
resents a delay of 15 system clock periods. The PWM delay feature is displayed in
Figure 34 with associated addressing listed in Table 72.
Note: The PWM nonoverlapping delay time must always be defined to be less than the delay
between the rising and falling edges (and the delay between the falling and rising edges)
of all Multi-PWM outputs. In other words, a rising (falling) edge cannot be delayed
beyond the time at which it is subsequently scheduled to fall (rise).
System Clock
Clock Enable
TMR3_Count A 9 8 7 6 5 4 3 2 1 C
PWM0
PWM0
3 x SCLK 3 x SCLK
PS019217-1222
eZ80F91 MCU
Product Specification
152
PS019217-1222
eZ80F91 MCU
Product Specification
153
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
CPU Access R/W R/W R/W R/W R/W R/W R/W R/W
Note: R/W = Read/Write.
Bit
Position Value Description
Global disable of the PWM outputs (PWM outputs enabled
7 0
only).
PAIR_EN
1 Global enable of the PWM and PWM output pairs.
PS019217-1222
eZ80F91 MCU
Product Specification
154
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
CPU Access R/W R/W R/W R/W R/W R/W R/W R/W
Note: R/W = Read/Write.
Bit
Position Value Description
00 Disable AND/OR features on PWM
PS019217-1222
eZ80F91 MCU
Product Specification
155
PS019217-1222
eZ80F91 MCU
Product Specification
156
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
Bit
Position Value Description
PS019217-1222
eZ80F91 MCU
Product Specification
157
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
CPU Access R/W R/W R/W R/W R/W R/W R/W R/W
Note: R/W = Read/Write.
Bit
Position Value Description
These bits represent the Low byte of the 16-bit value to set the
rising edge COMPARE value for PWMx,
[7:0]
00h–FFh {TMR3_PWMXR_H[7:0], TMR3_PWMXR_L[7:0]}. Bit 7 is bit 7
PWMXR_L
of the 16-bit timer data value. Bit 0 is bit 0 (lsb) of the
16-bit timer data value.
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
CPU Access R/W R/W R/W R/W R/W R/W R/W R/W
Note: R/W = Read/Write.
Bit
Position Value Description
These bits represent the High byte of the 16-bit value to set the
rising edge COMPARE value for PWMx,
[7:0]
00h–FFh {TMR3_PWMXR_H[7:0], TMR3_PWMXR_L[7:0]}. Bit 7 is bit
PWMXR_H
15 (msb) of the 16-bit timer data value. Bit 0 is bit 8 of the
16-bit timer data value.
PS019217-1222
eZ80F91 MCU
Product Specification
158
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
CPU Access R/W R/W R/W R/W R/W R/W R/W R/W
Note: R/W = Read/Write.
Bit
Position Value Description
These bits represent the Low byte of the 16-bit value to set the
falling edge COMPARE value for PWMx,
[7:0]
00h–FFh {TMR3_PWMXF_H[7:0], TMR3_PWMXF_L[7:0]}. Bit 7 is bit 7
PWMXF_L
of the 16-bit timer data value. Bit 0 is bit 0 (lsb) of the
16-bit timer data value.
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
CPU Access R/W R/W R/W R/W R/W R/W R/W R/W
Note: R/W = Read/Write.
Bit
Position Value Description
These bits represent the High byte of the 16-bit value to set the
falling edge COMPARE value for PWMx,
[7:0]
00h–FFh {TMR3_PWMXF_H[7:0], TMR3_PWMXF_L[7:0]}. Bit 7 is bit 15
PWMXF_H
(msb) of the 16-bit timer data value. Bit 0 is bit 8 of the
16-bit timer data value.
PS019217-1222
eZ80F91 MCU
Product Specification
159
Real-Time Clock
Real-Time Clock Overview
The Real-Time Clock (RTC) maintains time by keeping count of seconds, minutes, hours,
day-of-the-week, day-of-the-month, year, and century. The current time is kept in 24-hour
format. The format for all count and alarm registers is selectable between binary and
binary-coded-decimal (BCD) operations. The calendar operation maintains the correct
day-of-the-month and automatically compensates for leap year only when binary-coded-
decimal operation is enabled. A simplified block diagram of the RTC and the associated
on-chip, low-power, 32 kHz oscillator is displayed in Figure 35. Connections to an
external battery supply and 32 kHz crystal network is also displayed in Figure 35.
Note: For users NOT using the RTC the following RTC signal pins must be connected as follows
to avoid a 10 uA leakage within the RTC circuit block. RTC_Xin (pin 61) must be left float-
ing or connected to ground.
RTC_VDD
VDD Battery
IRQ
to eZ80 CPU
Real-Time Clock
ADDR[15:0]
DATA[7:0]
R1
RTC Clock RTC_XOUT
C
System Clock Low-Power
32 KHz Oscillator
VDD 32 KHz
Crystal
Enable
CLK_SEL
(RTC_CTRL[4])
RTC_XIN
PS019217-1222
eZ80F91 MCU
Product Specification
160
PS019217-1222
eZ80F91 MCU
Product Specification
161
• Write values to the RTC count registers to set the current time
• Write values to the RTC alarm registers to set the appropriate alarm conditions
• Write to RTC_CTRL to clear RTC_UNLOCK; clearing the RTC_UNLOCK bit resets
and enables the clock divider
Bit 7 6 5 4 3 2 1 0
Reset X X X X X X X X
CPU Access R/W* R/W* R/W* R/W* R/W* R/W* R/W* R/W*
Note: X = Unchanged by RESET; R/W* = Read Only if RTC locked, Read/Write if RTC unlocked.
PS019217-1222
eZ80F91 MCU
Product Specification
162
Bit 7 6 5 4 3 2 1 0
Reset X X X X X X X X
CPU Access R/W* R/W* R/W* R/W* R/W* R/W* R/W* R/W*
Note: X = Unchanged by RESET; R/W* = Read Only if RTC locked, Read/Write if RTC unlocked.
PS019217-1222
eZ80F91 MCU
Product Specification
163
Bit 7 6 5 4 3 2 1 0
Reset X X X X X X X X
CPU Access R/W* R/W* R/W* R/W* R/W* R/W* R/W* R/W*
Note: X = Unchanged by RESET; R/W* = Read Only if RTC locked, Read/Write if RTC unlocked.
PS019217-1222
eZ80F91 MCU
Product Specification
164
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 X X X X
PS019217-1222
eZ80F91 MCU
Product Specification
165
Bit 7 6 5 4 3 2 1 0
Reset X X X X X X X X
CPU Access R/W* R/W* R/W* R/W* R/W* R/W* R/W* R/W*
Note: X = Unchanged by RESET; R/W* = Read Only if RTC locked, Read/Write if RTC unlocked.
PS019217-1222
eZ80F91 MCU
Product Specification
166
Bit 7 6 5 4 3 2 1 0
Reset X X X X X X X X
CPU Access R/W* R/W* R/W* R/W* R/W* R/W* R/W* R/W*
Note: X = Unchanged by RESET; R/W* = Read Only if RTC locked, Read/Write if RTC unlocked.
PS019217-1222
eZ80F91 MCU
Product Specification
167
Bit 7 6 5 4 3 2 1 0
Reset X X X X X X X X
CPU Access R/W* R/W* R/W* R/W* R/W* R/W* R/W* R/W*
Note: X = Unchanged by RESET; R/W* = Read Only if RTC locked, Read/Write if RTC unlocked.
PS019217-1222
eZ80F91 MCU
Product Specification
168
Bit 7 6 5 4 3 2 1 0
Reset X X X X X X X X
CPU Access R/W* R/W* R/W* R/W* R/W* R/W* R/W* R/W*
Note: X = Unchanged by RESET; R/W* = Read Only if RTC locked, Read/Write if RTC unlocked.
PS019217-1222
eZ80F91 MCU
Product Specification
169
Bit 7 6 5 4 3 2 1 0
Reset X X X X X X X X
CPU Access R/W R/W R/W R/W R/W R/W R/W R/W
Note: X = Unchanged by RESET; R/W = Read/Write.
PS019217-1222
eZ80F91 MCU
Product Specification
170
Bit 7 6 5 4 3 2 1 0
Reset X X X X X X X X
CPU Access R/W R/W R/W R/W R/W R/W R/W R/W
Note: X = Unchanged by RESET; R/W = Read/Write.
PS019217-1222
eZ80F91 MCU
Product Specification
171
Bit 7 6 5 4 3 2 1 0
Reset X X X X X X X X
CPU Access R/W R/W R/W R/W R/W R/W R/W R/W
Note: X = Unchanged by RESET; R/W = Read/Write.
PS019217-1222
eZ80F91 MCU
Product Specification
172
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 X X X X
PS019217-1222
eZ80F91 MCU
Product Specification
173
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
PS019217-1222
eZ80F91 MCU
Product Specification
174
32768. If the power-line frequency option is selected, the prescale value is set by the
FREQ_SEL bit, and the 32 kHz oscillator is disabled. See Table 93.
Bit 7 6 5 4 3 2 1 0
Reset X 0 X X X X 0/1 0
PS019217-1222
eZ80F91 MCU
Product Specification
175
Universal Asynchronous
Receiver/Transmitter
The UART module implements all of the logic required to support the asynchronous com-
munications protocol. The module also implements two separate 16-byte-deep FIFOs for
both transmission and reception. A block diagram of the UART is displayed in Figure 36.
Buffer
I/O Address
¤
Transmit TxD0/TxD1
Data Buffer
Interrupt Signal
CTS0/CTS1
RTS0/RTS1
Modem
Control DSR0/DSR1
Logic DTR0/DTR1
DCD0/DCD1
RI0/RI1
PS019217-1222
eZ80F91 MCU
Product Specification
176
UART Functions
The UART function implements:
• The transmitter and associated control logic
• The receiver and associated control logic
• The modem interface and associated logic
UART Transmitter
The transmitter block controls the data transmitted on the TxD output. It implements the
FIFO, access via the UARTx_THR register, the transmit shift register, the parity generator,
and control logic for the transmitter to control parameters for the asynchronous communi-
cations protocol.
The UARTx_THR is a Write Only register. The CPU writes the data byte to be transmitted
into this register. In FIFO mode, up to 16 data bytes are written via the UARTx_THR reg-
ister. The data byte from the FIFO is transferred to the transmit shift register at the appro-
priate time and transmitted via TxD output. After SYNC_RESET, the UARTx_THR
register is empty. Therefore, the Transmit Holding Register Empty (THRE) bit (bit 5 of
the UARTx_LSR register) is 1. An interrupt is sent to the CPU if interrupts are enabled.
The CPU resets this interrupt by loading data into the UARTx_THR register, which clears
the transmitter interrupt.
The transmit shift register places the byte to be transmitted on the TxD signal serially. The
LSb of the byte to be transmitted is shifted out first and the MSb is shifted out last. The
control logic within the block adds the asynchronous communications protocol bits to the
data byte being transmitted. The transmitter block obtains the parameters for the protocol
PS019217-1222
eZ80F91 MCU
Product Specification
177
from the bits programmed via the UARTx_LCTL register. When enabled, an interrupt is
generated after the final protocol bit is transmitted which the CPU resets by loading data
into the UARTx_THR register. The TxD output is set to 1 if the transmitter is idle (that is,
the transmitter does not contain any data to be transmitted).
The transmitter operates with the BRG clock. The data bits are placed on the TxD output
one time every 16 BRG clock cycles. The transmitter block also implements a parity gen-
erator that attaches the parity bit to the byte, if programmed. For 9-bit data, the host CPU
programs the parity bit generator so that it marks the byte as either address (mark parity)
or data (space parity).
UART Receiver
The receiver block controls the data reception from the RxD signal. The receiver block
implements a receiver shift register, receiver line error condition monitoring logic and
receiver data ready logic. It also implements the parity checker.
The UARTx_RBR is a Read Only register of the module. The CPU reads received data
from this register. The condition of the UARTx_RBR register is monitored by the DR bit
(bit 0 of the UARTx_LSR register). The DR bit is 1 when a data byte is received and trans-
ferred to the UARTx_RBR register from the receiver shift register. The DR bit is reset
only when the CPU reads all of the received data bytes. If the number of bits received is
less than eight, the unused MSb of the data byte Read are 0.
For 9-bit data, the receiver checks incoming bytes for space parity. A line status interrupt
is generated when an address byte is received, because address bytes maintain high parity
bits. The CPU clears the interrupt by determining if the address matches its own, then con-
figures the receiver to either accept the subsequent data bytes if the address matches, or
ignore the data if the address does not match.
The receiver uses the clock from the BRG for receiving the data. This clock must operate
at 16 times the appropriate baud rate. The receiver synchronizes the shift clock on the fall-
ing edge of the RxD input start bit. It then receives a complete byte according to the set
parameters. The receiver also implements logic to detect framing errors, parity errors,
overrun errors, and break signals.
PS019217-1222
eZ80F91 MCU
Product Specification
178
UART Interrupts
There are six different sources of interrupts from the UART. The six sources of interrupts
are:
• Transmitter (two different interrupts)
• Receiver (three different interrupts)
• Modem status
Note: For 9-bit data, incorrect parity indicates detection of an address byte.
• Incorrect framing (that is, the stop bit) is not detected by receiver at the end of the byte.
• Receiver overrun condition.
• A BREAK condition being detected on the receive data input.
PS019217-1222
eZ80F91 MCU
Product Specification
179
An interrupt due to one of the above conditions is cleared when the UARTx_LSR register
is read. In case of FIFO mode, a line status interrupt is generated only after the received
byte with an error reaches the top of the FIFO and is ready to be read.
A line status interrupt is activated (provided this interrupt is enabled) as long as the Read
pointer of the receiver FIFO points to the location of the FIFO that contains a byte with the
error. The interrupt is immediately cleared when the UARTx_LSR register is read. The
ERR bit of the UARTx_LSR register is active as long as an erroneous byte is present in the
receiver FIFO.
Module Reset
Upon reset, all internal registers are set to their default values. All command status regis-
ters are programmed with their default values, and the FIFOs are flushed.
Data Transfers
Transmit—To transmit data, the application enables the transmit interrupt. An interrupt is
immediately expected in response. The application reads the UARTx_IIR register and
determines whether the interrupt occurs due to either an empty UARTx_THR register or a
PS019217-1222
eZ80F91 MCU
Product Specification
180
completed transmission. When the application makes this determination, it writes the
transmit data bytes to the UARTx_THR register. The number of bytes that the application
writes depends on whether or not the FIFO is enabled. If the FIFO is enabled, the applica-
tion writes 16 bytes at a time. If not, the application writes one byte at a time. As a result
of the first Write, the interrupt is deactivated. The CPU then waits for the next interrupt.
When the interrupt is raised by the UART module, the CPU repeats the same process until
it exhausts all of the data for transmission.
To control and check the modem status, the application sets up the modem by writing to
the UARTx_MCTL register and reading the UARTx_MCTL register before starting the
process described above.
In RS485 multidrop mode, the first byte of the message is the station address and the rest
of the message contains the data for that station. You must set the Even Parity Select (EPS
bit 4) and Parity Enable (PEN bit 3) in the UARTx_LCTL before sending the station
address. We recommend that in your UART initialization routine set up the
UARTx_LCTL register for your data transfer format and set the Parity Enable (PEN bit 3)
bit. Each time you want to send a new message you must perform these three steps:
1. Since the UART automatically clears the Even Parity Select (EPS bit 4) bit in the
UARTx_LCTL after a byte is sent, before starting a new message you have to wait for
the transmitter to go idle. The Transmit Empty (TEMT bit 6) of the UARTx_LSR will
be set. If you set the EPS bit of the UARTx_LCTL before the last byte of the previous
message is transmitted, the EPS bit will be cleared and the new station address will be
sent as data instead of being used as an address.
2. Set the Even Parity Select (EPS bit 4) bit in the UARTx_LCTL register being careful
not to alter the other bits in the register sets the address mark. Write station address to
the UARTx_THR. The UART will automatically clear the EPS bit after the station
address byte is transmitted.
3. Send the rest of the message. Write data to the UART Transmit Holding Register
UARTx_THR whenever the Transmit Holding Register Empty (THRE bit 5) in the
UARTx_LSR is set.
In multidrop mode, during receiving start address marks, you will see a receive line inter-
rupt (INSTS bits[3:1]) in the IIR register. Read the LSR and check for receive errors only
and ignore any parity errors. The parity is only used for address marks in this multidrop
mode.
Receive—The receiver is always enabled, and it continually checks for the start bit on the
RxD input signal. When an interrupt is raised by the UART module, the application reads
the UARTx_IIR register and determines the cause for the interrupt. If the cause is a line
status interrupt, the application reads the UARTx_LSR register, reads the data byte and
then discards the byte or take other appropriate action. If the interrupt is caused by a
receive-data-ready condition, the application alternately reads the UARTx_LSR and
UARTx_RBR registers and removes all of the received data bytes. It reads the
PS019217-1222
eZ80F91 MCU
Product Specification
181
UARTx_LSR register before reading the UARTx_RBR register to determine that there is
no error in the received data.
To control and check modem status, the application sets up the modem by writing to the
UARTx_MCTL register and reading the UARTx_MSR register before starting the process
described above.
Poll Mode Transfers—When interrupts are disabled, all data transfers are referred to as
poll mode transfers. In poll mode transfers, the application must continually poll the
UARTx_LSR register to transmit or receive data without enabling the interrupts. The
same holds true for the UARTx_MSR register. If the interrupts are not enabled, the data in
the UARTx_IIR register cannot be used to determine the cause of interrupt.
Upon RESET, the 16-bit BRG divisor value resets to the smallest allowable value of
0002h. Therefore, the minimum BRG clock divisor ratio is 2. A software Write to either
the Low- or High-byte registers for the BRG Divisor Latch causes both the Low and High
bytes to load into the BRG counter, and causes the count to restart.
The divisor registers are accessed only if bit 7 of the UART Line Control register
(UARTx_LCTL) is set to 1. After reset, this bit is reset to 0.
PS019217-1222
eZ80F91 MCU
Product Specification
182
Table 94. UART Baud Rate Generator Register—Low Bytes (UART0_BRG_L = 00C0h,
UART1_BRG_L = 00D0h)
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 1 0
CPU Access R/W R/W R/W R/W R/W R/W R/W R/W
Note: R = Read only; R/W = Read/Write.
Bit
Position Value Description
These bits represent the Low byte of the 16-bit BRG divider value. The
[7:0]
00h–FFh complete BRG divisor value is returned by {UART_BRG_H,
UART_BRG_L
UART_BRG_L}.
PS019217-1222
eZ80F91 MCU
Product Specification
183
Table 95. UART Baud Rate Generator Register—High Bytes (UART0_BRG_H = 00C1h,
UART1_BRG_H = 00D1h)
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
CPU Access R/W R/W R/W R/W R/W R/W R/W R/W
Note: R = Read only; R/W = Read/Write.
Bit
Position Value Description
These bits represent the High byte of the 16-bit BRG divider value. The
[7:0]
00h–FFh complete BRG divisor value is returned by {UART_BRG_H,
UART_BRG_H
UART_BRG_L}.
UART Registers
After a system reset, all UART registers are set to their default values. Any Writes to unused
registers or register bits are ignored and reads return a value of 0. For compatibility with
future revisions, unused bits within a register must always be written with a value of 0.
Read/Write attributes, reset conditions, and bit descriptions of all of the UART registers are
provided in this section.
PS019217-1222
eZ80F91 MCU
Product Specification
184
Table 96. UART Transmit Holding Registers (UART0_THR = 00C0h, UART1_THR = 00D0h)
Bit 7 6 5 4 3 2 1 0
Reset X X X X X X X X
CPU Access W W W W W W W W
Note: W = Write Only.
Bit
Position Value Description
[7:0]
00h–FFh Transmit data byte.
TxD
Table 97. UART Receive Buffer Registers (UART0_RBR = 00C0h, UART1_RBR = 00 D0h)
Bit 7 6 5 4 3 2 1 0
Reset X X X X X X X X
CPU Access R R R R R R R R
Note: R = Read only.
Bit
Position Value Description
[7:0]
00h–FFh Receive data byte.
RxD
PS019217-1222
eZ80F91 MCU
Product Specification
185
Table 98. UART Interrupt Enable Registers (UART0_IER = 00C1h, UART1_IER = 00D1h)
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
CPU Access R/W R/W R/W R/W R/W R/W R/W R/W
Note: R/W = Read/Write.
Bit
Position Value Description
[7:5] 000 Reserved.
0 Transmission complete interrupt is disabled.
4
TCIE Transmission complete interrupt is generated when both the transmit hold
1
register and the transmit shift register are empty.
PS019217-1222
eZ80F91 MCU
Product Specification
186
Table 99. UART Interrupt Identification Registers (UART0_IIR = 00C2h, UART1_IIR = 00D2h)
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 1
CPU Access R R R R R R R R
Note: R = Read only.
Bit
Position Value Description
INSTS
Value Priority Interrupt Type
011 Highest Receiver Line Status
010 Second Receive Data Ready or Trigger Level
110 Third Character Time-out
101 Fourth Transmission Complete
001 Fifth Transmit Buffer Empty
000 Lowest Modem Status
PS019217-1222
eZ80F91 MCU
Product Specification
187
Table 101. UART FIFO Control Registers (UART0_FCTL = 00C2h, UART1_FCTL = 00D2h)
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
CPU Access W W W W W W W W
Note: W = Write Only.
Bit
Position Value Description
Receive FIFO trigger level set to 1. Receive data interrupt is
00 generated when there is 1 byte in the FIFO. Valid only if FIFO
is enabled.
Receive FIFO trigger level set to 4. Receive data interrupt is
01 generated when there are 4bytes in the FIFO. Valid only if
[7:6] FIFO is enabled.
TRIG Receive FIFO trigger level set to 8. Receive data interrupt is
10 generated when there are 8 bytes in the FIFO. Valid only if
FIFO is enabled.
Receive FIFO trigger level set to 14. Receive data interrupt is
11 generated when there are 14 bytes in the FIFO. Valid only if
FIFO is enabled.
[5:3] 000b Reserved—must be 000b.
Transmit Disable. This register bit works differently than the
standard 16550 UART. This bit must be set to transmit data.
When it is reset the transmit FIFO logic is reset along with the
2 0
associated transmit logic to keep them in sync. This bit is now
CLRTxF persistent–it does not self clear and it must remain at 1 to
transmit data.
1 Transmit Enable.
Receive Disable. This register bit works differently than the
standard 16550 UART. This bit must be set to receive data.
When it is reset the receive FIFO logic is reset along with the
1 0
associated receive logic to keep them in sync and avoid the
CLRRxF previous version’s lookup problem. This bit is now persistent–it
does not self clear and it must remain at 1 to receive data.
1 Receive Enable.
PS019217-1222
eZ80F91 MCU
Product Specification
188
Bit
Position Value Description
0 FIFOs are not used.
Table 102. UART Line Control Registers (UART0_LCTL = 00C3h, UART1_LCTL = 00D3h)
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
CPU Access R/W R/W R/W R/W R/W R/W R/W R/W
Note: R/W = Read/Write.
Bit
Position Value Description
0 Access to the UART registers at I/O addresses C0h, C1h, D0h and D1h is enabled.
7
DLAB Access to the Baud Rate Generator registers at I/O addresses C0h, C1h, D0h and
1
D1h is enabled.
0 Do not send a BREAK signal.
Send Break.
UART sends continuous zeroes on the transmit output from the next bit boundary.
6 The transmit data in the transmit shift register is ignored. After forcing this bit High,
SB the TxD output is 0 only after the bit boundary is reached. Just before forcing TxD to
1
0, the transmit FIFO is cleared. Any new data written to the transmit FIFO during a
break must be written only after the THRE bit of UARTx_LSR register goes High.
This new data is transmitted after the UART recovers from the break. After the break
is removed, the UART recovers from the break for the next BRG edge.
0 Do not force a parity error.
5
FPE Force a parity error. When this bit and the parity enable bit (pen) are both 1, an
1
incorrect parity bit is transmitted with the data byte.
PS019217-1222
eZ80F91 MCU
Product Specification
189
Bit
Position Value Description
Even Parity Select.
Use odd parity for transmit and receive. The total number of 1 bits in the transmit
0 data plus parity bit is odd. Used as SPACE bit in Multidrop Mode. See Table 104 on
4 page 189 for parity select definitions. Note: Receive Parity is set to SPACE in
EPS multidrop mode.
Use even parity for transmit and receive. The total number of 1 bits in the transmit
1 data plus parity bit is even. Used as MARK bit in Multidrop Mode. See Table 104 on
page 189 for parity select definitions.
0 Parity bit transmit and receive is disabled.
3 Parity bit transmit and receive is enabled. For transmit, a parity bit is generated and
PEN transmitted with every data character. For receive, the parity is checked for every
1
incoming data character. In Multidrop Mode, receive parity is checked for space
parity.
[2:0] UART Character Parameter Selection.
000–111
CHAR See Table 103 on page 189 for a description of the values.
CHAR[2:0] Character Length (Tx/Rx Data Bits) Stop Bits (Tx Stop Bits)
000 5 1
001 6 1
010 7 1
011 8 1
100 5 2
101 6 2
110 7 2
111 8 2
PS019217-1222
eZ80F91 MCU
Product Specification
190
Table 105. UART Modem Control Registers (UART0_MCTL = 00C4h, UART1_MCTL = 00D4h)
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
Bit
Position Value Description
7 0 Reserved.
PS019217-1222
eZ80F91 MCU
Product Specification
191
Bit
Position Value Description
No function in normal operation.
2
0–1 In LOOP BACK mode, this bit is connected to the RI bit in the UART Status
OUT1
Register.
Request to Send.
1
0–1 In normal operation, the RTS output port is the inverse of this bit. In LOOP
RTS
BACK mode, this bit is connected to the CTS bit in the UART Status Register.
Data Terminal Ready.
0
0–1 In normal operation, the DTR output port is the inverse of this bit. In LOOP
DTR
BACK mode, this bit is connected to the DSR bit in the UART Status Register.
Table 106. UART Line Status Registers (UART0_LSR = 00C5h, UART1_LSR = 00 D5h)
Bit 7 6 5 4 3 2 1 0
Reset 0 1 1 0 0 0 0 0
CPU Access R R R R R R R R
Note: R = Read only.
Bit
Position Value Description
Always 0 when operating in with the FIFO disabled. With the
0 FIFO enabled, this bit is reset when the UARTx_LSR register is
7 read and there are no more bytes with error status in the FIFO.
ERR
Error detected in the FIFO. There is at least 1 parity, framing or
1
break indication error in the FIFO.
Transmit holding register/FIFO is not empty or transmit shift
0
register is not empty or transmitter is not idle.
6 Transmit holding register/FIFO and transmit shift register are
TEMT empty; and the transmitter is idle. This bit cannot be set to 1
1
during the BREAK condition. This bit only becomes 1 after the
BREAK command is removed.
0 Transmit holding register/FIFO is not empty.
5 Transmit holding register/FIFO. This bit cannot be set to 1
THRE 1 during the BREAK condition. This bit only becomes 1 after the
BREAK command is removed.
PS019217-1222
eZ80F91 MCU
Product Specification
192
Bit
Position Value Description
Receiver does not detect a BREAK condition. This bit is reset
0
to 0 when the UARTx_LSR register is read.
Receiver detects a BREAK condition on the receive input line.
This bit is 1 if the duration of BREAK condition on the receive
4 data is longer than one character transmission time, the time
BI depends on the programming of the UARTx_LSR register. In
1
case of FIFO only one null character is loaded into the receiver
FIFO with the framing error. The framing error is revealed to
the eZ80® whenever that particular data is read from the
receiver FIFO.
No framing error detected for character at the top of the FIFO.
0
This bit is reset to 0 when the UARTx_LSR register is read.
3
FE Framing error detected for the character at the top of the FIFO.
1 This bit is set to 1 when the stop bit following the data/parity bit
is logic 0.
The received character at the top of the FIFO does not contain
a parity error. In multidrop mode, this indicates that the
0
received character is a data byte. This bit is reset to 0 when the
2 UARTx_LSR register is read.
PE
The received character at the top of the FIFO contains a parity
1 error. In multidrop mode, this indicates that the received
character is an address byte.
The received character at the top of the FIFO does not contain
0 an overrun error. This bit is reset to 0 when the UARTx_LSR
register is read.
Overrun error is detected. If the FIFO is not enabled, this
1 indicates that the data in the receive buffer register was not
OE read before the next character was transferred into the receiver
1 buffer register. If the FIFO is enabled, this indicates the FIFO
was already full when an additional character was received by
the receiver shift register. The character in the receiver shift
register is not put into the receiver FIFO.
This bit is reset to 0 when the UARTx_RBR register is read or
0
all bytes are read from the receiver FIFO.
0 Data ready. If the FIFO is not enabled, this bit is set to 1 when
DR a complete incoming character is transferred into the receiver
1 buffer register from the receiver shift register. If the FIFO is
enabled, this bit is set to 1 when a character is received and
transferred to the receiver FIFO.
PS019217-1222
eZ80F91 MCU
Product Specification
193
Table 107. UART Modem Status Registers (UART0_MSR = 00C6h, UART1_MSR = 00 D6h)
Bit 7 6 5 4 3 2 1 0
Reset X X X X X X X X
CPU Access R R R R R R R R
Note: R = Read only.
Bit
Position Value Description
Data Carrier Detect
7 In NORMAL mode, this bit reflects the inverted state of the
0–1
DCD DCDx input pin. In LOOP BACK mode, this bit reflects the
value of the UARTx_MCTL[3] = out2.
Ring Indicator
6 In NORMAL mode, this bit reflects the inverted state of the RIx
0–1
RI input pin. In LOOP BACK mode, this bit reflects the value of the
UARTx_MCTL[2] = out1.
Data Set Ready
5 In NORMAL mode, this bit reflects the inverted state of the
0–1
DSR DSRx input pin. In LOOP BACK mode, this bit reflects the
value of the UARTx_MCTL[0] = DTR.
Clear to Send
4 In NORMAL mode, this bit reflects the inverted state of the
0–1
CTS CTSx input pin. In LOOP BACK mode, this bit reflects the value
of the UARTx_MCTL[1] = RTS.
Delta Status Change of DCD.
3
0–1 This bit is set to 1 whenever the DCDx pin changes state. This
DDCD
bit is reset to 0 when the UARTx_MSR register is read.
Trailing Edge Change on RI.
2 This bit is set to 1 whenever a falling edge is detected on the
0–1
TERI RIx pin. This bit is reset to 0 when the UARTx_MSR register is
read.
Delta Status Change of DSR.
1
0–1 This bit is set to 1 whenever the DSRx pin changes state. This
DDSR
bit is reset to 0 when the UARTx_MSR register is read.
Delta Status Change of CTS.
0
0–1 This bit is set to 1 whenever the CTSx pin changes state.
DCTS
This bit is reset to 0 when the UARTx_MSRs register is read.
PS019217-1222
eZ80F91 MCU
Product Specification
194
Table 108. UART Scratch Pad Registers (UART0_SPR = 00C7h, UART1_SPR = 00D7h)
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
CPU Access R/W R/W R/W R/W R/W R/W R/W R/W
Note: R/W = Read/Write.
Bit
Position Value Description
UART scratch pad register is available for use as a general-
[7:0]
00h–FFh purpose Read/Write register. In multi-drop 9 bit mode, this
SPR
register is used to store the address value.
PS019217-1222
eZ80F91 MCU
Product Specification
195
Infrared Encoder/Decoder
The eZ80F91 device contains a UART to an infrared encoder/decoder (endec). The endec
is integrated with the on-chip UART0 to allow easy communication between the CPU and
IrDA Physical Layer Specification Version 1.4-compatible infrared transceivers, as dis-
played in Figure 37. Infrared communication provides secure, reliable, high-speed, low-
cost, point-to-point communication between PCs, PDAs, mobile telephones, printers, and
other infrared-enabled devices.
eZ80F91
System Infrared
Clock Transceiver
RxD IR_RxD
RxD
TxD IR_TxD
Infrared TxD
UART0
Baud Rate Encoder/Decoder
Clock
¤
To eZ80 CPU
Functional Description
When the endec is enabled, the transmit data from the on-chip UART is encoded as digital
signals in accordance with the IrDA standard and output to the infrared transceiver. Like-
wise, data received from the infrared transceiver is decoded by the endec and passed to the
UART. Communication is half-duplex, meaning that simultaneous data transmission and
reception is not allowed.
The baud rate is set by the UART Baud Rate Generator (BRG), which supports IrDA stan-
dard baud rates from 9600 bps to 115.2 kbps. Higher baud rates are possible, but do not meet
PS019217-1222
eZ80F91 MCU
Product Specification
196
IrDA specifications. The UART must be enabled to use the endec. For more information on
the UART and its BRG, see Universal Asynchronous Receiver/Transmitter on page 175.
Transmit
The data to be transmitted via the IR transceiver is the data sent to UART0. The UART
transmit signal, TxD, and Baud Rate Clock are used by the endec to generate the
modulation signal, IR_TxD, that drives the infrared transceiver. Each UART bit is 16
clocks wide. If the data to be transmitted is a logical 1 (High), the IR_TxD signal remains
Low (0) for the full 16-clock period. If the data to be transmitted is a logical 0, a 3-clock
High (1) pulse is output following a 7-clock Low (0) period. Following the 3-clock High
pulse, a 6-clock Low pulse completes the full 16-clock data period. Data transmission is
displayed in Figure 38. During data transmission, the IR receive function must be disabled
by clearing the IR_RxEN bit in the IR_CTL reg to 0 to prevent transmitter-to-receiver
crosstalk.
16-clock
period
Baud Rate
Clock
UART_TxD Start Bit = 0 Data Bit 0 = 1 Data Bit 1 = 0 Data Bit 2 = 1 Data Bit 3 = 1
3-clock
pulse
IR_TxD
7-clock
delay
Receive
Data received from the IR transceiver via the IR_RxD signal is decoded by the endec and
passed to the UART. The IR_RxEN bit in the IR_CTL register must be set to enable the
receiver decoder. The IrDA serial infrared (SIR) data format uses half duplex communica-
tion. Therefore, the UART must not be allowed to transmit while the receiver decoder is
enabled. The UART Baud Rate Clock is used by the endec to generate the demodulated
signal, RxD, that drives the UART. Each UART bit is 16 clocks wide. If the data to be
received is a logical 1 (High), the IR_RxD signal remains High (1) for the full 16-clock
PS019217-1222
eZ80F91 MCU
Product Specification
197
period. If the data to be received is a logical 0, a delayed Low (0) pulse is output on RxD.
Data transmission is displayed in Figure 39.
16-clock
period
Baud Rate
Clock
Start Bit = 0 Data Bit 0 = 1 Data Bit 1 = 0 Data Bit 2 = 1 Data Bit 3 = 1
IR_RxD
UART_RxD
The IrDA endec is designed to ignore pulses on IR_RxD which do not comply with IrDA
pulse width specifications. Input pulses wider than five baud clocks (that is, 5/16 of a bit
period) are always ignored, as this would be a violation of the maximum pulse width spec-
ified for any standard baud rate up to 115.2 kbps. The check for minimum pulse widths is
optional, since using a slow system clock frequency limits the ability to accurately mea-
sure narrow pulse widths near the IrDA specification minimum of 1.41 us for the
2.4–115.2 kbps rate range.
To enable checks of minimum input pulse width on IR_RxD, a non-zero value must be
programmed into the MIN_PULSE field of IR_CTL (bits [7:4]). This field forms the
most-significant four bits of the 6-bit down-counter used to determine if an input pulse
will be ignored because it is too narrow. The lower two counter bits are hard-coded to load
with 0x3, resulting in a total down-count equal to ((MIN_PULSE* 4) + 3). To be accepted,
input pulses must have a width greater than or equal to the down-count value times the
system clock period.
The following equation is used to determine an appropriate setting for MIN_PULSE:
MIN_PULSE = INT( ((Fsys*Wmin) - 3) / 4 )
Where,
Fsys is the frequency of the system clock, and,
Wmin is the minimum width of recognized input pulses.
PS019217-1222
eZ80F91 MCU
Product Specification
198
If this equation results in a value less than one, MIN_PULSE must be set to 0x0h which
enables edge detection and ensures that valid pulses wider than Wmin are accepted. The
field's maximum setting of 0xFh supports a Wmin of 1.25 us when Fsys is 50 MHz.
Jitter
Due to the inherent sampling of the received IR_RxD signal by the Bit Rate Clock, some
jitter is expected on the first bit in any sequence of data. However, all subsequent bits in
the received data stream are a fixed 16 clock periods wide.
Table 109. GPIO Mode Selection when using the IrDA Encoder/Decoder
Loopback Testing
Both internal and external loopback testing is accomplished with the endec on the eZ80F91
device. Internal loopback testing is enabled by setting the LOOP_BACK bit to 1. During
internal loopback, the IR_TxD output signal is inverted and connected on-chip to the
IR_RxD input. External loopback testing of the off-chip IrDA transceiver is accomplished
by transmitting data from the UART while the receiver is enabled (IR_RxEN set to 1).
PS019217-1222
eZ80F91 MCU
Product Specification
199
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
Bit
Position Value Description
[7:4] 0000 Minimum receive pulse width control. When this field is equal to
MIN_PULSE 0x0, the IrDA decoder uses edge detection to accept arbitrarily
narrow (that is, short) input pulses.
1h-Fh When not equal to 0x0, this field forms the most-significant four
bits of the 6-bit down-counter used to determine if an input
pulse will be ignored because it is too narrow. The lower two
counter bits are hard-coded to load with 0x3, resulting in a total
down-count equal to ((IR_CTL[4:0]MIN_PULSE * 4) + 3). To be
accepted, input pulses must have a width greater than or equal
to the down-count value times the system clock period.
3 0 Reserved.
2 0 Internal LOOP BACK mode is disabled.
LOOP_BACK
1 Internal LOOP BACK mode is enabled.
IR_TxD output is inverted and connected to IR_RxD input for
internal loop back testing.
1 0 IR_RxD data is ignored.
IR_RxEN
1 IR_RxD data is passed to UART0 RxD.
0 0 Endec is disabled.
IR_EN
1 Endec is enabled.
PS019217-1222
eZ80F91 MCU
Product Specification
200
PS019217-1222
eZ80F91 MCU
Product Specification
201
MASTER
SS
Baud Rate
Generator
SLAVE
ENABLE SS
PS019217-1222
eZ80F91 MCU
Product Specification
202
SPI Signals
The four basic SPI signals are:
• MISO (Master In, Slave Out)
• MOSI (Master Out, Slave In)
• SCK (SPI Serial Clock)
• SS (Slave Select)
These SPI signals are discussed in the following paragraphs. Each signal is described in
both MASTER and SLAVE modes.
Slave Select
The active Low Slave Select (SS) input signal is used to select the SPI as a slave device. It
must be Low prior to all data communication and must stay Low for the duration of the
data transfer.
The SS input signal must be High for the SPI to operate as a master device. If the SS signal
goes Low in Master mode, a Mode Fault error flag (MODF) is set in the SPI_SR register.
For more information, see SPI Status Register on page 209.
When the clock phase (CPHA) is set to 0, the shift clock is the logical OR of SS with
SCK. In this clock phase mode, SS must go High between successive characters in an
SPI message. When CPHA is set to 1, SS remains Low for several SPI characters. In
cases where there is only one SPI slave, its SS line could be tied Low as long as CPHA
is set to 1. For more information on CPHA, see SPI Control Register on page 208.
Serial Clock
The Serial Clock (SCK) is used to synchronize data movement both in and out of the
device via its MOSI and MISO pins. The master and slave are each capable of exchanging
a byte of data during a sequence of eight clock cycles. Because SCK is generated by the
master, the SCK pin becomes an input on a slave device. The SPI contains an internal
PS019217-1222
eZ80F91 MCU
Product Specification
203
divide-by-two clock divider. In MASTER mode, the SPI serial clock is one-half the fre-
quency of the clock signal created by the SPI’s Baud Rate Generator.
As displayed in Figure 42 and Table 111, four possible timing relations are chosen by
using the clock polarity (CPOL) and clock phase CPHA control bits in the SPI Control
register. See SPI Control Register on page 208. Both the master and slave must operate
with the identical timing, CPOL, and CPHA. The master device always places data on the
MOSI line a half-cycle before the clock edge (SCK signal), for the slave device to latch
the data.
SS High
SCK SCK SCK
Transmit Receive Idle Between
CPHA CPOL Edge Edge State Characters?
0 0 Falling Rising Low Yes
0 1 Rising Falling High Yes
1 0 Rising Falling Low No
1 1 Falling Rising High No
PS019217-1222
eZ80F91 MCU
Product Specification
204
SPI Flags
Mode Fault
The Mode Fault flag (MODF) indicates that there is a multimaster conflict in the system
control. The MODF bit is normally cleared to 0 and is only set to 1 when the master
device’s SS pin is pulled Low. When a mode fault is detected, the following sequence
occurs:
1. The MODF flag (SPI_SR[4]) is set to 1.
2. The SPI device is disabled by clearing the SPI_EN bit (SPI_CTL[5]) to 0.
3. The MASTER_EN bit (SPI_CTL[4]) is cleared to 0, forcing the device into SLAVE
mode.
PS019217-1222
eZ80F91 MCU
Product Specification
205
4. If the SPI interrupt is enabled by setting IRQ_EN (SPI_CTL[7]) High, an SPI inter-
rupt is generated.
Clearing the Mode Fault flag is performed by reading the SPI Status register. The other
SPI control bits (SPI_EN and MASTER_EN) must be restored to their original states by
user software after the Mode Fault Flag is cleared to 0.
Write Collision
The write collision flag, WCOL (SPI_SR[5]), is set to 1 when an attempt is made to write
to the SPI Transmit Shift register (SPI_TSR) while data transfer occurs. Clearing the
WCOL bit is performed by reading SPI_SR with the WCOL bit set to 1.
Upon RESET, the 16-bit BRG divisor value resets to 0002h. When the SPI is operating as
a Master, the BRG divisor value must be set to a value of 0003h or greater. When the SPI
is operating as a Slave, the BRG divisor value must be set to a value of 0004h or greater.
A software Write to either the Low- or High-byte registers for the BRG Divisor Latch
causes both the Low and High bytes to load into the BRG counter, and causes the count to
restart.
PS019217-1222
eZ80F91 MCU
Product Specification
206
1. Load the SPI BRG Registers, SPI_BRG_H and SPI_BRG_L. The external device
must deassert the SS pin if currently asserted.
2. Load the SPI Control Register, SPI_CTL.
3. Assert the ENABLE pin of the slave device using a GPIO pin.
4. Load the SPI Transmit Shift Register, SPI_TSR.
5. When the SPI data transfer is complete, deassert the ENABLE pin of the slave device.
SPI Registers
There are six registers in the Serial Peripheral Interface that provide control, status, and
data storage functions. The SPI registers are described in the following paragraphs.
PS019217-1222
eZ80F91 MCU
Product Specification
207
Table 112. SPI Baud Rate Generator Register—Low Byte (SPI_BRG_L = 00B8h)
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 1 0
CPU Access R/W R/W R/W R/W R/W R/W R/W R/W
Note: R/W = Read/Write.
Bit
Position Value Description
These bits represent the Low byte of the 16-bit BRG divider
[7:0] 00h–FF
value. The complete BRG divisor value is returned by
SPI_BRG_L h
{SPI_BRG_H, SPI_BRG_L}.
Table 113. SPI Baud Rate Generator Register—High Byte (SPI_BRG_H = 00B9h)
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
CPU Access R/W R/W R/W R/W R/W R/W R/W R/W
Note: R/W = Read/Write.
Bit
Position Value Description
These bits represent the High byte of the 16-bit BRG divider
[7:0]
00h–FFh value. The complete BRG divisor value is returned by
SPI_BRG_H
{SPI_BRG_H, SPI_BRG_L}.
PS019217-1222
eZ80F91 MCU
Product Specification
208
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 1 0 0
Bit
Position Value Description
5 0 SPI is disabled.
SPI_EN 1 SPI is enabled.
PS019217-1222
eZ80F91 MCU
Product Specification
209
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
CPU Access R R R R R R R R
Note: R = Read Only.
Bit
Position Value Description
0 SPI data transfer is not finished.
7 SPI data transfer is finished. If enabled, an interrupt is
SPIF 1 generated. This bit flag is cleared to 0 by a Read of the
SPI_SR register.
0 An SPI write collision is not detected.
6
WCOL An SPI write collision is detected. This bit Flag is cleared to 0
1
by a Read of the SPI_SR registers.
5 0 Reserved.
0 A mode fault (multimaster conflict) is not detected.
4
MODF A mode fault (multimaster conflict) is detected. This bit Flag is
1
cleared to 0 by a Read of the SPI_SR register.
[3:0] 0000 Reserved.
PS019217-1222
eZ80F91 MCU
Product Specification
210
Bit 7 6 5 4 3 2 1 0
Reset X X X X X X X X
CPU Access W W W W W W W W
Note: W = Write Only.
Bit
Position Value Description
[7:0]
00h–FFh SPI transmit data.
TX_DATA
Bit 7 6 5 4 3 2 1 0
Reset X X X X X X X X
CPU Access R R R R R R R R
Note: R = Read Only.
Bit
Position Value Description
[7:0]
00h–FFh SPI received data.
RX_DATA
PS019217-1222
eZ80F91 MCU
Product Specification
211
Clocking Overview
If another device on the I2C bus drives the clock line when the I2C is in MASTER mode,
the I2C synchronizes its clock to the I2C bus clock. The High period of the clock is
determined by the device that generates the shortest High clock period. The Low period of
the clock is determined by the device that generates the longest Low clock period.
The Low period of the clock is stretched by a slave to slow down the bus master. The Low
period is also stretched for handshaking purposes. This result is accomplished after each
bit transfer or each byte transfer. The I2C stretches the clock after each byte transfer until
the IFLG bit in the I2C_CTL register is cleared to 0.
PS019217-1222
eZ80F91 MCU
Product Specification
212
Data Validity
The data on the SDA line must be stable during the High period of the clock. The High or
Low state of the data line changes only when the clock signal on the SCL line is Low, as
displayed in Figure 43.
SDA Signal
SCL Signal
SDA Signal
SCL Signal
S P
PS019217-1222
eZ80F91 MCU
Product Specification
213
Transferring Data
Byte Format
Every character transferred on the SDA line must be a single 8-bit byte. The number of
bytes that is transmitted per transfer is unrestricted. Each byte must be followed by an
Acknowledge (ACK). Data is transferred with the most-significant bit (msb) first.
Figure 45 displays a receiver that holds the SCL line Low to force the transmitter into a
Wait state. Data transfer then continues when the receiver is ready for another byte of data
and releases SCL.
SDA Signal
MSB Acknowledge from Acknowledge from
Receiver Receiver
SCL Signal 1 2 8 9 1 9
S P
ACK
START Condition STOP Condition
Clock Line Held Low By Receiver
2
Figure 45. I C Frame Structure
Acknowledge
Data transfer with an ACK function is obligatory. The ACK-related clock pulse is gen-
erated by the master. The transmitter releases the SDA line (High) during the ACK
clock pulse. The receiver must pull down the SDA line during the ACK clock pulse so
that it remains stable (Low) during the High period of this clock pulse. See Figure 46
on page 214.
A receiver that is addressed is obliged to generate an ACK after each byte is received.
When a slave receiver does not acknowledge the slave address (for example, unable to
receive because it is performing some real-time function), the data line must be left High
by the slave. The master then generates a STOP condition to abort the transfer.
If a slave receiver acknowledges the slave address, but cannot receive any more data
bytes, the master must abort the transfer. The abort is indicated by the slave generating the
Not Acknowledge (NACK) on the first byte to follow. The slave leaves the data line High
and the master generates the STOP condition.
If a master receiver is involved in a transfer, it must signal the end of the data stream to the
slave transmitter by not generating an ACK on the final byte that is clocked out of the
slave. The slave transmitter must release the data line to allow the master to generate a
STOP or a repeated START condition.
PS019217-1222
eZ80F91 MCU
Product Specification
214
Data Output
by Transmitter
MSB
Data Output
1
by Receiver S
SCL Signal
1 2 8 9
from Master
START Condition
Clock Pulse for Acknowledge
Clock Synchronization
All masters generate their own clocks on the SCL line to transfer messages on the I2C bus.
Data is only valid during the High period of each clock.
Clock synchronization is performed using the wired AND connection of the I2C interfaces
to the SCL line, meaning that a High-to-Low transition on the SCL line causes the relevant
devices to start counting from their Low period. When a device clock goes Low, it holds
the SCL line in that state until the clock High state is reached. See Figure 47 on page 215.
The Low-to-High transition of this clock, however, cannot change the state of the SCL
line if another clock is still within its Low period. The SCL line is held Low by the device
with the longest Low period. Devices with shorter Low periods enter a High wait state
during this time.
When all devices count off the Low period, the clock line is released and goes High. There
is no difference between the device clocks and the state of the SCL line; all of the devices
start counting the High periods. The first device to complete its High period again pulls
the SCL line Low. In this way, a synchronized SCL clock is generated with its Low period
determined by the device with the longest clock Low period, and its High period
determined by the device with the shortest clock High period.
PS019217-1222
eZ80F91 MCU
Product Specification
215
CLK1 Signal
Counter
Reset
CLK2 Signal
SCL Signal
Arbitration
Any master initiates a transfer if the bus is free. As a result, multiple masters each gener-
ates a START condition if the bus is free within a minimum period. If multiple masters
generate a START condition, a START is defined for the bus. However, arbitration defines
which MASTER controls the bus. Arbitration takes place on the SDA line. As mentioned,
START conditions are initiated only while the SCL line is held High. If during this period,
a master (M1) initiates a High-to-Low transition—that is, a START condition—while a
second master (M2) transmits a Low signal on the line, then the first master, M1, cannot
take control of the bus. As a result, the data output stage for M1 is disabled.
Arbitration continues for many bits. Its first stage is comparison of the address bits. If the
masters are each trying to address the same device, arbitration continues with a compari-
son of the data. Because address and data information on the I2C bus is used for arbitra-
tion, no information is lost during this process. A master that loses the arbitration
generates clock pulses until the end of the byte in which it loses the arbitration.
If a master also incorporates a slave function and it loses arbitration during the addressing
stage, it is possible that the winning master is trying to address it. The losing master must
switch over immediately to its slave receiver mode. Figure 47 displays the arbitration pro-
cedure for two masters. Of course, more masters can be involved, depending on how many
masters are connected to the bus. The moment there is a difference between the internal
data level of the master generating DATA 1 and the actual level on the SDA line, its data
output is switched off, which means that a High output level is then connected to the bus.
As a result, the data transfer initiated by the winning master is not affected. Because con-
trol of the I2C bus is decided solely on the address and data sent by competing masters,
there is no central master, nor any order of priority on the bus.
Special attention must be paid if, during a serial transfer, the arbitration procedure is still
in progress at the moment when a repeated START condition or a STOP condition is trans-
mitted to the I2C bus. If it is possible for such a situation to occur, the masters involved
PS019217-1222
eZ80F91 MCU
Product Specification
216
must send this repeated START condition or STOP condition at the same position in the
format frame. In other words, arbitration is not allowed between:
• A repeated START condition and a data bit.
• A STOP condition and a data bit.
• A repeated START condition and a STOP condition.
Operating Modes
Master Transmit
In MASTER TRANSMIT mode, the I2C transmits a number of bytes to a slave receiver.
Enter MASTER TRANSMIT mode by setting the STA bit in the I2C_CTL register to 1.
The I2C then tests the I2C bus and transmits a START condition when the bus is free.
When a START condition is transmitted, the IFLG bit is 1 and the status code in the
I2C_SR register is 08h. Before this interrupt is serviced, the I2C_DR register must be
loaded with either a 7-bit slave address or the first part of a 10-bit slave address, with the
lsb cleared to 0 to specify TRANSMIT mode. The IFLG bit must now be cleared to 0 to
prompt the transfer to continue.
After the 7-bit slave address (or the first part of a 10-bit address) plus the Write bit are
transmitted, the IFLG is set again. A number of status codes are possible in the I2C_SR
register. See Table 118 on page 217.
PS019217-1222
eZ80F91 MCU
Product Specification
217
If 10-bit addressing is used, the status code is 18h or 20h after the first part of a 10-bit
address, plus the Write bit, are successfully transmitted.
After this interrupt is serviced and the second part of the 10-bit address is transmitted, the
I2C_SR register contains one of the codes listed in Table 119.
PS019217-1222
eZ80F91 MCU
Product Specification
218
If a repeated START condition is transmitted, the status code is 10h instead of 08h. After
each data byte is transmitted, the IFLG is set to 1 and one of the status codes listed in
Table 120 is loaded into the I2C_SR register.
PS019217-1222
eZ80F91 MCU
Product Specification
219
Table 120. I2C Master Transmit Status Codes For Data Bytes
When all bytes are transmitted, the microcontroller must write a 1 to the STP bit in the
I2C_CTL register. The I2C then transmits a STOP condition, clears the STP bit and returns
to an idle state.
Master Receive
In MASTER RECEIVE mode, the I2C receives a number of bytes from a slave
transmitter.
After the START condition is transmitted, the IFLG bit is 1 and the status code 08h is
loaded into the I2C_SR register. The I2C_DR register must be loaded with the slave
address (or the first part of a 10-bit slave address), with the lsb set to 1 to signify a Read.
The IFLG bit must be cleared to 0 as a prompt for the transfer to continue.
When the 7-bit slave address (or the first part of a 10-bit address) and the Read bit are
transmitted, the IFLG bit is set and one of the status codes listed in Table 121 on page 220
is loaded into the I2C_SR register.
PS019217-1222
eZ80F91 MCU
Product Specification
220
If 10-bit addressing is being used, the slave is first addressed using the full 10-bit address,
plus the Write bit. The master then issues a restart followed by the first part of the 10-bit
PS019217-1222
eZ80F91 MCU
Product Specification
221
address again, this time with the Read bit. The status code then becomes 40h or 48h. It is
the responsibility of the slave to remember that it had been selected prior to the restart.
If a repeated START condition is received, the status code is 10h instead of 08h.
After each data byte is received, the IFLG is set to 1 and one of the status codes listed in
Table 122 is loaded into the I2C_SR register.
Table 122. I2C Master Receive Status Codes For Data Bytes
When all bytes are received, a NACK must be sent, then the microcontroller must write 1
to the STP bit in the I2C_CTL register. The I2C then transmits a STOP condition, clears
the STP bit and returns to an idle state.
Slave Transmit
In SLAVE TRANSMIT mode, a number of bytes are transmitted to a master receiver.
The I2C enters SLAVE TRANSMIT mode when it receives its own slave address and a
Read bit after a START condition. The I2C then transmits an ACK bit (if the AAK bit is
set to 1); it then sets the IFLG bit in the I2C_CTL register. As a result, the I2C_SR register
contains the status code A8h.
Note: When I2C contains a 10-bit slave address (signified by the address range F0h–F7h in the
I2C_SAR register), it transmits an ACK when the first address byte is received after a
restart. An interrupt is generated and IFLG is set to 1; however, the status does not
change. No second address byte is sent by the master. It is up to the slave to remember it
had been selected prior to the restart.
PS019217-1222
eZ80F91 MCU
Product Specification
222
I2C goes from MASTER mode to SLAVE TRANSMIT mode when arbitration is lost dur-
ing the transmission of an address, and the slave address and Read bit are received. This
action is represented by the status code B0h in the I2C_SR register.
The data byte to be transmitted is loaded into the I2C_DR register and the IFLG bit is
cleared to 0. After the I2C transmits the byte and receives an ACK, the IFLG bit is set to 1
and the I2C_SR register contains B8h. When the final byte to be transmitted is loaded into
the I2C_DR register, the AAK bit is cleared when the IFLG is cleared to 0. After the final
byte is transmitted, the IFLG is set and the I2C_SR register contains C8h and the I2C
returns to an idle state. The AAK bit must be set to 1 before reentering SLAVE mode.
If no ACK is received after transmitting a byte, the IFLG is set and the I2C_SR register
contains C0h. The I2C then returns to an idle state. If a STOP condition is detected after an
ACK bit, the I2C returns to an idle state.
Slave Receive
In SLAVE RECEIVE mode, a number of data bytes are received from a master transmit-
ter. The I2C enters SLAVE RECEIVE mode when it receives its own slave address and a
Write bit (lsb = 0) after a START condition. The I2C transmits an ACK bit and sets the
IFLG bit in the I2C_CTL register and the I2C_SR register contains the status code 60h.
The I2C also enters SLAVE RECEIVE mode when it receives the general call address 00h
(if the GCE bit in the I2C_SAR register is set). The status code is then 70h.
Note: When the I2C contains a 10-bit slave address (signified by F0h–F7h in the I2C_SAR regis-
ter), it transmits an acknowledge after the first address byte is received but no interrupt is
generated. IFLG is not set and the status does not change. The I2C generates an interrupt
only after the second address byte is received. The I2C sets the IFLG bit and loads the sta-
tus code as described above.
I2C goes from MASTER mode to SLAVE RECEIVE mode when arbitration is lost during
the transmission of an address, and the slave address and Write bit (or the general call
address if the CGE bit in the I2C_SAR register is set to 1) are received. The status code in
the I2C_SR register is 68h if the slave address is received or 78h if the general call
address is received. The IFLG bit must be cleared to 0 to allow data transfer to continue.
If the AAK bit in the I2C_CTL register is set to 1 then an ACK bit (Low level on SDA) is
transmitted and the IFLG bit is set after each byte is received. The I2C_SR register con-
tains the two status codes 80h or 90h if SLAVE RECEIVE mode is entered with the gen-
eral call address. The received data byte are read from the I2C_DR register and the IFLG
bit must be cleared to allow the transfer to continue. If a STOP condition or a repeated
START condition is detected after the acknowledge bit, the IFLG bit is set and the I2C_SR
register contains status code A0h.
If the AAK bit is cleared to 0 during a transfer, the I2C transmits a NACK bit (High level
on SDA) after the next byte is received, and sets the IFLG bit to 1. The I2C_SR register
PS019217-1222
eZ80F91 MCU
Product Specification
223
contains the two status codes 88h or 98h if SLAVE RECEIVE mode is entered with the
general call address. The I2C returns to an idle state when the IFLG bit is cleared to 0.
I2C Registers
The section that follows describes each of the eZ80F91 MCU’s Inter-Integrated Circuit
(I2C) registers.
Addressing
The CPU interface provides access to seven 8-bit registers: four Read/Write registers, one
Read Only register and two Write Only registers, as listed in Table 123.
Register Description
I2C_SAR Slave address register
I2C_XSAR Extended slave address register
I2C_DR Data byte register
I2C_CTL Control register
I2C_SR Status register (Read Only)
I2C_CCR Clock Control register (Write Only)
I2C_SRR Software reset register (Write Only)
PS019217-1222
eZ80F91 MCU
Product Specification
224
point). After the next byte of the address (I2C_XSAR) is received, the I2C generates an
interrupt and enters SLAVE mode.Then I2C_SAR[2:1] are used as the upper 2 bits for the
10-bit extended address. The full 10-bit address is supplied by {I2C_SAR[2:1],
I2C_XSAR[7:0]}. See Table 124.
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
CPU Access R/W R/W R/W R/W R/W R/W R/W R/W
Note: R/W = Read/Write.
Bit
Position Value Description
[7:1] 00h–7Fh 7-bit slave address or upper 2 bits, I2C_SAR[2:1], of
SLA address when operating in 10-bit mode.
0 0 I2C not enabled to recognize the General Call Address.
GCE
1 I2C enabled to recognize the General Call Address.
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
CPU Access R/W R/W R/W R/W R/W R/W R/W R/W
Note: R/W = Read/Write.
PS019217-1222
eZ80F91 MCU
Product Specification
225
Bit
Position Value Description
[7:0] 00h–FFh Least-significant 8 bits of the 10-bit extended slave address
SLAX
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
CPU Access R/W R/W R/W R/W R/W R/W R/W R/W
Note: R/W = Read/Write.
Bit
Position Value Description
[7:0] 00h–FFh I2C data byte
DATA
PS019217-1222
eZ80F91 MCU
Product Specification
226
If the Master Mode Stop bit (STP) is set to 1 in MASTER mode, a STOP condition is
transmitted on the I2C bus. If the STP bit is set to 1 in SLAVE mode, the I2C module oper-
ates as if a STOP condition is received, but no STOP condition is transmitted. If both STA
and STP bits are set, the I2C block first transmits the STOP condition (if in MASTER
mode), then transmits the START condition. The STP bit is cleared to 0 automatically.
Writing a 0 to this bit produces no effect.
The I2C Interrupt Flag (IFLG) is set to 1 automatically when any of 30 of the possible 31
I2C states is entered. The only state that does not set the IFLG bit is state F8h. If IFLG is
set to 1 and the IEN bit is also set, an interrupt is generated. When IFLG is set by the I2C,
the Low period of the I2C bus clock line is stretched and the data transfer is suspended.
When a 0 is written to IFLG, the interrupt is cleared and the I2C clock line is released.
When the I2C Acknowledge bit (AAK) is set to 1, an acknowledge is sent during the
acknowledge clock pulse on the I2C bus if:
• Either the whole of a 7-bit slave address or the first or second byte of a 10-bit slave ad-
dress is received.
• The general call address is received and the General Call Enable bit in I2C_SAR is set
to 1.
• A data byte is received while in MASTER or SLAVE modes.
When AAK is cleared to 0, a NACK is sent when a data byte is received in MASTER or
SLAVE mode. If AAK is cleared to 0 in SLAVE TRANSMIT mode, the byte in the
I2C_DR register is assumed to be the final byte. After this byte is transmitted, the I2C
block enters the C8h state, then returns to an idle state. The I2C module does not respond
to its slave address unless AAK is set to 1. See Table 127 on page 226.
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
Bit
Position Value Description
7 0 I2C interrupt is disabled.
IEN
1 I2C interrupt is enabled.
6 0 The I2C bus (SCL/SDA) is disabled and all inputs are ignored.
ENAB
1 The I2C bus (SCL/SDA) is enabled.
PS019217-1222
eZ80F91 MCU
Product Specification
227
Bit
Position Value Description
5 0 Master mode START condition is sent.
STA
1 Master mode start-transmit START condition on the bus.
4 0 Master mode STOP condition is sent.
STP
1 Master mode stop-transmit STOP condition on the bus.
3 0 I2C interrupt flag is not set.
IFLG
1 I2C interrupt flag is set.
2 0 Not Acknowledge.
AAK
1 Acknowledge.
[1:0] 00 Reserved.
Bit 7 6 5 4 3 2 1 0
Reset 1 1 1 1 1 0 0 0
CPU Access R R R R R R R R
Note: R = Read only.
Bit
Position Value Description
[7:3] 00000– 5-bit I2C status code.
STAT 11111
[2:0] 000 Reserved.
There are 29 possible status codes, as listed in Table 129. When the I2C_SR register
contains the status code F8h, no relevant status information is available, no interrupt is
generated, and the IFLG bit in the I2C_CTL register is not set. All other status codes
correspond to a defined state of the I2C.
PS019217-1222
eZ80F91 MCU
Product Specification
228
When each of these states is entered, the corresponding status code appears in this register
and the IFLG bit in the I2C_CTL register is set to 1. When the IFLG bit is cleared, the sta-
tus code returns to F8h.
Code Status
00h Bus error.
08h START condition transmitted.
10h Repeated START condition transmitted.
18h Address and Write bit transmitted, ACK received.
20h Address and Write bit transmitted, ACK not received.
28h Data byte transmitted in MASTER mode, ACK received.
30h Data byte transmitted in MASTER mode, ACK not received.
38h Arbitration lost in address or data byte.
40h Address and Read bit transmitted, ACK received.
48h Address and Read bit transmitted, ACK not received.
50h Data byte received in MASTER mode, ACK transmitted.
58h Data byte received in MASTER mode, NACK transmitted.
60h Slave address and Write bit received, ACK transmitted.
68h Arbitration lost in address as master, slave address and Write bit received, ACK transmitted.
70h General Call address received, ACK transmitted.
78h Arbitration lost in address as master, General Call address received, ACK transmitted.
80h Data byte received after slave address received, ACK transmitted.
88h Data byte received after slave address received, NACK transmitted.
90h Data byte received after General Call received, ACK transmitted.
98h Data byte received after General Call received, NACK transmitted.
A0h STOP or repeated START condition received in SLAVE mode.
A8h Slave address and Read bit received, ACK transmitted.
B0h Arbitration lost in address as master, slave address and Read bit received, ACK transmitted.
B8h Data byte transmitted in SLAVE mode, ACK received.
C0h Data byte transmitted in SLAVE mode, ACK not received.
C8h Last byte transmitted in SLAVE mode, ACK received.
D0h Second Address byte and Write bit transmitted, ACK received.
PS019217-1222
eZ80F91 MCU
Product Specification
229
Code Status
D8h Second Address byte and Write bit transmitted, ACK not received.
F8h No relevant status information, IFLG = 0.
If an illegal condition occurs on the I2C bus, the bus error state is entered (status code
00h). To recover from this state, the STP bit in the I2C_CTL register must be set and the
IFLG bit cleared. The I2C then returns to an idle state. No STOP condition is transmitted
on the I2C bus.
Note: The STP and STA bits are set to 1 at the same time to recover from the bus error. The I2C
then sends a START condition.
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
CPU Access W W W W W W W W
Note: W = Read only.
Bit
Position Value Description
7 0 Reserved.
[6:3] 0000–1111 I2C clock divider scalar value.
M
[2:0] 000–111 I2C clock divider exponent.
N
The I2C clocks are derived from the system clock of the eZ80F91 device. The frequency
of this system clock is fSCK. The I2C bus is sampled by the I2C block at the frequency
fSAMP supplied by the following equation:
fSCLK
fSAMP =
2N
PS019217-1222
eZ80F91 MCU
Product Specification
230
In MASTER mode, the I2C clock output frequency on SCL (fSCL) is supplied by the fol-
lowing equation:
fSCLK
fSCL =
10 • (M + 1)(2)N
The use of two separately-programmable dividers allows the MASTER mode output
frequency to be set independently of the frequency at which the I2C bus is sampled. This
feature is particularly useful in multimaster systems because the frequency at which the
I2C bus is sampled must be at least 10 times the frequency of the fastest master on the bus
to ensure that START and STOP conditions are always detected. By using two
programmable clock divider stages, a high sampling frequency is ensured while allowing
the MASTER mode output to be set to a lower frequency.
Bit 7 6 5 4 3 2 1 0
Reset X X X X X X X X
CPU Access W W W W W W W W
Note: W = Write Only.
Bit
Position Value Description
[7:0] 00h–FFh Writing any value to this register performs a software reset
SRR of the I2C module.
PS019217-1222
eZ80F91 MCU
Product Specification
231
The above features are built into the silicon. Control is provided via a two-wire interface
that is connected to the USB Smart Cable emulator. Figure 48 displays a typical setup
using a a target board, USB Smart Cable, and the host PC running Zilog Developer Studio
II. For more information on USB Smart Cable and ZDS II, refer to www.zilog.com.
Target Board
C
O
N
Zilog N
Developer USB Smart eZ80®
E
Studio Cable C Product
Emulator T
O
R
PS019217-1222
eZ80F91 MCU
Product Specification
232
ZDI allows reading and writing of most internal registers without disturbing the state of
the machine. Reads and Writes to memory occurs as fast as the ZDI downloads and
uploads data, with a maximum supported ZDI clock frequency of 0.4 times the eZ80F91
system clock frequency. Also, regardless of the ZDI clock frequency, the duration of the
low-phase of the ZDI clock (that is, ZCL = 0) must be at least 1.25 times the system clock
period.
For the description on how to enable the ZDI interface on the exit of RESET, see the OCI
Activation on page 258.
ZDI-Supported Protocol
ZDI supports a bidirectional serial protocol. The protocol defines any device that sends
data as the transmitter and any receiving device as the receiver. The device controlling the
transfer is the master and the device being controlled is the slave. The master always initi-
ates the data transfers and provides the clock for both receive and transmit operations. The
ZDI block on the eZ80F91 device is considered a slave in all data transfers.
Figure 49 on page 233 displays the schematic for building a connector on a target board.
This connector allows you to connect directly to the USB Smart Cable emulator using a
six-pin header.
PS019217-1222
eZ80F91 MCU
Product Specification
233
TVDD
(Target VDD )
10 Kohm 10 Kohm
2 1
4 3
eZ80F91 TCK (ZCL)
6 5
TDI (ZDA)
PS019217-1222
eZ80F91 MCU
Product Specification
234
Data is shifted in during a Write to the ZDI block on the rising edge of ZCL, as displayed
in Figure 50. Data is shifted out during a Read from the ZDI block on the falling edge of
ZCL as displayed in Figure 51. When an operation is completed, the master stops during
the ninth cycle and holds the ZCL signal High.
ZCL
ZDA
Start Signal
ZCL
ZDA
Start Signal
PS019217-1222
eZ80F91 MCU
Product Specification
235
accept external bus requests, the single-bit byte separator must be Low (logical 0) during
all ZDI commands. This Low value indicates that ZDI is still operating and is not ready to
relinquish the bus. The CPU does not accept the external bus requests until the single-bit
byte separator is a High (logical 1). For more information on accepting bus requests in
ZDI DEBUG mode, see Bus Requests During ZDI Debug Mode on page 238.
Single-Bit
Byte Separator
or new ZDI
START Signal
ZCL S 1 2 3 4 5 6 7 8 9
START 0 = WRITE
Signal 1 = READ
PS019217-1222
eZ80F91 MCU
Product Specification
236
ZCL 7 8 9 1 2 3 4 5 6 7 8 9
PS019217-1222
eZ80F91 MCU
Product Specification
237
ZCL 7 8 9 1 2 3 7 8 9 1 2 9
ZCL 7 8 9 1 2 3 4 5 6 7 8 9
Note: In ZDI single-byte read operations, after each read operation, the Program Counter (PC)
address is incremented by two bytes. For example, if the current PC address is 0x00, then
PS019217-1222
eZ80F91 MCU
Product Specification
238
a read operation at 0x00 increments the PC to 0x02. To read the next byte, the PC must be
decremented by one.
ZCL 7 8 9 1 2 3 7 8 9 1 2 9
PS019217-1222
eZ80F91 MCU
Product Specification
239
Reset
ZDI Address ZDI Register Name ZDI Register Function Value
00h ZDI_ADDR0_L Address Match 0 Low Byte XXh
01h ZDI_ADDR0_H Address Match 0 High Byte XXh
02h ZDI_ADDR0_U Address Match 0 Upper Byte XXh
04h ZDI_ADDR1_L Address Match 1 Low Byte XXh
05h ZDI_ADDR1_H Address Match 1 High Byte XXh
06h ZDI_ADDR1_U Address Match 1 Upper Byte XXh
PS019217-1222
eZ80F91 MCU
Product Specification
240
Reset
ZDI Address ZDI Register Name ZDI Register Function Value
08h ZDI_ADDR2_L Address Match 2 Low Byte XXh
09h ZDI_ADDR2_H Address Match 2 High Byte XXh
0Ah ZDI_ADDR2_U Address Match 2 Upper Byte XXh
0Ch ZDI_ADDR3_L Address Match 3 Low Byte XXh
0Dh ZDI_ADDR3_H Address Match 3 High Byte XXh
0Eh ZDI_ADDR3_U Address Match 4 Upper Byte XXh
10h ZDI_BRK_CTL Break Control Register 00h
11h ZDI_MASTER_CTL Master Control Register 00h
13h ZDI_WR_DATA_L Write Data Low Byte XXh
14h ZDI_WR_DATA_H Write Data High Byte XXh
15h ZDI_WR_DATA_U Write Data Upper Byte XXh
16h ZDI_RW_CTL Read/Write Control Register 00h
17h ZDI_BUS_CTL Bus Control Register 00h
21h ZDI_IS4 Instruction Store 4 XXh
22h ZDI_IS3 Instruction Store 3 XXh
23h ZDI_IS2 Instruction Store 2 XXh
24h ZDI_IS1 Instruction Store 1 XXh
25h ZDI_IS0 Instruction Store 0 XXh
30h ZDI_WR_MEM Write Memory Register XXh
Reset
ZDI Address ZDI Register Name ZDI Register Function Value
00h ZDI_ID_L eZ80® Product ID Low Byte Register 08h
01h ZDI_ID_H eZ80 Product ID High Byte Register 00h
02h ZDI_ID_REV eZ80 Product ID Revision Register XXh
PS019217-1222
eZ80F91 MCU
Product Specification
241
Reset
ZDI Address ZDI Register Name ZDI Register Function Value
03h ZDI_STAT Status Register 00h
10h ZDI_RD_L Read Memory Address Low Byte Register XXh
11h ZDI_RD_H Read Memory Address High Byte Register XXh
12h ZDI_RD_U Read Memory Address Upper Byte Register XXh
17h ZDI_BUS_STAT Bus Status Register 00h
20h ZDI_RD_MEM Read Memory Data Value XXh
Bit 7 6 5 4 3 2 1 0
Reset X X X X X X X X
CPU Access W W W W W W W W
Note: W = Write Only.
Bit
Position Value Description
[7:0] 00h–FFh The four sets of ZDI address match registers are used for
zdi_addrx_l, setting the addresses for generating break points. The 24
zdi_addrx_h, bit addresses are supplied by {ZDI_ADDRx_U,
or ZDI_ADDRx_H, ZDI_ADDRx_L, where x is 0, 1, 2, or 3.
zdi_addrx_u
PS019217-1222
eZ80F91 MCU
Product Specification
242
PS019217-1222
eZ80F91 MCU
Product Specification
243
Table 136. ZDI Break Control Register (ZDI_BRK_CTL = 10h in the ZDI Write Only Register
Address Space)
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
CPU Access W W W W W W W W
Note: W = Write Only.
Bit
Position Value Description
7 0 The ZDI break on the next CPU instruction is disabled.
brk_next Clearing this bit releases the CPU from its current BREAK
condition.
1 The ZDI break on the next CPU instruction is enabled. The
CPU uses multibyte Op Codes and multibyte operands.
Break points only occur on the first Op Code in a multibyte
Op Code instruction. If the ZCL pin is High and the ZDA pin
is Low at the end of RESET, this bit is set to 1 and a break
occurs on the first instruction following the RESET. This bit
is set automatically during ZDI break on address match. A
break is also forced by writing a 1 to this bit.
6 0 The ZDI break, upon matching break address 3, is
brk_addr3 disabled.
1 The ZDI break, upon matching break address 3, is
enabled.
5 0 The ZDI break, upon matching break address 2, is
brk_addr2 disabled.
1 The ZDI break, upon matching break address 2, is
enabled.
4 0 The ZDI break, upon matching break address 1, is
brk_addr1 disabled.
1 The ZDI break, upon matching break address 1, is
enabled.
3 0 The ZDI break, upon matching break address 0, is
brk_addr0 disabled.
1 The ZDI break, upon matching break address 0, is
enabled.
PS019217-1222
eZ80F91 MCU
Product Specification
244
Bit
Position Value Description
2 0 The Ignore the Low Byte function of the ZDI Address Match
ign_low_1 1 registers is disabled. If brk_addr1 is set to 1, ZDI initiates
a break when the entire 24-bit address, ADDR[23:0],
matches the 3-byte value {ZDI_ADDR1_U,
ZDI_ADDR1_H, ZDI_ADDR1_L}.
1 The Ignore the Low Byte function of the ZDI Address Match
1 registers is enabled. If brk_addr1 is set to 1, ZDI initiates
a break when only the upper 2 bytes of the 24-bit address,
ADDR[23:8], match the 2-byte value {ZDI_ADDR1_U,
ZDI_ADDR1_H}. As a result, a break occurs anywhere
within a 256-byte page.
1 0 The Ignore the Low Byte function of the ZDI Address Match
ign_low_0 1 registers is disabled. If brk_addr0 is set to 1, ZDI initiates
a break when the entire 24-bit address, ADDR[23:0],
matches the 3-byte value {ZDI_ADDR0_U,
ZDI_ADDR0_H, ZDI_ADDR0_L}.
1 The Ignore the Low Byte function of the ZDI Address Match
1 registers is enabled. If the brk_addr1 is set to 0, ZDI
initiates a break when only the upper 2 bytes of the 24-bit
address, ADDR[23:8], match the 2 bytes value
{ZDI_ADDR0_U, ZDI_ADDR0_H}. As a result, a break
occurs anywhere within a 256-byte page.
0 0 ZDI single step mode is disabled.
single_step
1 ZDI single step mode is enabled. ZDI asserts a break
following execution of each instruction.
PS019217-1222
eZ80F91 MCU
Product Specification
245
Table 137. ZDI Master Control Register (ZDI_MASTER_CTL = 11h in ZDI Register Write
Address Spaces)
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
CPU Access W W W W W W W W
Note: W = Write Only.
Bit
Position Value Description
7 0 No action.
ZDI_RESET
1 Initiate a RESET of the eZ80F91. This bit is automatically
cleared at the end of the RESET event.
[6:0] 0000000 Reserved.
PS019217-1222
eZ80F91 MCU
Product Specification
246
Table 138. ZDI Write Data Registers (ZDI_WR_U = 13h, ZDI_WR_H = 14h, and ZDI_WR_L =
15h in the ZDI Register Write Only Address Space)
Bit 7 6 5 4 3 2 1 0
Reset X X X X X X X X
CPU Access W W W W W W W W
Note: X = Undefined; W = Write.
Bit
Position Value Description
[7:0] 00h–FFh These registers contain the data that is written during
zdi_wr_l, execution of a Write operation defined by the
zdi_wr_h, ZDI_RW_CTL register. The 24-bit data value is stored
or as {ZDI_WR_U, ZDI_WR_H, ZDI_WR_L}. If less than
zdi_wr_l 24 bits of data are required to complete the required
operation, the data is taken from the LSBs.
PS019217-1222
eZ80F91 MCU
Product Specification
247
Table 139. ZDI Read/Write Control Register Functions (ZDI_RW_CTL = 16h in the ZDI
Register Write Only Address Space)
Hex Hex
Value Command Value Command
00 Read {MBASE, A, F} 80 Write AF
ZDI_RD_U ← MBASE MBASE ← ZDI_WR_U
ZDI_RD_H ← F F ← ZDI_WR_H
ZDI_RD_L ← A A ← ZDI_WR_L
01 Read BC 81 Write BC
ZDI_RD_U ← BCU BCU ← ZDI_WR_U
ZDI_RD_H ← B B ← ZDI_WR_H
ZDI_RD_L ← C C ← ZDI_WR_L
02 Read DE 82 Write DE
ZDI_RD_U ← DEU DEU ← ZDI_WR_U
ZDI_RD_H ← D D ← ZDI_WR_H
ZDI_RD_L ← E E ← ZDI_WR_L
03 Read HL 83 Write HL
ZDI_RD_U ← HLU HLU ← ZDI_WR_U
ZDI_RD_H ← H H ← ZDI_WR_H
ZDI_RD_L ← L L ← ZDI_WR_L
04 Read IX 84 Write IX
ZDI_RD_U ← IXU IXU ← ZDI_WR_U
ZDI_RD_H ← IXH IXH ← ZDI_WR_H
ZDI_RD_L ← IXL IXL ← ZDI_WR_L
PS019217-1222
eZ80F91 MCU
Product Specification
248
Table 139. ZDI Read/Write Control Register Functions (ZDI_RW_CTL = 16h in the ZDI
Register Write Only Address Space) (Continued)
Hex Hex
Value Command Value Command
05 Read IY 85 Write IY
ZDI_RD_U ← IYU IYU ← ZDI_WR_U
ZDI_RD_H ← IYH IYH ← ZDI_WR_H
ZDI_RD_L ← IYL IYL ← ZDI_WR_L
06 Read SP 86 Write SP
In ADL mode, SP = SPL. In ADL mode, SP = SPL.
In Z80® mode, SP = SPS. In Z80 mode, SP = SPS.
07 Read PC 87 Write PC
ZDI_RD_U ← PC[23:16] PC[23:16] ← ZDI_WR_U
ZDI_RD_H ← PC[15:8] PC[15:8] ← ZDI_WR_H
ZDI_RD_L ← PC[7:0] PC[7:0] ← ZDI_WR_L
08 Set ADL 88 Reserved
ADL ← 1
09 Reset ADL 89 Reserved
ADL ← 0
0A Exchange CPU register sets 8A Reserved
AF ← AF’
BC ← BC’
DE ← DE’
HL ← HL’
0B Read memory from current PC 8B Write memory from current PC
value, increment PC value, increment PC
PS019217-1222
eZ80F91 MCU
Product Specification
249
Table 140. ZDI Bus Control Register (ZDI_BUS_CTL = 17h in the ZDI Register Write Only
Address Space)
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
CPU Access W W W W W W W W
Note: W = Write Only.
Bit
Position Value Description
7 0 Bus requests by external peripherals using the BUSREQ
ZDI_BUSAK_EN pin are ignored. The bus acknowledge signal, BUSACK, is
not asserted in response to any bus requests.
1 Bus requests by external peripherals using the BUSREQ
pin are accepted. A bus acknowledge occurs at the end of
the current ZDI operation. The bus acknowledge is
indicated by asserting the BUSACK pin in response to a
bus request.
6 0 Deassert the bus acknowledge pin (BUSACK) to return
ZDI_BUSAK control of the address and data buses back to ZDI.
1 Assert the bus acknowledge pin (BUSACK) to pass control
of the address and data buses to an external peripheral.
[5:0] 000000 Reserved.
PS019217-1222
eZ80F91 MCU
Product Specification
250
operate. These 6-byte instructions cannot be executed directly using the ZDI Instruction
Store registers. See Table 141.
Note: The Instruction Store 0 register is located at a higher ZDI address than the other Instruc-
tion Store registers. This feature allows the use of the ZDI auto-address increment function
to load and execute a multibyte instruction with a single data stream from the ZDI master.
Execution of the instruction commences with writing the final byte to ZDI_IS0.
Table 141. Instruction Store 4:0 Registers (ZDI_IS4 = 21h, ZDI_IS3 = 22h, ZDI_IS2 = 23h,
ZDI_IS1 = 24h, and ZDI_IS0 = 25h in the ZDI Register Write Only Address Space)
Bit 7 6 5 4 3 2 1 0
Reset X X X X X X X X
CPU Access W W W W W W W W
Note: X = Undefined; W = Write.
Bit
Position Value Description
[7:0] 00h–FFh These registers contain the Op Codes and operands for
zdi_is4, immediate execution by the CPU following a Write to
zdi_is3, ZDI_IS0. The ZDI_IS0 register contains the first Op Code
zdi_is2, of the instruction. The remaining ZDI_ISx registers
zdi_is1, contain any additional Op Codes or operand dates
or required for execution of the required instruction.
zdi_is0
PS019217-1222
eZ80F91 MCU
Product Specification
251
Table 142. ZDI Write Memory Register (ZDI_WR_MEM = 30h in the ZDI Register Write Only
Address Space)
Bit 7 6 5 4 3 2 1 0
Reset X X X X X X X X
CPU Access W W W W W W W W
Note: X = Undefined; W = Write.
Bit
Position Value Description
[7:0] 00h–FFh The 8-bit data that is transferred to the ZDI slave
zdi_wr_mem following a Write to this address is written to the address
indicated by the current Program Counter. The Program
Counter is incremented following each 8 bits of data. In
Z80® MEMORY mode, ({MBASE, PC[15:0]}) ← 8 bits of
transferred data. In ADL MEMORY mode, (PC[23:0]) ←
8-bits of transferred data.
Table 143. eZ80 Product ID Low Byte Register (ZDI_ID_L = 00h in the ZDI Register Read Only
Address Space, ZDI_ID_L = 0000h in the I/O Register Address Space)
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 1 0 0 0
CPU Access R R R R R R R R
Note: R = Read Only.
Bit
Position Value Description
[7:0] 08h {ZDI_ID_H, ZDI_ID_L} = {00h, 08h} indicates the eZ80F91
zdi_id_l product.
PS019217-1222
eZ80F91 MCU
Product Specification
252
Table 144. eZ80® Product ID High Byte Register (ZDI_ID_H = 01h in the ZDI Register Read Only
Address Space, ZDI_ID_H = 0001h in the I/O Register Address Space)
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
CPU Access R R R R R R R R
Note: R = Read Only.
Bit
Position Value Description
[7:0] 00h {ZDI_ID_H, ZDI_ID_L} = {00h, 08h} indicates the eZ80F91
zdi_id_H device.
Table 145. eZ80 Product ID Revision Register (ZDI_ID_REV = 02h in the ZDI Register Read
Only Address Space, ZDI_ID_REV = 0002h in the I/O Register Address Space)
Bit 7 6 5 4 3 2 1 0
Reset X X X X X X X X
CPU Access R R R R R R R R
Note: X = Undetermined; R = Read Only.
Bit
Position Value Description
[7:0] 00h–FFh Identifies the current revision of the eZ80F91 product.
zdi_id_rev
PS019217-1222
eZ80F91 MCU
Product Specification
253
Table 146. ZDI Status Register (ZDI_STAT = 03h in the ZDI Register Read Only Address Space)
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
CPU Access R R R R R R R R
Note: R = Read Only.
Bit
Position Value Description
7 0 The CPU is not functioning in ZDI mode.
zdi_active
1 The CPU is currently functioning in ZDI mode.
6 0 Reserved.
5 0 The CPU is not currently in HALT or SLEEP mode.
halt_SLP
1 The CPU is currently in HALT or SLEEP mode.
4 0 The CPU is operating in Z80® MEMORY mode.
ADL (ADL bit = 0)
1 The CPU is operating in ADL MEMORY mode.
(ADL bit = 1)
3 0 The CPU’s Mixed-Memory mode (MADL) bit is reset to 0.
MADL
1 The CPU’s Mixed-Memory mode (MADL) bit is set to 1.
2 0 The CPU’s Interrupt Enable Flag 1 is reset to 0. Maskable
IEF1 interrupts are disabled.
1 The CPU’s Interrupt Enable Flag 1 is set to 1. Maskable
interrupts are enabled.
[1:0] 00 Reserved.
Reserved
PS019217-1222
eZ80F91 MCU
Product Specification
254
Table 147. ZDI Read Register Low, High, and Upper (ZDI_RD_L = 10h, ZDI_RD_H = 11h, and
ZDI_RD_U = 12h in the ZDI Register Read Only Address Space)
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
CPU Access R R R R R R R R
Note: R = Read Only.
Bit
Position Value Description
[7:0] 00h–FFh Values read from the memory location as requested by the
zdi_rd_l, ZDI Read Control register during a ZDI Read operation.
zdi_rd_h, The 24-bit value is supplied by {ZDI_RD_U, ZDI_RD_H,
or ZDI_RD_L}.
zdi_rd_u
PS019217-1222
eZ80F91 MCU
Product Specification
255
Table 148. ZDI Bus Control Register (ZDI_BUS_STAT = 17h in the ZDI Register Read Only
Address Space)
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
CPU Access R R R R R R R R
Note: R = Read Only.
Bit
Position Value Description
7 0 Bus requests by external peripherals using the
ZDI_BUSAcK_En BUSREQ pin are ignored. The bus acknowledge signal,
BUSACK, is not asserted.
1 Bus requests by external peripherals using the
BUSREQ pin are accepted. A bus acknowledge occurs
at the end of the current ZDI operation. The bus
acknowledge is indicated by asserting the BUSACK pin.
6 0 Address and data buses are not relinquished to an
ZDI_BUS_STAT external peripheral. bus acknowledge is deasserted
(BUSACK pin is High).
1 Address and data buses are relinquished to an external
peripheral. bus acknowledge is asserted (BUSACK pin
is Low).
[5:0] 000000 Reserved.
PS019217-1222
eZ80F91 MCU
Product Specification
256
Note that the delay between issuing a memory read request and the return of the corre-
sponding data amount to multiple ZDI clock cycles. This delay is a function of the wait
state configuration of the memory space being accessed as well as the relative frequencies
of the ZDI clock and the system clock. If the ZDI master begins clocking the read data out
of the eZ80F91 soon after issuing the memory read request, invalid data will be returned.
Since no data-valid handshake mechanism exists in the ZDI protocol, the ZDI master must
account for expected memory read delay in some way.
A technique exists to mask this delay in almost all situations. It always reads at least two
consecutive bytes, starting one address lower than the address of interest. In this situation,
the eZ80F91 internally prefetches the data from the second address while the ZDI master
is sending the second read request. This allows enough time for the second ZDI memory
read to return valid data. The first data byte returned to the ZDI master must be discarded
since it is invalid. Memory reads of more than two consecutive bytes will also return cor-
rect data for all but the first address.
Table 149. ZDI Read Memory Register (ZDI_RD_MEM = 20h in the ZDI Register Read Only
Address Space)
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
CPU Access R R R R R R R R
Note: R = Read Only.
Bit
Position Value Description
[7:0] 00h–FFh 8-bit data Read from the memory address indicated by
zdi_rd_mem the CPU’s Program Counter. In Z80® Memory mode, 8-
bit data is transferred out from address {MBASE,
PC[15:0]}. In ADL Memory mode, 8-bit data is
transferred out from address PC[23:0].
PS019217-1222
eZ80F91 MCU
Product Specification
257
On-Chip Instrumentation
Introduction to On-Chip Instrumentation
On-Chip Instrumentation1 (OCI™) for the eZ80® CPU core enables powerful debugging
features. The OCI provides run control, memory and register visibility, complex break
points, and trace history features.
The OCI employs all of the functions of the Zilog Debug Interface (ZDI) as described in
the ZDI section. It also adds the following debug features:
• Control via a 4-pin Joint Test Action Group (JTAG) port that conforms to IEEE Stan-
dard 1149.1 (Test Access Port and Boundary Scan Architecture)
• Complex break point trigger functions
• Break point enhancements, such as the ability to:
– Define two break point addresses that form a range
– Break on masked data values
– Start or stop trace
– Assert a trigger output signal
1. On-Chip Instrumentation and OCI are trademarks of First Silicon Solutions, Inc.
PS019217-1222
eZ80F91 MCU
Product Specification
258
OCI Activation
OCI features clock initialization circuitry so that external debug hardware is detected dur-
ing power-up. The external debugger must drive the OCI clock pin (TCK) Low at least
two system clock cycles prior to the end of the RESET to activate the OCI block. If TCK
is High at the end of the RESET, the OCI block shuts down so that it does not draw power
in normal product operation. When the OCI is shut down, ZDI is enabled directly and is
accessed via the clock (TCK) and data (TDI) pins. For more information on ZDI, see Zilog
Debug Interface on page 231.
OCI Interface
There are six dedicated pins on the eZ80F91 for the OCI interface. Four pins—TCK,
TMS, TDI, and TDO—are required for IEEE Standard 1149.1-compliant JTAG ports. A
fifth pin, TRSTn, is optional for IEEE 1149.1 and utilized by the eZ80F91 device. The
TRIGOUT pin provides additional testability features. These six OCI pins are listed in
Table 150.
PS019217-1222
eZ80F91 MCU
Product Specification
259
Pin Coverage
All pins are included in the boundary scan chain, except the following:
• TCK
• TMS
• TDI
• TDO
• TRSTN
• VDD
• VSS
• PLL_VDD
• PLL_VSS
• RTC_VDD
• XIN
• XOUT
• RTC_XIN
• RTC_XOUT
• LOOP_FILT
PS019217-1222
eZ80F91 MCU
Product Specification
260
PS019217-1222
eZ80F91 MCU
Product Specification
261
PS019217-1222
eZ80F91 MCU
Product Specification
262
PS019217-1222
eZ80F91 MCU
Product Specification
263
PS019217-1222
eZ80F91 MCU
Product Specification
264
Usage
Boundary scan functionality is utilized by issuing the appropriate Test Access Port (TAP)
instruction and shifting data accordingly. Both of these steps are accomplished using the
JTAG interface. To activate the TAP (see OCI Activation on page 258), the TCK pin must
be driven Low at least two CPU system clock cycles prior to the deassertion of the RESET
pin. Otherwise the OCI-JTAG features are disabled.
As per the IEEE 1149.1 specification, the boundary scan cells capture system I/O on the
rising edge of TCK during the CAPTURE_DR state. This captured data is shifted on the
rising edge of TCK while in the SHIFT_DR state. Pins and logic receive shifted data only
when enabled, and only on the falling edge of TCK during the UPDATE_DR state, after
shifting is completed.
For more information about eZ80F91 boundary scan support, refer to Using BSDL Files
with eZ80® and eZ80Acclaim!® Devices (AN0114).
PS019217-1222
eZ80F91 MCU
Product Specification
265
Phase-Locked Loop
Overview
The Phase-Locked-Loop (PLL) is a programmable frequency multiplier that satisfies the
equation SCLK (Hz) = N * FOSC(Hz). Figure 57 displays the PLL block diagram.
System Clock
(FOSC < SCLK < FOSC * N)
RTC_CLK
(1MHz < FOSC < 10MHz)
x2
Oscillator PFD Charge VCO Off-Chip
x1 Pump Loop Filter
CPLL1 RPLL
PLL_CTL0[7:6]
Lock CPLL2
PLL_INT Detect
Div N
PLL_CTL0[3:2]
{PLL_DIV_H, PLL_DIV_L}
PS019217-1222
eZ80F91 MCU
Product Specification
266
Charge Pump
The Charge Pump is an analog block that is driven by two digital inputs from the PFD that
control its programmable current sources. The internal current source contains four
programmable values: 1.5 mA, 1 mA, 500 µA, and 100 µA. These values are selected by
PLL_CTRL1[7:6]. The selected current drive is sinked/sourced onto the loop-filter node
according to the error (or difference) between the falling edges of the PFD inputs. Ideally,
when the PLL is locked, there are no errors (error = 0) and no current is sourced/sinked
onto the loop-filter node.
Loop Filter
The Loop Filter comprises off-chip passive components (usually 1 resistor and 2
capacitors) that filter/integrate charge from the internal charge pump. The filtered node
also drives the VCO input, which creates a proportional frequency output. When PLL is
not used, the Loop Filter pin must not be connected.
Divider
The Divider is a digital, programmable downcounter. The divider input is driven by the
VCO. The divider output drives the PFD. The function of the Divider is to divide the
frequency of its input signal by a programmable factor N and supply the result in its
output.
MUX/CLK Sync
The MUX/CLK Sync is a digital, software-controllable multiplexer that selects between
PLL or the XTAL oscillator as the system clock (SCLK). A PLL source is selected only
after the PLL is locked (via the lock detect block) to allow glitch-free clock switching.
Lock Detect
The Lock Detect digital block analyzes the PFD output for a locked condition. The PLL
block of the eZ80F91 device is considered locked when the error (or difference) between
the reference clock and divided-down VCO is less than the minimum timing lock criteria
PS019217-1222
eZ80F91 MCU
Product Specification
267
for the number of consecutive reference clock cycles. The lock criteria is selected in the
PLL Control Register, PLL_CTL0[LDS_CTL]. When the locked condition is met, this
block outputs a logic High signal (lock) that interrupts the CPU.
POR/System
Reset
Program:
{PLL Divider}
PLL_DIV_L then PLL_DIV_H
{Charge Pump & Lock criteria}
PLL_CTL0
Enable:
{Interrupts & PLL}
PLL_CTL1
PS019217-1222
eZ80F91 MCU
Product Specification
268
PLL Registers
PLL Divider Control Register—Low and High Bytes
This register is designed such that the 11 bit divider value is loaded into the divider mod-
ule whenever the PLL_DIV_H register is written. Therefore, the procedure must be to
load the PLL_DIV_L register, followed by the PLL_DIV_H register, for the divider to
receive the appropriate value.
The divider is designed such that any divider value less than two is ignored; a value of two
is used in its place.
The LSB of PLL divider N is set via the corresponding bits in the PLL_DIV_L register.
See Table 152 and Table 153 on page 269.
Note: The PLL divider register are written only when the PLL is disabled. A read-back of the
PLL Divider registers returns 0.
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 1 0
CPU Access W W W W W W W W
Note: W = Write only.
Bit
Position Value Description
[7:0] 00h–FFh These bits represent the Low byte of the 11 bit PLL divider
PLL_DIV_L value. The complete PLL divider value is returned by
{PLL_DIV_H, PLL_DIV_L}.
PS019217-1222
eZ80F91 MCU
Product Specification
269
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
CPU Access W W W W W W W W
Note: R = Read only; R/W = Read/Write.
Bit
Position Value Description
[7:3] 00h Reserved
[2:0] 0h–7h These bits represent the High byte of the 11 bit PLL divider
PLL_DIV_H value. The complete PLL divider value is returned by
{PLL_DIV_H, PLL_DIV_L}.
Lock Detect Sensitivity (LDS_CTL)—Determines the lock criteria for the PLL.
System Clock Source (CLK_MUX)—Selects the system clock source from a choice of
the external crystal oscillator (XTAL), PLL, or Real-Time Clock crystal oscillator.
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
Bit
Position Value Description
[7:6] 00 Charge pump current = 100 µA
CHRP_CTL1
01 Charge pump current = 500 µA
10 Charge pump current = 1.0 mA
11 Charge pump current = 1.5 mA
PS019217-1222
eZ80F91 MCU
Product Specification
270
Bit
Position Value Description
[5:4] 00 Reserved
[3:2] 00 Lock criteria—8 consecutive cycles of 20 ns
LDS_CTL1
01 Lock criteria—16 consecutive cycles of 20 ns
10 Lock criteria—8 consecutive cycles of 400 ns
11 Lock criteria—16 consecutive cycles of 400 ns
[1:0] 00 System clock source is the external crystal oscillator
CLK_MUX
01 System clock source is the PLL2
10 System clock source is the Real-Time Clock crystal oscillator
11 Reserved (previous select is preserved)
Notes
1. Bits are programmed only when the PLL is disabled. The PLL is disabled when PLL_CTL1 bit
0 is equal to 0.
2. PLL cannot be selected when disabled or out of lock.
Lock Status (LCK_STATUS)—The current lock bit out of the PLL is synchronized and
read via this bit.
Interrupt Lock (INT_LOCK)—This signal feeds the interrupt line out of the CLKGEN
module and indicates that a rising edge on the lock signal out of the PLL has been
observed.
Interrupt Unlock (INT_UNLOCK)—This signal feeds the interrupt line out of the clkgen
module and indicates that a falling edge on the lock signal out of the PLL has been
observed.
Interrupt Lock Enable (INT_LOCK_EN)—This signal enables the interrupt lock bit.
PS019217-1222
eZ80F91 MCU
Product Specification
271
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
Bit
Position Value Description
[7:6] 00 Reserved.
5 0 PLL is currently out of lock.
LCK_STATUS
1 PLL is currently locked.
4 0 Lock signal from PLL has not risen since last time register was
INT_LOCK read.
1 Interrupt generated when PLL enters LOCK mode. Held until
register is read.
3 0 Lock signal from PLL has not fallen since last time register was
INT_UNLOCK read.
1 Interrupt generated when PLL goes out of lock. Held until
register is read.
2 0 Interrupt generation for PLL locked condition (Bit 4) is disabled.
INT_LOCK_EN
1 Interrupt generation for PLL locked condition is enabled.
1 0 Interrupt generation for PLL unlocked condition (Bit 3) is
INT_UNLOCK_ disabled.
EN
1 Interrupt generation for PLL unlocked condition is enabled.
0 0 PLL is disabled.1
PLL_ENABLE
1 PLL is enabled.
Note
1. PLL cannot be disabled if the CLK_MUX bit of PLL_CTL0[1:0] is set to 01, because the PLL is
selected as the clock source.
PS019217-1222
eZ80F91 MCU
Product Specification
272
PLL Characteristics
The operating and testing characteristics for the PLL are listed in Table 156.
Note: Not all conditions are tested in production test. The values in Table 156 are for design and
characterization only.
PS019217-1222
eZ80F91 MCU
Product Specification
273
PS019217-1222
eZ80F91 MCU
Product Specification
274
PS019217-1222
eZ80F91 MCU
Product Specification
275
Mnemonic Instruction
ADC Add with Carry
ADD Add without Carry
CP Compare with Accumulator
DAA Decimal Adjust Accumulator
DEC Decrement
INC Increment
MLT Multiply
NEG Negate Accumulator
SBC Subtract with Carry
SUB Subtract without Carry
Mnemonic Instruction
BIT Bit Test
RES Reset Bit
SET Set Bit
Mnemonic Instruction
CPD (CPDR) Compare and Decrement (with Repeat)
CPI (CPIR) Compare and Increment (with Repeat)
LDD (LDDR) Load and Decrement (with Repeat)
LDI (LDIR) Load and Increment (with Repeat)
PS019217-1222
eZ80F91 MCU
Product Specification
276
Mnemonic Instruction
EX Exchange registers
EXX Exchange CPU Multibyte register banks
Mnemonic Instruction
IN Input from I/O
IN0 Input from I/O on Page 0
IND (INDR) Input from I/O and Decrement (with Repeat)
INDRX Input from I/O and Decrement Memory Address with Stationary
I/O Address
IND2 (IND2R) Input from I/O and Decrement (with Repeat)
INDM (INDMR) Input from I/O and Decrement (with Repeat)
INI (INIR) Input from I/O and Increment (with Repeat)
INIRX Input from I/O and Increment Memory Address with Stationary
I/O Address
INI2 (INI2R) Input from I/O and Increment (with Repeat)
INIM (INIMR) Input from I/O and Increment (with Repeat)
OTDM (OTDMR) Output to I/O and Decrement (with Repeat)
OTDRX Output to I/O and Decrement Memory Address with Stationary
I/O Address
OTIM (OTIMR) Output to I/O and Increment (with Repeat)
OTIRX Output to I/O and Increment Memory Address with Stationary
I/O Address
OUT Output to I/O
OUT0 Output to I/0 on Page 0
OUTD (OTDR) Output to I/O and Decrement (with Repeat)
OUTD2 (OTD2R) Output to I/O and Decrement (with Repeat)
OUTI (OTIR) Output to I/O and Increment (with Repeat)
PS019217-1222
eZ80F91 MCU
Product Specification
277
Mnemonic Instruction
OUTI2 (OTI2R) Output to I/O and Increment (with Repeat)
TSTIO Test I/O
Mnemonic Instruction
LD Load
LEA Load Effective Address
PEA Push Effective Address
POP Pop
PUSH Push
Mnemonic Instruction
AND Logical AND
CPL Complement Accumulator
OR Logical OR
TST Test Accumulator
XOR Logical Exclusive OR
Mnemonic Instruction
CCF Complement Carry Flag
DI Disable Interrupts
EI Enable Interrupts
HALT Halt
IM Interrupt Mode
NOP No Operation
PS019217-1222
eZ80F91 MCU
Product Specification
278
Mnemonic Instruction
RSMIX Reset Mixed-Memory Mode Flag
SCF Set Carry Flag
SLP Sleep
STMIX Set Mixed-Memory Mode Flag
Mnemonic Instruction
CALL Call Subroutine
CALL cc Conditional Call Subroutine
DJNZ Decrement and Jump if Nonzero
JP Jump
JP cc Conditional Jump
JR Jump Relative
JR cc Conditional Jump Relative
RET Return
RET cc Conditional Return
RETI Return from Interrupt
RETN Return from Nonmaskable interrupt
RST Restart
Mnemonic Instruction
RL Rotate Left
RLA Rotate Left–Accumulator
RLC Rotate Left Circular
RLCA Rotate Left Circular–Accumulator
RLD Rotate Left Decimal
RR Rotate Right
PS019217-1222
eZ80F91 MCU
Product Specification
279
Mnemonic Instruction
RRA Rotate Right–Accumulator
RRC Rotate Right Circular
RRCA Rotate Right Circular–Accumulator
RRD Rotate Right Decimal
SLA Shift Left Arithmetic
SRA Shift Right Arithmetic
SRL Shift Right Logical
PS019217-1222
eZ80F91 MCU
Product Specification
280
Opcode Map
Table 167 through Table 173 on page 286 list the hex values for each of the eZ80® instruc-
tions.
Table 167. Opcode Map—First Opcode
Legend
Lower Opcode Nibble
Upper
Opcode 4
Nibble AND
A Mnemonic
A,H
First Operand Second Operand
Lower Nibble (Hex)
0 1 2 3 4 5 6 7 8 9 A B C D E F
0 NOP LD LD INC INC DEC LD RLCA EX ADD LD DEC INC DEC LD RRCA
BC, (BC),A BC B B B,n AF,AF’ HL,BC A,(BC) BC C C C,n
Mmn
1 DJNZ LD LD INC INC DEC LD RLA JR ADD LD DEC INC DEC LD RRA
d DE, (DE),A DE D D D,n d HL,DE A,(DE) DE E E E,n
Mmn
2 JR LD LD INC INC DEC LD DAA JR ADD LD DEC INC DEC LD CPL
NZ,d HL, (Mmn), HL H H H,n Z,d HL,HL HL, HL L L L,n
Mmn HL (Mmn)
3 JR LD LD INC INC DEC LD SCF JR ADD LD DEC INC DEC LD CCF
NC,d SP, (Mmn), SP (HL) (HL) (HL),n CF,d HL,SP A, SP A A A,n
Mmn A (Mmn)
4 .SIS LD LD LD LD LD LD LD LD .LIS LD LD LD LD LD LD
suffix B,C B,D B,E B,H B,L B,(HL) B,A C,B suffix C,D C,E C,H C,L C,(HL) C,A
5 LD LD .SIL LD LD LD LD LD LD LD LD .LIL LD LD LD LD
D,B D,C suffix D,E D,H D,L D,(HL) D,A E,B E,C E,D suffix E,H E,L E,(HL) E,A
6 LD LD LD LD LD LD LD LD LD LD LD LD LD LD LD LD
H,B H,C H,D H,E H,H H,L H,(HL) H,A L,B L,C L,D L,E L,H L,L L,(HL) L,A
Upper Nibble (Hex)
7 LD LD LD LD LD LD HALT LD LD LD LD LD LD LD LD LD
(HL),B (HL),C (HL),D (HL),E (HL),H (HL),L (HL),A A,B A,C A,D A,E A,H A,L A,(HL) A,A
8 ADD ADD ADD ADD ADD ADD ADD ADD ADC ADC ADC ADC ADC ADC ADC ADC
A,B A,C A,D A,E A,H A,L A,(HL) A,A A,B A,C A,D A,E A,H A,L A,(HL) A,A
9 SUB SUB SUB SUB SUB SUB SUB SUB SBC SBC SBC SBC SBC SBC SBC SBC
A,B A,C A,D A,E A,H A,L A,(HL) A,A A,B A,C A,D A,E A,H A,L A,(HL) A,A
A AND AND AND AND AND AND AND AND XOR XOR XOR XOR XOR XOR XOR XOR
A,B A,C A,D A,E A,H A,L A,(HL) A,A A,B A,C A,D A,E A,H A,L A,(HL) A,A
B OR OR OR OR OR OR OR OR CP CP CP CP CP CP CP CP
A,B A,C A,D A,E A,H A,L A,(HL) A,A A,B A,C A,D A,E A,H A,L A,(HL) A,A
C RET POP JP JP CALL PUSH ADD RST RET RET JP See CALL CALL ADC RST
NZ BC NZ, Mmn NZ, BC A,n 00h Z Z, Z, Mmn A,n 08h
Mmn Mmn Mmn
Table Mmn
168
D RET POP JP OUT CALL PUSH SUB RST RET EXX JP IN CALL See SBC RST
NC DE NC, (n),A NC, DE A,n 10h CF CF, A,(n) CF, A,n 18h
Mmn Mmn Mmn Mmn
Table
169
E RET POP JP EX CALL PUSH AND RST RET JP JP EX CALL See XOR RST
PO HL PO, (SP),HL PO, HL A,n 20h PE (HL) PE, DE,HL PE, Table A,n 28h
Mmn Mmn Mmn Mmn
170
F RET POP JP DI CALL PUSH OR RST RET LD JP EI CALL See CP RST
P AF P, P, AF A,n 30h M SP,HL M, M, Table A,n 38h
Mmn Mmn Mmn Mmn
171
PS019217-1222
eZ80F91 MCU
Product Specification
281
Legend
Lower Nibble of 2nd Opcode
Upper
Nibble 4
of Second
Opcode A RES Mnemonic
4,H
First Operand Second Operand
Lower Nibble (Hex)
0 1 2 3 4 5 6 7 8 9 A B C D E F
0 RLC RLC RLC RLC RLC RLC RLC RLC RRC RRC RRC RRC RRC RRC RRC RRC
B C D E H L (HL) A B C D E H L (HL) A
1 RL RL RL RL RL RL RL RL RR RR RR RR RR RR RR RR
B C D E H L (HL) A B C D E H L (HL) A
2 SLA SLA SLA SLA SLA SLA SLA SLA SRA SRA SRA SRA SRA SRA SRA SRA
B C D E H L (HL) A B C D E H L (HL) A
3 SRL SRL SRL SRL SRL SRL SRL SRL
B C D E H L (HL) A
4 BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT
0,B 0,C 0,D 0,E 0,H 0,L 0,(HL) 0,A 1,B 1,C 1,D 1,E 1,H 1,L 1,(HL) 1,A
5 BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT
2,B 2,C 2,D 2,E 2,H 2,L 2,(HL) 2,A 3,B 3,C 3,D 3,E 3,H 3,L 3,(HL) 3,A
6 BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT
4,B 4,C 4,D 4,E 4,H 4,L 4,(HL) 4,A 5,B 5,C 5,D 5,E 5,H 5,L 5,(HL) 5,A
Upper Nibble (Hex)
7 BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT
6,B 6,C 6,D 6,E 6,H 6,L 6,(HL) 6,A 7,B 7,C 7,D 7,E 7,H 7,L 7,(HL) 7,A
8 RES RES RES RES RES RES RES RES RES RES RES RES RES RES RES RES
0,B 0,C 0,D 0,E 0,H 0,L 0,(HL) 0,A 1,B 1,C 1,D 1,E 1,H 1,L 1,(HL) 1,A
9 RES RES RES RES RES RES RES RES RES RES RES RES RES RES RES RES
2,B 2,C 2,D 2,E 2,H 2,L 2,(HL) 2,A 3,B 3,C 3,D 3,E 3,H 3,L 3,(HL) 3,A
A RES RES RES RES RES RES RES RES RES RES RES RES RES RES RES RES
4,B 4,C 4,D 4,E 4,H 4,L 4,(HL) 4,A 5,B 5,C 5,D 5,E 5,H 5,L 5,(HL) 5,A
B RES RES RES RES RES RES RES RES RES RES RES RES RES RES RES RES
6,B 6,C 6,D 6,E 6,H 6,L 6,(HL) 6,A 7,B 7,C 7,D 7,E 7,H 7,L 7,(HL) 7,A
C SET SET SET SET SET SET SET SET SET SET SET SET SET SET SET SET
0,B 0,C 0,D 0,E 0,H 0,L 0,(HL) 0,A 1,B 1,C 1,D 1,E 1,H 1,L 1,(HL) 1,A
D SET SET SET SET SET SET SET SET SET SET SET SET SET SET SET SET
2,B 2,C 2,D 2,E 2,H 2,L 2,(HL) 2,A 3,B 3,C 3,D 3,E 3,H 3,L 3,(HL) 3,A
E SET SET SET SET SET SET SET SET SET SET SET SET SET SET SET SET
4,B 4,C 4,D 4,E 4,H 4,L 4,(HL) 4,A 5,B 5,C 5,D 5,E 5,H 5,L 5,(HL) 5,A
F SET SET SET SET SET SET SET SET SET SET SET SET SET SET SET SET
6,B 6,C 6,D 6,E 6,H 6,L 6,(HL) 6,A 7,B 7,C 7,D 7,E 7,H 7,L 7,(HL) 7,A
Note: n = 8-bit data; Mmn = 16- or 24-bit addr or data; d = 8-bit two’s-complement displacement.
PS019217-1222
eZ80F91 MCU
Product Specification
282
Legend
Lower Nibble of 2nd Opcode
Upper
Nibble 9
of Second
Opcode F LD Mnemonic
SP,IX
First Operand Second Operand
Lower Nibble (Hex)
0 1 2 3 4 5 6 7 8 9 A B C D E F
0 LD BC, ADD LD
(IX+d) IX,BC (IX+d),
BC
1 LD DE, ADD LD
(IX+d) IX,DE (IX+d),
DE
2 LD LD INC INC DEC LD LD HL, ADD LD DEC INC DEC LD LD
IX, (Mmn), IX IXH IXH IXH,n (IX+d) IX,IX IX, IX IXL IXL IXL,n (IX+d),
Mmn IX (Mmn) HL
3 LD IY, INC DEC LD (IX LD IX, ADD LD LD
(IX+d) (IX+d) (IX+d) +d),n (IX+d) IX,SP (IX+d), (IX+d),
IY IX
4 LD LD LD B, LD LD LD C,
B,IXH B,IXL (IX+d) C,IXH C,IXL (IX+d)
5 LD LD LD D, LD LD LD E,
D,IXH D,IXL (IX+d) E,IXH E,IXL (IX+d)
Upper Nibble (Hex)
6 LD LD LD LD LD LD LD H, LD LD LD LD LD LD LD LD L, LD
IXH,B IXH,C IXH,D IXH,E IXH,IXH IXH,IXL (IX+d) IXH,A IXL,B IXL,C IXL,D IXL,E IXL,IXH IXL,IXL (IX+d) IXL,A
7 LD LD LD LD LD LD LD LD LD LD A,
(IX+d),B (IX+d),C (IX+d),D (IX+d),E (IX+d),H (IX+d),L (IX+d),A A,IXH A,IXL (IX+d)
8 ADD ADD ADD A, ADC ADC ADC A,
A,IXH A,IXL (IX+d) A,IXH A,IXL (IX+d)
9 SUB SUB SUB A, SBC SBC SBC A,
A,IXH A,IXL (IX+d) A,IXH A,IXL (IX+d)
A AND AND AND A, XOR XOR XOR A,
A,IXH A,IXL (IX+d) A,IXH A,IXL (IX+d)
B OR OR OR A, CP CP CP A,
A,IXH A,IXL (IX+d) A,IXH A,IXL (IX+d)
C Table
172
D
E POP EX PUSH JP
IX (SP),IX IX (IX)
F LD
SP,IX
Note: n = 8-bit data; Mmn = 16- or 24-bit addr or data; d = 8-bit two’s-complement displacement.
PS019217-1222
eZ80F91 MCU
Product Specification
283
Legend
Lower Nibble of 2nd Opcode
Upper
Nibble 2
of Second
Opcode 4 SBC Mnemonic
HL,BC
First Operand Second Operand
Lower Nibble (Hex)
0 1 2 3 4 5 6 7 8 9 A B C D E F
0 IN0 OUT0 LEA LEA TST LD BC, IN0 OUT0 TST LD
B,(n) (n),B BC, BC, A,B (HL) C,(n) (n),C A,C (HL),
IX+d IY+d BC
1 IN0 OUT0 LEA LEA TST LD DE, IN0 OUT0 TST LD(HL),
D,(n) (n),D DE, DE, A,D (HL) E,(n) (n),E A,E DE
IX+d IY+d
2 IN0 OUT0 LEA HL LEA HL TST LD HL, IN0 OUT0 TST LD
H,(n) (n),H ,IX+d ,IY+d A,H (HL) L,(n) (n),L A,L (HL),
HL
3 LD IY, LEA IX LEA IY TST LD IX, IN0 OUT0 TST LD LD
(HL) ,IX+d ,IY+d A,(HL) (HL) A,(n) (n),A A,A (HL),IY (HL),
IX
4 IN OUT SBC LD NEG RETN IM 0 LD IN OUT ADC LD MLT RETI LD
B,(BC) (BC),B HL,BC (Mmn), I,A C,(C) (C),C HL,BC BC, BC R,A
BC (Mmn)
5 IN OUT SBC LD LEA IX, LEA IY, IM 1 LD IN OUT ADC LD MLT IM 2 LD
D,(BC) (BC),D HL,DE (Mmn), IY+d IX+d A,I E,(C) (C),E HL,DE DE, DE A,R
Upper Nibble (Hex)
DE (Mmn)
6 IBN OUT SBC LD TST PEA PEA RRD IN OUT ADC LD MLT LD LD RLD
H,(C) (BC),H HL,HL (Mmn), A,n IX+d IY+d L,(C) (C),L HL,HL HL, HL MB,A A,MB
HL (Mmn)
7 SBC LD TSTIO SLP IN OUT ADC LD MLT STMIX RSMIX
HL,SP (Mmn), n A,(C) (C),A HL,SP SP, SP
SP (Mmn)
8 INIM OTIM INI2 INDM OTDM IND2
A LDI CPI INI OUTI OUTI2 LDD CPD IND OUTD OUTD2
B LDIR CPIR INIR OTIR OTI2R LDDR CPDR INDR OTDR OTD2R
Note: n = 8-bit data; Mmn = 16- or 24-bit addr or data; d = 8-bit two’s-complement displacement.
PS019217-1222
eZ80F91 MCU
Product Specification
284
Upper
Nibble 9
of Second
Opcode F LD Mnemonic
SP,IY
First Operand Second Operand
Lower Nibble (Hex)
0 1 2 3 4 5 6 7 8 9 A B C D E F
0 LD BC, ADD LD (IY
(IY+d) IY,BC +d),BC
1 LD DE, ADD LD (IY
(IY+d) IY,DE +d),DE
2 LD LD INC INC DEC LD LD HL, ADD LD DEC INC DEC LD LD (IY
IY,Mmn (Mmn),I IY IYH IYH IYH,n (IY+d) IY,IY IY, IY IYL IYL IYL,n +d),HL
Y (Mmn)
3 LD IX, INC DEC LD (IY LD IY, ADD LD (IY LD (IY
(IY+d) (IY+d) (IY+d) +d),n (IY+d) IY,SP +d),IX +d),IY
4 LD LD LD B, LD LD LD C,
B,IYH B,IYL (IY+d) C,IYH C,IYL (IY+d)
5 LD LD LD D, LD LD LD E,
D,IYH D,IYL (IY+d) E,IYH E,IYL (IY+d)
6 LD LD LD LD LD LD LD H, LD LD LD LD LD LD LD LD L, LD
Upper Nibble (Hex)
IYH,B IYH,C IYH,D IYH,E IYH,IYH IYH,IYL (IY+d) IYH,A IYL,B IYL,C IYL,D IYL,E IYL,IYH IYL,IYL (IY+d) IYL,A
7 LD (IY LD (IY LD (IY LD (IY LD (IY LD (IY LD (IY LD LD LD A,
+d),B +d),C +d),D +d),E +d),H +d),L +d),A A,IYH A,IYL (IY+d)
8 ADD ADD ADD A, ADC ADC ADC A,
A,IYH A,IYL (IY+d) A,IYH A,IYL (IY+d)
9 SUB SUB SUB A, SBC SBC SBC A,
A,IYH A,IYL (IY+d) A,IYH A,IYL (IY+d)
A AND AND AND A, XOR XOR XOR A,
A,IYH A,IYL (IY+d) A,IYH A,IYL (IY+d)
B OR OR OR A, CP CP CP A,
A,IYH A,IYL (IY+d) A,IYH A,IYL (IY+d)
C Table
173
D
E POP EX PUSH JP
IY (SP),IY IY (IY)
F LD
SP,IY
Note: n = 8-bit data; Mmn = 16- or 24-bit addr or data; d = 8-bit two’s-complement displacement.
PS019217-1222
eZ80F91 MCU
Product Specification
285
Legend
Lower Nibble of 4th Byte
Upper
Nibble 6
of Fourth BIT
Byte 4 0,(IX+d) Mnemonic
(IX+d) (IX+d)
7 BIT 6, BIT 7,
(IX+d) (IX+d)
8 RES 0, RES 1,
(IX+d) (IX+d)
9 RES 2, RES 3,
(IX+d) (IX+d)
A RES 4, RES 5,
(IX+d) (IX+d)
B RES 6, RES 7,
(IX+d) (IX+d)
C SET 0, SET 1,
(IX+d) (IX+d)
D SET 2, SET 3,
(IX+d) (IX+d)
E SET 4, SET 5,
(IX+d) (IX+d)
F SET 6, SET 7,
(IX+d) (IX+d)
Note: d = 8-bit two’s-complement displacement
PS019217-1222
eZ80F91 MCU
Product Specification
286
(IY+d) (IY+d)
7 BIT 6, BIT 7,
(IY+d) (IY+d)
8 RES 0, RES 1,
(IY+d) (IY+d)
9 RES 2, RES 3,
(IY+d) (IY+d)
A RES 4, RES 5,
(IY+d) (IY+d)
B RES 6, RES 7,
(IY+d) (IY+d)
C SET 0, SET 1,
(IY+d) (IY+d)
D SET 2, SET 3,
(IY+d) (IY+d)
E SET 4, SET 5,
(IY+d) (IY+d)
F SET 6, SET 7,
(IY+d) (IY+d)
Note: d = 8-bit two’s-complement displacement
PS019217-1222
eZ80F91 MCU
Product Specification
287
MDIO
MDC TxDMA
TxD
TxCLK
TxFIFO
TxER
Media Access Controller
TxEN
Memory
COL
Arbiter
CRS
MII Interface
RxD
RxCLK RxD
RxDV RxD/CTRL
RxER
RxFIFO
Accept
CTRL RxDMA
Reject
Note: For additional information about the Ethernet protocol and using it with the eZ80F91
MCU, refer to the IEEE 802.3 specification, 1998 edition, Section 22. The eZ80F91 MCU
supports the IEEE 802.3 protocol with the following exception:
The eZ80F91 MCU does not support the Giga Media Independent Interface (GMII)
referred to in the following sections of the IEEE 802.3 1998 version: section 22.1.5, sec-
tion 22.2.4, section 22.2.4.1.2, section 22.2.4.1.5, and section 22.2.4.1.6.
The EMAC is used for many different applications, including network interface, ethernet
switching, and test equipment designs. The EMAC includes the following blocks:
• Central clock and reset module (not shown in the block diagram).
• Host memory interface and transmit/receiver arbiter.
PS019217-1222
eZ80F91 MCU
Product Specification
288
• FIFO buffer and DMA control blocks for transmit and receive.
• 802.3x media access control block.
• MII interface management.
The media access control block implements 802.3x flow control functions for both trans-
mit and receive.
The MII management module provides a two-wire control/status path to the MII PHY.
Read and Write communication to and from registers within the PHY is accomplished via
the host interface.
Note: MII PHY is a Physical Layer transceiver device; PHY does not refer to the eZ80F91 sys-
tem clock output pin, PHI.
The MII management module provides a two-wire control/status path to the MII. Read
and Write communication to and from registers within the PHY is accomplished via the
host interface.
Memory
EMAC memory is the shared Ethernet memory location of the Transmit and Receive buf-
fers. This memory is broken into two parts: the Tx buffer and the Rx buffer. The Transmit
Lower Boundary Pointer Register, EmacTLBP, is the register that holds the starting
address of the Tx buffer. The Boundary Pointer Register, EmacBP, points to the start of the
Rx buffer (end of Tx buffer + 1). The Receive High Boundary Pointer Register, Emac-
PS019217-1222
eZ80F91 MCU
Product Specification
289
RHBP, points to the end of the Rx buffer + 1. The Tx and Receive buffers are divided into
packet buffers of either 256, 128, 64, or 32 bytes. These buffer sizes are selected by
EmacBufSize register bits 7 and 6.
The EmacBlksLeft register contains the number of Receive packet buffers remaining in
the Rx buffer. This buffer is used for software flow control. If the Block_Level is nonzero
(bits 5:0 of the EmacBufSize register), hardware flow control is enabled. If in FULL-
DUPLEX mode, the EMAC transmits a pause control frame when the EmacBlksLeft reg-
ister is less than the Block_Level. In HALF-DUPLEX mode, the EMAC continually trans-
mits a nibble pattern of hexadecimal 5’s to jam the channel.
Four pointers are defined for reading and writing the Tx and Rx buffers. The Transmit
Write Pointer, TWP, is a software pointer that points to the next available packet buffer.
The TWP is reset to the value stored in EmacTLBP. The Transmit Read Pointer, TRP, is a
hardware pointer in the Transmit Direct Memory Access Register, TxDMA, that contains
the address of the next packet to be transmitted. It is automatically reset to the EmacTLBP.
The Receive Write Pointer, RWP, is a hardware pointer in the Receive Direct Memory
Access Register, RxDMA, which contains the storage address of the incoming packet. The
RWP pointer is automatically initialized to the Boundary Pointer registers. The Receive
Read Pointer, RRP, is a software pointer to where the next packet must be read from. The
RRP pointer must be initialized to the Boundary Pointer registers. For the hardware flow
control to function properly, the software must update the hardware RRP (EmacRrp)
pointer whenever the software version is updated. The RxDMA uses RWP and the RRP to
determine how many packet buffers remain in the Rx buffer.
Arbiter
The arbiter controls access to EMAC memory. It prioritizes the requests for memory
access between the CPU, the TxDMA, and the RxDMA. The TxDMA offers two levels of
priority: a high priority when the TxFIFO is less than half full and a Low priority when the
TxFIFO is more than half full. Similarly, the RxDMA offers two levels of priority: a high
priority when the RxFIFO is more than half full and a Low priority when the RxFIFO is
less than half full.
The arbiter determines resolution between the CPU, the RxDMA, and the TxDMA
requests to access EMAC memory. Post writing for CPU Writes results in Zero-Wait-state
write access timing when the CPU assumes the highest priority. CPU Reads require a min-
imum of 1 Wait state and takes more when the CPU does not hold the highest priority. The
CPU Read Wait state is not a user-controllable operation, because it is controlled by the
arbiter. The RxDMA and TxDMA requests are not allowed to occur back-to-back. There-
fore, the maximum throughput rate for the two Direct Memory Access (DMA) ports is 25
Mbps each (one byte every 2 clocks) when the system clock is running at 50 MHz. The
rate is reduced to 20 MBps for a 40 MHz system clock. The arbiter uses the internal WAIT
signal to add Wait states to CPU access when required. See Table 174 on page 290.
PS019217-1222
eZ80F91 MCU
Product Specification
290
Priority Device
Level Serviced Flags
0 RxDMA High RxFIFO > half full (FAF)
1 TxDMA High TxFIFO < half full (FAE)
2 eZ80® CPU
3 RxDMA Low RxFIFO < half full (FAE)
4 TxDMA Low TxFIFO > half full (FAF)
TxDMA
The TxDMA module moves the next packet to be transmitted from EMAC memory into
the TxFIFO. Whenever the polling timer expires, the TxDMA reads the High status byte
from the Tx descriptor table pointed to by the Transmit Read Pointer, TRP. Polling contin-
ues until the High status Read reaches bit 7, when the Emac_Owns ownership semaphore,
bit 15 of the descriptor table (see Table 178 on page 295) is set to 1. The TxDMA then ini-
tializes the packet length counter with the size of the packet from descriptor table bytes 3
and 4. The TxDMA moves the data into the TxFIFO until the packet length counter down-
counts to zero. The TxDMA then waits for Transmission Complete signal to be asserted to
indicate that the packet is sent and that the Transmit status from the EMAC is valid. The
TxDMA updates the descriptor table status and resets the ownership semaphore, bit 15.
Finally, the Tx_DONE_STAT bit of the EMAC Interrupt Status Register is set to 1, the
address field, DMA_Address, is updated from the descriptor table next pointer, NP (see
Figure 62 on page 294). The High byte of the status is read to determine if the next packet
is ready to be transmitted.
While the TxDMA is filling the TxFIFO, it monitors two signals from the Transmit FIFO
State Machine (TxFifoSM) to detect error conditions and to determine if the packet is to
be retransmitted (TxDMA_Retry asserted) or the packet is aborted (TxDMA_Abort
asserted). If the packet is aborted, the TxDMA updates the descriptor status and moves to
the next packet. If the packet is to be retried, the DMA_Address is reset to the start of the
packet, the packet length counter is reloaded from the descriptor table, bytes 3 and 4, and
the packet is moved into the TxFIFO again. When an abort or retry event occurs, the
TxDMA asserts the appropriate signal to reset the TxFIFO Read and Write pointers which
clears out any data that is in the FIFO. The TxFifoSM negates the TxDMA_Abort or
TxDMA_Retry signal(s) or both when the TxFCWP signal is High. This handshaking
maintains synchronization between the TxDMA and the TxFifoSM.
RxDMA
The RxDMA reads the data from the RxFIFO and stores it in the EMAC memory Receive
buffer. When the end of the packet is detected, the RxDMA reads the next two bytes from
PS019217-1222
eZ80F91 MCU
Product Specification
291
the RxFIFO and writes them into the Rx descriptor status LSB and MSB. The packet-
length counter is stored into the descriptor table’s Packet Length field, and the descriptor
table’s next pointer is written into the Rx descriptor table. Additionally, the
Rx_DONE_STAT bit in the EMAC Interrupt Status Register is set to 1.
Signal Termination
When the EMAC interface is not used, the MII signals must be terminated as listed in
Table 175. Terminated pins are either left unconnected (float) or tied to ground.
MDIO is controlled by the MDC output signal. When the EMAC is not being used, these
two pins are not driven. The RX_DV, RX_ER, and RXD[3:0] inputs are controlled by the
rising edge of the RX_CLK input signal. When RX_CLK is tied to Ground, these pins do
not affect the EMAC. The TX_EN, TX_ER, and TXD[3:0] outputs are controlled by the
rising edge of the TX_CLK input signal. When TX_CLK is tied to Ground, these pins do
not affect the EMAC. The CRS and COL input pins have no relationship to the clock, and
therefore must be placed into nonactive states and tied to Ground.
Termination
Signal Pin Type Direction
MDIO Bidirectional Float
MDC Output pin Float
RX_DV Input pin Float
CRS Input pin Ground
RX_CLK Input pin Ground
RX_ER Input pin Float
RXD[3:0] Input pins Float
COL Input pin Ground
TX_CLK Input pin Ground
TX_EN Output pin Float
TXD[3:0] Output pins Float
TX_ER Output pin Float
PS019217-1222
eZ80F91 MCU
Product Specification
292
EMAC Interrupts
Eight different sources of interrupts from the EMAC are listed in Table 176.
Interrupt Description
EMAC System Interrupts
Transmit State Machine Error Bit 7 (TxFSMERR_STAT) of the EMAC Interrupt Status Register
(EMAC_ISTAT). A Transmit State Machine Error must not occur.
However, if this bit is set, the entire transmitter module must be
reset.
MIIMGT Done Bit 6 (MGTDONE_STAT) of the Interrupt Status Register
(EMAC_ISTAT). This bit is set when communicating to the PHY
over the MII during a Read or Write operation.
Receive Overrun Bit 2 (Rx_OVR_STAT) of the Interrupt Status Register
(EMAC_ISTAT). If this bit is set, all incoming packets are ignored
until this bit is cleared by software.
EMAC Transmitter Interrupts
Transmit Control Frame Transmit Control Frame = Bit 1 (Tx_CF_STAT) of the Interrupt
Status Register (EMAC_ISTAT). Denotes when control frame
transmission is complete.
Transmit Done Bit 0 (Tx_DONE_STAT) of the Interrupt Status Register
(EMAC_ISTAT). Denotes when packet transmission is complete.
EMAC Receiver Interrupts
Receive Packet Bit 5 (Rx_CF_STAT) of the Interrupt Status Register
(EMAC_ISTAT). Denotes when packet reception is complete.
Receive Pause Packet Bit 4 (Rx_PCF_STAT) of the Interrupt Status Register
(EMAC_ISTAT). Denotes when pause packet reception is
complete.
Receive Done Bit 3 (Rx_DONE_STAT) of the Interrupt Status Register
(EMAC_ISTAT). Denotes when packet reception is complete.
PS019217-1222
eZ80F91 MCU
Product Specification
293
• Receive High Boundary Pointer (RHBP)—this register points to the end of the Receive
buffer + 1.
The Transmit and Receive buffers are subdivided into packet buffers of 32, 64, 128, or 256
bytes in size. The packet buffer size is set in bits 7 and 6 of the EmacBufSize register. An
Ethernet packet accommodate multiple packet buffers. First, however, a brief listing of the
contents of a typical Ethernet packet is in order. See Table 177.
At the start of each packet is a descriptor table that describes the packet. Each actual
Ethernet packet follows the descriptor table as displayed in Figure 61 on page 294.
PS019217-1222
eZ80F91 MCU
Product Specification
294
Offset
Ethernet
Packet
0007h
Descriptor
Table
TWP 0000h
Note: For an official description of an Ethernet packet, refer to IEEE 802.3 specification, Figure
3-1.
The descriptor table contains three entries: the next pointer (NP), the packet size
(Pkt_Size), and the packet status (Stat), as displayed in Figure 62.
Offset
Stat
0005h
Pkt_Size
0003h
NP
TWP 0000h
NP is a 24-bit pointer to the start of the next packet. Pkt_Size contains the number of bytes
of data in the Ethernet packet, including the four CRC bytes, but does not contain the
seven descriptor table bytes. Stat contains the status of the packet. Stat differs for Transmit
and Receive packets. See Table 178 on page 295 and Table 179 on page 295.
PS019217-1222
eZ80F91 MCU
Product Specification
295
PS019217-1222
eZ80F91 MCU
Product Specification
296
PS019217-1222
eZ80F91 MCU
Product Specification
297
transfer capabilities at certain system operating frequencies, you must first understand the
internal data bus bandwidth that is required under ideal conditions.
For 10 BaseT Ethernet connectivity, the data rate is 10 Mbps, which equates to 1.25 Mbps.
If the eZ80F91 MCU is operating in FULL-DUPLEX mode over 10BaseT, the data rate for
RX data and TX data is 1.25 Mbps. Because raw data transfers at this rate consume a cer-
tain amount of CPU bandwidth, the CPU must support traffic from both directions as well
as operate at a minimum clock frequency of (1.25 + 1.25) * 2 = 5 MHz while transferring
Ethernet packets to and from the physical layer.
Similarly, for 100 BaseT Ethernet, the data rate is 100 Mbps, which equates to 12.5 Mbps.
If the eZ80F91 MCU is operating in FULL-DUPLEX mode over 100 BaseT, the data rate
for RX data and TX data is 12.5 Mbps. Because raw data transfers at this rate consume a
certain amount of CPU bandwidth, the CPU must support traffic from both directions as
well as operate at a minimum clock frequency of (12.5 + 12.5) x 2 = 50 MHz while trans-
ferring Ethernet packets to and from the physical layer. Consequently, 50 MHz is the min-
imum system clock speed that the eZ80® CPU requires to sustain EMAC data transfers
while not including any software overhead or additional eZ80 tasks.
The FIFO functionality of the EMAC operates at any frequency as long as the user appli-
cation avoids overrun and underrun errors via higher-level flow control. Actual applica-
tion requirements will dictate Ethernet modes of operation (FULL-DUPLEX, HALF-
DUPLEX, etc.). Because each user and application is different, it becomes your responsi-
bility to control the data flow with these parameters. Under ideal conditions, the system
clock will operate somewhere between 5 MHz and 50 MHz to handle the EMAC data
rates.
EMAC Registers
After a system reset, all EMAC registers are set to their default values. Any Writes to
unused registers or register bits are ignored and reads return a value of 0. For compatibil-
ity with future revisions, unused bits within a register must always be written with a value
of 0. Read/Write attributes, reset conditions, and bit descriptions of all of the EMAC reg-
isters are provided in this section.
PS019217-1222
eZ80F91 MCU
Product Specification
298
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
CPU Access R R/W R/W R/W R/W R/W R/W R/W
Note: R/W = Read/Write, R = Read Only.
Bit
Position Value Description
7 0 Reserved.
6 0 FIFO test mode disabled—Normal operation.
TEST_FIFO
1 FIFO test mode enabled.
5 0 Select the Receive FIFO when FIFO test mode is enabled.
TxRx_SEL
1 Select the Transmit FIFO when FIFO test mode is enabled.
4 0 Normal operation.
SSTC
1 Short Cut Slot Timer Counter. Slot time is shortened to
speed up simulation.
3 0 Normal operation.
SIMR
1 Simulation Reset.
2 0 Normal operation.
FRC_OVR_ERR
1 Force Overrun error in Receive FIFO.
1 0 Normal operation.
FRC_UND_ERR
1 Force Underrun error in Transmit FIFO.
0 0 Normal operation.
LPBK
1 EMAC Transmit interface is looped back into EMAC Receive
interface.
PS019217-1222
eZ80F91 MCU
Product Specification
299
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
CPU Access R/W R/W R/W R/W R/W R/W R/W R/W
Note: R/W = Read/Write.
Bit
Position Value Description
7 0 No padding. Assume all frames presented to EMAC have
PADEN proper length.
1 EMAC pads all short frames by adding zeroes to the end of the
data field. This bit is used in conjunction with ADPADN and
VLPAD.
6 0 Disable autodetection.
ADPADN
1 Enable frame detection by comparing the two bytes following
the source address with 0x8100 (VLAN Protocol ID) and pad
accordingly. This bit is ignored if PADEN is cleared to 0.
5 0 Do not pad all short frames.
VLPAD
1 EMAC pads all short frames to 64 bytes and append a valid
CRC. This bit is ignored if PADEN is cleared to 0.
4 0 Do not append CRC.
CRCEN
1 Append CRC to every frame regardless of padding options.
3 0 HALF-DUPLEX mode. CSMA/CD is enabled.
FULLD
1 Enable FULL-DUPLEX mode. CSMA/CD is disabled.
2 0 Ignore the length field within Transmit/Receive frames.
FLCHK
1 Both Transmit and Receive frame lengths are compared to the
length/type field. If the length/type field represents a length
then the frame length check is performed.
1 0 Limit the Receive frame-size to the number of bytes specified
HUGEN in the MAXF[15:0] field.
1 Allow unlimited sized frames to be received. Ignore the
MAXF[15:0] field.
PS019217-1222
eZ80F91 MCU
Product Specification
300
Bit
Position Value Description
0 0 No proprietary header. Normal operation.
DCRCC
1 Four bytes of proprietary header, ignored by CRC, exists on
the front of IEEE 802.3 frames.
Table 182 lists the results of different settings for bits [7:4] of EMAC Configuration Reg-
ister 1.
PS019217-1222
eZ80F91 MCU
Product Specification
301
Bit 7 6 5 4 3 2 1 0
Reset 0 0 1 1 0 1 1 1
CPU Access R/W R/W R/W R/W R/W R/W R/W R/W
Note: R/W = Read/Write.
Bit
Position Value Description
7 0 Use normal back-off algorithm prior to transmitting packet. No
BPNB back pressure applied.
1 After incidentally causing a collision during back pressure, the
EMAC immediately (that is, no back-off) retransmits the packet
without back-off, which reduces the chance of further collisions
and ensures that the Transmit packets are sent.
6 0 Enable exponential back-off.
NOBO
1 The EMAC immediately retransmits following a collision rather
than use the binary exponential backfill algorithm, as specified
in the IEEE 802.3 specification.
[5:0] 00h–3Fh Sets the number of bytes after Start Frame Delimiter (SFD) for
LCOL which a late collision occurs. By default, all late collisions are
aborted.
PS019217-1222
eZ80F91 MCU
Product Specification
302
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 1 1 1 1
CPU Access R/W R/W R/W R/W R/W R/W R/W R/W
Note: R/W = Read/Write.
Bit
Position Value Description
7 0 The EMAC allows any preamble length as per the IEEE 802.3
LONGP specification.*
1 The EMAC only allows Receive packets that contain preamble
fields less than 12 bytes in length.*
6 0 No preamble error checking is performed.
PUREP
1 The EMAC verifies the content of the preamble to ensure that it
contains a value of 55h and that it is error-free. Packets
containing an errored preamble are discarded.
5 0 The EMAC aborts when the excessive deferral limit is reached.
XSDFR
1 The EMAC defers to the carrier indefinitely as per the IEEE
802.3 specification.
4 0 Disable 10 Mbps ENDEC mode.
BITMD
1 Enable 10 Mbps ENDEC mode.
[3:0] 0h–Fh A programmable field specifying the number of retransmission
RETRY attempts following a collision before aborting the packet due to
excessive collisions.
Note: IEEE 802.3 specifies a minimum of 56 bits of preamble. A maximum number of bits is not de-
fined. For details, see the IEEE 802.3 Specification, Section 7.2.3.2.
PS019217-1222
eZ80F91 MCU
Product Specification
303
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
Bit
Position Value Description
7 0 Reserved.
6 0 Do not transmit a pause control frame.
TPCF
1 Transmit pause control frame (FULL-DUPLEX mode). TPCF
continually sends pause control frames until negated.
5 0 Disable back pressure.
THDF
1 EMAC asserts back pressure on the link. Back pressure
causes preamble to be transmitted, raising carrier sense
(HALF-DUPLEX mode).
4 0 Only accept frames that meet preset criteria (that is, address,
PARF CRC, length, etc.).
1 All frames are received regardless of address, CRC, length,
etc.
3 0 EMAC ignores received pause control frames.
RxFC
1 EMAC acts upon pause control frames received.
2 0 PAUSE control frames are not allowed to be transmitted.
TxFC
1 PAUSE control frames are allowed to be transmitted.
1 0 Do not force a pause condition.
TPAUSE
1 Force a pause condition while this bit is asserted.
0 0 EMAC receiver disabled.
RxEN
1 EMAC receiver enabled.
PS019217-1222
eZ80F91 MCU
Product Specification
304
The second function of the EMAC Station Address registers is to provide the Source
Address (SA) field of Transmit Pause frames when these frames are transmitted by the
EMAC. EMAC_STAD_0 provides the first byte of the 6 byte SA field and
EMAC_STAD_5 provides the final byte of the SA field in order of transmission. The LSB
is the first byte sent out. The EMAC Station Address register is listed in Table 186.
Bit 7 6 5 4 3 2 1 0
EMAC_STAD_0 Reset 0 0 0 0 0 0 0 0
EMAC_STAD_1 Reset 0 0 0 0 0 0 0 0
EMAC_STAD_2 Reset 0 0 0 0 0 0 0 0
EMAC_STAD_3 Reset 0 0 0 0 0 0 0 0
EMAC_STAD_4 Reset 0 0 0 0 0 0 0 0
EMAC_STAD_5 Reset 0 0 0 0 0 0 0 0
CPU Access R/W R/W R/W R/W R/W R/W R/W R/W
Note: R/W = Read/Write.
PS019217-1222
eZ80F91 MCU
Product Specification
305
Bit
Position Value Description
[7:0] 00h–FFh This 48-bit station address comprises {EMAC_STAD_5,
EMAC_STAD_x EMAC_STAD_4, EMAC_STAD_3, EMAC_STAD_2,
EMAC_STAD_1, EMAC_STAD_0}.
Table 187. EMAC Transmit Pause Timer Value Register—Low Byte (EMAC_TPTV_L = 002Bh)
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
CPU Access R/W R/W R/W R/W R/W R/W R/W R/W
Note: R/W = Read/Write.
Bit
Position Value Description
[7:0] 00h–FFh The 16-bit value, {EMAC_TPTV_H, EMAC_TPTV_L}, is
EMAC_TPTV_L inserted into outgoing pause control frames as the pause
timer value upon asserting TPCF.
Table 188. EMAC Transmit Pause Timer Value Register—High Byte (EMAC_TPTV_H = 002Ch)
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
CPU Access R/W R/W R/W R/W R/W R/W R/W R/W
Note: R/W = Read/Write.
Bit
Position Value Description
[7:0] 00h–FFh The 16-bit value, {EMAC_TPTV_H, EMAC_TPTV_L}, is
EMAC_TPTV_H inserted into outgoing pause control frames as the pause
timer value upon asserting TPCF.
PS019217-1222
eZ80F91 MCU
Product Specification
306
Table 189. EMAC_IPGT Back-to-Back Settings for Full- and Half-Duplex Modes
The equations for back-to-back Transmit IPG are determined by the following:
Table 190 on page 307 lists the IPGR2 settings for the non-back-to-back packets.
PS019217-1222
eZ80F91 MCU
Product Specification
307
The difference in values between Table 189 on page 306 and Table 190 is due to the
asynchronous nature of the Carrier Sense (CRS). The CRS must undergo a 2-clock
synchronization before the internal Tx state machine detects it. This synchronization
equates to a 6-clock intrinsic delay between packets instead of the 3-clock intrinsic delay
in the back-to-back packet mode. More information covering this topic is found in the
IEEE 802.3/4.2.3.2.1 Carrier Deference section.
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 1 0 1 0 1
PS019217-1222
eZ80F91 MCU
Product Specification
308
Bit
Position Value Description
7 0 Reserved.
[6:0] 00h–7Fh The number of bytes of IPG.
IPGT
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 1 1 0 0
CPU Access R/W R/W R/W R/W R/W R/W R/W R/W
Note: R/W = Read/Write
Bit
Position Value Description
7 0 Reserved.
[6:0] 00h–7F This is a programmable field representing the optional carrier
IPGR 1 h sense window referenced in IEEE 802.3/4.2.3.2.1 Carrier
Deference.
PS019217-1222
eZ80F91 MCU
Product Specification
309
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 1 0 0 1 0
Bit
Position Value Description
7 0 Reserved.
[6:0] 00h–7Fh This bit range is a programmable field representing the non-
IPGR2 back-to-back interpacket gap.
VLAN frames have a proprietary header prepended to the Ethernet packet. Setting the
DCRCC bit in EMAC_CFG1 will exclude the first 4 bytes—the proprietary header—from
the CRC calculation. For VLAN packets, the maximum frame length is 1522, 4 more than
for normal Ethernet packets due to the 4 byte prepended header. Normal packets feature a
12 byte header before the MAC client data. For more information about this topic, refer to
Figure 3-1 of the IEEE 802.3 specification.
If a proprietary header is allowed, this field must be adjusted accordingly. For example, if
12 byte headers are prepended to frames, MAXF must be set to 1524 bytes to allow the
maximum VLAN tagged frame plus the 12 byte header. The default value of 1536 is large
enough to cover the largest Ethernet packet: 14 bytes of Ethernet header, 1500 bytes of
MAC client data, plus 4 bytes of CRC for a total of 1518 bytes maximum. It is also large
enough to cover VLAN packets with prepended headers up to 18 bytes. The following for-
mulas illustrate:
Ethernet Packet— Maximum frame size = normal Ethernet packet – 14 (Ethernet header)
+ 1500 (MAC client data) + 4 (CRC) = 1518 bytes
PS019217-1222
eZ80F91 MCU
Product Specification
310
VLAN Packet— Maximum frame size = VLAN with 4 byte header – 4 (VLAN header) +
14 (Ethernet header) + 1500 MAC client data) + 4 (CRC) = 1522 bytes.
Table 194. EMAC Maximum Frame Length Register—Low Byte (EMAC_MAXF_L = 0030h
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
CPU Access R/W R/W R/W R/W R/W R/W R/W R/W
Note: R/W = Read/Write.
Bit
Position Value Description
[7:0] 00h–FFh These bits represent the Low byte of the 2 byte MAXF
EMAC_MAXF_L value, {EMAC_MAXF_H, EMAC_MAXF_L}. Bit 7 is bit 7 of
the 16-bit value. Bit 0 is bit 0 (lsb) of the 16-bit value.
Table 195. EMAC Maximum Frame Length Register—High Byte (EMAC_MAXF_H = 0031h)
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 1 1 0
CPU Access R/W R/W R/W R/W R/W R/W R/W R/W
Note: R/W = Read/Write.
Bit
Position Value Description
[7:0] 00h–FF These bits represent the High byte of the 2 byte MAXF
EMAC_MAXF_H h value, {EMAC_MAXF_H, EMAC_MAXF_L}. Bit 7 is bit 15
(msb) of the 16-bit value. Bit 0 is bit 8 of the 16-bit value.
PS019217-1222
eZ80F91 MCU
Product Specification
311
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
Bit
Position Value Description
[7:4] 0h Reserved.
3 1 Enable Promiscuous Mode. Receive all incoming packets
PROM regardless of station address. Disables station address
filtering.
0 Disable Promiscuous Mode.
2 1 Accept any multicast message. A multicast packet is
MC determined by the first bit in the destination address. If the first
LSB is a 1, it is a group address and is globally or locally
administered depending on the 2nd bit. For more information,
see IEEE 802.3/3.2.3.
0 Do not accept multicast messages of any type.
1 1 Accept only qualified multicast (QMC) messages as
QMC determined by the hash table.
0 Do not accept QMC messages.
0 1 Accept broadcast messages. Broadcast messages have the
BC destination address set to FFFFFFFFFFFFh.
0 Do not accept broadcast messages.
PS019217-1222
eZ80F91 MCU
Product Specification
312
Table 197. EMAC Hash Table Register (EMAC_HTBL_0 = 0033h, EMAC_HTBL_1 = 0034h,
EMAC_HTBL_2 = 0035h, EMAC_HTBL_3 = 0036h, EMAC_HTBL_4 = 0037h, EMAC_HTBL_5
= 0038h, EMAC_HTBL_6 = 0039h, EMAC_HTBL_7 = 003Ah)
Bit 7 6 5 4 3 2 1 0
EMAC_HTBL_0 Reset 0 0 0 0 0 0 0 0
EMAC_HTBL_1 Reset 0 0 0 0 0 0 0 0
EMAC_HTBL_2 Reset 0 0 0 0 0 0 0 0
EMAC_HTBL_3 Reset 0 0 0 0 0 0 0 0
EMAC_HTBL_4 Reset 0 0 0 0 0 0 0 0
EMAC_HTBL_5 Reset 0 0 0 0 0 0 0 0
EMAC_HTBL_6 Reset 0 0 0 0 0 0 0 0
EMAC_HTBL_7 Reset 0 0 0 0 0 0 0 0
CPU Access R/W R/W R/W R/W R/W R/W R/W R/W
Note: R/W = Read/Write
Bit
Position Value Description
[7:0] 00h–FF This field is the hash table. The 64 bit hash table is
EMAC_HTBL_x h {EMAC_HTBL_7, EMAC_HTBL_6, EMAC_HTBL_5,
EMAC_HTBL_4, EMAC_HTBL_3, EMAC_HTBL_2,
EMAC_HTBL_1, EMAC_HTBL_0}.
PS019217-1222
eZ80F91 MCU
Product Specification
313
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
CPU Access R/W R/W R/W R/W R/W R/W R/W R/W
Note: R/W = Read/Write.
Bit
Position Value Description
7 1 Rising edge causes the CTLD control data to be transmitted to
LCTLD external PHY if MII is not busy. This bit is self clearing.
0 No operation.
6 1 Rising edge causes status to be read from external PHY via
RSTAT PRSD[15:0] bus if MII is not busy. This bit is self clearing.
0 No operation.
5 1 Scan PHY address increments upon SCAN cycle. The SCAN
SCINC bit must also be set for the PHY address to increment after
each scan. The scanning starts at the EMAC_FIAD and
increments up to 1Fh. It then returns to the EMAC_FIAD
address.
0 Normal operation.
4 1 Perform continuous Read cycles via MII management. While in
SCAN SCAN mode, the EMAC_ISTAT[MGTDONE] bit is set when the
current PHY Read has completed. At this time, the
EMAC_PRSD register holds the Read data and the
EMAC_MIISTAT[4:0] holds the address of the PHY for which
the EMAC_PRSD data pertains.
0 Normal operation.
3 1 Suppress the MDO preamble. MDO is management data
SPRE output, an internal signal driven from the MDIO pin.
0 Normal preamble.
PS019217-1222
eZ80F91 MCU
Product Specification
314
Bit
Position Value Description
[2:0] Programmable divisor that produces MDC from SCLK. MDC is the
CLKS management data clock pin, which clocks MDIO data to and from the
PHY. Its frequency is SCLK divided by the MDC clock divider.
000 MDC = SCLK ÷ 4.
001 MDC = SCLK ÷ 4.
010 MDC = SCLK ÷ 6.
011 MDC = SCLK ÷ 8.
100 MDC = SCLK ÷ 10.
101 MDC = SCLK ÷ 14.
110 MDC = SCLK ÷ 20.
111 MDC = SCLK ÷ 28.
Table 199. EMAC PHY Configuration Data Register—Low Byte (EMAC_CTLD_L = 003Ch)
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
CPU Access R/W R/W R/W R/W R/W R/W R/W R/W
Note: R/W = Read/Write.
Bit
Position Value Description
[7:0] 00h–FF These bits represent the Low byte of the 2 byte PHY
EMAC_CTLD_L h configuration data value, {EMAC_CTLD_H,
EMAC_CTLD_L}. Bit 7 is bit 7 of the 16 bit value. Bit 0 is bit
0 (lsb) of the 16 bit value.
PS019217-1222
eZ80F91 MCU
Product Specification
315
Table 200. EMAC PHY Configuration Data Register—High Byte (EMAC_CTLD_H = 003Dh)
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
CPU Access R/W R/W R/W R/W R/W R/W R/W R/W
Note: R/W = Read/Write.
Bit
Position Value Description
[7:0] 00h–FF These bits represent the High byte of the 2 byte PHY
EMAC_CTLD_H h configuration data value, {EMAC_CTLD_H,
EMAC_CTLD_L}. Bit 7 is bit 15 (msb) of the 16 bit value. Bit
0 is bit 8 of the 16 bit value.
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
Bit
Position Value Description
[7:5] 000 Reserved.
[4:0] 00h–1F Programmable 5 bit value which selects address within the
RGAD h selected external PHY.
PS019217-1222
eZ80F91 MCU
Product Specification
316
Table 202. EMAC PHY Unit Select Address Register (EMAC_FIAD = 003Fh)
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
Bit
Position Value Description
[7:5] 000 Reserved.
[4:0] 00h–1Fh Programmable 5-bit value that selects an external PHY.
FIAD
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
CPU Access R/W R/W R/W R/W R/W R/W R/W R/W
Note: R/W = Read/Write.
Bit
Position Value Description
[7:0] 00h–FFh The Transmit polling period.
EMAC_PTMR
PS019217-1222
eZ80F91 MCU
Product Specification
317
Bit 7 6 5 4 3 2 1 0
Reset 0 0 1 0 0 0 0 0
Bit
Position Value Description
[7:6] 00 Reserved
5 1 Software Reset Active—resets Receive, Transmit, EMAC
SRST Control and EMAC MII_MGT functions
0 Normal operation
4 1 Reset Transmit function
HRTFN
0 Normal operation
3 1 Reset Receive function
HRRFN
0 Normal operation
2 1 Reset EMAC Transmit Control function
HRTMC
0 Normal operation
1 1 Reset EMAC Receive Control function
HRRMC
0 Normal operation
0 1 Reset EMAC Management function
HRMGT
0 Normal operation
PS019217-1222
eZ80F91 MCU
Product Specification
318
Table 205. EMAC Transmit Lower Boundary Pointer Register—Low Byte (EMAC_TLBP_L = 0042h)
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
Bit
Position Value Description
[7:0] 00h–FF These bits represent the Low byte of the 2 byte Transmit
EMAC_TLBP_L h Lower Boundary Pointer value, {EMAC_TLBP_H,
EMAC_TLBP_L}. Bit 7 is bit 7 of the 16 bit value. Bit 0 is bit 0
(lsb) of the 16 bit value.
Table 206. EMAC Transmit Lower Boundary Pointer Register—High Byte (EMAC_TLBP_H
= 0043h)*
Bit 7 6 5 4 3 2 1 0
Reset 1 1 0 0 0 0 0 0
Bit
Position Value Description
[7:0] 00h–FF These bits represent the High byte of the 2 byte Transmit
EMAC_TLBP_H h Lower Boundary Pointer value, {EMAC_TLBP_H,
EMAC_TLBP_L}. Bit 7 is bit 15 (msb) of the 16 bit value. Bits
7:5 default to 000 on reset; bit 0 is bit 8 of the 16-bit value.
Note: *Bits 7:5 are not used by the EMAC; these bits return 000.
PS019217-1222
eZ80F91 MCU
Product Specification
319
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
Bit
Position Value Description
[7:0] 00h–FFh These bits represent the Low byte of the 3 byte EMAC
EMAC_BP_L Boundary Pointer value, {EMAC_BP_U, EMAC_BP_H,
EMAC_BP_L}. Bit 7 is bit 7 of the 24 bit value. Bit 0 is bit 0 of
the 24 bit value.
Bit
Position Value Description
[7:0] 00h–FFh These bits represent the High byte of the 3 byte EMAC
EMAC_BP_H Boundary Pointer value, {EMAC_BP_U, EMAC_BP_H,
EMAC_BP_L}. Bit 7 is bit 15 of the 24 bit value. Bit 0 is bit 8 of
the 24 bit value.
PS019217-1222
eZ80F91 MCU
Product Specification
320
Bit 7 6 5 4 3 2 1 0
Reset 1 1 1 1 1 1 1 1
CPU Access R R R R R R R R
Note: R = Read Only.
Bit
Position Value Description
[7:0] 00h–FFh These bits represent the upper byte of the 3 byte EMAC
EMAC_BP_U Boundary Pointer value, {EMAC_BP_U, EMAC_BP_H,
EMAC_BP_L}. Bit 7 is bit 23 of the 24 bit value. Bit 0 is bit 16 of
the 24 bit value.
Table 210. EMAC Receive High Boundary Pointer Register—Low Byte (EMAC_RHBP_L = 0047h)
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
Bit
Position Value Description
[7:0] 00h–E0h These bits represent the Low byte of the 2 byte EMAC
EMAC_RHBP_L Receive High Boundary Pointer value, {EMAC_RHBP_H,
EMAC_RHBP_L}. Bit 7 is bit 7 of the 16 bit value. Bit 0 is bit
0 (lsb) of the 16 bit value.
PS019217-1222
eZ80F91 MCU
Product Specification
321
Table 211. EMAC Receive High Boundary Pointer Register—High Byte (EMAC_RHBP_H = 0048h)
Bit 7 6 5 4 3 2 1 0
Reset 1 1 0 0 0 0 0 0
CPU Access R R R R/W R/W R/W R/W R/W
Note: R = Read Only, R/W = Read/Write.
Bit
Position Value Description
[7:0] 00h–FFh These bits represent the High byte of the 2 byte EMAC
EMAC_RHBP_H Receive High Boundary Pointer value, {EMAC_RHBP_H,
EMAC_RHBP_L}. Bit 7 is bit 15 (msb) of the 16 bit value. Bit
0 is bit 8 of the 16 bit value.
Note: *Bits 7:5 are not used by the EMAC; these bits return 000 upon reset.
Table 212. EMAC Receive Read Pointer Register—Low Byte (EMAC_RRP_L = 0049h)
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
Bit
Position Value Description
[7:0] 00h–FFh These bits represent the Low byte of the 2 byte EMAC
EMAC_RRP_L Receive Read Pointer value, {EMAC_RRP_H,
EMAC_RRP_L}. Bit 7 is bit 7 of the 16 bit value. Bit 0 is bit 0
(lsb) of the 16 bit value.
PS019217-1222
eZ80F91 MCU
Product Specification
322
Table 213. EMAC Receive Read Pointer Register—High Byte (EMAC_RRP_H = 004Ah)
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
CPU Access R R R R/W R/W R/W R/W R/W
Note: R = Read Only, R/W = Read/Write.
Bit
Position Value Description
[7:0] 00h–FFh These bits represent the High byte of the 2-byte EMAC
EMAC_RRP_H Receive Read Pointer value, {EMAC_RRP_H,
EMAC_RRP_L}. Bit 7 is bit 15 (msb) of the 16-bit value. Bits
7:5 default to 000 on reset; bit 0 is bit 8 of the 16-bit value.
PS019217-1222
eZ80F91 MCU
Product Specification
323
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
CPU Access R/W R/W R/W R/W R/W R/W R/W R/W
Note: R/W = Read/Write.
Bit
Position Value Description
[7:6] 00 Set EMAC Rx/Tx buffer size to 256 bytes.
BUFSZ
01 Set EMAC Rx/Tx buffer size to 128 bytes.
10 Set EMAC Rx/Tx buffer size to 64 bytes.
11 Set EMAC Rx/Tx buffer size to 32 bytes.
[5:0] 00h–3Fh Transmit Pause Control Frame level. 00h disables the
TPCF_LEV hardware generated transmit pause control frame.
PS019217-1222
eZ80F91 MCU
Product Specification
324
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
CPU Access R/W R/W R/W R/W R/W R/W R/W R/W
Note: R/W = Read/Write.
Bit
Position Value Description
7 1 Enable Transmit State Machine Error Interrupt (system
TxFSMERR interrupt).
0 Disable Transmit State Machine Error Interrupt (system
interrupt).
6 1 Enable MII Management. Done Interrupt (system Interrupt).
MGTDONE
0 Disable MII Management. Done Interrupt (system Interrupt).
5 1 Enable Receive Control Frame Interrupt (Receive interrupt).
Rx_CF
0 Disable Receive Control Frame Interrupt (Receive interrupt).
4 1 Enable Receive Pause Control Frame interrupt (Receive
Rx_PCF interrupt).
0 Disable Receive Pause Control Frame interrupt (Receive
interrupt).
3 1 Enable Receive Done interrupt (Receive interrupt).
Rx_DONE
0 Disable Receive Done interrupt (Receive interrupt).
2 1 Enable Receive Overrun interrupt (System interrupt).
Rx_OVR
0 Disable Receive Overrun interrupt (System interrupt).
1 1 Enable Transmit Control Frame Interrupt (Transmit interrupt).
Tx_CF
0 Disable Transmit Control Frame Interrupt (Transmit interrupt).
0 1 Enable Transmit Done interrupt (Transmit interrupt).
Tx_DONE
0 Disable Transmit Done Interrupt (Transmit interrupt).
PS019217-1222
eZ80F91 MCU
Product Specification
325
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
CPU Access R/W R/W R/W R/W R/W R/W R/W R/W
Note: R/W = Read/Write.
Bit
Position Value Description
7 1 An internal error occurs in the EMAC Transmit path. The
TxFSMERR_STAT Transmit path must be reset to reset this error condition.
0 Normal operation—no Transmit state machine errors.
6 1 The MII Management interrupt has completed a Read
MGTDONE_STAT (RSTAT or SCAN) or a Write (LDCTLD) access to the
PHY.
0 The MII Management interrupt does not occur.
5 1 Receive Control Frame interrupt (Receive Interrupt)
Rx_CF_STAT occurs.
0 Receive Control Frame interrupt does not occur.
4 1 Receive Pause Control Frame interrupt (Receive
Rx_PCF_STAT Interrupt) occurs.
0 Disable Receive Pause Control Frame interrupt (Receive
Interrupt) does not occur.
3 1 Receive Done interrupt (Receive Interrupt) occurs.
Rx_DONE_STAT
0 Disable Receive Done interrupt (Receive Interrupt) does
not occur.
2 1 Receive Overrun interrupt (System Interrupt) occurs.
Rx_OVR_STAT
0 Receive Overrun interrupt (System Interrupt) does not
occur.
PS019217-1222
eZ80F91 MCU
Product Specification
326
Bit
Position Value Description
1 1 Transmit Control Frame Interrupt (Transmit Interrupt)
Tx_CF_STAT occurs.
0 Transmit Control Frame Interrupt (Transmit Interrupt)
does not occur.
0 1 Transmit Done interrupt (Transmit Interrupt) occurs.
Tx_DONE_STAT
0 Transmit Done interrupt (Transmit Interrupt) does not
occur.
Table 217. EMAC PHY Read Status Data Register—Low Byte (EMAC_PRSD_L = 004Eh)
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
CPU Access R R R R R R R R
Note: R = Read Only.
Bit
Position Value Description
[7:0] 00h–FFh These bits represent the Low byte of the 2 byte EMAC PHY
EMAC_PRSD_L Read Status Data value, {EMAC_PRSD_H,
EMAC_PRSD_L}. Bit 7 is bit 7 of the 16 bit value. Bit 0 is bit
0 (lsb) of the 16 bit value.
PS019217-1222
eZ80F91 MCU
Product Specification
327
Table 218. EMAC PHY Read Status Data Register—High Byte (EMAC_PRSD_H = 004Fh)
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
CPU Access R R R R R R R R
Note: R = Read Only.
Bit
Position Value Description
[7:0] 00h–FFh These bits represent the High byte of the 2-byte EMAC
EMAC_PRSD_H PHY Read Status Data value, {EMAC_PRSD_H,
EMAC_PRSD_L}. Bit 7 is bit 15 (msb) of the 16-bit value.
Bit 0 is bit 8 of the 16-bit value.
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
CPU Access R R R R R R R R
Note: R = Read Only.
Bit
Position Value Description
7 1 MII management operation in progress—Busy. This status bit
BUSY goes busy whenever the LCTLD (PHY Write) or the RSTAT
(PHY Read) is set in the EMAC_MIIMGT register. It is
negated when the Write or Read operation to the PHY has
completed. In SCAN mode, the BUSY will be asserted until
the SCAN is disabled. Use the EmacIStat[MGTDONE]
interrupt status bit to determine when the data is valid.
0 Not Busy.
6 1 Local copy of PHY Link fail bit.
MIILF
0 PHY Link OK.
PS019217-1222
eZ80F91 MCU
Product Specification
328
Table 220. EMAC Receive Write Pointer Register—Low Byte (EMAC_RWP_L = 0051h)
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
CPU Access R R R R R R R R
Note: R = Read Only.
Bit
Position Value Description
[7:0] 00h–E0 These bits represent the Low byte of the 2 byte EMAC
EMAC_RWP_L h RxDMA Receive Write Pointer value, {EMAC_RWP_H,
EMAC_RWP_L}. Bit 7 is bit 7 of the 16 bit value. Bit 0 is bit 0
(lsb) of the 16 bit value.
PS019217-1222
eZ80F91 MCU
Product Specification
329
Table 221. EMAC Receive Write Pointer Register—High Byte (EMAC_RWP_H = 0052h)
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
CPU Access R R R R R R R R
Note: R = Read Only.
Bit
Position Value Description
[7:0] 00h–1Fh These bits represent the High byte of the 2 byte EMAC
EMAC_RWP_H RxDMA Receive Write Pointer value, {EMAC_RWP_H,
EMAC_RWP_L}. Bit 7 is bit 15 (msb) of the 16 bit value. Bit
0 is bit 8 of the 16 bit value.
Table 222. EMAC Transmit Read Pointer Register—Low Byte (EMAC_TRP_L = 0053h)
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
CPU Access R R R R R R R R
Note: R = Read Only.
Bit
Position Value Description
[7:0] 00h–E0h These bits represent the Low byte of the 2 byte EMAC
EMAC_TRP_L TxDMA Transmit Read Pointer value, {EMAC_TRP_H,
EMAC_TRP_L}. Bit 7 is bit 7 of the 16 bit value. Bit 0 is bit 0
(lsb) of the 16 bit value.
PS019217-1222
eZ80F91 MCU
Product Specification
330
Table 223. EMAC Transmit Read Pointer Register—High Byte (EMAC_TRP_H = 0054h)
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
CPU Access RO RO RO RO RO RO RO RO
Note: R/W = Read/Write.
Bit
Position Value Description
[7:0] 00h–1Fh These bits represent the High byte of the 2 byte EMAC
EMAC_TRP_H TxDMA Transmit Read Pointer value, {EMAC_TRP_H,
EMAC_TRP_L}. Bit 7 is bit 15 (msb) of the 16 bit value. Bit
0 is bit 8 of the 16 bit value.
PS019217-1222
eZ80F91 MCU
Product Specification
331
Table 224. EMAC Receive Blocks Left Register—Low Byte (EMAC_BLKSLFT_L = 0055h)
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
CPU Access R R R R R R R R
Note: R = Read Only.
Bit
Position Value Description
[7:0] 00h–FFh These bits represent the Low byte of the 2 byte EMAC
EMAC_BLKSLFT_L Receive Blocks Left value, {EMAC_BLKSLFT_H,
EMAC_BLKSLFT_L}. Bit 7 is bit 7 of the 16 bit value. Bit
0 is bit 0 (lsb) of the 16 bit value.
Table 225. EMAC Receive Blocks Left Register—High Byte (EMAC_BLKSLFT_H = 0056h)
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0
CPU Access R R R R R R R R
Note: R = Read Only.
Bit
Position Value Description
[7:0] 00h–FFh These bits represent the High byte of the 2 byte EMAC
EMAC_BLKSLFT_H Receive Blocks Left value, {EMAC_BLKSLFT_H,
EMAC_BLKSLFT_L}. Bit 7 is bit 15 (msb) of the 16 bit
value. Bit 0 is bit 8 of the 16 bit value.
PS019217-1222
eZ80F91 MCU
Product Specification
332
Bit 7 6 5 4 3 2 1 0
Reset X X X X X X X X
CPU Access R/W R/W R/W R/W R/W R/W R/W R/W
Note: R/W = Read/Write.
Bit
Position Value Description
[7:0] 00h–FFh These bits represent the Low byte of the 10 bit EMAC
EMAC_FDATA_L FIFO data value, {EMAC_FDATA_H[1:0],
EMAC_FDATA_L}. Bit 7 is bit 7 of the 16 bit value. Bit 0 is
bit 0 (lsb) of the 10 bit value.
Bit 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 X X
Bit
Position Value Description
[7:2] 00h Reserved.
[1:0] 0h–3h These bits represent the upper two bits of the 10 bit EMAC
EMAC_FDATA_H FIFO data value, {EMAC_FDATA_H[1:0],
EMAC_FDATA_L}. Bit 1 is bit 9 (msb) of the 16 bit value.
Bit 0 is bit 8 of the 10 bit value.
PS019217-1222
eZ80F91 MCU
Product Specification
333
Bit 7 6 5 4 3 2 1 0
Reset 0 0 1 1 0 0 1 1
CPU Access R R R R R R R R
Note: R = Read Only.
Bit
Position Value Description
7 1 Transmit FIFO full
TFF
0 Transmit FIFO not full
6 0 Reserved
5 1 Transmit FIFO almost empty
TFAE
0 Transmit FIFO not almost empty
4 1 Transmit FIFO empty
TFE
0 Transmit FIFO not empty
3 1 Receive FIFO full
RFF
0 Receive FIFO not full
2 1 Receive FIFO almost full
RFAF
0 Receive FIFO not almost full
1 1 Receive FIFO almost empty
RFAE
0 Receive FIFO not almost empty
0 1 Receive FIFO empty
RFE
0 Receive FIFO not empty
PS019217-1222
eZ80F91 MCU
Product Specification
334
PS019217-1222
eZ80F91 MCU
Product Specification
335
On-Chip Oscillators
The eZ80F91 features two on-chip oscillators for use with an external crystal. The primary
oscillator generates the system clock for the internal CPU and the majority of the on-chip
peripherals. Alternatively, the XIN input pin also accepts a CMOS-level clock input signal.
If an external clock generator is used, the XOUT pin must be left unconnected. The second-
ary oscillator drives a 32 kHz crystal to generate the time-base for the Real-Time Clock.
PS019217-1222
eZ80F91 MCU
Product Specification
336
On-Chip Oscillator
XIN XOUT
50 MHz Crystal
(Third Overtone)
R = 100 K
C 1 = 5 pF (this value is not critical)
C3 = .01-0.1 F
Frequency
Parameter Dependent Value Units Comments
Frequency 1 MHz
Resonance Parallel
Mode Fundamental
Series Resistance (RS) 750 Ohms Maximum
Load Capacitance (CL) 13 pF Maximum
PS019217-1222
eZ80F91 MCU
Product Specification
337
Frequency
Parameter Dependent Value Units Comments
Shunt Capacitance (C0) 7 pF Maximum
Drive Level 1 mW Maximum
Frequency
Parameter Dependent Value Units Comments
Frequency 10 MHz
Resonance Parallel
Mode Fundamental
Series Resistance (RS) 35 Ohms Maximum
Load Capacitance (CL) 30 pF Maximum
Shunt Capacitance (C0) 7 pF Maximum
Drive Level 1 mW Maximum
PS019217-1222
eZ80F91 MCU
Product Specification
338
RTC_XIN RTC_XOUT
C1 = 10 pF 32 kHz Crystal C2 = 10 pF
(Fundamental Mode)
PS019217-1222
eZ80F91 MCU
Product Specification
339
Electrical Characteristics
Absolute Maximum Ratings
Stresses greater than those listed in Table 232 causes permanent damage to the device.
These ratings are stress ratings only. Operation of the device at any condition outside those
indicated in the operational sections of these specifications is not implied. Exposure to
absolute maximum rating conditions for extended periods affects device reliability. For
improved reliability, unused inputs must be tied to one of the supply voltages (VDD or
VSS).
DC Characteristics
Table 233 on page 340 lists the DC characteristics of the eZ80F91 device.
PS019217-1222
eZ80F91 MCU
Product Specification
340
TA = TA =
0 ºC to 70 ºC –40 ºC to 105 ºC
Symbol Parameter Minimum Typ2 Maximum Minimum Typ2 Maximum Units Conditions
VDD Supply Voltage 3.0 3.3 3.6 3.0 3.3 3.6 V
VIL Low Level –0.3 0.3 x VDD –0.3 0.3 x VDD V
Input Voltage
VIH High Level 0.7 x VDD 5.5 0.7 x VDD 5.5 V
Input Voltage
VOL Low Level 0.4 0.4 V VDD = 3.0 V;
Output Voltage IOL = 1 mA
VOH High Level 2.4 2.4 V VDD = 3.0 V;
Output Voltage IOH = –1 mA
VRTC RTC Supply 2.0 3.6 2.0 3.6 V
Voltage
IIL Input Leakage –10 +10 –10 +10 μA VDD = 3.6 V;
Current VIN = VDD or
VSS1
ITL Open-drain –10 +10 –10 +10 μA VDD = 3.6 V
Leakage Current
ICC a Active Current 26 40 mA @ 10 MHz
52 80 mA @ 20 MHz
137 190 mA @ 50 MHz
ICC h HALT Mode 15 20 mA @ 10 MHz
Current
27 40 mA @ 20 MHz
75 100 mA @ 50 MHz
ICC s SLEEP Mode 2.5 20 2.5 95 μA VBO_OFF=1
Current (VBO
disabled)
IRTC RTC Supply 2.5 10 2.5 10 μA Supply current
Current into VRTC
1This
condition excludes all pins with on-chip pull-ups when driven Low.
2
Values in Typical column are for Vdd = 3.3 V and TA = 25 ºC.
PS019217-1222
eZ80F91 MCU
Product Specification
341
TA = –40 ºC to 105 ºC
PS019217-1222
eZ80F91 MCU
Product Specification
342
180.00
160.00
140.00
Actve Idd (Icca) (mA)
120.00
100.00
80.00
60.00
40.00
20.00
0.00
10Mhz 20Mhz 50Mhz
Frequency (MHz)
Figure 65. ICC vs. System Clock Frequency During ACTIVE Mode
PS019217-1222
eZ80F91 MCU
Product Specification
343
Figure 66 displays the typical current consumption of the eZ80F91 device versus system
clock frequency while operating in HALT mode.
90.00
80.00
HALT Mode Idd (Icch) (mA)
70.00
60.00
50.00
40.00
30.00
20.00
10.00
0.00
10Mhz 20Mhz 50Mhz
Fr e q u e n cy (M Hz )
Figure 66. ICC vs. System Clock Frequency During HALT Mode
PS019217-1222
eZ80F91 MCU
Product Specification
344
Figure 67 displays the typical current consumption of the eZ80F91 device versus Vdd
while operating in SLEEP mode (units in microamps, 10-6A); all peripherals off, and VBO
disabled.
e Z8 0 F 9 1 S L EEP M o d e Id d v s V d d (2 5 C )
2 .6 5
2 .6 0
SLEEP Mode Idd (Iccs) (uA)
2 .5 5
2 .5 0
2 .4 5
2 .4 0
2 .3 5
2 .3 0
2 .2 5
2 .2 0
2 .1 5
2 .9 3 .3 3 .7
V d d (V )
Ic c s ( V B O d is a b le d )
AC Characteristics
This section provides information about the AC characteristics and timing of the
eZ80F91 device. All AC timing information assumes a standard load of 50 pF on all
outputs. See Table 236.
TA = TA =
0 ºC to 70 ºC –40 ºC to 105 ºC
PS019217-1222
eZ80F91 MCU
Product Specification
345
TA = TA =
0 ºC to 70 ºC –40 ºC to 105 ºC
Table 237 lists simulated inductance, capacitance, and resistance results for the 144-pin
LQFP package at 100 MHz operating frequency.
PS019217-1222
eZ80F91 MCU
Product Specification
346
TCLK
PHI
T1 T2
ADDR[23:0]
T3 T4
DATA[7:0]
(input)
T5 T6
CSx
T7 T8
MREQ
T9 T10
RD
Delay (ns)
PS019217-1222
eZ80F91 MCU
Product Specification
347
Delay (ns)
TCLK
PHI
T1 T2
ADDR[23:0]
T3 T4
DATA[7:0]
(output)
T5 T6
CSx
T7 T8
MREQ
T9 T10
WR
PS019217-1222
eZ80F91 MCU
Product Specification
348
Delay (ns)
PS019217-1222
eZ80F91 MCU
Product Specification
349
TCLK
PHI
T1 T2
ADDR[23:0]
T3 T4
DATA[7:0]
(input)
T5 T6
CSx
T7 T8
IORQ
T9 T10
RD
Delay (ns)
PS019217-1222
eZ80F91 MCU
Product Specification
350
Delay (ns)
TCLK
PHI
T1 T2
ADDR[23:0]
T3 T4
DATA[7:0]
(output)
T5 T6
CSx
T7 T8
IORQ
T9 T10
WR
PS019217-1222
eZ80F91 MCU
Product Specification
351
Delay (ns)
PS019217-1222
eZ80F91 MCU
Product Specification
352
TCLK TWAIT
SCLK
ADDR[23:0]
DATA[7:0]
(output)
CSx
MREQ
RD
INSTRD
PS019217-1222
eZ80F91 MCU
Product Specification
353
TCLK TWAIT
PHI
ADDR[23:0]
DATA[7:0]
(output)
CSx
MREQ
WR
PS019217-1222
eZ80F91 MCU
Product Specification
354
TCLK
PHI
Port Value
Changes to 0
GPIO Pin
Input Value
TCLK
PHI
Port Output
T1 T2
PS019217-1222
eZ80F91 MCU
Product Specification
355
Delay (ns)
Delay (ns)
PS019217-1222
eZ80F91 MCU
Product Specification
356
PS019217-1222
eZ80F91 MCU
Product Specification
357
Packaging
Figure 76 displays the 144-pin low-profile quad flat package (LQFP) for the eZ80F91
device.
HD
D A
A2
A1
CL
F E HE
CL DETAIL A
LE
c
b e
PS019217-1222
eZ80F91 MCU
Product Specification
358
Ordering Information
Table 244 lists part name, a product specification index code, and a brief description of
each part. Order the eZ80F91 microcontroller from Zilog®, using the following part num-
bers. For more information on ordering, please consult your local Zilog sales office. The
Zilog website (www.zilog.com) lists all regional offices and provides additional eZ80F91
microcontroller product information.
PS019217-1222
eZ80F91 MCU
Product Specification
359
Environmental Flow
K = Lead-free RoHS compliant plastic
packaging compound
Temperature Range
E = Extended, –40 °C to +105 °C
Speed
0 = eZ80Acclaim!
50 = Speed
Package
AZ = LQFP (also called VQFP)
Product Number
PS019217-1222
eZ80F91 MCU
Product Specification
PS019217-1222 Index
eZ80F91 MCU
Product Specification
PS019217-1222 Index
eZ80F91 MCU
Product Specification
PS019217-1222 Index
eZ80F91 MCU
Product Specification
PS019217-1222 Index
eZ80F91 MCU
Product Specification
GPIO port pins 41, 49, 55, 354 IEEE 802.3/4.2.3.2.1 Carrier Deference 307, 308
IEEE Standard 1149.1 257, 258
IEF1 59, 125, 253
H IEF2 59
HALT 10, 253, 277 IFLG bit 211, 216, 219, 221, 222, 223, 226, 229
HALT instruction 45 IM 0, Op Code Map 283
HALT Mode 45 IM 1, Op Code Map 283
HALT mode 1, 46, 245, 253 IM 2, Op Code Map 283
HALT_SLP 10, 253, 260 Information Page Characteristics 102
HALT, Op-Code Map 280 Infrared Encoder/Decoder 195
Handshake 216 Infrared Encoder/Decoder Register 199
handshake 175, 177 Infrared Encoder/Decoder Signal Pins 198
hash table 311 Input Capture 128
INPUT capture mode 130
Input capture mode 128
I input capture mode 127, 134
I/O Chip Select Operation 68 INSTRD 9
I/O Chip Selects, External 27 Instruction Store 4
I/O Read 99 0 Registers 249
I/O space 6, 8, 65, 68 Intel- 70
I2C Acknowledge bit 226 Intel Bus Mode 73
I2C bus 211, 214, 215 Intel Bus Mode (Separate Address and Data Buses)
I2C bus clock 211 74
I2C bus protocol 212 internal pull-up 50
I2C Clock Control Register 229 Internal RC oscillator 115
I2C control bit 217, 218, 220 internal RC oscillator 118
I2C Control Register 225 internal system clock 69
I2C Data Register 225 Interpacket Gap 306, 307
I2C Extended Slave Address Register 224 Interpacket gap 306
I2C Registers 223 interpacket gap 296, 308
I2C Software Reset Register 230 Interrupt Controller 57
I2C Status Register 227 interrupt enable 9
IC0 17, 127, 129, 134, 135, 139, 140, 141, 142, Interrupt Enable bit 225
152, 156 interrupt enable bit 160, 178
IC1 17, 127, 129, 134, 135, 139, 141, 152, 156 Interrupt Enable Flag 253
IC2 18, 127, 129, 134, 135, 139, 140, 141, 152, interrupt enable flag 125
156 Interrupt Input 198
IC3 18, 127, 129, 134, 135, 139, 141, 142, 152, interrupt input 11, 12, 13, 14, 15, 16
156 Interrupt Priority 61, 63
IEEE 1149.1 specification 259, 264 interrupt priority 63
IEEE 802.3 311 interrupt priority levels 60
IEEE 802.3 frames 300 Interrupt Priority Registers 60
IEEE 802.3 specification 301, 302 Interrupt request 133, 134
IEEE 802.3, 802.3(u) minimum values 306 interrupt request 54, 58, 108, 127
PS019217-1222 Index
eZ80F91 MCU
Product Specification
PS019217-1222 Index
eZ80F91 MCU
Product Specification
PS019217-1222 Index
eZ80F91 MCU
Product Specification
PS019217-1222 Index
eZ80F91 MCU
Product Specification
PS019217-1222 Index
eZ80F91 MCU
Product Specification
PS019217-1222 Index
eZ80F91 MCU
Product Specification
Serial Peripheral Interface flag 209, 210 SPIF status bit—see Serial Peripheral Interface flag
Serial Peripheral Interface Functional Description 209
204 SPIF—see Serial Peripheral Interface flag 204,
Setting Timer Duration 122 209
Single Pass Mode 123 SRA 279
single pass mode 121, 124, 132 SRA, Op Code Map 281, 285
Single-Byte I/O Write 99 SRAM 1, 104, 231, 329
SLA 218, 220, 224, 279 SRAM, internal Ethernet 292
SLA, Op Code Map 285, 286 SS—see Slave Select 17, 202, 203, 204, 206,
SLA, Op Code map 281 208
SLAVE mode 211, 225, 228 STA 225
slave mode 222, 223, 224 standard mode 211
SLAVE mode, SPI 204 Standard VHDL Package STD_1149_1_2001 260
Slave Receive 211, 222 START and STOP Conditions 212
Slave Select 202 START condition 212, 215, 216, 218, 219, 221,
Slave Transmit 211, 221 222, 223, 225, 227, 228, 229, 230
Slave Transmit mode 226 start condition 213
slave transmit mode 221, 222 Start Condition, ZDI 233
SLEEP Mode 45 Starting Program Counter 59, 60
SLEEP mode 173, 245, 253 STOP condition 212, 213, 215, 219, 221, 222,
sleep-mode recovery 173 226, 227, 229, 230
sleep-mode recovery reset 174 Supply Voltage 340
Software break point instruction 257 supply voltage 2, 42, 50, 211, 267, 339
Specialty Timer Modes 126 Switching Between Bus Modes 84
SPI Baud Rate Generator 205 System clock 47, 48, 115
SPI Baud Rate Generator Registers—Low Byte and system clock 41, 45, 51, 54, 118, 125, 127, 132,
High Byte 206 150, 181, 205, 229, 230, 238, 258, 266, 289,
SPI Control Register 208 354
SPI Data Rate 205 system clock cycle 75, 78, 122
SPI Flag 204 System Clock Cycle Time 344
SPI interrupt service routine 58 system clock cycles 9, 68, 71, 72, 75, 78, 82,
SPI Master device 206 116, 258
SPI master device 19 System clock divider 132
SPI MASTER mode 204 System Clock Fall Time 345
SPI mode 17 System Clock Frequency 122, 181, 205
SPI Receive Buffer Register 210 system clock frequency 99, 101, 105, 106, 232
SPI Registers 206 System Clock High Time 344
SPI serial bus 209 system clock jitter 127
SPI Serial Clock 18 System Clock Low Time 344
SPI Signals 202 System Clock Oscillator Input 14
SPI slave device 19 System Clock Oscillator Output 13
SPI SLAVE mode 204 system clock period 258
SPI Status Register 205, 209 system clock periods 151
SPI Transmit Shift Register 205, 206, 209 System Clock Rise Time 345
PS019217-1222 Index
eZ80F91 MCU
Product Specification
system clock rising edge 181, 205 Timer Output Compare Value Register—High Byte
System Clock Source 269 145
System clock source 270 Timer Output Compare Value Register—Low Byte
system clock source 269 144
system clock, high-frequency 205 Timer Port Pin Allocation 129
system clock, internal 69 Timer Registers 130
system RESET 41, 162, 163 Timer Reload Register—High Byte 139
system reset 160, 183, 267, 297 Timer Reload Register—Low Byte 138
TMS 258, 259
TOUT0 21, 129
T TOUT1 21, 129
T2 clock 151 Trace buffer memory 257
T2 end-of-count 151 Trace history buffer 257
T23CLKCN 151 Transferring Data 213
TAP 264 transmit shift register 176, 185, 188, 191
TAP Reset 258 Transmit Shift Register, SPI 204, 205, 206, 209,
TCK 233, 258, 259, 264 210
TDI 258, 259, 260 Transmit, Infrared Encoder/Decoder 196
TDO 258, 259, 260 trigger-level detection logic 176
TERI 193 TRIGOUT 258, 260
Test Access Port 257 tristate 152
Test Access Port instruction 264 TRSTN 258, 259
Test Access Port state register 258 Tx_CLK 23
Test Mode 258 Tx_EN 23
Time-Out Period Selection 116 Tx_ER 23
Timer Control Register 132 TxD0 11, 23
Timer Data Register—High Byte 137 TxD1 14, 23
Timer Data Register—Low Byte 136 TxD2 23
Timer Input Capture Control Register 139 TxD3 22
Timer Input Capture Value A Register—High Byte TxDMA 290
141
Timer Input Capture Value A Register—Low Byte
140 U
Timer Input Capture Value B Register—High Byte UART Baud Rate Generator Register—Low and
142 High Bytes 182
Timer Input Capture Value B Register—Low Byte UART FIFO Control Register 187
141 UART Functional Description 176
Timer Input Source Selection 125 UART Functions 176
Timer Interrupt Enable Register 133 UART Interrupt Enable Register 184
Timer Interrupt Identification Register 135 UART Interrupt Identification Register 186
Timer Interrupts 124 UART Interrupts 178
Timer Output 125 UART Line Control Register 188
Timer Output Compare Control Register 1 142 UART Line Status Register 191
Timer Output Compare Control Register 2 143 UART Modem Control 177
PS019217-1222 Index
eZ80F91 MCU
Product Specification
PS019217-1222 Index
eZ80F91 MCU
Product Specification
PS019217-1222 Index
eZ80F91 MCU
Product Specification
374
Customer Support
For answers to technical questions about the product, documentation, or any other issues
with Zilog’s offerings, visit Zilog’s Knowledge Base at http://www.zilog.com/kb.
For any comments, detail technical questions, or reporting problems, visit Zilog’s Techni-
cal Support at http://support.zilog.com.
PS019217-1222