2024-12-02 04:55 PM
I'm using a STM32F103RCT6
Flash contains my own boot loader in pages 0 thru 10 and main application in 11 thru 61.
When the device is flashed in manufacturing, protection is set to prevent reading and writing via the jtag port.
I need to update the bootloader. I can do that for product in inventory, but product in the field, in customers hands, I wrote a specific application that contains the new BL image and can load THAT application via a special communication process I have in place.
All my testing on the bench was with a device that is unprotected.
I executed the process in the field and the product reported that erasing pages 0 thru 10 failed. I suspect the reason is the protection bits are set.
I've read PM0075 - sections that talk about "unprotection" - and I think it states that to unprotect a mass chip erase must take place. I can see that if trying to use a tool via jtag.
Can I (via my revised application) unprotect flash memory without causing a mass erase? The Application note - PM0075 is not real clear on that point.
I believe I was able to perform such a task on a STM32F427 in the past - hoping I can do the same with a STM32F103.
Can I unprotect, via internal executing code, unprotect flash so I can erase and then re-write pages 0 thru 10?
Thanks.