Can't erase/write some Flash page in STM32G071RB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-01-14 1:10 AM
Hello,
I'm writing a Flash HAL driver in order to understand better how this CHIP work.
My functions at the moment work correctly but for some page I have an HardFault(During erase).
For example I can't erase/write the page 0 and others pages.
Please could you explain me why?
Thanks!
- Labels:
-
Flash
-
STM32G0 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-01-14 5:19 AM
Probably your code is running at page 0. Erasing it causes unexpected behavior.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-01-14 6:57 AM
Hello @TDK , thanks for your reply.
There is a way to verify that my code is running at page 0?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-01-14 7:01 AM
That's typically where the code starts. If you haven't changed any settings, that's where it is.
Your linker script should have a section called FLASH. If it's set to 0x08000000, code starts there, at page 0.
