-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
STM32F030F4P6: Can't flash because chip is write protected #705
Comments
Ok the issue was that the chip had the usual write protection enabled, I had to use a serial adapter and execute this other tool
To unlock it. So, maybe, this issue can be changed to "make st-flash give an appropriate warning on what's happening" because this was rather counter intuitive |
There are multiple issues closed and related to write protected microcontrollers which can be unprotected by mass erase and then flash. Not sure how we can detect this but it is a serious usability problem of the tools. |
my stm32f103 enable sw is ok now stm32CubeMX Create project this value default Disabled st-flash write bin file not write in |
Just my two cents: had the same situation, only for STM32F1. Managed to disable write protection using STLinkV2 (which is integrated in STM32F1DISCOVERY board) via OpenOCD command:
where |
@nit1995 See my post above. |
HI, |
@kahanchudasama Locking with OpenOCD can be done as shown here (in
Whether it's level 2 or no -- can't say for sure, but documentation for
I think it's better to read STM32 corresponding registers and check how exactly it was locked, after performing mentioned OpenOCD |
As @xor-gate mentioned this is a serious usability problem. |
IMHO documentation should be improved here. |
@Nightwalker-87 Yes it possible through writing of protection bits (part of option bytes). |
st-flash
I can't manage to flash one of these: https://www.ebay.com/itm/Mini-System-Development-Board-ARM-STM32-F030F4P6-CORTEX-M0-Core-32bit-48-MHz/331978736223?hash=item4d4b79825f:g:NncAAOSw-09aQKDm
It seems to --probe correctly, erase correctly, the stlink led flashes, but it does not flash the actual firmware, i tried to flash the same firmware with the same setup on an stm32f103c8t6 and it worked.
I'm using a cheap chinese stlink clone.
Output with --debug:
The text was updated successfully, but these errors were encountered: