
I did
protect off all
I have tried the following command sequences but didnt succeed in my objective of writing to and erasing first sector on flash.
WRITE COMMAND SEQUENCE:
mw ff000555 00AA00AA mw ff0002AA 00550055 mw ff000555 00A000A0 mw ff000000 12345678
SECTOR ERASE COMMAND SEQUENCE:
mw ff000555 00AA00AA mw ff0002AA 00550055 mw ff000555 00800080 mw ff000555 00AA00AA mw ff0002AA 00550055 mw ff000000 00300030
Note: I tried mw.b, mw.w, mw.l with appropriate data but didnt succeed.
In first place is it possible to write to AMD flash manually like this or shud it be done only programatically. Any one has tried writing to flash this way before ( I could write to Intel strata flash this way).
I walked through u-boot code for cfi_flash.c and flash_write() function that is called when cp (copy) command is invoked, the code does the same thing, the only extra thing it does is it polls on data register bits for a certain amount of time (flash erase, write timeout intervals) and also does a reset to bring back device to read array mode
mw.w ff000000 00F0 ; reset cmd
I have a ppc 8343 processor on board. I am wondering if U-boot that came with my target board has configuration that is preventing me to write to flash (but cp commands works fine with flash). Any one who has same spansion flash chip s29GL064M can try it, I cannot figure out the missing link in the chain, any advise, comments, suggestion will be of great help
Thanks, Bilahari
--- Wolfgang Denk wd@denx.de wrote:
In message
20061005222823.71219.qmail@web33206.mail.mud.yahoo.com
you wrote:
-> I read my board's spec and found out that I
have
two spansion s29GL064M devices on my board whose
data
bus is 16-bit wide and address bus is 32-bit wide. They are attached as 16-bit devices.
Then your command sequence was wrong.
-> I looked at the data sheet of the spansion s29GL64M and I am sure I am using the right command
sequences
(x16 Mode commands) for erase and program.
No. In 16 bit mode addresses get shifted by one bit, and your command word must address both chips, i. e. instead of
mw.b 0xff000555 0xAA
you need
mw FF000AAA 00AA00AA
-> How can I check if my memory controller is properly configured or not.
By carefully studying the hardware documentation, processor User's manual, chip documentation, etc. Then perform a code review.
Best regards,
Wolfgang Denk
-- Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de Do you suppose the reason the ends of the `Intel Inside' logo don't match up is that it was drawn on a Pentium?
__________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com