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.
Fork of TUKS-COURSE-TIMER by
Functions | |
HAL_StatusTypeDef | FLASH_WaitForLastOperation (uint32_t Timeout) |
Wait for a FLASH operation to complete. | |
void | FLASH_PageErase (uint32_t Page, uint32_t Banks) |
Erase the specified FLASH memory page. | |
static void | FLASH_MassErase (uint32_t Banks) |
Mass erase of FLASH memory. | |
void | FLASH_FlushCaches (void) |
Flush the instruction and data caches. | |
static HAL_StatusTypeDef | FLASH_OB_WRPConfig (uint32_t WRPArea, uint32_t WRPStartOffset, uint32_t WRDPEndOffset) |
Configure the write protection of the desired pages. | |
static HAL_StatusTypeDef | FLASH_OB_RDPConfig (uint32_t RDPLevel) |
Set the read protection level. | |
static HAL_StatusTypeDef | FLASH_OB_UserConfig (uint32_t UserType, uint32_t UserConfig) |
Program the FLASH User Option Byte. | |
static HAL_StatusTypeDef | FLASH_OB_PCROPConfig (uint32_t PCROPConfig, uint32_t PCROPStartAddr, uint32_t PCROPEndAddr) |
Configure the Proprietary code readout protection of the desired addresses. | |
static void | FLASH_OB_GetWRP (uint32_t WRPArea, uint32_t *WRPStartOffset, uint32_t *WRDPEndOffset) |
Return the FLASH Write Protection Option Bytes value. | |
static uint32_t | FLASH_OB_GetRDP (void) |
Return the FLASH Read Protection level. | |
static uint32_t | FLASH_OB_GetUser (void) |
Return the FLASH User Option Byte value. | |
static void | FLASH_OB_GetPCROP (uint32_t *PCROPConfig, uint32_t *PCROPStartAddr, uint32_t *PCROPEndAddr) |
Return the FLASH Write Protection Option Bytes value. |
Function Documentation
void FLASH_FlushCaches | ( | void | ) |
Flush the instruction and data caches.
- Return values:
-
None
Definition at line 430 of file stm32l4xx_hal_flash_ex.c.
static void FLASH_MassErase | ( | uint32_t | Banks ) | [static] |
Mass erase of FLASH memory.
- Parameters:
-
Banks,: Banks to be erased This parameter can be one of the following values: - FLASH_BANK_1: Bank1 to be erased
- FLASH_BANK_2: Bank2 to be erased
- FLASH_BANK_BOTH: Bank1 and Bank2 to be erased
- Return values:
-
None
Definition at line 370 of file stm32l4xx_hal_flash_ex.c.
static void FLASH_OB_GetPCROP | ( | uint32_t * | PCROPConfig, |
uint32_t * | PCROPStartAddr, | ||
uint32_t * | PCROPEndAddr | ||
) | [static] |
Return the FLASH Write Protection Option Bytes value.
- Parameters:
-
PCROPConfig [inout]: specifies the configuration (Bank to be configured and PCROP_RDP option). This parameter must be a combination of FLASH_BANK_1 or FLASH_BANK_2 with OB_PCROP_RDP_NOT_ERASE or OB_PCROP_RDP_ERASE PCROPStartAddr [out]: specifies the address where to copied the start address of the Proprietary code readout protection PCROPEndAddr [out]: specifies the address where to copied the end address of the Proprietary code readout protection
- Return values:
-
None
Definition at line 974 of file stm32l4xx_hal_flash_ex.c.
static uint32_t FLASH_OB_GetRDP | ( | void | ) | [static] |
Return the FLASH Read Protection level.
- Return values:
-
FLASH ReadOut Protection Status: This return value can be one of the following values: - OB_RDP_LEVEL_0: No protection
- OB_RDP_LEVEL_1: Read protection of the memory
- OB_RDP_LEVEL_2: Full chip protection
Definition at line 926 of file stm32l4xx_hal_flash_ex.c.
static uint32_t FLASH_OB_GetUser | ( | void | ) | [static] |
Return the FLASH User Option Byte value.
- Return values:
-
The FLASH User Option Bytes values: For STM32L47x/STM32L48x devices : BOR_LEV(Bit8-10), nRST_STOP(Bit12), nRST_STDBY(Bit13), nRST_SHDW(Bit14), IWDG_SW(Bit16), IWDG_STOP(Bit17), IWDG_STDBY(Bit18), WWDG_SW(Bit19), BFB2(Bit20), DUALBANK(Bit21), nBOOT1(Bit23), SRAM2_PE(Bit24) and SRAM2_RST(Bit25). For STM32L43x/STM32L44x devices : BOR_LEV(Bit8-10), nRST_STOP(Bit12), nRST_STDBY(Bit13), nRST_SHDW(Bit14), IWDG_SW(Bit16), IWDG_STOP(Bit17), IWDG_STDBY(Bit18), WWDG_SW(Bit19), nBOOT1(Bit23), SRAM2_PE(Bit24), SRAM2_RST(Bit25), nSWBOOT0(Bit26) and nBOOT0(Bit27).
Definition at line 951 of file stm32l4xx_hal_flash_ex.c.
static void FLASH_OB_GetWRP | ( | uint32_t | WRPArea, |
uint32_t * | WRPStartOffset, | ||
uint32_t * | WRDPEndOffset | ||
) | [static] |
Return the FLASH Write Protection Option Bytes value.
- Parameters:
-
[in] WRPArea,: specifies the area to be returned. This parameter can be one of the following values: - OB_WRPAREA_BANK1_AREAA: Flash Bank 1 Area A
- OB_WRPAREA_BANK1_AREAB: Flash Bank 1 Area B
- OB_WRPAREA_BANK2_AREAA: Flash Bank 2 Area A (don't apply to STM32L43x/STM32L44x devices)
- OB_WRPAREA_BANK2_AREAB: Flash Bank 2 Area B (don't apply to STM32L43x/STM32L44x devices)
[out] WRPStartOffset,: specifies the address where to copied the start page of the write protected area [out] WRDPEndOffset,: specifies the address where to copied the end page of the write protected area
- Return values:
-
None
Definition at line 888 of file stm32l4xx_hal_flash_ex.c.
static HAL_StatusTypeDef FLASH_OB_PCROPConfig | ( | uint32_t | PCROPConfig, |
uint32_t | PCROPStartAddr, | ||
uint32_t | PCROPEndAddr | ||
) | [static] |
Configure the Proprietary code readout protection of the desired addresses.
- Note:
- To configure the PCROP options, the option lock bit OPTLOCK must be cleared with the call of the HAL_FLASH_OB_Unlock() function.
- To validate the PCROP options, the option bytes must be reloaded through the call of the HAL_FLASH_OB_Launch() function.
- Parameters:
-
PCROPConfig,: specifies the configuration (Bank to be configured and PCROP_RDP option). This parameter must be a combination of FLASH_BANK_1 or FLASH_BANK_2 with OB_PCROP_RDP_NOT_ERASE or OB_PCROP_RDP_ERASE PCROPStartAddr,: specifies the start address of the Proprietary code readout protection This parameter can be an address between begin and end of the bank PCROPEndAddr,: specifies the end address of the Proprietary code readout protection This parameter can be an address between PCROPStartAddr and end of the bank
- Return values:
-
HAL Status
Definition at line 799 of file stm32l4xx_hal_flash_ex.c.
static HAL_StatusTypeDef FLASH_OB_RDPConfig | ( | uint32_t | RDPLevel ) | [static] |
Set the read protection level.
- Note:
- To configure the RDP level, the option lock bit OPTLOCK must be cleared with the call of the HAL_FLASH_OB_Unlock() function.
- To validate the RDP level, the option bytes must be reloaded through the call of the HAL_FLASH_OB_Launch() function.
- !!! Warning : When enabling OB_RDP level 2 it's no more possible to go back to level 1 or 0 !!!
- Parameters:
-
RDPLevel,: 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
- OB_RDP_LEVEL_2: Full chip protection
- Return values:
-
HAL status
Definition at line 551 of file stm32l4xx_hal_flash_ex.c.
static HAL_StatusTypeDef FLASH_OB_UserConfig | ( | uint32_t | UserType, |
uint32_t | UserConfig | ||
) | [static] |
Program the FLASH User Option Byte.
- Note:
- To configure the user option bytes, the option lock bit OPTLOCK must be cleared with the call of the HAL_FLASH_OB_Unlock() function.
- To validate the user option bytes, the option bytes must be reloaded through the call of the HAL_FLASH_OB_Launch() function.
- Parameters:
-
UserType,: The FLASH User Option Bytes to be modified UserConfig,: The FLASH User Option Bytes values: BOR_LEV(Bit8-10), nRST_STOP(Bit12), nRST_STDBY(Bit13), IWDG_SW(Bit16), IWDG_STOP(Bit17), IWDG_STDBY(Bit18), WWDG_SW(Bit19), BFB2(Bit20), DUALBANK(Bit21), nBOOT1(Bit23), SRAM2_PE(Bit24) and SRAM2_RST(Bit25).
- Return values:
-
HAL status
Definition at line 595 of file stm32l4xx_hal_flash_ex.c.
static HAL_StatusTypeDef FLASH_OB_WRPConfig | ( | uint32_t | WRPArea, |
uint32_t | WRPStartOffset, | ||
uint32_t | WRDPEndOffset | ||
) | [static] |
Configure the write protection of the desired pages.
- Note:
- When the memory read protection level is selected (RDP level = 1), it is not possible to program or erase Flash memory if the CPU debug features are connected (JTAG or single wire) or boot code is being executed from RAM or System flash, even if WRP is not activated.
- To configure the WRP options, the option lock bit OPTLOCK must be cleared with the call of the HAL_FLASH_OB_Unlock() function.
- To validate the WRP options, the option bytes must be reloaded through the call of the HAL_FLASH_OB_Launch() function.
- Parameters:
-
WRPArea,: specifies the area to be configured. This parameter can be one of the following values: - OB_WRPAREA_BANK1_AREAA: Flash Bank 1 Area A
- OB_WRPAREA_BANK1_AREAB: Flash Bank 1 Area B
- OB_WRPAREA_BANK2_AREAA: Flash Bank 2 Area A (don't apply for STM32L43x/STM32L44x devices)
- OB_WRPAREA_BANK2_AREAB: Flash Bank 2 Area B (don't apply for STM32L43x/STM32L44x devices)
WRPStartOffset,: specifies the start page of the write protected area This parameter can be page number between 0 and (max number of pages in the bank - 1) WRDPEndOffset,: specifies the end page of the write protected area This parameter can be page number between WRPStartOffset and (max number of pages in the bank - 1)
- Return values:
-
HAL Status
Definition at line 482 of file stm32l4xx_hal_flash_ex.c.
void FLASH_PageErase | ( | uint32_t | Page, |
uint32_t | Banks | ||
) |
Erase the specified FLASH memory page.
- Parameters:
-
Page,: FLASH page to erase This parameter must be a value between 0 and (max number of pages in the bank - 1) Banks,: Bank(s) where the page will be erased This parameter can be one or a combination of the following values: - FLASH_BANK_1: Page in bank 1 to be erased
- FLASH_BANK_2: Page in bank 2 to be erased
- Return values:
-
None
Definition at line 403 of file stm32l4xx_hal_flash_ex.c.
HAL_StatusTypeDef FLASH_WaitForLastOperation | ( | uint32_t | Timeout ) |
Wait for a FLASH operation to complete.
- Parameters:
-
Timeout,: maximum flash operation timeout
- Return values:
-
HAL_StatusTypeDef HAL Status
Definition at line 608 of file stm32l4xx_hal_flash.c.
Generated on Tue Jul 12 2022 17:38:53 by
