MEC1322-NU-C0 Datasheet
MEC1322-NU-C0 Datasheet
Errata
An errata sheet, describing minor operational differences from the data sheet and recommended workarounds, may exist for cur-
rent devices. As device/documentation issues become known to us, we will publish an errata sheet. The errata will specify the
revision of silicon and revision of document to which it applies.
To determine if an errata sheet exists for a particular device, please check with one of the following:
• Microchip’s Worldwide Web site; http://www.microchip.com
• Your local Microchip sales office (see last page)
When contacting a sales office, please specify which device, revision of silicon and data sheet (include -literature number) you are
using.
1.1 Description
The Pin Configuration chapter includes a Pin List, Pin Description, Pin Multiplexing and Package Outline.
Term Definition
Pin Ref. Number There is a unique reference number for each pin name.
# The ‘#’ sign at the end of a signal name indicates an active-low signal
n The lowercase ‘n’ preceding a signal name indicates an active-low signal
PWR Power
I Digital Input
IS Input with Schmitt Trigger
I_AN Analog Input
O Push-Pull Output
OD Open Drain Output
IO Bi-directional pin
IOD Bi-directional pin with Open Drain Output
PIO Programmable as Input, Output, Open Drain Output, Bi-directional or Bi-directional with Open
Drain Output.
PCI_I Input. These pins meet the PCI 3.3V AC and DC Characteristics. (Note 1-1)
PCI_O Output. These pins meet the PCI 3.3V AC and DC Characteristics. (Note 1-1)
PCI_OD Open Drain Output. These pins meet the PCI 3.3V AC and DC Characteristics. (Note 1-1)
PCI_IO Input/Output These pins meet the PCI 3.3V AC and DC Characteristics. (Note 1-1)
PCI_ICLK Clock Input. These pins meet the PCI 3.3V AC and DC Characteristics and timing. (Note 1-2)
PCI_PIO Programmable as Input, Output, Open Drain Output, Bi-directional or Bi-directional with Open
Drain Output. These pins meet the PCI 3.3V AC and DC Characteristics. (Note 1-1).
IO_PECI PECI Input/Output. These pins are at the PECI VREF level. See Chapter 37.0, "Electrical Spec-
ifications".
Note 1-1 See the “PCI Local Bus Specification,” Revision 2.1, Section 4.2.2.
Note 1-2 See the “PCI Local Bus Specification,” Revision 2.1, Section 4.2.2 and 4.2.3.
Note: The Pin Ref. Numbers are the same as the pin numbers in the “128 VTQFP Number” column in Table 1-1,
"MEC1322 128 VTQFP Pin Configuration".
Note 1: The XTAL2 pin can be used as a single ended clock input. See Note 9 in Section 1.6, "Notes for Tables in
this Chapter," on page 39.
2: See Note 10 in Section 1.6, "Notes for Tables in this Chapter," on page 39 for information about the SPI pins.
3: The VCC1_RST#/GPIO131 pin cannot be used as a GPIO pin. The input path to the VCC1_RST# logic is
always active and will cause a reset if this pin is set low in GPIO mode.
4: The GPIO041 pin defaults to output low. This pin must be reprogrammed to the GPIO function upon power-
up.
Note: Table 1-2, "MEC1322 132 DQFN Pin Configuration" shows the mapping between Pin Ref. Number and 132
DQFN Number for the 132 DQFN package.
Note: Table 1-3, "MEC1322 144 WFBGA Pin Configuration" shows the mapping between Pin Ref. Number and
144 WFBGA ball number.
144 144
Pin Ref. WFBGA Pin Ref. WFBGA
Num ber Num ber Pin Nam e Num ber Num ber Pin Nam e
1 C3 GPIO036 37 H5 VCC1
2 F5 GPIO153/PVT_SCLK 38 N5 ADC4/GPIO062
3 F6 GPIO122/SHD_SCLK 39 M5 ADC3/GPIO061
4 A2 GPIO011/KSO16 40 L5 AVCC
5 A1 KSO13/GPIO006 41 N6 GPIO206
6 B1 KSO12/GPIO005 42 M6 ADC2/GPIO060
7 B2 KSO11/GPIO107 43 L6 ADC1/GPIO057
8 C2 KSO10/GPIO004 44 N7 ADC0/GPIO056
9 C1 KSO09/GPIO106 45 M7 AVSS
10 D2 KSO08/GPIO003 46 N8 LAD0/GPIO112
11 D1 VSS 47 A5 VSS
12 E2 KSO07/GPIO002 48 M8 LAD1/GPIO114
13 E1 KSO06/GPIO001 49 J3 JTAG_RST#
14 G5 VCC1 50 L8 LAD2/GPIO113
15 F1 CAP 51 L9 LAD3/GPIO111
16 G2 KSO05/GPIO104/TFDP_CLK 52 N9 LFRAME#/GPIO120
17 H3 KSO04/GPIO103/TFDP_DATA/XNOR 53 N10 LRESET#/GPIO116
18 H1 KSO03/GPIO102/JTAG_TDO 54 M9 PCI_CLK/GPIO117
19 J1 KSO02/GPIO101/JTAG_TDI 55 M10 CLKRUN#/GPIO014
20 H2 KSO01/GPIO100/JTAG_TMS 56 F3 VSS
21 J2 KSO00/GPIO000/JTAG_TCK 57 L10 SER_IRQ/GPIO115
22 K1 KSI7/GPIO043 58 J5 VCC1
23 K3 KSI6/GPIO042 59 N11 GPIO041
24 K2 KSI5/GPIO040 60 N12 nRESET_OUT/GPIO121
25 L1 KSI4/GPIO142/TRACECLK 61 N13 PS2_CLK1/GPIO050
26 L2 KSI3/GPIO032/TRACEDATA0 62 L11 PS2_DAT1/GPIO065
27 L3 KSI2/GPIO144/TRACEDATA1 63 M12 GPIO035
28 M2 KSI1/GPIO126/TRACEDATA2 64 M13 GPIO027
29 M1 KSI0/GPIO125/TRACEDATA3 65 L12 GPIO033
30 N2 GPIO031 66 K11 PS2_CLK0/GPIO046
31 N1 GPIO127/PECI_RDY 67 J12 PS2_DAT0/GPIO047
32 M3 PS2_DAT2/GPIO052 68 K12 VBAT
33 N3 GPIO147 69 L13 XTAL2
34 M4 GPIO151 70 K13 VSS_VBAT
35 L4 PS2_CLK2/GPIO051 71 J13 XTAL1
36 E3 VSS 72 J11 VCC_PWRGD/GPIO063
144 144
Pin Ref. WFBGA Pin Ref. WFBGA
Num ber Num ber Pin Nam e Num ber Num ber Pin Nam e
73 H13 GPIO110 109 B9 I2C0_DAT1/GPIO017
74 H11 GPIO130 110 A9 I2C0_CLK1/GPIO134
75 H12 32KHZ_OUT/GPIO013 111 A8 I2C0_DAT0/GPIO016
76 G13 nEC_SCI/GPIO026 112 C8 I2C0_CLK0/GPIO015
77 H8 VCC1_RST#/GPIO131 113 A7 LED0/GPIO154
78 G8 GPIO141/PWM3/LED3 114 B8 LED1/GPIO155
79 G12 VREF_PECI 115 C7 LED2/GPIO156
80 G9 GPIO132/PECI_DAT 116 B7 GPIO163
81 G11 GPIO007/KSO14 117 C10 VSS
82 J9 VSS 118 A6 GPIO136/PWM1
83 F13 GPIO010/KSO15 119 G6 VCC1
84 J6 VCC1 120 B6 GPIO133/PWM0
85 F11 GPIO143/RSMRST# 121 C5 GPIO034/PWM2/TACH2PWM_OUT
86 D13 GPIO162/RXD 122 A4 GPIO135/KBRST
87 F7 GPIO165/TXD/SHD_CS1# 123 B4 GPIO044/nSMI
88 E13 GPIO023/I2C1_DAT0 124 C4 GPIO066
89 E12 GPIO022/I2C1_CLK0 125 B3 GPIO025/I2C3_DAT0
90 E11 GPIO021/I2C2_DAT0 126 A3 GPIO024/I2C3_CLK0
91 D11 GPIO020/I2C2_CLK0 127 E6 GPIO054/PVT_MOSI
92 D12 GPIO105/TACH1 128 E5 GPIO064/SHD_MOSI
93 C13 GPIO145 129 G3 GPIO067
94 F9 GPIO164/PVT_MISO 130 F2 GPIO055
95 E9 GPIO124/SHD_MISO 131 G1 GPIO210
96 F8 GPIO146/PVT_CS0# 132 N4 GPIO211
97 E8 GPIO150/SHD_CS0# 133 L7 GPIO200
98 B12 GPIO157/BC_CLK 134 J7 GPIO123
99 B13 GPIO160/BC_DAT 135 H7 VCC1
100 A12 GPIO161/BC_INT# 136 F12 GPIO202
101 A13 GPIO140/TACH2/TACH2PWM_IN 137 C12 GPIO201
102 E7 GPIO045/A20M/PVT_CS1# 138 H9 VSS
103 C11 GPIO053/PS2_CLK3 139 B11 GPIO203
104 J8 VSS 140 C9 VSS
105 A11 GPIO152/PS2_DAT3 141 C6 GPIO204
106 H6 VCC1 142 M11 NC
107 A10 GPIO030 143 D3 VSS
108 B10 GPIO012/KSO17 144 B5 VSS
Note: The NC pin in the 144 WFBGA package should be left unconnected on the board.
FIGURE 1-1: MEC1322 PIN NAME TO 144-PIN WFBGA BALL MAPPING (TOP)
1 2 3 4 5 6 7
KSO13/GPIO00 GPIO011/KSO1 GPIO024/I2C3_C
GPIO135/KBRST VSS GPIO136/PWM1 LED0/GPIO154
6 6 LK0
A
KSO12/GPIO00 KSO11/GPIO10 GPIO025/I2C3_D
GPIO044/nSMI VSS GPIO133/PWM0 GPIO163
5 7 AT0
B
GPIO034/PWM2/
KSO09/GPIO10 KSO10/GPIO00
GPIO036 GPIO066 TACH2PWM_OU GPIO204 LED2/GPIO156
6 4
T
C
KSO08/GPIO00
VSS VSS No Ball No Ball No Ball No Ball
3
D
KSO06/GPIO00 KSO07/GPIO00 GPIO064/SHD_M GPIO054/PVT_M GPIO045/A20M/P
VSS No Ball
1 2 OSI OSI VT_CS1#
E
GPIO153/PVT_S GPIO122/SHD_S GPIO165/TXD/SH
CAP GPIO055 VSS No Ball
CLK CLK D_CS1#
F
KSO05/GPIO10
GPIO210 GPIO067 No Ball VCC1 VCC1 No Ball
4/TFDP_CLK
G
KSO04/GPIO103/
KSO03/GPIO10 KSO01/GPIO10
TFDP_DATA/XNO No Ball VCC1 VCC1 VCC1
2/JTAG_TDO 0/JTAG_TMS
R
H
KSO02/GPIO10 KSO00/GPIO00
JTAG_RST# No Ball VCC1 VCC1 GPIO123
1/JTAG_TDI 0/JTAG_TCK
J
K
KSI4/GPIO142/T KSI3/GPIO032/T KSI2/GPIO144/TR PS2_CLK2/GPIO
AVCC ADC1/GPIO057 GPIO200
RACECLK RACEDATA0 ACEDATA1 051
L
KSI0/GPIO125/T KSI1/GPIO126/T PS2_DAT2/GPIO
GPIO151 ADC3/GPIO061 ADC2/GPIO060 AVSS
RACEDATA3 RACEDATA2 052
M
GPIO127/PECI_
GPIO031 GPIO147 GPIO211 ADC4/GPIO062 GPIO206 ADC0/GPIO056
RDY
N
8 9 10 11 12 13
I2C0_DAT0/GPIO I2C0_CLK1/GPIO GPIO152/PS2_D GPIO161/BC_INT GPIO140/TACH2/
GPIO030
016 134 AT3 # TACH2PWM_IN
A
I2C0_DAT1/GPIO GPIO157/BC_CL GPIO160/BC_DA
LED1/GPIO155 GPIO012/KSO17 GPIO203
017 K T
B
I2C0_CLK0/GPIO GPIO053/PS2_CL
VSS VSS GPIO201 GPIO145
015 K3
C
GPIO020/I2C2_C
No Ball No Ball No Ball GPIO105/TACH1 GPIO162/RXD
LK0
D
GPIO150/SHD_C GPIO124/SHD_MI GPIO021/I2C2_D GPIO022/I2C1_C GPIO023/I2C1_D
No Ball
S0# SO AT0 LK0 AT0
E
GPIO146/PVT_C GPIO164/PVT_MI GPIO143/RSMRS
No Ball GPIO202 GPIO010/KSO15
S0# SO T#
F
GPIO141/PWM3/ GPIO132/PECI_D nEC_SCI/GPIO02
No Ball GPIO007/KSO14 VREF_PECI
LED3 AT 6
G
VCC1_RST#/GPI 32KHZ_OUT/GPI
VSS No Ball GPIO130 GPIO110
O131 O013
H
VCC_PWRGD/G PS2_DAT0/GPIO
VSS VSS No Ball XTAL1
PIO063 047
J
PS2_CLK0/GPIO
No Ball No Ball No Ball VBAT VSS_VBAT
046
K
SER_IRQ/GPIO1 PS2_DAT1/GPIO
LAD2/GPIO113 LAD3/GPIO111 GPIO033 XTAL2
15 065
L
PCI_CLK/GPIO11 CLKRUN#/GPIO0
LAD1/GPIO114 NC GPIO035 GPIO027
7 14
M
LFRAME#/GPIO1 LRESET#/GPIO1 nRESET_OUT/G PS2_CLK1/GPIO
LAD0/GPIO112 GPIO041
20 16 PIO121 050
N
Pin Reference
Number Pin Name
60 nRESET_OUT/GPIO121
77 VCC1_RST#/GPIO131
85 GPIO143/RSMRST#
125 GPIO025/I2C3_DAT0
Note: The GPIO025/I2C3_DAT0 pin is driven low, glitch free, while VCC1 is coming up. However, after VCC1 is
up and stable, the pin becomes an input (i.e., tri-stated Open Drain type), as shown in Table 1-37, “Multi-
plexing Table (16 of 18),” on page 36.
Note: These glitch protected pins have no backdrive protection. See Section 1.3.3, "Non Backdrive Protected
Pins".
Pin Reference
Number Pin Name
38 ADC4/GPIO062
39 ADC3/GPIO061
42 ADC2/GPIO060
43 ADC1/GPIO057
44 ADC0/GPIO056
46 LAD0/GPIO112
48 LAD1/GPIO114
50 LAD2/GPIO113
51 LAD3/GPIO111
52 LFRAME#/GPIO120
53 LRESET#/GPIO116
54 PCI_CLK/GPIO117
55 CLKRUN#/GPIO014
57 SER_IRQ/GPIO115
60 nRESET_OUT/GPIO121
69 XTAL2
71 XTAL1
77 VCC1_RST#/GPIO131
79 VREF_PECI
80 GPIO132/PECI_DAT
85 GPIO143/RSMRST#
125 GPIO025/I2C3_DAT0
Note: JTAG_TDO is a push-pull output. This function is not configured through the associated GPIO Pin Control
Register; however the drive strength is configured through the associated GPIO Pin Control Register 2.
GPIO Interface
Pin Ref. Number Signal Name Description Notes
See Pin Configuration
GPIO General Purpose Input Output Pins Note 12
Table
Note: No GPIO pin should be left floating in a system. If a GPIO pin is not in use, it should be either tied high, tied
low, or pulled to either power or ground through a resistor.
Note 1: The KBRST pin function is the output of CPU_RESET described in Section 11.11.2, "CPU_RESET Hard-
ware Speed-Up," on page 151.
2: The nRESET_OUT pin function is an external output signal version of the internal signal nSIO_RESET. See
the iRESET_OUT bit in the Power Reset Control (PWR_RST_CTRL) Register on page 71 and nSIO_RE-
SET in Table 3-7, “Definition of Reset Signals,” on page 52.
3: XNOR is a push-pull output. This function is not configured through the associated GPIO Pin Control Reg-
ister; however the drive strength is configured through the associated GPIO Pin Control Register 2.
APPLICATION NOTE: See FIGURE 3-1: Recommended Battery Circuit on page 49.
The Trace Debug Interface is enabled using the TRACE_EN bit in the ETM TRACE Enable register defined in Chapter
35.0, "EC Subsystem Registers".
Note: These pins are push-pull outputs when enabled as the Trace Debug Interface pin functions. This function-
ality is not configured through the associated GPIO Pin Control Register; however the drive strength of
these pins is configured through the associated GPIO Pin Control Register 2.
Note: An internal pull-up resistor is indicated by (PU) and and internal pull-down is indicated by (PD). These are
configured via the GPIO Pin Control Register.
Note: The Glitch Protected POR Drive Low Pins are configured as “always on”, as indicated by “ON” in this col-
umn.
Gated State
This column defines the internal value of an input signal when either its emulated power well is inactive or it is not
selected by the GPIO alternate function MUX. A value of “No Gate” means that the internal signal always follows the
pin even when the emulated power well is inactive.
Note: Gated state is only meaningful to the operation of input signals. A gated state on an output pin defines the
internal behavior of the GPIO MUX and does not imply pin behavior.
Note 1 The LAD and SER_IRQ pins require an external weak pull-up resistor of 10k-100k ohms.
Note 2 W hen the JTAG_RST# pin is not asserted (logic '1'), the JTAG_TDI, JTAG_TDO, JTAG_TCK, JTAG_TMS
signal functions in the JTAG interface are unconditionally routed to the interface; the Pin Control register for
these pins has no effect. W hen the JTAG_RST# pin is asserted (logic '0'), the JTAG_TDI, JTAG_TDO,
JTAG_TCK, JTAG_TMS signal functions in the JTAG interface are not routed to the interface and the Pin
Control Register for these pins controls the muxing. The pin control registers can not be used to route the
JTAG interface to the pins. The System Board Designer should terminate this pin in all functional states
using jumpers and pull-up or pull down resistors, etc.
Note 3 An external cap must be connected as close to the CAP pin/ball as possible with a routing resistance and
CAP ESR of less than 100mohms. The capacitor value is 1uF and must be ceramic with X5R or X7R
dielectric. The cap pin/ball should remain on the top layer of the PCB and traced to the CAP. Avoid adding
vias to other layers to minimize inductance.
Note 4 A pull-down is required on the GPIO146/PVT_CS0# pin if there is no private SPI flash device on the board.
Note 5 This I2C port supports 1Mbps (pin 88, GPIO023/I2C1_DAT0 and pin 89, GPIO022/I2C1_CLK0). For 1Mbps
I2C recommended capacitance/pull-up relationships from Intel, refer to the Shark Bay platform guide, Intel
ref number 486714. Refer to the PCH - SMBus 2.0/SMLink Interface Design Guidelines, Table 20-5 Bus
Capacitance/Pull-Up Resistor Relationship.
Note 6 The following glitch protected pins require a pull-down on the board: pin 60, nRESET_OUT/GPIO121 and
pin 85, GPIO143/RSMRST#. The nRESET_OUT pin will drive low when VCC1 comes on and stays low
until the iRESET_OUT bit is cleared after VCC PW RGD asserts. The RSMRST# pin also drives low (as a
GPIO push-pull output) following a VCC1 power-on until firmware deasserts it by writing the GPIO data bit
to '1'. The GPIO143/RSMRST# pin operates in this manner as a GPIO; the RSMRST# function is not a true
alternate function and the GPIO143 control register must not be changed from the GPIO default function.
Note 7 The BC DAT pin requires a weak pull up resistor (100 K Ohms).
Note 8 The voltage on the ADC pins must not exceed 3.6 V or damage to the device will occur.
Note 9 The XTAL1 pin should be left floating when using the XTAL2 pin for the single ended clock input.
Note 10 MEC1322: The SPI pins are configured to their SPI function by ROM boot code as follows. Shared SPI
pins are configured to the following SPI functions: SHD_CLK, SHD_MOSI, SHD_MISO and SHD_CS0#. If
the PVT_CS0# pin (pin 96) is sampled high, then the private SPI pins are configured to the following SPI
functions after a successful load from flash: PVT_CLK, PVT_MOSI, PVT_MISO and PVT_CS0#; otherwise
these pins are left as the GPIO function. It is recommended that user code reconfigures the shared SPI
pins to the GPIO input function before releasing RSMRST#.
Note 11 The KSI[7:0] pins have the internal pull-up enabled by ROM boot code. Therefore the Buffer Type on these
pins is I (PU) after the ROM boot code runs.
Note 12 The GPIO041 pin defaults to output low. This pin must be reprogrammed to the GPIO function upon power-
up.
P in
R e fe re n c e P in N a m e P in S ta te a fte r V C C 1 P o w e r-o n
Num be r
21 K S O 0 0 /G P IO 0 0 0 /J T AG _ T C K P u s h -p u ll - H ig h
20 K S O 0 1 /G P IO 1 0 0 /J T AG _ T MS P u s h -p u ll - H ig h
19 K S O 0 2 /G P IO 1 0 1 /J T AG _ T D I P u s h -p u ll - H ig h
18 K S O 0 3 /G P IO 1 0 2 /J T AG _ T D O P u s h -p u ll - H ig h
K S O 0 4 /G P IO 1 0 3 /T F D P _ D AT A/XN O
P u s h -p u ll - H ig h
17 R
16 K S O 0 5 /G P IO 1 0 4 /T F D P _ C L K P u s h -p u ll - H ig h
13 K S O 0 6 /G P IO 0 0 1 P u s h -p u ll - H ig h
12 K S O 0 7 /G P IO 0 0 2 P u s h -p u ll - H ig h
10 K S O 0 8 /G P IO 0 0 3 P u s h -p u ll - H ig h
9 K S O 0 9 /G P IO 1 0 6 P u s h -p u ll - H ig h
8 K S O 1 0 /G P IO 0 0 4 P u s h -p u ll - H ig h
7 K S O 1 1 /G P IO 1 0 7 P u s h -p u ll - H ig h
6 K S O 1 2 /G P IO 0 0 5 P u s h -p u ll - H ig h
5 K S O 1 3 /G P IO 0 0 6 P u s h -p u ll - H ig h
113 L E D 0 /G P IO 1 5 4 O D - lo w
114 L E D 1 /G P IO 1 5 5 O D - lo w
115 L E D 2 /G P IO 1 5 6 O D - lo w
66 P S 2 _ C L K 0 /G P IO 0 4 6 IO D - lo w
61 P S 2 _ C L K 1 /G P IO 0 5 0 IO D - lo w
35 P S 2 _ C L K 2 /G P IO 0 5 1 IO D - lo w
G litc h P ro te c te d - d rive n lo w w h ile VC C 1 is
ris in g .
n R E S E T _ O U T /G P IO 1 2 1 T h e p in b e c o m e s a p u s h -p u ll o u tp u t a fte r VC C 1
is u p a n d s ta b le (re q u ire s a p u ll-d o w n o n th e
60 b o a rd )
G litc h P ro te c te d - d rive n lo w w h ile VC C 1 is
ris in g .
VC C 1 _ R S T # /G P IO 1 3 1
T h e p in b e c o m e s O D a fte r VC C 1 is u p a n d s ta b le
77 (re q u ire s a p u ll-u p o n th e b o a rd )
G litc h P ro te c te d - d rive n lo w w h ile VC C 1 is
ris in g .
G P IO 1 4 3 /R S MR S T # T h e p in b e c o m e s a p u s h -p u ll o u tp u t a fte r VC C 1
is u p a n d s ta b le (re q u ire s a p u ll-d o w n o n th e
85 b o a rd )
Tach 0
Shared
SPI Tach 1
Master Executable SRAM
Floating Point Unit ADC Ch0-4
Private
SPI EC Core ADC to
Master
PWM
PWM0 Boot
PWM1 ROM
VREF_PECI
PWM2
PWM3 Timer
PECI
16-bit x4
Timer
KB Scan 32-bit x2
Interfaces EMI
Hibernation
8042 KBC
Timer
ACPI EC (x2) LPC
GPIO
PM1
WDT
MBX
Port92
LED Control (x4) EC_Reg PnP CFG
Bank Glue
UART
Logic
DMA RTC nRESET
Controller
BC-Link _OUT,
Interrupt On-Chip VCC1
Aggregater Clocking _RST#
RPM_PWM
Ring
Osc
TFDP
VBAT Resources
VBAT Regs.
Crystal Clock Debug
VBAT RAM Osc Gen & Dist and Test
Table 2-1 on page 46 lists Address Ranges for each of the blocks.
3.1 Introduction
The Power, Clocks, and Resets (PCR) chapter identifies all the power supplies, clock sources, and reset inputs to the
chip and defines all the derived power, clock, and reset signals. In addition, this section identifies Power, Clock, and
Reset events that may be used to generate an interrupt event, as well as, the Chip Power Management Features.
3.2 References
No references have been cited for this chapter.
3.3 Interrupts
The Power, Clocks, and Resets logic generates no events
3.4 Power
3.4.1 POWER SOURCES
Table 3-1 lists the power supplies from which the MEC1322 draws current. These current values are defined in Section
37.4, "Power Consumption," on page 395.
Note 3-1 Note on Battery Replacement: Microchip recommends removing all power sources to the device
defined in Table 3-1, "Power Source Definitions" and all external voltage references defined in
Table 3-2, "Voltage Reference Definitions" before removing and replacing the battery. In addition,
upon removing the battery, ground the battery pin before replacing the battery.
3.3V nom,
To EC as from AC Source
VCC1 or Battery Pack
(Schottky Diode)
VCC0 ( )
to EC 3.3V max with Possible +
VCC1 = 0V, 3.0V nom
(Schottky Current Limiter
3.6V max with Coin Cell
Diode) (1K typ.)
VCC1 = VBAT
3.5 Clocks
The following section defines the MEC1322 clocks that are generated or referenced.
3.6 Resets
Note: The external pull-up on the VCC1_RST# pin must be chosen to meet the timing in Table 38-2,
“VCC1_RST# Rise Time,” on page 397.
The following sequence illustrates the interaction between the internally and externally driven assertion of VCC1_RST#:
1. The Integrated VCC1 Power On Reset Generator insures VCC1_RST# is driven low during a VCC1 POR from
VCC1 = 1V to 2.4V (typ) without glitches.
2. The VCC1_RST# pin is driven low during the POR transition until VCC1 > 2.4V (typ) and then the VCC1_RST#
pin remains low afterwards for 1ms (typ) delay window. The VCC1_RST# input is not examined during the 1ms
(typ) delay window; therefore, the system input and/or the external pin termination may be modified (i.e. drive it
low, let it float, etc.)
- The VCC1_RST# input is not examined during the POR transition while VCC1 < 2.4V (typ); therefore, the
system input to the VCC1_RST# pin may modify the output termination (i.e. drive it low, let it float, etc.)
3. The VCC1_RST# pin is driven low during the 1ms (typ) delay window. The MEC1322 is in the VCC1_POR state
during this time.
4. After the 1ms (typ) window, the VCC1_RST# pin open drain output from the MEC1322 is not driven/released.
The strap option pins are sampled at this time.
5. The MEC1322 will remain in the VCC1 POR for 2.65us (min) after the VCC1_RST# pin is released The
VCC1_RST# input pin is ignored during this time.
6. The VCC1_RST# pin input is sampled at 2.65us (min) after the VCC1_RST# pin is released.
- If the VCC1_RST# pin is high when sampled, then the EC starts executing.
- If the VCC1_RST# pin is low when sampled, the pin is being driven externally (i.e., the system is forcing a
reset):
- The VCC1_RST# pin is driven low for 1ms (typ), then sampled at 2.65us (min) after the VCC1_RST# pin is
released (see step 3).
Note: All register addresses are naturally aligned on 32-bit boundaries. Offsets for registers that are smaller than
32 bits are reserved and must not be used for any other purpose.
Offset 00h
Reset
Bits Description Type Default
Event
31:2 RESERVED RES
1 MCHP Reserved (Note 3-10) R/W 0h VCC1_R
ESET
0 MCHP Reserved (Note 3-10) R/W 0h VCC1_R
ESET
Offset 04h
Reset
Bits Description Type Default
Event
31:2 RESERVED RES
1 MCHP Reserved R 0h VCC1_R
ESET
0 MCHP Reserved R - VCC1_R
ESET
Offset 08h
Reset
Bits Description Type Default
Event
31 TIMER16_1 Sleep Enable R/W 0h VCC1_R
0: block is free to use clocks as necessary. ESET
1: block is commanded to sleep at next available moment.
See Note 3-11 on page 57.
30 TIMER16_0 Sleep Enable R/W 0h VCC1_R
0: block is free to use clocks as necessary. ESET
1: block is commanded to sleep at next available moment.
See Note 3-11 on page 57.
29 EC_REG_BANK Sleep Enable R/W 0h VCC1_R
0: block is free to use clocks as necessary. ESET
1: block is commanded to sleep at next available moment.
28:23 RESERVED RES
22 PWM3 Sleep Enable R/W 0h VCC1_R
0: block is free to use clocks as necessary. ESET
1: block is commanded to sleep at next available moment.
21 PWM2 Sleep Enable R/W 0h VCC1_R
0: block is free to use clocks as necessary. ESET
1: block is commanded to sleep at next available moment.
20 PWM1 Sleep Enable R/W 0h VCC1_R
0: block is free to use clocks as necessary. ESET
1: block is commanded to sleep at next available moment.
19:12 RESERVED RES
11 TACH1 Sleep Enable R/W 0h VCC1_R
0: block is free to use clocks as necessary. ESET
1: block is commanded to sleep at next available moment.
10 SMB0 Sleep Enable R/W 0h VCC1_R
0: block is free to use clocks as necessary. ESET
1: block is commanded to sleep at next available moment.
9 WDT Sleep Enable R/W 0h VCC1_R
0: block is free to use clocks as necessary. ESET
1: block is commanded to sleep at next available moment.
Reset
Bits Description Type Default
Event
8 PROCESSOR Sleep Enable R/W 0h VCC1_R
0: block is free to use clocks as necessary. ESET
1: block is commanded to sleep at next available moment.
7 TFDP Sleep Enable R/W 0h VCC1_R
0: block is free to use clocks as necessary. ESET
1: block is commanded to sleep at next available moment.
6 DMA Sleep Enable R/W 0h VCC1_R
0: block is free to use clocks as necessary. ESET
1: block is commanded to sleep at next available moment.
5 PMC Sleep Enable R/W 0h VCC1_R
0: block is free to use clocks as necessary. ESET
1: block is commanded to sleep at next available moment.
4 PWM0 Sleep Enable R/W 0h VCC1_R
0: block is free to use clocks as necessary. ESET
1: block is commanded to sleep at next available moment.
3 RESERVED RES
2 TACH0 Sleep Enable R/W 0h VCC1_R
0: block is free to use clocks as necessary. ESET
1: block is commanded to sleep at next available moment.
1 PECI Sleep Enable R/W 0h VCC1_R
0: block is free to use clocks as necessary. ESET
1: block is commanded to sleep at next available moment.
0 INT Sleep Enable R/W 0h VCC1_R
0: block is free to use clocks as necessary. ESET
1: block is commanded to sleep at next available moment.
Note 3-11 The basic timers in this device have an auto-reload mode. When this mode is selected, the block's
clk_req equation is always asserted, which will prevent the device from gating its clock tree and going
to sleep. When the firmware intends to put the device to sleep, none of the timers should be in auto-
reload mode. Alternatively, use the timer's HALT function inside the control register to stop the timer
in auto-reload mode so it can go to sleep.
Offset 0Ch
Reset
Bits Description Type Default
Event
31 TIMER16_1 Clock Required R 0h VCC1_R
0: block does NOT need clocks. ESET
1: block requires clocks.
30 TIMER16_0 Clock Required R 0h VCC1_R
0: block does NOT need clocks. ESET
1: block requires clocks.
29 EC_REG_BANK Clock Required R 0h VCC1_R
0: block does NOT need clocks. ESET
1: block requires clocks.
28:23 RESERVED RES
Reset
Bits Description Type Default
Event
22 PWM3 Clock Required R 0h VCC1_R
0: block does NOT need clocks. ESET
1: block requires clocks.
21 PWM2 Clock Required R 0h VCC1_R
0: block does NOT need clocks. ESET
1: block requires clocks.
20 PWM1 Clock Required R 0h VCC1_R
0: block does NOT need clocks. ESET
1: block requires clocks.
19:12 RESERVED RES
11 TACH1 Clock Required R 0h VCC1_R
0: block does NOT need clocks. ESET
1: block requires clocks.
10 SMB0 Clock Required R 0h VCC1_R
0: block does NOT need clocks. ESET
1: block requires clocks.
9 WDT Clock Required R 0h VCC1_R
0: block does NOT need clocks. ESET
1: block requires clocks.
8 PROCESSOR Clock Required R 1h VCC1_R
0: block does NOT need clocks. ESET
1: block requires clocks.
7 TFDP Clock Required R 0h VCC1_R
0: block does NOT need clocks. ESET
1: block requires clocks.
6 DMA Clock Required R 0h VCC1_R
0: block does NOT need clocks. ESET
1: block requires clocks.
5 PMC Clock Required R 0h VCC1_R
0: block does NOT need clocks. ESET
1: block requires clocks.
4 PWM0 Clock Required R 0h VCC1_R
0: block does NOT need clocks. ESET
1: block requires clocks.
3 RESERVED RES
2 TACH0 Clock Required R 0h VCC1_R
0: block does NOT need clocks. ESET
1: block requires clocks.
1 PECI Clock Required R 0h VCC1_R
0: block does NOT need clocks. ESET
1: block requires clocks.
0 INT Clock Required R 0h VCC1_R
0: block does NOT need clocks. ESET
1: block requires clocks.
Offset 10h
Reset
Bits Description Type Default
Event
31:19 RESERVED RES
18 RTC Sleep Enable R/W 0h VCC1_R
0: block is free to use clocks as necessary. ESET
1: block is commanded to sleep at next available moment.
17 RESERVED RES
16 8042EM Sleep Enable R/W 0h VCC1_R
0: block is free to use clocks as necessary. ESET
1: block is commanded to sleep at next available moment.
15 ACPI PM1 Sleep Enable R/W 0h VCC1_R
0: block is free to use clocks as necessary. ESET
1: block is commanded to sleep at next available moment.
14 ACPI EC 1 Sleep Enable R/W 0h VCC1_R
0: block is free to use clocks as necessary. ESET
1: block is commanded to sleep at next available moment.
13 ACPI EC 0 Sleep Enable R/W 0h VCC1_R
0: block is free to use clocks as necessary. ESET
1: block is commanded to sleep at next available moment.
12 GLBL_CFG R/W 0h VCC1_R
0: block is free to use clocks as necessary. ESET
1: block is commanded to sleep at next available moment.
11:2 RESERVED RES
1 UART 0 Sleep Enable R/W 0h VCC1_R
0: block is free to use clocks as necessary. ESET
1: block is commanded to sleep at next available moment.
0 LPC Sleep Enable R/W 0h VCC1_R
0: block is free to use clocks as necessary. ESET
1: block is commanded to sleep at next available moment.
Offset 14h
Reset
Bits Description Type Default
Event
31:19 RESERVED RES
18 RTC Clock Required R 0h VCC1_R
0: block does NOT need clocks. ESET
1: block requires clocks.
17 RESERVED RES
16 8042EM Clock Required R 0h VCC1_R
0: block does NOT need clocks. ESET
1: block requires clocks.
15 ACPI PM1 Clock Required R 0h VCC1_R
0: block does NOT need clocks. ESET
1: block requires clocks.
Reset
Bits Description Type Default
Event
14 ACPI EC 1 Clock Required R 0h VCC1_R
0: block does NOT need clocks. ESET
1: block requires clocks.
13 ACPI EC 0 Clock Required R 0h VCC1_R
0: block does NOT need clocks. ESET
1: block requires clocks.
12 GLBL_CFG Clock Required R - VCC1_R
0: block does NOT need clocks. ESET
1: block requires clocks.
11:2 RESERVED RES
1 UART 0 Clock Required R - VCC1_R
0: block does NOT need clocks. ESET
1: block requires clocks.
0 LPC Clock Required R - VCC1_R
0: block does NOT need clocks. ESET
1: block requires clocks.
Offset 18h
Reset
Bits Description Type Default
Event
31:3 RESERVED RES
2 Core regulator standby R/W 0h VCC1_R
0: keep regulator fully operational when sleeping. ESET
1: standby the regulator when sleeping. Allows enough power for
chip static operation for memory retention.
1 Ring oscillator output gate R/W 0h VCC1_R
0: keep ROSC ungated when sleeping. ESET
1: gate the ROSC output when sleeping.
0 Ring oscillator power down R/W 0h VCC1_R
0: keep ROSC operating when sleeping. ESET
1: disable ROSC when sleeping. Clocks will start on wakeup, but
there is a clock lock latency penalty.
The System Sleep States shown in Table 3-10 and determined by the bits in this register, are only entered if all blocks
are sleeping; that is, if the sleep enable bits are set for all blocks and no clocks are required.
Offset 20h
Reset
Bits Description Type Default
Event
31:8 RESERVED RES
7:0 Processor Clock Divide Value R/W 4h VCC1_R
1: divide 48 MHz Ring Oscillator by 1. ESET
4: divide 48 MHz Ring Oscillator by 4.
16: divide 48 MHz Ring Oscillator by 16.
48: divide 48 MHz Ring Oscillator by 48.
No other values are supported.
Offset 24h
Reset
Bits Description Type Default
Event
31:29 RESERVED RES
28 MCHP Reserved (Note 3-10) R/W 0h VCC1_R
ESET
27 MCHP Reserved (Note 3-10) R/W 0h VCC1_R
ESET
26 MCHP Reserved (Note 3-10) R/W 0h VCC1_R
ESET
25 LED3 Sleep Enable R/W 0h VCC1_R
0: block is free to use clocks as necessary. ESET
1: block is commanded to sleep at next available moment.
24 TIMER32_1 Sleep Enable R/W 0h VCC1_R
0: block is free to use clocks as necessary. ESET
1: block is commanded to sleep at next available moment.
See Note 3-11 on page 57.
23 TIMER32_0 Sleep Enable R/W 0h VCC1_R
0: block is free to use clocks as necessary. ESET
1: block is commanded to sleep at next available moment.
See Note 3-11 on page 57.
Reset
Bits Description Type Default
Event
22 TIMER16_3 Sleep Enable R/W 0h VCC1_R
0: block is free to use clocks as necessary. ESET
1: block is commanded to sleep at next available moment.
See Note 3-11 on page 57.
21 TIMER16_2_Sleep Enable R/W 0h VCC1_R
0: block is free to use clocks as necessary. ESET
1: block is commanded to sleep at next available moment.
See Note 3-11 on page 57.
20 SPI1 Sleep Enable R/W 0h VCC1_R
0: block is free to use clocks as necessary. ESET
1: block is commanded to sleep at next available moment.
19 BCM Sleep Enable R/W 0h VCC1_R
0: block is free to use clocks as necessary. ESET
1: block is commanded to sleep at next available moment.
18 LED2 Sleep Enable R/W 0h VCC1_R
0: block is free to use clocks as necessary. ESET
1: block is commanded to sleep at next available moment.
17 LED1 Sleep Enable R/W 0h VCC1_R
0: block is free to use clocks as necessary. ESET
1: block is commanded to sleep at next available moment.
16 LED0 Sleep Enable R/W 0h VCC1_R
0: block is free to use clocks as necessary. ESET
1: block is commanded to sleep at next available moment.
15 SMB3 Sleep Enable R/W 0h VCC1_R
0: block is free to use clocks as necessary. ESET
1: block is commanded to sleep at next available moment.
14 SMB2 Sleep Enable R/W 0h VCC1_R
0: block is free to use clocks as necessary. ESET
1: block is commanded to sleep at next available moment.
13 SMB1 Sleep Enable R/W 0h VCC1_R
0: block is free to use clocks as necessary. ESET
1: block is commanded to sleep at next available moment.
12 RPM-PWM Sleep Enable R/W 0h VCC1_R
0: block is free to use clocks as necessary. ESET
1: block is commanded to sleep at next available moment.
11 KEYSCAN Sleep Enable R/W 0h VCC1_R
0: block is free to use clocks as necessary. ESET
1: block is commanded to sleep at next available moment.
10 HTIMER Sleep Enable R/W 0h VCC1_R
0: block is free to use clocks as necessary. ESET
1: block is commanded to sleep at next available moment.
9 SPI0 Sleep Enable R/W 0h VCC1_R
0: block is free to use clocks as necessary. ESET
1: block is commanded to sleep at next available moment.
8 PS2_3 Sleep Enable R/W 0h VCC1_R
0: block is free to use clocks as necessary. ESET
1: block is commanded to sleep at next available moment.
See Note 3-14.
Reset
Bits Description Type Default
Event
7 PS2_2 Sleep Enable R/W 0h VCC1_R
0: block is free to use clocks as necessary. ESET
1: block is commanded to sleep at next available moment.
See Note 3-14.
6 PS2_1 Sleep Enable R/W 0h VCC1_R
0: block is free to use clocks as necessary. ESET
1: block is commanded to sleep at next available moment.
See Note 3-14.
5 PS2_0 Sleep Enable R/W 0h VCC1_R
0: block is free to use clocks as necessary. ESET
1: block is commanded to sleep at next available moment.
See Note 3-14.
4 MCHP Reserved (Note 3-10) R/W 0h VCC1_R
ESET
3 ADC Sleep Enable (Note 3-13) R/W 0h VCC1_R
0: block is free to use clocks as necessary. ESET
1: block is commanded to sleep at next available moment.
2:0 Reserved R
Note 3-13 The ADC VREF must be powered down in order to get the lowest deep sleep current. The ADC
VREF Power down bit, ADC_VREF_PD_REF is in the EC Subsystem Registers ADC VREF PD on
page 381.
Note 3-14 The PS2 block will only sleep while the PS2 is disabled or in Rx mode with no traffic on the bus.
Offset 28h
Reset
Bits Description Type Default
Event
31:29 RESERVED RES
28 MCHP Reserved R 0h VCC1_R
ESET
27 MCHP Reserved R 0h VCC1_R
ESET
26 MCHP Reserved R 0h VCC1_R
ESET
25 LED3 Clock Required R 0h VCC1_R
0: block does NOT need clocks. ESET
1: block requires clocks.
24 TIMER32_1 Clock Required R 0h VCC1_R
0: block does NOT need clocks. ESET
1: block requires clocks.
23 TIMER32_0 Clock Required R 0h VCC1_R
0: block does NOT need clocks. ESET
1: block requires clocks.
Reset
Bits Description Type Default
Event
22 TIMER16_3 Clock Required R 0h VCC1_R
0: block does NOT need clocks. ESET
1: block requires clocks.
21 TIMER16_2_Clock Required R 0h VCC1_R
0: block does NOT need clocks. ESET
1: block requires clocks.
20 SPI1 Clock Required R 0h VCC1_R
0: block does NOT need clocks. ESET
1: block requires clocks.
19 BCM Clock Required R 0h VCC1_R
0: block does NOT need clocks. ESET
1: block requires clocks.
18 LED2 Clock Required R 0h VCC1_R
0: block does NOT need clocks. ESET
1: block requires clocks.
17 LED1 Clock Required R 0h VCC1_R
0: block does NOT need clocks. ESET
1: block requires clocks.
16 LED0 Clock Required R 0h VCC1_R
0: block does NOT need clocks. ESET
1: block requires clocks.
15 SMB3 Clock Required R 0h VCC1_R
0: block does NOT need clocks. ESET
1: block requires clocks.
14 SMB2 Clock Required R 0h VCC1_R
0: block does NOT need clocks. ESET
1: block requires clocks.
13 SMB1 Clock Required R 0h VCC1_R
0: block does NOT need clocks. ESET
1: block requires clocks.
12 RPM-PWM Clock Required R 0h VCC1_R
0: block does NOT need clocks. ESET
1: block requires clocks.
11 KEYSCAN Clock Required R 0h VCC1_R
0: block does NOT need clocks. ESET
1: block requires clocks.
10 HTIMER Clock Required R 0h VCC1_R
0: block does NOT need clocks. ESET
1: block requires clocks.
9 SPI0 Clock Required R 0h VCC1_R
0: block does NOT need clocks. ESET
1: block requires clocks.
8 PS2_3 Clock Required R 0h VCC1_R
0: block does NOT need clocks. ESET
1: block requires clocks.
7 PS2_2 Clock Required R 0h VCC1_R
0: block does NOT need clocks. ESET
1: block requires clocks.
Reset
Bits Description Type Default
Event
6 PS2_1 Clock Required R 0h VCC1_R
0: block does NOT need clocks. ESET
1: block requires clocks.
5 PS2_0 Clock Required R 0h VCC1_R
0: block does NOT need clocks. ESET
1: block requires clocks.
4 MCHP Reserved R 0h VCC1_R
ESET
3 ADC Clock Required R 0h VCC1_R
0: block does NOT need clocks. ESET
1: block requires clocks.
2:0 RESERVED RES
Offset 2Ch
Reset
Bits Description Type Default
Event
31:10 RESERVED RES
9:0 Slow Clock (100 kHz) Divide Value R/W 1E0h VCC1_R
Configures the 100kHz_Clk. ESET
0: Clock off
n: divide by n.
Note: The default setting is for 100 kHz.
Offset 30h
Reset
Bits Description Type Default
Event
31:9 RESERVED RES
8 OSC_LOCK R 0h VCC1_R
Oscillator Lock Status ESET
7:0 MCHP Reserved R N/A VCC1_R
ESET
Offset 34h
Reset
Bits Description Type Default
Event
31:12 RESERVED RES
11 PCICLK_ACTIVE R - VCC1_R
This bit monitors the state of the PCI clock input. This status bit ESET
detects edges on the clock input but does not validate the frequency.
0: The 33MHz PCI clock input is not present.
1: The 33MHz PCI clock is present.
10 32K_ACTIVE R - VCC1_R
This bit monitors the state of the 32K clock input. This status bit ESET
detects edges on the clock input but does not validate the frequency.
0: The 32K clock input is not present. The internal 32K clock is
derived from the ring oscillator
1: The 32K clock input is present. The internal 32K clock is derived
from the pin and the ring oscillator is synchronized to the external
32K clock.
9:7 RESERVED RES
6 VCC1 reset status R/WC 1h VCC1_R
Indicates the status of VCC1_RESET. ESET
0 = No reset occurred since the last time this bit was cleared.
1 = A reset occurred.
Note: The bit will not clear if a write 1 is attempted at the same
time that a VCC1_RST_N occurs, this way a reset event
is never missed.
5 VBAT reset status R/WC - VCC1_R
Indicates the status of VBAT_POR. ESET
0 = No reset occurred while VCC1 was off or since the last time this
bit was cleared.
1 = A reset occurred.
Note: The bit will not clear if a write 1 is attempted at the same
time that a VBAT_RST_N occurs, this way a reset event
is never missed.
4 RESERVED RES
3 SIO_Reset Status R xh Note 3-
Indicates the status of nSIO_RESET. 15
0 = reset active.
1 = reset not active.
2 VCC Reset Status R xh Note 3-
Indicates the status of PWRGD. 15
0 = reset active (PWRGD not asserted).
1 = reset not active (PWRGD asserted).
1:0 RESERVED RES
Note 3-15 This read-only status bit always reflects the current status of the event and is not affected by any
Reset events.
Offset 38h
Reset
Bits Description Type Default
Event
31:2 RESERVED RES
1 MCHP Reserved R 0h VCC1_R
ESET
0 MCHP Reserved R/W 0h VCC1_R
ESET
Note: If a block is configured such that it is to be reset when it goes to sleep, then registers within the block may
not be writable when the block is asleep.
Offset 3Ch
Reset
Bits Description Type Default
Event
31:19 RESERVED RES
18 RTC Reset Enable R/W 0h VCC1_R
0: block will not be reset on sleep. ESET
1: block will be reset on sleep.
17 RESERVED RES
16 8042EM Reset Enable R/W 0h VCC1_R
0: block will not be reset on sleep. ESET
1: block will be reset on sleep.
15 ACPI PM1 Reset Enable R/W 0h VCC1_R
0: block will not be reset on sleep. ESET
1: block will be reset on sleep.
14 ACPI EC 1 Reset Enable R/W 0h VCC1_R
0: block will not be reset on sleep. ESET
1: block will be reset on sleep.
13 ACPI EC 0 Reset Enable R/W 0h VCC1_R
0: block will not be reset on sleep. ESET
1: block will be reset on sleep.
12 GLBL_CFG Reset Enable R/W 0h VCC1_R
0: block will not be reset on sleep. ESET
1: block will be reset on sleep.
11:2 RESERVED RES
1 UART 0 Reset Enable R/W 0h VCC1_R
0: block will not be reset on sleep. ESET
1: block will be reset on sleep.
0 LPC Reset Enable R/W 0h VCC1_R
0: block will not be reset on sleep. ESET
1: block will be reset on sleep.
Note: If a block is configured such that it is to be reset when it goes to sleep, then registers within the block may
not be writable when the block is asleep.
Offset 40h
Reset
Bits Description Type Default
Event
31 TIMER16_1 Reset Enable R/W 0h VCC1_R
0: block will not be reset on sleep. ESET
1: block will be reset on sleep.
30 TIMER16_0 Reset Enable R/W 0h VCC1_R
0: block will not be reset on sleep. ESET
1: block will be reset on sleep.
29 EC_REG_BANK Reset Enable R/W 0h VCC1_R
0: block will not be reset on sleep. ESET
1: block will be reset on sleep.
28:23 RESERVED RES
22 PWM3 Reset Enable R/W 0h VCC1_R
0: block will not be reset on sleep. ESET
1: block will be reset on sleep.
21 PWM2 Reset Enable R/W 0h VCC1_R
0: block will not be reset on sleep. ESET
1: block will be reset on sleep.
20 PWM1 Reset Enable R/W 0h VCC1_R
0: block will not be reset on sleep. ESET
1: block will be reset on sleep.
19:12 RESERVED RES
11 TACH1 Reset Enable R/W 0h VCC1_R
0: block will not be reset on sleep. ESET
1: block will be reset on sleep.
10 SMB0 Reset Enable R/W 0h VCC1_R
0: block will not be reset on sleep. ESET
1: block will be reset on sleep.
9 WDT Reset Enable R/W 0h VCC1_R
0: block will not be reset on sleep. ESET
1: block will be reset on sleep.
8 PROCESSOR Sleep Enable R/W 0h VCC1_R
0: block will not be reset on sleep. ESET
1: block will be reset on sleep.
7 TFDP Reset Enable R/W 0h VCC1_R
0: block will not be reset on sleep. ESET
1: block will be reset on sleep.
6 DMA Reset Enable R/W 0h VCC1_R
0: block will not be reset on sleep. ESET
1: block will be reset on sleep.
5 PMC Reset Enable R/W 0h VCC1_R
0: block will not be reset on sleep. ESET
1: block will be reset on sleep.
4 PWM0 Reset Enable R/W 0h VCC1_R
0: block will not be reset on sleep. ESET
1: block will be reset on sleep.
Reset
Bits Description Type Default
Event
3 RESERVED RES
2 TACH0 Reset Enable R/W 0h VCC1_R
0: block will not be reset on sleep. ESET
1: block will be reset on sleep.
1 PECI Reset Enable R/W 0h VCC1_R
0: block will not be reset on sleep. ESET
1: block will be reset on sleep.
0 INT Reset Enable R/W 0h VCC1_R
0: block will not be reset on sleep. ESET
1: block will be reset on sleep.
Note: If a block is configured such that it is to be reset when it goes to sleep, then registers within the block may
not be writable when the block is asleep.
Offset 44h
Reset
Bits Description Type Default
Event
31:29 RESERVED RES
28 MCHP Reserved R/W 0h VCC1_R
ESET
27 MCHP Reserved R/W 0h VCC1_R
ESET
26 MCHP Reserved R/W 0h VCC1_R
ESET
25 LED3 Reset Enable R/W 0h VCC1_R
0: block will not be reset on sleep. ESET
1: block will be reset on sleep.
24 TIMER32_1 Reset Enable R/W 0h VCC1_R
0: block will not be reset on sleep. ESET
1: block will be reset on sleep.
23 TIMER32_0 Reset Enable R/W 0h VCC1_R
0: block will not be reset on sleep. ESET
1: block will be reset on sleep.
22 TIMER16_3 Reset Enable R/W 0h VCC1_R
0: block will not be reset on sleep. ESET
1: block will be reset on sleep.
21 TIMER16_2_Reset Enable R/W 0h VCC1_R
0: block will not be reset on sleep. ESET
1: block will be reset on sleep.
20 SPI1 Reset Enable R/W 0h VCC1_R
0: block will not be reset on sleep. ESET
1: block will be reset on sleep.
Reset
Bits Description Type Default
Event
19 BCM Reset Enable R/W 0h VCC1_R
0: block will not be reset on sleep. ESET
1: block will be reset on sleep.
18 LED2 Reset Enable R/W 0h VCC1_R
0: block will not be reset on sleep. ESET
1: block will be reset on sleep.
17 LED1 Reset Enable R/W 0h VCC1_R
0: block will not be reset on sleep. ESET
1: block will be reset on sleep.
16 LED0 Reset Enable R/W 0h VCC1_R
0: block will not be reset on sleep. ESET
1: block will be reset on sleep.
15 SMB3 Reset Enable R/W 0h VCC1_R
0: block will not be reset on sleep. ESET
1: block will be reset on sleep.
14 SMB2 Reset Enable R/W 0h VCC1_R
0: block will not be reset on sleep. ESET
1: block will be reset on sleep.
13 SMB1 Reset Enable R/W 0h VCC1_R
0: block will not be reset on sleep. ESET
1: block will be reset on sleep.
12 RPM-PWM Reset Enable R/W 0h VCC1_R
0: block will not be reset on sleep. ESET
1: block will be reset on sleep.
11 KEYSCAN Reset Enable R/W 0h VCC1_R
0: block will not be reset on sleep. ESET
1: block will be reset on sleep.
10 HTIMER Reset Enable R/W 0h VCC1_R
0: block will not be reset on sleep. ESET
1: block will be reset on sleep.
9 SPI0 Reset Enable R/W 0h VCC1_R
0: block is free to use clocks as necessary. ESET
1: block is commanded to sleep at next available moment.
8 PS2_3 Reset Enable R/W 0h VCC1_R
0: block will not be reset on sleep. ESET
1: block will be reset on sleep.
7 PS2_2 Reset Enable R/W 0h VCC1_R
0: block will not be reset on sleep. ESET
1: block will be reset on sleep.
6 PS2_1 Reset Enable R/W 0h VCC1_R
0: block will not be reset on sleep. ESET
1: block will be reset on sleep.
5 PS2_0 Reset Enable R/W 0h VCC1_R
0: block will not be reset on sleep. ESET
1: block will be reset on sleep.
4 MCHP Reserved R/W 0h VCC1_R
ESET
Reset
Bits Description Type Default
Event
3 ADC Reset Enable R/W 0h VCC1_R
0: block will not be reset on sleep. ESET
1: block will be reset on sleep.
2:0 RESERVED RES
Note: If a block is configured such that it is to be reset when it goes to sleep, then registers within the block may
not be writable when the block is asleep.
Offset 48h
Reset
Bits Description Type Default
Event
31:1 RESERVED RES
0 iRESET_OUT R/W 1h VCC1_R
The iRESET_OUT bit is used by firmware to control the internal ESET
nSIO_RESET signal function and the external nRESET_OUT pin.
The external pin nRESET_OUT is always driven by nSIO_RESET.
Firmware can program the state of iRESET_OUT except when the
VCC PWRGD bit is not asserted (‘0’), in which case iRESET_OUT is
‘don’t care’ and nSIO_RESET is asserted (‘0’) (TABLE 3-11:).
The iRESET_OUT bit must be cleared to take the Host out of reset.
4.1 Introduction
This chapter defines a bank of registers powered by VBAT.
4.2 Interface
This block is designed to be accessed internally by the EC via the register interface.
4.3.3 RESETS
4.4 Interrupts
4.6 Description
The VBAT Register Bank block is a block implemented for aggregating miscellaneous battery-backed registers required
the host and by the Embedded Controller (EC) Subsystem that are not unique to a block implemented in the EC sub-
system.
Address 00h
Reset
Bits Description Type Default
Event
7 VBAT_RST R/WC 1 VBAT_P
The VBAT RST bit is set to ‘1’ by hardware when a VBAT_POR is OR
detected. This is the register default value. To clear VBAT RST EC
firmware must write a ‘1’ to this bit; writing a ‘0’ to VBAT RST has no
affect.
6 Reserved RES - -
5 WDT R/WC 0 VBAT_P
The WDT bit is asserted (‘1’) following a Watch-Dog Timer Forced OR
Reset (WDT Event). To clear the WDT bit EC firmware must write a
‘1’ to this bit; writing a ‘0’ to the WDT bit has no affect.
4:1 Reserved RES - -
0 DET32K_IN R X VBAT_P
0 = No clock detected on the XTAL[1:2] pins. OR
1= Clock detected on the XTAL[1:2] pins.
Address 08h
Reset
Bits Description Type Default
Event
31:2 RESERVED RES - -
1 32K_EN R/W 0b VBAT_P
This bit controls the 32.768 KHz Crystal Oscillator as defined in OR
TABLE 4-6:.
0 XOSEL R/W 0b VBAT_P
This bit controls whether a crystal or single ended clock source is OR
used.
1= the 32.768 KHz Crystal Oscillator is driven by a single-ended
32.768 KHz clock source connected to the XTAL2 pin.
0= the 32.768 KHz Crystal Oscillator requires a 32.768 KHz parallel
resonant crystal connected between the XTAL1 and XTAL2 pins
(default).
APPLICATION NOTE: The XOSEL bit should be correctly configured by firmware before the 32K_EN bit is
assserted.
Note 4-2 the 48MHz Ring Oscillator must not stop before 40 μs min after the 32K_EN bit is asserted.
5.1 Introduction
The Intel® Low Pin Count (LPC) Interface is the LPC Interface used by the system host to configure the chip and com-
municate with the logical devices implemented in the design through a series of read/write registers. Register access is
accomplished through the LPC transfer cycles defined in Table 5-8, "LPC Cycle Types Supported".
The Logical Devices implemented in the design are identified in Table 5-16, “I/O Base Address Registers,” on page 92.
The Base Address Registers allow any logical device’s runtime registers to be relocated in LPC I/O space. All chip con-
figuration registers for the device are accessed indirectly through the LPC I/O Configuration Port (see Section 5.8.3,
"Configuration Port," on page 83).
LPC memory cycles may also be used to access the Base Address Registers of certain devices.
5.2 References
• Intel® Low Pin Count (LPC) Interface Specification, v1.1
• PCI Local Bus Specification, Rev. 2.2
• Serial IRQ Specification for PCI Systems Version 6.0.
• PCI Mobile Design Guide Rev 1.0
5.3 Terminology
This table defines specialized terms localized to this feature.
LPC Interface
(Logical Device Ch)
Serial IRQ
Configuration Port
Interface to LAD0
State Machine
Configuration LAD1
Registers
LAD2
LAD3
LFRAME#
LRESET#
LPC Config
Registers LCLK
Interface to Logical
SERIRQ
Device Register LPC Controller
CLKRUN#
LPC Regis-
ters
(Runtime,
EC-Only)
Note: The PCI_CLK input to LCLK can run at 19.2MHz to 33MHz. When the PCI_CLK input frequency is from
19.2MHz (including 24MHz) to 33MHz the Handshake bit in the EC Clock Control Register must be set to
a ‘1’ to capture LPC transactions properly. See Section 5.11.4, "EC Clock Control Register," on page 96.
5.5.3 RESETS
The following table defines the effective reset state that result from the combination of these three reset signals.
Note: See Section 5.8.1.3, "LPC Clock Run," on page 80 page 157 for LPC protocol dependent pin state transi-
tions requirements.
5.6 Interrupts
This section defines the Interrupt Sources generated from this block.
Source Description
LPC_INTERNAL_ERR The LPC_INTERNAL_ERR event is sourced by bit D0 of the Host Bus
Error Register.
5.8 Description
This LPC Controller is compliant with the Intel® Low Pin Count (LPC) Interface Specification, v1.1. Section 5.8.1, "LPC
Controller Description" further clarifies which LPC Interface features have been implemented and qualifies any system
specific requirements.
When the LPC Controller detects a transaction targeted for this device it claims and forwards that transaction as defined
in Section 5.8.2, "Claiming and Forwarding Transactions for Supported LPC Cycles," on page 81.
Note: All LPC transactions are synchronized to the LCLK and will complete with a maximum of 8 wait states,
unless otherwise noted.
USING CLKRUN#
CLKRUN# is used to indicate the status of LCLK as well as to request that a stopped clock be started. See FIGURE
5-2: CLKRUN# System Implementation Example on page 81, an example of a typical system implementation using
CLKRUN#.
LCLK Run Support can be enabled and disabled via SIRQ_MODE as shown in Table 5-9, "LPC Controller CLKRUN#
Function". When the SIRQ_MODE is ‘0,’ Serial IRQs are disabled, the CLKRUN# pin is disabled, and the affects of Inter-
rupt requests on CLKRUN# are ignored. When the SIRQ_MODE is ‘1,’ Serial IRQs are enabled, the CLKRUN# pin is
enabled, and the CLKRUN# support related to Interrupts requests as described in the section below is enabled.
The CLKRUN# pin is an open drain output and input. Refer to the PCI Mobile Design Guide Rev 1.0 for a description
of the CLKRUN# function. If CLKRUN# is sampled “high”, LCLK is stopped or stopping. If CLKRUN# is sampled “low”,
LCLK is starting or started (running).
Master Target
CLKRUN#
LCLK
2 CLKS MIN.
Note 1: The signal “ANY CHANGE” is the same as “CHANGE/ASSERTION” in Table 5-9.
2: The LPC Controller must continually monitor the state of CLKRUN# to maintain LCLK until an active “any
IRQ change” condition has been transferred to the host in a Serial IRQ cycle or “any DRQ assertion” con-
dition has been transferred to the host in a DMA cycle. For example, if “any IRQ change or DRQ assertion”
is asserted before CLKRUN# is de-asserted (not shown in Figure 5-3), the controller must assert CLKRUN#
as needed until the Serial IRQ cycle or DMA cycle has completed.
Note: The LPC Controller’s Base Address register is used to define the Base I/O Address of the Configuration
Port.
Note: The data read from the Configuration Port Data register is undefined when CONFIG MODE is not enabled.
The Configuration Port is composed of an INDEX and DATA Register. The INDEX register is used as an address pointer
to an 8-bit configuration register and the DATA register is used to read or write the data value from the indexed config-
uration register. Once CONFIG MODE is enabled, reading the Configuration Port Data register will return the data value
that is in the indexed Configuration Register.
If no value was written to the INDEX register, reading the Data Register in the Configuration Port will return the value in
Configuration Address location 00h (default).
LCLK
SERIRQ START
LCLK
Stop pulse is two clocks wide for Quiet mode, three clocks wide for Continuous mode.
There may be none, one, or more Idle states during the Stop Frame.
The next SERIRQ cycle’s Start Frame pulse may or may not start immediately after the turn-around clock of the Stop
Frame.
The SIRQ data frame will now support IRQ2 from a logical device; previously SERIRQ Period 3 was reserved for use
by the System Management Interrupt (LSMI#). When using Period 3 for IRQ2, the user should mask off the SMI via the
ESMI Mask Register. Likewise, when using Period 3 for LSMI#, the user should not configure any logical devices as
using IRQ2.
SERIRQ Period 14 is used to transfer IRQ13. Each Logical devices will have IRQ13 as a choice for their primary inter-
rupt.
5.8.4.4 Latency
Latency for IRQ/Data updates over the SERIRQ bus in bridge-less systems with the minimum IRQ/Data Frames of 17
will range up to 96 clocks (3.84μS with a 25 MHz LCLK or 2.88μs with a 33 MHz LCLK).
Note: If one or more PCI to PCI Bridge is added to a system, the latency for IRQ/Data updates from the secondary
or tertiary buses will be a few clocks longer for synchronous buses, and approximately double for asyn-
chronous buses.
Logical Device
SELECT DEVICE FRAME Interrupt Source
(Block Instance - Note 1:)
0 0 0h EMI EC-to-Host
0 0 7h UART 0 UART
1 0 9h Mailbox MBX_Host_SMI
Logical Device
SELECT DEVICE FRAME Interrupt Source
(Block Instance - Note 1:)
0 0 Bh RTC RTC
Note 1: The Block Instance number is only included if there are multiple instantiations of a block. Otherwise, single
block instances do not require this differentiation.
LD 00h-Int0 0
LD 00h- Int
LD 00h-Int1 1 ?
?
?
?
?
?
LD 3Fh-Int0 0
LD 3Fh- Int
SERIRQi
LD 3Fh-Int1 1 0
Source
1
Select
Note 5-8 The Begin Address indicates where the first register can be accessed in a particular address space
for a block instance.
Offset 30h
Reset
Bits Description Type Default
Event
7:1 RESERVED RES - -
0 ACTIVATE R/W 0b VCC1_R
1= Activate ESET
When this bit is 1, the LPC Logical Device is powered and functional.
0= Deactivate
When this bit is 0, the logical device is powered down and inactive.
Except for the LPC Activate Register itself, clocks to the block are
gated and the LPC Logical Device will permit the ring oscillator to be
shut down (see Section 5.11.4, "EC Clock Control Register," on
page 96). LPC bus output pads will be tri-stated.
APPLICATION NOTE: The bit in the LPC Activate Register should not be written ‘0’ to by the Host over LPC.
Offset See Table 5-15, “SIRQ Interrupt Configuration Register Map,” on page 90.
Reset
Bits Description Type Default
Event
7 SELECT R/W Note 5-9 nSIO_R
If this bit is 1, the first interrupt signal from the Logical Device is ESET
selected for the SERIRQ vector. If this bit is 0, the second interrupt
signal from the Logical Device is selected.
Note: The Keyboard Controller is an example of a Logical
Devices that requires a second interrupt signal. Most
Logical Devices require only a single interrupt and ignore
this field as result.
6 DEVICE R/W Note 5-9 nSIO_R
This field should always be set to 0 in order to enable a SERIRQ. ESET
5:0 FRAME R/W Note 5-9 nSIO_R
These six bits select the Logical Device for on-chip devices as the ESET
source for the interrupt.
Note: The LPC Logical Device (Logical Device Number 0Ch)
can be used by the Embedded Controller to generate a
Serial Interrupt Request to the Host under software con-
trol.
Note 5-9 See Table 5-15, “SIRQ Interrupt Configuration Register Map,” on page 90.
Note: A SERIRQ interrupt is deactivated by setting an entry in the SIRQ Interrupt Configuration Register Map to
FFh, which is the default reset value.
Note: Software should that insure that no two BARs map the same LPC I/O address. If two BARs do map to the
same address, the LPC_INTERNAL_ERR and BAR_CONFLICT status bits are set when an LPC access
is targeting the address with the BAR conflict.
The format of each BAR is summarized in Section 5.9.3.1, "I/O Base Address Register Format," on page 91.
Reset
Bits Description Type Default
Event
31:16 LPC Host Address R/W See Note 5-
These 16 bits are used to match LPC I/O addresses (Note 5- Table 5-16 10
11)
15 VALID R/W See Note 5-
If this bit is 1, the BAR is valid and will participate in LPC matches. If Table 5-16 10
it is 0 this BAR is ignored
14 DEVICE (device) R See Note 5-
This bit combined with FRAME constitute the Logical Device Num- Table 5-16 10
ber. DEVICE identifies the physical location of the logical device.
This bit should always be set to 0.
13:8 FRAME R See Note 5-
These 6 bits are used to specify a logical device frame number Table 5-16 10
within a bus. This field is multiplied by 400h to provide the frame
address within the peripheral bus address. Frame values for frames
corresponding to logical devices that are not present on the device
are invalid.
7:0 MASK R See Note 5-
These 8 bits are used to mask off address bits in the address match Table 5-16 10
between an LPC I/O address and the Host Address field of the
BARs, as described in Section 5.8.2.1, "I/O Transactions". A block of
up to 256 8-bit registers can be assigned to one base address.
Note 5-10 Offset 60h is the LPC Base Address register. The LPC Base Address register is only reset on
VCC1_RESET. However, bits[31:16] are reloaded on nSIO_RESET with the value in the LPC BAR
Init Register.
Note 5-11 Bits[31:16] LPC Host Address bit field in the LPC Base Address register at offset 60h must be written
LSB then MSB. This particular register has a shadow that lets the Host come in and write to the lower
byte of the 16-bit address, and the resulting 16-bit LPC Host address field does not update. Writing
to the upper byte triggers a full 16-bit field update.
Note 1: The default Base I/O Address of the Configuration Port can be relocated by programming the BAR register for
Logical Device Ch (LPC/Configuration Port) at offset 60h.
Note 2: The FRAME and MASK fields for these Legacy devices are not used to determine which LPC I/O addresses to
claim. The address range match is maintained within the blocks themselves.
Offset See Table 5-17, "Device Memory Base Address Register Default Values"
Reset
Bits Description Type Default
Event
47:16 HOST_ADDRESS[31:0] R/W See nSIO_R
These 32 bits are used to match LPC memory addresses. Table 5-17 ESET
15 VALID R/W See nSIO_R
If this bit is 1, the BAR is valid and will participate in LPC matches. If Table 5-17 ESET
it is 0 this BAR is ignored.
14 RESERVED RES - -
Offset See Table 5-17, "Device Memory Base Address Register Default Values"
Reset
Bits Description Type Default
Event
13:8 FRAME Note 5- See nSIO_R
These 6 bits are used to specify a logical device frame number within 12 Table 5-17 ESET
a bus. This field is multiplied by 400h to provide the frame address
within the peripheral bus address. In the MEC1322 Frame values for
frames corresponding to logical devices that are not present on the
MEC1322 are invalid.
7:0 MASK Note 5- See nSIO_R
These bits are used to mask off address bits in the address match 12 Table 5-17 ESET
between an LPC memory address and the Host Address field of the
BARs, as described in the following section.
Note 5-12 The Mask and Frame fields of all logical devices are read-only except for 3h (ACPI EC Channel 0).
Note 1: The VALID, DEVICE, FRAME and MASK fields are as shown in Table 5-16, "I/O Base Address Registers".
INSTANCE ADDRESS
INSTANCE NAME NUMBER HOST SPACE BEGIN ADDRESS
Note 1: The Begin Address indicates where the first register can be accessed in a particular address space for a
block instance.
2: The LPC Runtime registers are only accessible from the LPC interface and are used to implement the LPC
Configuration Port. They are not accessible by any other Host.
Note: The LPC Runtime Register space has been used to implement the INDEX and DATA registers in the Con-
figuration Port. In CONFIG_MODE, the Configuration Port is used to access the Configuration Registers.
Offset 00h
Reset
Bits Description Type Default
Event
7:0 INDEX R/W 0h VCC1_R
The INDEX register, which is part of the Configuration Port, is used ESET
as a pointer to a Configuration Register Address.
Note: For a description of accessing the Configuration Port see
Section 5.8.3, "Configuration Port," on page 83.
Offset 01h
Reset
Bits Description Type Default
Event
7:0 DATA R/W 0h VCC1_R
The DATA register, which is part of the Configuration Port, is used to ESET
read or write data to the register currently being selected by the
INDEX Register.
Note: For a description of accessing the Configuration Port see
Section 5.8.3, "Configuration Port," on page 83
The registers listed in Table 5-21, "EC-Only Register Summary" are for a single instance of the LPC Interface. Their
addresses are defined as a relative offset to the host base address defined in Table 5-20.
The following table defines the fixed host base address for each LPC Interface instance.
INSTANCE ADDRESS
INSTANCE NAME NUMBER HOST SPACE BEGIN ADDRESS
The Begin Address indicates where the first register can be accessed in a particular address space for a block instance.
Note: MCHP Reserved registers are read/write registers. Modifying these registers may have unwanted results.
Offset 04h
Reset
Bits Description Type Default
Event
31:2 RESERVED RES - -
1 LRESET_STATUS R 0h VCC1_R
ESET
This bit reflects the state of the LRESET# input pin. The LRE-
SET_Status is the inverse of the LRESET# pin.
When the LRESET_Status bit is ‘0b’, the LRESET# input pin is de-
asserted (that is, the pin has the value ‘1b’). When the LRESET_Sta-
tus bit is ‘1b’, the LRESET# input pin is asserted (that is, the pin has
the value ‘0b’).
0 MCHP Reserved R 0h VCC1_R
ESET
Offset 08h
Reset
Bits Description Type Default
Event
31:8 ErrorAddress[23:16] R 0h VCC1_R
This 24-bit field captures the 24-bit internal address of every LPC ESET
transaction whenever the bit LPC_INTERNAL_ERR in this register
is 0. When LPC_INTERNAL_ERR is 1 this register is not updated
but retains its previous value. When bus errors occur this field saves
the address of the first address that caused an error.
5 DMA_ERR R/WC 0h VCC1_R
This bit is set to 1 whenever EN_INTERNAL_ERR is 1 and an LPC ESET
DMA access causes an internal bus error. Once set, it remains set
until cleared by being written with a 1.
Reset
Bits Description Type Default
Event
4 CONFIG_ERR R/WC 0h VCC1_R
This bit is set to 1 whenever EN_INTERNAL_ERR is 1 and an LPC ESET
Configuration access causes an internal bus error. Once set, it
remains set until cleared by being written with a 1.
3 RUNTIME_ERR R/WC 0h VCC1_R
This bit is set to 1 whenever EN_INTERNAL_ERR is 1 and an LPC ESET
I/O access causes an internal bus error. This error will only occur if a
BAR is misconfigured. Once set, it remains set until cleared by being
written with a 1.
2 BAR_CONFLICT R/WC 0h VCC1_R
This bit is set to 1 whenever a BAR conflict occurs on an LPC ESET
address. A Bar conflict occurs when more than one BAR matches
the address during of an LPC cycle access. Once this bit is set, it
remains set until cleared by being written with a 1.
1 EN_INTERNAL_ERR R/WC 0h VCC1_R
When this bit is 0, only a BAR conflict, which occurs when two BARs ESET
match the same LPC I/O address, will cause LPC_INTERNAL_ERR
to be set. When this bit is 1, internal bus errors will also cause
LPC_INTERNAL_ERR to be set.
0 LPC_INTERNAL_ERR R/WC 0h VCC1_R
This bit is set whenever a BAR conflict or an internal bus error ESET
occurs as a result of an LPC access. Once set, it remains set until
cleared by being written with a 1. This signal may be used to gener-
ate interrupts. See Section 5.6, "Interrupts," on page 78.
Offset 0Ch
Reset
Bits Description Type Default
Event
31:1 RESERVED RES - -
0 EC_IRQ R/W 0h VCC1_R
If the LPC Logical Device is selected as the source for a Serial Inter- ESET
rupt Request by an Interrupt Configuration register (see Section
5.8.4.8, "SERIRQ Interrupts," on page 87), this bit is used as the
interrupt source.
Offset 10h
Reset
Bits Description Type Default
Event
31:3 RESERVED RES - -
2 Handshake RES 1h VCC1_
This bit controls throughput of LPC transactions. RESET
When this bit is a ‘0’ the part supports a 33MHz PCI Clock. When
this bit is a ‘1’, the part supports a PCI Clock from 19.2MHz (includ-
ing 24MHz) to 33MHz.
Reset
Bits Description Type Default
Event
1:0 Clock_Control R/W 0h VCC1_
RESET
This field controls when the host interface will permit the internal ring
oscillator to be shut down. The choices are as follows:
0h: Reserved
1h: The host interface will permit the internal clocks to be shut down
if the CLKRUN# signals “CLOCK STOP” and there are no pending
serial interrupt request or DMA requests from devices associated
with the device. The CLKRUN# signals “CLOCK STOP” by
CLKRUN# being high for 5 LPCCLK’s after the raising edge of
CLKRUN#
2h: The host interface will permit the ring oscillator to be shut down
after the completion of every LPC transaction. This mode may cause
an increase in the time to respond to LPC transactions if the ring
oscillator is off when the LPC transaction is detected.
3h: The ring oscillator is not permitted to shut down as long as the
host interface is active. When the ACTIVATE bit in the LPC Activate
Register is 0, the Host Interface will permit the ring oscillator to be
shut down and the Clock_Control Field is ignored. The Clock_Con-
trol Field only effects the Host Interface when the ACTIVATE bit in
the LPC Activate Register is 1.
Although the Host Interface can permit the internal oscillator to shut
down, it cannot turn the oscillator on in response to an LPC transac-
tion that occurs while the oscillator is off. In order to restart the oscil-
lator in order to complete an LPC transaction, EC firmware must
enable a wake interrupt on the LPC LFRAME# input. See the Appli-
cation Note in Section 15.8.1, "WAKE Generation" for details.
Offset 14h
Reset
Bits Description Type Default
Event
31:8 RESERVED RES - -
7:0 MCHP Reserved R 0h VCC1_R
ESET
Offset 18h
Reset
Bits Description Type Default
Event
31:2 RESERVED RES - -
1 MCHP Reserved R/W 0h VCC1_R
ESET
0 MCHP Reserved R/W 0h VCC1_R
ESET
Offset 20h
Reset
Bits Description Type Default
Event
31:0 BAR_Inhibit[31:0] R/W 0h VCC1_R
When bit Di of BAR_Inhibit is 1, the BAR for Logical Device i is dis- ESET
abled and its addresses will not be claimed on the LPC bus, inde-
pendent of the value of the Valid bit in the BAR.The association
between bits in BAR_Inhibit and Logical Devices is illustrated in
Table 5-22, "BAR Inhibit Device Map".
Offset 30h
Reset
Bits Description Type Default
Event
15:0 BAR_Init R/W 002Eh nSIO_R
This field is loaded into the LPC BAR at offset 60h on nSIO_RESET. ESET
6.1 Introduction
This chapter defines the mechanism to configure the device.
6.2 Terminology
This section documents terms used locally in this chapter. Common terminology that is used in the chip specification is
captured in the Chip-Level Terminology section.
6.3 Interface
This block is designed to be accessed via the Host accessible Configuration Port.
Chip-Level
Global Configuration Registers
Configuration Port
30h – FFh
]
:n
s[0
ic e
Dev
l
ca
gi
Lo
Note: Each logical device has a bank of Configuration registers that are accessible at offsets 30h to FFh via the
Configuration Port. The Logical Device number programmed in offset 07h determines which bank of con-
figuration registers is currently accessible.
6.4.3 RESETS
6.5 Interrupts
This block does not generate any interrupts.
6.7 Description
The Chip Configuration Registers are divided into two groups: Global Configuration Registers and Logical Device Con-
figuration registers. The following descriptions assume that the LPC interface has already been configured to operate
in CONFIG MODE.
• Global Configuration Registers are always accessible via the LPC Configuration Port.
• The Logical Device Configuration registers are only accessible via the LPC Configuration Port when the corre-
sponding Logical Device Number is loaded in the Logical Device Number register. The Logical Device Number
register is a Global Configuration Register.
There are 48 8-bit Global Configuration Registers (at offsets 00h through 2Fh), plus up to 208 8-bit registers associated
with each Logical Device. The Logical Device is selected with the Logical Device Number Register (Global Configuration
Register 07h).
Sequence to Access Logical Device Configuration Register:
a) Write the number of the Logical Device being accessed in the Logical Device Number Configuration Register by
writing 07h into the INDEX PORT and the Logical Device Number into the DATA PORT.
b) Write the address of the desired logical device configuration register to the INDEX PORT and then write or read
the value of the configuration register through the DATA PORT.
7.1 Introduction
This chapter contains a description of the ARM M4F Embedded Controller (EC).
The EC is built around an ARM® Cortex®-M4F Processor provided by Arm Ltd. (the “ARM M4F IP”). The ARM Cortex®
M4F is a full-featured 32-bit embedded processor, implementing the ARMv7-M THUMB instruction set and FPU instruc-
tion set in hardware.
The ARM M4F IP is configured as a Von Neumann, Byte-Addressable, Little-Endian architecture. It provides a single
unified 32-bit byte-level address, for a total direct addressing space of 4GByte. It has multiple bus interfaces, but these
express priorities of access to the chip-level resources (Instruction Fetch vs. Data RAM vs. others), and they do not
represent separate addressing spaces.
The ARM M4F IP has configurable options, which are selected as follows.
• Little-Endian byte ordering is selected at all times (hard-wired)
• Bit Banding feature is included for efficient bit-level access.
• Floating-Point Unit (FPU) is included, to implement the Floating-Point instruction set in hardware
• Debug features are included at “Ex+” level, defined as follows:
• DWT Unit provides 4 Data Watchpoint comparators and Execution Monitoring
• FPB Unit provides HW Breakpointing with 6 Instruction and 2 Literal (Read-Only Data) address comparators. The
FPB comparators are also available for Patching: remapping Instruction and Literal Data addresses.
• Trace features are included at “Full” level, defined as follows:
• DWT for reporting breakpoints and watchpoints
• ITM for profiling and to timestamp and output messages from instrumented firmware builds
• ETM for instruction tracing, and for enhanced reporting of Core and DWT events
• The ARM-defined HTM trace feature is not currently included.
• NVIC Interrupt controller with 8 priority levels and up to 240 individually-vectored interrupt inputs.
• A Microchip-defined Interrupt Aggregator function (at chip level) may be used to group multiple interrupts onto sin-
gle NVIC inputs.
• The ARM-defined WIC feature is not currently included.
• Microchip Interrupt Aggregator function (at chip level) is expected to provide Wake control instead.
• The ARM-defined MPU feature is not currently included.
• Memory Protection functionality is not expected to be necessary.
7.2 References
• ARM Limited: Cortex®-M4 Technical Reference Manual, DDI0439C, 29 June 2010
• ARM Limited: ARM®v7-M Architecture Reference Manual, DDI0403D, November 2010
• NOTE: Filename DDI0403D_arm_architecture_v7m_reference_manual_errata_markup_1_0.pdf
• ARM® Generic Interrupt Controller Architecture version 1.0 Architecture Specification, IHI0048A, September 2008
• ARM Limited: AMBA® Specification (Rev 2.0), IHI0011A, 13 May 1999
• ARM Limited: AMBA® 3 AHB-Lite Protocol Specification, IHI0033A, 6 June 2006
• ARM Limited: AMBA® 3 ATB Protocol Specification, IHI0032A, 19 June 2006
• ARM Limited: Cortex-M™ System Design Kit Technical Reference Manual, DDI0479B, 16 June 2011
• ARM Limited: CoreSight™ v1.0 Architecture Specification, IHI0029B, 24 March 2005
• ARM Limited: CoreSight™ Components Technical Reference Manual, DDI0314H, 10 July 2009
• ARM Limited: ARM® Debug Interface v5 Architecture Specification, IHI0031A, 8 February 2006
• ARM Limited: ARM® Debug Interface v5 Architecture Specification ADIv5.1 Supplement, DSA09-PRDC-008772,
17 August 2009
• ARM Limited: Embedded Trace Macrocell™ (ETMv1.0 to ETMv3.5) Architecture Specification, IHI0014Q, 23 Sep-
tember 2011
• ARM Limited: CoreSight™ ETM™-M4 Technical Reference Manual, DDI0440C, 29 June 2010
FIGURE 7-1: ARM M4F BASED EMBEDDED CONTROLLER I/O BLOCK DIAGRAM
DAP Debug
Debug Access Port Mux
Host
Aggregator
Interrupts
Vectored
Interrupt
Interrupt
Controller
Processor
Core w/ FPU
Grouped
Unconditionally
(Summary)
Grouped Inputs
Interrupts
Clock Chip-Level
Gate Clock
Processor
ICode DCode System Clock
Interface Interface Interface Divider
(AHB-Lite) (AHB-Lite) (AHB-Lite)
Processor Reset
Core Reset (POR)
Memory Memory AMBA 2
Bus Adapt Bus Adapt AHB Adapt
Misc. Sideband
Code Data AHB
Port Port Port
Chip-Level
PMC Block System Bus
(RAM / ROM) (AMBA 2 AHB)
7.6.3 RESETS
The reset interface from the chip level is given below.
7.7 Interrupts
The ARM M4F Based Embedded Controller is equipped with an Interrupt Interface to respond to interrupts. These inputs
go to the IP’s NVIC block after a small amount of hardware processing to ensure their detection at varying clock rates.
See FIGURE 7-1: ARM M4F Based Embedded Controller I/O Block Diagram on page 107.
As shown in Figure 7-1, an Interrupt Aggregator block may exist at the chip level, to allow multiple related interrupts to
be grouped onto the same NVIC input, and so allowing them to be serviced using the same vector. This may allow the
same interrupt handler to be invoked for a group of related interrupt inputs. It may also be used to expand the total num-
ber of interrupt inputs that can be serviced.
Connections to the chip-level system are given in Table 15-3, “Interrupt Event Aggregator Routing Summary,” on
page 195.
The NMI (Non-Maskable Interrupt) connection is tied off and not used.
7.9 Description
7.9.1 BUS CONNECTIONS
There are three bus connections used from MEC1322 EC block, which are directly related to the IP bus ports. See FIG-
URE 7-1: ARM M4F Based Embedded Controller I/O Block Diagram on page 107.
For the mapping of addresses at the chip level, see Chapter 2.0, "Block Overview," on page 45.
APPLICATION NOTE: Registers with properties such as Write-1-to-Clear (W1C), Read-to-Clear and FIFOs need to
be handled with appropriate care when being used with the bit band alias addressing
scheme. Accessing such a register through a bit band alias address will cause the hardware
to perform a read-modify-write, and if a W1C-type bit is set, it will get cleared with such an
access. For example, using a bit band access to the Interrupt Aggregator, including the
Interrupt Enables and Block Interrupt Status to clear an IRQ will clear all active IRQs.
Note: 120KBytes are available for application code as follows: 96K Optimized for Code, 24K Optimized for Data.
The distinction between “96KB optimized for instructions” and “32KB optimized for data” SRAMs: is as follows:
The MEC1322 has two blocks of SRAM, one of 96KB and one of 32KB. Both can be used for either instructions or
data. As long as the ARM fetches instructions from one SRAM and does loads and stores to the other, code and data
accesses operate in parallel and there are no wait states. If on the same cycle the ARM fetches an instruction and
does a load or a store to the same SRAM, either the code fetch will be delayed by one cycle or the data access will be
delayed by one cycle. The 96KB SRAM is optimized for instructions, in that if the ARM accesses this SRAM for both
instructions and data on the same cycle, the instruction fetch will complete in one cycle and the load/store will be
delayed for one cycle. The 32KB SRAM is optimized for data, in that if the ARM accesses this SRAM for both
instructions and data on the same cycle, the load/store will complete in once cycle and the instruction fetch will be
delayed for one cycle. In both cases, the SRAM arbiter ensures that the arbitration loser will win on subsequent cycles
and thus will not be locked out of the SRAM indefinitely. User applications, therefore, are free to allocate code and data
anywhere in the 128KB SRAM address space, except that there will be an occasional small performance hit if both
code and data are allocated in the same SRAM.
The application loader in the MEC1322 ROM requires the top 8KB of the 32KB SRAM in order to perform its functions.
The user can therefore load a maximum of 120KB into SRAM using the ROM loader. Once the ROM application loader
has completed its operation, the entire 128KB address space can be allocated to whatever functions, code or data, the
user wishes.
The SRAM is located at EC Base address 00100000h in 32-bit internal address space.
Note: 120KB is available for application code in the address range 00100000h to 0011DFFFh
ROM
The 32KByte Boot ROM is located at EC Base address 00000000h in 32-bit internal address space.
Note: 30KB is available for application code in the address range 00000000h to 000077FFh
0x4010_3FFF
SPB H ost
access
0x4000_0000
0x220F_FFFF
1M B D ata RAM
ARM
R eserved for AR M
access
Bit Band Alias only
Region
0x2200_0000
0x2000_7FFF
32KB Alias D ata H ost
R AM access
0x2000_0000
0x0011_FFFF ARM
32KB D ata R AM access
only
0x0011_8000
0x0011_7FFF
0x0010_0000
0x0000_7FFF
H ost
32KB Boot R O M read
access
0x0000_0000
9.1 Introduction
The Embedded Memory Interface (EMI) provides a standard run-time mechanism for the system host to communicate
with the Embedded Controller (EC) and other logical components. The Embedded Memory Interface includes 13 byte-
addressable registers in the Host’s address space, as well as 22 bytes of registers that are accessible only by the EC.
The Embedded Memory Interface can be used by the Host to access bytes of memory designated by the EC without
requiring any assistance from the EC. The EC may configure these regions of memory as read-only, write-only, or
read/write capable.
9.2 Interface
This block is designed to be accessed externally and internally via a register interface.
Host Interface
Signal Description
Clock Inputs
Resets
Interrupts
9.5.3 RESETS
9.6 Interrupts
This section defines the Interrupt Sources generated from this block.
HOST EMI EC
Embedded Memory
Addr Addr
Address
The Embedded Memory Interface (EMI) is composed of a mailbox, a direct memory interface, and an Application ID
register.
The mailbox contains two registers, the HOST-to-EC Mailbox Register and the EC-to-HOST Mailbox Register, that act
as a communication portal between the system host and the embedded controller. When the HOST-to-EC Mailbox Reg-
ister is written an interrupt is generated to the embedded controller. Similarly, when the EC-to-HOST Mailbox Register
is written an interrupt is generated to the system host. The source of the system host interrupt may be read in the Inter-
rupt Source Register. These interrupt events may be individually prevented from generating a Host Event via the Inter-
rupt Mask Register.
The direct memory interface, which is composed of a byte addressable 16-bit EC Address Register and a 32-bit EC
Data Register, permits the Host to read or write a portion of the EC’s internal address space. The embedded controller
may enable up to two regions of the EC’s internal address space to be exposed to the system host. The system host
may access these memory locations without intervention or assistance from the EC.
The Embedded Memory Interface can be configured so that data transfers between the Embedded Memory Interface
data bytes and the 32- bit internal address space may be multiple bytes, while Host I/O is always executed a byte at a
time.
When the Host reads one of the four bytes in the Embedded Memory Interface data register, data from the internal 32-
bit address space, at the address defined by the Embedded Memory Interface address register, is returned to the Host.
This read access will load 1, 2, or 4 bytes into the Data register depending on the configuration of the ACCESS_TYPE
bits. Similarly, writing one of the four bytes in the data register will write the corresponding byte(s) from the data register
into the internal 32-bit address space as indicated by the ACCESS_TYPE bits. This configuration option is done to
ensure that data the EC treats as 16-bit or 32-bit will be consistent in the Host, even though one byte of the data may
change between two or more 8-bit accesses by the Host.
In addition, there is an auto-increment function for the Embedded Memory Interface address register. When enabled,
the Host can read or write blocks of memory in the 32- bit internal address space by repeatedly accessing the Embedded
Memory Interface data register, without requiring Host updates to the Embedded Memory Interface address register.
Finally, the Application ID Register may be used by the host to provide an arbitration mechanism if more than one soft-
ware thread requires access through the EMI interface. See Section 9.8.4, "Embedded Memory Interface Usage," on
page 118 for more details.
No Host Access
Region_1_Read_Limit
Region_1_Write_Limit
Host Read/Write
Region_1_Base_Address
No Host Access
Region_0_Read_Limit
Region_0_Write_Limit
Host Read/Write
Region_0_Base_Address
No Host Access
0000_0000h
The Base addresses, the Read limits and the Write limits are defined by registers that are in the EC address space and
cannot be accessed by the Host. In each region, the Read limit need not be greater than the Write limit. The regions
can be contiguous or overlapping. For example, if the Region 0 Read limit is set to 0 and the Write limit is set to a positive
number, then the Embedded Memory interface defines a region in the EC memory that the EC can read and write but
is write-only for the host. This might be useful for storage of security data, which the Host might wish to send to the EC
but should not be readable in the event a virus invades the Host.
Each window into the EC memory can be as large as 32k bytes in the 32-bit internal address space. See FIGURE 8-1:
Memory Layout on page 113 for host accessible regions.
Note: The protocol used to pass commands back and forth through the Embedded Memory Interface Registers
Interface is left to the System designer. Microchip can provide an application example of working code in
which the host uses the Embedded Memory Interface registers to gain access to all of the EC registers.
Offset 00h
Reset
Bits Description Type Default
Event
7:0 HOST_EC_MBOX R/W 0h VCC1_R
8-bit mailbox used communicate information from the system host to ESET
the embedded controller. Writing this register generates an event to
notify the embedded controller.
The embedded controller has the option of clearing some or all of the
bits in this register. This is dependent on the protocol layer imple-
mented using the EMI Mailbox. The host must know this protocol to
determine the meaning of the value that will be reported on a read.
Offset 01h
Reset
Bits Description Type Default
Event
7:0 EC_HOST_MBOX R/WC 0h VCC1_R
8-bit mailbox used communicate information from the embedded ESET
controller to the system host. Writing this register generates an event
to notify the system host.
The system host has the option of clearing some or all of the bits in
this register. This is dependent on the protocol layer implemented
using the EMI Mailbox. The embedded controller must know this pro-
tocol to determine the meaning of the value that will be reported on a
read.
This bit field is aliased to the EC_HOST_MBOX bit field in the EC-to-
HOST Mailbox Register
9.9.3 EC ADDRESS LSB REGISTER
Offset 02h
Reset
Bits Description Type Default
Event
7:2 EC_ADDRESS_LSB R/W 0h VCC1_R
This field defines bits[7:2] of EC_Address [15:0]. Bits[1:0] of the ESET
EC_Address are always forced to 00b.
Reset
Bits Description Type Default
Event
1:0 ACCESS_TYPE R/W 0h VCC1_R
This field defines the type of access that occurs when the EC Data ESET
Register is read or written.
Offset 03h
Reset
Bits Description Type Default
Event
7 REGION R/W 0h VCC1_R
The field specifies which of two segments in the 32-bit internal ESET
address space is to be accessed by the EC_Address[14:2] to gener-
ate accesses to the memory.
Offset 04h
Reset
Bits Description Type Default
Event
7:0 EC_DATA_BYTE_0 R/W 0h VCC1_R
This is byte 0 (Least Significant Byte) of the 32-bit EC Data Register. ESET
Offset 05h
Reset
Bits Description Type Default
Event
7:0 EC_DATA_BYTE_1 R/W 0h VCC1_R
This is byte 1 of the 32-bit EC Data Register. ESET
Offset 06h
Reset
Bits Description Type Default
Event
7:0 EC_DATA_BYTE_2 R/W 0h VCC1_R
This is byte 2 of the 32-bit EC Data Register. ESET
Offset 07h
Reset
Bits Description Type Default
Event
7:0 EC_DATA_BYTE_3 R/W 0h VCC1_R
This is byte 3 (Most Significant Byte) of the 32-bit EC Data Register. ESET
Offset 08h
Reset
Bits Description Type Default
Event
7:1 EC_SWI_LSB R/WC 0h VCC1_R
EC Software Interrupt Least Significant Bits. These bits are software ESET
interrupt bits that may be set by the EC to notify the host of an event.
The meaning of these bits is dependent on the firmware implemen-
tation.
Each bit in this field is cleared when written with a ‘1b’. The ability to
clear the bit can be disabled by the EC if the corresponding bit in the
Host Clear Enable Register is set to ‘0b’. This may be used by firm-
ware for events that cannot be cleared while the event is still active.
Reset
Bits Description Type Default
Event
0 EC_WR R 0h VCC1_R
EC Mailbox Write. This bit is set when the EC-to-HOST Mailbox ESET
Register has been written by the EC at offset 01h of the EC-Only
registers.
Note: there is no corresponding mask bit in the Interrupt Mask LSB
Register
Offset 09h
Reset
Bits Description Type Default
Event
7:0 EC_SWI_MSB R/WC 0h VCC1_R
EC Software Interrupt Most Significant Bits. These bits are software ESET
interrupt bits that may be set by the EC to notify the host of an event.
The meaning of these bits is dependent on the firmware implemen-
tation.
Each bit in this field is cleared when written with a ‘1b’. The ability to
clear the bit can be disabled by the EC. if the corresponding bit in the
Host Clear Enable Register is set to ‘0b’. This may be used by firm-
ware for events that cannot be cleared while the event is still active.
9.9.11 INTERRUPT MASK LSB REGISTER
Offset 0Ah
Reset
Bits Description Type Default
Event
7:1 EC_SWI_EN_LSB R/W 0h VCC1_R
EC Software Interrupt Enable Least Significant Bits. Each bit that is ESET
set to ‘1b’ in this field enables the generation of a Host Event inter-
rupt by the corresponding bit in the EC_SWI field in the Interrupt
Source LSB Register.
0 MCHP Reserved R/W 0h VCC1_R
ESET
9.9.12 INTERRUPT MASK MSB REGISTER
Offset 0Bh
Reset
Bits Description Type Default
Event
7:0 EC_SWI_EN_MSB R/W 0h VCC1_R
EC Software Interrupt Enable Most Significant Bits. Each bit that is ESET
set to ‘1b’ in this field enables the generation of a Host Event inter-
rupt by the corresponding bit in the EC_SWI field in the Interrupt
Source MSB Register.
Offset 0Ch
Reset
Bits Description Type Default
Event
7:0 APPLICATION_ID R/W 0h VCC1_R
When this field is 00h it can be written with any value. When set to a ESET
non-zero value, writing that value will clear this register to 00h.
When set to a non-zero value, writing any value other than the cur-
rent contents will have no effect.
Instance
Block Instance Number Host Address Space Base Address
EMI 0 EC 32-bit internal 400F_0100h
address space
The Base Address indicates where the first register can be accessed in a particular address space for a block instance.
Offset 00h
Reset
Bits Description Type Default
Event
7:0 HOST_EC_MBOX R/WC 0h VCC1_R
8-bit mailbox used communicate information from the system host to ESET
the embedded controller. Writing this register generates an event to
notify the embedded controller.
Offset 01h
Reset
Bits Description Type Default
Event
7:0 EC_HOST_MBOX R/W 0h VCC1_R
8-bit mailbox used communicate information from the embedded ESET
controller to the system host. Writing this register generates an
event to notify the system host.
The system host has the option of clearing some or all of the bits in
this register. This is dependent on the protocol layer implemented
using the EMI Mailbox. The embedded controller must know this
protocol to determine the meaning of the value that will be reported
on a read.
Offset 04h
Reset
Bits Description Type Default
Event
31:2 MEMORY_BASE_ADDRESS_0 R/W 0h VCC1_R
This memory base address defines the beginning of region 0 in the ESET
Embedded Controller’s 32-bit internal address space. Memory allo-
cated to region 0 is intended to be shared between the Host and the
EC. The region defined by this base register is used when bit 15 of
the EC Address Register is 0. The access will be to a memory loca-
tion at an offset defined by the EC_Address relative to the beginning
of the region defined by this register. Therefore, a read or write to the
memory that is triggered by the EC Data Register will occur at Mem-
ory_Base_Address_0 + EC_Address.
1:0 Reserved R - -
9.10.4 MEMORY READ LIMIT 0 REGISTER
Offset 08h
Reset
Bits Description Type Default
Event
15 Reserved R - -
14:2 MEMORY_READ_LIMIT_0 R/W 0h VCC1_R
Whenever a read of any byte in the EC Data Register is attempted, ESET
and bit 15 of EC_Address is 0, the field EC_Address[14:2] in the
EC_Address_Register is compared to this field. As long as EC_Ad-
dress[14:2] is less than this field the EC_Data_Register will be
loaded from the 24-bit internal address space.
1:0 Reserved R - -
Offset 0Ah
Reset
Bits Description Type Default
Event
15 Reserved R - -
14:2 MEMORY_WRITE_LIMIT_0 R/W 0h VCC1_R
Whenever a write of any byte in EC DATA Register is attempted and ESET
bit 15 of EC_Address is 0, the field EC_ADDRESS_MSB in the
EC_Address Register is compared to this field. As long as EC_Ad-
dress[14:2] is less than Memory_Write_Limit_0[14:2] the addressed
bytes in the EC DATA Register will be written into the internal 24-bit
address space. If EC_Address[14:2] is greater than or equal to the
Memory_Write_Limit_0[14:2] no writes will take place.
1:0 Reserved R - -
9.10.6 MEMORY BASE ADDRESS 1 REGISTER
Offset 0Ch
Reset
Bits Description Type Default
Event
31:2 MEMORY_BASE_ADDRESS_1 R/W 0h VCC1_R
This memory base address defines the beginning of region 1 in the ESET
Embedded Controller’s 32-bit internal address space. Memory allo-
cated to region 1 is intended to be shared between the Host and the
EC. The region defined by this base register is used when bit 15 of
the EC Address Register is 1. The access will be to a memory loca-
tion at an offset defined by the EC_Address relative to the beginning
of the region defined by this register. Therefore, a read or write to the
memory that is triggered by the EC Data Register will occur at Mem-
ory_Base_Address_1 + EC_Address.
1:0 Reserved R - -
Offset 10h
Reset
Bits Description Type Default
Event
15 Reserved R - -
14:2 MEMORY_READ_LIMIT_1 R/W 0h VCC1_R
Whenever a read of any byte in the EC Data Register is attempted, ESET
and bit 15 of EC_ADDRESS is 1, the field EC_ADDRESS in the
EC_Address_Register is compared to this field. As long as EC_AD-
DRESS is less than this value, the EC_Data_Register will be loaded
from the 24-bit internal address space.
1:0 Reserved R - -
Offset 12h
Reset
Bits Description Type Default
Event
15 Reserved R - -
14:2 MEMORY_WRITE_LIMIT_1 R/W 0h VCC1_R
Whenever a write of any byte in EC DATA Register is attempted and ESET
bit 15 of EC_Address is 1, the field EC_Address[14:2] in the EC_Ad-
dress Register is compared to this field. As long as EC_Ad-
dress[14:2] is less than Memory_Write_Limit_1[14:2] the addressed
bytes in the EC DATA Register will be written into the internal 24-bit
address space. If EC_Address[14:2] is greater than or equal to the
Memory_Write_Limit_1[14:2] no writes will take place.
1:0 Reserved R - -
9.10.9 INTERRUPT SET REGISTER
Offset 14h
Reset
Bits Description Type Default
Event
15:1 EC_SWI_SET R/WS 0h VCC1_R
EC Software Interrupt Set. This register provides the EC with a ESET
means of updating the Interrupt Source Registers. Writing a bit in
this field with a ‘1b’ sets the corresponding bit in the Interrupt Source
Register to ‘1b’. Writing a bit in this field with a ‘0b’ has no effect.
Reading this field returns the current contents of the Interrupt Source
Register.
0 Reserved R - -
9.10.10 HOST CLEAR ENABLE REGISTER
Offset 16h
Reset
Bits Description Type Default
Event
15:1 HOST_CLEAR_ENABLE R/W 0h VCC1_R
When a bit in this field is ‘0b’, the corresponding bit in the Interrupt ESET
Source Register cannot be cleared by writes to the Interrupt Source
Register. When a bit in this field is ‘1b’, the corresponding bit in the
Interrupt Source Register can be cleared when that register bit is
written with a ‘1b’.
These bits allow the EC to control whether the status bits in the Inter-
rupt Source Register are based on an edge or level event.
0 Reserved R - -
10.1 Introduction
The ACPI Embedded Controller Interface (ACPI-ECI) is a Host/EC Message Interface. The ACPI specification defines
the standard hardware and software communications interface between the OS and an embedded controller. This inter-
face allows the OS to support a standard driver that can directly communicate with the embedded controller, allowing
other drivers within the system to communicate with and use the EC resources; for example, Smart Battery and AML
code.
The ACPI Embedded Controller Interface (ACPI-ECI) provides a four byte full duplex data interface which is a superset
of the standard ACPI Embedded Controller Interface (ACPI-ECI) one byte data interface. The ACPI Embedded Control-
ler Interface (ACPI-ECI) defaults to the standard one byte interface.
The MEC1322 has two instances of the ACPI Embedded Controller Interface.
1. The EC host in Table 10-8 and Table 10-10 corresponds to the EC in the ACPI specification. This interface is
referred to elsewhere in this chapter as ACPI_EC.
2. The LPC host in Table 10-8 and Table 10-10 corresponds to the “System Host Interface to OS” in the ACPI
specification. This interface is referred to elsewhere in this chapter as ACPI_OS.
10.2 References
• Advanced Configuration and Power Interface Specification, Revision 4.0 June 16, 2009, Hewlett-Packard Corpo-
ration Intel Corporation Microsoft Corporation Phoenix Technologies Ltd. Toshiba Corporation
10.3 Terminology
Signal Description
Power, Clocks and Reset
Interrupts
10.7.3 RESETS
Note: The usage model from the ACPI specification requires both SMI’s and SCI’s. The ACPI_OS SMI & SCI
interrupts are not implemented in the ACPI Embedded Controller Interface (ACPI-ECI). The SMI_EVT and
SCI_EVT bits in the OS STATUS OS Register are software flags and this block do not initiate SMI or SCI
events.
10.10 Description
The ACPI Embedded Controller Interface (ACPI-ECI) provides an APCI-EC interface that adheres to the ACPI specifi-
cation. The ACPI Embedded Controller Interface (ACPI-ECI) includes two modes of operation: Legacy Mode and Four-
byte Mode.
The ACPI Embedded Controller Interface (ACPI-ECI) defaults to Legacy Mode which provides single byte Full Duplex
operation. Legacy Mode corresponds to the ACPI specification functionality as illustrated in FIGURE 10-2: on page 131.
The EC interrupts in FIGURE 10-2: on page 131 are implemented as EC_OBF & EC_IBF. See Section 10.8, "Inter-
rupts," on page 130.
In Four-byte Mode, the ACPI Embedded Controller Interface (ACPI-ECI) provides four byte Full Duplex operation. Four-
byte Mode is a superset of the ACPI specification functionality as illustrated in FIGURE 10-2: on page 131.
Both Legacy Mode & Four-byte Mode provide Full Duplex Communications which allows data/command transfers in
one direction while maintaining data from the other direction; communications can flow both ways simultaneously.
In Legacy Mode, ACPI Embedded Controller Interface (ACPI-ECI) contains three registers: ACPI OS COMMAND Reg-
ister, OS STATUS OS Register, and OS2EC Data EC Byte 0 Register. The standard ACPI Embedded Controller Inter-
face (ACPI-ECI) registers occupy two addresses in the ACPI_OS space (Table 10-9).
The OS2EC Data EC Byte 0 Register and ACPI OS COMMAND Register registers appear as a single 8-bit data register
in the ACPI_EC. The CMD bit in the OS STATUS OS Register is used by the ACPI_EC to discriminate commands from
data written by the ACPI_OS to the ACPI_EC. CMD bit is controlled by hardware: ACPI_OS writes to the OS2EC Data
EC Byte 0 Register register clear the CMD bit; ACPI_OS writes to the ACPI OS COMMAND Register set the CMD bit.
Legacy Mode
Data
Single Byte
Full Duplex
Data flow in each
direction indipendent
Data
Single
Byte
System Command
EC
Host
Processor
Interface
Interface
to OS
Status
Control Register
Four-byte Mode
Data
0
1
2
3
Full Duplex
Data flow in each
direction indipendent
Data
0
1
2
System
3 EC
Host
Interface Processor
to OS Interface
Command
Status
Control Register
Table 10-7, "EC-Only Registers Summary" indicates the aliasing from EC-Only to Runtime registers. The “Host/EC
Access” column distinguishes the aliasing based on access type. See individual register descriptions for more details.
Note: The Runtime registers may be accessed by the EC but typically the Host will access the Runtime Registers
and the EC will access just the EC-Only registers.
Offset 00h
Reset
Bits Description Type Default
Event
7:0 ACPI_OS_DATA_BYTE_0 R/W 0h VCC1_R
This is byte 0 of the 32-bit ACPI-OS DATA BYTES[3:0]. ESET
When the FOUR_BYTE_ACCESS bit in the OS Byte Control Register is cleared to ‘0’, the following access rules apply:
1. Writes to the ACPI OS Data Register Byte 0 Register sets the IBF bit in the OS STATUS OS Register.
2. Reads from the ACPI OS Data Register Byte 0 Register clears the OBF bit in the OS STATUS OS Register.
3. All writes to ACPI-OS DATA BYTES[3:1] complete without error but the data are not registered.
4. All reads from ACPI-OS DATA BYTES[3:1] return 00h without error.
5. Access to ACPI-OS DATA BYTES[3:1] has no effect on the IBF & OBF bits in the OS STATUS OS Register.
When the Four Byte Access bit in the OS Byte Control Register is set to ‘1’, the following access rules apply:
1. Writes to the ACPI OS Data Register Byte 3 Register sets the IBF bit in the OS STATUS OS Register.
2. Reads from the ACPI OS Data Register Byte 3 Register clears the OBF bit in the OS STATUS OS Register.
Offset 01h
Reset
Bits Description Type Default
Event
7:0 ACPI_OS_DATA_BYTE_1 R/W 0h VCC1_R
This is byte 1 of the 32-bit ACPI-OS DATA BYTES[3:0]. ESET
Offset 02h
Reset
Bits Description Type Default
Event
7:0 ACPI_OS_DATA_BYTE_2 R/W 0h VCC1_R
This is byte 2 of the 32-bit ACPI-OS DATA BYTES[3:0]. ESET
Offset 03h
Reset
Bits Description Type Default
Event
7:0 ACPI_OS_DATA_BYTE_3 R/W 0h VCC1_R
This is byte 3 of the 32-bit ACPI-OS DATA BYTES[3:0]. ESET
Offset 04h
Reset
Bits Description Type Default
Event
7:0 ACPI_OSS_COMMAND W 0h VCC1_R
Writes to the this register are aliased in the OS2EC Data EC Byte 0 ESET
Register.
Writes to the this register also set the CMD and IBF bits in the OS
STATUS OS Register
10.12.6 OS STATUS OS REGISTER
This read-only register is aliased to the EC STATUS Register on page 143. the EC STATUS Register on page 143 has
read write access.
Offset 04h
Reset
Bits Description Type Default
Event
7 UD0B R 0b VCC1_R
User Defined ESET
6 SMI_EVT R 0b VCC1_R
This bit is set when an SMI event is pending; i.e., the ACPI_EC is ESET
requesting an SMI query; This bit is cleared when no SMI events
are pending.
This bit is an ACPI_EC-maintained software flag that is set when
the ACPI_EC has detected an internal event that requires system
management interrupt handler attention. The ACPI_EC sets this bit
before generating an SMI.
Note: The usage model from the ACPI specification requires
both SMI’s and SCI’s. The ACPI_OS SMI & SCI inter-
rupts are not implemented in the ACPI Embedded Con-
troller Interface (ACPI-ECI). The SMI_EVT and
SCI_EVT bits in the OS STATUS OS Register are soft-
ware flags and this block do not initiate SMI or SCI
events.
5 SCI_EVT R 0b VCC1_R
This bit is set by software when an SCI event is pending; i.e., the ESET
ACPI_EC is requesting an SCI query; SCI Event flag is clear when
no SCI events are pending.
This bit is an ACPI_EC-maintained software flag that is set when
the embedded controller has detected an internal event that
requires operating system attention. The ACPI_EC sets this bit
before generating an SCI to the OS.
Note: The usage model from the ACPI specification requires
both SMI’s and SCI’s. The ACPI_OS SMI & SCI inter-
rupts are not implemented in the ACPI Embedded Con-
troller Interface (ACPI-ECI). The SMI_EVT and
SCI_EVT bits in the OS STATUS OS Register are soft-
ware flags and this block do not initiate SMI or SCI
events.
Reset
Bits Description Type Default
Event
4 BURST R 0b VCC1_R
The BURST bit is set when the ACPI_EC is in Burst Mode for polled ESET
command processing; the BURST bit is cleared when the ACPI_EC
is in Normal mode for interrupt-driven command processing.
The BURST bit is an ACPI_EC-maintained software flag that indi-
cates the embedded controller has received the Burst Enable com-
mand from the host, has halted normal processing, and is waiting
for a series of commands to be sent from the host. Burst Mode
allows the OS or system management handler to quickly read and
write several bytes of data at a time without the overhead of SCIs
between commands.
The BURST bit is maintained by ACPI_EC software, only.
3 CMD R 0b VCC1_R
This bit is set when the OS2EC Data EC Byte 0 Register contains a ESET
command byte written into ACPI OS COMMAND Register; this bit is
cleared when the OS2EC DATA BYTES[3:0] contains a data byte
written into the ACPI-OS DATA BYTES[3:0].
Reset
Bits Description Type Default
Event
1 IBF R 0h VCC1_R
The Input Buffer Full bit is set to indicate that a the ACPI_OS has ESET
written a command or data to the ACPI_EC and that data is ready.
This bit is automatically cleared when data has been read by the
ACPI_EC.
Note: The setting and clearing of this IBF varies depending on
the setting of the following bits: CMD bit in this register
and FOUR_BYTE_ACCESS bit in the OS Byte Control
Register. Three scenarios follow:
1. The IBF is set when the ACPI_OS writes to the ACPI OS
COMMAND Register. This same write autonomously sets the
CMD bit in this register.
The IBF is cleared if the CMD bit in this register is set and the
ACPI_EC reads from the OS2EC Data EC Byte 0 Register.
Note: When CMD bit in this register is set the FOUR_BYTE_-
ACCESS bit in the OS Byte Control Register has no
impact on the IBF bit behavior.
2. A write by the to the ACPI_OS to the ACPI OS Data Register
Byte 0 Register sets the IBF bit if the FOUR_BYTE_ACCESS
bit in the OS Byte Control Register is in the cleared to ‘0’ state
prior to this write. This same write autonomously clears the
CMD bit in this register.
A read of the OS2EC Data EC Byte 0 Register clears the IBF bit if
the FOUR_BYTE_ACCESS bit in the OS Byte Control Register is in
the cleared to ‘0’ state prior to this read.
Reset
Bits Description Type Default
Event
0 OBF R 0h VCC1_R
The Output Buffer Full bit is set to indicate that a the ACPI_EC has ESET
written a data to the ACPI_OS and that data is ready. This bit is
automatically cleared when all the data has been read by the
ACPI_OS.
Note: The setting and clearing of this OBF varies depending
on the setting FOUR_BYTE_ACCESS bit in the OS Byte
Control Register. Two scenarios follow:
1. The OBF bit is set if the Four Byte Access bit in the OS Byte
Control Register is ‘0’ when the ACPI_EC writes to the
EC2OS Data EC Byte 0 Register.
The OBF is cleared if the Four Byte Access bit in the OS Byte Con-
trol Register is cleared to ‘0’ when the ACPI_OS reads from the
ACPI OS Data Register Byte 0 Register.
2. The OBF is set if the Four Byte Access bit in the OS Byte Con-
trol Register is set to ‘1’ when the ACPI_EC writes to the
EC2OS Data EC Byte 3 Register.
The OBF is cleared if the Four Byte Access bit in the OS Byte Con-
trol Register is set to ‘1’ when the ACPI_OS reads from the ACPI
OS Data Register Byte 3 Register.
Offset 05
Reset
Bits Description Type Default
Event
7:1 Reserved R - -
0 FOUR_BYTE_ACCESS R 0b VCC1_R
When this bit is set to ‘1’, the ACPI Embedded Controller Interface ESET
(ACPI-ECI) accesses four bytes through the ACPI-OS DATA
BYTES[3:0].
When this bit is cleared to ‘0’, the ACPI Embedded Controller Inter-
face (ACPI-ECI) accesses one byte through the ACPI OS Data Reg-
ister Byte 0 Register. The corresponds to Legacy Mode described in
Section 10.10, "Description," on page 130.
Note 1: This bit effects the behavior of the IBF & OBF bits in the
OS STATUS OS Register.
2: See ACPI-OS DATA BYTES[3:0] on page 135, OS2EC
DATA BYTES[3:0] on page 141, and EC2OS DATA
BYTES[3:0] on page 142 for detailed description of
access rules.
Note: The ACPI_OS access Base Address Register (BAR) should be configured to match the access width
selected by the Four Byte Access bit in the OS Byte Control Register. This BAR in not described in this
chapter.
Offset 108h
Reset
Bits Description Type Default
Event
7:0 OS_TO_EC_DATA_BYTE_0 R/W 0h VCC1_R
This is byte 0 of the 32-bit OS2EC DATA BYTES[3:0]. ESET
OS2EC DATA BYTES[3:0]
When the CMD bit in the OS STATUS OS Register is cleared to ‘0’, reads by the ACPI_EC from the OS2EC DATA
BYTES[3:0] are aliased to the ACPI-OS DATA BYTES[3:0].
All access to the OS2EC DATA BYTES[3:0] registers should be orderly: Least Significant Byte to Most Significant Byte
when byte access is used.
When the FOUR_BYTE_ACCESS bit in the OS Byte Control Register is cleared to ‘0’, the following access rules apply:
1. Writes to the OS2EC DATA BYTES[3:0] have no effect on the OBF bit in the OS STATUS OS Register.
2. Reads from the OS2EC Data EC Byte 0 Register clears the IBF bit in the OS STATUS OS Register.
3. All reads from OS2EC DATA BYTES[3:1] return 00h without error.
4. Access to OS2EC DATA BYTES[3:1 has no effect on the IBF & OBF bits in the OS STATUS OS Register.
When the FOUR_BYTE_ACCESS bit in the OS Byte Control Register is set to ‘1’, the following access rules apply:
1. Writes to the OS2EC DATA BYTES[3:0] have no effect on the OBF bit in the OS STATUS OS Register.
2. Reads from the OS2EC Data EC Byte 3 Register clears the IBF bit in the OS STATUS OS Register.
Offset 109h
Reset
Bits Description Type Default
Event
7:0 OS2EC_DATA_ BYTE_1 R/W 0h VCC1_R
This is byte 1 of the 32-bit OS2EC DATA BYTES[3:0]. ESET
Offset 10Ah
Reset
Bits Description Type Default
Event
7:0 OS2EC_DATA_BYTE_2 R/W 0h VCC1_R
This is byte 2 of the 32-bit OS2EC DATA BYTES[3:0]. ESET
Offset 10Bh
Reset
Bits Description Type Default
Event
7:0 OS2EC_DATA_BYTE_3 R/W 0h VCC1_R
This is byte 3 of the 32-bit OS2EC DATA BYTES[3:0]. ESET
Offset 100h
Reset
Bits Description Type Default
Event
7:0 EC2OS_DATA_BYTE_0 R/W 0h VCC1_R
This is byte 0 of the 32-bit EC2OS DATA BYTES[3:0]. ESET
EC2OS DATA BYTES[3:0]
Writes by the ACPI_EC to the EC2OS DATA BYTES[3:0] are aliased to the ACPI-OS DATA BYTES[3:0]
All access to the EC2OS DATA BYTES[3:0] registers should be orderly: Least Significant Byte to Most Significant Byte
when byte access is used.
When the FOUR_BYTE_ACCESS bit in the OS Byte Control Register is cleared to ‘0’, the following access rules apply:
1. Writes to the EC2OS Data EC Byte 0 Register set the OBF bit in the OS STATUS OS Register.
2. Reads from the EC2OS DATA BYTES[3:0] have no effect on the IBF bit in the OS STATUS OS Register.
3. All reads from EC2OS DATA BYTES[3:1] return 00h without error.
4. All writes to EC2OS DATA BYTES[3:1] complete without error but the data are not registered.
5. Access to EC2OS DATA BYTES[3:1] have no effect on the IBF & OBF bits in the OS STATUS OS Register.
When the FOUR_BYTE_ACCESS bit in the OS Byte Control Register is set to ‘1’, the following access rules apply:
1. Writes to the EC2OS Data EC Byte 3 Register set the OBF bit in the OS STATUS OS Register.
2. Reads from the EC2OS DATA BYTES[3:0] have no effect on the IBF bit in the OS STATUS OS Register.
Offset 101h
Reset
Bits Description Type Default
Event
7:0 EC2OS_DATA_BYTE_1 R/W 0h VCC1_R
This is byte 1 of the 32-bit EC2OS DATA BYTES[3:0]. ESET
Offset 102h
Reset
Bits Description Type Default
Event
7:0 EC2OS_DATA_BYTE_2 R/W 0h VCC1_R
This is byte 2 of the 32-bit EC2OS DATA BYTES[3:0]. ESET
Offset 103h
Reset
Bits Description Type Default
Event
7:0 EC2OS_DATA_BYTE_3 R/W 0h VCC1_R
This is byte 3 of the 32-bit EC2OS DATA BYTES[3:0]. ESET
Offset 104h
Reset
Bits Description Type Default
Event
7 UD0A R/W 0b VCC1_R
User Defined ESET
Reset
Bits Description Type Default
Event
3 CMD R 0b VCC1_R
See CMD bit in OS STATUS OS Register on page 136 for bit ESET
description.
2 UD1A R/W 0b VCC1_R
User Defined ESET
1 IBF R 0h VCC1_R
See IBF bit in OS STATUS OS Register on page 136 for bit descrip- ESET
tion.
0 OBF R 0h VCC1_R
See OBF bit in OS STATUS OS Register on page 136 for bit descrip- ESET
tion.
Note: The IBF and OBF bits are not de-asserted by hardware when the host is powered off, or the LPC interface
powers down; for example, following system state changes S3->S0, S5->S0, G3-> S0. For further informa-
tion on how these bits are cleared, refer to IBF and OBF bit descriptions in the STATUS OS-Register defi-
nition.
Offset 105h
Reset
Bits Description Type Default
Event
7:1 Reserved R - -
0 FOUR_BYTE_ACCESS R/W 0b VCC1_R
See FOUR_BYTE_ACCESS bit in OS Byte Control Register on ESET
page 140 for bit description.
11.1 Introduction
The MEC1322 keyboard controller uses the EC to produce a superset of the features provided by the industry-standard
8042 keyboard controller. The 8042 Emulated Keyboard Controller is a Host/EC Message Interface with hardware
assists to emulate 8042 behavior and provide Legacy GATEA20 support.
11.2 References
There are no references for this block.
11.3 Interface
This block is designed to be accessed externally via the pin interface and internally via a registered host interface.
Host Interface
Signal Description
Clock Inputs
Resets
Interrupts
11.7 Interrupts
This section defines the Interrupt Sources generated from this block.
Host EC
Access HOST_EC Data register
Access
LPC I/O Index =00 R
Write Data W D7 D6 D5 D4 D3 D2 D1 D0
PCOBF Register
3OBF SET on EC Write to
SPB offset = 100h or 10Ch D7 D6 D5 D4 D3 D2 D1 D0
R
W
OBF Cleared by Read 0f
RES RES RES RES RES RES RES PCOBF4
FF_0514
LPC I/O Index 00h
CMD !=D1
or
DATA
RESET [IBF=1]
S0
CMD = D1
[IBF=0]
CMD = FF
[IBF=0] CMD !=D1
or
CMD !=FF or
DATA CMD !=D1
[IBF=1] [IBF=1]
CMD = D1
[IBF=0] CMD = D1
S2 S1 [IBF=0]
Data
[IBF=0, Latch DIN
nIOW D D
SET SET
Q Q
24MHz
KRESET Gen
CLR Q CLR Q
nIOW
SAEN
64&AEN#
nIOW
SD[7:0] = D1
Data SET
Q
Address
SD[7:0] = FF D CLR Q IBF
IOW#
SD[7:0] = FE
AEN#&60
CPU RESET
ENAB P92
Port 92 Reg (D1)
SETGA20L Reg (Any WR)
D
SET
Q
IOW#
AEN#&64 VCC D
SET
Q
CLR Q GATEA20
14 μs 6 μs
Pulse KRESET
FE Command
(From KRESET Generator SAEN CPU_RESET
Speed-up Logic)
ENAB P92
Pulse ALT_RST#
Port 92 Reg (D0)
Generator
14 μs 6 μs
Offset 30h
Reset
Bits Description Type Default
Event
7:1 Reserved R - -
0 ACTIVATE R/W 0b PWRGD
1=The 8042 Interface is powered and functional. and
0=The 8042 Interface is powered down and inactive. VCC1_R
ESET
Offset 00h
Reset
Bits Description Type Default
Event
7:0 WRITE_DATA W 0h VCC1_R
This 8-bit register is write-only. When written, the C/D bit in the Key- ESET
board Status Read Register is cleared to ‘0’, signifying data, and the
IBF in the same register is set to ‘1’.
Offset 04h
Reset
Bits Description Type Default
Event
7:0 WRITE_CMD W 0h VCC1_R
This 8-bit register is write-only and is an alias of the register at offset ESET
0h. When written, the C/D bit in the Keyboard Status Read Register
is set to ‘1’, signifying a command, and the IBF in the same register
is set to ‘1’.
Offset 00h
Reset
Bits Description Type Default
Event
7:0 READ_DATA R 0h VCC1_R
This 8-bit register is read-only. When read by the Host, the PCOBF ESET
and/or AUXOBF interrupts are cleared and the OBF flag in the status
register is cleared.
Offset 04h
Reset
Bits Description Type Default
Event
7:6 UD2 R 0h VCC1_R
User-defined data. Readable and writable by the EC when written ESET
by the EC at its EC-only alias.
5 AUXOBF R 0h VCC1_R
Auxiliary Output Buffer Full. This bit is set to “1” whenever the EC ESET
writes the EC AUX Data Register. This flag is reset to “0” whenever
the EC writes the EC Data Register.
4 UD1 R 0h VCC1_R
User-defined data. Readable and writable by the EC when written ESET
by the EC at its EC-only alias.
3 C/D R 0h VCC1_R
Command Data. This bit specifies whether the input data register ESET
contains data or a command (“0” = data, “1” = command). During a
Host command write operation (when the Host writes the
HOST_EC Data / CMD Register at offset 04h), this bit is set to “1”.
During a Host data write operation (when the Host writes the
HOST_EC Data / CMD Register at offset 0h), this bit is set to “0”.
2 UD0 R 0h VCC1_R
User-defined data. Readable and writable by the EC when written ESET and
by the EC at its EC-only alias. PCI
RESET#
Note: This bit is reset to ‘0’ when the LRESET# pin signal is
asserted.
Reset
Bits Description Type Default
Event
1 IBF R 0h VCC1_R
Input Buffer Full. This bit is set to “1” whenever the Host writes data ESET
or a command into the HOST_EC Data / CMD Registerr. When this
bit is set, the EC's 8042EM_IBF interrupt is asserted, if enabled.
When the EC reads the HOST_EC Data/CMD Register, this bit is
automatically reset and the interrupt is cleared.
Note: This bit is not reset when PWRGD is asserted or when
the LPC interface powers down. To clear this bit, firm-
ware must read the EC Data Register in the EC-Only
address space.
0 OBF R 0h VCC1_R
Output Buffer Full. This bit is set when the EC writes a byte of Data ESET
or AUX Data into the EC_HOST Data / AUX Data Register. When
the Host reads the HOST_EC Data / CMD Register, this bit is auto-
matically cleared by hardware and a 8042EM_OBF interrupt is gen-
erated.
Note: This bit is not reset when PWRGD is asserted or when
the LPC interface powers down. To clear this bit, firm-
ware must read the HOST_EC Data / CMD Register in
the Runtime address space.
Offset 0h
Reset
Bits Description Type Default
Event
7:0 HOST2EC_DATA R 0h VCC1_R
This register is an alias of the HOST_EC Data / CMD Register. ESET
When read at the EC-Only offset of 0h, it returns the data written by
the Host to either Runtime Register offset 0h or Runtime Register
offset 04h.
Offset 0h
Reset
Bits Description Type Default
Event
7:0 EC_DATA W 0h VCC1_R
ESET
Offset 04h
Reset
Bits Description Type Default
Event
7:6 UD2 R/W 0h VCC1_R
User-defined data. Readable and writable by the EC. ESET
5 AUXOBF R/W 0h VCC1_R
Auxiliary Output Buffer Full. This bit is set to ‘1’ whenever the EC ESET
writes the EC AUX Data Register. This flag is reset to ‘0’ whenever
the EC writes the EC Data Register.
4 UD1 R/W 0h VCC1_R
User-defined data. Readable and writable by the EC when written ESET
by the EC at its EC-only alias.
3 C/D R 0h VCC1_R
Command Data. This bit specifies whether the input data register ESET
contains data or a command. During a Host command write opera-
tion (when the Host writes the HOST_EC Data / CMD Register at
offset 04h), this bit is set to ‘1’. During a Host data write operation
(when the Host writes the HOST_EC Data / CMD Register at offset
0h), this bit is set to ‘0’.
1=Command
0=Data
2 UD0 R/W 0h VCC1_R
User-defined data. Readable and writable by the EC when written ESET and
by the EC at its EC-only alias. PCI
RESET#
This bit is reset to ‘0’ when the LRESET# pin signal is asserted.
Reset
Bits Description Type Default
Event
1 IBF R 0h VCC1_R
Input Buffer Full. This bit is set to “1” whenever the Host writes data ESET
or a command into the HOST_EC Data / CMD Registerr. When this
bit is set, the EC's 8042EM_IBF interrupt is asserted, if enabled.
When the EC reads the Data/CMD Register, this bit is automatically
reset and the interrupt is cleared.
This bit is not reset when PWRGD is asserted or when the LPC
interface powers down. To clear this bit, firmware must read the EC
Data Register in the EC-Only address space.
0 OBF R 0h VCC1_R
Output Buffer Full. This bit is set when the EC writes a byte of Data ESET
or AUX Data into the EC_HOST Data / AUX Data Register. When
the Host reads the HOST_EC Data / CMD Register, this bit is auto-
matically cleared by hardware and a 8042EM_OBF interrupt is gen-
erated.
This bit is not reset when PWRGD is asserted or when the LPC
interface powers down. To clear this bit, firmware must read the
Data/CMD Register in the Runtime address space.
Offset 08h
Reset
Bits Description Type Default
Event
7 AUXH R/W 0h VCC1_R
AUX in Hardware. ESET
Reset
Bits Description Type Default
Event
1 SAEN R/W 0h VCC1_R
Software-assist enable. ESET
Offset 0Ch
Reset
Bits Description Type Default
Event
7:0 EC_AUX_DATA W 0h VCC1_R
This 8-bit register is write-only. When written, the C/D in the Key- ESET
board Status Read Register is cleared to ‘0’, signifying data, and the
IBF in the same register is set to ‘1’.
Offset 14h
Reset
Bits Description Type Default
Event
7:1 Reserved R - -
0 PCOBF R/W 0h VCC1_R
For a description of this bit, see Section 11.10.1, "PCOBF Descrip- ESET
tion".
Offset 30h
Reset
Bits Description Type Default
Event
7:1 Reserved R - -
0 P92_EN R/W 0h PWRGD
When this bit is ‘1’, the Port92h Register is enabled. When this bit is and
‘0’, the Port92h Register is disabled, and Host writes to LPC VCC1_R
address 92h are ignored. ESET
Offset 0h
Reset
Bits Description Type Default
Event
7:2 Reserved R - -
1 ALT_GATE_A20 R/W 0h nSIO_R
This bit provides an alternate means for system control of the ESET
GATEA20 pin. ALT_A20 low drives GATEA20 low, if A20 from the
keyboard controller is also low. When Port 92 is enabled, writing a 1
to this bit forces ALT_A20 high. ALT_A20 high drives GATEA20 high
regardless of the state of A20 from the keyboard controller.
0=ALT_A20 is driven low
1=ALT_A20 is driven high
0 ALT_CPU_RESET R/W 0h nSIO_R
This bit provides an alternate means to generate a CPU_RESET ESET
pulse. The CPU_RESET output provides a means to reset the sys-
tem CPU to effect a mode switch from Protected Virtual Address
Mode to the Real Address Mode. This provides a faster means of
reset than is provided through the EC keyboard controller. Writing a
“1” to this bit will cause the ALT_RST# internal signal to pulse (active
low) for a minimum of 6μs after a delay of 14μs. Before another
ALT_RST# pulse can be generated, this bit must be written back to
“0”.
Offset 0h
Reset
Bits Description Type Default
Event
7:1 Reserved R - -
0 GATEA20 R/W 1h VCC1_R
0=The GATEA20 output is driven low ESET
1=The GATEA20 output is driven high
Offset 08h
Reset
Bits Description Type Default
Event
7:0 SETGA20L W - -
See Section 11.11.1, "GATE A20 Speedup" for information on this
register. A write to this register sets GATEA20 in the GATEA20 Con-
trol Register.
Offset 0Ch
Reset
Bits Description Type Default
Event
7:0 RSTGA20L W - -
See Section 11.11.1, "GATE A20 Speedup" for information on this
register. A write to this register sets GATEA20 in the GATEA20 Con-
trol Register.
12.1 Overview
The Mailbox provides a standard run-time mechanism for the host to communicate with the Embedded Controller (EC)
12.2 References
No references have been cited for this feature.
12.3 Terminology
There is no terminology defined for this section.
12.4 Interface
This block is designed to be accessed externally via the pin interface and internally via a registered host interface.
Mailbox Interface
Host Interface
Signal Description
Interrupts
12.8 Interrupts
HOST-to-EC
Forty-three 8-bit
Host CPU EC
Mailbox Registers
EC-to-HOST
SMI
SIRQ Mapping
MBX_Host_SIRQ
Mailbox Registers
MBX_Host_SMI
SIRQ
GPIO
Note: The protocol used to pass commands back and forth through the Mailbox Registers Interface is left to the
System designer. Microchip can provide an application example of working code in which the host uses the
Mailbox registers to gain access to all of the EC registers.
Offset 0h
Reset
Bits Description Type Default
Event
7:0 INDEX R/W 0h VCC1_R
The index into the mailbox registers listed in Table 12-10, "EC-Only ESET
Register Summary". and
PWRGD=
0
12.11.2 MBX_DATA REGISTER
Offset 01h
Reset
Bits Description Type Default
Event
7:0 DATA R/W 0h VCC1_R
Data port used to access the registers listed in Table 12-10, "EC- ESET
Only Register Summary". and
PWRGD=
0
Note: The Mailbox Index Addresses 9Ah, 9Ch and 9Eh are not used in Table 12-10. These addresses are
Reserved.
Offset 0h
MBX_ 82h
INDEX
Reset
Bits Description Type Default
Event
7:0 HOST_EC_MBOX Host 0h VCC1_R
If enabled, an interrupt to the EC marked by the MBX_DATA bit in Access ESET
the Interrupt Aggregator will be generated whenever the Host writes Port:
this register. R/W
This register is cleared when written with FFh. EC:
R/WC
Offset 4h
MBX_ 83h
INDEX
Reset
Bits Description Type Default
Event
7:0 EC_HOST_MBOX Host 0h VCC1_R
An EC write to this register will set bit EC_WR in the SMI Interrupt Access ESET
Source Register to ‘1b’. If enabled, this will’ generate a Host SMI. Port:
This register is cleared when written with FFh. R/WC
EC:
R/W
Offset 8h
MBX_ 96h
INDEX
Reset
Bits Description Type Default
Event
7:1 EC_SWI Host 0h VCC1_R
EC Software Interrupt. An SIRQ to the Host is generated when any Access ESET
bit in this register when this bit is set to ‘1b’ and the corresponding bit Port:
in the SMI Interrupt Mask Register register is ‘1b’. R/WC
EC:
This field is Read/Write when accessed by the EC at the EC offset. R/W
When written through the Host Access Port, each bit in this field is
cleared when written with a ‘1b’. Writes of ‘0b’ have no effect.
0 EC_WR Host 0h VCC1_R
EC Mailbox Write. This bit is set automatically when the EC-to-Host Access ESET
Mailbox Register has been written. An SMI or SIRQ to the Host is Port:
generated when n this bit is ‘1b’ and the corresponding bit in the SMI R
Interrupt Mask Register register is ‘1b’. EC:
This bit is automatically cleared by a read of the EC-to-Host Mailbox -
Register through the Host Access Port.
This bit is read-only when read through the Host Access Port. It is
neither readable nor writable directly by the EC when accessed at
the EC offset.
Offset Ch
MBX_ 97h
INDEX
Reset
Bits Description Type Default
Event
7:1 EC_SWI_EN Host 0h VCC1_R
EC Software Interrupt Enable. If this bit is ‘1b’, the bit EC_WR in the Access ESET
SMI Interrupt Source Register is enabled for the generation of SIRQ Port:
or nSMI events. R/W
EC:
R/W
0 EC_WR_EN Host 0h VCC1_R
EC Mailbox Write.Interrupt Enable. Each bit in this field that is ‘1b’ Access ESET
enables the generation of SIRQ interrupts when the corresponding Port:
bit in the EC_SWI field in the SMI Interrupt Source Register is ‘1b’. R/W
EC:
R/W
13.1 Introduction
The MEC1322 supports ACPI as described in this section. These features comply with the ACPI Specification through
a combination of hardware and EC software.
13.2 References
ACPI Specification, Revision 1.0
13.3 Terminology
None
13.4 Interface
This block is an IP block designed to be incorporated into a chip. It is designed to be accessed externally via the pin
interface and internally via a registered host interface. The following diagram illustrates the various interfaces to the
block.
Host Interface
Signal Description
Clocks
Resets
Interrupts
13.8 Interrupts
This section defines the Interrupt Sources generated from this block.
13.10 Description
This section describes the functions of the ACPI PM1 Block Interface in more detail.
The MEC1322 implements the ACPI fixed registers but includes only those bits that apply to the power button sleep
button and RTC alarm events. The ACPI WAK_STS, SLP_TYP, and SLP_EN bits are also supported.
The MEC1322 can generate SCI Interrupts to the Host. The functions described in the following sub-sections can gen-
erate a SCI event on the EC_SCI# pin. In the MEC1322, an SCI event is considered the same as an ACPI wakeup or
runtime event.
The SLPBTN_STS bit is set by the Host to enable the generation of an SCI
due to the sleep button event. The status bit is set by the EC when it gener-
ates a sleep button event and is cleared by the Host writing a ‘1’ to this bit
(writing a ‘0’ has no effect); it can also be cleared by the EC. If the enable
bit is set, the EC will generate an SCI power management event.
Figure 13-2 describes the relationship of PM1 Status and Enable bits to the EC_SCI# pin.
PM1_STS 2 PM1_EN 2
Register Register
PWRBTN_STS
SLPBTN_STS
EC_SCI#
RTC_STS
EC_PM_STS Register
EC_SCI_STS
Offset 00h
Reset
Bits Description Type Default
Event
7:0 Reserved R - -
13.11.2 POWER MANAGEMENT 1 STATUS 2 REGISTER
Offset 01h
Reset
Bits Description Type Default
Event
7 WAK_STS R/WC 00h VCC1_R
This bit can be set or cleared by the EC. The Host writing a one to (Note 13 ESET
this bit can also clear this bit. -1)
6:4 Reserved R - -
3 PWRBTNOR_STS R/WC 00h VCC1_R
This bit can be set or cleared by the EC to simulate a Power button (Note 13 ESET
override event status if the power is controlled by the EC. The Host -1)
writing a one to this bit can also clear this bit. The EC must generate
the associated hardware event under software control.
2 RTC_STS R/WC 00h VCC1_R
This bit can be set or cleared by the EC to simulate a RTC status. (Note 13 ESET
The Host writing a one to this bit can also clear this bit. The EC must -1)
generate the associated SCI interrupt under software control.
1 SLPBTN_STS R/WC 00h VCC1_R
This bit can be set or cleared by the EC to simulate a Sleep button (Note 13 ESET
status if the sleep state is controlled by the EC. The Host writing a -1)
one to this bit can also clear this bit. The EC must generate the
associated SCI interrupt under software control.
0 PWRBTN_STS R/WC 00h VCC1_R
This bit can be set or cleared by the EC to simulate a Power button (Note 13 ESET
status if the power is controlled by the EC. The Host writing a one to -1)
this bit can also clear this bit. The EC must generate the associated
SCI interrupt under software control.
Note 13-1 These bits are set/cleared by the EC directly i.e., writing ‘1’ sets the bit and writing ‘0’ clears it. These
bits can also be cleared by the Host software writing a one to this bit position and by VCC1_RESET.
Writing a 0 by the Host has no effect.
Offset 02h
Reset
Bits Description Type Default
Event
7:0 Reserved R - -
Offset 03h
Reset
Bits Description Type Default
Event
7:3 Reserved R - -
2 RTC_EN R/W 00h VCC1_R
This bit can be read or written by the Host. It can be read by the EC. (Note 13 ESET
-2)
1 SLPBTN_EN R/W 00h VCC1_R
This bit can be read or written by the Host. It can be read by the EC. (Note 13 ESET
-2)
0 PWRBTN_EN R/W 00h VCC1_R
This bit can be read or written by the Host. It can be read by the EC. (Note 13 ESET
-2)
Note 13-2 These bits are read-only by the EC.
Offset 04h
Reset
Bits Description Type Default
Event
7:0 Reserved R 0h VCC1_R
ESET
13.11.6 POWER MANAGEMENT 1 CONTROL 2 REGISTER
Offset 05h
Reset
Bits Description Type Default
Event
7:6 Reserved R - -
5 SLP_EN See 00h VCC1_R
See Table 13-8. Table 13 ESET
-8.
4:2 SLP_TYP R/W 00h VCC1_R
These bits can be set or cleared by the Host, read by the EC. (Note 13 ESET
-3)
1 PWRBTNOR_EN R/W 00h VCC1_R
This bit can be set or cleared by the Host, read by the EC. (Note 13 ESET
-3)
0 Reserved R - -
Note 13-3 These bits are read-only by the EC.
Offset 06h
Reset
Bits Description Type Default
Event
7:0 Reserved R - -
13.11.8 POWER MANAGEMENT 2 CONTROL 2 REGISTER
Offset 07h
Reset
Bits Description Type Default
Event
7:0 Reserved R - -
Note: The Power Management Status, Enable and Control registers in Table 13-10, "EC-Only Registers Sum-
mary" are described in Section 13.11, "Runtime Registers," on page 173.
Offset 10h
Reset
Bits Description Type Default
Event
7:1 UD R/W 00h VCC1_R
ESET
0 EC_SCI_STS R/W 00h VCC1_R
If the EC_SCI_STS bit is “1”, an interrupt is generated on the ESET
EC_SCI# pin.
Note: This register is only accessed by the EC. There is no host access to this register.
14.1 Introduction
The 16550 UART (Universal Asynchronous Receiver/Transmitter) is a full-function Two Pin Serial Port that supports the
standard RS-232 Interface.
14.2 References
1. EIA Standard RS-232-C specification
14.3 Interface
This block is designed to be accessed externally via the pin interface and internally via a registered host interface.
UART
Host Interface
Signal Description
Power, Clocks and Reset
Interrupts
14.7 Interrupts
This section defines the Interrupt Sources generated from this block.
14.9 Description
The UART is compatible with the 16450, the 16450 ACE registers and the 16C550A. The UART performs serial-to-par-
allel conversions on received characters and parallel-to-serial conversions on transmit characters. Two sets of baud
rates are provided. When the 1.8432 MHz source clock is selected, standard baud rates from 50 to 115.2K are available.
When the source clock is 32.26 MHz, baud rates from 126K to 2,016K are available. The character options are program-
mable for 1 start; 1, 1.5 or 2 stop bits; even, odd, sticky or no parity; and prioritized interrupts. The UART contains a
programmable baud rate generator that is capable of dividing the input clock signal by 1 to 65535. The UART is also
Offset 30h
Reset
Bits Description Type Default
Event
7:1 Reserved R - -
0 ACTIVATE R/W 0b RESET
When this bit is 1, the UART logical device is powered and func-
tional. When this bit is 0, the UART logical device is powered down
and inactive.
Offset F0h
Reset
Bits Description Type Default
Event
7:3 Reserved R - -
2 POLARITY R/W 0b RESET
Offset 0h (DLAB=0)
Reset
Bits Description Type Default
Event
7:0 RECEIVED_DATA R 0h RESET
This register holds the received incoming data byte. Bit 0 is the least
significant bit, which is transmitted and received first. Received data
is double buffered; this uses an additional shift register to receive the
serial data stream and convert it to a parallel 8 bit word which is
transferred to the Receive Buffer register. The shift register is not
accessible.
Offset 0h (DLAB=0)
Reset
Bits Description Type Default
Event
7:0 TRANSMIT_DATA W 0h RESET
This register contains the data byte to be transmitted. The transmit
buffer is double buffered, utilizing an additional shift register (not
accessible) to convert the 8 bit data word to a serial format. This shift
register is loaded from the Transmit Buffer when the transmission of
the previous byte is complete.
Reset
Bits Description Type Default
Event
7:0 BAUD_RATE_DIVISOR_LSB R/W 0h RESET
See Section 14.9.1, "Programmable Baud Rate".
Reset
Bits Description Type Default
Event
7 BAUD_CLK_SEL R/W 0h RESET
1=If CLK_SRC is ‘0’, the baud clock is derived from the 1.8432MHz_-
Clk. If CLK_SRC is ‘1’, this bit has no effect
1=If CLK_SRC is ‘0’, the baud clock is derived from the 24MHz_Clk.
If CLK_SRC is ‘1’, this bit has no effect
6:0 BAUD_RATE_DIVISOR_MSB R/W 0h RESET
See Section 14.9.1, "Programmable Baud Rate".
Reset
Bits Description Type Default
Event
7:4 Reserved R - -
3 EMSI R/W 0h RESET
This bit enables the MODEM Status Interrupt when set to logic “1”.
This is caused when one of the Modem Status Register bits changes
state.
2 ELSI R/W 0h RESET
This bit enables the Received Line Status Interrupt when set to logic
“1”. The error sources causing the interrupt are Overrun, Parity,
Framing and Break. The Line Status Register must be read to deter-
mine the source.
1 ETHREI R/W 0h RESET
This bit enables the Transmitter Holding Register Empty Interrupt
when set to logic “1”.
0 ERDAI R/W 0h RESET
This bit enables the Received Data Available Interrupt (and timeout
interrupts in the FIFO mode) when set to logic “1”.
Offset 02h
Reset
Bits Description Type Default
Event
7:6 RECV_FIFO_TRIGGER_LEVEL W 0h RESET
These bits are used to set the trigger level for the RCVR FIFO inter-
rupt.
5:4 Reserved R - -
3 DMA_MODE_SELECT W 0h RESET
Writing to this bit has no effect on the operation of the UART. The
RXRDY and TXRDY pins are not available on this chip.
2 CLEAR_XMIT_FIFO W 0h RESET
Setting this bit to a logic “1” clears all bytes in the XMIT FIFO and
resets its counter logic to “0”. The shift register is not cleared. This
bit is self-clearing.
1 CLEAR_RECv_FIFO W 0h RESET
Setting this bit to a logic “1” clears all bytes in the RCVR FIFO and
resets its counter logic to “0”. The shift register is not cleared. This
bit is self-clearing.
Reset
Bits Description Type Default
Event
0 EXRF W 0h RESET
Enable XMIT and RECV FIFO. Setting this bit to a logic “1” enables
both the XMIT and RCVR FIFOs. Clearing this bit to a logic “0” dis-
ables both the XMIT and RCVR FIFOs and clears all bytes from both
FIFOs. When changing from FIFO Mode to non-FIFO (16450) mode,
data is automatically cleared from the FIFOs. This bit must be a 1
when other bits in this register are written to or they will not be prop-
erly programmed.
Offset 02h
Reset
Bits Description Type Default
Event
7:6 FIFO_EN R 0h RESET
These two bits are set when the FIFO CONTROL Register bit 0
equals 1.
5:4 Reserved R - -
3:1 INTID R 0h RESET
These bits identify the highest priority interrupt pending as indicated
by Table 14-13, "Interrupt Control Table". In non-FIFO mode, Bit[3] is
a logic “0”. In FIFO mode Bit[3] is set along with Bit[2] when a time-
out interrupt is pending.
Reset
Bits Description Type Default
Event
0 IPEND R 1h RESET
This bit can be used in either a hardwired prioritized or polled envi-
ronment to indicate whether an interrupt is pending. When bit 0 is a
logic ‘0’ an interrupt is pending and the contents of the IIR may be
used as a pointer to the appropriate internal service routine. When
bit 0 is a logic ‘1’ no interrupt is pending.
Offset 03h
Bits Reset
Description Type Default
Event
7 DLAB R/W 0h RESET
Divisor Latch Access Bit (DLAB). It must be set high (logic “1”) to
access the Divisor Latches of the Baud Rate Generator during read
or write operations. It must be set low (logic “0”) to access the
Receiver Buffer Register, the Transmitter Holding Register, or the
Interrupt Enable Register.
6 BREAK_CONTROL R/W 0h RESET
Set Break Control bit. When bit 6 is a logic “1”, the transmit data out-
put (TXD) is forced to the Spacing or logic “0” state and remains
there (until reset by a low level bit 6) regardless of other transmitter
activity. This feature enables the Serial Port to alert a terminal in a
communications system.
5 STICK_PARITY R/W 0h RESET
Stick Parity bit. When parity is enabled it is used in conjunction with
bit 4 to select Mark or Space Parity. When LCR bits 3, 4 and 5 are 1
the Parity bit is transmitted and checked as a 0 (Space Parity). If bits
3 and 5 are 1 and bit 4 is a 0, then the Parity bit is transmitted and
checked as 1 (Mark Parity). If bit 5 is 0 Stick Parity is disabled.
Bit 3 is a logic “1” and bit 5 is a logic “1”, the parity bit is transmitted
and then detected by the receiver in the opposite state indicated by
bit 4.
4 PARITY_SELECT R/W 0h RESET
Even Parity Select bit. When bit 3 is a logic “1” and bit 4 is a logic “0”,
an odd number of logic “1”'s is transmitted or checked in the data
word bits and the parity bit. When bit 3 is a logic “1” and bit 4 is a
logic “1” an even number of bits is transmitted and checked.
3 ENABLE_PARITY R/W 0h RESET
Parity Enable bit. When bit 3 is a logic “1”, a parity bit is gener-
ated (transmit data) or checked (receive data) between the last
data word bit and the first stop bit of the serial data. (The parity bit is
used to generate an even or odd number of 1s when the data word
bits and the parity bit are summed).
2 STOP_BITS R/W 0h RESET
This bit specifies the number of stop bits in each transmitted or
received serial character. Table 14-14 summarizes the information.
1:0 WORD_LENGTH R/W 0h RESET
These two bits specify the number of bits in each transmitted or
received serial character. The encoding of bits 0 and 1 is as follows:
Note: The receiver will ignore all stop bits beyond the first, regardless of the number used in transmitting.
Offset 04h
Reset
Bits Description Type Default
Event
7:5 Reserved R - -
4 LOOPBACK R/W 0h RESET
This bit provides the loopback feature for diagnostic testing of the
Serial Port. When bit 4 is set to logic “1”, the following occur:
1. The TXD is set to the Marking State (logic “1”).
2. The receiver Serial Input (RXD) is disconnected.
3. The output of the Transmitter Shift Register is “looped back”
into the Receiver Shift Register input.
4. All MODEM Control inputs (nCTS, nDSR, nRI and nDCD) are
disconnected.
5. The four MODEM Control outputs (nDTR, nRTS, OUT1 and
OUT2) are internally connected to the four MODEM Control
inputs (nDSR, nCTS, RI, DCD).
6. The Modem Control output pins are forced inactive high.
7. Data that is transmitted is immediately received.
This feature allows the processor to verify the transmit and receive
data paths of the Serial Port. In the diagnostic mode, the receiver
and the transmitter interrupts are fully operational. The MODEM
Control Interrupts are also operational but the interrupts' sources are
now the lower four bits of the MODEM Control Register instead of
the MODEM Control inputs. The interrupts are still controlled by the
Interrupt Enable Register.
3 OUT2 R/W 0h RESET
Output 2 (OUT2). This bit is used to enable an UART interrupt.
When OUT2 is a logic “0”, the serial port interrupt output is forced to
a high impedance state - disabled. When OUT2 is a logic “1”, the
serial port interrupt outputs are enabled.
2 OUT1 R/W 0h RESET
This bit controls the Output 1 (OUT1) bit. This bit does not have an
output pin and can only be read or written by the CPU.
1 RTS R/W 0h RESET
This bit controls the Request To Send (nRTS) output. Bit 1 affects
the nRTS output in a manner identical to that described above for bit
0.
Reset
Bits Description Type Default
Event
0 DTR R/W 0h RESET
This bit controls the Data Terminal Ready (nDTR) output. When bit 0
is set to a logic “1”, the nDTR output is forced to a logic “0”. When bit
0 is a logic “0”, the nDTR output is forced to a logic “1”.
Offset 05h
Reset
Bits Description Type Default
Event
7 FIFO_ERROR R 0h RESET
This bit is permanently set to logic “0” in the 450 mode. In the
FIFO mode, this bit is set to a logic “1” when there is at least one
parity error, framing error or break indication in the FIFO. This bit
is cleared when the LSR is read if there are no subsequent errors
in the FIFO.
6 TRANSMIT_ERROR R 0h RESET
Transmitter Empty. Bit 6 is set to a logic “1” whenever the Trans-
mitter Holding Register (THR) and Transmitter Shift Register
(TSR) are both empty. It is reset to logic “0” whenever either the
THR or TSR contains a data character. Bit 6 is a read only bit. In
the FIFO mode this bit is set whenever the THR and TSR are both
empty,
5 TRANSMIT_EMPTY R 0h RESET
Transmitter Holding Register Empty Bit 5 indicates that the Serial
Port is ready to accept a new character for transmission. In addi-
tion, this bit causes the Serial Port to issue an interrupt when the
Transmitter Holding Register interrupt enable is set high. The
THRE bit is set to a logic “1” when a character is transferred from
the Transmitter Holding Register into the Transmitter Shift Regis-
ter. The bit is reset to logic “0” whenever the CPU loads the Trans-
mitter Holding Register. In the FIFO mode this bit is set when the
XMIT FIFO is empty, it is cleared when at least 1 byte is written to
the XMIT FIFO. Bit 5 is a read only bit.
4 BREAK_INTERRUPT R 0h RESET
Break Interrupt. Bit 4 is set to a logic “1” whenever the received
data input is held in the Spacing state (logic “0”) for longer than a
full word transmission time (that is, the total time of the start bit +
data bits + parity bits + stop bits). The BI is reset after the CPU
reads the contents of the Line Status Register. In the FIFO mode
this error is associated with the particular character in the FIFO it
applies to. This error is indicated when the associated character is
at the top of the FIFO. When break occurs only one zero character
is loaded into the FIFO. Restarting after a break is received,
requires the serial data (RXD) to be logic “1” for at least 1/2 bit
time.
Bits 1 through 4 are the error conditions that produce a Receiver
Line Status Interrupt BIT 3 whenever any of the corresponding
conditions are detected and the interrupt is enabled
Reset
Bits Description Type Default
Event
3 FRAME_ERROR R 0h RESET
Framing Error. Bit 3 indicates that the received character did not
have a valid stop bit. Bit 3 is set to a logic “1” whenever the stop bit
following the last data bit or parity bit is detected as a zero bit
(Spacing level). This bit is reset to a logic “0” whenever the Line
Status Register is read. In the FIFO mode this error is associated
with the particular character in the FIFO it applies to. This error is
indicated when the associated character is at the top of the FIFO.
The Serial Port will try to resynchronize after a framing error. To do
this, it assumes that the framing error was due to the next start bit,
so it samples this 'start' bit twice and then takes in the 'data'.
2 PARITY ERROR R 0h RESET
Parity Error. Bit 2 indicates that the received data character does
not have the correct even or odd parity, as selected by the even
parity select bit. This bit is set to a logic “1” upon detection of a
parity error and is reset to a logic “0” whenever the Line Status
Register is read. In the FIFO mode this error is associated with the
particular character in the FIFO it applies to. This error is indicated
when the associated character is at the top of the FIFO.
1 OVERRUN_ERROR R 0h RESET
Overrun Error. Bit 1 indicates that data in the Receiver Buffer Reg-
ister was not read before the next character was transferred into
the register, thereby destroying the previous character. In FIFO
mode, an overrun error will occur only when the FIFO is full and
the next character has been completely received in the shift regis-
ter, the character in the shift register is overwritten but not trans-
ferred to the FIFO. This bit is set to a logic “1” immediately upon
detection of an overrun condition, and reset whenever the Line
Status Register is read.
0 DATA_READY R 0h RESET
Data Ready. It is set to a logic ‘1’ whenever a complete incoming
character has been received and transferred into the Receiver
Buffer Register or the FIFO. Bit 0 is reset to a logic ‘0’ by reading
all of the data in the Receive Buffer Register or the FIFO.
Offset 06h
Reset
Bits Description Type Default
Event
7 DCD R 0h RESET
This bit is the complement of the Data Carrier Detect (nDCD) input.
If bit 4 of the MCR is set to logic ‘1’, this bit is equivalent to OUT2 in
the MCR.
6 RI# R 0h RESET
This bit is the complement of the Ring Indicator (nRI) input. If bit 4 of
the MCR is set to logic ‘1’, this bit is equivalent to OUT1 in the MCR.
Reset
Bits Description Type Default
Event
5 DSR R 0h RESET
This bit is the complement of the Data Set Ready (nDSR) input. If bit
4 of the MCR is set to logic ‘1’, this bit is equivalent to DTR in the
MCR.
4 CTS R 0h RESET
This bit is the complement of the Clear To Send (nCTS) input. If bit 4
of the MCR is set to logic ‘1’, this bit is equivalent to nRTS in the
MCR.
3 DCD R 0h RESET
Delta Data Carrier Detect (DDCD). Bit 3 indicates that the nDCD
input to the chip has changed state.
NOTE: Whenever bit 0, 1, 2, or 3 is set to a logic ‘1’, a MODEM Sta-
tus Interrupt is generated.
2 RI R 0h RESET
Trailing Edge of Ring Indicator (TERI). Bit 2 indicates that the nRI
input has changed from logic ‘0’ to logic ‘1’.
1 DSR R 0h RESET
Delta Data Set Ready (DDSR). Bit 1 indicates that the nDSR input
has changed state since the last time the MSR was read.
0 CTS R 0h RESET
Delta Clear To Send (DCTS). Bit 0 indicates that the nCTS input to
the chip has changed state since the last time the MSR was read.
Note: The Modem Status Register (MSR) only provides the current state of the UART MODEM control lines in
Loopback Mode. The MEC1322 does not support external connections for the MODEM Control inputs
(nCTS, nDSR, nRI and nDCD) or for the four MODEM Control outputs (nDTR, nRTS, OUT1 and OUT2).
Offset 07h
Reset
Bits Description Type Default
Event
7:0 SCRATCH R/W 0h RESET
This 8 bit read/write register has no effect on the operation of the
Serial Port. It is intended as a scratchpad register to be used by the
programmer to hold data temporarily.
15.1 Introduction
The EC Interrupt Aggregator works in conjunction with the processor’s interrupt interface to handle hardware interrupts
and exceptions.
Exceptions are synchronous to instructions, are not maskable, and have higher priority than interrupts. All three excep-
tions - reset, memory error, and instruction error - are hardwired directly to the processor. Interrupts are typically asyn-
chronous and are maskable.
Interrupts classified as wake events can be recognized without a running clock, e.g., while the MEC1322 is in sleep
state.
This chapter focuses on the EC Interrupt Aggregator. Please refer to embedded controller’s documentation for more
information on interrupt and exception handling.
15.2 References
None
15.3 Terminology
None
15.4 Interface
Interrupt Sources
31 31 31 31
16
Processor
15.6 Interrupts
This block aggregates all the interrupts targeted for the embedded controller into the Source Registers defined in Sec-
tion 15.9, "EC-Only Registers," on page 202. The unmasked bits of each source register are then OR’d together and
routed to the embedded controller’s interrupt interface. The name of each Source Register identifies the IRQ number of
the interrupt port on the embedded controller.
15.8 Description
The interrupt generation logic is made of 16 groups of signals, each of which consist of a Status register, a Enable reg-
ister and a Result register.
The Status and Enable are latched registers. The Result register is a bit by bit AND function of the Source and Enable
registers. All the bits of the Result register are OR’ed together and AND’ed with the corresponding bit in the Block Select
register to form the interrupt signal that is routed to the ARM interrupt controller.
The Result register bits may also be enabled to the NVIC block via the NVIC_EN bit in the Interrupt Control register.
See Chapter 35.0, "EC Subsystem Registers"
Section 15.8.1 shows a representation of the interrupt structure.
NVIC_EN
NVIC
GIRQx Inputs for
.. blocks
.
Int source
result
Interrupt
from block SOURCE0
Interrupt
SOURCE1
from block
. . . NVIC
.. .. .. .. Input for
. GIRQx
Interrupt SOURCEn
from block
Block Enable
Int enable
ENABLE0
.
.
ENABLE1 .
.. Bit x
.
..
ENABLEn .
To Wake
Interface
APPLICATION NOTE: Neither LPC accesses nor JTAG debug accesses are wake capable. In order to enable LPC
transactions to MEC1322 Logical Devices while the MEC1322 is in a Sleep mode in which
the main oscillator is shut off, just before entering sleep EC firmware must enable an interrupt
on the falling edge of the GPIO associated with the LFRAME# input. When responding to
this LFRAME/GPIO interrupt EC firmware should disable the LFRAME/GPIO interrupt until
firmware determines that it is again appropriate to enter a Deep Sleep mode. Similarly, EC
Note 15-1 The Begin Address indicates the location of the first register accessable at offset 00h in the Interrupt
Aggregator EC-Only address space.
Note: The behavior of the enable bit controlled by the GIRQx Enable Set and GIRQx Enable Clear Registers, the
GIRQx Source bit, and the GIRQx Result bit are illustrated in Section 15.8.1, "WAKE Generation," on
page 194.
Reading always returns the current value of the GIRQx ENABLE bit. The state of the GIRQx ENABLE bit is determined
by the corresponding GIRQx Enable Set bit and the GIRQx Enable Clear bit. (0=disabled, 1-enabled)
TYPE R R
Reading always returns the current value of the GIRQx ENABLE bit. The state of the GIRQx ENABLE bit is determined
by the corresponding GIRQx Enable Set bit and the GIRQx Enable Clear bit. (0=disabled, 1-enabled)
15.9.1 GIRQ8
TABLE 15-11: BIT DEFINITIONS FOR GIRQ8 SOURCE, ENABLE, AND RESULT REGISTERS
Block Instance
Bit Source Name Wake Source Description
Name
[7:0] GPIO[147:140] GPIO_Event Y Bits[0:7] are controlled by the GPIO_Events gener-
ated by GPIO140 through GPIO147, respectively.
15.9.2 GIRQ9
TABLE 15-12: BIT DEFINITIONS FOR GIRQ9 SOURCE, ENABLE, AND RESULT REGISTERS
Block Instance
Bit Source Name Wake Source Description
Name
[7:0] GPIO[107:100] GPIO_Event Y Bits[0:7] are controlled by the GPIO_Events generated
by GPIO100 through GPIO107, respectively.
15.9.3 GIRQ10
TABLE 15-13: BIT DEFINITIONS FOR GIRQ10 SOURCE, ENABLE, AND RESULT REGISTERS
Block Instance
Bit Source Name Wake Source Description
Name
[7:0] GPIO[047:040] GPIO_Event Y Bits[0:7] are controlled by the GPIO_Events generated by
GPIO040 through GPIO047, respectively.
TABLE 15-14: BIT DEFINITIONS FOR GIRQ11 SOURCE, ENABLE, AND RESULT REGISTERS
Block Instance
Bit Source Name Wake Source Description
Name
[7:0] GPIO[007:000] GPIO_Event Y Bits[0:7] are controlled by the GPIO_Events generated by
GPIO000 through GPIO007, respectively.
TABLE 15-15: BIT DEFINITIONS FOR GIRQ12 SOURCE, ENABLE, AND RESULT REGISTERS
Block Instance
Bit Source Name Wake Source Description
Name
0 I2C0 / SMB0 SMB N I2C/SMBus controller 0 interrupt. This interrupt is signaled
when the I2C/SMBus controller 0 asserts its interrupt
request.
1 I2C1 / SMB1 SMB N I2C/SMBus controller 1 interrupt. This interrupt is signaled
when the I2C/SMBus controller 1 asserts its interrupt
request.
2 I2C2 / SMB2 SMB N I2C/SMBus controller 2 interrupt. This interrupt is signaled
when the I2C/SMBus controller 2 asserts its interrupt
request.
15.9.6 GIRQ13
TABLE 15-16: BIT DEFINITIONS FOR GIRQ13 SOURCE, ENABLE, AND RESULT REGISTERS
Block Instance
Bit Source Name Wake Source Description
Name
[15:0] Reserved Reserved N Reserved
16 IRQ_DMA0 DMA0 N Direct Memory Access Channel 0
17 IRQ_DMA1 DMA1 N Direct Memory Access Channel 1
18 IRQ_DMA2 DMA2 N Direct Memory Access Channel 2
19 IRQ_DMA3 DMA3 N Direct Memory Access Channel 3
20 IRQ_DMA4 DMA4 N Direct Memory Access Channel 4
21 IRQ_DMA5 DMA5 N Direct Memory Access Channel 5
22 IRQ_DMA6 DMA6 N Direct Memory Access Channel 6
23 IRQ_DMA7 DMA7 N Direct Memory Access Channel 7
24 IRQ_DMA8 DMA8 N Direct Memory Access Channel 8
25 IRQ_DMA9 DMA9 N Direct Memory Access Channel 9
26 IRQ_DMA10 DMA10 N Direct Memory Access Channel 10
27 IRQ_DMA11 DMA11 N Direct Memory Access Channel 11
[30:28] Reserved Reserved N Reserved
15.9.7 GIRQ14
TABLE 15-17: BIT DEFINITIONS FOR GIRQ14 SOURCE, ENABLE, AND RESULT REGISTERS
Block Instance
Bit Source Name Wake Source Description
Name
[1:0] Reserved Reserved N Reserved
2 IRQ_LPC LPC_INTER- N The LPC_INTERNAL_ERR event is sourced by bit D0 of
NAL_ERR the Host Bus Error Register.
[30:3] Reserved Reserved N Reserved
31 n/a n/a N See Table 15-7, "GIRQx Source Register", Table 15-8,
"GIRQx Enable Set Register", Table 15-10, "GIRQx
Enable Clear Register", and Table 15-9, "GIRQx Result
Register" for a definition of this bit for the Source, Enable,
and Result registers.
15.9.8 GIRQ15
TABLE 15-18: BIT DEFINITIONS FOR GIRQ15 SOURCE, ENABLE, AND RESULT REGISTERS
Block Instance
Bit Source Name Wake Source Description
Name
0 UART_0 UART N The UART interrupt event output indicates if an interrupt
is pending. See Table 14-13, “Interrupt Control Table,” on
page 186.
1 Reserved Reserved N Reserved
2 EMI_0 Host-to-EC N Communication event notifying the embedded controller
that the host has written to the Host-to-EC register.
5:3 Reserved Reserved N Reserved
6 ACPI_EC[0] IBF EC_IBF N EC_IBF interrupt is asserted when the IBF in the STATUS
EC-Register is set to ‘1’.
7 ACPI_EC[0] OBF EC_OBF N EC_OBF interrupt is asserted when the OBF in the STA-
TUS EC-Register is cleared to ‘0’.
8 ACPI_EC[1] IBF EC_IBF N EC_IBF interrupt is asserted when the IBF in the STATUS
EC-Register is set to ‘1’.
9 ACPI_EC[1] OBF EC_OBF N EC_OBF interrupt is asserted when the OBF in the STA-
TUS EC-Register is cleared to ‘0’.
10 ACPI_PM1_CTL ACPIPM1_CTL N PM1_CTL2 written by Host
11 ACPIPM1 EN ACPIPM1_EN N PM1_EN2 written by Host
12 ACPIPM1 STS ACPIPM1_STS N PM1_STS2 written by Host
13 8042EM OBF 8042EM_OBF N Interrupt generated by the host reading either data or aux
data from the data register
14 8042EM IBF 8042EM_IBF N Interrupt generated by the host writing either data or com-
mand to the data register
15 MBX MBX Host-to-EC N Interrupt generated for HOST-to-EC events for writes to
the HOST-to-EC Mailbox Register
15.9.9 GIRQ16
TABLE 15-19: BIT DEFINITIONS FOR GIRQ16 SOURCE, ENABLE, AND RESULT REGISTERS
Block Instance
Bit Source Name Wake Source Description
Name
[2:0] Reserved Reserved N Reserved
3 PECIHOST PECIHOST N PECI Host
[30:4] Reserved Reserved N Reserved
31 n/a n/a N See Table 15-7, "GIRQx Source Register", Table 15-8,
"GIRQx Enable Set Register", Table 15-10, "GIRQx
Enable Clear Register", and Table 15-9, "GIRQx Result
Register" for a definition of this bit for the Source, Enable,
and Result registers.
15.9.10 GIRQ17
TABLE 15-20: BIT DEFINITIONS FOR GIRQ17 SOURCE, ENABLE, AND RESULT REGISTERS
Block Instance
Bit Source Name Wake Source Description
Name
0 IRQ_TACH0 TACH N This internal signal is generated from the OR’d result of
the status events, as defined in the TACHx Status Regis-
ter..
1 IRQ_TACH1 TACH N This internal signal is generated from the OR’d result of
the status events, as defined in the TACHx Status Regis-
ter.
2 PS2_0_WK PS2_DAT0 pin Y PS2_0 Start Detect from pin signal PS2_DAT0 (see
Note 15-2 on page 215).
3 PS2_1_WK PS2_DAT1 pin Y PS2_1 Start Detect from pin signal PS2_DAT1 (see
Note 15-2 on page 215).
4 PS2_2_WK PS2_DAT2 pin Y PS2_2 Start Detect from pin signal PS2_DAT2 (see
Note 15-2 on page 215).
5 PS2_3_WK PS2_DAT3 pin Y PS2_3 Start Detect from pin signal PS2_DAT3 (see
Note 15-2 on page 215).
6 BC_INT_N_WK BC_LINK Y Interrupt from the BC_LINK Companion BC_INT# pin
(see Note 15-2 on page 215).
[9:7] Reserved Reserved N Reserved
10 ADC_SNGL ADC_Single_Int N Interrupt signal from ADC controller to EC for Single-
Sample ADC conversion
11 ADC_RPT ADC_Repeat_Int N Interrupt signal from ADC controller to EC for Repeated
ADC conversion
12 MCHP Reserved MCHP Reserved N MCHP Reserved
15.9.11 GIRQ18
TABLE 15-21: BIT DEFINITIONS FOR GIRQ18 SOURCE, ENABLE, AND RESULT REGISTERS
Block Instance
Bit Source Name Wake Source Description
Name
0 SPI0 TX TXBE_STS N SPI controller 0 Interrupt output to EC driven by TXBE
status bit
1 SPI0 RX RXBF_STS N SPI controller 0 Interrupt output to EC driven by RXBE
status bit
2 SPI1 TX TXBE_STS N SPI controller 1 Interrupt output to EC driven by TXBE
status bit
3 SPI1 RX RXBF_STS N SPI controller 1 Interrupt output to EC driven by RXBE
status bit
4 PWM_WDT[3] PWM_WDT N PWM watchdog time out interrupt from Blinking/Breathing
PWM block
5 MCHP Reserved MCHP Reserved N MCHP Reserved
15.9.12 GIRQ19
TABLE 15-22: BIT DEFINITIONS FOR GIRQ19 SOURCE, ENABLE, AND RESULT REGISTERS
Block Instance
Bit Source Name Wake Source Description
Name
0 VCC_PWRGD VCC_PWRGD Y VCC_PWRGD interrupt from pin (see Note 15-2 on
page 215).
1 LRESET# LRESET# Y LRESET# interrupt from pin (see Note 15-2 on page 215).
[30:2] Reserved Reserved N Reserved
31 n/a n/a N See Table 15-7, "GIRQx Source Register", Table 15-8,
"GIRQx Enable Set Register", Table 15-10, "GIRQx
Enable Clear Register", and Table 15-9, "GIRQx Result
Register" for a definition of this bit for the Source, Enable,
and Result registers.
15.9.13 GIRQ20
TABLE 15-23: BIT DEFINITIONS FOR GIRQ20 SOURCE, ENABLE, AND RESULT REGISTERS
Block Instance
Bit Source Name Wake Source Description
Name
[4:0] GPIO[204:200] GPIO_Event Y Bits[0:4] are controlled by the GPIO_Events generated by
GPIO200 through GPIO204, respectively.
15.9.14 GIRQ21
TABLE 15-24: BIT DEFINITIONS FOR GIRQ21 SOURCE, ENABLE, AND RESULT REGISTERS
Block Instance
Bit Source Name Wake Source Description
Name
[1:0] MCHP Reserved n/a n/a n/a
[30:2] Reserved Reserved N Reserved
31 n/a n/a N See Table 15-7, "GIRQx Source Register", Table 15-8,
"GIRQx Enable Set Register", Table 15-10, "GIRQx
Enable Clear Register", and Table 15-9, "GIRQx Result
Register" for a definition of this bit for the Source, Enable,
and Result registers.
15.9.15 GIRQ22
TABLE 15-25: BIT DEFINITIONS FOR GIRQ22 SOURCE, ENABLE, AND RESULT REGISTERS
Block Instance
Bit Source Name Wake Source Description
Name
[30:0] Reserved Reserved N Reserved
31 n/a n/a N See Table 15-7, "GIRQx Source Register", Table 15-8,
"GIRQx Enable Set Register", Table 15-10, "GIRQx
Enable Clear Register", and Table 15-9, "GIRQx Result
Register" for a definition of this bit for the Source, Enable,
and Result registers.
15.9.16 GIRQ23
TABLE 15-26: BIT DEFINITIONS FOR GIRQ23 SOURCE, ENABLE, AND RESULT REGISTERS
Block Instance
Bit Source Name Wake Source Description
Name
0 16-bit Timer_0 TIMER_32_x N This interrupt event fires when a 32-bit timer x reaches its
limit. This event is sourced by the tEVENT_INTERRUPT
status bit if enabled.
BIT D7 D6 D5 D4 D3 D2 D1 D0
TYPE R R R R R R R R
Reading always returns the current value of the IRQ i VECTOR ENABLE bit. The state of the IRQ i VECTOR ENABLE
bit is determined by the corresponding IRQ i Vector Enable Set bit and the IRQ i Vector Enable Clear bit. (0=disabled,
1-enabled)
BIT D7 D6 D5 D4 D3 D2 D1 D0
TYPE R R R R R R R R
Reading always returns the current value of the IRQ i VECTOR ENABLE bit. The state of the IRQ i VECTOR ENABLE
bit is determined by the corresponding IRQ i Vector Enable Set bit and the IRQ i Vector Enable Clear bit. (0=disabled,
1-enabled)
BIT D7 D6 D5 D4 D3 D2 D1 D0
TYPE R R R R R R R R
Note: If the IRQ i vector is disabled via the Block Enable Clear Register the corresponding IRQ i vector to the EC
is forced to 0. If the IRQ i vector is enabled, the corresponding IRQ i vector to the EC represents the current
status of the IRQ event.
16.1 Introduction
The function of the Watchdog Timer is to provide a mechanism to detect if the internal embedded controller has failed.
When enabled, the Watchdog Timer (WDT) circuit will generate a WDT Event if the user program fails to reload the WDT
within a specified length of time known as the WDT Interval.
16.2 References
No references have been cited for this chapter.
16.3 Terminology
There is no terminology defined for this chapter.
16.4 Interface
This block is designed to be accessed internally via a registered host interface or externally via the signal interface.
Host Interface
Clock Inputs
Resets
WDT Event
The registers defined for the Watchdog Timer (WDT) are accessible by the embedded controller as indicated in Section
16.8, "EC-Only Registers". All registers accesses are synchronized to the host clock and complete immediately. Regis-
ter reads/writes are not delayed by the 32KHz_Clk.
16.7 Description
Offset 00h
Reset
Bits Description Type Default
Event
15:0 WDT Load R/W Fh VCC1_R
Writing this field reloads the Watch Dog Timer counter. ESET
Offset 04h
Reset
Bits Description Type Default
Event
7:2 RESERVED R - -
1 WDT Status R/WC 0b VCC1_R
WDT_RST is set by hardware if the last reset of MEC1322 was ESET
caused by an underflow of the WDT. See Section 16.7.1.3, "WDT
Reload Mechanism," on page 219 for more information.
This bit must be cleared by the EC firmware writing a ‘1’ to this bit.
Writing a ‘0’ to this bit has no effect.
Reset
Bits Description Type Default
Event
0 WDT Enable R/W 0b VCC1_R
In WDT Operation, the WDT is activated by the sequence of opera- ESET
tions defined in Section 16.7.1.1, "WDT Activation Mechanism" and
deactivated by the sequence of operations defined in Section
16.7.1.2, "WDT Deactivation Mechanism".
0 = block disabled
1 = block enabled
Offset 08h
Reset
Bits Description Type Default
Event
7:0 Kick W n/a VCC1_R
The WDT Kick Register is a strobe. Reads of the WDT Kick Register ESET
return 0. Writes to the WDT Kick Register cause the WDT to reload
the WDT Load Register value and start decrementing when the
WDT Enable bit in the WDT Control Register is set to ‘1’. When the
WDT Enable bit in the WDT Control Register is cleared to ‘0’, writes
to the WDT Kick Register have no effect.
Offset 0Ch
Reset
Bits Description Type Default
Event
15:0 WDT Count R Fh VCC1_R
This read-only register provide the current WDT count. ESET
17.1 Introduction
This timer block offers a simple mechanism for firmware to maintain a time base. This timer may be instantiated as 16
bits or 32 bits. The name of the timer instance indicates the size of the timer.
17.2 Interface
This block is designed to be accessed externally via the pin interface and internally via a registered host interface.
Basic Timer
Host Interface
Signal Description
Clock Inputs
Resets
Interrupts
17.6 Interrupts
Basic Timer
48 MHz Pre-Scaler
Host Interface
REGS Timer Logic
This timer block offers a simple mechanism for firmware to maintain a time base in the design. The timer may be enabled
to execute the following features:
• Programmable resolution per LSB of the counter via the Pre-scale bits in the Timer Control Register
• Programmable as either an up or down counter
• One-shot or Continuous Modes
• In one-shot mode the Auto Restart feature stops the counter when it reaches its limit and generates a level event.
• In Continuous Mode the Auto Restart feature restarts that counter from the programmed preload value and gener-
ates a pulse event.
• Counter may be reloaded, halted, or started via the Timer Control register
• Block may be reset by either a Power On Reset (POR) or via a Soft Reset.
Offset 00h
Reset
Bits Description Type Default
Event
31:0 COUNTER R/W 0h Tim-
This is the value of the Timer counter. This is updated by Hardware er_Reset
but may be set by Firmware. If it is set while the Hardware Timer is
operating, functionality can not be maintained. When read, it is buff-
ered so single byte reads will be able to catch the full 4 byte register
without it changing.
Offset 04h
Reset
Bits Description Type Default
Event
31:0 PRE_LOAD R/W 0h Tim-
This is the value of the Timer pre-load for the counter. This is used er_Reset
by H/W when the counter is to be restarted automatically; this will
become the new value of the counter upon restart.
The size of the Pre-Load value is the same as the size of the
counter. The size of the Counter is indicated by the instance name.
Bits 0 to (size-1) are r/w pre-load bits. Bits 31 down to size are
reserved. Reads return 0 and writes have no effect.
17.9.3 TIMER STATUS REGISTER
Offset 08h
Reset
Bits Description Type Default
Event
31:0 Reserved R - -
0 EVENT_INTERRUPT R/WC 0h Tim-
This is the interrupt status that fires when the timer reaches its limit. er_Reset
This may be level or a self clearing signal cycle pulse, based on the
AUTO_RESTART bit in the Timer Control Register. If the timer is set
to automatically restart, it will provide a pulse, otherwise a level is
provided.
Offset 0Ch
Reset
Bits Description Type Default
Event
31:0 Reserved R - -
0 EVENT_INTERRUPT_ENABLE R/W 0h Tim-
This is the interrupt enable for the status EVENT_INTERRUPT bit in er_Reset
the Timer Status Register
Offset 10h
Reset
Bits Description Type Default
Event
31:16 PRE_SCALE R/W 0h Tim-
This is used to divide down the system clock through clock enables er_Reset
to lower the power consumption of the block and allow slow timers.
Updating this value during operation may result in erroneous clock
enable pulses until the clock divider restarts.
The number of clocks per clock enable pulse is (Value + 1); a setting
of 0 runs at the full clock speed, while a setting of 1 runs at half
speed.
15:8 Reserved R - -
7 HALT R/W 0h Tim-
This is a halt bit. This will halt the timer as long as it is active. Once er_Reset
the halt is inactive, the timer will start from where it left off.
Reset
Bits Description Type Default
Event
5 START R/W 0h Tim-
This bit triggers the timer counter. The counter will operate until it er_Reset
hits its terminating condition. This will clear this bit. It should be
noted that when operating in restart mode, there is no terminating
condition for the counter, so this bit will never clear. Clearing this bit
will halt the timer counter.
1=The counter will automatically restart the count, using the contents
of the Timer Preload Register to load the Timer Count Register
The interrupt will be set in edge mode
0=The counter will simply enter a done state and wait for further con-
trol inputs. The interrupt will be set in level mode.
2 COUNT_UP R/W 0h Tim-
This selects the counter direction. er_Reset
When the counter in incrementing the counter will saturate and trig-
ger the event when it reaches all F’s. When the counter is decre-
menting the counter will saturate when it reaches 0h.
18.1 Introduction
The Hibernation Timer can generate a wake event to the Embedded Controller (EC) when it is in a hibernation mode.
This block supports wake events up to 2 hours in duration. The timer is a 16-bit binary count-down timer that can be
programmed in 30.5µs and 0.125 second increments for period ranges of 30.5µs to 2s or 0.125s to 136.5 minutes,
respectively. Writing a non-zero value to this register starts the counter from that value. A wake-up interrupt is generated
when the count reaches zero.
18.2 References
No references have been cited for this chapter
18.3 Terminology
No terms have been cited for this chapter.
18.4 Interface
This block is an IP block designed to be incorporated into a chip. It is designed to be accessed externally via the pin
interface and internally via a registered host interface. The following diagram illustrates the various interfaces to the
block.
Hibernation Timer
Host Interface
Signal Description
Clock Inputs
Resets
Interrupts
18.8 Interrupts
This section defines the interrupt Interface signals routed to the chip interrupt aggregator.
Each instance of the Hibernation Timer in the MEC1322 can be used to generate interrupts and wake-up events when
the timer decrements to zero. The Hibernation Timer interrupt is are routed to the HTIMER bit in the GIRQ17 Source
Register.
Offset 00h
Reset
Bits Description Type Default
Event
15:0 HT_PRELOAD R/W 000h VCC1_R
This register is used to set the Hibernation Timer Preload value. ESET
Writing this register to a non-zero value resets the down counter to
start counting down from this programmed value. Writing this regis-
ter to 0000h disables the hibernation counter. The resolution of this
timer is determined by the CTRL bit in the HTimer Control Register.
Writes to the HTimer Control Register are completed with an EC bus
cycle.
Offset 04h
Reset
Bits Description Type Default
Event
15:1 Reserved R - -
0 CTRL R 0000h VCC1_R
1= The Hibernation Timer has a resolution of 0.125s per LSB, which ESET
yields a maximum time in excess of 2 hours.
0= The Hibernation Timer has a resolution of 30.5µs per LSB, which
yields a maximum time of ~2seconds.
18.10.3 HTIMER COUNT REGISTER
Offset 08h
Reset
Bits Description Type Default
Event
15:0 COUNT R 0000h VCC1_R
The current state of the Hibernation Timer. ESET
19.1 Introduction
This block provides the capabilities of an industry-standard 146818B Real-Time Clock module, without CMOS RAM.
Enhancements to this architecture include:
• Industry standard Day of Month Alarm field, allowing for monthly alarms
• Configurable, automatic Daylight Savings adjustment
• Week Alarm for periodic interrupts and wakes based on Day of Week
• System Wake capability on interrupts.
19.2 References
1. Motorola 146818B Data Sheet, available on-line
2. Intel Lynx Point PCH EDS specification
19.3 Terminology
Time and Date Registers:
This is the set of registers that are automatically counted by hardware every 1 second while the block is enabled to run
and to update. These registers are: Seconds, Minutes, Hours, Day of Week, Day of Month, Month, and Year.
19.4 Interface
This block’s connections are entirely internal to the chip.
Host Interface
Signal Description
Clocks
Resets
Interrupts
19.8 Interrupts
19.10 Description
This block provides the capabilities of an industry-standard 146818B Real-Time Clock module, excluding the CMOS
RAM and the SQW output. See the following registers, which represent enhancements to this architecture. These
enhancements are listed below.
See the Date Alarm field of Register D for a Day of Month qualifier for alarms.
See the Week Alarm Register for a Day of Week qualifier for alarms.
See the registers Daylight Savings Forward Register and Daylight Savings Backward Register for setting up hands-off
Daylight Savings adjustments.
See the RTC Control Register for enhanced control over the block’s operations.
Note: This extended register set occupies offsets that have historically been used as CMOS RAM. Code ported
to use this block should be examined to ensure that it does not assume that RAM exists in this block.
Offset 00h
Reset
Bits Description Type Default
Event
7:0 SECONDS R/W 00h RTC_R
Displays the number of seconds past the current minute, in the range ST
0--59. Presentation may be selected as binary or BCD, depending on
the DM bit in Register B. Values written must also use the format
defined by the current setting of the DM bit.
Offset 01h
Reset
Bits Description Type Default
Event
7:0 SECONDS_ALARM R/W 00h RTC_R
Holds a match value, compared against the Seconds Register to trig- ST
ger the Alarm event. Values written to this register must use the for-
mat defined by the current setting of the DM bit in Register B. A value
of 11xxxxxxb written to this register makes it don’t-care (always
matching).
Offset 02h
Reset
Bits Description Type Default
Event
7:0 MINUTES R/W 00h RTC_RS
Displays the number of minutes past the current hour, in the range 0- T
-59. Presentation may be selected as binary or BCD, depending on
the DM bit in Register B. Values written must also use the format
defined by the current setting of the DM bit.
Offset 03h
Reset
Bits Description Type Default
Event
7:0 MINUTES_ALARM R/W 00h RTC_R
Holds a match value, compared against the Minutes Register to trig- ST
ger the Alarm event. Values written to this register must use the for-
mat defined by the current setting of the DM bit in Register B. A value
of 11xxxxxxb written to this register makes it don’t-care (always
matching).
Offset 04h
Reset
Bits Description Type Default
Event
7 HOURS_AM_PM R/W 0b RTC_R
In 12-hour mode (see bit “24/12” in register B), this bit indicates AM or ST
PM.
1=PM
0=AM
6:0 HOURS R/W 00h RTC_R
Displays the number of the hour, in the range 1--12 for 12-hour mode ST
(see bit “24/12” in register B), or in the range 0--23 for 24-hour mode.
Presentation may be selected as binary or BCD, depending on the
DM bit in Register B. Values written must also use the format defined
by the current setting of the DM bit.
Offset 05h
Reset
Bits Description Type Default
Event
7:0 HOURS_ALARM R/W 00h RTC_R
Holds a match value, compared against the Hours Register to trigger ST
the Alarm event. Values written to this register must use the format
defined by the current settings of the DM bit and the 24/12 bit in Reg-
ister B. A value of 11xxxxxxb written to this register makes it don’t-
care (always matching).
Offset 06h
Reset
Bits Description Type Default
Event
7:0 DAY_OF_WEEK R/W 00h RTC_R
Displays the day of the week, in the range 1 (Sunday) through 7 (Sat- ST
urday). Numbers in this range are identical in both binary and BCD
notation, so this register’s format is unaffected by the DM bit.
Offset 07h
Reset
Bits Description Type Default
Event
7:0 DAY_OF_MONTH R/W 00h RTC_R
Displays the day of the current month, in the range 1--31. Presenta- ST
tion may be selected as binary or BCD, depending on the DM bit in
Register B. Values written must also use the format defined by the
current setting of the DM bit.
Offset 08h
Reset
Bits Description Type Default
Event
7:0 MONTH R/W 00h RTC_R
Displays the month, in the range 1--12. Presentation may be selected ST
as binary or BCD, depending on the DM bit in Register B. Values writ-
ten must also use the format defined by the current setting of the DM
bit.
Offset 09h
Reset
Bits Description Type Default
Event
7:0 YEAR R/W 00h RTC_R
Displays the number of the year in the current century, in the range 0 ST
(year 2000) through 99 (year 2099). Presentation may be selected as
binary or BCD, depending on the DM bit in Register B. Values written
must also use the format defined by the current setting of the DM bit.
19.11.11 REGISTER A
Offset 0Ah
Reset
Bits Description Type Default
Event
7 UPDATE_IN_PROGRESS R 0b RTC_R
‘0’ indicates that the Time and Date registers are stable and will not be ST
altered by hardware soon. ‘1’ indicates that a hardware update of the
Time and Date registers may be in progress, and those registers
should not be accessed by the host program. This bit is set to ‘1’ at a
point 488us (16 cycles of the 32K clock) before the update occurs, and
is cleared immediately after the update. See also the Update-Ended
Interrupt, which provides more useful status.
6:4 DIVISION_CHAIN_SELECT R/W 000b RTC_R
This field provides general control for the Time and Date register ST
updating logic.
11xb=Halt counting. The next time that 010b is written, updates will
begin 500ms later.
010b=Required setting for normal operation. It is also necessary to set
the Block Enable bit in the RTC Control Register to ‘1’ for counting
to begin
000b=Reserved. This field should be initialized to another value before
Enabling the block in the RTC Control Register
Other values Reserved
3:0 RATE_SELECT R/W 0h RTC_R
This field selects the rate of the Periodic Interrupt source. See ST
Table 19-8
19.11.12 REGISTER B
Offset 0Bh
Reset
Bits Description Type Default
Event
7 UPDATE_CYCLE_INHIBIT R/W 0b RTC_R
In its default state ‘0’, this bit allows hardware updates to the Time ST
and Date registers, which occur at 1-second intervals. A ‘1’ written to
this field inhibits updates, allowing these registers to be cleanly writ-
ten to different values. Writing ‘0’ to this bit allows updates to con-
tinue.
6 PERIODIC_INTERRUPT_ENABLE R/W 0b RTC_R
ST
1=Alows the Periodic Interrupt events to be propagated as interrupts
0=Periodic events are not propagates as interrupts
5 ALARM_INTERRUPT_ENABLE R/W 0b RTC_R
ST
1=Alows the Alarm Interrupt events to be propagated as interrupts
0=Alarm events are not propagates as interrupts
4 UPDATE_ENDED_INTERRUPT_ENABLE R/W 0b RTC_R
ST
1=Alows the Update Ended Interrupt events to be propagated as inter-
rupts
0=Update Ended events are not propagates as interrupts
3 Reserved R - -
2 DATA_MODE R/W 0b RTC_R
ST
1=Binary Mode for Dates and Times
0=BCD Mode for Dates and Times
1 HOUR_FORMAT_24_12 R/W 0b RTC_R
ST
1=24-Hour Format for Hours and Hours Alarm registers. 24-Hour for-
mat keeps the AM/PM bit off, with value range 0--23
0=12-Hour Format for Hours and Hours Alarm registers. 12-Hour for-
mat has an AM/PM bit, and value range 1--12
Reset
Bits Description Type Default
Event
0 DAYLIGHT_SAVINGS_ENABLE R/W 0b RTC_R
ST
1=Enables automatic hardware updating of the hour, using the regis-
ters Daylight Savings Forward and Daylight Savings Backward to
select the yearly date and hour for each update
0=Automatic Daylight Savings updates disabled
Note: The DATA_MODE and HOUR_FORMAT_24_12 bits affect only how values are presented as they are
being read and how they are interpreted as they are being written. They do not affect the internal contents
or interpretations of registers that have already been written, nor do they affect how those registers are
represented or counted internally. This mode bits may be set and cleared dynamically, for whatever I/O
data representation is desired by the host program.
19.11.13 REGISTER C
Offset 0Ch
Reset
Bits Description Type Default
Event
7 INTERRUPT_REQUEST_FLAG RC 0b RTC_R
ST
1=Any of bits[6:4] below is active after masking by their respective
Enable bits in Register B.
0=No bits in this register are active
Reset
Bits Description Type Default
Event
4 UPDATE_ENDED_INTERRUPT_FLAG RC 0b RTC_R
ST
1=A Time and Date update has completed since the last time this reg-
ister was read. This bit displays status regardless of the Update-
Ended Interrupt Enable bit in Register B. Presentation of this sta-
tus indicates that the Time and Date registers will be valid and sta-
ble for over 999ms
0=A Time and Data update has not completed since the last time this
register was read
19.11.14 REGISTER D
Offset 0Dh
Reset
Bits Description Type Default
Event
7:6 Reserved R - -
5:0 DATE_ALARM R/W 00h RTC_R
This field, if set to a non-zero value, will inhibit the Alarm interrupt ST
unless this field matches the contents of the Month register also. If
this field contains 00h (default), it represents a don’t-care, allowing
more frequent alarms.
Offset 10h
Reset
Bits Description Type Default
Event
7:4 Reserved R - -
3 ALARM_ENABLE R/W 0b RTC_R
ST
1=Enables the Alarm features
0=Disables the Alarm features
2 Microchip Reserved R/W 0b RTC_R
ST
1 SOFT_RESET R/W 0b VBAT_
A ‘1’ written to this bit position will trigger the RTC_RST reset, reset- POR
ting the block and all registers except this one and the Test Register.
This bit is self-clearing at the end of the reset, one cycle of LPC Bus
Clock later, and so requires no waiting.
0 BLOCK_ENABLE R/W 0b RTC_R
This bit must be ‘1’ in order for the block to function internally. Regis- ST
ters may be initialized first, before setting this bit to ‘1’ to start opera-
tion.
Offset 14h
Reset
Bits Description Type Default
Event
7:0 ALARM_DAY_OF_WEEK R/W FFh RTC_R
This register, if written to a value in the range 1--7, will inhibit the ST
Alarm interrupt unless this field matches the contents of the Day of
Week Register also. If this field is written to any value 11xxxxxxb (like
the default FFh), it represents a don’t-care, allowing more frequent
alarms, and will read back as FFh until another value is written.
Offset 18h
Reset
Bits Description Type Default
Event
31 DST_FORWARD_AM_PM R/W 0b RTC_R
This bit selects AM vs. PM, to match bit[7] of the Hours Register if 12- ST
Hour mode is selected in Register B at the time of writing.
30:24 DST_FORWARD_HOUR R/W 00h RTC_R
This field holds the matching value for bits[6:0] of the Hours register. ST
The written value will be interpreted according to the 24/12 Hour
mode and DM mode settings at the time of writing.
23:19 Reserved R - -
18:16 DST_FORWARD_WEEK R/W 0h RTC_R
This value matches an internally-maintained week number within the ST
current month. Valid values for this field are:
This is a 32-bit register, accessible also as individual bytes. When writing as individual bytes, ensure that the DSE bit
(in Register B) is off first, or that the block is disabled or stopped (SET bit), to prevent a time update while this register
may have incompletely-updated contents.
When enabled by the DSE bit in Register B, this register defines an hour and day of the year at which the Hours register
will be automatically incremented by 1 additional hour.
There are no don’t-care fields recognized. All fields must be already initialized to valid settings whenever the DSE bit is
‘1’.
Fields other than Week and Day of Week use the current setting of the DM bit (binary vs. BCD) to interpret the informa-
tion as it is written to them. Their values, as held internally, are not changed by later changes to the DM bit, without
subsequently writing to this register as well.
Note: An Alarm that is set inside the hour after the time specified in this register will not be triggered, because
that one-hour period is skipped. This period includes the exact time (0 minutes: 0 seconds) given by this
register, through the 59 minutes: 59 seconds point afterward.
Offset 1Ch
Reset
Bits Description Type Default
Event
31 DST_BACKWARD_AM_PM R/W 0b RTC_R
This bit selects AM vs. PM, to match bit[7] of the Hours register if 12- ST
Hour mode is selected in Register B at the time of writing.
30:24 DST_BACKWARD_HOUR R/W 00h RTC_R
This field holds the matching value for bits[6:0] of the Hours register. ST
The written value will be interpreted according to the 24/12 Hour
mode and DM mode settings at the time of writing.
23:19 Reserved R - -
18:16 DST_BACKWARD_WEEK R/W 0h RTC_R
This value matches an internally-maintained week number within the ST
current month. Valid values for this field are:
This is a 32-bit register, accessible also as individual bytes. When writing as individual bytes, ensure that the DSE bit
(in Register B) is off first, or that the block is disabled or stopped (SET bit), to prevent a time update while this register
may have incompletely-updated contents.
When enabled by the DSE bit in Register B, this register defines an hour and day of the year at which the Hours register
increment will be inhibited from occurring. After triggering, this feature is automatically disabled for long enough to
ensure that it will not retrigger the second time this Hours value appears, and then this feature is re-enabled automati-
cally.
There are no don’t-care fields recognized. All fields must be already initialized to valid settings whenever the DSE bit is
‘1’.
Fields other than Week and Day of Week use the current setting of the DM bit (binary vs. BCD) to interpret the informa-
tion as it is written to them. Their values, as held internally, are not changed by later changes to the DM bit, without
subsequently writing to this register as well.
Note: An Alarm that is set inside the hour before the time specified in this register will be triggered twice, because
that one-hour period is repeated. This period will include the exact time (0 minutes: 0 seconds) given by
this register, through the 59 minutes: 59 seconds point afterward.
Note: The following GPIOs that do not exist in the 128-pin package are configured as inputs and grounded in the
package. Firmware should not attempt to turn those GPIOs into outputs and drive them high, or excessive
current will be consumed.
• GPIO067
• GPIO055
• GPIO210
• GPIO200
• GPIO202
• GPIO201
• GPIO203
• GPIO204
The following GPIOs that do not exist in the 128-pin package are not connected (NC) in the package. These
GPIOs should be configured as inputs and the internal pull-down should be enabled.
• GPIO211
• GPIO123
Reset
Bits Description Type Default
Event
31:25 RESERVED RES - -
24 GPIO input from pad R Note 20-5 VCC1_R
ESET
On reads, Bit [24] reflects the state of GPIO input from the pad
regardless of setting of Bit [10].
Note: This bit is forced high when the selected power well is off
as selected by the Power Gating Signal bits. See bits[3:2].
23:17 RESERVED RES - -
16 Alternative GPIO data R/W Note 20-5 VCC1_R
If enabled by the Output GPIO Write Enable bit, the Alternative GPIO ESET
data bit determines the level on the GPIO pin when the pin is config-
ured for the GPIO output function.
On writes:
If enabled via the Output GPIO Write Enable
0: GPIO[x] out = ‘0’
1: GPIO[x] out = ‘1’
Note: If disabled via the Output GPIO Write Enable then the
GPIO[x] out pin is unaffected by writing this bit.
On reads:
Bit [16] returns the last programmed value, not the value on the pin.
15:14 RESERVED RES - -
Reset
Bits Description Type Default
Event
13:12 Mux Control R/W Note 20-5 VCC1_R
The Mux Control field determines the active signal function for a pin. ESET
When the Polarity bit is set to ‘1’ and the Mux Control bits are greater
than ‘00,’ the selected signal function outputs are inverted and Inter-
rupt Detection (int_det) sense defined in Table 20-8, "Edge Enable
and Interrupt Detection Bits Definition" is inverted. When the Mux
Control field selects the GPIO signal function (Mux = ‘00’), the Polar-
ity bit does not effect the output. Regardless of the state of the Mux
Control field and the Polarity bit, the state of the pin is always
reported without inversion in the GPIO input register.
10 Output GPIO Write Enable R/W Note 20-5 VCC1_R
Every GPIO has two mechanisms to set a GPIO data output: Output ESET
GPIO Bit located in the GPIO Output Registers and the Alternative
GPIO data bit located in bit 16 of this register.
The GPIO Direction bit controls the buffer direction only when the
Mux Control field is ‘00’ selecting the pin signal function to be
GPIO. When the Mux Control field is greater than ‘00’ (i.e., a non-
GPIO signal function is selected) the GPIO Direction bit has no affect
and the selected signal function logic directly controls the pin direc-
tion.
Reset
Bits Description Type Default
Event
8 Output Buffer Type R/W Note 20-5 VCC1_R
0 = Push-Pull ESET
1 = Open Drain
Note: Unless explicitly stated otherwise, pins with (I/O/OD) or
(O/OD) in their buffer type column in the tables in are
compliant with the following Programmable OD/PP Multi-
plexing Design Rule: Each compliant pin has a program-
mable open drain/push-pull buffer controlled by the
Output Buffer Type bit in the associated Pin Control
Register. The state of this bit controls the mode of the
interface buffer for all selected functions, including the
GPIO function.
7 Edge Enable (edge_en) R/W Note 20-5 VCC1_R
0 = Edge detection disabled ESET
1 = Edge detection enabled
APPLICATION NOTE: All GPIO interrupt detection configurations default to '0000', which is low level interrupt.
Having interrupt detection enabled will un-gated the clock to the GPIO module whenever the
interrupt is active, which increases power consumption. Interrupt detection should be
disabled when not required to save power; this is especially true for pin interfaces (i.e., LPC).
Reset
Bits Description Type Default
Event
31:6 RESERVED RES - -
5:4 Drive Strength R/W Note 1: on VCC1_R
These bits are used to select the drive strength on the pin. page 248 ESET
00 = 2mA
01 = 4mA
10 = 8mA
11 = 12mA
3:1 RESERVED RES - -
0 Slew Rate R/W 0 VCC1_R
This bit is used to select the slew rate on the pin. ESET
0 = slow (half frequency)
1 = fast
20.8.3 GPIO OUTPUT REGISTERS
If enabled by the Output GPIO Write Enable bit, the GPIO Output bits determine the level on the GPIO pin when the pin
is configured for the GPIO output function.
On writes:
If enabled via the Output GPIO Write Enable
0: GPIO[x] out = ‘0’
1: GPIO[x] out = ‘1’
If disabled via the Output GPIO Write Enable then the GPIO[x] out pin is unaffected by writing this bit.
Note: Bits associated with GPIOs that are not implemented are shown as Reserved.
Reset
Bits Description Type Default
Event
31 RESERVED RES - -
30:24 GPIO[036:030] Output R/W 00h VCC1_R
ESET
23:16 GPIO[027:020] Output R/W 00h VCC1_R
ESET
15:8 GPIO[017:010] Output R/W 00h VCC1_R
ESET
7:0 GPIO[007:000] Output R/W 00h VCC1_R
ESET
Reset
Bits Description Type Default
Event
31:24 RESERVED RES - -
23:16 GPIO[067:060] Output R/W 00h VCC1_R
ESET
15:8 GPIO[057:050] Output R/W 00h VCC1_R
ESET
7:0 GPIO[047:040] Output R/W 00h VCC1_R
ESET
20.8.3.3 Output GPIO[100:127]
Reset
Bits Description Type Default
Event
31 RESERVED RES - -
30:24 GPIO[136:130] Output R/W 00h VCC1_R
ESET
23:16 GPIO[127:120] Output R/W 00h VCC1_R
ESET
15:8 GPIO[117:110] Output R/W 00h VCC1_R
ESET
7:0 GPIO[107:100] Output R/W 00h VCC1_R
ESET
Reset
Bits Description Type Default
Event
31:22 RESERVED RES - -
21:16 GPIO[165:160] Output R/W 00h VCC1_R
ESET
15:8 GPIO[157:150] Output R/W 00h VCC1_R
ESET
7:0 GPIO[147:140] Output R/W 00h VCC1_R
ESET
Reset
Bits Description Type Default
Event
31 RESERVED RES - -
30:24 RESERVED RES - -
23:12 RESERVED RES - -
11:10 MCHP Reserved R/W 00h VCC1_R
ESET
9:8 GPIO[211:210] Output R/W 00h VCC1_R
ESET
7 RESERVED RES - -
6 GPIO206 Output R/W 00h VCC1_R
ESET
5 RESERVED RES - -
4:0 GPIO[204:200] Output R/W 00h VCC1_R
ESET
Note: Bits associated with GPIOs that are not implemented are shown as Reserved.
Reset
Bits Description Type Default
Event
31 Scratchpad Bit R/W 0b VCC1_R
ESET
30:24 GPIO[036:030] Input R 00h VCC1_R
ESET
23:16 GPIO[027:020] Input R 00h VCC1_R
ESET
15:8 GPIO[017:010] Input R 00h VCC1_R
ESET
7:0 GPIO[007:000] Input R 00h VCC1_R
ESET
Reset
Bits Description Type Default
Event
31 Scratchpad Bit R/W 0b VCC1_R
ESET
30:24 RESERVED R - -
23:16 GPIO[067:060] Input R 00h VCC1_R
ESET
15:8 GPIO[057:050] Input R 00h VCC1_R
ESET
7:0 GPIO[047:040] Input R 00h VCC1_R
ESET
Reset
Bits Description Type Default
Event
31 Scratchpad Bit R/W 0b VCC1_R
ESET
30:24 GPIO[136:130] Input R 00h VCC1_R
ESET
23:16 GPIO[127:120] Input R 00h VCC1_R
ESET
15:8 GPIO[117:110] Input R 00h VCC1_R
ESET
7:0 GPIO[107:100] Input R 00h VCC1_R
ESET
Reset
Bits Description Type Default
Event
31 Scratchpad Bit R/W 0b VCC1_R
ESET
30:22 Reserved R 00h VCC1_R
ESET
21:16 GPIO[165:160] Input R 00h VCC1_R
ESET
15:8 GPIO[157:150] Input R 00h VCC1_R
ESET
7:0 GPIO[147:140] Input R 00h VCC1_R
ESET
20.8.4.5 Input GPIO[200:236]
Reset
Bits Description Type Default
Event
31 Scratchpad Bit R/W 0b VCC1_R
ESET
30:24 Scratchpad Bits R/W 00h VCC1_R
ESET
23:16 Scratchpad Bits R/W 00h VCC1_R
ESET
15:12 RESERVED RES - -
11:10 MCHP Reserved R/W 00h VCC1_R
ESET
9:8 GPIO[211:210] Input R/W 00h VCC1_R
ESET
7 RESERVED RES - -
6 GPIO206 Input R/W 00h VCC1_R
ESET
5 RESERVED RES - -
4:0 GPIO[204:200] Input R/W 00h VCC1_R
ESET
21.1 Introduction
The Internal DMA Controller transfers data to/from the source from/to the destination. The firmware is responsible for
setting up each channel. Afterwards either the firmware or the hardware may perform the flow control. The hardware
flow control exists entirely inside the source device. Each transfer may be 1, 2, or 4 bytes in size, so long as the device
supports a transfer of that size. Every device must be on the internal 32-bit address space.
21.2 References
No references have been cited for this chapter
21.3 Terminology
DMA Interface
Interrupts
21.6 Interrupts
This section defines the Interrupt Sources generated from this block.
21.8 Description
The MEC1322 features a 12 channel DMA controller. The DMA controller can autonomously move data from/to any
DMA capable master device to/from any populated memory location. This mechanism allows hardware IP blocks to
transfer large amounts of data into or out of memory without EC intervention.
The DMA has the following characteristics:
• Data is only moved 1 Data Packet at a time
• Data only moves between devices on the accessible via the internal 32-bit address space
21.8.1 CONFIGURATION
The DMA Controller is enabled via the ACTIVATE bit in DMA Main Control register.
Each DMA Channel must also be individually enabled via the CHANNEL_ACTIVATE bit in the DMA Channel N Activate
to be operational.
Before starting a DMA transaction on a DMA Channel the host must assign a DMA Master to the channel via HARD-
WARE_FLOW_CONTROL_DEVICE. The host must not configure two different channels to the same DMA Master at
the same time.
Data will be transfered between the DMA Master, starting at the programmed DEVICE_ADDRESS, and the targeted
memory location, starting at the MEMORY_START_ADDRESS. The address for either the DMA Master or the targeted
memory location may remain static or it may increment. To enable the DMA Master to increment its address set the
INCREMENT_DEVICE_ADDRESS bit. To enable the targeted memory location to increment its addresses set the
INCREMENT_MEMORY_ADDRESS. The DMA transfer will continue as long as the target memory address being
accessed is less than the MEMORY_END_ADDRESS. If the DMA Controller detects that the memory location it is
attempting to access on the Target is equal to the MEMORY_END_ADDRESS it will notify the DMA Master that the
transaction is done. Otherwise the Data will be transferred in packets. The size of the packet is determined by the
TRANSFER_SIZE.
21.8.2 OPERATION
The DMA Controller is designed to move data from one memory location to another.
Note: If Firmware wants to prevent any other channels from being granted while it is active it can set the
LOCK_CHANNEL bit.
Note: Before initiating a DMA transaction via firmware the hardware flow control mus be disabled via the DIS-
ABLE_HARDWARE_FLOW_CONTROL bit.
Data may be moved from the DMA Master to the targeted Memory address or from the targeted Memory Address to the
DMA Master. The direction of the transfer is determined by the TRANSFER_DIRECTION bit.
Once a transaction has been initiated firmware can use the STATUS_DONE bit to determine when the transaction is
completed. This status bit is routed to the interrupt interface. In the same register there are additional status bits that
indicate if the transaction completed successfully or with errors. This bits are OR’d together with the STATUS_DONE
bit to generate the interrupt event. Each status be may be individually enabled/disabled from generating this event.
Offset 00h
Reset
Bits Description Type Default
Event
7:2 Reserved R - -
1 SOFT_RESET W 0b -
Soft reset the entire module.
Offset 04h
Reset
Bits Description Type Default
Event
31:0 DATA_PACKET R 0000h -
Debug register that has the data that is stored in the Data Packet.
This data is read data from the currently active transfer source.
Offset 00h
Reset
Bits Description Type Default
Event
7:1 Reserved R - -
0 CHANNEL_ACTIVATE R/W 0h RESET
Enable this channel for operation.
The DMA Main Control:Activate must also be enabled for this chan-
nel to be operational.
Offset 04h
Reset
Bits Description Type Default
Event
31:0 MEMORY_START_ADDRESS R/W 0000h RESET
This is the starting address for the Memory device.
The Memory device is defined as the device that is the slave device
in the transfer.
ex. With Hardware Flow Control, the Memory device is the device
that is not connected to the Hardware Flow Controlling device.
Note: This field is only as large as the maximum allowed AHB
Address Size in the system. If the HADDR size is 24 Bits,
then Bits [31:24] will be RESERVED.
21.9.5 DMA CHANNEL N MEMORY END ADDRESS
Offset 08h
Reset
Bits Description Type Default
Event
31:0 MEMORY_END_ADDRESS R/W 0000h RESET
This is the ending address for the Memory device.
This will define the limit of the transfer, so long as DMA Channel
Control:Increment Memory Address is Enabled. When the Memory
Start Address is equal to this value, the DMA will terminate the trans-
fer and flag the status DMA Channel Interrupt:Status Done.
Note: This field is only as large as the maximum allowed AHB
Address Size in the system. If the HADDR size is 24 Bits,
then Bits [31:24] will be RESERVED.
Offset 0Ch
Reset
Bits Description Type Default
Event
31:0 DEVICE_ADDRESS R/W 0000h RESET
This is the Master Device address.
This is used as the address that will access the Device on the DMA.
The Device is defined as the Master of the DMA transfer; as in the
device that is controlling the Hardware Flow Control.
Offset 10h
Reset
Bits Description Type Default
Event
31:26 Reserved R - -
25 TRANSFER_ABORT R/W 0h RESET
This is used to abort the current transfer on this DMA Channel. The
aborted transfer will be forced to terminate immediately.
24 TRANSFER_GO R/W 0h RESET
This is used for the Firmware Flow Control DMA transfer.
Reset
Bits Description Type Default
Event
18 LOCK_CHANNEL RW 0h RESET
This is used to lock the arbitration of the Channel Arbiter on this
channel once this channel is granted.
Once this is locked, it will remain on the arbiter until it has completed
it transfer (either the Transfer Aborted, Transfer Done or Transfer
Terminated conditions).
Note: This setting may starve other channels if the locked chan-
nel takes an excessive period of time to complete.
17 INCREMENT_DEVICE_ADDRESS RW 0h RESET
This will enable an auto-increment to the DMA Channel Device
Address.
Reset
Bits Description Type Default
Event
4:3 STATUS R 0h RESET
This is a status signal. The status decode is listed in priority order
with the highest priority first.
The field will not flag back appropriately timed status, and
if used may cause the firmware to become out-of-sync
with the hardware.
1=Channel is done
0=Channel is not done or it is OFF
1 REQUEST RO 0h RESET
This is a status field.
Offset 14h
Reset
Bits Description Type Default
Event
7:3 Reserved R - -
2 STATUS_DONE R/WC 0h RESET
This is an interrupt source register.
This flags when the DMA Channel has completed a transfer suc-
cessfully on its side.
A completed transfer is defined as when the DMA Channel reaches
its limit; Memory Start Address equals Memory End Address.
A completion due to a Hardware Flow Control Terminate will not
flag this interrupt.
1: Error detected.
21.9.9 DMA CHANNEL N INTERRUPT ENABLE
Offset 18h
Reset
Bits Description Type Default
Event
7:3 Reserved R - -
2 STATUS_ENABLE_DONE R/W 0h RESET
This is an interrupt enable for DMA Channel Interrupt:Status
Done.
1=Enable Interrupt
0=Disable Interrupt
1 STATUS_ENABLE_FLOW_CONTROL_ERROR R/W 0h RESET
This is an interrupt enable for DMA Channel Interrupt:Status Flow
Control Error.
1=Enable Interrupt
0=Disable Interrupt
Reset
Bits Description Type Default
Event
0 STATUS_ENABLE_BUS_ERROR R/W 0h RESET
This is an interrupt enable for DMA Channel Interrupt:Status Bus
Error.
1=Enable Interrupt
0=Disable Interrupt
22.1 Introduction
The MEC1322 SMBus Interface includes one instance of the SMBus controller core. This chapter describes aspects of
the SMBus Interface that are unique to the MEC1322 instantiations of this core; including, Power Domain, Resets,
Clocks, Interrupts, Registers and the Physical Interface. For a General Description, Features, Block Diagram, Func-
tional Description, Registers Interface and other core-specific details, see Ref [1] (note: in this chapter, italicized text
typically refers to SMBus controller core interface elements as described in Ref [1]).
22.2 References
1. SMBus Controller Core Interface, Revision 3.4, Core-Level Architecture Specification, SMSC, 7/16/12
22.3 Terminology
There is no terminology defined for this chapter.
22.4 Interface
This block is designed to be accessed externally via the pin interface and internally via a registered host interface. In
addition, this block is equipped with
SMBus Interface
Host Interface
DMA Interface
Signal Description
Interrupts
22.9 Interrupts
22.11 Description
22.11.1 SMBUS CONTROLLER CORE
The MEC1322 SMBus Interface behavior is defined in the SMBus Controller Core Interface specification (See Ref [1]).
23.1 Overview
The MEC1322 includes a PECI Interface to allow the EC to retrieve temperature readings from PECI-compliant
devices. The PECI Interface implements the PHY and Link Layer of a PECI host controller as defined in References[1]
and includes hardware support for the PECI 2.0 command set.
This chapter focuses on MEC1322 specific PECI Interface configuration information such as Power Domains, Clock
Inputs, Resets, Interrupts, and other chip specific information. For a functional description of the MEC1322 PECI Inter-
face refer to References [1].
23.2 References
1. PECI Interface Core, Rev. 1.31, Core-Level Architecture Specification, SMSC Confidential, 4/15/11
23.3 Terminology
No terminology has been defined for this chapter.
23.4 Interface
This block is designed to be accessed externally via the pin interface and internally via a registered host interface.
PECI Interface
PECI_DAT
Power, Clocks and Reset
Interrupts
23.8 Interrupts
This section defines the Interrupt Sources generated from this block.
24.1 Introduction
This block monitors TACH output signals (or locked rotor signals) from various types of fans, and determines their
speed.
24.2 References
No references have been cited for this feature.
24.3 Terminology
There is no terminology defined for this section.
24.4 Interface
This block is designed to be accessed externally via the pin interface and internally via a registered host interface.
TACH
Host Interface
Signal Description
Power, Clocks and Reset
Interrupts
Name Description
VCC1 The logic and registers implemented in this block are powered by this
power well.
24.7.2 CLOCK INPUTS
Name Description
100kHz_Clk This is the clock input to the tachometer monitor logic. In Mode 1, the
TACH is measured in the number of these clocks.
24.7.3 RESETS
Name Description
VCC1_RESET This signal resets all the registers and logic in this block to their default
state.
24.8 Interrupts
This section defines the Interrupt Sources generated from this block.
Source Description
TACH This internal signal is generated from the OR’d result of the status
events, as defined in the TACHx Status Register.
24.10 Description
The TACH block monitors Tach output signals or locked rotor signals generated by various types of fans. These signals
can be used to determine the speed of the attached fan. This block is designed to monitor fans at fan speeds from 100
RPMs to 30,000 RPMs.
Typically, these are DC brushless fans that generate (with each revolution) a 50% duty cycle, two-period square wave,
as shown in Figure 24-2 below.
one revolution
In typical systems, the fans are powered by the main power supply. Firmware may disable this block when it detects that
the main power rail has been turned off by either clearing the <enable> TACH_ENABLE bit or putting the block to sleep
via the supported Low Power Mode interface (see Low Power Modes).
Offset 00h
Reset
Bits Description Type Default
Event
31:16 TACHX_COUNTER R 00h VCC1_
This 16-bit field contains the latched value of the internal Tach pulse RESET
counter, which may be configured by the Tach Reading Mode Select
field to operate as a free-running counter or to be gated by the Tach
input signal.
Reset
Bits Description Type Default
Event
10 TACH_READING_MODE_SELECT R/W 0b VCC1_
RESET
1=Counter is incremented on the rising edge of the 100kHz_Clk input.
The counter is latched into the TACHX_COUNTER field and
reset when the programmed number of edges is detected.
0=Counter is incremented when Tach Input transitions from low-to-
high state (default)
9 Reserved R - -
8 FILTER_ENABLE R/W 0b VCC1_
This filter is used to remove high frequency glitches from Tach Input. RESET
When this filter is enabled, Tach input pulses less than two 100kHz_-
Clk periods wide get filtered.
1= Filter enabled
0= Filter disabled (default)
Offset 04h
Reset
Bits Description Type Default
Event
31:4 Reserved R - -
3 COUNT_READY_STATUS R/WC 0b VCC1_R
This status bit is asserted when the Tach input changes state and ESET
when the counter value is latched. This bit remains cleared to '0'
when the TACH_READING_MODE_SELECT bit in the TACHx Con-
trol Register is '0'.
When the TACH_READING_MODE_SELECT bit in the TACHx Con-
trol Register is set to '1', this bit is set to ‘1’ when the counter value is
latched by the hardware. It is cleared when written with a ‘1’. If
COUNT_READY_INT_EN in the TACHx Control Register is set to 1,
this status bit will assert the Tach Interrupt signal.
1=Reading ready
0=Reading not ready
2 TOGGLE_STATUS R/WC 0b VCC1_R
This bit is set when Tach Input changes state. It is cleared when writ- ESET
ten with a ’1’. If TACH_INPUT_INT_EN in the TACHx Control Regis-
ter is set to ’1’, this status bit will assert the Tach Interrupt signal.
Offset 08h
Reset
Bits Description Type Default
Event
31:16 Reserved - - -
15:0 TACH_HIGH_LIMIT R/W FFFFh VCC1_
This value is compared with the value in the TACHX_COUNTER RESET
field. If the value in the counter is greater than the value programmed
in this register, the TACH_OUT_OF_LIMIT_STATUS bit will be set.
The TACH_OUT_OF_LIMIT_STATUS status event may be enabled
to generate an interrupt to the embedded controller via the
TACH_OUT_OF_LIMIT_ENABLE bit in the TACHx Control Register.
24.11.4 TACHX LOW LIMIT REGISTER
Offset 0Ch
Reset
Bits Description Type Default
Event
31:16 Reserved R - -
15:0 TACHX_LOW_LIMIT R/W 0000h VCC1_
This value is compared with the value in the TACHX_COUNTER field RESET
of the TACHx Control Register. If the value in the counter is less than
the value programmed in this register, the TACH_OUT_OF_LIM-
IT_STATUS bit will be set. The TACH_OUT_OF_LIMIT_STATUS sta-
tus event may be enabled to generate an interrupt to the embedded
controller via the TACH_OUT_OF_LIMIT_ENABLE bit in the TACHx
Control Register
25.1 Introduction
This block generates a PWM output that can be used to control 4-wire fans, blinking LEDs, and other similar devices.
Each PWM can generate an arbitrary duty cycle output at frequencies from less than 0.1 Hz to 24 MHz. The PWM con-
troller can also used to generate the PROCHOT output and Speaker output.
The PWMx Counter ON Time registers and PWMx Counter OFF Time registers determine the operation of the
PWM_OUTPUT signals. See Section 25.11.1, "PWMx Counter ON Time Register," on page 288 and Section 25.11.2,
"PWMx Counter OFF Time Register," on page 289 for a description of the PWM_OUTPUT signals.
25.2 References
There are no standards referenced in this chapter.
25.3 Terminology
There is no terminology defined for this section.
25.4 Interface
This block is designed to be accessed externally via the pin interface and internally via a registered host interface.
PWM
Host Interface
Signal Description
Interrupts
25.8 Interrupts
The PWM block does not generate any interrupt events.
25.10 Description
The PWM_OUTPUT signal is used to generate a duty cycle of specified frequency. This block can be programmed so
that the PWM signal toggles the PWM_OUTPUT, holds it high, or holds it low. When the PWM is configured to toggle,
the PWM_OUTPUT alternates from high to low at the rate specified in the PWMx Counter ON Time Register and PWMx
Counter OFF Time Register.
The following diagram illustrates how the clock inputs and registers are routed to the PWM Duty Cycle & Frequency
Control logic to generate the PWM output.
PWM BLOCK
Clock Select
CLOCK_HIGH Clock
Pre-
CLOCK_LOW Divider
(15:0) Invert_PWM PWM_ OUTPUT
16-bit down
EC I/F PWM Registers counter
Note: In Figure 25-2, the 48 MHz Ring Oscillator is represented as CLOCK_HIGH and 100kHz_Clk is repre-
sented as CLOCK_LOW.
The PWM clock source to the PWM Down Counter, used to generate a duty cycle and frequency on the PWM, is deter-
mined through the Clock select[1] and Clock Pre-Divider[6:3] bits in the PWMx Configuration Register register.
The PWMx Counter ON/OFF Time registers determine both the frequency and duty cycle of the signal generated on
PWM_OUTPUT as described below.
The PWM frequency is determined by the selected clock source and the total on and off time programmed in the PWMx
Counter ON Time Register and PWMx Counter OFF Time Register registers. The frequency is the time it takes (at that
clock rate) to count down to 0 from the total on and off time.
The PWM duty cycle is determined by the relative values programmed in the PWMx Counter ON Time Register and
PWMx Counter OFF Time Register registers.
The PWM Frequency Equation and PWM Duty Cycle Equation are shown below.
1 ( ClockSourceFrequency )
PWM Frequency = -------------------------------------------- × -------------------------------------------------------------------------------------------------------------------------------
( PWMCounterOnTime + PWMCounterOffTime )
( P reDivisor + 1 )
In Figure 25-3, the ClockSourceFrequency variable is the frequency of the clock source selected by the Clock Select
bit in the PWMx Configuration Register, and PreDivisor is a field in the PWMx Configuration Register. The PWMCoun-
terOnTime, PWMCounterOffTime are registers that are defined in Section 25.11, "EC-Only Registers".
PWMCounterOnTime
PWM Duty Cycle = --------------------------------------------------------------------------------------------------------------------------------
( PWMCounterOnTime + P WMCounterOffTime )
The PWMx Counter ON Time Register and PWMx Counter OFF Time Register registers should be accessed as 16-bit
values.
Offset 00h
Reset
Bits Description Type Default
Event
31:16 Reserved R - -
15:0 PWMX_COUNTER_ON_TIME R/W 0000h VCC1_R
This field determine both the frequency and duty cycle of the PWM ESET
signal.
When this field is set to zero and the PWMX_COUNTER_OFF_-
TIME is not set to zero, the PWM_OUTPUT is held low (Full Off).
Offset 04h
Reset
Bits Description Type Default
Event
31:16 Reserved R - -
15:0 PWMX_COUNTER_OFF_TIME R/W FFFFh VCC1_R
This field determine both the frequency and duty cycle of the PWM ESET
signal.
When this field is set to zero, the PWM_OUTPUT is held high (Full
On).
Offset 08h
Reset
Bits Description Type Default
Event
31:7 Reserved R - -
6:3 CLOCK_PRE_DIVIDER R/W 0000b VCC1_R
The Clock source for the 16-bit down counter (see PWMx Counter ESET
ON Time Register and PWMx Counter OFF Time Register) is deter-
mined by bit D1 of this register. The Clock source is then divided by
the value of Pre-Divider+1 and the resulting signal determines the
rate at which the down counter will be decremented. For example, a
Pre-Divider value of 1 divides the input clock by 2 and a value of 2
divides the input clock by 3. A Pre-Divider of 0 will disable the Pre-
Divider option.
2 INVERT R/W 0b VCC1_R
ESET
1= PWM_OUTPUT ON State is active low
0=PWM_OUTPUT ON State is active high
1 CLOCK_SELECT R/W 0b VCC1_R
This bit determines the clock source used by the PWM duty cycle ESET
and frequency control logic.
1=CLOCK_LOW
0=CLOCK_HIGH
0 PWM_ENABLE R/W 0b VCC1_R
ESET
1=Enabled (default)
0=Disabled (gates clocks to save power)
Note: When the PWM enable bit is set to 0 the internal counters
are reset and the internal state machine is set to the OFF
state. In addition, the PWM_OUTPUT signal is set to the
inactive state as determined by the Invert bit. The PWMx
Counter ON Time Register and PWMx Counter OFF
Time Register are not affected by the PWM enable bit
and may be read and written while the PWM enable bit is
0.
26.1 Introduction
The RPM-PWM Interface is closed-loop RPM based Fan Control Algorithm that monitors the fan’s speed and automat-
ically adjusts the drive to maintain the desired fan speed.
The RPM-PWM Interface functionality consists of a closed-loop “set-and-forget” RPM based fan controller.
26.2 References
No references have been cited for this chapter
26.3 Terminology
There is no terminology defined for this chapter.
26.4 Interface
This block is designed to be accessed externally via the pin interface and internally via a registered host interface.
The registers in the block are accessed by embedded controller code at the addresses shown in Section 26.9, "Fan
Control Register Bank".
Figure 26-1 illustrates and categorizes the RPM-PWM Interface block signals. These signals are described in Table 26-
1.
RPM-PWM Interface
Host Interface
Interrupts
26.6 Interrupts
This section defines the Interrupt Sources generated from this block.
26.8 Description
This section defines the functionality of the block.
No
TACH
Yes Reading=
Maintain Fan Drive
TACH
Target?
TACH
Yes Reading < No
TACH
Target?
APPLICATION NOTE: The tachometer measurement works independently of the drive settings. If the device is put
into manual mode and the fan drive is set at a level that is lower than the fan can operate
(including zero drive), the tachometer measurement may signal a Stalled Fan condition and
assert an interrupt.
STALLED FAN
If the TACH Reading Register exceeds the user-programmable Valid TACH Count setting, it will flag the fan as stalled
and trigger an interrupt. If the RPM based Fan Control Algorithm is enabled, the algorithm will automatically attempt to
restart the fan until it detects a valid tachometer level or is disabled.
The FAN_STALL Status bit indicates that a stalled fan was detected. This bit is checked conditionally depending on the
mode of operation.
• Whenever the Manual Mode is enabled or whenever the drive value is changed from 00h, the FAN_STALL inter-
rupt will be masked for the duration of the programmed Spin Up Time (see Table 26-17, “Spin time,” on page 303)
to allow the fan an opportunity to reach a valid speed without generating unnecessary interrupts.
• In Manual Mode, whenever the TACH Reading Register exceeds the Valid TACH Count Register setting, the
FAN_STALL status bit will be set.
• When the RPM based Fan Control Algorithm, the stalled fan condition is checked whenever the Update Time is
met and the fan drive setting is updated. It is not a continuous check.
APPLICATION NOTE: When the device is operating in manual mode, the FAN_SPIN status bit may be set if the
fan drive is set at a level that is lower than the fan can operate (excluding zero drive which
disables the fan driver). If the FAN_SPIN interrupt is unmasked, this condition will trigger an
errant interrupt.
Figure 26-3, "Spin Up Routine" shows an example of the Spin Up Routine in response to a programmed fan speed
change based on the first condition above.
100%
(optional)
Fan Step
Prev Target
Count = FFh
¼ of Spin Up Time
Update Time
Spin Up Time
Target Count Check TACH Target Count
Changed Reached
Interrupt
Status Bit 1
Interrupt Event 1
.
.
Interrupt
Enable Bit 1 .
. . . Interrupt Signal
..
. .
Interrupt
Status Bit n
.
Interrupt Event n
Interrupt
Enable Bit n
Offset 00h
Reset
Bits Description Type Default
Event
7:0 FAN_SETTING[7:0] R/W 00h VCC1_R
The Fan Driver Setting used to control the output of the Fan Driver. ESET
Offset 01h
Reset
Bits Description Type Default
Event
7:0 PWM_DIVIDE[7:0] R/W 01h VCC1_R
The PWM Divide value determines the final frequency of the PWM ESET
driver. The driver base frequency is divided by the PWM Divide
value to determine the final frequency.
Offset 02h
Reset
Bits Description Type Default
Event
7 EN_ALGO R/W 0b VCC1_R
Enables the RPM based Fan Control Algorithm. ESET
• ‘0’ - (default) the control circuitry is disabled and the fan driver
output is determined by the Fan Driver Setting Register.
• ‘1’ - the control circuitry is enabled and the Fan Driver output will
be automatically updated to maintain the programmed fan
speed as indicated by the TACH Target Register.
6:5 RANGE[1:0] R/W 01b VCC1_R
Adjusts the range of reported and programmed tachometer reading ESET
values. The RANGE bits determine the weighting of all TACH values
(including the Valid TACH Count, TACH Target, and TACH reading)
as shown in Table 26-9, "Range Decode".
4:3 EDGES[1:0] R/W 01b VCC1_R
Determines the minimum number of edges that must be detected on ESET
the TACH signal to determine a single rotation. A typical fan mea-
sured 5 edges (for a 2-pole fan).
Increasing the number of edges measured with respect to the num-
ber of poles of the fan will cause the TACH Reading registers to indi-
cate a fan speed that is higher or lower than the actual speed. In
order for the FSC Algorithm to operate correctly, the TACH Target
must be updated by the user to accommodate this shift. The Effec-
tive Tach Multiplier shown in Table 26-10, "Minimum Edges for Fan
Rotation" is used as a direct multiplier term that is applied to the
Actual RPM to achieve the Reported RPM. It should only be applied
if the number of edges measured does not match the number of
edges expected based on the number of poles of the fan (which is
fixed for any given fan).
Contact Microchip for recommended settings when using fans with
more or less than 2 poles.
Offset 03h
Reset
Bits Description Type Default
Event
7 MCHP Reserved R/W 0b VCC1_R
ESET
6 EN_RRC R/W 0b VCC1_R
Enables the ramp rate control circuitry during the Manual Mode of ESET
operation.
• ‘0’ (default) - The ramp rate control circuitry for the Manual
Mode of operation is disabled. When the Fan Drive Setting val-
ues are changed and the RPM based Fan Control Algorithm is
disabled, the fan driver will be set to the new setting immedi-
ately.
• ‘1’ - The ramp rate control circuitry for the Manual Mode of oper-
ation is enabled. The PWM setting will follow the ramp rate con-
trols as determined by the Fan Step and Update Time settings.
The maximum PWM step is capped at the Fan Step setting and
is updated based on the Update Time as given by Table 26-11,
"Update Time".
5 DIS_GLITCH R/W 0b VCC1_R
Disables the low pass glitch filter that removes high frequency noise ESET
injected on the TACH pin.
• ‘0’ (default) - The glitch filter is enabled.
• ‘1’ - The glitch filter is disabled.
1 0 Operation
0 0 0 RPM
0 1 50 RPM (default)
1 0 100 RPM
1 1 200 RPM
26.9.5 GAIN REGISTER
The Gain Register The Gain Register stores the gain terms used by the proportional and integral portions of the RPM
based Fan Control Algorithm. These terms will affect the FSC closed loop acquisition, overshoot, and settling as would
be expected in a classic PID system.
This register only applies if the Fan Speed Control Algorithm is used.
Offset 05h
Reset
Bits Description Type Default
Event
7:6 RESERVED R/W 00h -
5:4 GAIND[1:0] R/W 10h VCC1_R
The derivative gain term. See Table 26-14, "Gain Decode". ESET
3:2 GAINI[1:0] R/W 10h VCC1_R
The integral gain term. See Table 26-14, "Gain Decode". ESET
1:0 GAINP[1:0] R/W 10h VCC1_R
The proportional gain term. See Table 26-14, "Gain Decode". ESET
Offset 06h
Reset
Bits Description Type Default
Event
7:6 DRIVE_FAIL_CNT[1:0] R/W 00b VCC1_R
Determines how many update cycles are used for the Drive Fail ESET
detection function as shown in Table 26-15, "DRIVE_FAIL_CNT[1:0]
Bit Decode". This circuitry determines whether the fan can be driven
to the desired Tach target. These settings only apply if the Fan
Speed Control Algorithm is enabled.
5 NOKICK R/W 0b VCC1_R
Determines if the Spin Up Routine will drive the fan to 100% duty ESET
cycle for 1/4 of the programmed spin up time before driving it at the
programmed level.
• ‘0’ (default) - The Spin Up Routine will drive the PWM to 100%
for 1/4 of the programmed spin up time before reverting to the
programmed spin level.
• ‘1’ - The Spin Up Routine will not drive the PWM to 100%. It will
set the drive at the programmed spin level for the entire duration
of the programmed spin up time.
4:2 SPIN_LVL[2:0] R/W 110b VCC1_R
SPIN_LVL[2:0] - Determines the final drive level that is used by the ESET
Spin Up Routine as shown in Table 26-16, "Spin Level".
1:0 SPINUP_TIME[1:0] R/W 01b VCC1_R
Determines the maximum Spin Time that the Spin Up Routine will ESET
run for. If a valid tachometer measurement is not detected before the
Spin Time has elapsed, an interrupt will be generated. When the
RPM based Fan Control Algorithm is active, the fan driver will
attempt to re-start the fan immediately after the end of the last spin
up attempt.
The Spin Time is set as shown in Table 26-17, "Spin time".
Offset 07h
Reset
Bits Description Type Default
Event
7:6 RESERVED R/W 00h -
5:0 FAN_STEP[5:0] R/W 10h VCC1_R
The Fan Step value represents the maximum step size the fan driver ESET
will take between update times
Offset 08h
Reset
Bits Description Type Default
Event
7:0 MIN_DRIVE[7:0] R/W 66h VCC1_R
The minimum drive setting. ESET
APPLICATION NOTE: To ensure proper operation, the Fan Minimum Drive register must be set prior to setting the
Tach Target High and Low Byte registers, and then the Tach Target registers can be
subsequently updated. At a later time, if the Fan Minimum Drive register is changed to a
value higher than current Fan value, the Tach Target registers must also be updated.
APPLICATION NOTE: The automatic invoking of the Spin Up Routine only applies if the Fan Speed Control
Algorithm is used. If the FSC is disabled, then the device will only invoke the Spin Up Routine
when the PWM setting changes from 00h.
If a TACH Target setting is set above the Valid TACH Count setting, that setting will be ignored and the algorithm will
use the current fan drive setting.
These registers only apply if the Fan Speed Control Algorithm is used.
Offset 09h
Reset
Bits Description Type Default
Event
7:0 VALID_TACH_CNT[7:0] R/W F5h VCC1_R
The maximum TACH Reading Register value to indicate that the fan ESET
is spinning properly.
26.9.10 FAN DRIVE FAIL BAND REGISTER
The Fan Drive Fail Band Registers store the number of Tach counts used by the Fan Drive Fail detection circuitry. This
circuitry is activated when the fan drive setting high byte is at FFh. When it is enabled, the actual measured fan speed
is compared against the target fan speed.
This circuitry is used to indicate that the target fan speed at full drive is higher than the fan is actually capable of reaching.
If the measured fan speed does not exceed the target fan speed minus the Fan Drive Fail Band Register settings for a
period of time longer than set by the DRIVE_FAIL_CNTx[1:0] bits in the Fan Spin Up Configuration Register on page
302, the DRIVE_FAIL status bit will be set and an interrupt generated.
These registers only apply if the Fan Speed Control Algorithm is used.
Offset 0Ah
Reset
Bits Description Type Default
Event
15:3 FAN_DRIVE_FAIL_BAND[12:0] RES 000000000 VCC1_R
The number of Tach counts used by the Fan Drive Fail detection cir- 0000b ESET
cuitry
2:0 RESERVED R/W 000b -
26.9.11 TACH TARGET REGISTER
The TACH Target Registers hold the target tachometer value that is maintained for the RPM based Fan Control Algo-
rithm.
If the algorithm is enabled, setting the TACH Target Register High Byte to FFh will disable the fan driver (or set the PWM
duty cycle to 0%). Setting the TACH Target to any other value (from a setting of FFh) will cause the algorithm to invoke
the Spin Up Routine after which it will function normally.
These registers only apply if the Fan Speed Control Algorithm is used.
Offset 0Ch
Reset
Bits Description Type Default
Event
15:3 TACH_TARGET[12:0] RES 1111111111 VCC1_R
The target tachometer value. 111b ESET
2:0 RESERVED R/W 000b -
26.9.12 TACH READING REGISTER
The TACH Reading Registers’ contents describe the current tachometer reading for the fan. By default, the data rep-
resents the fan speed as the number of 32.768kHz clock periods that occur for a single revolution of the fan.
The Equation below shows the detailed conversion from tachometer measurement (COUNT) to RPM.
1 (n – 1)
RPM = -------------- × -------------------------------- × fTACH × 60
Poles 1
COUNT × ----
m
where:
- Poles = number of poles of the fan (typically 2)
- fTACH = the frequency of the tachometer measurement clock
- n = number of edges measured (typically 5 for a 2 pole fan)
- m = the multiplier defined by the RANGE bits
- COUNT = TACH Reading Register value (in decimal)
The following equation shows the simplified translation of the TACH Reading Register count to RPM assuming a 2-pole
fan, measuring 5 edges, with a frequency of 32.768kHz.
3932160 × m
RPM = -------------------------------
COUNT
Offset 0Eh
Reset
Bits Description Type Default
Event
15:3 TACH_READING[12:0] RES 1111111111 VCC1_R
The current tachometer reading value. 111b ESET
2:0 RESERVED R/W 000b -
26.9.13 PWM DRIVER BASE FREQUENCY REGISTER
- The PWM Driver Base Register controls the base PWM frequency range.
Offset 10h
Reset
Bits Description Type Default
Event
7:2 RESERVED RES 000000b -
1:0 PWM_BASE[1:0] R/W 00b VCC1_R
Determines the frequency range of the PWM fan driver (when ESET
enabled) as shown in Table 26-18.
1 0 PWM Frequency
0 0 26.83KHz
0 1 20.87kHz
1 0 4.82kHz
1 1 2.41KHz
Offset 11h
Reset
Bits Description Type Default
Event
7:6 RESERVED RES 00b -
5 DRIVE_FAIL R/WC 0b VCC1_R
The bit Indicates that the RPM-based Fan Speed Control Algorithm ESET
cannot drive the Fan to the desired target setting at maximum drive.
• ‘0’ - The RPM-based Fan Speed Control Algorithm can drive
Fan to the desired target setting.
• ‘1’ - The RPM-based Fan Speed Control Algorithm cannot drive
Fan to the desired target setting at maximum drive.
4:2 RESERVED RES 000b -
Reset
Bits Description Type Default
Event
1 FAN_SPIN R/WC 0b VCC1_R
The bit Indicates that the Spin up Routine for the Fan could not ESET
detect a valid tachometer reading within its maximum time window.
• ‘0’ - The Spin up Routine for the Fan detected a valid tachome-
ter reading within its maximum time window.
• ‘1’ - The Spin up Routine for the Fan could not detect a valid
tachometer reading within its maximum time window.
0 FAN_STALL R/WC 0b VCC1_R
The bit Indicates that the tachometer measurement on the Fan ESET
detects a stalled fan.
• ‘0’ - Stalled fan not detected.
• ‘1’ - Stalled fan not detected.
27.1 Overview
The General Purpose Serial Peripheral Interface (GP-SPI) may be used to communicate with various peripheral
devices, e.g., EEPROMS, DACs, ADCs, that use a standard Serial Peripheral Interface.
Characteristics of the GP-SPI Controller include:
• 8-bit serial data transmitted and received simultaneously over two data pins in Full Duplex mode with options to
transmit and receive data serially on one data pin in Half Duplex (Bidirectional) mode.
• An internal programmable clock generator and clock polarity and phase controls allowing communication with var-
ious SPI peripherals with specific clocking requirements.
• SPI cycle completion that can be determined by status polling or interrupts.
• The ability to read data in on both SPDIN and SPDOUT in parallel. This allows this SPI Interface to support dual
data rate read accesses for emerging double rate SPI flashes
• Support of back-to-back reads and writes without clock stretching, provided the host can read and write the data
registers within one byte transaction time.
27.2 References
No references have been cited for this feature.
27.3 Terminology
No terminology for this block.
27.4 Interface
This block is designed to be accessed externally via the pin interface and internally via a registered host interface.
Interrupts
Note: The SPI block signals that are shown in Table 27-1 are routed to the SPI pins as listed in Table 27-2.
27.10 Description
The Serial Peripheral Interface (SPI) block is a master SPI block used to communicate with external SPI devices. The
SPI master is responsible for generating the SPI clock and is designed to operate in Full Duplex, Half Duplex, and Dual
modes of operation. The clock source may be programmed to operated at various clock speeds. The data is transmit-
ted serially via 8-bit transmit and receive shift registers. Communication with SPI peripherals that require transactions
of varying lengths can be achieved with multiple 8-bit cycles.
This block has many configuration options: The data may be transmitted and received either MSbit or LSbit first; The
SPI Clock Polarity may be either active high or active low; Data may be sampled or presented on either the rising of
falling edge of the clock (referred to as the transmit clock phase); and the SPI_CLK SPDOUT frequency may be pro-
grammed to a range of values as illustrated in Table 27-7, "SPI_CLK Frequencies". In addition to these many program-
mable options, this feature has several status bits that may be enabled to notify the host that data is being transmitted
or received.
FIGURE 27-2: SINGLE BYTE SPI TX/RX TRANSACTIONS (FULL DUPLEX MODE)
MCLK
SPDOUT_Direction
TX_DATA BYTE 0
Write TX_Data
Read RX_Data
RX_DATA BYTE 0
SPCLKO
MCLK
SPDOUT_Direction
Write TX_Data
Read RX_Data
SPCLKO
The data may be configured to be transmitted MSB or LSB first. This is configured by the LSBF bit in the SPI Control
Register. The transmit data is shifted out on the edge as selected by the TCLKPH bit in the SPI Clock Control Register.
All received data can be sampled on a rising or falling SPI_CLK edge using the RCLKPH bit in the SPI Clock Control
Register This clock setting must be identical to the clocking requirements of the current SPI slave.
Note: Common peripheral devices require a chip select signal to be asserted during a transaction. Chip selects
for SPI devices may be controlled by MEC1322 GPIO pins.
There are three types of transactions that can be implemented for transmitting and receiving the SPI data. They are Full
Duplex, Half Duplex, and Dual Mode. These modes are define in Section 27.10.3, "Types of SPI Transactions".
Note: The Software driver must properly drive the BIOEN bit and store received data depending on the transac-
tion format of the specific slave device.
MCLK
BIOEN
Write TX_Data
Read RX_Data
SPDIN1
SPDIN2 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0
SPCLKO
MCLK
BIOEN
Write TX_Data
Read RX_Data
SPDIN1 7 5 3 1 7 5 3 1 7 5 3 1 7 5 3 1
SPDIN2 6 4 2 0 6 4 2 0 6 4 2 0 6 4 2 0
SPCLKO
Note: When the SPI core is used for flash commands, like the Dual Read command, the host discards the bytes
received during the command, address, and dummy byte portions of the transaction.
Note: When the SPI interface is in the idle state and data is not being transmitted, the SPI_CLK signal stops in
the inactive state as determined by the configuration bits.
The clock source to the down counter is determined by Bit CLKSRC. Either the main system clock or the 2MHz clock
can be used to decrement the down counter in the clock generator logic.
The SPI_CLK frequency is determined by the following formula:
1
SPI_CLK_FREQ= --- × REFERENCE_CLOCK ⁄ PRELOAD
2
The REFERENCE_CLOCK frequency is selected by CLKSRC in the SPI Clock Control Register and PRELOAD is the
PRELOAD field of the SPI Clock Generator Register. The frequency can be either the 48 MHz Ring Oscillator clock or
a 2MHz clock. When the PRELOAD value is 0, the REFERENCE_CLOCK is always the 48 MHz Ring Oscillator clock
and the CLKSRC bit is ignored.
Sample SPI Clock frequencies are shown in the following table:
27.11.1.2 Read/Write
The slave device used in this example is a Fairchild NS25C640 FM25C640 64K Bit Serial EEPROM. The following sub-
sections describe the read and write sequences.
Read
• The SPI block is activated by setting the enable bit in SPIAR - SPI Enable Register
• The SPIMODE bit is de-asserted '0' to enable the SPI interface in Full Duplex mode.
• The CLKPOL, TCLKPH and RCLKPH bits are de-asserted '0' to match the clocking requirements of the slave
device.
• The LSBF bit is de-asserted '0' to indicate that the slave expects data in MSB-first order.
• Assert CS# low using a GPIO pin.
• Write a valid command word (as specified by the slave device) to the SPITD - SPI TX_Data Register with TXFE
asserted '1'. The SPI master automatically clears the TXFE bit indicating the byte has been put in the TX buffer. If
the shift register is empty the TX_DATA byte is loaded into the shift register and the SPI master reasserts the
TXFE bit. Once the data is in the shift register the SPI master begins shifting the data value onto the SPDOUT pin
and drives the SPI_CLK pin. Data on the SPDIN pin is also sampled on each clock.
• Once the TXFE bit is asserted the SPI Master is ready to receive its next byte. Before writing the next TX_DATA
value, software must clear the RXBF status bit by reading the SPIRD - SPI RX_Data Register.
• Next, EEPROM address A15-A8 is written to the TX_DATA register. The SPI master automatically clears the
TXFE bit, but does not begin shifting the dummy data value onto the SPDOUT pin. This byte will remain in the
TX_DATA register until the TX shift register is empty.
Note: External pull-up or pull-down is required on the SPDIN pin if it is tri-stated by the slave device.
- Once the first SPI cycle is completed, the SPI master takes the pending data in the TX_DATA register
(EEPROM address A15-A8) and loads it into the TX shift register. Loading the shift register automatically
asserts the TXFE bit, begins shifting the dummy data value onto the SPDOUT pin, and drives the SPI_CLK
pin. Data on the SPDIN pin is also sampled on each clock. Note: The particular slave device ignores address
A15-A13.
• Once the TXFE bit is asserted the SPI Master is ready to receive its next byte. Before writing the next TX_DATA
value, software must clear the RXBF status bit by reading the SPIRD - SPI RX_Data Register.
• Next, EEPROM address A7-A0 is written to the TX_DATA register. The SPI master automatically clears the TXFE
bit, but does not begin shifting this data value onto the SPDOUT pin. This byte will remain in the TX_DATA register
until the TX shift register is empty.
• After 8 SPI_CLK pulses from the second transmit byte (Address Byte (MSB) transmitted):
- EEPROM address A15-A8 has been transmitted to the slave completing the second SPI cycle. Once again,
the RXBF bit is asserted '1' and the SPINT interrupt is asserted, if enabled. The data now contained in SPIRD
- SPI RX_Data Register is invalid since the last cycle was initiated solely to transmit address data to the
slave.
- Once the second SPI cycle is completed, the SPI master takes the pending data in the TX_DATA register
(EEPROM address A7-A0) and loads it into the TX shift register. Loading the shift register automatically
asserts the TXFE bit, begins shifting the dummy data value onto the SPDOUT pin, and drives the SPCLK pin.
Data on the SPDIN pin is also sampled on each clock.
• Once the TXFE bit is asserted the SPI Master is ready to receive its next byte. Before writing the next TX_DATA
value, software must clear the RXBF status bit by reading the SPIRD - SPI RX_Data Register.
• Next, a dummy byte is written to the TX_DATA register. The SPI master automatically clears the TXFE bit, but
does not begin shifting this data value onto the SPDOUT pin. This byte will remain in the TX_DATA register until
the TX shift register is empty.
• After 8 SPI_CLK pulses, the third SPI cycle is complete (Address Byte (LSB) transmitted):
- EEPROM address A7-A0 has been transmitted to the slave completing the third SPI cycle. Once again, the
RXBF bit is asserted '1' and the SPINT interrupt is asserted, if enabled. The data now contained in SPIRD -
SPI RX_Data Register is invalid since the last cycle was initiated solely to transmit address data to the slave.
- Once the third SPI cycle is completed, the SPI master takes the pending data in the TX_DATA register
(dummy byte) and loads it into the TX shift register. Loading the shift register automatically asserts the TXFE
bit, begins shifting the dummy data value onto the SPDOUT pin, and drives the SPCLK pin. Data on the
SPDIN pin is also sampled on each clock.
• Once the TXFE bit is asserted the SPI Master is ready to receive its next byte. Before writing the next TX_DATA
value, software must clear the RXBF status bit by reading the SPIRD - SPI RX_Data Register.
• If only one receive byte is required, the host would not write any more value to the TX_DATA register until this
transaction completes. If more than one byte of data is to be received, another dummy byte would be written to the
TX_DATA register (one dummy byte per receive byte is required). The SPI master automatically clears the TXFE
bit when the TX_DATA register is written, but does not begin shifting this data value onto the SPDOUT pin. This
byte will remain in the TX_DATA register until the TX shift register is empty.
• After 8 SPI_CLK pulses, the fourth SPI cycle is complete (First Data Byte received):
- The dummy byte has been transmitted to the slave completing the fourth SPI cycle. Once again, the RXBF bit
is asserted '1' and the SPINT interrupt is asserted, if enabled. Unlike the command and address phases, the
data now contained in SPIRD - SPI RX_Data Register is the 8-bit EEPROM data since the last cycle was ini-
tiated to receive data from the slave.
- Once the fourth SPI cycle is completed, the SPI master takes the pending data in the TX_DATA register (if
any) and loads it into the TX shift register. This process will be repeated until all the desired data is received.
• The host software will read and store the EEPROM data value in SPIRD - SPI RX_Data Register.
USER’S NOTE: External pull-up or pull-down is required on the SPDIN pin if it is tri-stated by the slave device.
- Once the first SPI cycle is completed, the SPI master takes the pending data in the TX_DATA register
(EEPROM address A15-A8) and loads it into the TX shift register. Loading the shift register automatically
asserts the TXFE bit, begins shifting the dummy data value onto the SPDOUT pin, and drives the SPI_CLK
pin. Data on the SPDIN pin is also sampled on each clock. Note: The particular slave device ignores address
A15-A13.
• Once the TXFE bit is asserted the SPI Master is ready to receive its next byte. Before writing the next TX_DATA
value, software must clear the RXBF status bit by reading the SPIRD - SPI RX_Data Register.
• Next, EEPROM address A7-A0 is written to the TX_DATA register. The SPI master automatically clears the TXFE
bit, but does not begin shifting this data value onto the SPDOUT pin. This byte will remain in the TX_DATA register
until the TX shift register is empty.
• After 8 SPI_CLK pulses from the second transmit byte (Address Byte (MSB) transmitted):
- EEPROM address A15-A8 has been transmitted to the slave completing the second SPI cycle. Once again,
the RXBF bit is asserted '1' and the SPINT interrupt is asserted, if enabled. The data now contained in SPIRD
- SPI RX_Data Register is invalid since the last cycle was initiated solely to transmit address data to the
slave.
- Once the second SPI cycle is completed, the SPI master takes the pending data in the TX_DATA register
(EEPROM address A7-A0) and loads it into the TX shift register. Loading the shift register automatically
asserts the TXFE bit, begins shifting the dummy data value onto the SPDOUT pin, and drives the SPCLK pin.
Data on the SPDIN pin is also sampled on each clock.
• Once the TXFE bit is asserted the SPI Master is ready to receive its next byte. Before writing the next TX_DATA
value, software must clear the RXBF status bit by reading the SPIRD - SPI RX_Data Register.
• Next, a data byte (D7:D0) is written to the TX_DATA register. The SPI master automatically clears the TXFE bit,
but does not begin shifting this data value onto the SPDOUT pin. This byte will remain in the TX_DATA register
until the TX shift register is empty.
• After 8 SPI_CLK pulses, the third SPI cycle is complete (Address Byte (LSB) transmitted):
- EEPROM address A7-A0 has been transmitted to the slave completing the third SPI cycle. Once again, the
RXBF bit is asserted '1' and the SPINT interrupt is asserted, if enabled. The data now contained in SPIRD -
Note: The Shared SPI controller is instance 0 and the Private SPI is instance 1 of the General Purpose Serial
Peripheral Interface (GP-SPI) block.
Offset 00h
Reset
Bits Description Type Default
Event
31:1 Reserved R - -
0 ENABLE R/W 0h VCC1_R
ESET
1=Enabled. The device is fully operational
0=Disabled. Clocks are gated to conserve power and the SPDOUT
and SPI_CLK signals are set to their inactive state
27.12.2 SPI CONTROL REGISTER
Offset 00h
Reset
Bits Description Type Default
Event
31:7 Reserved R - -
6 CE R/W 0h VCC1_R
SPI Chip Select Enable. ESET
Reset
Bits Description Type Default
Event
1 BIOEN R/W 1h VCC1_R
Bidirectional Output Enable control. When the SPI is configured for ESET
Half Duplex mode or Dual Mode the SPDOUT pin operates as a bi-
directional signal. The BIOEN bit is used by the internal DIRECTION
bit to control the direction of the SPDOUT buffers. The direction of
the buffer is never changed while a byte is being transmitted.
Offset 08h
Reset
Bits Description Type Default
Event
31:3 Reserved R - -
2 ACTIVE R 0h VCC1_R
ESET
1 RXBF R 0h VCC1_R
Receive Data Buffer Full status. When this bit is ‘1’ the Rx_Data buf- ESET
fer is full. Reading the SPI RX_Data Register clears this bit. This sig-
nal may be used to generate a SPI_RX interrupt to the EC.
Offset 00h
Reset
Bits Description Type Default
Event
31:8 Reserved R - -
7:0 TX_DATA R/W 0h VCC1_R
A write to this register when the Tx_Data buffer is empty (TXBE in ESET
the SPI Status Register is ‘1’) initiates a SPI transaction. The byte
written to this register will be loaded into the shift register and the
TXBE flag will be asserted. This indicates that the next byte can be
written into the TX_DATA register. This byte will remain in the TX_-
DATA register until the SPI core has finished shifting out the previ-
ous byte. Once the shift register is empty, the hardware will load the
pending byte into the shift register and once again assert the TxBE
bit.
The TX_DATA register must not be written when the TXBE bit is
zero. Writing this register may overwrite the transmit data before it is
loaded into the shift register.
Offset 00h
Reset
Bits Description Type Default
Event
31:8 Reserved R - -
7:0 RX_DATA R/W 0h VCC1_R
This register is used to read the value returned by the external SPI ESET
device. At the end of a byte transfer the RX_DATA register contains
serial input data (valid or not) from the last transaction and the RXBF
bit is set to one. This status bit indicates that the RX_DATA register
has been loaded with a the serial input data. The RX_DATA register
should not be read before the RXBF bit is set.
The RX_DATA register must be read, clearing the RXBF status bit
before writing the TX_DATA register. The data in the receive shift
register is only loaded into the RX_DATA register when this bit is
cleared. If a data byte is pending in the receive shift register the
value will be loaded immediately into the RX_DATA register and the
RXBF status flag will be asserted. Software should read the RX_-
DATA register twice before starting a new transaction to make sure
the RX_DATA buffer and shift register are both empty.
Offset 00h
Reset
Bits Description Type Default
Event
31:5 Reserved R - -
4 CLKSRC R/W 0h VCC1_R
Clock Source for the SPI Clock Generator. This bit should not be ESET
changed during a SPI transaction. When the field PRELOAD in the
SPI Clock Generator Register is 0, this bit is ignored and the Clock
Source is always the main system clock (the equivalent of setting
this bit to ‘0’).
1=2MHz
0=48 MHz Ring Oscillator
3 Reserved R - -
2 CLKPOL R/W 0h VCC1_R
SPI Clock Polarity. ESET
1=The SPI_CLK signal is high when the interface is idle and the first
clock edge is a falling edge
0=The SPI_CLK is low when the interface is idle and the first clock
edge is a rising edge
1 RCLKPH R/W 1h VCC1_R
Receive Clock Phase, the SPI_CLK edge on which the master will ESET
sample data. The receive clock phase is not affected by the SPI
Clock Polarity.
Offset 00h
Reset
Bits Description Type Default
Event
31:16 Reserved R - -
5:0 PRELOAD R/W 2h VCC1_R
SPI Clock Generator Preload value. ESET
28.1 Introduction
LEDs are used in computer applications to communicate internal state information to a user through a minimal interface.
Typical applications will cause an LED to blink at different rates to convey different state information. For example, an
LED could be full on, full off, blinking at a rate of once a second, or blinking at a rate of once every four seconds, in order
to communicate four different states.
As an alternative to blinking, an LED can “breathe”, that is, oscillate between a bright state and a dim state in a contin-
uous, or apparently continuous manner. The rate of breathing, or the level of brightness at the extremes of the oscillation
period, can be used to convey state information to the user that may be more informative, or at least more novel, than
traditional blinking.
The blinking/breathing hardware is implemented using a PWM. The PWM can be driven either by the 48 MHz clock or
by a 32.768 KHz clock input. When driven by the 48 MHz clock, the PWM can be used as a standard 8-bit PWM in order
to control a fan. When used to drive blinking or breathing LEDs, the 32.768 KHz clock source is used.
Features:
• Each PWM independently configurable
• Each PWM configurable for LED blinking and breathing output
• Highly configurable breathing rate from 60ms to 1min
• Non-linear brightness curves approximated with 8 piece wise-linear segments
• All LED PWMs can be synchronized
• Each PWM configurable for 8-bit PWM support
• Multiple clock rates
• Configurable Watchdog Timer
28.2 Interface
This block is designed to drive a pin on the pin interface and to be accessed internally via a registered host interface.
Blinking/Breathing PWM
Host Interface
Signal Description
Clock Inputs
Resets
Interrupts
28.6 Interrupts
Each PWM can generate an interrupt. The interrupt is asserted for one 48 MHz clock period whenever the PWM WDT
times out. The PWM WDT is described in Section 28.8.3.1, "PWM WDT," on page 332.
Note: PWM_WDT[0], PWM_WDT[1], PWM_WDT[2], PWM_WDT[3] bits in the GIRQ17 and GIRQ18 registers
are the interrupt source bits for the three instances of the Blinking/Breathing PWM in the MEC1322.
Note: In order for the MEC1322 to enter its.heavy and deep sleep states, the SLEEP_ENABLE input for all Blink-
ing/Breathing PWM instances must be asserted, even if the PWMs are configured to use the low speed
clock.
28.8 Description
28.8.1 BREATHING
If an LED blinks rapidly enough, the eye will interpret the light as reduced brightness, rather than a blinking pattern.
Therefore, if the blinking period is short enough, modifying the duty cycle will set the apparent brightness, rather than a
blinking rate. At a blinking rate of 128Hz or greater, almost all people will perceive a continuous light source rather than
an intermittent pattern.
Because making an LED appear to breathe is an aesthetic effect, the breathing mechanism must be adjustable or cus-
tomers may find the breathing effect unattractive. There are several variables that can affect breathing appearance, as
described below.
The following figure illustrates some of the variables in breathing:
Full on
Full off
Full on
Full off
The clipping periods at the two extremes can be adjusted independently, so that for example an LED can appear to
breathe (with a short delay at maximum brightness) followed by a longer “resting” period (with a long delay at minimum
brightness).
The brightness can also be changed in a non-linear fashion, as shown in the following figure:
Full on
Full off
In this figure, the rise and fall curves are implemented in 4 linear segments and are the rise and fall periods are sym-
metric.
The breathing mode uses the 32.768 KHz clock for its time base.
The Blinking and General Purpose PWM modes share the hardware used in the breathing mode. The Prescale value
is derived from the LD field of the LED_DELAY register and the Duty Cycle is derived from the MIN field of the LED_LIM-
ITS register.
28.9 Implementation
In addition to the registers described in Section 28.10, "EC-Only Registers", the PWM is implemented using a number
of components that are interconnected differently when configured for breathing operation and when configured for
blinking/PWM operation.
f clock
f PWM = ------------------------------------------
( 256 × ( LD + 1 ) )
where fPWM is the frequency of the PWM, fclock is the frequency of the input clock (32.768 KHz clock or 48 MHz clock)
and LD is the contents of the LD field.
Note: At a duty cycle value of 00h (in the MIN register), the LED output is fully off. At a duty cycle value of 255h,
the LED output is fully on. Alternatively, In order to force the LED to be fully on, firmware can set the CON-
TROL field of the Configuration register to 3 (always on).
The other registers in the block do not affect the PWM or the LED output in Blinking/PWM mode.
300
250
200
e
l
c
y
C150
y
t
u
D
100
50
0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
2 4 6 8 0 2 4 6 8 0 2 4 6 8 0 2 4 6 8 0 2 4 6 8 0 2 4 6 8 0 2 4 6 8
3 6 9 2 6 9 2 5 8 2 5 8 1 4 8 1 4 7 0 4 7 0 3 6 0 3 6 9 2 6 9 2 5 8
1 1 1 2 2 2 3 3 3 4 4 4 5 5 5 6 6 6 7 7 7 8 8 8 8 9 9 9 0 0 0
1 1 1
Time in ms
300
250
200
e
l
c
y
C150
ty
u
D
100
50
0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
6 2 8 4 0 6 2 8 4 0 6 2 8 4 0 6 2 8 4 0 6 2 8 4 0 6 2 8 4 0 6 2 8 4
1 3 4 6 8 9 1 2 4 6 7 9 0 2 4 5 7 8 0 2 3 5 6 8 0 1 3 4 6 8 9 1 2 4
1 1 1 1 1 1 2 2 2 2 2 2 3 3 3 3 3 3 4 4 4 4 4 4 4 5 5 5
Time in ms
In the following register definitions, a “PWM period” is defined by time the PWM counter goes from 000h to its maximum
value (FFh in 8-bit mode, FEh in 7-bit mode and FCh in 6-bit mode, as defined by the PSCALE field in register
LED_CFG). The end of a PWM period occurs when the PWM counter wraps from its maximum value to 0.
The registers in this block can be written 32-bits, 16-bits or 8-bits at a time. Writes to LED Configuration Register take
effect immediately. Writes to LED Limits Register are held in a holding register and only take effect only at the end of a
PWM period. The update takes place at the end of every period, even if only one byte of the register was updated. This
means that in blink/PWM mode, software can change the duty cycle with a single 8-bit write to the MIN field in the
LED_LIMIT register. Writes to LED Delay Register, LED Update Stepsize Register and LED Update Interval Register
also go initially into a holding register. The holding registers are copied to the operating registers at the end of a PWM
period only if the Enable Update bit in the LED Configuration Register is set to 1. If LED_CFG is 0, data in the holding
registers is retained but not copied to the operating registers when the PWM period expires. To change an LED breath-
ing configuration, software should write these three registers with the desired values and then set LED_CFG to 1. This
mechanism ensures that all parameters affecting LED breathing will be updated consistently, even if the registers are
only written 8 bits at a time.
Offset 00h
Reset
Bits Description Type Default
Event
31:16 Reserved R - -
16 SYMMETRY R/W 0b VCC1_
RESET
1=The rising and falling ramp times are in Asymmetric mode.
Table 28-12, "Asymmetric Breathing Mode Register Usage"
shows the application of the Stepsize and Interval registers to the
four segments of rising duty cycles and the four segments of fall-
ing duty cycles.
0=The rising and falling ramp times (as shown in Figure 28-2, "Breath-
ing LED Example") are in Symmetric mode. Table 28-11, "Sym-
metric Breathing Mode Register Usage" shows the application of
the Stepsize and Interval registers to the 8 segments of both ris-
ing and falling duty cycles.
15:8 WDT_RELOAD R/W 14h VCC1_
The PWM Watchdog Timer counter reload value. On system reset, it RESET
defaults to 14h, which corresponds to a 4 second Watchdog timeout
value.
7 RESET W 0b VCC1_
Writes of’1’ to this bit resets the PWM registers to their default val- RESET
ues. This bit is self clearing.
Writes of ‘0’ to this bit have no effect.
Reset
Bits Description Type Default
Event
6 ENABLE_UPDATE R/WS 0b VCC1_
This bit is set to 1 when written with a ‘1’. Writes of ‘0’ have no effect. RESET
Hardware clears this bit to 0 when the breathing configuration regis-
ters are updated at the end of a PWM period. The current state of the
bit is readable any time.
3=Reserved
2=PWM is configured as a 6-bit PWM
1=PWM is configured as a 7-bit PWM
0=PWM is configured as an 8-bit PWM
3 SYNCHRONIZE R/W 0b VCC1_
When this bit is ‘1’, all counters for all LEDs are reset to their initial RESET
values. When this bit is ‘0’ in the LED Configuration Register for all
LEDs, then all counters for LEDs that are configured to blink or
breathe will increment or decrement, as required.
Offset 04h
Reset
Bits Description Type Default
Event
31:16 Reserved R - -
15:8 MAXIMUM R/W 0h VCC1_
In breathing mode, when the current duty cycle is greater than or RESET
equal to this value the breathing apparatus holds the current duty
cycle for the period specified by the field HD in register LED_DELAY,
then starts decrementing the current duty cycle
7:0 MINIMUM R/W 0h VCC1_
In breathing mode, when the current duty cycle is less than or equal RESET
to this value the breathing apparatus holds the current duty cycle for
the period specified by the field LD in register LED_DELAY, then
starts incrementing the current duty cycle
In blinking mode, this field defines the duty cycle of the blink function.
28.10.3 LED DELAY REGISTER
This register may be written at any time. Values written into the register are held in an holding register, which is trans-
ferred into the actual register at the end of a PWM period if the Enable Update bit in the LED Configuration register is
set to 1. Reads of this register return the current contents and not the value of the holding register.
Offset 08h
Reset
Bits Description Type Default
Event
31:24 Reserved R - -
23:12 HIGH_DELAY R/W 000h VCC1_
In breathing mode, the number of PWM periods to wait before updat- RESET
ing the current duty cycle when the current duty cycle is greater than
or equal to the value MAX in register LED_LIMIT.
In blinking mode, this field defines the prescalar for the PWM clock
Offset 0Ch
Reset
Bits Description Type Default
Event
31:28 UPDATE_STEP7 R/W 0h VCC1_
Amount the current duty cycle is adjusted at the end of every PWM RESET
period when the segment index is equal to 111.
27:24 UPDATE_STEP6 R/W 0h VCC1_
Amount the current duty cycle is adjusted at the end of every PWM RESET
period when the segment index is equal to 110.
23:20 UPDATE_STEP5 R/W 0h VCC1_
Amount the current duty cycle is adjusted at the end of every PWM RESET
period when the segment index is equal to 101
19:16 UPDATE_STEP4 R/W 0h VCC1_
Amount the current duty cycle is adjusted at the end of every PWM RESET
period when the segment index is equal to 100.
15:12 UPDATE_STEP3 R/W 0h VCC1_
Amount the current duty cycle is adjusted at the end of every PWM RESET
period when the segment index is equal to 011.
Reset
Bits Description Type Default
Event
11:8 UPDATE_STEP2 R/W 0h VCC1_
Amount the current duty cycle is adjusted at the end of every PWM RESET
period when the segment index is equal to 010.
7:4 UPDATE_STEP1 R/W 0h VCC1_
Amount the current duty cycle is adjusted at the end of every PWM RESET
period when the segment index is equal to 001.
3:0 UPDATE_STEP0 R/W 0h VCC1_
Amount the current duty cycle is adjusted at the end of every PWM RESET
period when the segment index is equal to 000.
Offset 10h
Reset
Bits Description Type Default
Event
31:28 UPDATE_INTERVAL7 R/W 0h VCC1_
The number of PWM periods between updates to current duty cycle RESET
when the segment index is equal to 111b.
Reset
Bits Description Type Default
Event
19:16 UPDATE_INTERVAL4 R/W 0h VCC1_
The number of PWM periods between updates to current duty cycle RESET
when the segment index is equal to 100b.
29.1 Introduction
There are four PS/2 Ports in the MEC1322 which are directly controlled by the EC. The hardware implementation elim-
inates the need to bit bang I/O ports to generate PS/2 traffic, however bit banging is available via the associated GPIO
pins.
29.2 References
No references have been cited for this feature.
29.3 Terminology
There is no terminology defined for this section.
29.4 Interface
This block is designed to be accessed externally via the pin interface and internally via a registered host interface.
PS/2 Interface
Host Interface
Signal Description
Interrupts
29.8 Interrupts
This section defines the Interrupt Sources generated from this block.
In order to enable PS2 wakeup interrupts, the pin control registers for the
PS2DAT pin must be programmed to Input, Falling Edge Triggered, non-
inverted polarity detection.
29.10 Description
Each EC PS/2 serial channels use a synchronous serial protocol to communicate with the auxiliary device. Each PS/2
channel has Clock and Data signal lines. The signal lines are bi-directional and employ open drain outputs capable of
sinking 12m, as required by the PS/2 specification. A pull-up resistor, typically 10K, is connected to both lines. This
allows either the EC PS/2 logic or the auxiliary device to drive the lines. Regardless of the drive source, the auxiliary
EC I/F
PS2_x
Control
interrupt State PS/2
Registers PS2DAT
Machine Channel PS2CLK
48MHz
2 MHz
29.13.1 RECEIVE
If PS2_T/R is ‘0’ while the PS2 Interface is enabled, the interface is configured to receive data. If while PS2_T/R is ‘0’
RDATA_RDY is ‘0’, the channel’s PS2CLK and PS2DAT will float waiting for the external PS/2 device to signal the start
of a transmission. If RDATA_RDY is ‘1’, the channel’s PS2DAT line will float but its PS2CLK line will be held low, holding
off the peripheral, until the Receive Register is read.
The peripheral initiates a reception by sending a start bit followed by the data bits). After a successful reception, data
are placed in the PS2 Receive Buffer Register, the RDATA_RDY bit in the PS2 Status Register is set and the PS2CLK
line is forced low. Further receive transfers are inhibited until the EC reads the data in the PS2 Receive Buffer Register.
RDATA_RDY is cleared and the PS2CLK line is tri-stated following a read of the PS2 Receive Buffer Register.
The Receive Buffer Register is initialized to FFh after a read or after a Time-out has occurred.
29.13.2 TRANSMIT
If PS2_T/R is ‘1’ while the PS2 Interface is enabled, the interface is configured to transmit data. When the PS2_T/R bit
is written to ‘1’ while the state machine is idle, the channel prepares for a transmission: the interface will drive the PS2-
CLK line low and then float the PS2DAT line, holding this state until a write occurs to the Transmit Register or until the
PS2_T/R bit is cleared. A transmission is started by writing the PS2 Transmit Buffer Register. Writes to the Transmit
Buffer Register are blocked when PS2_EN is ‘0’, PS2_T/R is ‘0’ or when the transmit state machine is active (the
XMIT_IDLE bit in the PS/2 Status Register is ‘0’). The transmission of data will not start if there is valid data in the
Receive Data Register (when the status bit RDATA_RDY is ‘1’). When a transmission is started, the transmission state
machine becomes active (the XMIT_IDLE bit is set to ‘1’ by hardware), the PS2DAT line is driven low and within 80ns
the PS2CLK line floats (externally pulled high by the pull-up resistor).
The transmission terminates either on the 11th clock edge of the transmission or if a Transmit Time-Out error condition
occurs. When the transmission terminates, the PS2_T/R bit is cleared to ‘0’and the state machine becomes idle, setting
XMIT_IDLE to ‘1’.
The Base Address indicates where the first register can be accessed in a particular address space for a block instance.
Offset 00h
Reset
Bits Description Type Default
Event
31:8 Reserved R - -
7:0 TRANSMIT_DATA W 0h VCC1_R
Writes to this register start a transmission of the data in this register ESET
to the peripheral.
Offset 00h
Reset
Bits Description Type Default
Event
31:8 Reserved R - -
7:0 RECEIVE_DATA R FFh VCC1_R
Data received from a peripheral are recorded in this register. ESET
Offset 00h
Reset
Bits Description Type Default
Event
31:6 Reserved R - -
5:4 STOP R/W 0h VCC1_R
These bits are used to set the level of the stop bit expected by the ESET
PS/2 channel state machine. These bits are therefore only valid
when PS2_EN is set.
0=The PS/2 state machine is disabled. The CLK pin is driven low and
the DATA pin is tri-stated.
1=The PS/2 state machine is enabled, allowing the channel to per-
form automatic reception or transmission, depending on the
state of PS2_T/R.
0 PS2_T/R R/W 0h VCC1_R
PS/2 Transmit/Receive ESET
Offset 08h
Reset
Bits Description Type Default
Event
31:8 Reserved R - -
7 XMIT_START_TIMEOUT R/WC 0h VCC1_R
Transmit Start Timeout. ESET
When the XMIT_TIMEOUT bit is set, the PS2_T/R bit is held clear,
the PS/2 channel’s CLK line is pulled low for a minimum of 300μs
until the PS/2 Status register is read. The XMIT_TIMEOUT bit is set
on one of three transmit conditions: when the transmitter bit time
(the time between falling edges) exceeds 300μs, when the transmit-
ter start bit is not received within 25ms from signaling a transmit start
event or if the time from the first bit (start) to the 10th bit (parity)
exceeds 2ms
4 XMIT_IDLE R 0h VCC1_R
Transmitter Idle. ESET
When receiving data, the stop bit is clocked in on the falling edge of
the 11th CLK edge. If the channel is configured to expect either a
high or low stop bit and the 11th bit is contrary to the expected stop
polarity, then the FE and REC_TIMEOUT bits are set following the
falling edge of the 11th CLK edge and an interrupt is generated.
Reset
Bits Description Type Default
Event
2 PE R/WC 0h VCC1_R
Parity Error ESET
When receiving data, the parity bit is clocked in on the falling edge of
the 10th CLK edge. If the channel is configured to expect either even
or odd parity and the 10th bit is contrary to the expected parity, then
the PE and REC_TIMEOUT bits are set following the falling edge of
the 10th CLK edge and an interrupt is generated.
1 REC_TIMEOUT R/WC 0h VCC1_R
Receive Timeout ESET
Under normal operating conditions, this bit is set following the falling
edge of the 11th clock given successful reception of a data byte from
the PS/2 peripheral (i.e., no parity, framing, or receive time-out
errors) and indicates that the received data byte is available to be
read from the Receive Register. This bit may also be set in the event
that the PS2_EN bit is cleared following the 10th CLK edge.
30.1 Overview
The Keyboard Scan Interface block provides a register interface to the EC to directly scan an external keyboard matrix
of size up to 18x8.
The maximum configuration of the Keyboard Scan Interface is 18 outputs by 8 inputs. For a smaller matrix size, firmware
should configure unused KSO pins as GPIOs or another alternate function, and it should mask out unused KSIs and
associated interrupts.
30.2 References
No references have been cited for this feature.
30.3 Terminology
There is no terminology defined for this section.
30.4 Interface
This block is designed to be accessed externally via the pin interface and internally via a registered host interface.
Host Interface
Signal Description
Power, Clocks and Reset
Interrupts
30.8 Interrupts
This section defines the Interrupt Sources generated from this block.
48MHz
KSO
Output
Select KSO[17:0]
Decoder
Register
SPB
EC Bus
I/F
KSI
KSC_INT_WAKE Interrupt
Interface
KSC_INT
VCC1_RESET
KSI Input
and
KSI[7:0]
Status
Registers
During scanning the firmware sequentially drives low one of the rows (KSO[17:0]) and then reads the column data line
(KSI[7:0]). A key press is detected as a zero in the corresponding position in the matrix. Keys that are pressed are
debounced by firmware. Once confirmed, the corresponding keycode is loaded into host data read buffer in the 8042
Host Interface module. Firmware may need to buffer keycodes in memory in case this interface is stalled or the host
requests a Resend.
Offset 04h
Reset
Bits Description Type Default
Event
31:4 Reserved R - -
7 KSO_INVERT R/W 0b VCC1_R
This bit controls the output level of KSO pins when selected. ESET
Offset 08h
Reset
Bits Description Type Default
Event
31:8 Reserved R - -
7:0 KSI R 0h VCC1_R
This field returns the current state of the KSI pins. ESET
Offset 0Ch
Reset
Bits Description Type Default
Event
31:8 Reserved R - -
7:0 KSI_STATUS R/WC 0h VCC1_R
Each bit in this field is set on the falling edge of the corresponding ESET
KSI input pin.
Writing a ‘1’ to a bit will clear it. Writing a ‘0’ to a bit has no effect.
Offset 10h
Reset
Bits Description Type Default
Event
31:8 Reserved R - -
7:0 KSI_INT_EN R/W 0h VCC1_R
Each bit in KSI_INT_EN enables interrupt generation due to high-to- ESET
low transition on a KSI input. An interrupt is generated when the cor-
responding bits in KSI_STATUS and KSI_INT_EN are both set.
Offset 14h
31.1 Overview
This block provides BC-Link connectivity to a slave device. The BC-Link protocol includes a start bit to signal the
beginning of a message and a turnaround (TAR) period for bus transfer between the Master and Companion devices.
31.2 References
No references have been cited for this feature.
31.3 Terminology
There is no terminology defined for this section.
31.4 Interface
This block is designed to be accessed externally via the pin interface and internally via a registered host interface.
BC-Link Master
Interface
Signal Description
Interrupts
31.8 Interrupts
This section defines the Interrupt Sources generated from this block.
In order to enable BC-Link wakeup interrupts, the pin control registers for
the BC_INT# pin must be programmed to Input, Falling Edge Triggered,
non-inverted polarity detection.
31.10 Description
Registers
BC_ERR
BC Status / Control
BC_BUSY_CLR
Register
EC IF
BC Address
Register
BC Data
Register
Clock
Divider
Bits
Note: Steps 3 thorough 7 should be completed as a contiguous sequence. If not the interface could be presenting
incorrect data when software thinks it is accessing a valid register read.
Offset 00h
Reset
Bits Description Type Default
Event
31:4 Reserved R - -
7 RESET R/W 1h VCC1_R
When this bit is ‘1’the BC_Link Master Interface will be placed in ESET
reset and be held in reset until this bit is cleared to ‘0’. Setting
RESET to ‘1’ causes the BUSY bit to be set to ‘1’. The BUSY
remains set to ‘1’ until the reset operation of the BC Interface is com-
pleted, which takes approximately 48 BC clocks.
The de-assertion of the BUSY bit on reset will not generate an inter-
rupt, even if the BC_BUSY_CLR_INT_EN bit is ‘1’. The BUSY bit
must be polled in order to determine when the reset operation has
completed.
6 BC_ERR R/WC 0h VCC1_R
This bit indicates that a BC Bus Error has occurred. If an error ESET
occurs this bit is set by hardware when the BUSY bit is cleared. This
bit is cleared when written with a ’1’. An interrupt is generated If this
bit is ‘1’ and BC_ERR_INT_EN bit is ‘1’.
Errors that cause this interrupt are:
Offset 04h
Reset
Bits Description Type Default
Event
31:8 Reserved R - -
7:0 ADDRESS R/W 0h VCC1_R
Address in the Companion for the BC-Link transaction. ESET
Offset 08h
Reset
Bits Description Type Default
Event
31:8 Reserved R - -
7:0 DATA R/W 0h VCC1_R
As described in Section 31.10.1, "BC-Link Master READ Operation" ESET
and Section 31.10.2, "BC-Link Master WRITE Operation", this regis-
ter hold data used in a BC-Link transaction.
31.11.4 BC-LINK CLOCK SELECT REGISTER
Offset 0Ch
Reset
Bits Description Type Default
Event
31:8 Reserved R - -
7:0 DIVIDER R/W 4h VCC1_R
The BC Clock is set to the Master Clock divided by this field, or ESET
48MHz/ (Divider +1). The clock divider bits can only can be changed
when the BC Bus is in soft RESET (when either the Reset bit is set
by software or when the BUSY bit is set by the interface).
32.1 Introduction
The TFDP serially transmits Embedded Controller (EC)-originated diagnostic vectors to an external debug trace system.
32.2 References
No references have been cited for this chapter.
32.3 Terminology
There is no terminology defined for this chapter.
32.4 Interface
This block is designed to be accessed externally via the pin interface and internally via a registered host interface.
Signal Description
Power, Clocks and Reset
Interrupts
32.8 Interrupts
There are no interrupts generated from this block.
32.10 Description
The TFDP is a unidirectional (from processor to external world) two-wire serial, byte-oriented debug interface for use
by processor firmware to transmit diagnostic information.
The TFDP consists of the Debug Data Register, Debug Control Register, a Parallel-to-Serial Converter, a Clock/Control
Interface and a two-pin external interface (TFDP Clk, TFDP Data).
WRITE_COMPLETE
CLOCK/CONTROL
TFDP_CLK
INTERFACE
MCLK
TFDP_CLK
TFDP_DAT D0 D1 D2 D3 D4 D5 D6 D7
CPU_CLOCK
Offset 00h
Reset
Bits Description Type Default
Event
7:0 DATA R/W 00h VCC1_R
Debug data to be shifted out on the TFDP Debug port. While data is ESET
being shifted out, the Host Interface will ‘hold-off’ additional writes to
the data register until the transfer is complete.
Offset 04h
Reset
Bits Description Type Default
Event
7 Reserved R - -
6:4 IP_DELAY R/W 000b VCC1_R
Inter-packet Delay. The delay is in terms of TFDP Debug output ESET
clocks. A value of 0 provides a 1 clock inter-packet period, while a
value of 7 provides 8 clocks between packets:
3:2 DIVSEL R/W 00b VCC1_R
Clock Divider Select. The TFDP Debug output clock is determined ESET
by this field, according to Table 32-7, "TFDP Debug Clocking":
1 EDGE_SEL R/W 0b VCC1_R
ESET
1= Data is shifted out on the falling edge of the debug clock
0= Data is shifted out on the rising edge of the debug clock (Default)
0 EN R/W 0b VCC1_R
Enable. ESET
1=Clock enabled
0=Clock is disabled (Default)
33.1 Introduction
This block is designed to convert external analog voltage readings into digital values. It consists of a single successive-
approximation Analog-Digital Converter that can be shared among five inputs.
Note: Transitions on ADC GPIOs are not permitted when Analog to Digital Converter readings are being taken.
33.2 References
No references have been cited for this chapter
33.3 Terminology
No terminology is defined for this chapter
33.4 Interface
This block is designed to be accessed externally via the pin interface and internally via a registered host interface.
Host Interface
Signal Description
Power, Clocks and Reset
Interrupts
Note: VREF_ADC, the Analog Voltage Reference of 3.0V, is internally generated in the IP block.
33.8 Interrupts
Note: The ADC VREF must be powered down in order to get the lowest deep sleep current. The ADC VREF
Power down bit, ADC_VREF_PD_REF is in the EC Subsystem Registers ADC VREF PD on page 381.
ADC BLOCK
VREF
Analog Inputs
Latch (
Host Interface reading Control 10-bit reading value ADC MUX (
Logic (
ADC_Single_Int
ADC_Repeat_Int Control
ADC_SLEEP_EN
ADC_CLK_REQ
The MEC1322 features a five channel successive approximation Analog to Digital Converter. The ADC architecture fea-
tures excellent linearity and converts analog signals to 10 bit words. Conversion takes less than 12 microseconds per
10-bit word. The five channels are implemented with a single high speed ADC fed by a five input analog multiplexer.
The multiplexer cycles through the five voltage channels, starting with the lowest-numbered channel and proceeding to
the highest-number channel, selecting only those channels that are programmed to be active.
The input range on the voltage channels spans from 0V to the internal voltage reference. With an internal voltage ref-
erence of 3.0V, this provides resolutions of 2.9mV. The range can easily be extended with the aid of resistor dividers.
The accuracy of any voltage reading depends on the accuracy and stability of the voltage reference input.
The ADC conversion cycle starts either when the Start_Single bit in the ADC to set to 1 or when the ADC Repeat Timer
counts down to 0. When the Start_Single is set to 1 the conversion cycle converts channels enabled by configuration
bits in the ADC Single Register. When the Repeat Timer counts down to 0 the conversion cycle converts channels
enabled by configuration bits in the ADC Repeat Register. When both the Start_Single bit and the Repeat Timer request
conversions the Start_Single conversion is completed first.
Conversions always start with the lowest-numbered enabled channel and proceed to the highest-numbered enabled
channel.
Note: If software repeatedly sets Start_Single to 1 at a rate faster than the Repeat Timer count down interval, the
conversion cycle defined by the ADC Repeat Register will not be executed.
Offset 00h
Reset
Bits Description Type Default
Event
31:8 RESERVED RES
7 Single_Done_Status R/WC 0h VCC1_R
ESET
This bit is cleared when it is written with a 1. Writing a 0 to this bit
has no effect.
This bit can be used to generate an EC interrupt.
Reset
Bits Description Type Default
Event
0 Activate R/W 0h VCC1_R
ESET
0: The ADC is disabled and placed in its lowest power state. Note:
Any conversion cycle in process will complete before the block is
shut down, so that the reading registers will contain valid data but no
new conversion cycles will begin.
1: ADC block is enabled for operation. Start_Single or Start_Repeat
can begin data conversions by the ADC. Note: A reset pulse is sent
to the ADC core when this bit changes from 0 to 1.
Offset 04h
Reset
Bits Description Type Default
Event
31:16 Repeat_Delay[15:0] R/W 0000h VCC1_R
ESET
This field determines the interval between conversion cycles when
Start_Repeat is 1. The delay is in units of 40μs. A value of 0 means
no delay between conversion cycles, and a value of 0xFFFF means
a delay of 2.6 seconds.
This field has no effect when Start_Single is written with a 1.
Offset 08h
Reset
Bits Description Type Default
Event
31:5 RESERVED RES
4:0 ADC_Ch_Status[4:0] R/WC 00h VCC1_R
ESET
All bits are cleared by being written with a ‘1’.
0: conversion of the corresponding ADC channel is not complete
1: conversion of the corresponding ADC channel is complete
Note: for enabled single cycles, the Single_Done_Status bit in the
ADC Control Register is also set after all enabled channel conver-
sion are done; for enabled repeat cycles, the Repeat_Done_Status
in the ADC Control Register is also set after all enabled channel con-
version are done.
APPLICATION NOTE: Do not change the bits in this register in the middle of a conversion cycle to insure proper
operation.
Offset 0Ch
Reset
Bits Description Type Default
Event
31:5 RESERVED RES
4:0 Single_En[4:0] R/W 00h VCC1_R
ESET
0: single cycle conversions for this channel are disabled
1: single cycle conversions for this channel are enabled
Each bit in this field enables the corresponding ADC channel when a
single cycle of conversions is started when the Start_Single bit in the
ADC Control Register is written with a 1.
Offset 10h
Reset
Bits Description Type Default
Event
31:5 RESERVED RES
4:0 Rpt_En[4:0] R/W 00h VCC1_R
ESET
0: repeat conversions for this channel are disabled
1: repeat conversions for this channel are enabled
Each bit in this field enables the corresponding ADC channel for
each pass of the Repeated ADC Conversion that is controlled by bit
Start_Repeat in the ADC Control Register.
Note: The ADC Channel Reading Registers access require single 16, or 32 bit reads; i.e., two 8 bit reads cannot
ensure data coherency.
Reset
Bits Description Type Default
Event
31:10 RESERVED RES
9:0 ADCx_[9:0] R/W 000h VCC1_R
ESET
This read-only field reports the 10-bit output reading of the Input
ADCx.
34.1 Overview
The VBAT Powered RAM provides a 64 Byte Random Accessed Memory that is operational while the main power rail
is operational, and will retain its values powered by battery power while the main rail is unpowered.
34.2 References
No references have been cited for this feature.
34.3 Terminology
There is no terminology defined for this section.
34.4 Interface
This block is designed to be accessed externally via the pin interface and internally via a registered host interface.
VBAT-Powered RAM
Host Interface
Signal Description
Interrupts
34.7.3 RESETS
34.8 Interrupts
This block does not generate any interrupts.
34.10 Description
EC Interface
The VBAT Powered RAM provides a 64 Byte Random Accessed Memory that is operational while VCC1 is powered,
and will retain its values powered by VBAT while VCC1 is unpowered. The RAM is organized as a 16 words x 32-bit
wide for a total of 64 bytes.
35.1 Introduction
This chapter defines a bank of registers associated with the EC Subsystem.
35.2 References
None
35.3 Interface
This block is designed to be accessed internally by the EC via the register interface.
35.4.3 RESETS
35.5 Interrupts
This block does not generate any interrupt events.
35.7 Description
The EC Subsystem Registers block is a block implemented for aggregating miscellaneous registers required by the
Embedded Controller (EC) Subsystem that are not unique to a block implemented in the EC subsystem.
Offset 14h
Reset
Bits Description Type Default
Event
7:1 Reserved R - -
0 AHB_ERROR_DISABLE RW 0h VCC1_R
0: EC memory exceptions are enabled. ESET
1: EC memory exceptions are disabled.
35.8.2 INTERRUPT CONTROL
Offset 18h
Reset
Bits Description Type Default
Event
31:1 Reserved R - -
0 NVIC_EN R/W 1b VCC1_R
ESET
This bit enables Alternate NVIC IRQ’s Vectors. The Alternate NVIC
Vectors provides each interrupt event with a dedicated (direct) NVIC
vector.
0 = Alternate NVIC vectors disabled
1= Alternate NVIC vectors enabled
Offset 1Ch
Reset
Bits Description Type Default
Event
31:1 Reserved R - -
0 TRACE_EN R/W 0b VCC1_R
ESET
This bit enables the ARM TRACE debug port (ETM/ITM). The Trace
Debug Interface pins are forced to the TRACE functions.
0 = ARM TRACE port disabled
1= ARM TRACE port enabled
35.8.4 JTAG ENABLE
Offset 20h
Reset
Bits Description Type Default
Event
31:1 Reserved R - -
0 JTAG_EN R/W 0b VCC1_R
ESET
This bit enables the JTAG debug port.
0 = JTAG port disabled. JTAG cannot be enabled (i.e., the TRST#
pin is ignored and the JTAG signals remain in their non-JTAG
state).
1= JTAG port enabled. A high on TRST# enables JTAG
Offset 28h
Reset
Bits Description Type Default
Event
31:4 Reserved R - -
3:0 WDT_COUNT R/W 0b VCC1_R
ESET
These EC R/W bits are cleared to 0 on VCC1 POR, but not on a
WDT.
Note: This field is written by Boot ROM firmware to indicate the
number of times a WDT fired before loading a good EC
code image.
Offset 38h
Reset
Bits Description Type Default
Event
31:1 Reserved R - -
0 ADC_VREF_PD_REF R/W 0b VCC1_R
ESET
ADC VREF Power down
0=on
1=off
36.1 Introduction
This section defines the XNOR Chain for board test.
Other test mechanisms for the ARM are described in Chapter 7.0, "ARM M4F Based Embedded Controller".
36.2.3.1 Setup
36.2.3.2 Testing
1. Turn on the 3.3V power source.
2. Enable the XNOR Chain as defined in Section 36.2.3.3, "Procedure to Enable the XNOR Chain".
Note: At this point all inputs to the XNOR Chain are low, except for the JTAG_RST# pin, and the output on the
Test Output pin is non-inverted from its initial state, which is dependent on the number of pins in the chain.
If the number of input pins in the chain is an even number, the initial state of the Test Output Pin, pin 17:
KSO04/GPIO103/TFDP_DATA/XNOR is low. If the number of input pins in the chain is an odd number, the
initial state of the Test Output Pin, pin 17: KSO04/GPIO103/TFDP_DATA/XNOR is high.
3. Bring one pin in the chain high. The output on the Test Output Pin, pin 17: KSO04/GPIO103/TFDP_-
DATA/XNOR pin should toggle. Then individually toggle each of the remaining pins in the chain. Each time an
input pin is toggled either high or low the Test Output Pin, pin 17: KSO04/GPIO103/TFDP_DATA/XNOR pin
should toggle.
4. Once the XNOR test is completed, exit the XNOR Chain Test Mode by cycling VCC1 power.
///////////////////////////////////
//Reset Test Interface
///////////////////////////////////
force JTAG_RST# = 0
force KSO00/GPIO000/JTAG_TCK = 0
force KSO02/GPIO101/JTAG_TDI = 0
force KSO01/GPIO100/JTAG_TMS = 1
Wait 100 ns
////////////////////////////////
//Come out of reset
////////////////////////////////
force TRST#/JTAG_RST# = 1
Wait 100 ns
force KSO00/GPIO000/JTAG_TCK = 1
force KSO00/GPIO000/JTAG_TCK = 0
force KSO00/GPIO000/JTAG_TCK = 1
////////////////////////////////
//Sequence 1
// Write IR with 7h
////////////////////////////////
force KSO00/GPIO000/JTAG_TCK = 1; //P
force KSO00/GPIO000/JTAG_TCK = 0; //1N
force KSO02/GPIO101/JTAG_TDI = 0
force KSO01/GPIO100/JTAG_TMS = 0
force KSO00/GPIO000/JTAG_TCK = 1; //P
force KSO00/GPIO000/JTAG_TCK = 0; //2N
force KSO02/GPIO101/JTAG_TDI = 0
force KSO01/GPIO100/JTAG_TMS = 1
force KSO00/GPIO000/JTAG_TCK = 1; //P
force KSO00/GPIO000/JTAG_TCK = 0; //3N
force KSO02/GPIO101/JTAG_TDI = 0
force KSO01/GPIO100/JTAG_TMS = 1
force KSO00/GPIO000/JTAG_TCK = 1; //P
force KSO00/GPIO000/JTAG_TCK = 0; //4N
force KSO02/GPIO101/JTAG_TDI = 0
force KSO01/GPIO100/JTAG_TMS = 0
force KSO00/GPIO000/JTAG_TCK = 1; //P
force KSO00/GPIO000/JTAG_TCK = 0; //5N
force KSO02/GPIO101/JTAG_TDI = 0
force KSO01/GPIO100/JTAG_TMS = 0
//////////////////////////////////////
//SHIFT IR 0x7h
/////////////////////////////////////
force KSO00/GPIO000/JTAG_TCK = 1; //P
force KSO00/GPIO000/JTAG_TCK = 0; //6N
force KSO02/GPIO101/JTAG_TDI = 1
force KSO01/GPIO100/JTAG_TMS = 0
force KSO00/GPIO000/JTAG_TCK = 1; //P
force KSO00/GPIO000/JTAG_TCK = 0; //7N
force KSO02/GPIO101/JTAG_TDI = 1
force KSO01/GPIO100/JTAG_TMS = 0
force KSO00/GPIO000/JTAG_TCK = 1; //P
force KSO00/GPIO000/JTAG_TCK = 0; //8N
//////////////////////////////////////////////////////////
// Sequence 2
// DIR=0, CMD[2:0]=1, DATA[7:0]=01\h, ADDR[7:0]=88\h
//////////////////////////////////////////////////////////
force KSO00/GPIO000/JTAG_TCK = 1; //P
force KSO00/GPIO000/JTAG_TCK = 0; //1N
force KSO02/GPIO101/JTAG_TDI = 0
force KSO01/GPIO100/JTAG_TMS = 1
force KSO00/GPIO000/JTAG_TCK = 1; //P
force KSO00/GPIO000/JTAG_TCK = 0; //2N
force KSO02/GPIO101/JTAG_TDI = 0
force KSO01/GPIO100/JTAG_TMS = 0
force KSO00/GPIO000/JTAG_TCK = 1; //P
force KSO00/GPIO000/JTAG_TCK = 0; //3N
force KSO02/GPIO101/JTAG_TDI = 0
force KSO01/GPIO100/JTAG_TMS = 0
///////////////////////////////////////////
//DIR 0 - Write
//////////////////////////////////////////
force KSO00/GPIO000/JTAG_TCK = 1; //P
force KSO00/GPIO000/JTAG_TCK = 0; //N (DR1)
force KSO02/GPIO101/JTAG_TDI = 0
force KSO01/GPIO100/JTAG_TMS = 0
///////////////////////////////////////////
//CMD 1 - Test
//////////////////////////////////////////
force KSO00/GPIO000/JTAG_TCK = 1; //P
**Verify KSO03/GPIO102/JTAG_TDO = 1//`TP_GPIO102.Check(1);
force KSO00/GPIO000/JTAG_TCK = 0; //N (DR2)
force KSO02/GPIO101/JTAG_TDI = 1
force KSO01/GPIO100/JTAG_TMS = 0
force KSO00/GPIO000/JTAG_TCK = 1; //P
**Verify KSO03/GPIO102/JTAG_TDO = 1//`TP_GPIO102.Check(1);
force KSO00/GPIO000/JTAG_TCK = 0; //N (DR3)
force KSO02/GPIO101/JTAG_TDI = 0
force KSO01/GPIO100/JTAG_TMS = 0
force KSO00/GPIO000/JTAG_TCK = 1; //P
**Verify KSO03/GPIO102/JTAG_TDO = 1//`TP_GPIO102.Check(1);
force KSO00/GPIO000/JTAG_TCK = 0; //N (DR4)
force KSO02/GPIO101/JTAG_TDI = 0
force KSO01/GPIO100/JTAG_TMS = 0
///////////////////////////////////////////
//DATA 0x01 - XNOR_EN
//////////////////////////////////////////
force KSO00/GPIO000/JTAG_TCK = 1; //P
**Verify KSO03/GPIO102/JTAG_TDO = 1//`TP_GPIO102.Check(1);
force KSO00/GPIO000/JTAG_TCK = 0; //N (DR5)
force KSO02/GPIO101/JTAG_TDI = 1
force KSO01/GPIO100/JTAG_TMS = 0
force KSO00/GPIO000/JTAG_TCK = 1; //P
**Verify KSO03/GPIO102/JTAG_TDO = 1//`TP_GPIO102.Check(1);
force KSO00/GPIO000/JTAG_TCK = 0; //N (DR6)
force KSO02/GPIO101/JTAG_TDI = 0
force KSO01/GPIO100/JTAG_TMS = 0
force KSO00/GPIO000/JTAG_TCK = 1; //P
**Verify KSO03/GPIO102/JTAG_TDO = 0//`TP_GPIO102.Check(0);
force KSO00/GPIO000/JTAG_TCK = 0; //N (DR7)
force KSO02/GPIO101/JTAG_TDI = 0
force KSO01/GPIO100/JTAG_TMS = 0
force KSO00/GPIO000/JTAG_TCK = 1; //P
**Verify KSO03/GPIO102/JTAG_TDO = 0//`TP_GPIO102.Check(0);
force KSO00/GPIO000/JTAG_TCK = 0; //N (DR8)
force KSO02/GPIO101/JTAG_TDI = 0
force KSO01/GPIO100/JTAG_TMS = 0
force KSO00/GPIO000/JTAG_TCK = 1; //P
//////////////////////////////////////////////////////////////
//ADDRESS 0x88 - Customer Control
/////////////////////////////////////////////////////////////
force KSO00/GPIO000/JTAG_TCK = 1; //P
**Verify KSO03/GPIO102/JTAG_TDO = 0//`TP_GPIO102.Check(0);
force KSO00/GPIO000/JTAG_TCK = 0; //N (DR13)
force KSO02/GPIO101/JTAG_TDI = 0
force KSO01/GPIO100/JTAG_TMS = 0
force KSO00/GPIO000/JTAG_TCK = 1; //P
**Verify KSO03/GPIO102/JTAG_TDO = 1//`TP_GPIO102.Check(1);
force KSO00/GPIO000/JTAG_TCK = 0; //N (DR14)
force KSO02/GPIO101/JTAG_TDI = 0
force KSO01/GPIO100/JTAG_TMS = 0
force KSO00/GPIO000/JTAG_TCK = 1; //P
**Verify KSO03/GPIO102/JTAG_TDO = 0//`TP_GPIO102.Check(0);
force KSO00/GPIO000/JTAG_TCK = 0; //N (DR15)
force KSO02/GPIO101/JTAG_TDI = 0
force KSO01/GPIO100/JTAG_TMS = 0
force KSO00/GPIO000/JTAG_TCK = 1; //P
**Verify KSO03/GPIO102/JTAG_TDO = 0//`TP_GPIO102.Check(0);
force KSO00/GPIO000/JTAG_TCK = 0; //N (DR16)
force KSO02/GPIO101/JTAG_TDI = 1
force KSO01/GPIO100/JTAG_TMS = 0
force KSO00/GPIO000/JTAG_TCK = 1; //P
////////////////////////////////////////////////////////////////////////////
//FINISHED PROCEDURE TO ENTER XNOR
///////////////////////////////////////////////////////////////////////////
Note: When powering this device from laboratory or system power supplies, it is important that the Absolute Max-
imum Ratings not be exceeded or device failure can result. Some power supplies exhibit voltage spikes on
their outputs when the AC power is switched on or off. In addition, voltage transients on the AC power line
may appear on the DC output. If this possibility exists, it is suggested that a clamp circuit be used.
Note: All output pins, except pin under test, tied to AC ground.
Limits
Parameter Symbol Unit Notes
MIN TYP MAX
Input Capacitance of PCI_I and CIN Note 37-2 pF
PCI_IO pins
Input Capacitance of PCI_CLK pin CIN Note 37-2 pF
Output Load Capacitance supported COUT Note 37-2 pF
by PCI_IO, PCI_O, and PCI_OD
SUSCLK Input Capacitance CIN 10 pF
Input Capacitance of PECI_I and CIN 10 pF
PECI_IO
Output Load Capacitance supported COUT 10 pF
by PECI_IO and OD_PH
Input Capacitance (all other input CIN 10 pF Note 37-3
pins)
Output Capacitance (all other output COUT 20 pF Note 37-4
pins)
Note 37-2 The PCI buffers are designed to meet the defined PCI Local Bus Specification, Rev. 2.1, electrical
requirements.
Note 37-3 All input buffers can be characterized by this capacitance unless otherwise specified.
Note 37-4 All output buffers can be characterized by this capacitance unless otherwise specified.
PCI_OD Type Buffer PCI_OD These buffers are not not 5V tolerant
buffers and they are not backdrive pro-
tected.
PECI Type Buffer
VREF Buffer Connects to CPU Voltage pin
(Processor dependent)
PECI Bus Voltage VBUS 0.95 1.26 V
Input current IDC 100 µA
Input Low Current ILEAK -10 +10 µA This buffer is not 5V tolerant
This buffer is not backdrive protected.
PECI_I Buffer All input and output voltages are a
function of VREF buffer input.
Input voltage range VIn -0.3 VREF + V
0.3
Low Input Level VIL 0.275× V
VREF
High Input Level VIH 0.725× V This buffer is not 5V tolerant
VREF This buffer is not backdrive protected.
PECI_IO All input and output voltages are a
function of VREF buffer input.
Input voltage range VIn -0.3 VREF + V
0.3 See PECI Specification.
Hysteresis VHYS 0.1 × 0.2× V
VREF VREF
Low Input Level VIL 0.275× V
VREF
High Input Level VIH 0.725× V
VREF
Low Output Level VOL 0.25× V 0.5mA < IOL < 1mA
VREF
High Output Level VOH 0.75 × V IOH = -6mA
VREF
Tolerance 3.63 V This buffer is not 5V tolerant
This buffer is not backdrive protected.
Crystal oscillator
XTAL1 (OCLK) The MEC1322 crystal oscillator design requires a 32.768 KHz parallel resonant crystal with
load caps in the range 4-18pF. Refer to “Application Note PCB Layout Guide for MEC1322”
for more information.
XTAL2 (ICLK)
Note: The AVCC power supply accuracy is shown as 3.3V +/- 5%.
Off On S5 48MHz 7.75 9.25 9.75 mA FULL ON (48MHz), LPC Clock Off
Off On S5 3MHz 4.75 6.25 6.75 mA FULL ON (3MHz), LPC Clock Off
Off On S5 1MHz 4.50 6.00 6.50 mA FULL ON (1MHz), LPC Clock Off
Off On S5 12MHz 2.00 2.75 3.25 mA Heavy Sleep 1, LPC Clock Off
(Note 37-1)
Off On S5 Off 0.65 1.25 1.65 mA Heavy Sleep 2, LPC Clock Off
(Note 37-1)
Off On S5 Off 0.33 0.95 1.55 mA Heavy Sleep 3, LPC Clock Off
(Note 37-1)
Off On S5 Off 0.30 0.90 1.50 mA Deepest Sleep, LPC Clock Off
(Note 37-1)
Note: FULL ON is defined as follows: The processor is not sleeping, the Core regulator and the Ring Oscillator
remain powered, and at least one block is not sleeping.
Note 37-1 The sleep states are defined in the System Sleep Control Register in the Power, Clocks and Resets
Chapter. See Table 3-10, “System Sleep Control Bit Encoding,” on page 61.
Off Off S5 Off 2.00 6.00 8.50 uA External 32kHz clock on XTAL2 pin
Off Off S5 Off 2.50 6.25 8.75 uA External 32kHz clock on XTAL2 pin
Note: Timing values are preliminary and may change after characterization.
V TH2 V TH2
VCC1 V TH1 V TH1
G lit c h p r o t e c t e d
U n d e fin e d F o r c e d to lo g ic ‘0 ’ F u n c tio n a l F o r c e d to lo g ic ‘0 ’ U n d e fin e d
S ig n a l o u t p u t
t1 t2
V C C 1 G D (in te r n a l)
t3
V C C 1 _ R S T # P in
t1
V C C 1 _ R S T # P in
VBAT <VTH
VBAT
VCC1GD
VBAT_POR
Coin cell
insertion
Period
High
Time
Low
Time
Fall Time Rise Time
tSU tADJ
G P IO x xx
Tr T p u ls e Tf T p u lse
t1 t4
LCLK t5 t3 t2
LR ES ET # t1
LCLK
t1
Output Delay
t2
t3
Tri-State Output
t1 t2
LCLK
LCLK
LFRAME#
LCLK
LFRAME#
LCLK
t1 t2
SER_IRQ
Data
t d e la y t a c t iv e
t10
t8 t9
t7
t17
t2 t5 t6
PS2_CLK 1 2 10 11
t11 t14
t1 t4
PS2_DAT s B0 B1 B2 B3 B4 B5 B6 B7 P
PS2_EN
t12
PS2_T/R
t3
t13
XMIT_IDLE
RDATA_RDY
t7
t3
t4
t2 t5 t11
t10
PS2_CLK
t1 t6
PS2_DATA D0 D1 D2 D3 D4 D5 D6 D7 P S
PS2_EN
PS2_T/R
t8 t9
RDATA_RDY
Read Rx Reg
t12
Interrupt
t1
t2 t3
PWMx
t1
t2 t3
FAN_TACHx
t1
t2 t3
LEDx
I2C_DATA
tBUF tLOW
tR tF tHD;STA
I2C_CLK
tHD;STA
tHD;DAT tHIGH tSU;DAT tSU;STA tSU;STO
Approxinatley 48 BC
Clocks
BUSY
BC_ERR
BC_ERR Interrupt
BC_Busy_CLR Interrupt
(Controlled by Hardware)
tC
BC_CLK
Bit Bit
BC_DAT n-1 n
tIH
tIS
Bit Read
tC
BC_CLK
tOH
tOS
Note: The timing budget equation is as follows for data from BC-Link slave to master:
Tc > TOD(master-clk) + Tprop(clk) +TOD(slave) + Tprop(slave data) + TIS(master).
Tr Tf
SPICLK
Th Tl
Tp
SPCLK
(CLKPOL = 0,
TCLKPH = 0,
RCLKPH = 0) T1
SPDOUT
T2
SPDIN
T3
FIGURE 38-26: SPI SETUP AND HOLD TIMES, CLKPOL=0, TCLKPH=0, RCLKPH=1
SPCLK
(CLKPOL = 0,
TCLKPH = 0,
RCLKPH = 1) T1
SPDOUT
T2
SPDIN
T3
SPCLK (CLKPOL = 0)
SPCLK (CLKPOL = 1)
SPDOUT
(TCLKPH = 0)
SPDIN
(RCLKPH = 0)
CS (GPIO)
In this mode, data is available immediately when a device is selected and is sampled on the first and following odd
SPCLK edges by the master and slave.
FIGURE 38-28: SPI INTERFACE TIMING, FULL DUPLEX MODE (TCLKPH = 1, RCLKPH = 0)
SPCLK (CLKPOL = 0)
SPCLK (CLKPOL = 1)
SPDOUT
(TCLKPH = 1)
SPDIN
(RCLKPH = 0)
CS (GPIO)
In this mode, the master requires an initial SPCLK edge before data is available. The data from slave is available imme-
diately when the slave device is selected. The data is sampled on the first and following odd edges by the master. The
data is sampled on the second and following even SPCLK edges by the slave.
SPCLK (CLKPOL = 0)
SPCLK (CLKPOL = 1)
SPDOUT
(TCLKPH = 0)
SPDIN
(RCLKPH = 1)
CS (GPIO)
In this mode, the data from slave is available immediately when the slave device is selected. The slave device requires
an initial SPCLK edge before data is available. The data is sampled on the second and following even SPCLK edges
by the master. The data is sampled on the first and following odd edges by the slave.
FIGURE 38-30: SPI INTERFACE TIMING - FULL DUPLEX MODE (TCLKPH = 1, RCLKPH = 1)
SPCLK (CLKPOL = 0)
SPCLK (CLKPOL = 1)
SPDOUT
(TCLKPH = 1)
SPDIN
(RCLKPH = 1)
CS (GPIO)
In this mode, the master and slave require an initial SPCLK edge before data is available. Data is sampled on the second
and following even SPCLK edges by the master and slave.
TFDP Clock
tP
tCLK-L tCLK-H
TFDP Data
2.8V
JTAG_RST#
fclk
JTAG_CLK
JT A G _ C L K
tO D tO H
JT A G _ T D O
t IS t IH
JT A G _ T D I
CUSTOMER SUPPORT
Users of Microchip products can receive assistance through several channels:
• Distributor or Representative
• Local Sales Office
• Field Application Engineer (FAE)
• Technical Support
Customers should contact their distributor, representative or field application engineer (FAE) for support. Local sales
offices are also available to help customers. A listing of sales offices and locations is included in the back of this docu-
ment.
Technical support is available through the web site at: http://microchip.com/support
Device: MEC1322(1)
Note the following details of the code protection feature on Microchip devices:
• Microchip products meet the specification contained in their particular Microchip Data Sheet.
• Microchip believes that its family of products is one of the most secure families of its kind on the market today, when used in the
intended manner and under normal conditions.
• There are dishonest and possibly illegal methods used to breach the code protection feature. All of these methods, to our
knowledge, require using the Microchip products in a manner outside the operating specifications contained in Microchip’s Data
Sheets. Most likely, the person doing so is engaged in theft of intellectual property.
• Microchip is willing to work with the customer who is concerned about the integrity of their code.
• Neither Microchip nor any other semiconductor manufacturer can guarantee the security of their code. Code protection does not
mean that we are guaranteeing the product as “unbreakable.”
Code protection is constantly evolving. We at Microchip are committed to continuously improving the code protection features of our
products. Attempts to break Microchip’s code protection feature may be a violation of the Digital Millennium Copyright Act. If such acts
allow unauthorized access to your software or other copyrighted work, you may have a right to sue for relief under that Act.
Information contained in this publication regarding device applications and the like is provided only for your convenience and may be super-
seded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REP-
RESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR
OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE,
MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Micro-
chip devices in life support and/or safety applications is entirely at the buyer’s risk, and the buyer agrees to defend, indemnify and hold
harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or
otherwise, under any Microchip intellectual property rights unless otherwise stated.
Trademarks
The Microchip name and logo, the Microchip logo, dsPIC, FlashFlex, flexPWR, JukeBlox, KEELOQ, KEELOQ logo, Kleer, LANCheck,
MediaLB, MOST, MOST logo, MPLAB, OptoLyzer, PIC, PICSTART, PIC32 logo, RightTouch, SpyNIC, SST, SST Logo, SuperFlash and
UNI/O are registered trademarks of Microchip Technology Incorporated in the U.S.A. and other countries.
The Embedded Control Solutions Company and mTouch are registered trademarks of Microchip Technology Incorporated in the U.S.A.
Analog-for-the-Digital Age, BodyCom, chipKIT, chipKIT logo, CodeGuard, dsPICDEM, dsPICDEM.net, ECAN, In-Circuit Serial
Programming, ICSP, Inter-Chip Connectivity, KleerNet, KleerNet logo, MiWi, motorBench, MPASM, MPF, MPLAB Certified logo, MPLIB,
MPLINK, MultiTRAK, NetDetach, Omniscient Code Generation, PICDEM, PICDEM.net, PICkit, PICtail, RightTouch logo, REAL ICE,
SQI, Serial Quad I/O, Total Endurance, TSHARC, USBCheck, VariSense, ViewSpan, WiperLock, Wireless DNA, and ZENA are
trademarks of Microchip Technology Incorporated in the U.S.A. and other countries.
SQTP is a service mark of Microchip Technology Incorporated in the U.S.A.
Silicon Storage Technology is a registered trademark of Microchip Technology Inc. in other countries.
GestIC is a registered trademark of Microchip Technology Germany II GmbH & Co. KG, a subsidiary of Microchip Technology Inc., in
other countries.
All other trademarks mentioned herein are property of their respective companies.
© 2014 - 2015, Microchip Technology Incorporated, Printed in the U.S.A., All Rights Reserved.
ISBN: 9781632777645
QUALITY MANAGEMENT SYSTEM Microchip received ISO/TS-16949:2009 certification for its worldwide
headquarters, design and wafer fabrication facilities in Chandler and
CERTIFIED BY DNV Tempe, Arizona; Gresham, Oregon and design centers in California
and India. The Company’s quality system processes and procedures
are for its PIC® MCUs and dsPIC® DSCs, KEELOQ® code hopping
== ISO/TS 16949 == devices, Serial EEPROMs, microperipherals, nonvolatile memory and
analog products. In addition, Microchip’s quality system for the design
and manufacture of development systems is ISO 9001:2000 certified.