-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Added support for flashing second bank on STM32F10x_XL #592
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@texane could you also have a look and approve the review? |
Thank you! |
Wohoo! |
Pull Request stlink-org#592 (0498621) accidentally deleted the call to `set_flash_cr_pg`.
Fixes issue stlink-org#594. Pull request stlink-org#592 (0498621) accidentally deleted the call to `set_flash_cr_pg`.
@bmellstrom @skalidindi3 had some problems with F0 target after this patch. Could you test out latest master works with STM32F10x_XL on second bank? |
@xor-gate yes, retested successfully - it works. |
Some of the chips in the STM32F10x series has two separate flash banks. The first is always at most 512kB and the size of the second can be 0, 256 or 512 kB. For example, the STM32F103RF has 512 + 256 kB of flash memory. To be able to flash the second you need to use another set of registers instead of the usual SR/CR/AR registers. I made a patch for this that works for me(tm). Let me know if I should change anything; would be nice to get this included in upstream!