Ec specification: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 6: | Line 6: | ||
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. It 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 |
|||
g. 0x16 // Read SOC (1 byte) |
|||
h. 0x17 // Read gas guage chip serial number (6 bytes) |
|||
i. 0x18 // Read gas guage data |
|||
j. 0x19 // Read board id (1 byte) |
|||
k. 0x1a // Read SCI source (1 byte) |
|||
The SCI source will keep what the SCI event when a SCI happens. |
|||
SCI_WACKUP_EVENT 0x01 // Game button |
|||
SCI_BATTERY_STATUS_CHANGE 0x02 // AC plugged/unplugged, Battery inserted/remove, |
|||
// Battery Low, Battery full, Battery destorys |
|||
SCI_SOC_CHANGE 0x04 // SOC Change |
|||
SCI_ABNORMAL_EVENT 0x08 // Battery Abnormal |
|||
SCI_EB_MODE_CHANGE 0x10 // EB_MODE changes |
|||
l. 0x1b // Game key status (2 bytes) |
|||
It will return 2 bytes key status (only 9 bits used). The bits define as following. |
|||
If game pad pushed the bit will set to 1. |
|||
Bit 9: KEY_DN_R, Bit 8: KEY_UP_R, Bit 7:KEY_COLOR/MONO |
|||
Bit 6: KEY_RT_L, Bit 5: KEY_LF_L, Bit 4:KEY_DN_L, |
|||
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:20, 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. It 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
g. 0x16 // Read SOC (1 byte)
h. 0x17 // Read gas guage chip serial number (6 bytes)
i. 0x18 // Read gas guage data
j. 0x19 // Read board id (1 byte)
k. 0x1a // Read SCI source (1 byte)
The SCI source will keep what the SCI event when a SCI happens.
SCI_WACKUP_EVENT 0x01 // Game button
SCI_BATTERY_STATUS_CHANGE 0x02 // AC plugged/unplugged, Battery inserted/remove,
// Battery Low, Battery full, Battery destorys
SCI_SOC_CHANGE 0x04 // SOC Change
SCI_ABNORMAL_EVENT 0x08 // Battery Abnormal
SCI_EB_MODE_CHANGE 0x10 // EB_MODE changes
l. 0x1b // Game key status (2 bytes)
It will return 2 bytes key status (only 9 bits used). The bits define as following.
If game pad pushed the bit will set to 1.
Bit 9: KEY_DN_R, Bit 8: KEY_UP_R, Bit 7:KEY_COLOR/MONO
Bit 6: KEY_RT_L, Bit 5: KEY_LF_L, Bit 4:KEY_DN_L,
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