[U-Boot-Users] 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

On Tue, 2006-10-03 at 10:58 -0700, bilahari akkiraju wrote:
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.
-> 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

In message 20061003175803.6392.qmail@web33213.mail.mud.yahoo.com you wrote:
-> On my target board I have a spansion GL064M flash device.
How is it attached? As a 8 bit device?
-> 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?
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
Are you really accessing an 8 bit device?
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
participants (3)
-
Ben Warren
-
bilahari akkiraju
-
Wolfgang Denk