Skip to main content
jeff.lee
Associate II
April 9, 2019
Question

erase the entire flash memory inside the main() function ???

  • April 9, 2019
  • 1 reply
  • 641 views

in my h/w, i cannot control boot0 pin to high level for dfuse demo program.

however, i find that

When the entire flash memory is erased, st32L4 chip automatically goes to enter usb dfu mode.

hence,

i want to know how to erase the entire flash memory inside the main() function.

please let me know it is possible or not

thanks a lot

This topic has been closed for replies.

1 reply

Tesla DeLorean
Guru
April 9, 2019

Review library code and reference manual

I would probably add code in Reset Handler, that copied itself to RAM and jump to it. The code would drive the flash peripheral registers to mass erase, then perform a software reset.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..