From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jonathan Larmour To: Andreas Bürgel Cc: ecos-discuss@sources.redhat.com Subject: Re: [ECOS] timeout in flash_am29xxxxx.inl and SA1110 Date: Thu, 16 Aug 2001 06:56:00 -0000 Message-id: <3B7BD113.B11F5EFA@redhat.com> References: <3B7B8250.E9933B1F@genologic.de> X-SW-Source: 2001-08/msg00547.html Andreas Bürgel wrote: > > Hi folks, > > I'm using a custom SA1110 (206 MHz) board with four 29LV800B flash-chips > - two parallel, two serial - and eCos-CVS version from yesterday (you > know Jonathan ;). When starting the command "fis init -f" in redboot, > the flash-driver made it to erase the first two blocks and then hanged. > I found out that the timeout-value in "flash_erase()" at the following > location is to small. > > ... > // Then wait for erase completion. > if (FLASH_ERR_OK == res) { > timeout = 5000000; > while (true) { > state = *b_v; > if (FLASH_BlankValue == state) { > break; > } > ... > > I changed it to 10000000 and got all blocks erased (at least those of > the first two flash-chips, but that's another problem). Yes, we really need a "bogomip" calibration loop in eCos that can be used for simple timeouts like this. In the meantime, I'll double it like you suggest, although it'll go wrong when 400Mhz CPUs use it :-|. Jifl -- Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062 Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine