Peripheral State and Errors Functions

PDM control functions. More...

Functions

hal_pdm_state_t hal_pdm_get_state (pdm_handle_t *p_pdm)
 Return the PDM handle state. More...
 
uint32_t hal_pdm_get_error (pdm_handle_t *p_pdm)
 Return the PDM error code. More...
 
hal_status_t hal_pdm_suspend_reg (pdm_handle_t *p_pdm)
 Suspend some registers related to PDM configuration before sleep. More...
 
hal_status_t hal_pdm_resume_reg (pdm_handle_t *p_pdm)
 Restore some registers related to PDM configuration after sleep. This function must be used in conjunction with the hal_adc_suspend_reg(). More...
 

Detailed Description

PDM control functions.

 ===============================================================================
                      ##### Peripheral State and Errors functions #####
 ===============================================================================
    [..]
    This subsection provides a set of functions allowing to control the PDM.
     (+) hal_pdm_get_state() API can be helpful to check in run-time the state of the PDM peripheral.
     (+) hal_pdm_get_error() check in run-time Errors occurring during communication.

Function Documentation

◆ hal_pdm_get_error()

uint32_t hal_pdm_get_error ( pdm_handle_t p_pdm)

Return the PDM error code.

Parameters
[in]p_pdmPointer to an PDM handle which contains the configuration information for the specified PDM module.
Returns
PDM error code in bitmap format

◆ hal_pdm_get_state()

hal_pdm_state_t hal_pdm_get_state ( pdm_handle_t p_pdm)

Return the PDM handle state.

Parameters
[in]p_pdmPointer to an PDM handle which contains the configuration information for the specified PDM module.
Return values
HAL_ADC_STATE_RESETPeripheral not initialized.
HAL_ADC_STATE_READYPeripheral initialized and ready for use.
HAL_ADC_STATE_BUSYAn internal process is ongoing.
HAL_ADC_STATE_ERRORPeripheral in error.

◆ hal_pdm_resume_reg()

hal_status_t hal_pdm_resume_reg ( pdm_handle_t p_pdm)

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

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

◆ hal_pdm_suspend_reg()

hal_status_t hal_pdm_suspend_reg ( pdm_handle_t p_pdm)

Suspend some registers related to PDM configuration before sleep.

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