From: Wolfgang Denk Date: Tue, 08 May 2007 20:59:06 +0200 Subject: [U-Boot-Users] Flash Erase/Write error in uboot In-Reply-To: Your message of "Tue, 08 May 2007 14:36:40 EDT." <1178649400.8335.26.camel@localhost> Message-ID: <20070508185906.B937D353A05@atlas.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de In message <1178649400.8335.26.camel@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