Skip to content
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

provide how-to erase write locked devices #11

Open
diggit opened this issue Feb 11, 2023 · 1 comment
Open

provide how-to erase write locked devices #11

diggit opened this issue Feb 11, 2023 · 1 comment

Comments

@diggit
Copy link

diggit commented Feb 11, 2023

It's almost impossible to erase device with enabled write protection in bootloader, because you need to change option bytes, then do power cycle and then mass erase. Issues it, after power cycle, bootloader again re-locks write access and erasing is not possible.
The only solution was manual write of magic value into upper 8 bytes of RAM to prevent auto flash write lock and then doing mass erase.

@davidgfnet
Copy link
Owner

Just for clarification, do you refer to -DENABLE_WRITEPROT feature?
Have you checked out upgrade/README and the upgrade firmware? The idea is: you flash an upgrader app, then use it to disable the protection mecanism. Since you need a power cycle to unlock it for real (as you correctly mention), you can use the upgrade/client.exe to reset into "update mode", which essentially tells the bootloader not to lock the bootloader. During that time window, you can upgrade the bootloader.

Does that make sense? Of course if your bootloader is older than 1c4802 then the bootloader doesnt do the right thing and indeed, it re-locks the flash on reset.
Hope this helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants