Ec specification: Difference between revisions

From OLPC
Jump to navigation Jump to search
No edit summary
Line 5: Line 5:


These pages will eventually document the commands and responsibilities of the EC in the XO system.
These pages will eventually document the commands and responsibilities of the EC in the XO system.
Currently its not much more than a cut and paste from a variety of emails, trac tickets, and operational info extracted from the way the EC is known to work. It will be expanded as time allows.
Currently its not much more than a cut and paste from a variety of emails, trac tickets, and operational info extracted from the way the EC is known to work. Some of the descriptions are a bit odd and terse as the source is from non-native English speakers. Verbosity will be expanded as time allows.


=== EC Commands ===
=== EC Commands ===
Line 18: Line 18:
** Bit 1: 1: battery full charged
** Bit 1: 1: battery full charged
** Bit 2: 1: battery low
** Bit 2: 1: battery low
** Bit 3: 1: battery destroys

Bit 3: // 1: battery destroys
** Bit 4: 1: AC in
** Bits 5-7 Not defined

Bit 4: // 1: AC in
* 0x16 Read Battery State of Charge (SOC) (1 byte)
* 0x17 Read Battery gas guage chip serial number (6 bytes)

* 0x18 Read Battery gas guage data
* 0x19 Read board id (1 byte)

g. 0x16 // Read SOC (1 byte)
* 0x1a Read SCI source (1 byte)
** 0x01 Game button

** 0x02 Battery Status Change. Generated for any of:
h. 0x17 // Read gas guage chip serial number (6 bytes)
*** AC plugged/unplugged

*** Battery inserted/removed
i. 0x18 // Read gas guage data
*** Battery Low

*** Battery full
j. 0x19 // Read board id (1 byte)
*** Battery destroy

k. 0x1a // Read SCI source (1 byte)
** 0x04 Battery SOC Change
** 0x08 Battery subsystem error

The SCI source will keep what the SCI event when a SCI happens.
** 0x10 Ebook mode change
* 0x1b Game key status (2 bytes) 9 bits of key status. 1 indicates key is depressed.

** Bit 1: KEY_LR_R
SCI_WACKUP_EVENT 0x01 // Game button
** Bit 2: KEY_RT_R

** Bit 3: KEY_UP_L
SCI_BATTERY_STATUS_CHANGE 0x02 // AC plugged/unplugged, Battery inserted/remove,
** Bit 4: KEY_DN_L

** Bit 5: KEY_LF_L
// Battery Low, Battery full, Battery destorys
** Bit 6: KEY_RT_L

** Bit 7: KEY_COLOR/MONO
SCI_SOC_CHANGE 0x04 // SOC Change
** Bit 8: KEY_UP_R

** Bit 9: KEY_DN_R
SCI_ABNORMAL_EVENT 0x08 // Battery Abnormal
* 0x1c Read SCI mask (1 byte)

SCI_EB_MODE_CHANGE 0x10 // EB_MODE changes
* 0x1d Write SCI mask (1 byte)
* 0x1e Set date (day/mon/year)

** Need details for using this.
* 0x1f Read battery subsystem error code (1 byte)

l. 0x1b // Game key status (2 bytes)
** 0x02 Pack info fail (LiFePO4 & NiMH)
** 0x04 Over voltage checking fail (LiFePO4)

** 0x05 Over temperature (58C) (LiFePO4)
It will return 2 bytes key status (only 9 bits used). The bits define as following.
** 0x06 Gauge stop or sensor break (LiFePO4 & NiMH)

If game pad pushed the bit will set to 1.
** 0x07 Sensor out of control (NiMH)
** 0x09 Battery ID fail & temperature > 52C Unknown ID

Bit 9: KEY_DN_R, Bit 8: KEY_UP_R, Bit 7:KEY_COLOR/MONO
** 0x10 ACR fail (NiMH)
* 0x23 Set WLAN Power on/off

Bit 6: KEY_RT_L, Bit 5: KEY_LF_L, Bit 4:KEY_DN_L,
* 0x24 Wake up WLAN
* 0x25 WLAN reset

