From: Umar Qureshey <U<mar@au...> - 2002-08-20 19:21:13
I am attempting to port armboot to my custom 7212-based board with 512KB
AMD AM29LV400BT Flash chip. Currently, I am compiling a "development"
armboot 1.02 with CONFIG_INIT_CRITICAL undefined, loading it to memory thru
the serial port, and jumping to its start address. This works fine and I
can interact with armboot thru minicom. I also have tftpboot working so I
can download a file into memory. My plan is to compile another version of
armboot compiled for ROM operation, upload it through tftp to memory, and
flash it using the "development" version of armboot running in RAM. This is
where I have been getting problems. I am using the flash.c from the shannon
board because it also uses an AMD chip. I have modified the pertinent flash
parameters in include/configs/config_myboard.h, and (to the best of my
knowledge) modified board/myboard/flash.c to my specs which include setting
FLASH_BANK_SIZE and MAIN_SECT_SIZE, and modifying flash_init() so armboot is
aware of my flash chip layout. I have left everything else as is. The
problem is that when I unprotect all of the flash chip and try to use the
saveenv command, I get:
Un-Protected 1 sectors
Erasing sector 10 ... ok.
Saving Environment to Flash...General Flash Programming Error
Protected 1 sectors
Similarly, when I unprotect the whole flash chip and use "erase all"
command, I get:
Erase Flash Bank #1:
Erasing sector 0 ... Timeout writing to Flash
Can anyone offer any suggestions as to what could this be a symptom of? I
presumed that all AMD chips use the same programming algorithm so only a
modification of the chip parameters in armboot would be necessary. What am
From: Marius Groeger <mag@sy...> - 2002-08-21 08:58:15
On Tue, 20 Aug 2002, Umar Qureshey wrote:
> where I have been getting problems. I am using the flash.c from the shannon
> board because it also uses an AMD chip. I have modified the pertinent flash
I'm not entirely sure as to whether the Shannon flasher code is
functional (Alex?). So I'd be a little bit careful here.
> Erasing sector 10 ... ok.
> Saving Environment to Flash...General Flash Programming Error
> Protected 1 sectors
I suspect a problem with the addressing of the flash chips, so the
commands that are sent to the chips are not actually putting its state
machine in the correct mode. It is next to impossible to tell what
exactly goes wrong. You'll have to carefully check all parameters:
addresses, bus width, chip sizes etc. The fact that the erase
seemingly succeeded doesn't tell anything. Maybe the sector was erased
in the first place.
> Erase Flash Bank #1:
> Erasing sector 0 ... Timeout writing to Flash
Before erasing and flashing I would definitely write the
Query command to the chip to have it tell me the vendor and type. Then
you know you have found the correct addressing.
Also, flash state machines can be annoyingly persistent, so be sure to
issue Read-Array commands frequently, at least in the development
Marius Groeger SYSGO Real-Time Solutions GmbH mgroeger@...
Software Engineering Embedded and Real-Time Software http://www.sysgo.de
Voice: +49-6136-9948-0 Am Pfaffenstein 14 http://www.osek.de
FAX: +49-6136-9948-10 55270 Klein-Winternheim, Germany http://www.elinos.com