[U-Boot-Users] Flash Erase/Write error in uboot

Wolfgang Denk wd at denx.de
Tue May 8 20:59:06 CEST 2007


In message <1178649400.8335.26.camel at localhost> you wrote:
>
> #define TIMEOUT 10000000
>                timeout = TIMEOUT;
...
>                       if (!timeout--) {
>                              printf("Operation Timed Out!!n");
>                              break;

You shouldreally use a delay based timeout here,not a counter based
one (where youwill never know how long exactly your timeout runs).

Add for example an "udelay (100);" (delay for 10 microseconds) and
adjust TIMEOUT to a reasonable value, say 100000 (10 seconds).

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,    CEO: 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
I will not say that women have no character;  rather, they have a new
one every day.                                               -- Heine




More information about the U-Boot mailing list