Embedded controller: Difference between revisions

From OLPC
Jump to navigation Jump to search
No edit summary
 
(17 intermediate revisions by 8 users not shown)
Line 1: Line 1:
{{OLPC}}
{{OLPC}}
{{Translations}}
{{Translations}}
{{Olpcboxtop|toptext=[[{{PAGENAME}}|Embedded Controller]]}}
{{OBX source dev|projects/openec}}
{{Olpcboxbottom}}
Dr. sinep
Advanced Composition
21 October, 2007
Electrical Engineering
Electricity plays an important role within the infrastructure. Without electrical engineers, power could not be properly distributed and we would be living in the dark ages without electricity. Although this is not a new career, the field is thriving and electrical engineers are required to keep our high-tech societies running. Electrical engineers are usually well-trained, having either a 4 or 5 year degree, and have several benefits including health care and a high salary.
Electrical engineering is often confused with computer engineering; however, as electrical engineers often use computers and even design complex computer control systems, they also deal with electrical grids and power distribution. Electrical engineers typically earn a bachelor’s degree or a master’s degree in fields including electronics, electrical engineering, or computer engineering. When working towards their degree, some may choose to work as an apprentice under a master electrician to become a certified electrician. Most electricians get their training by working as an apprentice under a master electrician (journey worker) and can become certified in less than one year. This is a very good way to get trained, as it helps gain experience in working towards a degree in electrical engineering. Electrical Engineering degrees usually cover physics, mathematics, computer science, project management, and other various fields that relate to the specific field of electrical engineering.
Students can work towards their degree by doing research projects or course work. Research projects involve a lot of book work, however, they allow the student to go out into the field and work with experienced engineers in their same field. While research projects also involve a lot of book work, they can be some of the most rewarding education you will receive. Most electrical engineers get their degrees from both course work and research projects. Course work involves a lot of lecture notes and test taking, however, can prepare you mentally to become ready for the field, and can also involve lab work within the classroom to prepare you for the job.
Electrical engineering is a wide field in where employees can work in a variety of different environments, and be able to change fields within your career whenever you want to do something different. Electrical engineers do everything from designing household appliances to designing giant power plants and grids that distribute electricity all over the country. Other electrical engineers design control systems for large factory machines, while others still design household electronics. Some electrical engineers install wiring and lighting in huge industrial complexes, as well as skyscrapers.
If it weren’t for electrical engineers, there is no way we would have any of today’s technology. From the development of harnessing electricity and wiring us to a grid that distributes power globally, electrical engineers have been there every step of the way. When electricity was invented, Thomas Edison and Nikola Tesla both had different ideas of how to distribute it. Edison turned on the world’s first large-scale power distribution system in lower Manhattan in 1882, however it ran on 110 volts direct current. Nikola Tesla had several patents on another type of power – alternating current, which could supply more power while using less energy. The two famous electrical engineers competed in what they called current wars. In the end, Tesla’s alternating current won and that is what we use in our homes today. Similarly, when radio was being developed, Heinrich Hertz designed a spark-gap generator to detect radio waves.
As starting salaries are usually lower than experienced workers, most electrical engineers still earn a good living even when starting out. Electrical Engineers usually earn between $35,000 and $100,000 a year, which could even be in a package that includes a vehicle. Electrical Engineers are usually certified master electricians, and can choose to become entrepreneurs and start their own business. An entrepreneur electrical engineer may also choose to use his/her skills in the military, and have opportunities to travel.
Electrical engineers have always played an important role in the development of our society, and while the career has been around since the dark ages, it should be around for ages to come. As our modern world grows, we constantly need newer technologies and more electricity to keep everything running smoothly. Electrical engineering is a rewarding career with very good benefits, and there is a demand for electrical engineers.



== Introduction ==
== Introduction ==


The [[Hardware#XO_Laptop|XO-1 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.
OLPC is now working in an Open Source implementation of the XO's Embedded Controller firmware.


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.
The EC hardware consists of the ENE KB3700 ([[Image:KB3700-ds-01.pdf]]), which has a 8051 microprocessor at its 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.


=== Background ===
== 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]]).
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]].
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]].


=== ec-status ===
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]].
One can deduce part of the internal state of the EC using [http://dev.laptop.org/~joel/ec-dump.fth ec-dump.fth] under [[Open Firmware]]. 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 42: Line 25:
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


== OpenEc firmware project ==
== Source and Licensing ==


The firmware running on the XO-1's EC, while heavily modified and supported by OLPC, was originally written by two different companies. OLPC had no success convincing those companies to open source their code.
[[OpenEC]] is an effort for an open implementation of the firmware on the EC.
It currently is in an early stage and not functional yet.


The OLPC community did work on [[OpenEC]], an Open Source implementation of the XO-1's Embedded Controller firmware. It reached an early stage and was not functional.
=== Related Documentation ===


The XO-1.75 and XO-4 embedded controller firmware is open source. See [[Firmware]].
http://wiki.laptop.org/go/Category:EC


== Related Documentation ==
[[Media:KB3700-ds-01.pdf|ENE KB3700 Datasheet]]


*[[XO_Full_Reset|Rebooting the Embedded Controller in a laptop]]
*[[Media:KB3700-ds-01.pdf|ENE KB3700 Datasheet]]
* See other articles in [[:Category:EC]]


[[Category:Hardware]]
[[Category:Developers]]
[[Category:EC]]
[[Category:EC]]
[[Category:Firmware]]
[[Category:Firmware]]

Latest revision as of 04:05, 13 August 2013

  This page is monitored by the OLPC team.
  english | español | 한국어 HowTo [ID# 291388]  +/-  

Introduction

The XO-1 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.

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 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.

ec-status

One can deduce part of the internal state of the EC using ec-dump.fth under Open Firmware. 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

Source and Licensing

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

The OLPC community did work on OpenEC, an Open Source implementation of the XO-1's Embedded Controller firmware. It reached an early stage and was not functional.

The XO-1.75 and XO-4 embedded controller firmware is open source. See Firmware.

Related Documentation