Wouldn't disabling the flash readout protection erase the custom boot loader that might be stored in the main flash memory?
I'm planning to write a custom boot loader for some reasons. For this the main flash memory will be partitioned into two sectors; the first one holding the custom boot loader and the 2nd one storing the user application. My biggest concern is the read out protection. Suppose I've a device with a custom boot loader along with read out protection enabled and now I want to update the firmware on the 2nd partition. Now as soon as I disable the read out protection, wouldn't it erase the whole flash memory erasing the custom boot loader along with it as stated in AN3155 (Under 3.12 Readout Unprotect Command section)? Is there any way I can set this mass erase only for the 2nd partition? So that the custom boot loader still resides in the 1st partition after this process?
