Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error erasing sector 0
Actually I don't know if it is bug or configuration error or board problem on my side. but I get this error constantly on 2 differents boards... it's the Nucleo-G0B1RE.

The error is:

ERROR: erasing sector 2 failed! (code -102)

Sector number vary from time to time

I look into the STM32 scripts to see if timing might be too narrow... but all seem very generous in time allowed!

Someone have any idea ! 

NOTE: this is with EBlink
OK... Found it after trying a third Nucleo board.. power was intermittent when touching USB cable.. so after replacing it with a better cable, all trouble disappeared... all board started working perfectly... so first one was sensitive for signal, other 2 were sensitive on power and signal.
so it might help other in the future!!
Finally and unfortunately problem came back it's not the cable for the erase failed! Any hint?????
Could you check what the debug info is with the -v 7 switch?
Thank!! here it is

EBlink version 3.9-[2] by Gerard Zagema

Using EB_SCRIPT_PATH = C:\Program Files (x86)\EBlink\scripts

Interface : STlink
Interface USB# : 066BFF515754888367173939
Interface at 1:31 - <BUS>:<ADDR>
Interface type : STlink/V2.1
STlink Frmware : V2.J37.M27
STlink connect : Under reset
Target voltage : 3.23V
Interface speed: 4000KHz
Target selected: Cortex-M
Target detected: Cortex-M0 (r0p1)
HW breakpoints : 4
HW watchpoints : 2
Fault unwind : Active break (level 2)
STmicro device : 0x467
STmicro family : STM32G0B/0Cxx
Detected FLASH : 0x80000
Configured RAM : 0x20000
GDB listening ( @ 2331)
GDB connected
Flashing 13 sectors Erasing sector 0
ERROR: erasing sector 0 failed! [code -102]
Reset: system
That STLINK_SWD_AP_STICKY_ERROR is the error coming from the stlink probe. I think that one ore more bits are not toggling but that's a guess (perhaps physical lines). I did a search but that didn't show anything obvious.

The strange thing is that your fault it is not always there, could it be that your firmware is changing the debug port configuration somehow?

If you try with openOCD, do you have the same problems? If not, then I have to do some work.
To keep you inform !!
Open OCD was too long of a test to perform for the time I have on this project, Working for a big company and i'm pushing Embitz as the IDE of choice Smile. I did not wanted to give them the opportunity to scrap it... because like you know some people are resistant to change... 

I have try some setting change in Setting for EBLink, and remove Vector table relocation. but since i did that... no other error has happened in my last working day working on the project...

I don't do anything with vector in this early code, so i don't know why it does that. !!!! will continue to update if problem come back in future!!

Thank Gerald!
(06-04-2021, 02:23 PM)Aroyer Wrote: ... because like you know some people are resistant to change... 

 Yes, I know that very well. Often it ends with personal accusations to my adres.  Big Grin
 Strange guys those technicians.  Wink

Thanks for the update.
Ok problem came back... this is a new nucleo board with the small usb plug (like the phone B4 USB3)... STM32G0B1. i remove the built-in probe V2-1 and use a real probe instead.. i Will keep you inform !!
To recap, you have this problem with 3 different boards?

How often does it occur (once at every x) and can you isolate the problem in a small test project? I will see if I can find a nucleo board myself.

P.s. Can you confirm that the right memory map is used (GDB command "info mem")?

Forum Jump:

Users browsing this thread: 1 Guest(s)