Can I write to flash using mw command
Hello,
-> On my target board I have a spansion GL064M flash
device.
-> The flash base address is 0xff000000.
-> I have read the data sheet for the device and
noted down the erase and write command sequences for the device.
-> I cannot erase, write to flash by implementing the
appropriate command sequences with mw (memory write ) command provided by u-boot that came with my sdk (u-boot 1.1.4).
For example
For erasing sector 0xff000000 I typed the following
sector erase command sequence (as per data sheet) at u-boot prompt
mw.b 0xff000555 0xAA
mw.b 0xff0002AA 0x55
mw.b 0xff000555 0x80
mw.b 0xff000555 0xAA
mw.b 0xff0002AA 0x55
mw.b 0xff000000 0x30
For writing to address 0xff000000 I typed the
following write command sequence (as per data sheet) at the u-boot prompt.
mw.b 0xff000555 0xAA
mw.b 0xff0002AA 0x55
mw.b 0xff000555 0xA0
mw.b 0xff000000 0x12 ; value 0x12 mw.b 0xff000001 0x34 ; value 0x34 mw.b 0xff000000 0xF0 ; reset (I do it as u-boot
driver cfi_flash.c does it )
-> After doing all this , when I do a memory dump
using md.b 0xff000000 , to my frustration I see that nothing at all has happend to the flash.
I am sure I am missing something small or may be I am
doing a completely wrong thing. I am more of a computer science guy and new to chip programming. Any suggestions, ideas or comments would be very helpful.
Thanks you all
Bilahari
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Quoted 4 lines · bilahari akkiraju
Hello,
-> On my target board I have a spansion GL064M flash
device.
We use this chip too and it works fine using U-boot's CFI. What is your sector layout (uniform, bottom boot or top boot)? The additional markings on the chip will tell you.
Quoted 5 lines
-> I cannot erase, write to flash by implementing the
appropriate command sequences with mw (memory write ) command provided by u-boot that came with my sdk (u-boot 1.1.4).
Do the U-boot 'protect' and 'erase commands work? If so, why torture yourself with low-level access? If not, you have a configuration or hardware issue which we can explore.
regards,
Ben
Quoted 3 lines · In message <[email protected]> you wrote:
-> On my target board I have a spansion GL064M flash
device.
How is it attached? As a 8 bit device?
Quoted 2 lines
-> I cannot erase, write to flash by implementing the
appropriate command sequences with mw (memory write )
Are you sure you use ther correct addresses and commands?
Quoted 10 lines
For erasing sector
0xff000000I typed the following
sector erase command sequence (as per data sheet) at u-boot promptmw.b
0xff0005550xAA
mw.b0xff0002AA0x55
mw.b0xff0005550x80
mw.b0xff0005550xAA
mw.b0xff0002AA0x55
mw.b0xff0000000x30
Are you really accessing an 8 bit device?
Quoted 2 lines
I am sure I am missing something small or may be I am
doing a completely wrong thing. I am more of a
Also check if your memory controller is set up correctly...
Best regards,
Wolfgang Denk
Signature · 6 lines
Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de All repairs tend to destroy the structure, to increase the entropy and disorder of the system. Less and less effort is spent on fixing original design flaws; more and more is spent on fixing flaws intro- duced by earlier fixes. - Fred Brooks, "The Mythical Man Month"