I haven't used this part but I'll put in my 2 cents...
If I'm reading the data sheets correctly, after the erase command you should continually read from the flash and examine bit 6 of the 16-bit data until this bit stops toggling?
BTW: It looks to me that I/O0-15 from the internal flash are connected to D0-15.
See
http://www.atmel.com/dyn/resources/prod_documents/DOC1411.PDFQuote:
TOGGLE BIT: In addition to Data Polling, the AT49BV/LV16X4A(T) provides another method
for determining the end of a program or erase cycle. During a program or erase operation,
successive attempts to read data from the same memory plane will result in I/O6 toggling
between one and zero. Once the program cycle has completed, I/O6 will stop toggling and
valid data will be read. Examining the toggle bit may begin at any time during a program cycle.
An additional toggle bit is available on I/O2, which can be used in conjunction with the toggle
bit that is available on I/O6. While a sector is erase suspended, a read or a program operation
from the suspended sector will result in the I/O2 bit toggling. Please see “Status Bit Table” on
page 21 for more details.
Also might want to take a peek at the Errata Sheet for this part:
http://www.atmel.com/dyn/resources/prod_documents/doc6076.pdfQuote:
1. Full Chip Erase Command May Not Fully Erase Flash
When using the Full Chip Erase Command to erase the Flash, the Flash may not
be fully erased. Some bytes may be different than 0xFF.
Workaround: Erase the Flash sector by sector with the Sector Erase
command.