I'm using the Texas Instruments TCM320C6748 DSP with the EMIF interface to communicate with the S29AL016J NOR flash.
The point is that when i erase a sector, then go into a while loop checking DQ7# until it goes high the sector gets properly erased.
But when i erase a sector, then do some other tasks with the DSP without checking the DQ7#...if (after a few seconds) i check the sector (by reading) i realize that some address are not properly erased and keeps the value previous to the erasing command. And even some times it seems to be properly erased but when writing there the DQ5# goes high saying the program operation have failed.
I can't find the problema and i'm quite confused, do you have any clue? Does it is mandatory to check DQ[7:0]# always after erasing?
If you need more information about whatever just tell me.
Thanks in advance,
Yes, you have to implement polling as per the datasheet to check the completion status of both erase and program operations. Please see datasheet for more information, https://www.cypress.com/file/217466/download .
Waiting until DQ7 becomes HIGH after an erase operation will make sure the internal erase operation is finished and all the bits in the erased sector are changed to 0xFF. If you do not check DQ7 bit and read data from a sector after an erase operation before completion, then you will get wrong data. So, it is recommended to check the completion status after every program and erase operations.
Regarding the error DQ5 = 1, are you trying to program a sector which is not properly erased? This error will happen if you are trying to change any bits from 0 to 1 using a program operation. Only an erase operation can change a bit from 0 to 1. Please see section "11.6 DQ5: Exceeded Timing Limits" on page 35 of the datasheet.
Please let us know if you need any clarifications.
Thanks and Regards,
Sorry SudheeshK_26, i didn't explain myself well...
I'm checking the completion status in both cases. The point is that if I start checking the completion status right after the erase command... after a short time I get a DQ7 = HIGH and then if I read the addresses of the erased sector I can see there is 0xFF, but if I execute the erase operation and instead of checking completion status right after that I start doing task foreign to the NOR. When (after a while) I check the DQ7 bit I get a HIGH but if I read the sector's addresses there are some addresses that remains with the value previous to the erase command.
Thanks and regards,
Are you erasing the same sector in both the cases below?
How many devices are showing this behavior? Are you observing it with all of the devices that you tested?
Also, please check the status of all other data polling bits (DQ7, DQ6, DQ5, DQ3 and DQ2) after erase operation to make sure that the erase completed successfully. Refer "Table 14. Write Operation Status" in datasheet page 35 for more details, https://www.cypress.com/file/217466/download .
Thanks and Regards,Sudheesh
Yes, i'm erasing the same sector in both cases and I also tried with few sectors to check if it was a problem of that particular sector (eventhough it doesn't have much sense).
I tested just in one device (because I don't have more).
I'm checking all the status bits and now I realize that instead of telling me the status is just giving me back the value of the address i'm reading as if I were reading after a reset command eventhough I'm not doing it. So if i check the status in some addresses it gives back all 1's but in other addresses if gives back the value of that address previous to the erase operation, it behave like if some addresses of a sector have been erased and others not and then it performs a reset to go back to read mode (But i'm not reseting the NOR so shouldn't behave like that).
Any clue on that?
Thanks and regards,
Thanks and Regards,