Peripheral Control and State functions

PKC Peripheral State functions. More...

Functions

hal_pkc_state_t hal_pkc_get_state (pkc_handle_t *p_pkc)
 Return the PKC handle state. More...
 
uint32_t hal_pkc_get_error (pkc_handle_t *p_pkc)
 Return the PKC error code. More...
 
void hal_pkc_set_timeout (pkc_handle_t *p_pkc, uint32_t timeout)
 Set the PKC internal process timeout value. More...
 
hal_status_t hal_pkc_suspend_reg (pkc_handle_t *p_pkc)
 Suspend some registers related to PKC configuration before sleep. More...
 
hal_status_t hal_pkc_resume_reg (pkc_handle_t *p_pkc)
 Restore some registers related to PKC configuration after sleep. This function must be used in conjunction with the hal_hmac_suspend_reg(). More...
 

Detailed Description

PKC Peripheral State functions.

  ==============================================================================
            ##### Peripheral Control and State functions #####
  ==============================================================================
    [..]
    This subsection provides functions allowing to :
      (+) Return the PKC handle state.
      (+) Return the PKC handle error code.
      (+) Set the timeout during internal process.

Function Documentation

◆ hal_pkc_get_error()

uint32_t hal_pkc_get_error ( pkc_handle_t p_pkc)

Return the PKC error code.

Parameters
[in]p_pkcPointer to a PKC handle which contains the configuration information for the specified PKC module.
Returns
PKC error code in bitmap format

◆ hal_pkc_get_state()

hal_pkc_state_t hal_pkc_get_state ( pkc_handle_t p_pkc)

Return the PKC handle state.

Parameters
[in]p_pkcPointer to a pkc_handle_t structure that contains the configuration information for the specified PKC.
Return values
HAL_PKC_STATE_RESETPeripheral not initialized.
HAL_PKC_STATE_READYPeripheral initialized and ready for use.
HAL_PKC_STATE_BUSYPeripheral in indirect mode and busy.
HAL_PKC_STATE_ERRORPeripheral in error.
HAL_PKC_STATE_TIMEOUTPeripheral in timeout.

◆ hal_pkc_resume_reg()

hal_status_t hal_pkc_resume_reg ( pkc_handle_t p_pkc)

Restore some registers related to PKC configuration after sleep. This function must be used in conjunction with the hal_hmac_suspend_reg().

Parameters
[in]p_pkcPointer to a PKC handle which contains the configuration information for the specified PKC module.
Return values
HAL_OKOperation is OK.
HAL_ERRORParameter error or operation not supported.
HAL_BUSYDriver is busy.
HAL_TIMEOUTTimeout occurred.

◆ hal_pkc_set_timeout()

void hal_pkc_set_timeout ( pkc_handle_t p_pkc,
uint32_t  timeout 
)

Set the PKC internal process timeout value.

Parameters
[in]p_pkcPointer to a PKC handle which contains the configuration information for the specified PKC module.
[in]timeoutInternal process timeout value.

◆ hal_pkc_suspend_reg()

hal_status_t hal_pkc_suspend_reg ( pkc_handle_t p_pkc)

Suspend some registers related to PKC configuration before sleep.

Parameters
[in]p_pkcPointer to a PKC handle which contains the configuration information for the specified PKC module.
Return values
HAL_OKOperation is OK.
HAL_ERRORParameter error or operation not supported.
HAL_BUSYDriver is busy.
HAL_TIMEOUTTimeout occurred.