cancel
Showing results for 
Search instead for 
Did you mean: 

Using Boot0 jumper on Nucleo64 (STM32G474) / Flash Verification Error

Hayden McCabe
Associate II

Howdy,

I have a Nucleo-64 Board for the STM32G474RE chip that I’ve been working with successfully for a few weeks. I wrote a new version of my code, and when I tried to upload it to the chip, I started getting the error “Verification of flash failed at offset: 2048�? when using the command ‘st-flash write <path to code> 0x8000000�?

I tried uploading entirely different code via the same command, and I get the same error, with a different offset. I also get similar errors if I just try to erase the flash memory.

I thought maybe something about the code that’s currently running on the chip is preventing the upload from working, so I figured I could try booting into the boot loader by putting a jumper on the corresponding pins on the board (JP7). When restarting with the jumper attached, it still boots into my code and refuses to take new code. I checked the pins of JP7 with a multimeter, and found that the lower pin (pin 1), is connected to Boot0, but the other pin is not showing as 3.3V. I then tried connecting the Boot0 pin directly from there to a pin known to be 3.3V, and that still booted into my code. As I understand it, this booting option will run ST code built into the chip and will not run my code at all.

So, I have a few questions?

1) Is this the expected behavior for using this jumper and booting into the built-in boot loader?

2) Could using this boot mode be a way to get the flash write to work?

3) Is it possible that I won’t be able to write to flash any more on this chip? I’ve uploaded to this chip maybe 100 times; is it possible that I’ve used up my available writes?

1 REPLY 1
Igor Cesko
ST Employee

Hi Hayden McCabe,

Please check the option byte setting - probably you set some write protection here. To erase this write protection: please set ROP protection to Level1 and then back to Level 0. Device should be erased.

About BOOT0 pin: he is used to boot to embedded bootloader (if option bit nSWBOOT0 is set).

Regards

Igor