[U-Boot] Flash Erase and Write timeout for S29GL512P

prakash bedge
2010-05-25T08:31:37Z

Hi,

>> Be careful. 1024 s is chip erase time, but we use sector erase only, so
it's only 3.5 seconds.
It would be really helpful if you please explain how 3.5 seconds come; since
the S29GL512P datasheet says sector erase operation time is 0.5 seconds and
program operation time is 64 microseconds.

What values I should put in my config file?
#define CONFIG_SYS_FLASH_ERASE_TOUT ?? /* Timeout for Flash Erase (in
ms) */
#define CONFIG_SYS_FLASH_WRITE_TOUT ?? /* Timeout for Flash Write (in ms) */

I seen canyonlands.h and I think it is also 64 MB flash.

/*-----------------------------------------------------------------------
* FLASH related
*----------------------------------------------------------------------*/
#define CONFIG_SYS_FLASH_CFI /* The flash is CFI compatible */
#define CONFIG_FLASH_CFI_DRIVER /* Use common CFI driver */

#define CONFIG_SYS_FLASH_CFI_AMD_RESET 1 /* Use AMD (Spansion) reset cmd */
#define CONFIG_SYS_FLASH_BANKS_LIST {CONFIG_SYS_FLASH_BASE}
#define CONFIG_SYS_MAX_FLASH_BANKS 1 /* max number of memory banks */
#define CONFIG_SYS_MAX_FLASH_SECT 512 /* max number of sectors on one
chip */

#define CONFIG_SYS_FLASH_ERASE_TOUT 120000 /* Timeout for Flash Erase (in
ms) */
#define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Timeout for Flash Write (in
ms) */

But I myself is not geting satsifed why I should use these values since they
are not as per the flash datasheet.

Regards,
Prakash

On Fri, May 21, 2010 at 12:46 PM, Wolfgang Denk <wd@denx.de> wrote:

> Dear prakash bedge,
>
> In message <AANLkTil9bEkSR6MOcuCbgkxhJN-VKKdOAEMnHIYjqNVj@mail.gmail.com>
> you wrote:
> >
> > Flash chip I am using is S29GL512P and as per datasheet flash erase time
> is
> > 1024 Seconds and flash program time is 492 Seconds.
>
> Be careful. 1024 s is chip erase time, but we use sector erase only,
> so it's only 3.5 seconds.
>
> Same for the 492 s - this is Chip Program Time which does not matter
> here.
>
> > But, in Uboot, I am seeing that most boards have configured
> > CONFIG_SYS_FLASH_ERASE_TOUT
> > to 240000 ms and CONFIG_SYS_FLASH_WRITE_TOUT to 200-400 ms range for
> > flash of size 1GB or moroe.
> >
> > Can anyone please tell what value I should use for my chip.
>
> The CFI driver accesses the flash in sectors only, so sector times
> apply, not chip times.
>
> Best regards,
>
> Wolfgang Denk
>
> --
> DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
> Even if you aren't in doubt, consider the mental welfare of the per-
> son who has to maintain the code after you, and who will probably put
> parens in the wrong place. - Larry Wall in the perl man page
>