EEVblog® Electronics Community Forum
Electronics => Microcontrollers => Topic started by: rokspy 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.)
-
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.
-
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.
-
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??
-
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").