cancel
Showing results for 
Search instead for 
Did you mean: 

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

jeff.lee
Associate III

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

1 REPLY 1

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
Up vote any posts that you find helpful, it shows what's working..