The information given in this document shall in no event be regarded as a guarantee of conditions or
characteristics (“Beschaffenheitsgarantie”). With respect to any examples or hints given herein, any typical values
stated herein and/or any information regarding the application of the device, Infineon Technologies hereby
disclaims any and all warranties and liabilities of any kind, including without limitation warranties of noninfringement of intellectual property rights of any third party.
Information
For further information on technology, delivery terms and conditions and prices please contact your nearest
Infineon Technologies Office (www.infineon.com).
Warnings
Due to technical requirements components may contain dangerous substances. For information on the types in
question please contact your nearest Infineon Technologies Office.
Infineon Technologies Components may only be used in life-support devices or systems with the express written
approval of Infineon Technologies, if a failure of such components can reasonably be expected to cause the failure
of that life-support device or system, or to affect the safety or effectiveness of that device or system. Life support
devices or systems are intended to be implanted in the human body, or to support and/or maintain and sustain
and/or protect human life. If they fail, it is reasonable to assume that the health of the user or other persons may
be endangered.
Data Sheet, V1.2, March 2006
XC167CI-16F
16-Bit Single-Chip Microcontroller
with C166SV2 Core
Microcontrollers
XC167-16
Derivatives
XC167
Revision History: V1.2, 2006-03
Previous Version(s):
V1.1, 2003-06
V1.0, 2002-10
PageSubjects (major changes since last revision)
allLayout of graphics and text structures has been adapted to the new
company documentation rules.
73Minimum oscillator period corrected
77Output delay/hold time of A23 … A16 moved from
tc
-> tc12, tc21 -> tc
11
82Parameter tc40 corrected
85Chapter “Package and Reliability” added.
We Listen to Your Comments
Any information within this document that you feel is wrong, unclear or missing at all?
Your feedback will help us to continuously improve the quality of this document.
Please send your proposal (including a reference to this document) to:
XC16716-Bit Single-Chip Microcontroller with C166SV2 Core
XC166 Family
1Summary of Features
•High Performance 16-bit CPU with 5-Stage Pipeline
– 25 ns Instruction Cycle Time at 40 MHz CPU Clock (Single-Cycle Execution)
– 1-Cycle Multiplication (16 ×16 bit), Background Division (32 / 16 bit) in 21 Cycles
– 1-Cycle Multiply-and-Accumulate (MAC) Instructions
– Enhanced Boolean Bit Manipulation Facilities
– Zero-Cycle Jump Execution
– Additional Instructions to Support HLL and Operating Systems
– Register-Based Design with Multiple Variable Register Banks
– Fast Context Switching Support with Two Additional Local Register Banks
– 16 Mbytes Total Linear Address Space for Code and Data
– 1024 Bytes On-Chip Special Function Register Area (C166 Family Compatible)
•16-Priority-Level Interrupt System with 77 Sources, Sample-Rate down to 50 ns
•8-Channel Interrupt-Driven Single-Cycle Data Transfer Facilities via
Peripheral Event Controller (PEC), 24-Bit Pointers Cover Total Address Space
•Clock Generation via on-chip PLL (factors 1:0.15 … 1:10), or
via Prescaler (factors 1:1 … 60:1)
•On-Chip Peripheral Modules
– 16-Channel A/D Converter with Programmable Resolution (10-bit or 8-bit) and
Conversion Time (down to 2.55 µs or 2.15 µs)
– Two 16-Channel General Purpose Capture/Compare Units (32 Input/Output Pins)
– Capture/Compare Unit for flexible PWM Signal Generation (CAPCOM6)
(3/6 Capture/Compare Channels and 1 Compare Channel)
– Multi-Functional General Purpose Timer Unit with 5 Timers
– Two Synchronous/Asynchronous Serial Channels (USARTs)
– Two High-Speed-Synchronous Serial Channels
– On-Chip TwinCAN Interface (Rev. 2.0B active) with 32 Message Objects
(Full CAN/Basic CAN) on Two CAN Nodes, and Gateway Functionality
– IIC Bus Interface (10-bit addressing, 400 kbit/s) with 3 Channels (multiplexed)
– On-Chip Real Time Clock, Driven by Dedicated Oscillator
•Idle, Sleep, and Power Down Modes with Flexible Power Management
•Programmable Watchdog Timer and Oscillator Watchdog
Data Sheet4V1.2, 2006-03
Summary of Features
•Up to 12 Mbytes External Address Space for Code and Data
– Programmable External Bus Characteristics for Different Address Ranges
– Multiplexed or Demultiplexed External Address/Data Buses
– Selectable Address Bus Width
– 16-Bit or 8-Bit Data Bus Width
– Five Programmable Chip-Select Signals
– Hold- and Hold-Acknowledge Bus Arbitration Support
•Up to 103 General Purpose I/O Lines,
partly with Selectable Input Thresholds and Hysteresis
•On-Chip Bootstrap Loader
•Supported by a Large Range of Development Tools like C-Compilers,
Macro-Assembler Packages, Emulators, Evaluation Boards, HLL-Debuggers,
Simulators, Logic Analyzer Disassemblers, Programming Boards
•On-Chip Debug Support via JTAG Interface
•144-Pin TQFP Package, 0.5 mm (19.7 mil) pitch
XC167-16
Derivatives
Ordering Information
The ordering code for Infineon microcontrollers provides an exact reference to the
required product. This ordering code identifies:
•the derivative itself, i.e. its function set, the temperature range, and the supply voltage
•the package and the type of delivery.
For the available ordering codes for the XC167 please refer to the “Product CatalogMicrocontrollers”, which summarizes all available microcontroller variants.
Note: The ordering codes for Mask-ROM versions are defined for each product after
verification of the respective ROM code.
This document describes several derivatives of the XC167 group. Table 1 enumerates
these derivatives and summarizes the differences. As this document refers to all of these
derivatives, some descriptions may not apply to a specific product.
For simplicity all versions are referred to by the term XC167 throughout this document.
Data Sheet5V1.2, 2006-03
Table 1XC167 Derivative Synopsis
Derivative
1)
Temp.
Range
Program
Memory
XC167-16
Derivatives
Summary of Features
On-Chip RAMInterfaces
SAK-XC167CI-16F40F,
SAK-XC167CI-16F20F
-40 °C to
125 °C
128 Kbytes
Flash
2 Kbytes DPRAM,
4 Kbytes DSRAM,
2 Kbytes PSRAM
SAF-XC167CI-16F40F,
SAF-XC167CI-16F20F
-40 °C to
85 °C
128 Kbytes
Flash
2 Kbytes DPRAM,
4 Kbytes DSRAM,
2 Kbytes PSRAM
1) This Data Sheet is valid for devices starting with and including design step AD.
ASC0, ASC1,
SSC0, SSC1,
CAN0, CAN1,
IIC
ASC0, ASC1,
SSC0, SSC1,
CAN0, CAN1,
IIC
Data Sheet6V1.2, 2006-03
XC167-16
Derivatives
General Device Information
2General Device Information
2.1Introduction
The XC167 derivatives are high-performance members of the Infineon XC166 Family of
full featured single-chip CMOS microcontrollers. These devices extend the functionality
and performance of the C166 Family in terms of instructions (MAC unit), peripherals, and
speed. They combine high CPU performance (up to 40 million instructions per second)
with high peripheral functionality and enhanced IO-capabilities. They also provide clock
generation via PLL and various on-chip memory modules such as program Flash,
program RAM, and data RAM.
Port 20
6 bit
XTAL1
XTAL2
XTAL3
XTAL4
NMI
RSTIN
RSTOUT
EA
READY
ALE
RD
WR/WRL
Port 5
16 bit
V
AREF
V
AGND
XC167
V
DDI/P
V
SSI/P
PORT0
16 bit
PORT1
16 bit
Port 2
8 bit
Port 3
15 bit
Port 4
8 bit
Port 6
8 bit
Port 7
4 bit
Port 9
6 bit
TRSTDebug
JTAG
5 bit
2 bit
MCA05554_7
Figure 1Logic Symbol
Data Sheet7V1.2, 2006-03
XC167-16
Derivatives
General Device Information
2.2Pin Configuration and Definition
The pins of the XC167 are described in detail in Table 2, including all their alternate
functions. Figure 2 summarizes all pins in a condensed way, showing their location on
the 4 sides of the package. E*) and C*) mark pins to be used as alternate external
interrupt inputs, C*) marks pins that can have CAN interface lines assigned to them.
P20.123IOFor details, please refer to the description of P20.
NMI
4INon-Maskable Interrupt Input. A high to low transition at this
pin causes the CPU to vector to the NMI trap routine. When
the PWRDN (power down) instruction is executed, the NMI
pin must be low in order to force the XC167 into power down
mode. If NMI
is high, when PWRDN is executed, the part will
continue to run in normal mode.
P6
IO
If not used, pin NMI
Port 6 is an 8-bit bidirectional I/O port. Each pin can be
should be pulled high externally.
programmed for input (output driver in high-impedance
state) or output (configurable as push/pull or open drain
driver). The input threshold of Port 6 is selectable (standard
or special).
The Port 6 pins also serve for alternate functions:
Bus Request Output,
CC7IOCAPCOM1: CC7 Capture Inp./Compare Output
P6.7
14
IO
O
IO
Data Sheet9V1.2, 2006-03
Table 2Pin Definitions and Functions (cont’d)
XC167-16
Derivatives
General Device Information
Symbol
P7
P7.4
P7.5
P7.6
P7.7
Pin
Num.
15
16
17
18
Input
Outp.
IO
I/O
I
I
I/O
O
I
I/O
I
I
I/O
O
I
Function
Port 7 is a 4-bit bidirectional I/O port. Each pin can be
programmed for input (output driver in high-impedance
state) or output (configurable as push/pull or open drain
driver). The input threshold of Port 7 is selectable (standard
or special).
Port 7 pins provide inputs/outputs for CAPCOM2 and serial
interface lines.
1)
CC28IOCAPCOM2: CC28 Capture Inp./Compare Outp.,
CAN2_RxD CAN Node 2 Receive Data Input,
EX7INFast External Interrupt 7 Input (alternate pin B)
CC29IOCAPCOM2: CC29 Capture Inp./Compare Outp.,
CAN2_TxD CAN Node 2 Transmit Data Output,
EX6INFast External Interrupt 6 Input (alternate pin B)
CC30IOCAPCOM2: CC30 Capture Inp./Compare Outp.,
CAN1_RxD CAN Node 1 Receive Data Input,
EX7INFast External Interrupt 7 Input (alternate pin A)
CC31IOCAPCOM2: CC31 Capture Inp./Compare Outp.,
CAN1_TxD CAN Node 1 Transmit Data Output,
EX6INFast External Interrupt 6 Input (alternate pin A)
Data Sheet10V1.2, 2006-03
Table 2Pin Definitions and Functions (cont’d)
XC167-16
Derivatives
General Device Information
Symbol
P9
P9.0
P9.1
P9.2
P9.3
P9.4
P9.5
Pin
Num.
21
22
23
24
25
26
Input
Outp.
IO
I/O
I
I/O
I/O
O
I/O
I/O
I
I/O
I/O
O
I/O
I/O
I/O
I/O
I/O
Function
Port 9 is a 6-bit bidirectional I/O port. Each pin can be
programmed for input (output driver in high-impedance
state) or output (configurable as push/pull or open drain
driver). The input threshold of Port 9 is selectable (standard
or special).
The following Port 9 pins also serve for alternate functions:
CC16IOCAPCOM2: CC16 Capture Inp./Compare Outp.,
CAN2_RxD CAN Node 2 Receive Data Input,
SDA0IIC Bus Data Line 0
CC17IOCAPCOM2: CC17 Capture Inp./Compare Outp.,
CAN2_TxD CAN Node 2 Transmit Data Output,
SCL0IIC Bus Clock Line 0
CC18IOCAPCOM2: CC18 Capture Inp./Compare Outp.,
CAN1_RxD CAN Node 1 Receive Data Input,
SDA1IIC Bus Data Line 1
CC19IOCAPCOM2: CC19 Capture Inp./Compare Outp.,
CAN1_TxD CAN Node 1 Transmit Data Output,
SCL1IIC Bus Clock Line 1
CC20IOCAPCOM2: CC20 Capture Inp./Compare Outp.,
SDA2IIC Bus Data Line 2
CC21IOCAPCOM2: CC21 Capture Inp./Compare Outp.,
SCL2IIC Bus Clock Line 2
Port 5 is a 16-bit input-only port.
The pins of Port 5 also serve as analog input channels for the
A/D converter, or they serve as timer inputs:
AN0
AN1
AN2
AN3
AN4
AN5
AN10,T6EUDGPT1 Timer T4 Ext. Up/Down Ctrl. Inp.
AN11,T5EUDGPT1 Timer T2 Ext. Up/Down Ctrl. Inp
AN8
AN9
AN6
AN7
AN12,T6INGPT2 Timer T6 Count/Gate Input
AN13,T5INGPT2 Timer T5 Count/Gate Input
AN14,T4EUDGPT1 Timer T4 Ext. Up/Down Ctrl. Inp.
AN15,T2EUDGPT1 Timer T2 Ext. Up/Down Ctrl. Inp.
Data Sheet12V1.2, 2006-03
Table 2Pin Definitions and Functions (cont’d)
XC167-16
Derivatives
General Device Information
Symbol
P2
P2.8
P2.9
P2.10
P2.11
P2.12
P2.13
P2.14
P2.15
Pin
Num.
49
50
51
52
53
54
55
56
Input
Outp.
IO
I/O
I
I/O
I
I/O
I
I/O
I
I/O
I
I/O
I
I/O
I
I/O
I
I
Function
Port 2 is an 8-bit bidirectional I/O port. Each pin can be
programmed for input (output driver in high-impedance
state) or output (configurable as push/pull or open drain
driver). The input threshold of Port 2 is selectable (standard
or special).
The following Port 2 pins also serve for alternate functions:
CC8IOCAPCOM1: CC8 Capture Inp./Compare Output,
EX0INFast External Interrupt 0 Input (default pin)
CC9IOCAPCOM1: CC9 Capture Inp./Compare Output,
EX1INFast External Interrupt 1 Input (default pin)
CC10IOCAPCOM1: CC10 Capture Inp./Compare Outp.,
EX2INFast External Interrupt 2 Input (default pin)
CC11IOCAPCOM1: CC11 Capture Inp./Compare Outp.,
EX3INFast External Interrupt 3 Input (default pin)
CC12IOCAPCOM1: CC12 Capture Inp./Compare Outp.,
EX4INFast External Interrupt 4 Input (default pin)
CC13IOCAPCOM1: CC13 Capture Inp./Compare Outp.,
EX5INFast External Interrupt 5 Input (default pin)
CC14IOCAPCOM1: CC14 Capture Inp./Compare Outp.,
EX6INFast External Interrupt 6 Input (default pin)
CC15IOCAPCOM1: CC15 Capture Inp./Compare Outp.,
EX7INFast External Interrupt 7 Input (default pin),
T7INCAPCOM2: Timer T7 Count Input
TRST
57ITest-System Reset Input. A high-level at this pin activates
the XC167’s debug system.
Note: For normal system operation, pin TRST
should be
held low.
Data Sheet13V1.2, 2006-03
Table 2Pin Definitions and Functions (cont’d)
XC167-16
Derivatives
General Device Information
Symbol
P3
P3.0
P3.1
P3.2
P3.3
P3.4
P3.5
P3.6
P3.7
P3.8
P3.9
P3.10
P3.11
P3.12
P3.13
P3.15
Pin
Num.
59
60
61
62
63
64
65
66
67
68
69
70
75
76
77
Input
Outp.
IO
I
O
I
O
I/O
I
I
O
I
I
I
I
I/O
I/O
O
I
I/O
I
O
O
I
I/O
I
O
O
Function
Port 3 is a 15-bit bidirectional I/O port. Each pin can be
programmed for input (output driver in high-impedance
state) or output (configurable as push/pull or open drain
driver). The input threshold of Port 3 is selectable (standard
or special).
The following Port 3 pins also serve for alternate functions:
T0INCAPCOM1 Timer T0 Count Input,
TxD1ASC1 Clock/Data Output (Async./Sync),
EX1INFast External Interrupt 1 Input (alternate pin B)
T6OUTGPT2 Timer T6 Toggle Latch Output,
RxD1ASC1 Data Input (Async.) or Inp./Outp. (Sync.),
EX1INFast External Interrupt 1 Input (alternate pin A)
CAPINGPT2 Register CAPREL Capture Input
T3OUTGPT1 Timer T3 Toggle Latch Output
T3EUDGPT1 Timer T3 External Up/Down Control Input
T4INGPT1 Timer T4 Count/Gate/Reload/Capture Inp
T3INGPT1 Timer T3 Count/Gate Input
T2INGPT1 Timer T2 Count/Gate/Reload/Capture Inp
MRST0SSC0 Master-Receive/Slave-Transmit In/Out.
MTSR0SSC0 Master-Transmit/Slave-Receive Out/In.
TxD0ASC0 Clock/Data Output (Async./Sync.),
EX2INFast External Interrupt 2 Input (alternate pin B)
RxD0ASC0 Data Input (Async.) or Inp./Outp. (Sync.),
EX2INFast External Interrupt 2 Input (alternate pin A)
BHE
WRH
External Memory High Byte Enable Signal,
External Memory High Byte Write Strobe,
EX3INFast External Interrupt 3 Input (alternate pin B)
SCLK0SSC0 Master Clock Output/Slave Clock Input.,
EX3INFast External Interrupt 3 Input (alternate pin A)
CLKOUTMaster Clock Output,
FOUTProgrammable Frequency Output
TCK71IDebug System: JTAG Clock Input
TDI72IDebug System: JTAG Data In
TDO73ODebug System: JTAG Data Out
TMS74IDebug System: JTAG Test Mode Selection
Data Sheet14V1.2, 2006-03
Table 2Pin Definitions and Functions (cont’d)
XC167-16
Derivatives
General Device Information
Symbol
P4
P4.0
P4.1
P4.2
P4.3
P4.4
P4.5
P4.6
P4.7
Pin
Num.
80
81
82
83
84
85
86
87
Input
Outp.
IO
O
O
O
O
O
I
I
O
I
I
O
O
I
O
I
O
I
Function
Port 4 is an 8-bit bidirectional I/O port. Each pin can be
programmed for input (output driver in high-impedance
state) or output (configurable as push/pull or open drain
driver). The input threshold of Port 4 is selectable (standard
or special).
Port 4 can be used to output the segment address lines, the
optional chip select lines, and for serial interface lines:
1)
A16Least Significant Segment Address Line
A17Segment Address Line
A18Segment Address Line
A19Segment Address Line
A20Segment Address Line,
CAN2_RxD CAN Node 2 Receive Data Input,
EX5INFast External Interrupt 5 Input (alternate pin B)
A21Segment Address Line,
CAN1_RxD CAN Node 1 Receive Data Input,
EX4INFast External Interrupt 4 Input (alternate pin B)
A22Segment Address Line,
CAN1_TxD CAN Node 1 Transmit Data Output,
EX5INFast External Interrupt 5 Input (alternate pin A)
A23Most Significant Segment Address Line,
CAN1_RxD CAN Node 1 Receive Data Input,
CAN2_TxD CAN Node 2 Transmit Data Output,
EX4INFast External Interrupt 4 Input (alternate pin A)
Data Sheet15V1.2, 2006-03
Table 2Pin Definitions and Functions (cont’d)
XC167-16
Derivatives
General Device Information
Symbol
P20
P20.0
P20.1
P20.2
P20.4
P20.5
P20.12
Pin
Num.
90
91
92
93
94
3
Input
Outp.
IO
O
O
I
O
I
O
Function
Port 20 is a 6-bit bidirectional I/O port. Each pin can be
programmed for input (output driver in high-impedance
state) or output. The input threshold of Port 20 is selectable
(standard or special).
The following Port 20 pins also serve for alternate functions:
RD
External Memory Read Strobe, activated for
every external instruction or data read access.
WR
/WRLExternal Memory Write Strobe.
In WR
-mode this pin is activated for every
external data write access.
In WRL
-mode this pin is activated for low byte
data write accesses on a 16-bit bus, and for
every data write access on an 8-bit bus.
READYREADY Input. When the READY function is
enabled, memory cycle time waitstates can be
forced via this pin during an external access.
ALEAddress Latch Enable Output.
Can be used for latching the address into
external memory or an address latch in the
multiplexed bus modes.
EA
External Access Enable pin.
A low-level at this pin during and after Reset
forces the XC167 to latch the configuration from
PORT0 and pin RD
, and to begin instruction
execution out of external memory.
A high-level forces the XC167 to latch the
configuration from pins RD
, ALE, and WR, and
to begin instruction execution out of the internal
program memory. “ROMless” versions must
have this pin tied to ‘0’.
RSTOUT
Internal Reset Indication Output.
Is activated asynchronously with an external
hardware reset. It may also be activated
(selectable) synchronously with an internal
software or watchdog reset.
Is deactivated upon the execution of the EINIT
instruction, optionally at the end of reset, or at
any time (before EINIT) via user software.
Note: Port 20 pins may input configuration values (see EA
Data Sheet16V1.2, 2006-03
).
Table 2Pin Definitions and Functions (cont’d)
XC167-16
Derivatives
General Device Information
Symbol
PORT0
P0L.0 P0L.7,
P0H.0,
P0H.1,
P0H.2 P0H.7
Pin
Num.
95 102,
105,
106,
111 116
Input
Function
Outp.
IOPORT0 consists of the two 8-bit bidirectional I/O ports P0L
and P0H. Each pin can be programmed for input (output
driver in high-impedance state) or output.
In case of an external bus configuration, PORT0 serves as
the address (A) and address/data (AD) bus in multiplexed
bus modes and as the data (D) bus in demultiplexed bus
modes.
PORT1 consists of the two 8-bit bidirectional I/O ports P1L
and P1H. Each pin can be programmed for input (output
driver in high-impedance state) or output.
PORT1 is used as the 16-bit address bus (A) in
demultiplexed bus modes (also after switching from a
demultiplexed to a multiplexed bus mode).
The following PORT1 pins also serve for alt. functions:
CC60CAPCOM6: Input / Output of Channel 0
COUT60CAPCOM6: Output of Channel 0
CC61CAPCOM6: Input / Output of Channel 1
COUT61CAPCOM6: Output of Channel 1
CC62CAPCOM6: Input / Output of Channel 2
COUT62CAPCOM6: Output of Channel 2
COUT63Output of 10-bit Compare Channel
CTRAP
CAPCOM2: CC22 Capture Inp./Compare Outp.
CTRAP
is an input pin with an internal pull-up
resistor. A low level on this pin switches the
CAPCOM6 compare outputs to the logic level
defined by software (if enabled).
XTAL2:Output of the main oscillator amplifier circuit
XTAL1:Input to the main oscillator amplifier and input to
the internal clock generator
To clock the device from an external source, drive XTAL1,
while leaving XTAL2 unconnected. Minimum and maximum
high/low and rise/fall times specified in the AC
Characteristics must be observed.
140
141
I
O
XTAL3:Input to the auxiliary (32-kHz) oscillator amplifier
XTAL4:Output of the auxiliary (32-kHz) oscillator
amplifier circuit
To clock the device from an external source, drive XTAL3,
while leaving XTAL4 unconnected. Minimum and maximum
high/low and rise/fall times specified in the AC
Characteristics must be observed.
142IReset Input with Schmitt-Trigger characteristics. A low-level
at this pin while the oscillator is running resets the XC167.
A spike filter suppresses input pulses < 10 ns. Input pulses
> 100 ns safely pass the filter. The minimum duration for a
safe recognition should be 100 ns + 2 CPU clock cycles.
BRK
143ODebug System: Break Out
OUT
BRKIN
144IDebug System: Break In
NC1, 2,
107 110
V
V
V
AREF
AGND
DDI
41–Reference voltage for the A/D converter.
42–Reference ground for the A/D converter.
48, 78,
135
Note: The reset duration must be sufficient to let the
hardware configuration signals settle.
External circuitry must guarantee low-level at the
RSTIN
pin at least until both power supply voltages
have reached the operating range.
–No connection.
It is recommended not to connect these pins to the PCB.
–Digital Core Supply Voltage (On-Chip Modules):
+2.5 V during normal operation and idle mode.
Please refer to the Operating Conditions.
Data Sheet19V1.2, 2006-03
Table 2Pin Definitions and Functions (cont’d)
XC167-16
Derivatives
General Device Information
Symbol
V
DDP
Pin
Num.
6, 20,
28, 58,
88,
Input
Function
Outp.
–Digital Pad Supply Voltage (Pin Output Drivers):
+5 V during normal operation and idle mode.
Please refer to the Operating Conditions.
103,
125
V
V
SSI
SSP
47, 79,
136,
139
5, 19,
27, 89,
–Digital Ground
Connect decoupling capacitors to adjacent
as close as possible to the pins.
All
V
pins must be connected to the ground-line or ground-
–
SS
plane.
104,
126
1) The CAN interface lines are assigned to ports P4, P7, and P9 under software control.
V
DD/VSS
pin pairs
Data Sheet20V1.2, 2006-03
XC167-16
Derivatives
Functional Description
3Functional Description
The architecture of the XC167 combines advantages of RISC, CISC, and DSP
processors with an advanced peripheral subsystem in a very well-balanced way. In
addition, the on-chip memory blocks allow the design of compact systems-on-silicon with
maximum performance (computing, control, communication).
The on-chip memory blocks (program code-memory and SRAM, dual-port RAM, data
SRAM) and the set of generic peripherals are connected to the CPU via separate buses.
Another bus, the LXBus, connects additional on-chip resources as well as external
resources (see Figure 3).
This bus structure enhances the overall system performance by enabling the concurrent
operation of several subsystems of the XC167.
The following block diagram gives an overview of the different on-chip components and
of the advanced, high bandwidth internal bus structure of the XC167.
XTAL
PSRAMDPRAMDSRAM
ProgMem
Flash
128 KBytes
PMU
CPU
DMU
C166SV2-Core
OCDS
Debug Support
Osc / PLL
Clock Generation
ADC
8/10-Bit
Channels
GPT
16
T2
T3
T4
T5
T6
RTCWDT
ASC0
(USAR T)
BRGen
ASC1
(USART)
BRGen
SSC0
(SPI)
BRGen
Interrupt & PEC
SSC1
(SPI)
BRGen
CC1
T0
T1
Interrupt Bus
Peripheral Data Bus
CC2
T7
T8
BRGen
IIC
CC6
EBC
XBUS Control
External Bus
Control
T12
T13
Twin
CAN
AB
P 20
4
66
Port 5
16
PORT1PORT0Port 2Port 3Port 4Port 6P 7Port 9
81588
16
16
MCB04323_x7.vsd
Figure 3Block Diagram
Data Sheet21V1.2, 2006-03
XC167-16
Derivatives
Functional Description
3.1Memory Subsystem and Organization
The memory space of the XC167 is configured in a Von Neumann architecture, which
means that all internal and external resources, such as code memory, data memory,
registers and I/O ports, are organized within the same linear address space. This
common memory space includes 16 Mbytes and is arranged as 256 segments of
64 Kbytes each, where each segment consists of four data pages of 16 Kbytes each.
The entire memory space can be accessed bytewise or wordwise. Portions of the
on-chip DPRAM and the register spaces (E/SFR) have additionally been made directly
bitaddressable.
The internal data memory areas and the Special Function Register areas (SFR and
ESFR) are mapped into segment 0, the system segment.
The Program Management Unit (PMU) handles all code fetches and, therefore, controls
accesses to the program memories, such as Flash memory and PSRAM.
The Data Management Unit (DMU) handles all data transfers and, therefore, controls
accesses to the DSRAM and the on-chip peripherals.
Both units (PMU and DMU) are connected via the high-speed system bus to exchange
data. This is required if operands are read from program memory, code or data is written
to the PSRAM, code is fetched from external memory, or data is read from or written to
external resources, including peripherals on the LXBus (such as TwinCAN). The system
bus allows concurrent two-way communication for maximum transfer performance.
128 Kbytes of on-chip Flash memory store code or constant data. The on-chip Flash
memory is organized as four 8-Kbyte sectors, one 32-Kbyte sector, and one 64-Kbyte
sector. Each sector can be separately write protected
1)
, erased and programmed (in
blocks of 128 Bytes). The complete Flash area can be read-protected. A password
sequence temporarily unlocks protected areas. The Flash module combines very fast
64-bit one-cycle read accesses with protected and efficient writing algorithms for
programming and erasing. Thus, program execution out of the internal Flash results in
maximum performance. Dynamic error correction provides extremely high read data
security for all read accesses.
For timing characteristics, please refer to Section 4.4.2.
2 Kbytes of on-chip Program SRAM (PSRAM) are provided to store user code or data.
The PSRAM is accessed via the PMU and is therefore optimized for code fetches.
4 Kbytes of on-chip Data SRAM (DSRAM) are provided as a storage for general user
data. The DSRAM is accessed via the DMU and is therefore optimized for data
accesses.
2 Kbytes of on-chip Dual-Port RAM (DPRAM) are provided as a storage for user
defined variables, for the system stack, and general purpose register banks. A register
bank can consist of up to 16 wordwide (R0 to R15) and/or bytewide (RL0, RH0, …, RL7,
1) Each two 8-Kbyte sectors are combined for write-protection purposes.
Data Sheet22V1.2, 2006-03
XC167-16
Derivatives
Functional Description
RH7) so-called General Purpose Registers (GPRs).
The upper 256 bytes of the DPRAM are directly bitaddressable. When used by a GPR,
any location in the DPRAM is bitaddressable.
1024 bytes (2 × 512 bytes) of the address space are reserved for the Special Function
Register areas (SFR space and ESFR space). SFRs are wordwide registers which are
used for controlling and monitoring functions of the different on-chip units. Unused SFR
addresses are reserved for future members of the XC166 Family. Therefore, they should
either not be accessed, or written with zeros, to ensure upward compatibility.
In order to meet the needs of designs where more memory is required than is provided
on chip, up to 12 Mbytes (approximately, see Table 3) of external RAM and/or ROM can
be connected to the microcontroller. The External Bus Interface also provides access to
external peripherals.
Table 3XC167 Memory Map
1)
Address AreaStart Loc.End Loc.Area Size
Flash register spaceFF’F000
Reserved (Access trap)F8’0000
Reserved for PSRAME0’0800
Program SRAME0’0000
Reserved for pr. mem.C2’0000
Program FlashC0’0000
ReservedBF’0000
External memory area40’0000
External IO area
4)
20’0800
TwinCAN registers20’0000
External memory area01’0000
H
H
H
H
H
H
H
H
H
H
H
FF’FFFF
FF’EFFF
F7’FFFF
E0’07FF
DF’FFFF
C1’FFFF
BF’FFFF
BE’FFFF
3F’FFFF
20’07FF
1F’FFFF
4 Kbytes
H
< 0.5 MbytesMinus Flash
H
< 1.5 MbytesMinus PSRAM
H
2 KbytesMaximum
H
< 2 MbytesMinus Flash
H
128 Kbytes–
H
64 Kbytes–
H
< 8 MbytesMinus reserved
H
< 2 MbytesMinus TwinCAN
H
2 Kbytes–
H
< 2 MbytesMinus segment 0
H
2)
Notes
3)
registers
segment
Data RAMs and SFRs00’8000
External memory area00’0000
1) Accesses to the shaded areas generate external bus accesses.
2) The areas marked with “<” are slightly smaller than indicated, see column “Notes”.
3) Not defined register locations return a trap code.
4) Several pipeline optimizations are not active within the external IO area. This is necessary to control external
peripherals properly.
Data Sheet23V1.2, 2006-03
H
H
00’FFFF
00’7FFF
32 KbytesPartly used
H
32 Kbytes–
H
XC167-16
Derivatives
Functional Description
3.2External Bus Controller
All of the external memory accesses are performed by a particular on-chip External Bus
Controller (EBC). It can be programmed either to Single Chip Mode when no external
memory is required, or to one of four different external memory access modes
are as follows:
In the demultiplexed bus modes, addresses are output on PORT1 and data is
input/output on PORT0 or P0L, respectively. In the multiplexed bus modes both
addresses and data use PORT0 for input/output. The high order address (segment) lines
use Port 4. The number of active segment address lines is selectable, restricting the
external address space to 8 Mbytes … 64 Kbytes. This is required when interface lines
are assigned to Port 4.
1)
, which
Up to 5 external CS
signals (4 windows plus default) can be generated in order to save
external glue logic. External modules can directly be connected to the common
address/data bus and their individual select lines.
Access to very slow memories or modules with varying access times is supported via a
particular ‘Ready’ function. The active level of the control input signal is selectable.
A HOLD
/HLDA protocol is available for bus arbitration and allows the sharing of external
resources with other bus masters. The bus arbitration is enabled by software. After
enabling, pins P6.7 … P6.5 (BREQ
EBC. In Master Mode (default after reset) the HLDA
HLDA
is switched to input. This allows the direct connection of the slave controller to
, HLDA, HOLD) are automatically controlled by the
pin is an output. In Slave Mode pin
another master controller without glue logic.
Important timing characteristics of the external bus interface have been made
programmable (via registers TCONCSx/FCONCSx) to allow the user the adaption of a
wide range of different types of memories and external peripherals.
In addition, up to 4 independent address windows may be defined (via registers
ADDRSELx) which control the access to different resources with different bus
characteristics. These address windows are arranged hierarchically where window 4
overrides window 3, and window 2 overrides window 1. All accesses to locations not
covered by these 4 address windows are controlled by TCONCS0/FCONCS0. The
currently active window can generate a chip select signal.
The external bus timing is related to the rising edge of the reference clock output
CLKOUT. The external bus protocol is compatible with that of the standard C166 Family.
1) Bus modes are switched dynamically if several address windows with different mode settings are used.
Data Sheet24V1.2, 2006-03
XC167-16
Derivatives
Functional Description
The EBC also controls accesses to resources connected to the on-chip LXBus. The
LXBus is an internal representation of the external bus and allows accessing integrated
peripherals and modules in the same way as external components.
The TwinCAN module is connected and accessed via the LXBus.
Data Sheet25V1.2, 2006-03
XC167-16
Derivatives
Functional Description
3.3Central Processing Unit (CPU)
The main core of the CPU consists of a 5-stage execution pipeline with a 2-stage
instruction-fetch pipeline, a 16-bit arithmetic and logic unit (ALU), a 32-bit/40-bit multiply
and accumulate unit (MAC), a register-file providing three register banks, and dedicated
SFRs. The ALU features a multiply and divide unit, a bit-mask generator, and a barrel
shifter.
CPU
Prefetch
Branch
Multiply
Unit
Unit
FIFO
IDX0
IDX1
QX0
QX1
+/-
Unit
+/-
CSPIP
CPUCON1
CPUCON2
Return
Stack
QR0
QR1
+/-
MRW
MCW
MSW
IFU
DPP0
DPP1
DPP2
DPP3
Division Unit
M ultip ly U n it
MDC
PSW
VECSEG
TFR
Injection/
Exception
Handler
SPSEG
SP
STKOV
STKUN
Bit-Mask-Gen.
Barrel-Shifter
+/-
ADU
PMU
2-Stage
5-Stage
R15
R14
GPRs
GPRs
RF
Prefetch
Pipeline
Pipeline
CP
R15
R15
R14
R14
GPRs
R1
R1
R0
R1
R0
R0
PSRAM
Flash/ROM
DPRAM
IPIP
R15
R14
GPRs
R1
R0
MAC
MAH
MAL
MDH
ZEROS
MDL
ONES
ALU
Buffer
DMU
WB
DSRAM
EBC
Peripherals
mca04917_x.vsd
Figure 4CPU Block Diagram
Based on these hardware provisions, most of the XC167’s instructions can be executed
in just one machine cycle which requires 25 ns at 40 MHz CPU clock. For example, shift
Data Sheet26V1.2, 2006-03
XC167-16
Derivatives
Functional Description
and rotate instructions are always processed during one machine cycle independent of
the number of bits to be shifted. Also multiplication and most MAC instructions execute
in one single cycle. All multiple-cycle instructions have been optimized so that they can
be executed very fast as well: for example, a division algorithm is performed in 18 to 21
CPU cycles, depending on the data and division type. Four cycles are always visible, the
rest runs in the background. Another pipeline optimization, the branch target prediction,
allows eliminating the execution time of branch instructions if the prediction was correct.
The CPU has a register context consisting of up to three register banks with 16 wordwide
GPRs each at its disposal. The global register bank is physically allocated within the onchip DPRAM area. A Context Pointer (CP) register determines the base address of the
active global register bank to be accessed by the CPU at any time. The number of
register banks is only restricted by the available internal RAM space. For easy parameter
passing, a register bank may overlap others.
A system stack of up to 32 Kwords is provided as a storage for temporary data. The
system stack can be allocated to any location within the address space (preferably in the
on-chip RAM area), and it is accessed by the CPU via the stack pointer (SP) register.
Two separate SFRs, STKOV and STKUN, are implicitly compared against the stack
pointer value upon each stack access for the detection of a stack overflow or underflow.
The high performance offered by the hardware implementation of the CPU can efficiently
be utilized by a programmer via the highly efficient XC167 instruction set which includes
the following instruction classes:
•Standard Arithmetic Instructions
•DSP-Oriented Arithmetic Instructions
•Logical Instructions
•Boolean Bit Manipulation Instructions
•Compare and Loop Control Instructions
•Shift and Rotate Instructions
•Prioritize Instruction
•Data Movement Instructions
•System Stack Instructions
•Jump and Call Instructions
•Return Instructions
•System Control Instructions
•Miscellaneous Instructions
The basic instruction length is either 2 or 4 bytes. Possible operand types are bits, bytes
and words. A variety of direct, indirect or immediate addressing modes are provided to
specify the required operands.
Data Sheet27V1.2, 2006-03
XC167-16
Derivatives
Functional Description
3.4Interrupt System
With an interrupt response time of typically 8 CPU clocks (in case of internal program
execution), the XC167 is capable of reacting very fast to the occurrence of nondeterministic events.
The architecture of the XC167 supports several mechanisms for fast and flexible
response to service requests that can be generated from various sources internal or
external to the microcontroller. Any of these interrupt requests can be programmed to
being serviced by the Interrupt Controller or by the Peripheral Event Controller (PEC).
In contrast to a standard interrupt service where the current program execution is
suspended and a branch to the interrupt vector table is performed, just one cycle is
‘stolen’ from the current CPU activity to perform a PEC service. A PEC service implies a
single byte or word data transfer between any two memory locations with an additional
increment of either the PEC source, or the destination pointer, or both. An individual PEC
transfer counter is implicitly decremented for each PEC service except when performing
in the continuous transfer mode. When this counter reaches zero, a standard interrupt is
performed to the corresponding source related vector location. PEC services are very
well suited, for example, for supporting the transmission or reception of blocks of data.
The XC167 has 8 PEC channels each of which offers such fast interrupt-driven data
transfer capabilities.
A separate control register which contains an interrupt request flag, an interrupt enable
flag and an interrupt priority bitfield exists for each of the possible interrupt nodes. Via its
related register, each node can be programmed to one of sixteen interrupt priority levels.
Once having been accepted by the CPU, an interrupt service can only be interrupted by
a higher prioritized service request. For the standard interrupt processing, each of the
possible interrupt nodes has a dedicated vector location.
Fast external interrupt inputs are provided to service external interrupts with high
precision requirements. These fast interrupt inputs feature programmable edge
detection (rising edge, falling edge, or both edges).
Software interrupts are supported by means of the ‘TRAP’ instruction in combination with
an individual trap (interrupt) number.
Table 4 shows all of the possible XC167 interrupt sources and the corresponding
hardware-related interrupt flags, vectors, vector locations and trap (interrupt) numbers.
Note: Interrupt nodes which are not assigned to peripherals (unassigned nodes), may
be used to generate software controlled interrupt requests by setting the
respective interrupt request bit (xIR).
Data Sheet28V1.2, 2006-03
Table 4XC167 Interrupt Nodes
XC167-16
Derivatives
Functional Description
Source of Interrupt or PEC
Service Request
Control
Register
Vector
Location
CAPCOM Register 0CC1_CC0ICxx’0040
CAPCOM Register 1CC1_CC1ICxx’0044
CAPCOM Register 2CC1_CC2ICxx’0048
CAPCOM Register 3CC1_CC3ICxx’004C
CAPCOM Register 4CC1_CC4ICxx’0050
CAPCOM Register 5CC1_CC5ICxx’0054
CAPCOM Register 6CC1_CC6ICxx’0058
CAPCOM Register 7CC1_CC7ICxx’005C
CAPCOM Register 8CC1_CC8ICxx’0060
CAPCOM Register 9CC1_CC9ICxx’0064
CAPCOM Register 10CC1_CC10ICxx’0068
CAPCOM Register 11CC1_CC11ICxx’006C
CAPCOM Register 12CC1_CC12ICxx’0070
Trap
1)
H
H
H
H
H
H
H
H
H
H
H
H
H
Number
10H / 16
11H / 17
12H / 18
13H / 19
14H / 20
15H / 21
16H / 22
17H / 23
18H / 24
19H / 25
1AH / 26
1BH / 27
1CH / 28
D
D
D
D
D
D
D
D
D
D
D
D
D
CAPCOM Register 13CC1_CC13ICxx’0074
CAPCOM Register 14CC1_CC14ICxx’0078
CAPCOM Register 15CC1_CC15ICxx’007C
CAPCOM Register 16CC2_CC16ICxx’00C0
CAPCOM Register 17CC2_CC17ICxx’00C4
CAPCOM Register 18CC2_CC18ICxx’00C8
CAPCOM Register 19CC2_CC19ICxx’00CC
CAPCOM Register 20CC2_CC20ICxx’00D0
CAPCOM Register 21CC2_CC21ICxx’00D4
CAPCOM Register 22CC2_CC22ICxx’00D8
CAPCOM Register 23CC2_CC23ICxx’00DC
CAPCOM Register 24CC2_CC24ICxx’00E0
CAPCOM Register 25CC2_CC25ICxx’00E4
CAPCOM Register 26CC2_CC26ICxx’00E8
CAPCOM Register 27CC2_CC27ICxx’00EC
H
H
H
H
H
H
H
H
H
H
H
H
H
H
H
1DH / 29
1EH / 30
1FH / 31
30H / 48
31H / 49
32H / 50
33H / 51
34H / 52
35H / 53
36H / 54
37H / 55
38H / 56
39H / 57
3AH / 58
3BH / 59
D
D
D
D
D
D
D
D
D
D
D
D
D
D
D
CAPCOM Register 28CC2_CC28ICxx’00F0
H
3CH / 60
D
Data Sheet29V1.2, 2006-03
Table 4XC167 Interrupt Nodes (cont’d)
XC167-16
Derivatives
Functional Description
Source of Interrupt or PEC
Service Request
Control
Register
Vector
Location
CAPCOM Register 29CC2_CC29ICxx’0110
CAPCOM Register 30CC2_CC30ICxx’0114
CAPCOM Register 31CC2_CC31ICxx’0118
CAPCOM Timer 0CC1_T0ICxx’0080
CAPCOM Timer 1CC1_T1ICxx’0084
CAPCOM Timer 7CC2_T7ICxx’00F4
CAPCOM Timer 8CC2_T8ICxx’00F8
GPT1 Timer 2GPT12E_T2ICxx’0088
GPT1 Timer 3GPT12E_T3ICxx’008C
GPT1 Timer 4GPT12E_T4ICxx’0090
GPT2 Timer 5GPT12E_T5ICxx’0094
GPT2 Timer 6GPT12E_T6ICxx’0098
GPT2 CAPREL RegisterGPT12E_CRICxx’009C
Trap
1)
H
H
H
H
H
H
H
H
H
H
H
H
H
Number
44H / 68
45H / 69
46H / 70
20H / 32
21H / 33
3DH / 61
3EH / 62
22H / 34
23H / 35
24H / 36
25H / 37
26H / 38
27H / 39
D
D
D
D
D
D
D
D
D
D
D
D
D
A/D Conversion CompleteADC_CICxx’00A0
A/D Overrun ErrorADC_EICxx’00A4
ASC0 TransmitASC0_TICxx’00A8
ASC0 Transmit BufferASC0_TBICxx’011C
ASC0 ReceiveASC0_RICxx’00AC
ASC0 ErrorASC0_EICxx’00B0
ASC0 AutobaudASC0_ABICxx’017C
SSC0 TransmitSSC0_TICxx’00B4
SSC0 ReceiveSSC0_RICxx’00B8
SSC0 ErrorSSC0_EICxx’00BC
IIC Data Transfer EventIIC_DTICxx’0100
IIC Protocol EventIIC_PEICxx’0104
PLL/OWDPLLICxx’010C
ASC1 TransmitASC1_TICxx’0120
ASC1 Transmit BufferASC1_TBICxx’0178
H
H
H
H
H
H
H
H
H
H
H
H
H
H
H
28H / 40
29H / 41
2AH / 42
47H / 71
2BH / 43
2CH / 44
5FH / 95
2DH / 45
2EH / 46
2FH / 47
40H / 64
41H / 65
43H / 67
48H / 72
5EH / 94
D
D
D
D
D
D
D
D
D
D
D
D
D
D
D
ASC1 ReceiveASC1_RICxx’0124
ASC1 ErrorASC1_EICxx’0128
H
H
49H / 73
4AH / 74
D
D
Data Sheet30V1.2, 2006-03
Table 4XC167 Interrupt Nodes (cont’d)
XC167-16
Derivatives
Functional Description
Source of Interrupt or PEC
Service Request
Control
Register
Vector
Location
ASC1 AutobaudASC1_ABICxx’0108
End of PEC SubchannelEOPICxx’0130
CAPCOM6 Timer T12CCU6_T12ICxx’0134
CAPCOM6 Timer T13CCU6_T13ICxx’0138
CAPCOM6 EmergencyCCU6_EICxx’013C
CAPCOM6CCU6_ICxx’0140
SSC1 TransmitSSC1_TICxx’0144
SSC1 ReceiveSSC1_RICxx’0148
SSC1 ErrorSSC1_EICxx’014C
CAN0CAN_0ICxx’0150
CAN1CAN_1ICxx’0154
CAN2CAN_2ICxx’0158
CAN3CAN_3ICxx’015C
Trap
1)
H
H
H
H
H
H
H
H
H
H
H
H
H
Number
42H / 66
4CH / 76
4DH / 77
4EH / 78
4FH / 79
50H / 80
51H / 81
52H / 82
53H / 83
54H / 84
55H / 85
56H / 86
57H / 87
D
D
D
D
D
D
D
D
D
D
D
D
D
CAN4CAN_4ICxx’0164
CAN5CAN_5ICxx’0168
CAN6CAN_6ICxx’016C
CAN7CAN_7ICxx’0170
RTCRTC_ICxx’0174
Unassigned node–xx’012C
Unassigned node–xx’00FC
Unassigned node–xx’0160
1) Register VECSEG defines the segment where the vector table is located to.
Bitfield VECSC in register CPUCON1 defines the distance between two adjacent vectors. This table
represents the default setting, with a distance of 4 (two words) between two vectors.
H
H
H
H
H
H
H
H
59H / 89
5AH / 90
5BH / 91
5CH / 92
5DH / 93
4BH / 75
3FH / 63
58H / 88
D
D
D
D
D
D
D
D
Data Sheet31V1.2, 2006-03
XC167-16
Derivatives
Functional Description
The XC167 also provides an excellent mechanism to identify and to process exceptions
or error conditions that arise during run-time, so-called ‘Hardware Traps’. Hardware
traps cause immediate non-maskable system reaction which is similar to a standard
interrupt service (branching to a dedicated vector table location). The occurrence of a
hardware trap is additionally signified by an individual bit in the trap flag register (TFR).
Except when another higher prioritized trap service is in progress, a hardware trap will
interrupt any actual program execution. In turn, hardware trap services can normally not
be interrupted by standard or PEC interrupts.
Table 5 shows all of the possible exceptions or error conditions that can arise during run-
time:
Table 5Hardware Trap Summary
Exception ConditionTrap
Flag
Reset Functions:
–
•Hardware Reset
•Software Reset
•Watchdog Timer
Overflow
Class A Hardware Traps:
•Non-Maskable Interrupt
•Stack Overflow
•Stack Underflow
•Software Break
NMI
STKOF
STKUF
SOFTBRK
Class B Hardware Traps:
•Undefined Opcode
•PMI Access Error
•Protected Instruction
UNDOPC
PACER
PRTFLT
Fault
•Illegal Word Operand
ILLOPA
Access
Trap
Vector
RESET
RESET
RESET
NMITRAP
STOTRAP
STUTRAP
SBRKTRAP
BTRAP
BTRAP
BTRAP
BTRAP
Vector
Location
xx’0000
xx’0000
xx’0000
xx’0008
xx’0010
xx’0018
xx’0020
xx’0028
xx’0028
xx’0028
xx’0028
H
H
H
H
H
H
H
H
H
H
H
Trap
1)
Number
00
00
00
02
04
06
08
0A
0A
0A
0A
Trap
Priority
H
H
H
H
H
H
H
H
H
H
H
III
III
III
II
II
II
II
I
I
I
I
Reserved––[2C
Software Traps
––Any
•TRAP Instruction
- 3CH][0BH -
H
[xx’0000
xx’01FC
–
0F
]
H
Any
[00
-
H
]
H
7F
-
H
]
H
Current
CPU
Priority
in steps of
4
H
1) Register VECSEG defines the segment where the vector table is located to.
Data Sheet32V1.2, 2006-03
XC167-16
Derivatives
Functional Description
3.5On-Chip Debug Support (OCDS)
The On-Chip Debug Support system provides a broad range of debug and emulation
features built into the XC167. The user software running on the XC167 can thus be
debugged within the target system environment.
The OCDS is controlled by an external debugging device via the debug interface,
consisting of the IEEE-1149-conforming JTAG port and a break interface. The debugger
controls the OCDS via a set of dedicated registers accessible via the JTAG interface.
Additionally, the OCDS system can be controlled by the CPU, e.g. by a monitor program.
An injection interface allows the execution of OCDS-generated instructions by the CPU.
Multiple breakpoints can be triggered by on-chip hardware, by software, or by an
external trigger input. Single stepping is supported as well as the injection of arbitrary
instructions and read/write access to the complete internal address space. A breakpoint
trigger can be answered with a CPU-halt, a monitor call, a data transfer, or/and the
activation of an external signal.
Tracing data can be obtained via the JTAG interface or via the external bus interface for
increased performance.
The debug interface uses a set of 6 interface signals (4 JTAG lines, 2 break lines) to
communicate with external circuitry. These interface signals use dedicated pins.
Complete system emulation is supported by the New Emulation Technology (NET)
interface.
Data Sheet33V1.2, 2006-03
XC167-16
Derivatives
Functional Description
3.6Capture/Compare Units (CAPCOM1/2)
The CAPCOM units support generation and control of timing sequences on up to
32 channels with a maximum resolution of 1 system clock cycle (8 cycles in staggered
mode). The CAPCOM units are typically used to handle high speed I/O tasks such as
pulse and waveform generation, pulse width modulation (PMW), Digital to Analog (D/A)
conversion, software timing, or time recording relative to external events.
Four 16-bit timers (T0/T1, T7/T8) with reload registers provide two independent time
bases for each capture/compare register array.
The input clock for the timers is programmable to several prescaled values of the internal
system clock, or may be derived from an overflow/underflow of timer T6 in module GPT2.
This provides a wide range of variation for the timer period and resolution and allows
precise adjustments to the application specific requirements. In addition, external count
inputs for CAPCOM timers T0 and T7 allow event scheduling for the capture/compare
registers relative to external events.
Both of the two capture/compare register arrays contain 16 dual purpose
capture/compare registers, each of which may be individually allocated to either
CAPCOM timer T0 or T1 (T7 or T8, respectively), and programmed for capture or
compare function.
All registers of each module have each one port pin associated with it which serves as
an input pin for triggering the capture function, or as an output pin to indicate the
occurrence of a compare event.
Table 6Compare Modes (CAPCOM1/2)
Compare ModesFunction
Mode 0Interrupt-only compare mode;
several compare interrupts per timer period are possible
Mode 1Pin toggles on each compare match;
several compare events per timer period are possible
Mode 2Interrupt-only compare mode;
only one compare interrupt per timer period is generated
Mode 3Pin set ‘1’ on match; pin reset ‘0’ on compare timer overflow;
only one compare event per timer period is generated
Double Register
Mode
Single Event ModeGenerates single edges or pulses;
Data Sheet34V1.2, 2006-03
Two registers operate on one pin;
pin toggles on each compare match;
several compare events per timer period are possible
can be used with any compare mode
XC167-16
Derivatives
Functional Description
When a capture/compare register has been selected for capture mode, the current
contents of the allocated timer will be latched (‘captured’) into the capture/compare
register in response to an external event at the port pin which is associated with this
register. In addition, a specific interrupt request for this capture/compare register is
generated. Either a positive, a negative, or both a positive and a negative external signal
transition at the pin can be selected as the triggering event.
The contents of all registers which have been selected for one of the five compare modes
are continuously compared with the contents of the allocated timers.
When a match occurs between the timer value and the value in a capture/compare
register, specific actions will be taken based on the selected compare mode.
Data Sheet35V1.2, 2006-03
f
f
Reload Reg.
T0REL/T7REL
XC167-16
Derivatives
Functional Description
CC
T0IN/T7IN
T6OUF
CCxIO
CCxIO
T0/T7
Input
Control
Mode
Control
(Capture
or
Compare)
Timer T0/T7
Sixteen
16-bit
Capture/
Compare
Registers
T0IRQ,
T7IRQ
CCxIRQ
CCxIRQ
CCxIO
CC
T6OUF
T1/T8
Input
Control
Timer T1/T8
CCxIRQ
T1IRQ,
T8IRQ
Reload Reg.
T1REL/T8REL
CAPCOM1 provides channels x = 0 … 15,
CAPCOM2 provides channels x = 16 … 31.
(see signals CCxIO and CCxIRQ)
MCB05569
Figure 5CAPCOM1/2 Unit Block Diagram
Data Sheet36V1.2, 2006-03
XC167-16
Derivatives
Functional Description
3.7The Capture/Compare Unit CAPCOM6
The CAPCOM6 unit supports generation and control of timing sequences on up to three
16-bit capture/compare channels plus one independent 10-bit compare channel.
In compare mode the CAPCOM6 unit provides two output signals per channel which
have inverted polarity and non-overlapping pulse transitions (deadtime control). The
compare channel can generate a single PWM output signal and is further used to
modulate the capture/compare output signals.
In capture mode the contents of compare timer T12 is stored in the capture registers
upon a signal transition at pins CCx.
Compare timers T12 (16-bit) and T13 (10-bit) are free running timers which are clocked
by the prescaled system clock.
f
f
CPU
CPU
Period Register
T12P
Offset Register
T12OF
Compare
Timer T12
Prescaler
Prescaler
16-bit
Control Register
CTCON
Compare
Timer T13
10-bit
Period Register
T13P
Mode
Select Register
CC6MSEL
CC Channel 0
CC60
CC Channel 1
Control
CC61
CC Channel 2
CC62
Compare Register
CMP13
Trap Register
Port
Control
Logic
Block
Commutation
Control
CC6MCON.H
CTRAP
CC60
COUT60
CC61
COUT61
CC62
COUT62
COUT63
CC6POS0
CC6POS1
CC6POS2
The timer registers (T12, T13) are not directly accessible.
The period and offset registers are loading a value into the timer registers.
MCB04109
Figure 6CAPCOM6 Block Diagram
For motor control applications both subunits may generate versatile multichannel PWM
signals which are basically either controlled by compare timer T12 or by a typical hall
sensor pattern at the interrupt inputs (block commutation).
Data Sheet37V1.2, 2006-03
XC167-16
Derivatives
Functional Description
3.8General Purpose Timer (GPT12E) Unit
The GPT12E unit represents a very flexible multifunctional timer/counter structure which
may be used for many different time related tasks such as event timing and counting,
pulse width and duty cycle measurements, pulse generation, or pulse multiplication.
The GPT12E unit incorporates five 16-bit timers which are organized in two separate
modules, GPT1 and GPT2. Each timer in each module may operate independently in a
number of different modes, or may be concatenated with another timer of the same
module.
Each of the three timers T2, T3, T4 of module GPT1 can be configured individually for
one of four basic modes of operation, which are Timer, Gated Timer, Counter, and
Incremental Interface Mode. In Timer Mode, the input clock for a timer is derived from
the system clock, divided by a programmable prescaler, while Counter Mode allows a
timer to be clocked in reference to external events.
Pulse width or duty cycle measurement is supported in Gated Timer Mode, where the
operation of a timer is controlled by the ‘gate’ level on an external input pin. For these
purposes, each timer has one associated port pin (TxIN) which serves as gate or clock
input. The maximum resolution of the timers in module GPT1 is 4 system clock cycles.
The count direction (up/down) for each timer is programmable by software or may
additionally be altered dynamically by an external signal on a port pin (TxEUD) to
facilitate e.g. position tracking.
In Incremental Interface Mode the GPT1 timers (T2, T3, T4) can be directly connected
to the incremental position sensor signals A and B via their respective inputs TxIN and
TxEUD. Direction and count signals are internally derived from these two input signals,
so the contents of the respective timer Tx corresponds to the sensor position. The third
position sensor signal TOP0 can be connected to an interrupt input.
Timer T3 has an output toggle latch (T3OTL) which changes its state on each timer
overflow/underflow. The state of this latch may be output on pin T3OUT e.g. for time out
monitoring of external hardware components. It may also be used internally to clock
timers T2 and T4 for measuring long time periods with high resolution.
In addition to their basic operating modes, timers T2 and T4 may be configured as reload
or capture registers for timer T3. When used as capture or reload registers, timers T2
and T4 are stopped. The contents of timer T3 is captured into T2 or T4 in response to a
signal at their associated input pins (TxIN). Timer T3 is reloaded with the contents of T2
or T4 triggered either by an external signal or by a selectable state transition of its toggle
latch T3OTL. When both T2 and T4 are configured to alternately reload T3 on opposite
state transitions of T3OTL with the low and high times of a PWM signal, this signal can
be constantly generated without software intervention.
Data Sheet38V1.2, 2006-03
f
T3CON.BPS1
XC167-16
Derivatives
Functional Description
GPT
2n:1
Basic Clock
Interrupt
T2IN
T2EUD
T2
Mode
Control
Aux. Timer T2
U/D
Reload
Request
(T2IRQ)
Capture
Interrupt
Request
(T3IRQ)
T3
T3IN
T3EUD
Mode
Control
Core Timer T3
U/D
T3OTL
Toggle
Latch
T3OUT
Capture
Reload
T4IN
T4EUD
T4
Mode
Control
Aux. Timer T4
U/D
Interrupt
Request
(T4IRQ)
MCA05563
Figure 7Block Diagram of GPT1
With its maximum resolution of 2 system clock cycles, the GPT2 module provides
precise event control and time measurement. It includes two timers (T5, T6) and a
capture/reload register (CAPREL). Both timers can be clocked with an input clock which
is derived from the CPU clock via a programmable prescaler or with external signals. The
Data Sheet39V1.2, 2006-03
XC167-16
Derivatives
Functional Description
count direction (up/down) for each timer is programmable by software or may
additionally be altered dynamically by an external signal on a port pin (TxEUD).
Concatenation of the timers is supported via the output toggle latch (T6OTL) of timer T6,
which changes its state on each timer overflow/underflow.
The state of this latch may be used to clock timer T5, and/or it may be output on pin
T6OUT. The overflows/underflows of timer T6 can additionally be used to clock the
CAPCOM1/2 timers, and to cause a reload from the CAPREL register.
The CAPREL register may capture the contents of timer T5 based on an external signal
transition on the corresponding port pin (CAPIN), and timer T5 may optionally be cleared
after the capture procedure. This allows the XC167 to measure absolute time differences
or to perform pulse multiplication without software overhead.
The capture trigger (timer T5 to CAPREL) may also be generated upon transitions of
GPT1 timer T3’s inputs T3IN and/or T3EUD. This is especially advantageous when T3
operates in Incremental Interface Mode.
Data Sheet40V1.2, 2006-03
f
T6CON.BPS2
XC167-16
Derivatives
Functional Description
GPT
2n:1
Basic Clock
Interrupt
GPT2 Timer T5
Request
(T5IR)
T5
T5IN
Mode
Control
CAPIN
T3IN/
T3EUD
CAPREL
Mode
Control
U/D
Clear
Capture
Reload
Clear
GPT2 CAPREL
Interrupt
Request
(CRIR)
Interrupt
Request
(T6IR)
Toggle
FF
T6IN
T6
Mode
Control
GPT2 Timer T6T6OTL
U/D
T6OUT
T6OUF
MCA05564
Figure 8Block Diagram of GPT2
Data Sheet41V1.2, 2006-03
XC167-16
f
f
Derivatives
Functional Description
3.9Real Time Clock
The Real Time Clock (RTC) module of the XC167 is directly clocked via a separate clock
driver either with the on-chip auxiliary oscillator frequency (
prescaled on-chip main oscillator frequency (
f
RTC
= f
/32). It is therefore independent
OSCm
from the selected clock generation mode of the XC167.
The RTC basically consists of a chain of divider blocks:
•a selectable 8:1 divider (on - off)
•the reloadable 16-bit timer T14
•the 32-bit RTC timer block (accessible via registers RTCH and RTCL), made of:
– a reloadable 10-bit timer
– a reloadable 6-bit timer
– a reloadable 6-bit timer
– a reloadable 10-bit timer
f
RTC
= f
) or with the
OSCa
All timers count up. Each timer can generate an interrupt request. All requests are
combined to a common node request.
RT C
:
8
MUX
RTCINT
Interrupt Sub Node
RUN
PRE
CNT
INT0
CNT
INT1
CNT
INT2
CNT
INT3
REL-Register
T14REL10 Bits6 Bits6 Bits10 Bits
CNT
T14-Register
CNT-Register
10 Bits6 Bits6 Bits10 BitsT14
MCB05568
Figure 9RTC Block Diagram
Note: The registers associated with the RTC are not affected by a reset in order to
maintain the correct system time even when intermediate resets are executed.
Data Sheet42V1.2, 2006-03
XC167-16
Derivatives
Functional Description
The RTC module can be used for different purposes:
•System clock to determine the current time and date,
optionally during idle mode, sleep mode, and power down mode
•Cyclic time based interrupt, to provide a system time tick independent of CPU
frequency and other resources, e.g. to wake up regularly from idle mode.
•48-bit timer for long term measurements (maximum timespan is > 100 years).
•Alarm interrupt for wake-up on a defined time
Data Sheet43V1.2, 2006-03
XC167-16
Derivatives
Functional Description
3.10A/D Converter
For analog signal measurement, a 10-bit A/D converter with 16 multiplexed input
channels and a sample and hold circuit has been integrated on-chip. It uses the method
of successive approximation. The sample time (for loading the capacitors) and the
conversion time is programmable (in two modes) and can thus be adjusted to the
external circuitry. The A/D converter can also operate in 8-bit conversion mode, where
the conversion time is further reduced.
Overrun error detection/protection is provided for the conversion result register
(ADDAT): either an interrupt request will be generated when the result of a previous
conversion has not been read from the result register at the time the next conversion is
complete, or the next conversion is suspended in such a case until the previous result
has been read.
For applications which require less analog input channels, the remaining channel inputs
can be used as digital input port pins.
The A/D converter of the XC167 supports four different conversion modes. In the
standard Single Channel conversion mode, the analog level on a specified channel is
sampled once and converted to a digital result. In the Single Channel Continuous mode,
the analog level on a specified channel is repeatedly sampled and converted without
software intervention. In the Auto Scan mode, the analog levels on a prespecified
number of channels are sequentially sampled and converted. In the Auto Scan
Continuous mode, the prespecified channels are repeatedly sampled and converted. In
addition, the conversion of a specific channel can be inserted (injected) into a running
sequence without disturbing this sequence. This is called Channel Injection Mode.
The Peripheral Event Controller (PEC) may be used to automatically store the
conversion results into a table in memory for later evaluation, without requiring the
overhead of entering and exiting interrupt routines for each data transfer.
After each reset and also during normal operation the ADC automatically performs
calibration cycles. This automatic self-calibration constantly adjusts the converter to
changing operating conditions (e.g. temperature) and compensates process variations.
These calibration cycles are part of the conversion cycle, so they do not affect the normal
operation of the A/D converter.
In order to decouple analog inputs from digital noise and to avoid input trigger noise
those pins used for analog input can be disconnected from the digital IO or input stages
under software control. This can be selected for each pin separately via register P5DIDIS
(Port 5 Digital Input Disable).
The Auto-Power-Down feature of the A/D converter minimizes the power consumption
when no conversion is in progress.
Data Sheet44V1.2, 2006-03
XC167-16
Derivatives
Functional Description
3.11Asynchronous/Synchronous Serial Interfaces (ASC0/ASC1)
The Asynchronous/Synchronous Serial Interfaces ASC0/ASC1 (USARTs) provide serial
communication with other microcontrollers, processors, terminals or external peripheral
components. They are upward compatible with the serial ports of the Infineon 8-bit
microcontroller families and support full-duplex asynchronous communication and halfduplex synchronous communication. A dedicated baud rate generator with a fractional
divider precisely generates all standard baud rates without oscillator tuning. For
transmission, reception, error handling, and baudrate detection 5 separate interrupt
vectors are provided.
In asynchronous mode, 8- or 9-bit data frames (with optional parity bit) are transmitted
or received, preceded by a start bit and terminated by one or two stop bits. For
multiprocessor communication, a mechanism to distinguish address from data bytes has
been included (8-bit data plus wake-up bit mode). IrDA data transmissions up to
115.2 kbit/s with fixed or programmable IrDA pulse width are supported.
In synchronous mode, bytes (8 bits) are transmitted or received synchronously to a shift
clock which is generated by the ASC0/1. The LSB is always shifted first.
In both modes, transmission and reception of data is FIFO-buffered. An autobaud
detection unit allows to detect asynchronous data frames with its baudrate and mode
with automatic initialization of the baudrate generator and the mode control bits.
A number of optional hardware error detection capabilities has been included to increase
the reliability of data transfers. A parity bit can automatically be generated on
transmission or be checked on reception. Framing error detection allows to recognize
data frames with missing stop bits. An overrun error will be generated, if the last
character received has not been read out of the receive buffer register at the time the
reception of a new character is complete.
Summary of Features
•Full-duplex asynchronous operating modes
– 8- or 9-bit data frames, LSB first, one or two stop bits, parity generation/checking
– Baudrate from 2.5 Mbit/s to 0.6 bit/s (@ 40 MHz)
– Multiprocessor mode for automatic address/data byte detection
– Support for IrDA data transmission/reception up to max. 115.2 kbit/s (@ 40 MHz)
– Loop-back capability
– Auto baudrate detection
•Half-duplex 8-bit synchronous operating mode at 5 Mbit/s to 406.9 bit/s (@ 40 MHz)
•Buffered transmitter/receiver with FIFO support (8 entries per direction)
•Loop-back option available for testing purposes
•Interrupt generation on transmitter buffer empty condition, last bit transmitted
condition, receive buffer full condition, error condition (frame, parity, overrun error),
start and end of an autobaud detection
Data Sheet45V1.2, 2006-03
XC167-16
Derivatives
Functional Description
3.12High Speed Synchronous Serial Channels (SSC0/SSC1)
The High Speed Synchronous Serial Channels SSC0/SSC1 support full-duplex and halfduplex synchronous communication. It may be configured so it interfaces with serially
linked peripheral components, full SPI functionality is supported.
A dedicated baud rate generator allows to set up all standard baud rates without
oscillator tuning. For transmission, reception and error handling three separate interrupt
vectors are provided.
The SSC transmits or receives characters of 2 … 16 bits length synchronously to a shift
clock which can be generated by the SSC (master mode) or by an external master (slave
mode). The SSC can start shifting with the LSB or with the MSB and allows the selection
of shifting and latching clock edges as well as the clock polarity.
A number of optional hardware error detection capabilities has been included to increase
the reliability of data transfers. Transmit error and receive error supervise the correct
handling of the data buffer. Phase error and baudrate error detect incorrect serial data.
Summary of Features
•Master or Slave mode operation
•Full-duplex or Half-duplex transfers
•Baudrate generation from 20 Mbit/s to 305.18 bit/s (@ 40 MHz)
•Flexible data format
– Programmable number of data bits: 2 to 16 bits
– Programmable shift direction: LSB-first or MSB-first
– Programmable clock polarity: idle low or idle high
– Programmable clock/data phase: data shift with leading or trailing clock edge
•Loop back option available for testing purposes
•Interrupt generation on transmitter buffer empty condition, receive buffer full
condition, error condition (receive, phase, baudrate, transmit error)
•Three pin interface with flexible SSC pin configuration
Data Sheet46V1.2, 2006-03
XC167-16
Derivatives
Functional Description
3.13TwinCAN Module
The integrated TwinCAN module handles the completely autonomous transmission and
reception of CAN frames in accordance with the CAN specification V2.0 part B (active),
i.e. the on-chip TwinCAN module can receive and transmit standard frames with 11-bit
identifiers as well as extended frames with 29-bit identifiers.
Two Full-CAN nodes share the TwinCAN module’s resources to optimize the CAN bus
traffic handling and to minimize the CPU load. The module provides up to 32 message
objects, which can be assigned to one of the CAN nodes and can be combined to FIFOstructures. Each object provides separate masks for acceptance filtering.
The flexible combination of Full-CAN functionality and FIFO architecture reduces the
efforts to fulfill the real-time requirements of complex embedded control applications.
Improved CAN bus monitoring functionality as well as the number of message objects
permit precise and comfortable CAN bus traffic handling.
Gateway functionality allows automatic data exchange between two separate CAN bus
systems, which reduces CPU load and improves the real time behavior of the entire
system.
The bit timing for both CAN nodes is derived from the master clock and is programmable
up to a data rate of 1 Mbit/s. Each CAN node uses two pins of Port 4, Port 7, or Port 9 to
interface to an external bus transceiver. The interface pins are assigned via software.
TwinCAN Module Kernel
Clock
Control
Address
Decoder
f
CAN
CAN
Node A
Message
CAN
Node B
Object
Buffer
TxDCA
RxDCA
Port
Control
TxDCB
Interrupt
Control
TwinCAN Control
RxDCB
MCB05567
Figure 10TwinCAN Module Block Diagram
Data Sheet47V1.2, 2006-03
XC167-16
Derivatives
Functional Description
Summary of Features
•CAN functionality according to CAN specification V2.0 B active
•Data transfer rate up to 1 Mbit/s
•Flexible and powerful message transfer control and error handling capabilities
•Full-CAN functionality and Basic CAN functionality for each message object
•32 flexible message objects
– Assignment to one of the two CAN nodes
– Configuration as transmit object or receive object
– Concatenation to a 2-, 4-, 8-, 16-, or 32-message buffer with FIFO algorithm
– Handling of frames with 11-bit or 29-bit identifiers
– Individual programmable acceptance mask register for filtering for each object
– Monitoring via a frame counter
– Configuration for Remote Monitoring Mode
•Up to eight individually programmable interrupt nodes can be used
•CAN Analyzer Mode for bus monitoring is implemented
Note: When a CAN node has the interface lines assigned to Port 4, the segment address
output on Port 4 must be limited. CS
of addressable external memory.
lines can be used to increase the total amount
3.14IIC Bus Module
The integrated IIC Bus Module handles the transmission and reception of frames over
the two-line IIC bus in accordance with the IIC Bus specification. The IIC Module can
operate in slave mode, in master mode or in multi-master mode. It can receive and
transmit data using 7-bit or 10-bit addressing. Up to 4 send/receive data bytes can be
stored in the extended buffers.
Several physical interfaces (port pins) can be established under software control. Data
can be transferred at speeds up to 400 kbit/s.
Two interrupt nodes dedicated to the IIC module allow efficient interrupt service and also
support operation via PEC transfers.
Note: The port pins associated with the IIC interfaces must be switched to open drain
mode, as required by the IIC specification.
Data Sheet48V1.2, 2006-03
XC167-16
Derivatives
Functional Description
3.15Watchdog Timer
The Watchdog Timer represents one of the fail-safe mechanisms which have been
implemented to prevent the controller from malfunctioning for longer periods of time.
The Watchdog Timer is always enabled after a reset of the chip, and can be disabled
until the EINIT instruction has been executed (compatible mode), or it can be disabled
and enabled at any time by executing instructions DISWDT and ENWDT (enhanced
mode). Thus, the chip’s start-up procedure is always monitored. The software has to be
designed to restart the Watchdog Timer before it overflows. If, due to hardware or
software related failures, the software fails to do so, the Watchdog Timer overflows and
generates an internal hardware reset and pulls the RSTOUT
external hardware components to be reset.
The Watchdog Timer is a 16-bit timer, clocked with the system clock divided by
2/4/128/256. The high byte of the Watchdog Timer register can be set to a prespecified
reload value (stored in WDTREL) in order to allow further variation of the monitored time
interval. Each time it is serviced by the application software, the high byte of the
Watchdog Timer is reloaded and the low byte is cleared. Thus, time intervals between
13 µs and 419 ms can be monitored (@ 40 MHz).
The default Watchdog Timer interval after reset is 3.28 ms (@ 40 MHz).
pin low in order to allow
Data Sheet49V1.2, 2006-03
XC167-16
Derivatives
Functional Description
3.16Clock Generation
The Clock Generation Unit uses a programmable on-chip PLL with multiple prescalers
to generate the clock signals for the XC167 with high flexibility. The master clock
the reference clock signal, and is used for TwinCAN and is output to the external system.
The CPU clock
directly (1:1) or via a 2:1 prescaler (
f
and the system clock f
CPU
f
SYS
= f
are derived from the master clock either
SYS
= fMC / 2). See also Section 4.4.1.
CPU
The on-chip oscillator can drive an external crystal or accepts an external clock signal.
The oscillator clock frequency can be multiplied by the on-chip PLL (by a programmable
factor) or can be divided by a programmable prescaler factor.
If the bypass mode is used (direct drive or prescaler) the PLL can deliver an independent
clock to monitor the clock signal generated by the on-chip oscillator. This PLL clock is
independent from the XTAL1 clock. When the expected oscillator clock transitions are
missing the Oscillator Watchdog (OWD) activates the PLL Unlock/OWD interrupt node
and supplies the CPU with an emergency clock, the PLL clock signal. Under these
circumstances the PLL will oscillate with its basic frequency.
f
MC
is
The oscillator watchdog can be disabled by switching the PLL off. This reduces power
consumption, but also no interrupt request will be generated in case of a missing
oscillator clock.
Note: At the end of an external reset (EA
via hardware by (externally) pulling the RD
= ‘0’) the oscillator watchdog may be disabled
line low upon a reset, similar to the
standard reset configuration.
3.17Parallel Ports
The XC167 provides up to 103 I/O lines which are organized into nine input/output ports
and one input port. All port lines are bit-addressable, and all input/output lines are
individually (bit-wise) programmable as inputs or outputs via direction registers. The I/O
ports are true bidirectional ports which are switched to high impedance state when
configured as inputs. The output drivers of some I/O ports can be configured (pin by pin)
for push/pull operation or open-drain operation via control registers. During the internal
reset, all port pins are configured as inputs (except for pin RSTOUT
The edge characteristics (shape) and driver characteristics (output current) of the port
drivers can be selected via registers POCONx.
The input threshold of some ports is selectable (TTL or CMOS like), where the special
CMOS like input threshold reduces noise sensitivity due to the input hysteresis. The
input threshold may be selected individually for each byte of the respective ports.
).
All port lines have programmable alternate input or output functions associated with
them. All port lines that are not used for these alternate functions may be used as general
purpose IO lines.
Data Sheet50V1.2, 2006-03
Table 7Summary of the XC167’s Parallel Ports
PortControlAlternate Functions
PORT0Pad driversAddress/Data lines or data lines
PORT1Pad driversAddress lines
2)
Capture inputs or compare outputs,
Serial interface lines
XC167-16
Derivatives
Functional Description
1)
Port 2Pad drivers,
Open drain,
Input threshold
Port 3Pad drivers,
Open drain,
Input threshold
Port 4Pad drivers,
Open drain,
Capture inputs or compare outputs,
Timer control signal,
Fast external interrupt inputs
Timer control signals, serial interface lines,
Optional bus control signal BHE
/WRH,
System clock output CLKOUT (or FOUT)
Segment address lines
CAN interface lines
3)
4)
Input threshold
Port 5–Analog input channels to the A/D converter,
Timer control signals
Port 6Open drain,
Input threshold
Capture inputs or compare outputs,
Bus arbitration signals BREQ
, HLDA, HOLD,
Optional chip select signals
Port 7Open drain,
Input threshold
Port 9Pad drivers,
Open drain,
Input threshold
Capture inputs or compare outputs,
CAN interface lines
4)
Capture inputs or compare outputs
CAN interface lines
IIC bus interface lines
4)
,
4)
Port 20Pad drivers,
Open drain
Bus control signals RD, WR/WRL, READY, ALE,
External access enable pin EA
,
Reset indication output RSTOUT
1) For multiplexed bus cycles.
2) For demultiplexed bus cycles.
3) For more than 64 Kbytes of external resources.
4) Can be assigned by software.
Data Sheet51V1.2, 2006-03
XC167-16
Derivatives
Functional Description
3.18Power Management
The XC167 provides several means to control the power it consumes either at a given
time or averaged over a certain timespan. Three mechanisms can be used (partly in
parallel):
•Power Saving Modes switch the XC167 into a special operating mode (control via
instructions).
Idle Mode stops the CPU while the peripherals can continue to operate.
Sleep Mode and Power Down Mode stop all clock signals and all operation (RTC may
optionally continue running). Sleep Mode can be terminated by external interrupt
signals.
•Clock Generation Management controls the distribution and the frequency of
internal and external clock signals. While the clock signals for currently inactive parts
of logic are disabled automatically, the user can reduce the XC167’s CPU clock
frequency which drastically reduces the consumed power.
External circuitry can be controlled via the programmable frequency output FOUT.
•Peripheral Management permits temporary disabling of peripheral modules (control
via register SYSCON3). Each peripheral can separately be disabled/enabled.
The on-chip RTC supports intermittent operation of the XC167 by generating cyclic
wake-up signals. This offers full performance to quickly react on action requests while
the intermittent sleep phases greatly reduce the average power consumption of the
system.
Data Sheet52V1.2, 2006-03
XC167-16
Derivatives
Functional Description
3.19Instruction Set Summary
Table 8 lists the instructions of the XC167 in a condensed way.
The various addressing modes that can be used with a specific instruction, the operation
of the instructions, parameters for conditional execution of instructions, and the opcodes
for each instruction can be found in the “Instruction Set Manual”.
This document also provides a detailed description of each instruction.
Table 8Instruction Set Summary
MnemonicDescriptionBytes
ADD(B)Add word (byte) operands2 / 4
ADDC(B)Add word (byte) operands with Carry2 / 4
SUB(B)Subtract word (byte) operands2 / 4
SUBC(B)Subtract word (byte) operands with Carry2 / 4
MUL(U)(Un)Signed multiply direct GPR by direct GPR
(16- × 16-bit)
DIV(U)(Un)Signed divide register MDL by direct GPR (16-/16-bit) 2
DIVL(U)(Un)Signed long divide reg. MD by direct GPR (32-/16-bit) 2
1) Moisture Sensitivity Level (MSL) 3, conforming to Jedec J-STD-020C for 240 °C.
Note: Stresses above those listed under “Absolute Maximum Ratings” may cause
permanent damage to the device. This is a stress rating only and functional
operation of the device at these or any other conditions above those indicated in
the operational sections of this specification is not implied. Exposure to absolute
maximum rating conditions for extended periods may affect device reliability.
During absolute maximum rating overload conditions (
voltage on
V
pins with respect to ground (VSS) must not exceed the values
DDP
V
IN
> V
or VIN < VSS) the
DDP
defined by the absolute maximum ratings.
Data Sheet56V1.2, 2006-03
XC167-16
Derivatives
Electrical Parameters
Operating Conditions
The following operating conditions must not be exceeded to ensure correct operation of
the XC167. All parameters specified in the following sections refer to these operating
conditions, unless otherwise noticed.
Table 10Operating Condition Parameters
ParameterSymbolLimit ValuesUnitNotes
Min.Max.
Digital supply voltage for
V
the core
Digital supply voltage for
V
IO pads
Supply Voltage Difference ∆
Digital ground voltageV
Overload current
Overload current coupling
factor for analog inputs
Overload current coupling
factor for digital I/O pins
Absolute sum of overload
I
K
6)
K
6)
Σ|
currents
External Load
C
Capacitance
DDI
DDP
V
SS
OV
DD
2.352.7VActive mode,
4.45.5VActive mode2)
-0.5–VV
0VReference voltage
-55mAPer IO pin
-25mAPer analog input
OVA
OVD
I
OV
L
–1.0 × 10-4–IOV > 0
–1.5 × 10
-3
–5.0 × 10-3–IOV > 0
–1.0 × 10
-2
|–50mA
–50pFPin drivers in
f
= f
CPU
- V
DDP
4)5)
pin
–IOV < 0
–IOV < 0
5)
default mode
CPUmax
1)2)
3)
DDI
4)5)
7)
Ambient temperatureT
1) f
2) External circuitry must guarantee low level at the RSTIN
3) This limitation must be fulfilled under all operating conditions including power-ramp-up, power-ramp-down,
4) Overload conditions occur if the standard operating conditions are exceeded, i.e. the voltage on any pin
5) Not subject to production test - verified by design/characterization.
= 40 MHz for devices marked … 40F, f
CPUmax
reached their operating range.
and power-save modes.
exceeds the specified range:
input overload currents on all pins may not exceed 50 mA. The supply voltages must remain within the
specified limits.
Proper operation is not guaranteed if overload conditions occur on functional pins such as XTAL1, RD
etc.
A
V
> V
OV
DDP
––°Csee Table 1
= 20 MHz for devices marked … 20F.
CPUmax
pin at least until both power supply voltages have
+ 0.5 V (IOV > 0) or VOV < VSS - 0.5 V (IOV < 0). The absolute sum of
, WR,
Data Sheet57V1.2, 2006-03
XC167-16
Derivatives
Electrical Parameters
6) An overload current (IOV) through a pin injects a certain error current (I
current adds to the respective pin’s leakage current (
current and is defined by the overload coupling factor
compared to the polarity of the overload current that produces it.
The total current through a pin is |
voltage on analog inputs.
7) The timing is valid for pin drivers operating in default current mode (selected after reset). Reducing the output
current may lead to increased delays or reduced driving capability (
I
| = |IOZ| + (|IOV| × KOV). The additional error current may distort the input
TOT
I
). The amount of error current depends on the overload
OZ
K
. The polarity of the injected error current is inverse
OV
) into the adjacent pins. This error
INJ
C
).
L
Parameter Interpretation
The parameters listed in the following partly represent the characteristics of the XC167
and partly its demands on the system. To aid in interpreting the parameters right, when
evaluating them for a design, they are marked in column “Symbol”:
CC (Controller Characteristics):
The logic of the XC167 will provide signals with the respective characteristics.
SR (System Requirement):
The external system must provide signals with the respective characteristics to the
XC167.
Sleep and Power down mode
supply current caused by
leakage and the RTC running,
clocked by the main oscillator
4)
I
PDM
7)
–0.6 +
0.02 ×
+
I
PDL
f
OSC
mAV
f
OSC
DDI
in [MHz]
I
and Σ-IOH) must
OL
= V
DDImax
= V
DDImax
1)2)
2)
6)
T
)
J
Sleep and Power down mode
I
PDA
–0.1 + I
PDL
mAV
DDI
= V
DDImax
supply current caused by
leakage and the RTC running,
clocked by the auxiliary
or VIH.
4)
V
and maximum CPU clock frequency with all outputs disconnected and
DDImax
) mainly provides the current consumed by the pin output drivers. A small
DDP
V
supply.
DDP
oscillator at 32 kHz
1) During Flash programming or erase operations the supply current is increased by max. 5 mA.
2) The supply current is a function of the operating frequency. This dependency is illustrated in Figure 11.
These parameters are tested at
all inputs at
3) The pad supply voltage pins (V
amount of current is consumed even though no outputs are driven, because the drivers’ input stages are
switched and also the Flash module draws some power from the
Data Sheet61V1.2, 2006-03
V
IL
XC167-16
Derivatives
Electrical Parameters
4) The total supply current in Sleep and Power down mode is the sum of the temperature dependent leakage
current and the frequency dependent current for RTC and main oscillator or auxiliary oscillator (if active).
5) This parameter is determined mainly by the transistor leakage currents. This current heavily depends on the
junction temperature (see Figure 13). The junction temperature
if no current flows through the port output drivers. Otherwise, the resulting temperature difference must be
taken into account.
6) All inputs (including pins configured as inputs) at 0 V to 0.1 V or at
pins configured as outputs) disconnected. This parameter is tested at 25 °C and is valid for
7) This parameter is determined mainly by the current consumed by the oscillator switched to low gain mode (see
Figure 12). This current, however, is influenced by the external oscillator circuitry (crystal, capacitors). The
given values refer to a typical circuitry and may change in case of a not optimized external oscillator circuitry.
T
is the same as the ambient temperature T
J
V
- 0.1 V to V
DDP
, all outputs (including
DDP
T
≥ 25 °C.
J
A
Data Sheet62V1.2, 2006-03
I [mA]
140
XC167-16
Derivatives
Electrical Parameters
I
DDImax
120
100
80
60
40
I
DDItyp
I
IDXmax
I
IDXtyp
20
10203040
f
CPU
[MHz]
Figure 11Supply/Idle Current as a Function of Operating Frequency
Data Sheet63V1.2, 2006-03
I [mA]
3.0
2.0
1.0
XC167-16
Derivatives
Electrical Parameters
I
PDMmax
I
PDMtyp
I
0.1
32 kHz
PDAmax
481216
f
OSC
[MHz]
Figure 12Sleep and Power Down Supply Current due to RTC and Oscillator
Running, as a Function of Oscillator Frequency
I
PDO
[mA]
1.5
1.0
0.5
-50
050100150
T
[°C]
J
Figure 13Sleep and Power Down Leakage Supply Current as a Function of
defined voltage range.
If the analog reference supply voltage drops below 4.5 V (i.e.
voltage by up to 0.2 V (i.e.
subject to production test.
The specified TUE is guaranteed only, if the absolute sum of input overload currents on Port 5 pins (see
specification) does not exceed 10 mA, and if V
time. During the reset calibration sequence the maximum TUE may be ±4 LSB.
2) V
may exceed V
AIN
cases will be X000
= V
AREF
or V
AGND
or X3FFH, respectively.
H
+ 0.1 V, V
DDP
V
= V
AREF
AREF
DDP
up to the absolute maximum ratings. However, the conversion result in these
= 0 V. It is verified by design for all other voltages within the
AGND
V
≥ 4.0 V) or exceeds the power supply
AREF
+ 0.2 V) the maximum TUE is increased to ±3 LSB. This range is not
I
OV
AREF
and V
remain stable during the respective period of
AGND
Data Sheet65V1.2, 2006-03
XC167-16
Derivatives
Electrical Parameters
3) The limit values for fBC must not be exceeded when selecting the peripheral frequency and the ADCTC setting.
t
4) This parameter includes the sample time
result register with the conversion result (
Values for the basic clock
When the post-calibration is switched off, the conversion time is reduced by 12 ×
5) The actual duration of the reset calibration depends on the noise on the reference signal. Conversions
executed during the reset calibration increase the calibration time. The TUE for those conversions may be
increased.
6) Not subject to production test - verified by design/characterization.
The given parameter values cover the complete operating range. Under relaxed operating conditions
(temperature, supply voltage) reduced values can be used for calculations. At room temperature and nominal
supply voltage the following typical values can be used:
C
AINTtyp
= 12 pF, C
AINStyp
t
depend on programming and can be taken from Table 15.
BC
= 7 pF, R
AINtyp
, the time for determining the digital result and the time to load the
S
t
= 1/f
SYS
= 1.5 kΩ, C
).
SYS
AREFTtyp
= 15 pF, C
AREFStyp
t
.
BC
= 13 pF, R
AREFtyp
= 0.7 kΩ.
V
AIN
R
Source
C
Ext
R
AIN, On
C
-
AINTCAINS
Figure 14Equivalent Circuitry for Analog Inputs
A/D Converter
C
AINS
MCS05570
Data Sheet66V1.2, 2006-03
XC167-16
Derivatives
Electrical Parameters
Sample time and conversion time of the XC167’s A/D Converter are programmable. In
compatibility mode, the above timing can be calculated using Table 15.
The limit values for
f
must not be exceeded when selecting ADCTC.
BC
Table 15A/D Converter Computation Table
ADCON.15|14
(ADCTC)
00f
01
10
11
1) These selections are available in compatibility mode. An improved mechanism to control the ADC input clock
can be selected.
A/D Converter
Basic Clock
/ 400tBC × 8
SYS
f
/ 201tBC × 16
SYS
f
/ 1610tBC × 32
SYS
f
/ 811tBC × 64
SYS
f
BC
ADCON.13|12
(ADSTC)
1)
Sample Time
t
S
Converter Timing Example:
Assumptions:
Basic clock
Sample time
f
SYS
f
BC
t
S
= 40 MHz (i.e. t
= f
/ 2 = 20 MHz, i.e. tBC = 50 ns
SYS
SYS
= tBC × 8 = 400 ns
= 25 ns), ADCTC = ‘01’, ADSTC = ‘00’
Conversion 10-bit:
With post-calibr.
Post-calibr. off
Conversion 8-bit:
With post-calibr.
Post-calibr. off
t
C10P
t
C10
t
C8P
t
C8
= 52 × tBC + tS + 6 × t
= 40 × tBC + tS + 6 × t
= 44 × tBC + tS + 6 × t
= 32 × tBC + tS + 6 × t
= (2600 + 400 + 150) ns = 3.15 µs
SYS
= (2000 + 400 + 150) ns = 2.55 µs
SYS
= (2200 + 400 + 150) ns = 2.75 µs
SYS
= (1600 + 400 + 150) ns = 2.15 µs
SYS
Data Sheet67V1.2, 2006-03
XC167-16
f
f
f
f
f
f
Derivatives
Electrical Parameters
4.4AC Parameters
4.4.1Definition of Internal Timing
The internal operation of the XC167 is controlled by the internal master clock fMC.
The master clock signal
f
can be generated from the oscillator clock signal f
MC
OSC
via
different mechanisms. The duration of master clock periods (TCMs) and their variation
(and also the derived external timing) depend on the used mechanism to generate
f
MC
This influence must be regarded when calculating the timings for the XC167.
Phase Locked Loop Operation (1:N)
OSC
MC
TCM
Direct Clock Drive (1:1)
OSC
MC
.
TCM
Prescaler Operation (N:1)
OSC
MC
TCM
MCT05555
Figure 15Generation Mechanisms for the Master Clock
Note: The example for PLL operation shown in Figure 15 refers to a PLL factor of 1:4,
the example for prescaler operation refers to a divider factor of 2:1.
The used mechanism to generate the master clock is selected by register PLLCON.
f
CPU and EBC are clocked with the CPU clock signal
same frequency as the master clock (
two:
f
= fMC / 2. This factor is selected by bit CPSYS in register SYSCON1.
CPU
f
= fMC) or can be the master clock divided by
CPU
. The CPU clock can have the
CPU
Data Sheet68V1.2, 2006-03
XC167-16
Derivatives
Electrical Parameters
The specification of the external timing (AC Characteristics) depends on the period of the
CPU clock, called “TCP”.
The other peripherals are supplied with the system clock signal
frequency as the CPU clock signal
f
CPU
.
f
which has the same
SYS
Bypass Operation
When bypass operation is configured (PLLCTRL = 0x
) the master clock is derived from
B
the internal oscillator (input clock signal XTAL1) through the input- and outputprescalers:
f
= f
MC
If both divider factors are selected as ‘1’ (PLLIDIV = PLLODIV = ‘0’) the frequency of
directly follows the frequency of f
cycle of the input clock
/ ((PLLIDIV+1) × (PLLODIV+1)).
OSC
OSC
f
.
OSC
f
MC
so the high and low time of fMC is defined by the duty
The lowest master clock frequency is achieved by selecting the maximum values for both
divider factors:
f
MC
= f
/ ((3 + 1) × (14 + 1)) = f
OSC
OSC
/ 60.
Phase Locked Loop (PLL)
When PLL operation is configured (PLLCTRL = 11
) the on-chip phase locked loop is
B
enabled and provides the master clock. The PLL multiplies the input frequency by the
factor F (
f
MC
= f
×F) which results from the input divider, the multiplication factor, and
OSC
the output divider (F = PLLMUL+1 / (PLLIDIV+1 × PLLODIV+1)). The PLL circuit
synchronizes the master clock to the input clock. This synchronization is done smoothly,
i.e. the master clock frequency does not change abruptly.
Due to this adaptation to the input clock the frequency of
is locked to
f
. The slight variation causes a jitter of fMC which also affects the duration
OSC
f
is constantly adjusted so it
MC
of individual TCMs.
The timing listed in the AC Characteristics refers to TCPs. Because
f
, the timing must be calculated using the minimum TCP possible under the respective
MC
f
is derived from
CPU
circumstances.
The actual minimum value for TCP depends on the jitter of the PLL. As the PLL is
constantly adjusting its output frequency so it corresponds to the applied input frequency
(crystal or oscillator) the relative deviation for periods of more than one TCP is lower than
for one single TCP (see formula and Figure 16).
This is especially important for bus cycles using waitstates and e.g. for the operation of
timers, serial interfaces, etc. For all slower operations and longer periods (e.g. pulse train
generation or measurement, lower baudrates, etc.) the deviation caused by the PLL jitter
is negligible.
Data Sheet69V1.2, 2006-03
XC167-16
Derivatives
Electrical Parameters
The value of the accumulated PLL jitter depends on the number of consecutive VCO
output cycles within the respective timeframe. The VCO output clock is divided by the
output prescaler (K = PLLODIV+1) to generate the master clock signal
the number of VCO cycles can be represented as K × N, where N is the number of
consecutive
f
cycles (TCM).
MC
For a period of N × TCM the accumulated PLL jitter is defined by the deviation D
D
[ns] = ±(1.5 + 6.32 × N / fMC); fMC in [MHz], N = number of consecutive TCMs.
N
So, for a period of 3 TCMs @ 20 MHz and K = 12: D
= ±(1.5 + 6.32 × 3 / 20) = 2.448 ns.
3
This formula is applicable for K × N < 95. For longer periods the K × N = 95 value can be
used. This steady value can be approximated by: D
[ns] = ±(1.5 + 600 / (K × fMC)).
Nmax
f
. Therefore,
MC
:
N
Acc. jitter D
ns
±8
±7
±6
±5
10 MHz
±4
±3
±2
40 MHz
±1
0
0510152025
1
N
K = 12
K = 15
20 MHz
K = 8
K = 10
K = 6 K = 5
N
MCD05566
Figure 16Approximated Accumulated PLL Jitter
Note: The bold lines indicate the minimum accumulated jitter which can be achieved by
selecting the maximum possible output prescaler factor K.
Different frequency bands can be selected for the VCO, so the operation of the PLL can
be adjusted to a wide range of input and output frequencies:
Data Sheet70V1.2, 2006-03
XC167-16
Derivatives
Electrical Parameters
Table 16VCO Bands for PLL Operation
1)
PLLCON.PLLVBVCO Frequency RangeBase Frequency Range
00100 … 150 MHz20 … 80 MHz
01150 … 200 MHz40 … 130 MHz
10200 … 250 MHz60 … 180 MHz
11Reserved
1) Not subject to production test - verified by design/characterization.
Data Sheet71V1.2, 2006-03
XC167-16
Derivatives
Electrical Parameters
4.4.2On-chip Flash Operation
The XC167’s Flash module delivers data within a fixed access time (see Table 17).
Accesses to the Flash module are controlled by the PMI and take 1+WS clock cycles,
where WS is the number of Flash access waitstates selected via bitfield WSFLASH in
register IMBCTRL. The resulting duration of the access phase must cover the access
time
actual system frequency.
Note: The Flash access waitstates only affect non-sequential accesses. Due to
of the Flash array. Therefore, the required Flash waitstates depend on the
t
ACC
prefetching mechanisms, the performance for sequential accesses (depending on
the software structure) is only partially influenced by waitstates.
In typical applications, eliminating one waitstate increases the average
performance by 5% … 15%.
Table 17Flash Characteristics
(Operating Conditions apply)
ParameterSymbolLimit ValuesUnit
Min.Typ.Max.
Flash module access timet
Programming time per 128-byte block
Erase time per sector
1) Programming and erase time depends on the system frequency. Typical values are valid for 40 MHz.
ACC
t
PR
t
ER
CC––50ns
CC–2
CC–200
1)
5ms
1)
500ms
Example: For an operating frequency of 40 MHz (clock cycle = 25 ns), devices can be
operated with 1 waitstate: ((1+1)
× 25 ns) ≥ 50 ns.
Table 18 indicates the interrelation of waitstates and system frequency.
Table 18Flash Access Waitstates
Required WaitstatesFrequency Range for
0 WS (WSFLASH = 00B)f
1 WS (WSFLASH = 01
)f
B
≤ 20 MHz
CPU
≤ 40 MHz
CPU
Note: The maximum achievable system frequency is limited by the properties of the
respective derivative, i.e. 40 MHz (or 20 MHz for xxx-16F20F devices).
Data Sheet72V1.2, 2006-03
4.4.3External Clock Drive XTAL1
XC167-16
Derivatives
Electrical Parameters
Table 19External Clock Drive Characteristics
(Operating Conditions apply)
ParameterSymbolLimit ValuesUnit
Min.Max.
V
V
1)
IHC
ILC
ns
Oscillator periodt
High time
Low time
Rise time
Fall time
1) The maximum limit is only relevant for PLL operation to ensure the minimum input frequency for the PLL.
2) The clock input signal must reach the defined levels V
2)
2)
2)
2)
t
1
0.5
V
DDI
OSC
t
1
t
2
t
3
t
4
t
2
SR25250
SR6–ns
SR6–ns
SR–8ns
SR–8ns
ILC
and V
t
t
OSC
.
IHC
3
t
4
MCT05572
Figure 17External Clock Drive XTAL1
Note: If the on-chip oscillator is used together with a crystal or a ceramic resonator, the
oscillator frequency is limited to a range of 4 MHz to 16 MHz.
It is strongly recommended to measure the oscillation allowance (negative
resistance) in the final target system (layout) to determine the optimum
parameters for the oscillator operation. Please refer to the limits specified by the
crystal supplier.
When driven by an external clock signal it will accept the specified frequency
range. Operation at lower input frequencies is possible but is verified by design
only (not subject to production test).
Data Sheet73V1.2, 2006-03
4.4.4Testing Waveforms
XC167-16
Derivatives
Electrical Parameters
Output delay
Hold time
Output delay
Hold time
2.0 V
Input Signal
(driven by tester)
Output Signal
(measured)
0.8 V
0.45 V
Output timings refer to the rising edge of CLKOUT.
Input timings are calculated from the time, when the input signal reaches
V
or VIL, respectively.
IH
MCD05556
Figure 18Input Output Waveforms
V
+ 0.1 V
Load
Timing
Reference
Points
V
- 0.1 V
Load
For timing purposes a port pin is no longer floating when a 100 mV
change from load voltage occurs, but begins to float when a 100 mV
change from the loaded
V
OH
/
V
Figure 19Float Waveforms
level occurs (
OL
V
OH
V
OL
I
OH
- 0.1 V
+ 0.1 V
/
I
= 20 mA).
OL
MCA05565
Data Sheet74V1.2, 2006-03
XC167-16
Derivatives
Electrical Parameters
4.4.5External Bus Timing
Table 20CLKOUT Reference Signal
ParameterSymbolLimitsUnit
Min.Max.
CLKOUT cycle timetc
5
CC40/30/25
1)
ns
CLKOUT high time
CLKOUT low time
CLKOUT rise time
CLKOUT fall time
1) The CLKOUT cycle time is influenced by the PLL jitter (given values apply to f
For longer periods the relative deviation decreases (see PLL deviation formula).
t
C5
t
C6
tc
tc
tc
tc
6
7
8
9
t
C7
CC8–ns
CC6–ns
CC–4ns
CC–4ns
t
C8
CLKOUT
= 25/33/40 MHz).
CPU
t
C9
MCT05571
Figure 20CLKOUT Signal Timing
Data Sheet75V1.2, 2006-03
XC167-16
Derivatives
Electrical Parameters
Variable Memory Cycles
External bus cycles of the XC167 are executed in five subsequent cycle phases (AB, C,
D, E, F). The duration of each cycle phase is programmable (via the TCONCSx
registers) to adapt the external bus cycles to the respective external module (memory,
peripheral, etc.).
The duration of the access phase can optionally be controlled by the external module via
the READY handshake input.
This table provides a summary of the phases and the respective choices for their
duration.
Table 21Programmable Bus Cycle Phases
(see timing diagrams)
Bus Cycle PhaseParameterValid ValuesUnit
Address setup phase, the standard duration of this
tp
AB
1 … 2 (5)TCP
phase (1 … 2 TCP) can be extended by 0 … 3 TCP
if the address window is changed
Command delay phase
Write Data setup/MUX Tristate phase
Access phase
Address/Write Data hold phase
tp
tp
tp
tp
C
D
E
F
0 … 3 TCP
0 … 1 TCP
1 … 32 TCP
0 … 3 TCP
Note: The bandwidth of a parameter (minimum and maximum value) covers the whole
operating range (temperature, voltage) as well as process variations. Within a
given device, however, this bandwidth is smaller than the specified range. This is
also due to interdependencies between certain parameters. Some of these
interdependencies are described in additional notes (see standard timing).
Data Sheet76V1.2, 2006-03
XC167-16
Derivatives
Electrical Parameters
Table 22External Bus Cycle Timing
(Operating Conditions apply)
ParameterSymbolLimitsUnit
Min.Max.
Output valid delay for:
RD
, WR(L/H)
Output valid delay for:
BHE
, ALE
Output valid delay for:
tc
tc
tc
10
11
12
CC113ns
CC-17ns
CC116ns
A23 … A16, A15 … A0 (on PORT1)
Output valid delay for:
tc
13
CC316ns
A15 … A0 (on PORT0)
Output valid delay for:
tc
14
CC114ns
CS
Output valid delay for:
tc
15
CC317ns
D15 … D0 (write data, MUX-mode)
Output valid delay for:
tc
16
CC317ns
D15 … D0 (write data, DEMUX-mode)
Output hold time for:
RD
, WR(L/H)
Output hold time for:
BHE
, ALE
Output hold time for:
tc
tc
tc
20
21
23
CC-33ns
CC08ns
CC113ns
A23 … A16, A15 … A0 (on PORT0)
Output hold time for:
tc
24
CC-33ns
CS
Output hold time for:
tc
25
CC113ns
D15 … D0 (write data)
Input setup time for:
tc
30
SR24–ns
READY, D15 … D0 (read data)
Input hold time
READY, D15 … D0 (read data)
1) Read data are latched with the same (internal) clock edge that triggers the address change and the rising edge
. Therefore address changes before the end of RD have no impact on (demultiplexed) read cycles. Read
of RD
data can be removed after the rising edge of RD.
1)
tc
31
SR-5–ns
Note: The shaded parameters have been verified by characterization.
They are not subject to production test.
Data Sheet77V1.2, 2006-03
XC167-16
Derivatives
Electrical Parameters
CLKOUT
ALE
A23-A16,
BHE, CSx
RD
WR(L/H)
tc
11
tc
tp
11
tc
AB
/
tc
13
14
tc
tp
21
C
tp
D
tp
E
tp
F
High Address
tc
20
tc
10
tc
31
tc
23
tc
30
AD15-AD0
(read)
Low Address
tc
13
AD15-AD0
(write)
Figure 21Multiplexed Bus Cycle
tc
15
Data In
Data OutLow Address
tc
25
MCT05557
Data Sheet78V1.2, 2006-03
XC167-16
Derivatives
Electrical Parameters
CLKOUT
ALE
A23-A0,
BHE, CSx
RD
WR(L/H)
tc
11
tc
tp
11
AB
/
tc
14
tc
tp
21
C
tp
D
tp
E
tp
F
Address
tc
20
tc
10
tc
31
tc
30
D15-D0
(read)
D15-D0
(write)
Figure 22Demultiplexed Bus Cycle
tc
16
Data In
Data Out
tc
25
MCT05558
Data Sheet79V1.2, 2006-03
XC167-16
Derivatives
Electrical Parameters
Bus Cycle Control via READY Input
The duration of an external bus cycle can be controlled by the external circuitry via the
READY input signal. The polarity of this input signal can be selected.
Synchronous READY permits the shortest possible bus cycle but requires the input
signal to be synchronous to the reference signal CLKOUT.
Asynchronous READY puts no timing constraints on the input signal but incurs one
waitstate minimum due to the additional synchronization stage. The minimum duration
of an asynchronous READY signal to be safely synchronized must be one CLKOUT
period plus the input setup time.
An active READY signal can be deactivated in response to the trailing (rising) edge of
the corresponding command (RD
If the next following bus cycle is READY-controlled, an active READY signal must be
disabled before the first valid sample point for the next bus cycle. This sample point
depends on the programmed phases of the next following cycle.
or WR).
Data Sheet80V1.2, 2006-03
XC167-16
Derivatives
Electrical Parameters
CLKOUT
RD, WR
D15-D0
(read)
D15-D0
(write)
tp
tc
10
tp
E
D
tp
RDY
tc
30
tc
tp
tc
F
20
31
Data In
tc
25
Data Out
tc
31
tc
tc
30
31
tc
30
READY
Synchronous
READY
Asynchron.
tc
31
tc
30
Not Rdy
Not Rdy
tc
30
READY
READY
tc
31
MCT05559
Figure 23READY Timing
Note: If the READY input is sampled inactive at the indicated sampling point (“Not Rdy”)
a READY-controlled waitstate is inserted (
tp
RDY
),
sampling the READY input active at the indicated sampling point (“Ready”)
terminates the currently running bus cycle.
Note the different sampling points for synchronous and asynchronous READY.
This example uses one mandatory waitstate (see
tp
) before the READY input is
E
evaluated.
Data Sheet81V1.2, 2006-03
External Bus Arbitration
XC167-16
Derivatives
Electrical Parameters
Table 23Bus Arbitration Timing
(Operating Conditions apply)
ParameterSymbolLimitsUnit
Min.Max.
Input setup time for:
HOLD
input
Output delay rising edge for:
HLDA
, BREQ
Output delay falling edge for:
tc
tc
tc
40
41
42
SR24–ns
CC16ns
CC110ns
HLDA
Note: The shaded parameters have been verified by characterization.
They are not subject to production test.
Data Sheet82V1.2, 2006-03
CLKOUT
HOLD
HLDA
tc
40
XC167-16
Derivatives
Electrical Parameters
tc
42
BREQ
CSx, RD,
tc
10
/
tc
14
3)
2)
WR(L/H)
Addr, Data,
BHE
1)
MCT05560
Figure 24External Bus Arbitration, Releasing the Bus
Notes
1. The XC167 will complete the currently running bus cycle before granting bus access.
2. This is the first possibility for BREQ
to get active.
3. The control outputs will be resistive high (pull-up) after being driven inactive (ALE will
be low).
Data Sheet83V1.2, 2006-03
CLKOUT
HOLD
HLDA
tc
40
tc
tc
XC167-16
Derivatives
Electrical Parameters
3)
41
41
BREQ
CSx, RD,
tc
10
1)
/
tc
14
2)
WR(L/H)
tc
/
tc
/
tc
/
tc
/
11
12
13
15
tc
16
Addr, Data,
BHE
MCT05561
Figure 25External Bus Arbitration, Regaining the Bus
Notes
1. This is the last chance for BREQ
Even if BREQ
is activated earlier, the regain-sequence is initiated by HOLD going
high. Please note that HOLD
to trigger the indicated regain-sequence.
may also be deactivated without the XC167 requesting
the bus.
2. The control outputs will be resistive high (pull-up) before being driven inactive (ALE
will be low).
3. The next XC167 driven bus cycle may start here.
Data Sheet84V1.2, 2006-03
Derivatives
Package and Reliability
5Package and Reliability
5.1Packaging
Table 24Package Parameters (P-TQFP-144-19)
ParameterSymbolLimit ValuesUnitNotes
Min.Max.
XC167-16
Power dissipationP
Thermal resistance
Package Outlines
0.22
0.5
±0.05
A
2)
17.5
0.08
22
20
1)
DISS
R
THA
A-BMD
D
–0.8W–
–32K/WChip-Ambient
±0.05
C
C
144x
B
±0.05
0.1
0.2
0.2
1)
20
1.6 MAX.
1.4
0.08
A-B
A-B
22
DDH
H
144x
4x
0.6
±0.15
+0.08
-0.03
0.12
7˚ MAX.
144
1
Index Marking
1)
Does not include plastic or metal protrusion of 0.25 max. per side
2)
Does not include dambar protrusion of 0.08 max. per side
GPP09243
Figure 26P-TQFP-144-19
(Plastic Thin Quad Flat Package)
You can find all of our packages, sorts of packing and others in our
Infineon Internet Page “Products”: http://www.infineon.com/products.
Dimensions in mm
Data Sheet85V1.2, 2006-03
XC167-16
Derivatives
Package and Reliability
5.2Flash Memory Parameters
The data retention time of the XC167’s Flash memory (i.e. the time after which stored
data can still be retrieved) depends on the number of times the Flash memory has been
erased and programmed.
Table 25Flash Parameters (XC167, 128 Kbytes)
ParameterSymbolLimit ValuesUnitNotes
Min.Max.
Data retention timet
Flash Erase Endurance
RET
N
ER
15–years103 erase/program
cycles
20 × 10
3
–cyclesdata retention time
5years
Data Sheet86V1.2, 2006-03
www.infineon.com
Published by Infineon Technologies AG
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.