Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Functions | |
| static void | FLASH_MassErase (uint32_t Banks) |
| Full erase of FLASH memory Bank. | |
| static HAL_StatusTypeDef | FLASH_OB_EnableWRP (uint32_t WriteProtectPage) |
| Enable the write protection of the desired pages. | |
| static HAL_StatusTypeDef | FLASH_OB_DisableWRP (uint32_t WriteProtectPage) |
| Disable the write protection of the desired pages. | |
| static HAL_StatusTypeDef | FLASH_OB_RDP_LevelConfig (uint8_t ReadProtectLevel) |
| Set the read protection level. | |
| static HAL_StatusTypeDef | FLASH_OB_UserConfig (uint8_t UserConfig) |
| Program the FLASH User Option Byte. | |
| static HAL_StatusTypeDef | FLASH_OB_ProgramData (uint32_t Address, uint8_t Data) |
| Programs a half word at a specified Option Byte Data address. | |
| static uint32_t | FLASH_OB_GetWRP (void) |
| Return the FLASH Write Protection Option Bytes value. | |
| static uint32_t | FLASH_OB_GetRDP (void) |
| Returns the FLASH Read Protection level. | |
| static uint8_t | FLASH_OB_GetUser (void) |
| Return the FLASH User Option Byte value. | |
Function Documentation
| static void FLASH_MassErase | ( | uint32_t | Banks ) | [static] |
Full erase of FLASH memory Bank.
- Parameters:
-
Banks Banks to be erased This parameter can be one of the following values: - FLASH_BANK_1 Bank1 to be erased
- Return values:
-
None
Definition at line 612 of file stm32f1xx_hal_flash_ex.c.
| static HAL_StatusTypeDef FLASH_OB_DisableWRP | ( | uint32_t | WriteProtectPage ) | [static] |
Disable the write protection of the desired pages.
- Note:
- An option byte erase is done automatically in this function.
- When the memory read protection level is selected (RDP level = 1), it is not possible to program or erase the flash page i if debug features are connected or boot code is executed in RAM, even if nWRPi = 1
- Parameters:
-
WriteProtectPage specifies the page(s) to be write unprotected. The value of this parameter depend on device used within the same series
- Return values:
-
HAL status
Definition at line 780 of file stm32f1xx_hal_flash_ex.c.
| static HAL_StatusTypeDef FLASH_OB_EnableWRP | ( | uint32_t | WriteProtectPage ) | [static] |
Enable the write protection of the desired pages.
- Note:
- An option byte erase is done automatically in this function.
- When the memory read protection level is selected (RDP level = 1), it is not possible to program or erase the flash page i if debug features are connected or boot code is executed in RAM, even if nWRPi = 1
- Parameters:
-
WriteProtectPage specifies the page(s) to be write protected. The value of this parameter depend on device used within the same series
- Return values:
-
HAL status
Definition at line 657 of file stm32f1xx_hal_flash_ex.c.
| static uint32_t FLASH_OB_GetRDP | ( | void | ) | [static] |
Returns the FLASH Read Protection level.
- Return values:
-
FLASH ReadOut Protection Status: This parameter can be one of the following values: - OB_RDP_LEVEL_0 No protection
- OB_RDP_LEVEL_1 Read protection of the memory
Definition at line 1047 of file stm32f1xx_hal_flash_ex.c.
| static uint8_t FLASH_OB_GetUser | ( | void | ) | [static] |
Return the FLASH User Option Byte value.
- Return values:
-
The FLASH User Option Bytes values: FLASH_OBR_IWDG_SW(Bit2), FLASH_OBR_nRST_STOP(Bit3),FLASH_OBR_nRST_STDBY(Bit4). And FLASH_OBR_BFB2(Bit5) for STM32F101xG and STM32F103xG .
Definition at line 1073 of file stm32f1xx_hal_flash_ex.c.
| static uint32_t FLASH_OB_GetWRP | ( | void | ) | [static] |
Return the FLASH Write Protection Option Bytes value.
- Return values:
-
The FLASH Write Protection Option Bytes value
Definition at line 1034 of file stm32f1xx_hal_flash_ex.c.
| static HAL_StatusTypeDef FLASH_OB_ProgramData | ( | uint32_t | Address, |
| uint8_t | Data | ||
| ) | [static] |
Programs a half word at a specified Option Byte Data address.
- Note:
- The function HAL_FLASH_Unlock() should be called before to unlock the FLASH interface The function HAL_FLASH_OB_Unlock() should be called before to unlock the options bytes The function HAL_FLASH_OB_Launch() should be called after to force the reload of the options bytes (system reset will occur) Programming of the OB should be performed only after an erase (otherwise PGERR occurs)
- Parameters:
-
Address specifies the address to be programmed. This parameter can be 0x1FFFF804 or 0x1FFFF806. Data specifies the data to be programmed.
- Return values:
-
HAL status
Definition at line 1001 of file stm32f1xx_hal_flash_ex.c.
| static HAL_StatusTypeDef FLASH_OB_RDP_LevelConfig | ( | uint8_t | ReadProtectLevel ) | [static] |
Set the read protection level.
- Parameters:
-
ReadProtectLevel specifies the read protection level. This parameter can be one of the following values: - OB_RDP_LEVEL_0 No protection
- OB_RDP_LEVEL_1 Read protection of the memory
- Return values:
-
HAL status
Definition at line 899 of file stm32f1xx_hal_flash_ex.c.
| static HAL_StatusTypeDef FLASH_OB_UserConfig | ( | uint8_t | UserConfig ) | [static] |
Program the FLASH User Option Byte.
- Note:
- Programming of the OB should be performed only after an erase (otherwise PGERR occurs)
- Parameters:
-
UserConfig The FLASH User Option Bytes values FLASH_OBR_IWDG_SW(Bit2), FLASH_OBR_nRST_STOP(Bit3),FLASH_OBR_nRST_STDBY(Bit4). And BFBF2(Bit5) for STM32F101xG and STM32F103xG .
- Return values:
-
HAL status
Definition at line 950 of file stm32f1xx_hal_flash_ex.c.
Generated on Tue Jul 12 2022 15:37:32 by
1.7.2