cancel
Showing results for 
Search instead for 
Did you mean: 

Erasing and writing flash by Bootloader fails

gfxfloro
Senior

Hi,

I am trying to use the ROM Bootloader on an STM32G071 Nucleo to upload code to the board. However erasing and writing to flash is not acknowledged by the G071. Other commands like reading from memory are acknowledged and return the correct data.

I verified that the commands are correct, by using them on an F446 Nucleo and on that I can successfully erase and write flash.

I also checked that readout protection is deactivated and the option bytes read 0xAA for Level 0 Protection.

Why is the G071 not responding to these bootloader commands?

4 REPLIES 4
JCase.1
Associate III

(pinging to be notified of answers, I'm having similar problems on STM32F423. good luck to both of us.)

The loader should enumerate the commands that are supported. Make sure you're working with the same subset, which is probably a bit different to the F4's with their large odd sized sectors.

Should be able to connect with STM32 Cube Programmer in UART/COM mode.

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

Just a blind guess... Does your code itself does some flash erasing or writing? Could it be that it sets FLASH_SR error flags? How are you entering the bootloader mode?

I might have to check this. In my case I actually do some flash writing before jumping to the bootloader address. Although I was under the impression that registers were cleared when the bootloader enters?