Copyright © 2019 NEXCOM International Co., Ltd. All Rights Reserved.
52
NISE 505 User Manual
Appendix B: EC Command Documentation
a
PPendIx
B: eC C
ommand
d
oCumentatIon
General Purpose of EC
ACPI defines a standard hardware and software communications interface
between an OS driver and an embedded controller. This allows any OS to
provide a standard driver that can directly communicate with an embedded
controller in the system, thus allowing other drivers within the system to
communicate with and use the resources of system embedded controllers.
Abbreviation
The Input Buffer Full (IBF)
flag is set when the host has written a byte of
data to the command or data port, but the embedded controller has not yet
read it. After the embedded controller reads the status byte and sees the IBF
flag set, the embedded controller reads the data port to get the byte of data
that the host has written. After the embedded controller reads the data byte,
the IBF flag is automatically cleared by hardware. This is the signal to the host
that the data has been read by the embedded controller and that the host is
free to write more data to the embedded controller.
The Output Buffer Full (OBF)
flag is set when the embedded controller
has written a byte of data into the command or data port but the host has
not yet read it. After the host reads the status byte and sees the OBF flag
set, the host reads the data port to get the byte of data that the embedded
controller has written. After the host reads the data byte, the OBF flag is
cleared automatically by hardware. This signals the embedded controller that
the data has been read by the host and the embedded controller is free to
write more data to the host.
PM1 (Power Management Channel1) Overview
PWM 1 is LPC IO channel between CPU and embedded controller.
The embedded controller contains three registers at two address locations:
EC_SC and EC_DATA. The EC_SC, or Embedded Controller Status/Command
register, acts as two registers: a status register for reads to this port and
a command register for writes to this port. The EC_DATA (Embedded
Controller Data register) acts as a port for transferring data between the
host CPU and the embedded controller.
The status/command register is
0x66
. Data register is
0x62
. These two
registers act importantly in EC controlled function.
Note: Some commands are skipped (content with “x”) in RW sample code.
Because RW runs under Windows 7 and with API interface to display result.
For those using EC command in different OS, such as Linux or real-time OS,
every command in sequence is needed for complete function command.