2014-07-03 12:20 PM
We're writing a bootloader and found out that flash sectors 0-11 (lower bank) can be erased, but sectors 12-23 (upper bank) can't (by a program running from flash). The chip sets WRPERR bit in FLASH->SR register, which means Write protection error. But we have all the sectors NOT write protected.
Upper sectors can be erased by a STlink-v2 programmer (which is not exactly what we need - but it's a prove they CAN be erased).Writing new content into upper sectors works fine.Any help/idea will be appreciated. #stm32f4-erasing-flash-bank2014-07-03 05:10 PM
Probably because you're not programming the sector number properly, the numbering sequence has a hole in it. Bit 7 of FLASH_CR is effectively a BANK Select
01011 is Sector 11 (Bank 0, Sector 11) 10000 is Sector 12 (Bank 1, Sector 0) 0x081000002014-07-04 04:29 AM
I see! I didn't notice it in the manual.
I tried it and yes, this is it!!! Now it works!!! We are so happy!!!Thank you very much, you are simply God!!!Can I do smth for you?Bob2014-07-04 01:58 PM
Can I do smth for you?
Do you have an interesting dev boards?