- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I am using a S29GL128P on my system. Is it safe if the polling (using lld_S29GLxxxP.c) might be interrupted by other tasks or any interruption ? (using RTEMS5)
Or is it something not to do at all ? I am asking because I'm facing a lot of trouble if I don't protect the polling call by a mutex (commands were already protected), but I can't understand what is going on.
It seems to works fine if protected. However this is really bad because erasing is long...
OK pseudo code:
critical_section_lock();
sector_erase_cmd();
poll(); // -> this is long
critical_section_unlock();
not working pseudo code:
critical_section_lock();
sector_erase_cmd();
critical_section_unlock();
poll(); // -> can be interrupted
Best regards,
Audry
Solved! Go to Solution.
- Labels:
-
Memory Nor Flash
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Audry,
I would like to inform you that if you want to perform any other operation on the flash (like read data from, or program data to, any sector not selected for erasure) while you have already initiated an erase operation, then you first need to send the Erase Suspend command. The Erase Suspend command allows the system to interrupt a sector erase operation and then read data from, or program data to, any sector not selected for erasure.
I would also like to inform you that Once the sector erase operation has begun, only the Erase Suspend command is valid. All other commands are ignored.
This information is present in the datasheet for S29GL128P available here under section '7.7.5 Erase Suspend/Erase Resume Commands' and '7.7.3 Sector Erase '
Does this answer your question?
Thank you and Regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Audry,
I would like to inform you that if you want to perform any other operation on the flash (like read data from, or program data to, any sector not selected for erasure) while you have already initiated an erase operation, then you first need to send the Erase Suspend command. The Erase Suspend command allows the system to interrupt a sector erase operation and then read data from, or program data to, any sector not selected for erasure.
I would also like to inform you that Once the sector erase operation has begun, only the Erase Suspend command is valid. All other commands are ignored.
This information is present in the datasheet for S29GL128P available here under section '7.7.5 Erase Suspend/Erase Resume Commands' and '7.7.3 Sector Erase '
Does this answer your question?
Thank you and Regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for the answer. Yes it helps to know that, I did not realize that I could not read data while erasing beeing performed.
However, all flash access are protected by a mutex, so it not possible for the software to try to read or doing anything while the erasing is not terminated.