-
Notifications
You must be signed in to change notification settings - Fork 70
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
Unlocking and erasing protected flash on PY32 chips #36
Comments
In David's post he mentioned
I guess you are in the same situation, but the problem is that SOP8(and SOP16) package has no BOOT pin so you cannot use PuyaISP to reset chip. If JLink can still detect and connect to the chip, maybe you can use the init and exit steps to unlock and change the option bytes as described in this post |
Instead using PuyaISP everytime, I added a erase function triggered by special sequence of keys.
After |
I managed to brick few mcus after disabling the bootloader (OB_BOOT1_SRAM) while having a bug in the unlock sequence. Modify the linker script so everything is loaded into RAM: (Remove .txt extension) Run this code:
Compile and run, RDP will be cleared, forcing flash erase, and you'll recover your 11 cents back 😆 This will work in any BOOT1 mode (SYSTEM or SRAM), so it can be used to clear RDP without needing PuyaISP. |
Hi,
I am experimenting with flash protection on PY32 chips with the following program:
After power-cycling the PY32 chip (FY32F003 in SOP-8 package), I can no longer erase the chip using J-Link.
Is there a known method to
Unlock
andErase
the protected flash memory on PY32 chips?https://dzone.com/articles/unlocking-and-erasing-flash is a good read on this topic but I didn't find a method which works for PY32 chips yet.
Thanks for the help.
The text was updated successfully, but these errors were encountered: