STM32F0 series. Waiting for Page Write/Erase completion.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-12-20 9:20 AM
Hello all.
HAL uses function 'FLASH_WaitForLastOperation' for polling flash 'BUSY' flag, while performing flash page erase or flash write. How can this function be executed from flash if flash bus is blocked during flash erase? Is CPU simply staying in stalled state instead of polling BUSY flag while a page is being erased? Is it a bug in HAL or an intentional trick?
#waiting-for-page-write/erase-completionSolved! Go to Solution.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-12-20 11:07 AM
Not sure I'd class this as a bug. You get to choose how to use the library, ramifications of the FLASH stalling are systemic and not simply addressed by tagging one function.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-12-20 9:26 AM
It simply stalls, ie stuffs wait states. If you don't want the code to stall, you need to move the code and all its dependencies, vector tables, etc into RAM.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-12-20 9:57 AM
So, do I understand correctly that the use of '
FLASH_WaitForLastOperation' without moving it to RAM (e.g. using __ramfunc attribute if in iAR) is a bug?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-12-20 11:07 AM
Not sure I'd class this as a bug. You get to choose how to use the library, ramifications of the FLASH stalling are systemic and not simply addressed by tagging one function.
Up vote any posts that you find helpful, it shows what's working..
