Hal Drivers for L4
Dependents: BSP OneHopeOnePrayer FINAL_AUDIO_RECORD AudioDemo
Fork of STM32L4xx_HAL_Driver 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 422 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 366 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 924 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 881 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: 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).
Definition at line 901 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
- OB_WRPAREA_BANK2_AREAB: Flash Bank 2 Area B
[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 845 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 765 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 541 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 585 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
- OB_WRPAREA_BANK2_AREAB: Flash Bank 2 Area B
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 474 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 397 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 594 of file stm32l4xx_hal_flash.c.
Generated on Tue Jul 12 2022 11:35:30 by
