Hi all,
I'm currently working on stm32f4xx controller, i need to protect the flash memory, so i used RDP as stated below, its worked and flash memory was not readable, but after that i was not able to re-program the flash using ULINK Pro or Ulink Me, can you please suggest best way to overcome this.
//HAL_FLASH_Unlock(); HAL_FLASH_OB_Unlock(); FLASH_RDP.RDPLevel = OB_RDP_LEVEL_1; FLASH_RDP.OptionType = OPTIONBYTE_RDP; HAL_FLASHEx_OBProgram(&FLASH_RDP); HAL_FLASH_OB_Launch(); HAL_FLASH_OB_Lock(); HAL_FLASH_Lock();
Thanks.
This is a 3 year old thread, perhaps start a new one, with a better defined question?
RDP locks down the device precluding external access to the FLASH
Doing a Mass Erase, or changing the Option bytes, in effect causing such an erase, is the way to recover the device but not the content.
If you selected RDP 2 it is basically GAME OVER
If you have code in your system to LOCK the device, add complementary code to UNLOCK it. Yes it will erase itself, but might be less annoying than using third party tools and methods to clear the settings, especially if access is limited to reduce the attack surface.