* 0x26 DCON power enable/disable
Bit 3: KEY_UP_L, Bit 2: KEY_RT_R, Bit 1:KEY_LR_R


m. 0x1c // Read SCI mask (1 byte)

o. 0x1d // Write SCI mask (1 byte)

p. 0x1e // Set date (day/mon/year)

q. 0x1f // Read Abnormal code (1 byte)

There are abnormal codes define as following:

0x02 - Pack info fail LiFePO4 & NiMH

0x04 - Over voltage checking fail LiFePO4

0x05 - Over temperature (58C) LiFePO4

0x06 - Gauge stop or sensor break!! LiFePO4 & NiMH

0x07 - Sensor out of control NiMH

0x09 - Battery ID fail & temperature > 52C Unknown ID

0x10 - ACR fail NiMH


r. 0x23 // Set WLAN Power on/off

s. 0x24 // Wake up WLAN

t. 0x25 // WLAN reset

u. 0x26 // DCON power enable/disable

Revision as of 23:46, 7 May 2007

  This page is monitored by the OLPC team.

Operational Specification of the XO embedded controller (EC)

These pages will eventually document the commands and responsibilities of the EC in the XO system. Currently its not much more than a cut and paste from a variety of emails, trac tickets, and operational info extracted from the way the EC is known to work. Some of the descriptions are a bit odd and terse as the source is from non-native English speakers. Verbosity will be expanded as time allows.

EC Commands

  • 0x10 Read voltage (2 bytes)
  • 0x11 Read current (2 bytes)
  • 0x12 Read ACR (2 bytes)
  • 0x13 Read bat temperature (2 bytes)
  • 0x14 Read ambient temperature (2 bytes)
  • 0x15 Read battery status (1 byte)
    • Bit 0: 1: battery exists
    • Bit 1: 1: battery full charged
    • Bit 2: 1: battery low
    • Bit 3: 1: battery destroys
    • Bit 4: 1: AC in
    • Bits 5-7 Not defined
  • 0x16 Read Battery State of Charge (SOC) (1 byte)
  • 0x17 Read Battery gas guage chip serial number (6 bytes)
  • 0x18 Read Battery gas guage data
  • 0x19 Read board id (1 byte)
  • 0x1a Read SCI source (1 byte)
    • 0x01 Game button
    • 0x02 Battery Status Change. Generated for any of:
      • AC plugged/unplugged
      • Battery inserted/removed
      • Battery Low
      • Battery full
      • Battery destroy
    • 0x04 Battery SOC Change
    • 0x08 Battery subsystem error
    • 0x10 Ebook mode change
  • 0x1b Game key status (2 bytes) 9 bits of key status. 1 indicates key is depressed.
    • Bit 1: KEY_LR_R
    • Bit 2: KEY_RT_R
    • Bit 3: KEY_UP_L
    • Bit 4: KEY_DN_L
    • Bit 5: KEY_LF_L
    • Bit 6: KEY_RT_L
    • Bit 7: KEY_COLOR/MONO
    • Bit 8: KEY_UP_R
    • Bit 9: KEY_DN_R
  • 0x1c Read SCI mask (1 byte)
  • 0x1d Write SCI mask (1 byte)
  • 0x1e Set date (day/mon/year)
    • Need details for using this.
  • 0x1f Read battery subsystem error code (1 byte)
    • 0x02 Pack info fail (LiFePO4 & NiMH)
    • 0x04 Over voltage checking fail (LiFePO4)
    • 0x05 Over temperature (58C) (LiFePO4)
    • 0x06 Gauge stop or sensor break (LiFePO4 & NiMH)
    • 0x07 Sensor out of control (NiMH)
    • 0x09 Battery ID fail & temperature > 52C Unknown ID
    • 0x10 ACR fail (NiMH)
  • 0x23 Set WLAN Power on/off
  • 0x24 Wake up WLAN
  • 0x25 WLAN reset
  • 0x26 DCON power enable/disable