STM32H735xx HAL User Manual
Functions
Peripheral Control functions
OTFDEC Exported Functions

Peripheral control functions. More...

Functions

HAL_StatusTypeDef HAL_OTFDEC_RegionKeyLock (OTFDEC_HandleTypeDef *hotfdec, uint32_t RegionIndex)
 Lock region keys.
HAL_StatusTypeDef HAL_OTFDEC_RegionSetKey (OTFDEC_HandleTypeDef *hotfdec, uint32_t RegionIndex, uint32_t *pKey)
 Set region keys.
HAL_StatusTypeDef HAL_OTFDEC_RegionSetMode (OTFDEC_HandleTypeDef *hotfdec, uint32_t RegionIndex, uint32_t mode)
 Set region mode.
HAL_StatusTypeDef HAL_OTFDEC_RegionConfig (OTFDEC_HandleTypeDef *hotfdec, uint32_t RegionIndex, OTFDEC_RegionConfigTypeDef *Config, uint32_t lock)
 Set region configuration.
uint32_t HAL_OTFDEC_KeyCRCComputation (uint32_t *pKey)
 Compute Key CRC.
HAL_StatusTypeDef HAL_OTFDEC_RegionEnable (OTFDEC_HandleTypeDef *hotfdec, uint32_t RegionIndex)
 Enable region deciphering.
HAL_StatusTypeDef HAL_OTFDEC_RegionDisable (OTFDEC_HandleTypeDef *hotfdec, uint32_t RegionIndex)
 Disable region deciphering.

Detailed Description

Peripheral control functions.

  ==============================================================================
                      ##### Peripheral Control functions #####
  ==============================================================================
    [..]
    This subsection permits to configure the OTFDEC peripheral


Function Documentation

uint32_t HAL_OTFDEC_KeyCRCComputation ( uint32_t *  pKey)

Compute Key CRC.

Parameters:
pKeypointer at set of keys
Return values:
CRCvalue

Definition at line 757 of file stm32h7xx_hal_otfdec.c.

Referenced by HAL_OTFDEC_RegionSetKey().

HAL_StatusTypeDef HAL_OTFDEC_RegionConfig ( OTFDEC_HandleTypeDef hotfdec,
uint32_t  RegionIndex,
OTFDEC_RegionConfigTypeDef Config,
uint32_t  lock 
)

Set region configuration.

Note:
Region deciphering is enabled at the end of this function
Parameters:
hotfdecpointer to an OTFDEC_HandleTypeDef structure that contains the configuration information for OTFDEC module
RegionIndexindex of region that is configured
Configpointer on structure containing the region configuration parameters
lockconfiguration lock enable or disable parameter This parameter can be one of the following values:
Return values:
HALstate

Definition at line 696 of file stm32h7xx_hal_otfdec.c.

References assert_param, OTFDEC_RegionConfigTypeDef::EndAddress, __OTFDEC_HandleTypeDef::Instance, IS_OTFDEC_REGION_CONFIG_LOCK, IS_OTFDEC_REGIONINDEX, OTFDEC_RegionConfigTypeDef::Nonce, OTFDEC_REG_CONFIGR_LOCK_ENABLE, OTFDEC_REG_CONFIGR_REG_ENABLE, OTFDEC_RegionConfigTypeDef::StartAddress, and OTFDEC_RegionConfigTypeDef::Version.

HAL_StatusTypeDef HAL_OTFDEC_RegionDisable ( OTFDEC_HandleTypeDef hotfdec,
uint32_t  RegionIndex 
)

Disable region deciphering.

Parameters:
hotfdecpointer to an OTFDEC_HandleTypeDef structure that contains the configuration information for OTFDEC module
RegionIndexindex of region the deciphering is disabled
Note:
An error is reported when the configuration is locked.
Return values:
HALstate

Definition at line 848 of file stm32h7xx_hal_otfdec.c.

References assert_param, __OTFDEC_HandleTypeDef::Instance, IS_OTFDEC_REGIONINDEX, OTFDEC_REG_CONFIGR_LOCK_ENABLE, and OTFDEC_REG_CONFIGR_REG_ENABLE.

HAL_StatusTypeDef HAL_OTFDEC_RegionEnable ( OTFDEC_HandleTypeDef hotfdec,
uint32_t  RegionIndex 
)

Enable region deciphering.

Parameters:
hotfdecpointer to an OTFDEC_HandleTypeDef structure that contains the configuration information for OTFDEC module
RegionIndexindex of region the deciphering is enabled
Note:
An error is reported when the configuration is locked.
Return values:
HALstate

Definition at line 807 of file stm32h7xx_hal_otfdec.c.

References assert_param, __OTFDEC_HandleTypeDef::Instance, IS_OTFDEC_REGIONINDEX, OTFDEC_REG_CONFIGR_LOCK_ENABLE, and OTFDEC_REG_CONFIGR_REG_ENABLE.

HAL_StatusTypeDef HAL_OTFDEC_RegionKeyLock ( OTFDEC_HandleTypeDef hotfdec,
uint32_t  RegionIndex 
)

Lock region keys.

Note:
Writes to this region KEYRx registers are ignored until next OTFDEC reset.
Parameters:
hotfdecpointer to an OTFDEC_HandleTypeDef structure that contains the configuration information for OTFDEC module
RegionIndexindex of region the keys of which are locked
Return values:
HALstate

Definition at line 550 of file stm32h7xx_hal_otfdec.c.

References assert_param, __OTFDEC_HandleTypeDef::Instance, and IS_OTFDEC_REGIONINDEX.

HAL_StatusTypeDef HAL_OTFDEC_RegionSetKey ( OTFDEC_HandleTypeDef hotfdec,
uint32_t  RegionIndex,
uint32_t *  pKey 
)

Set region keys.

Parameters:
hotfdecpointer to an OTFDEC_HandleTypeDef structure that contains the configuration information for OTFDEC module
RegionIndexindex of region the keys of which are set
pKeypointer at set of keys
Note:
The API reads the key CRC computed by the peripheral and compares it with that theoretically expected. An error is reported if they are different.
Return values:
HALstate

Definition at line 584 of file stm32h7xx_hal_otfdec.c.

References assert_param, HAL_OTFDEC_KeyCRCComputation(), HAL_OTFDEC_RegionGetKeyCRC(), __OTFDEC_HandleTypeDef::Instance, and IS_OTFDEC_REGIONINDEX.

HAL_StatusTypeDef HAL_OTFDEC_RegionSetMode ( OTFDEC_HandleTypeDef hotfdec,
uint32_t  RegionIndex,
uint32_t  mode 
)

Set region mode.

Parameters:
hotfdecpointer to an OTFDEC_HandleTypeDef structure that contains the configuration information for OTFDEC module
RegionIndexindex of region the mode of which is set
modeThis parameter can be only:
Return values:
HALstate

Definition at line 657 of file stm32h7xx_hal_otfdec.c.

References assert_param, __OTFDEC_HandleTypeDef::Instance, IS_OTFDEC_REGION_OPERATING_MODE, and IS_OTFDEC_REGIONINDEX.