Embedded controller/lang-es: Difference between revisions

From OLPC
Jump to navigation Jump to search
m (+anchors+titles)
 
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{OLPC}}
{{ Translation | lang = es | source = Embedded controller | version = 193952 }}
{{anchor|Introduction}}
{{anchor|Introduction}}
= Introducción =
== Introdución ==
{{Translated text|
The [[Hardware#XO_Laptop|XO laptop]] uses a small micro-controller, an ENE KB3700 ([[Media:KB3700-ds-01.pdf|Datasheet]]), to control the battery charging operation and perform other tasks associated with starting and stopping the laptop.


This Embedded Controller (EC) consists of a 8051 micro-controller, a dedicated LPC interface to communicate with the processor, and an SPI Flash ROM interface. The SPI Flash ROM supports two code segments, and a table of [[Manufacturing Data]]. The EC supports the Boot Hub Protocol, allowing the XO's main processor to boot from one of the code segments in the SPI Flash.
OLPC is now working in an Open Source implementation of the XO's Embedded Controller firmware.
| display=none }}


El laptop XO usa un microcontrolador pequeño, un ENE KB3700 ([[Media:KB3700-ds-01.pdf|Datasheet]]) para controlar la operación de cargar la bateria y hacer otras tareas associadas con arrancando y apagando la maquina.
The EC hardware consists of the ENE KB3700 ([[Image:KB3700-ds-01.pdf]]), which has a 8051 microprocessor at it's core. We have chosen to impliment the firmware in C, using [[SDCC]] as our compiler. Efforts are also under way to have CamelForth, a Forth implementation for the 8051, run on the KB3700.


Este Controlador Embebido (EC) consiste de un microcontrolador 8051, un interfacio LPC dedicado a comunicacion con el procesor, y un interfacio a un Flash ROM de typo SPI (interfacio serie). El Flash ROM SPI contiene dos segmentos de código, y una mesa de [[Manufacturing_Data|Informacion de Fabricacion]]. El EC soporte el Boot Hub Protocol, permitiendo el procesor central del XO a arrancar de uno de los segmentos de código adentro del Flash ROM SPI.
{{anchor|Background}}
== Antecedentes ==


{{anchor|Details}}
The EC, implemented as a KB3700, has a paramount importance in controlling the XO when the CPU is not active. To do so, the KB3700 communicates with the CPU via the [[Revised_EC_Port_6C_Command_Protocol|EC protocol]], this protocol is managed in the ports 0x66 and 0x62 of the KB3700. These two ports are serially connected with the 0x6C and 0x68 ports of the CPU. (for more info check [[Ec_specification]]).


== Detallas ==
The KB3700 also communicates with the DS2657 (The battery charger) via the 1 wire Dallas protocol.

One can deduce part of the internal state of the EC using [http://dev.laptop.org/~joel/ec-dump.fth ec-dump.fth] under OpenFirmware.
{{Translated text|
Running the ec-dump script give us valuable data about internals of the EC, being the [[EC_Register_Settings]].
The EC, implemented as a KB3700, has a paramount importance in controlling the XO when the CPU is not active. To do so, the KB3700 communicates with the CPU via the [[Revised_EC_Port_6C_Command_Protocol|EC protocol]] over a physical LPC interface. For more information, see the [[Ec specification]].

The KB3700 also communicates with the Maxim [http://www.maxim-ic.com/quick_view2.cfm/qv_pk/5104 DS2756] battery fuel gauge IC within the battery pack, via the [http://en.wikipedia.org/wiki/1-Wire 1-wire] Dallas protocol. [[Media:DS2756.pdf|DS2756 data sheet]].
| display=none }}
La EC, implementado como un KB3700, tiene una importancia primordial en el control de la XO cuando la CPU no está activo. Para hacer ello, el KB3700 se comunica con la CPU a través de la [[Revised_EC_Port_6C_Command_Protocol|protocolo EC]] a través de una interfaz física LPC. Para obtener más información, consulte la [[Ec_specification|Especificación EC]].

El KB3700 también se comunica con el Maxim [http://www.maxim-ic.com/quick_view2.cfm/qv_pk/5104 DS2756] controlador de pila dentro de la batería, a través del protocolo [http://en.wikipedia.org/wiki/1-Wire 1-wire] de Dallas Semi ([[Media:DS2756.pdf|hoja de datos para el DS2756]]).

=== ec-status ===
{{Translated text|
One can deduce part of the internal state of the EC using [http://dev.laptop.org/~joel/ec-dump.fth ec-dump.fth] under OpenFirmware. Running the ec-dump script gives us valuable data about internals of the EC, being the [[EC Register Settings]].


The procedure to run '''ec-dump''' over internet in a wireless connection is:
The procedure to run '''ec-dump''' over internet in a wireless connection is:
Line 23: Line 38:
ok fload http:\\18.85.2.147\~rafael\to-file.fth
ok fload http:\\18.85.2.147\~rafael\to-file.fth
ok to-file u:\ec-dump fload http:\\18.85.2.147\~joel\ec-dump.fth
ok to-file u:\ec-dump fload http:\\18.85.2.147\~joel\ec-dump.fth
| display = none }}
Uno puede deducir parte del estado interno de la EC usando [http://dev.laptop.org/~joel/dump.fth ec-dump.fth] de OpenFirmware. Ejecutando el script ec-dump nos da datos valiosos acerca de los componentes internos de la EC, que es el [[EC_Register_Settings|Configuración de Registros del EC]].


El procedimiento para ejecutar '''ec-dump''' a través de Internet en una conexión inalámbrica es el siguiente:
{{anchor|OpenEc Firmware Proyect}}
ok wifi media lab 802.11 *change it to your name AP
= OpenEc Proyecto de Firmware =
ok fl http:\\18.85.2.147\~joel\ec-dump.fth *change to your AP IP direction


Para correr '''ec-dump''' por el internet y guardar el archivo en una llave USB:
openec is an effort for an open implementation of the firmware on the EC.
ok wifi media lab 802.11 *change it to your name AP
It currently is in an early stage and not functional yet.
ok fload http:\\18.85.2.147\~rafael\to-file.fth
Downloading openec to an XO '''might damage the XO''', please do not do
ok to-file u:\ec-dump fload http:\\18.85.2.147\~joel\ec-dump.fth
so unless you know what you are doing.
{{anchor|OpenEC firmware project}}


== Proyecto OpenEC ==
{{anchor|Tools for OpenEc}}
== Herramientas para OpenEc ==


{{Translated text |
; git : source revision tool
The firmware running on the XO's EC, while heavily modified and supported by OLPC, was originally written by two different companies. OLPC has had no success convincing those companies to open source their code.
; sdcc : Compiler sdcc 2.7.0 or later (needed) http://sdcc.sf.net (Compiler which generates the binary for the EC)
; gcc : Compiler (optional for openec) the source is currently also compilable with GCC
; doxygen : Source documentation tool (optional), http://www.doxygen.org
; LaTeX : text tool (optional), needed if a pdf version of the documentation should be generated. A html version of the source documentation can be generated without LaTeX
; Srecord : srecord (needed), http://srecord.sf.net, handling of hex (etc.) files (Version 1.36)
; Make : (needed), GNU make, should be there anyway.
; D52 : Disassembler (optional), http://www.8052.com/users/disasm/ , generates disassembled file openec.d52
; Download software : spiflash.dic (needed), see http://lists.laptop.org/pipermail/openec/2007-August/000061.html . Forth software to download the EC firmware to the target. Be sure to backup the complete firmware (including manufacturing data) first
; Hardware adapter : serial adapter (needed) http://wiki.laptop.org/go/Image:Serial_adapter.jpg Hardware adapter to download to target. Connects to CN24 and an RS232 null-modem cable (an additional oscillator is needed (66MHz(?) to CN24,Pin5)). Additional instructions are at [[SPI_FLASH_Recovery]]. (The instructions there address recovery of the complete flash)
; Jumpers : 2 jumpers for Recovery Mode jumper block (see above)
; Null modem cable : (needed) to connect the serial adapter to a serial port
; Serial port : (needed) Not all new PC and very few notebooks still have a serial port (an USB to serial adapter might be additionally needed then)
; Terminal Software : minicom (recommended). Needed to see or capture debugging output. Parameters 115kBaud, 8N1, no handshake - other terminal programs can be used too.


The OLPC community is now working on [[OpenEC]], an Open Source implementation of the XO's Embedded Controller firmware. It currently is in an early stage and not functional yet.
| display=none }}
El firmware corriendo en el Controlador Embebido del XO, mientras modificada y apoyada por OLPC, fue escrito originalmente por dos empresas diferentes. OLPC no ha tenido éxito convencer a las empresas a abrir su código fuente.

La comunidad de la OLPC está trabajando en [[OpenEC]], una aplicación de código abierto para el Controlador Incrustado del XO. En la actualidad se encuentra en una etapa temprana y aún no funcional.
{{anchor|Related documentation}}
{{anchor|Related documentation}}

== Documentacion Relacionada ==
== Documentacion Relacionada ==


*[[XO Full Reset/lang-es|Reiniciando el Controlador Embebido]]
http://wiki.laptop.org/go/Category.EC
*[[Media:KB3700-ds-01.pdf|ENE KB3700 Datasheet]]

* Ve otros articulos en [[:Category:EC]]
[[Media:KB3700-ds-01.pdf|ENE KB3700 Datasheet]]

http://sdcc.sourceforge.net/doc/sdccman.pdf

{{anchor|Mailing list}}
=== Mailing list ===

* http://lists.laptop.org/listinfo/openec

{{anchor|Getting the source}}
== Consiguiendo las fuentes ==

The source is in the git repository [http://dev.laptop.org/git.do?p=projects/openec;a=summary OpenEC] and can be browsed online there.

To get this code onto your machine please do:
git-clone git://dev.laptop.org/projects/openec

{{anchor|Compiling on the host for the EC}}
== Compilando en el huésped para el EC ==
If the necessary tools are installed it is a simple "make" inside the openec directory:
make
Listing files and a binary file currently named ''openec.do_not_use.bin'' are generated.
(Intentionally no more details here about how to proceed:)

{{anchor|Compiling on the host for the host}}
== Compilando en el huésped para el huésped ==
Run make with an additional argument inside the openec directory:
make -f Makefile.gcc
you can then run
./openec.gcc | less
there. The EC specific hardware is not present on the host,
so openec.gcc will be of limited use. Running openec.gcc on the
host does not endanger the host:)

{{anchor|Files of the C implementation}}
== Archivos de laimplementaicion en C ==

*battery.c Skeleton for battery handling with the Embedded Controller (key)
*build.c Keeps version related info
*compiler.h include file to allow compiling with SDCC and GCC
*Doxyfile Control file for Source Documentation tool Doxygen
*ds2756.c Handle Maxim/Dallas DS2756
*failsafe/ Failsafe Code
*fs_entry.c Trampoline for a bankswitching routine
*kb3700.h kb3700.h - header file for ENE KB3700 Keyboard Controler
*main.c Skeleton for the Embedded Controller of the OLPC project
*Makefile.gcc Makefile for compiling with GCC
*Makefile SDCC Makefile
*matrix_3x3.c Routines to handle 3x3 matrix within the OLPC project
*openec.ctl Control file for D52 disassembler
*port_0x6c.c host communication routines for the EC of the OLPC
*sfr_dump.c dump register settings
*sfr_rw.c reading/writing mcs-51 sfr (special function registers)
*states.c Helps debugging state machines
*timer.c Timer routines for the Embedded Controller of the OLPC project
*uart.c handle serial IO on the EC
*unused_irq.c Safe IRQ stubs for unused IRQ
*watchdog.c Watchdog of the EC

{{anchor|Status}}
== Estado ==

Compilable, timer IRQ functional, blinks LEDs, decodes cursor keys,
uart output functional (TX, no RX), dumps registers outputs (ec-dump.fth like)
on boot and cursor key press, outputs status of internal
state machines onto serial line.
Reacts on Power button but does not power up the XO yet.

Status is tested on B1 but yet to be confirmed for others.

{{anchor|Desired Features}}
== Caracteristicas Deseadas ==
* Failsafe Code
* Easy debugging
* GCC compilable.


[[Category:Hardware]]
{{anchor|To Do}}
[[Category:Developers]]
== Por Hacer ==
[[Category:EC]]
* lots
[[Category:Firmware]]

Latest revision as of 11:54, 26 February 2013

  Esta página está supervisada por el equipo de OLPC.
  Traducción de Embedded controller original  
  english | español | 한국어   +/- cambios  

Introdución

The XO laptop uses a small micro-controller, an ENE KB3700 (Datasheet), to control the battery charging operation and perform other tasks associated with starting and stopping the laptop.

This Embedded Controller (EC) consists of a 8051 micro-controller, a dedicated LPC interface to communicate with the processor, and an SPI Flash ROM interface. The SPI Flash ROM supports two code segments, and a table of Manufacturing Data. The EC supports the Boot Hub Protocol, allowing the XO's main processor to boot from one of the code segments in the SPI Flash.

El laptop XO usa un microcontrolador pequeño, un ENE KB3700 (Datasheet) para controlar la operación de cargar la bateria y hacer otras tareas associadas con arrancando y apagando la maquina.

Este Controlador Embebido (EC) consiste de un microcontrolador 8051, un interfacio LPC dedicado a comunicacion con el procesor, y un interfacio a un Flash ROM de typo SPI (interfacio serie). El Flash ROM SPI contiene dos segmentos de código, y una mesa de Informacion de Fabricacion. El EC soporte el Boot Hub Protocol, permitiendo el procesor central del XO a arrancar de uno de los segmentos de código adentro del Flash ROM SPI.

Detallas

The EC, implemented as a KB3700, has a paramount importance in controlling the XO when the CPU is not active. To do so, the KB3700 communicates with the CPU via the EC protocol over a physical LPC interface. For more information, see the Ec specification.

The KB3700 also communicates with the Maxim DS2756 battery fuel gauge IC within the battery pack, via the 1-wire Dallas protocol. DS2756 data sheet.

La EC, implementado como un KB3700, tiene una importancia primordial en el control de la XO cuando la CPU no está activo. Para hacer ello, el KB3700 se comunica con la CPU a través de la protocolo EC a través de una interfaz física LPC. Para obtener más información, consulte la Especificación EC.

El KB3700 también se comunica con el Maxim DS2756 controlador de pila dentro de la batería, a través del protocolo 1-wire de Dallas Semi (hoja de datos para el DS2756).

ec-status

One can deduce part of the internal state of the EC using ec-dump.fth under OpenFirmware. Running the ec-dump script gives us valuable data about internals of the EC, being the EC Register Settings.

The procedure to run ec-dump over internet in a wireless connection is:

ok wifi media lab 802.11 *change it to your name AP
ok fl http:\\18.85.2.147\~joel\ec-dump.fth *change to your AP IP direction

Running ec-dump over internet and saving the file in a USB key:

ok wifi media lab 802.11 *change it to your name AP
ok fload http:\\18.85.2.147\~rafael\to-file.fth
ok to-file u:\ec-dump fload http:\\18.85.2.147\~joel\ec-dump.fth

Uno puede deducir parte del estado interno de la EC usando ec-dump.fth de OpenFirmware. Ejecutando el script ec-dump nos da datos valiosos acerca de los componentes internos de la EC, que es el Configuración de Registros del EC.

El procedimiento para ejecutar ec-dump a través de Internet en una conexión inalámbrica es el siguiente:

ok wifi media lab 802.11  *change it to your name AP
ok fl http:\\18.85.2.147\~joel\ec-dump.fth  *change to your AP IP direction

Para correr ec-dump por el internet y guardar el archivo en una llave USB:

ok wifi media lab 802.11  *change it to your name AP
ok fload http:\\18.85.2.147\~rafael\to-file.fth
ok to-file u:\ec-dump fload http:\\18.85.2.147\~joel\ec-dump.fth

Proyecto OpenEC

The firmware running on the XO's EC, while heavily modified and supported by OLPC, was originally written by two different companies. OLPC has had no success convincing those companies to open source their code.

The OLPC community is now working on OpenEC, an Open Source implementation of the XO's Embedded Controller firmware. It currently is in an early stage and not functional yet.

El firmware corriendo en el Controlador Embebido del XO, mientras modificada y apoyada por OLPC, fue escrito originalmente por dos empresas diferentes. OLPC no ha tenido éxito convencer a las empresas a abrir su código fuente.

La comunidad de la OLPC está trabajando en OpenEC, una aplicación de código abierto para el Controlador Incrustado del XO. En la actualidad se encuentra en una etapa temprana y aún no funcional.

Documentacion Relacionada