* [U-Boot] Flash Erase and Write timeout for S29GL512P @ 2010-05-21 5:17 prakash bedge 2010-05-21 7:16 ` Wolfgang Denk 0 siblings, 1 reply; 6+ messages in thread From: prakash bedge @ 2010-05-21 5:17 UTC (permalink / raw) To: u-boot Hi All, I am using 64MB CFI compliant flash on my board. For that I need to configure the erase and write timeout for this chip in configs/boardname.h file Flash chip I am using is S29GL512P and as per datasheet flash erase time is 1024 Seconds and flash program time is 492 Seconds. So CONFIG_SYS_FLASH_ERASE_TOUT should be 1024000 ms and CONFIG_SYS_FLASH_WRITE_TOUT should be 492000 ms. 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. Regards, Prakash ^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] Flash Erase and Write timeout for S29GL512P 2010-05-21 5:17 [U-Boot] Flash Erase and Write timeout for S29GL512P prakash bedge @ 2010-05-21 7:16 ` Wolfgang Denk 2010-05-25 8:31 ` prakash bedge 0 siblings, 1 reply; 6+ messages in thread From: Wolfgang Denk @ 2010-05-21 7:16 UTC (permalink / raw) To: u-boot 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] Flash Erase and Write timeout for S29GL512P 2010-05-21 7:16 ` Wolfgang Denk @ 2010-05-25 8:31 ` prakash bedge 2010-05-25 8:54 ` Andreas Bießmann 2010-05-25 11:41 ` Wolfgang Denk 0 siblings, 2 replies; 6+ messages in thread From: prakash bedge @ 2010-05-25 8:31 UTC (permalink / raw) To: u-boot 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 > ^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] Flash Erase and Write timeout for S29GL512P 2010-05-25 8:31 ` prakash bedge @ 2010-05-25 8:54 ` Andreas Bießmann 2010-05-25 11:41 ` Wolfgang Denk 1 sibling, 0 replies; 6+ messages in thread From: Andreas Bießmann @ 2010-05-25 8:54 UTC (permalink / raw) To: u-boot Hi, Am 25.05.2010 10:31, schrieb prakash bedge: > 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. Please see Datasheet 11.7.5: Sector Erase Time Typ = 0.5; max = 3.5 Unit = sec regards Andreas Bie?mann ^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] Flash Erase and Write timeout for S29GL512P 2010-05-25 8:31 ` prakash bedge 2010-05-25 8:54 ` Andreas Bießmann @ 2010-05-25 11:41 ` Wolfgang Denk 2010-05-25 12:53 ` prakash bedge 1 sibling, 1 reply; 6+ messages in thread From: Wolfgang Denk @ 2010-05-25 11:41 UTC (permalink / raw) To: u-boot Dear prakash bedge, In message <AANLkTilsrQ2jt8A2d9Lczd1uJHRa_3BcofQOjphinnyT@mail.gmail.com> you wrote: > > >> 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. The data sheet "S29GL-P MirrorBit? Flash Family" (see http://www.spansion.com/Support/Datasheets/S29GL-P_00_A12_e.pdf) reads in "Table 11.8 Erase And Programming Performance" (page 67): Parameter Typ Max Unit Comments Sector Erase Time 0.5 3.5 sec So the 0.5 seconds you are referring to is the "Typical program and erase times assume the following conditions: 25?C, 3.6 V VCC, 10,000 cycles, checkerboard pattern." The 3.5 seconds I listed was " Under worst case conditions of -40?C, VCC = 3.0 V, 100,000 cycles." Obviously it is necessary to adjust this timeout for worst case conditions. > What values I should put in my config file? > #define CONFIG_SYS_FLASH_ERASE_TOUT ?? /* Timeout for Flash Erase (in > ms) */ I would use 5000 here (i. e. 5 seconds, which is 3.5 plus some safety margin). > #define CONFIG_SYS_FLASH_WRITE_TOUT ?? /* Timeout for Flash Write (in ms) */ Here we have to calculate the timing based on the Write Buffer Programming Time. > I seen canyonlands.h and I think it is also 64 MB flash. ... > #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) */ So - did you try using these values? And did they not work for you? > But I myself is not geting satsifed why I should use these values since they > are not as per the flash datasheet. They are timeouts, and they are most ptobably defensively set. I don't understand your problem. Keep in mind that these timeouts don't play any role as long as the chip is working normally - they apply only in the error case. And if your flash chip cannot be erased or programmed any more it does not really matter if you find out after 3.5 or after 5 or even after 12 seconds - you will lose much more time after that ;-) 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 Death. Destruction. Disease. Horror. That's what war is all about. That's what makes it a thing to be avoided. -- Kirk, "A Taste of Armageddon", stardate 3193.0 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] Flash Erase and Write timeout for S29GL512P 2010-05-25 11:41 ` Wolfgang Denk @ 2010-05-25 12:53 ` prakash bedge 0 siblings, 0 replies; 6+ messages in thread From: prakash bedge @ 2010-05-25 12:53 UTC (permalink / raw) To: u-boot Hi, I got the answers. It was my negligence to miss the table. Sorry for taking your time.:) Thanks & regards, Prakash Bedge On Tue, May 25, 2010 at 5:11 PM, Wolfgang Denk <wd@denx.de> wrote: > Dear prakash bedge, > > In message <AANLkTilsrQ2jt8A2d9Lczd1uJHRa_3BcofQOjphinnyT@mail.gmail.com> > you wrote: > > > > >> 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. > > The data sheet "S29GL-P MirrorBit? Flash Family" (see > http://www.spansion.com/Support/Datasheets/S29GL-P_00_A12_e.pdf) reads > in "Table 11.8 Erase And Programming Performance" (page 67): > > Parameter Typ Max Unit Comments > Sector Erase Time 0.5 3.5 sec > > So the 0.5 seconds you are referring to is the "Typical program and > erase times assume the following conditions: 25?C, 3.6 V VCC, 10,000 > cycles, checkerboard pattern." > > The 3.5 seconds I listed was " Under worst case conditions of -40?C, > VCC = 3.0 V, 100,000 cycles." > > Obviously it is necessary to adjust this timeout for worst case > conditions. > > > What values I should put in my config file? > > #define CONFIG_SYS_FLASH_ERASE_TOUT ?? /* Timeout for Flash Erase (in > > ms) */ > > I would use 5000 here (i. e. 5 seconds, which is 3.5 plus some safety > margin). > > > #define CONFIG_SYS_FLASH_WRITE_TOUT ?? /* Timeout for Flash Write (in ms) > */ > > Here we have to calculate the timing based on the Write Buffer > Programming Time. > > > I seen canyonlands.h and I think it is also 64 MB flash. > ... > > #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) */ > > So - did you try using these values? And did they not work for you? > > > But I myself is not geting satsifed why I should use these values since > they > > are not as per the flash datasheet. > > They are timeouts, and they are most ptobably defensively set. > > > I don't understand your problem. Keep in mind that these timeouts > don't play any role as long as the chip is working normally - they > apply only in the error case. And if your flash chip cannot be erased > or programmed any more it does not really matter if you find out > after 3.5 or after 5 or even after 12 seconds - you will lose much > more time after that ;-) > > 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 > Death. Destruction. Disease. Horror. That's what war is all about. > That's what makes it a thing to be avoided. > -- Kirk, "A Taste of Armageddon", stardate 3193.0 > ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-05-25 12:53 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-05-21 5:17 [U-Boot] Flash Erase and Write timeout for S29GL512P prakash bedge 2010-05-21 7:16 ` Wolfgang Denk 2010-05-25 8:31 ` prakash bedge 2010-05-25 8:54 ` Andreas Bießmann 2010-05-25 11:41 ` Wolfgang Denk 2010-05-25 12:53 ` prakash bedge
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox