FLASH_OB_DisableWRP() function
Disable the write protection of the desired bank1 or bank 2 sectors
Arguments
WRPSector
specifies the sector(s) to be write protected. This parameter can be one of the following values: @arg WRPSector: A value between OB_WRP_SECTOR_0 and OB_WRP_SECTOR_23 @arg OB_WRP_Sector_All
Banks
Disable write protection on all the sectors for the specific bank This parameter can be one of the following values: @arg FLASH_BANK_1: Bank1 to be erased @arg FLASH_BANK_2: Bank2 to be erased @arg FLASH_BANK_BOTH: Bank1 and Bank2 to be erased
Return value
HAL Status
Notes
When the memory read protection level is selected (RDP level = 1), it is not possible to program or erase the flash sector i if CortexM4 debug features are connected or boot code is executed in RAM, even if nWRPi = 1 Active value of nWRPi bits is inverted when PCROP mode is active (SPRMOD =1). BANK2 starts from OB_WRP_SECTOR_12