Skip to main content
mirkoshtylla
Associate II
January 14, 2022
Question

NUCLEO-G491RE Break at address "0xfffffffe" during FLASH erase

  • January 14, 2022
  • 2 replies
  • 2429 views

Hello everybody,

I'm having big troubles attempting to erase flash memory of my NUCLEO-G491RE. The message I'm getting after calling "HAL_FLASHEx_Erase" function is "Break at address "0xfffffffe" with no debug information available, or outside of program code".

If I debug and execute code from NUCLEO-G431 everything goes fine and I'm able to erase and write flash, if I copy-paste the same exact code on a project generated by the same .ioc file I get stuck to that message and the FLASH is not erased.

This topic has been closed for replies.

2 replies

TDK
January 14, 2022

You could be erasing the vector table or other flash code your program is using. See what interrupt it’s in, if any, by looking at VECTACTIVE.

"If you feel a post has answered your question, please click ""Accept as Solution""."
mirkoshtylla
Associate II
January 17, 2022

Hello @TDK​ , thank you very much for your precious help. Actually my Flash Code was mapped in Main Flash Memory and trying to erase single pages works fine. However I'm not succeding yet in writing onto the erased sectors. Should it be possible to write Flash just erasing the proper desired sector without having to erase it all? Do you suggest to keep my Program in Main Flash or to map it in an other area? Thank you!

TDK
January 17, 2022
Writing after erasing is the correct thing to do. Having user code in flash at 0x08000000 is typical.
"If you feel a post has answered your question, please click ""Accept as Solution""."
mirkoshtylla
Associate II
January 17, 2022

This is the structure of my flash management function, it is basically copy-pasted from the example provided by ST.

0693W00000JMFVsQAP.pngSo all the proper bits are set and managed by HAL libraries. This is perfectly identical (even the data to copy) to the ST example but is not writing anything while running the example itself works fine. I can't understand what is going on since they are identical...