rusEFI
The most advanced open source ECU
Modules | Functions

FLASH HAL Extension module driver. More...

Collaboration diagram for FLASHEx:

Modules

 FLASHEx Exported Functions
 
 FLASH Private Functions
 
 FLASH Private Constants
 
 FLASHEx_Private_Variables
 

Functions

static void FLASH_OB_OTP_LockConfig (uint32_t OTP_Block)
 Configure the OTP Block Lock. More...
 
static uint32_t FLASH_OB_OTP_GetLock (void)
 Get the OTP Block Lock. More...
 
static void FLASH_OB_SharedRAM_Config (uint32_t SharedRamConfig)
 Configure the TCM / AXI Shared RAM. More...
 
static uint32_t FLASH_OB_SharedRAM_GetConfig (void)
 Get the TCM / AXI Shared RAM configurtion. More...
 
static void FLASH_OB_CPUFreq_BoostConfig (uint32_t FreqBoost)
 Configure the CPU Frequency Boost. More...
 
static uint32_t FLASH_OB_CPUFreq_GetBoost (void)
 Get the CPU Frequency Boost state. More...
 

Detailed Description

FLASH HAL Extension module driver.

Function Documentation

◆ FLASH_OB_CPUFreq_BoostConfig()

static void FLASH_OB_CPUFreq_BoostConfig ( uint32_t  FreqBoost)
static

Configure the CPU Frequency Boost.

Parameters
FreqBoostspecifies the CPU Frequency Boost state. This parameter can be a value of FLASHEx OB CPUFREQ BOOST
Return values
None

Definition at line 1839 of file stm32h7xx_hal_flash_ex.c.

1840 {
1841  /* Check the parameters */
1842  assert_param(IS_OB_USER_CPUFREQ_BOOST(FreqBoost));
1843 
1844  /* Configure the CPU Frequency Boost in the option bytes register */
1845  MODIFY_REG(FLASH->OPTSR2_PRG, FLASH_OPTSR2_CPUFREQ_BOOST, FreqBoost);
1846 }

◆ FLASH_OB_CPUFreq_GetBoost()

static uint32_t FLASH_OB_CPUFreq_GetBoost ( void  )
static

Get the CPU Frequency Boost state.

Return values
FreqBoostreturns the CPU Frequency Boost state. This return value can be a value of FLASHEx OB CPUFREQ BOOST

Definition at line 1853 of file stm32h7xx_hal_flash_ex.c.

1854 {
1855  return (FLASH->OPTSR2_CUR & FLASH_OPTSR2_CPUFREQ_BOOST);;
1856 }

◆ FLASH_OB_OTP_GetLock()

static uint32_t FLASH_OB_OTP_GetLock ( void  )
static

Get the OTP Block Lock.

Return values
OTP_Blockspecifies the OTP Block to lock. This return value can be a value of FLASH OTP blocks

Definition at line 1799 of file stm32h7xx_hal_flash_ex.c.

1800 {
1801  return (FLASH->OTPBL_CUR);
1802 }

◆ FLASH_OB_OTP_LockConfig()

static void FLASH_OB_OTP_LockConfig ( uint32_t  OTP_Block)
static

Configure the OTP Block Lock.

Parameters
OTP_Blockspecifies the OTP Block to lock. This parameter can be a value of FLASH OTP blocks
Return values
None

Definition at line 1785 of file stm32h7xx_hal_flash_ex.c.

1786 {
1787  /* Check the parameters */
1788  assert_param(IS_OTP_BLOCK(OTP_Block));
1789 
1790  /* Configure the OTP Block lock in the option bytes register */
1791  FLASH->OTPBL_PRG |= (OTP_Block & FLASH_OTPBL_LOCKBL);
1792 }

◆ FLASH_OB_SharedRAM_Config()

static void FLASH_OB_SharedRAM_Config ( uint32_t  SharedRamConfig)
static

Configure the TCM / AXI Shared RAM.

Parameters
SharedRamConfigspecifies the Shared RAM configuration. This parameter can be a value of FLASHEx OB TCM AXI SHARED
Return values
None

Definition at line 1812 of file stm32h7xx_hal_flash_ex.c.

1813 {
1814  /* Check the parameters */
1815  assert_param(IS_OB_USER_TCM_AXI_SHARED(SharedRamConfig));
1816 
1817  /* Configure the TCM / AXI Shared RAM in the option bytes register */
1818  MODIFY_REG(FLASH->OPTSR2_PRG, FLASH_OPTSR2_TCM_AXI_SHARED, SharedRamConfig);
1819 }

◆ FLASH_OB_SharedRAM_GetConfig()

static uint32_t FLASH_OB_SharedRAM_GetConfig ( void  )
static

Get the TCM / AXI Shared RAM configurtion.

Return values
SharedRamConfigreturns the TCM / AXI Shared RAM configuration. This return value can be a value of FLASHEx OB TCM AXI SHARED

Definition at line 1826 of file stm32h7xx_hal_flash_ex.c.

1827 {
1828  return (FLASH->OPTSR2_CUR & FLASH_OPTSR2_TCM_AXI_SHARED);;
1829 }