- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I'm erasing flash (using S29GL064N NOR Flash, --> ref.: Table 17. Command Definitions (x16 Mode, BYTE# = VIH)).) continuously for testing purpose, but randomly (after hours or immediately or never comes) issuing suspend status after erase command (expected BUSY status).
In the below code, I'm reaching inside the IF condition where I have added breakpoint (showing SUSPEND status).
Please guide me what might be the reason which causing SUSPEND immediately after erase command.
1. Tried this with disabling interrupt and didn't saw this issue, but I need confirmation does interrupt is the cause for SUSPEND issue ?
2. Also confirm the command used in while loop (like suspend and resume) are causing this issue ?
FLASH_Command(PATTERN_555, (uint16_t) eCMD_UNLOCK_PART1);
FLASH_Command(PATTERN_2AA, (uint16_t) eCMD_UNLOCK_PART2);
FLASH_Command(PATTERN_555, (uint16_t) eCMD_ERASE_SETUP);
FLASH_Command(PATTERN_555, (uint16_t) eCMD_UNLOCK_PART1);
FLASH_Command(PATTERN_2AA, (uint16_t) CMD_UNLOCK_PART2);
*((uint16_t*)((uint32_t )pFLASH + addr)) = (uint16_t)CMD_ERASE_CONFIRM;
//Added 50us of delay, allow to complete timeout for erase command.
ret = lld_StatusGet(addr);
if (ret == DEV_SUSPEND)
{
//Breakpoint for test
//Code reach here, which is not expected. Expect only BUSY status.
}
ret = lld_StatusGet(addr) //Reading flash DQX status bit
While(ret == DEV_BUSY)
{
Flash_suspend_command()
//Processing internal commands
Flash_resume_command()
ret = lld_StatusGet()
}
Thanks,
Nitin
Solved! Go to Solution.
- Labels:
-
Memory Nor Flash
- Tags:
- SUSPEND_error
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @npatil15 ,
When the Erase Suspend command is written during the sector erase operation, the device requires a typical of 5 us (maximum of 20 us) to suspend the erase operation.
Can you please add a delay to compensate the timing requirements after the Erase suspend command?
Thanks,
Ronak
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @npatil15 ,
You have used two different function to get the Flash Status here. Can you please explain the reason for it? - Flash_StatusGet(addr) and lld_StatusGet().
Thanks,
Ronak
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry its typing mistake, I have corrected in the previous post. They are same functions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @npatil15 ,
Can you please add some more delay.
Also, can you please try to check the status before you perform the erase operation. As I guess it can be a case that already the erase command is suspended when you start your operation.
If so you can try to resume the erase and then give a delay till the erase is completed.
Thanks,
Ronak
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Ronak,
I have already tried to add check before and after erase, but it caught only after erase not before. So it is clear that the SUSPEND is causing after erase only.
1. So, if I get SUSPEND after erase command, is it valid or can be expected?
2. If I get SUSPEND after erase only, then how should I handle it, as per datasheet ?
Thanks,
Nitin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @npatil15 ,
When the Erase Suspend command is written during the sector erase operation, the device requires a typical of 5 us (maximum of 20 us) to suspend the erase operation.
Can you please add a delay to compensate the timing requirements after the Erase suspend command?
Thanks,
Ronak