Bus stall when writing/erasing flash on STM32H7
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-02-14 10:08 AM
Hello,
I am writing & erasing flash during operation, and this seems to cause a bus stall which prohibits all execution from flash during these operations.
AN4808 seems to indicate that if you use a dual-bank device you can avoid this by executing out of one bank and writing/erasing out of the other. I have tried this, and still seem to experience the bus stall even when running out of Bank 1 and doing write/erase out of Bank 2.
Does it make sense that this still causes a bus stall? Are there other ways around it?
I think perhaps the only solution is to copy my program to RAM and execute from there. Does anyone have examples of how to do this on an STM32 device?
Thank you!
- Labels:
-
Flash
-
STM32H7 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-02-14 10:34 AM
The stall will occur if any running code touches the flash array, so figure interrupt code, vector table, C library code, etc.
I've posted examples of moving code to RAM and running it, but some of this gets to be more involved than free support can cover.
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
‎2019-02-19 2:50 PM
Thank you, I understand that this may be more in depth than we can go into on a message forum.
I'm curious why this still doesn't work when running from Bank1 and writing/erasing to Bank2: do you have any insight on this? Is there a way to configure the flash so that the two banks work more independently? If so this would solve the problem without having to move execution into RAM.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-05-09 12:16 AM
Hi, I have exactly the same problem in blocking the bus. The whole application code is in bank 2 and any running code does't touches the bank 1. However, erasing any section from bank 1 still block the application. Have you deal with this problem ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-11-29 10:39 AM
Any updates on this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-11-29 10:48 AM
We didn't have much time to explore this problem and decided to switch Banks. Bus stall will NOT occur when running from Bank2 and writing/erasing to Bank1. Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-11-29 10:48 AM
We didn't have much time to explore this problem and decided to switch Banks. Bus stall will NOT occur when running from Bank1 and writing/erasing to Bank2. In our case bus stall will occurred when running from Bank2 and writing/erasing to Bank1. Regards
