[OLPC-devel] OLPCflash: The latest
Richard Smith
smithbone at gmail.com
Sat Aug 12 10:40:36 EDT 2006
I broke out the oscope last night and worked on getting writes to work.
New info I've learned or confirmed:
- Base address for talking to EC registers is 0x381.
- I can now de-assert the write protect pin to the flash.
Magic EC address(s) are:
0xFC1A GPIO5 output control
0xFC2A GPIO5 value
So you can either set bit 7 in 0xFC1A to disable the output and the
pullup on the WE# pin de-asserts or you can set/clear bit 7 in 0xFC2A
to control the actual value of the IO pin.
I currently chose to control the value of the IO so I'm toggleing bit
7 @ 0xFC2A
- Putting the KBC in reset appears to be mantory.
Just like Rays email said. If you watch the SPI lines after you boot
you see that there is constant activity on the SPI bus. If you put
the KBC into reset this activity stops. KBC reading some sort of
keymap look up table perhaps?
Whats weird is that reads will also work without putting it into
reset. But I bet its trouble if we try to do the same with writes.
- You need to erase the sector prior to a program.
Spansion data sheet says that page program will take bits from a 1 to
0 and that a erase is necessary first.
The commands that we send to the EC match the same commands on the
spansion datasheet so my current assumption is that the EC is just a
traslation layer and passes these commands directly onto the spansion
part without any additional logic other than formating.
What doesn't work:
- Sector erase.
When I use my sector erase command I don't see anything happen on the
SPI bus. So somethings still not right.
My plan is later on today to work on it some more and get a handle on
sending commands to the spansion part and perhaps why nothing happens
for sector erase.
Attached is the latest. Its got some in the write routine commented
out where I was debugging. So its just FYI or in case someone else
whats to play with it a bit.
Oh yeah and I fixed a 1Meg per run memory leak. Every so often my
board would just re-boot and I think this was causing it
--
Richard A. Smith
-------------- next part --------------
A non-text attachment was scrubbed...
Name: olpcflash.c
Type: text/x-csrc
Size: 12155 bytes
Desc: not available
URL: <http://lists.laptop.org/pipermail/devel/attachments/20060812/57863e7c/attachment.c>
More information about the Devel
mailing list