Flash Memory Erasure Issue on STM32 MCU
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-04-01 1:29 AM
My flash memory is getting erased in stm32 mcu after I power it off and on What could be the reason?
I'm using stm32l562vet6 on a custom PCB. Once I upload the program untill the power is on the program executes properly even if I disconnect the st-link keeping the power off. But once I turn it off and on the program is seemed to be erased.
Any help will be greatly appreciated!
Thank you in advance
with regards,
Giridhara Datta G
- Labels:
-
STM32L5 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-04-01 1:31 AM
hello,
How are you sure the program is erased? did you check the flash content with STM32CubeProgrammer for example?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-04-01 1:36 AM
It's physically erased or doesn't appear to run?
Show memory space with STM32 Cube Programmer.
Use tool to write.
Check code build address and SCB->VTOR settings.
Have Error_Handler() and HardFault_Handler() outputting actionable information.
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
‎2024-04-01 1:40 AM
No Sorry, I had not checked with the stm32cube programmer before.
Now I did, I compared the memory with the .elf file. It turns out the program is not getting erased but it is just not executing the program.
I'm just running the blink LED program to debug the error.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-04-01 2:19 AM
No I'm sorry It's not getting erased physically..
As you said the program is not starting after the power off and on.
And also as I observed now , the program is getting halted even I i press the reset button.
Here is the SCB->VTOR value:
Where
VECT_TAB_BASE_ADDRESS = (0x08000000UL)
and
VECT_TAB_OFFSET = 0x00000000U
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-04-01 2:36 AM
Check the boot configuration and boot pin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-04-01 2:45 AM
I tired to make it Zero and run again
but it's going back to HIGH state again
