Enables or disables the read out protection.
FLASH_ReadProtection_Level : specifies the read
protection level. This parameter can be:
OB_RDP_Level_0 : No protection
OB_RDP_Level_1 : Read protection of the memory
OB_RDP_Level_2 : Chip protection
FLASH Status: The returned value can be:
FLASH_ERROR_PROGRAM, FLASH_ERROR_WRP,
FLASH_COMPLETE or FLASH_TIMEOUT.
To correctly run this function, the FLASH_OB_Unlock()
function must be called before.
Call the FLASH_OB_Lock() to disable the flash control
register access and the option bytes (recommended to protect
the FLASH memory against possible unwanted operation)
11.2.8.7 FLASH_OB_UserConfig
FLASH_Status FLASH_OB_UserConfig ( uint8_t OB_IWDG,
uint8_t OB_STOP, uint8_t OB_STDBY)
Programs the FLASH User Option Byte: IWDG_SW / RST_STOP
/ RST_STDBY.
OB_IWDG : Selects the IWDG mode This parameter can be
one of the following values:
OB_IWDG_SW : Software IWDG selected
OB_IWDG_HW : Hardware IWDG selected
OB_STOP : Reset event when entering STOP mode. This
parameter can be one of the following values:
OB_STOP_NoRST : No reset generated when entering
in STOP
OB_STOP_RST : Reset generated when entering in
STOP
OB_STDBY : Reset event when entering Standby mode.
This parameter can be one of the following values:
OB_STDBY_NoRST : No reset generated when
entering in STANDBY
OB_STDBY_RST : Reset generated when entering in
STANDBY
FLASH Status: The returned value can be:
FLASH_ERROR_PG, FLASH_ERROR_WRP,
FLASH_COMPLETE or FLASH_TIMEOUT.