[U-Boot-Users] 16BIT SPANSION Flash writing problem with CFI Driver

Tolunay Orkun listmember at orkun.us
Sun Nov 19 20:27:33 CET 2006

Sam Song wrote:
>>> Bank # 1: CFI conformant FLASH (16 x 16)  Size: 8
>>> MB in 128 Sectors Erase timeout 16384 ms, write 
>>> timeout 0 ms, buffer write timeout 4096 ms, 
>>> buffer size 32
>> Looks like your flash part does not support single
>> word writes via conventional interface 
>> (write timeout is 0). It must use buffered
>> writes. Did you enable buffer writes? You probably
>> did but just double checking...
> I didn't enable buffer writes. Once I defined
> CFG_FLASH_USE_BUFFER_WRITE, all save operations
> would encounter an error. Actually, I noticed
> it was unaccptable to enable buffer write for
> AMD flash.

I guess you can implement CFG_FLASH_USE_BUFFER_WRITE for AMD style
flash. The details is in the datasheet. It should speed up the
programming anyway.

Here is the datasheet:

Since you are able to write small amounts of data successfully, it means
that either timeout or status processing is not quite correct. For
non-buffered writes I believe the write timeout of 0 may be the problem.
Typically these values are set to 0 if the feature is not supported but
the datasheet gives program sequence as well. Please override the data
read from CFI regarding write timeout with a non zero value (say 1ms
timeout) and see what happens. Perhaps, they set the timeout to 0
because they want the process to be completely driven by DQ7 bits. When
timeout is 0 we might be bypassing the DQ7 toggle check so verify the
path is working as expected. Finally, they have toggle/operations
defined for other DQ bits in additon to DQ7. It might be necessary to
monitor other bits as well for a successful completion. You might need
to verify that as well.

Test your flash writes with debug turned off. Debugging code interferes
in my Intel flash boards and cp fails.

Good luck,

More information about the U-Boot mailing list