2.5. Flash Device Timeouts

Many operations on a flash device, particularly writing, take a long time to complete. It is useful to be able to specify a timeout on lengthy operations, so that the Eclipse Flash Programmer plug-in can abort an operation if it fails to complete. Specifying a timeout is especially useful when developing a new flash algorithm, because the algorithm may contain errors that cause it to hang.

You can specify a timeout for erase, read, write and verify operations by implementing the flashGetEraseBlockTimeout(), flashGetReadBlockTimeout(), flashGetWriteBlockTimeout() and flashGetVerifyBlockTimeout() methods respectively. The timeouts are per block and are specified in ms. There is also flashGetEraseDeviceTimeout() to specify the timeout for erasing the entire flash device. The easiest solution is to determine the timeouts from the datasheet of your flash device and to hard-code these values into your algorithm. Datasheets for flash devices often list typical and worst-case timeout values; you must use the worst-case timeout values to ensure that flash operations are not terminated prematurely.

Copyright © 2007. All rights reserved.DAI0190A
Non-Confidential