Author Topic: STM32 Dead Flash  (Read 2582 times)

0 Members and 1 Guest are viewing this topic.

Offline rokspyTopic starter

  • Contributor
  • Posts: 24
  • Country: lv
STM32 Dead Flash
« on: June 11, 2022, 02:31:28 pm »
Hey. I think I may have killed the flash of my STM32F401... The last normal signs of life was successful flashing of the device, and then when i pressed reset on the board and the board did not perform the function it was set to do. I tried flashing it again and the target was not found. Switched to ST-LINK Utility, which was able to salvage the device ID and the family name, which makes me think that the flash may have some signs of life. But after that it pops out a message that it can't read memory and that read out protection is enabled. The option bytes show memory protection of level 1, but I can't change it, which gives out error, that it can't set the option bytes. I have tried full erase, have tried booting from BOOT0 being HIGH, no success. Same program works on other board. Currently, I'm suspecting some direct-finger-lightning to the chip once i pressed the button, but assuming this and not exploring other possibilities may lead to killing more STM32, which I really, really don't prefer. Voltage levels on power pins all ok - VDD is 3.3V, core voltage stable 1.2V

So my main questions are: May there be additional things I could try to do to salvage the dead MCU or verify that it is truly dead? What could be the possible reasons for this kind of "dead response"? Can there be something fundamentally wrong with my code that bricks the device to this state?(have to note, that the program sources clock from external crystal and the debug functionality pins are not altered.)
« Last Edit: June 11, 2022, 03:04:34 pm by rokspy »
 

Offline AndyC_772

  • Super Contributor
  • ***
  • Posts: 4357
  • Country: gb
  • Professional design engineer
    • Cawte Engineering | Reliable Electronics
Re: STM32 Dead Flash
« Reply #1 on: June 11, 2022, 02:55:35 pm »
I've bricked STM32 chips before by setting the brown-out reset voltage to a level that's above the actual supply voltage used on the board.

Once that's done, the only way to recover is to power the chip from a higher voltage - somehow.

Offline DavidAlfa

  • Super Contributor
  • ***
  • Posts: 6572
  • Country: es
Re: STM32 Dead Flash
« Reply #2 on: June 11, 2022, 05:25:28 pm »
Probably you disabled the debugging interface. In the future, enable it or use nRST pin.
You can fix this by connecting nRST or manually: Hold reset button down, click connect on ST-LINK, release 1 second later.
Connecting in reset state gets rid of any wrong setting.
« Last Edit: June 11, 2022, 05:27:18 pm by DavidAlfa »
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 

Offline mdede439

  • Newbie
  • Posts: 5
  • Country: ca
Re: STM32 Dead Flash
« Reply #3 on: July 05, 2022, 03:38:27 am »
I have a similar issue where the ST-LinkV3 on my Nucleo Board seemed to fail after an upgrade using the STM32CubeIDE.  I cannot connect to it no matter what I do and the upgrade utility fails to recognize the firmware level so it won't re-flash it.  Any ideas?  Is there another way to flash code to it?  Maybe an older V2 code version and then I can upgrade it to V3??
 

Offline tellurium

  • Frequent Contributor
  • **
  • Posts: 304
  • Country: ua
Re: STM32 Dead Flash
« Reply #4 on: July 05, 2022, 09:42:27 am »
Happens to some of mine nucleo boards, after reflashing I've got a "unknown chip id" flash error.
The solution is: wire BOOT0 to VDD, reset the board and erase the flash (e.g. "st-flash erase").
Open source embedded network library https://mongoose.ws
TCP/IP stack + TLS1.3 + HTTP/WebSocket/MQTT in a single file
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf