STM32769I_EVAL BSP User Manual: STM32F769I_EVAL_AUDIO_Out Private Functions

STM32769I_EVAL BSP

STM32769I_EVAL BSP User Manual
STM32F769I_EVAL_AUDIO_Out Private Functions

Functions

uint8_t BSP_AUDIO_IN_Init (uint32_t AudioFreq, uint32_t BitRes, uint32_t ChnlNbr)
 Initialize wave recording.
uint8_t BSP_AUDIO_IN_AllocScratch (int32_t *pScratch, uint32_t size)
 Allocate channel buffer scratch.
uint8_t BSP_AUDIO_IN_Record (uint16_t *pbuf, uint32_t size)
 Start audio recording.
uint8_t BSP_AUDIO_IN_Stop (void)
 Stop audio recording.
uint8_t BSP_AUDIO_IN_Pause (void)
 Pause the audio file stream.
uint8_t BSP_AUDIO_IN_Resume (void)
 Resume the audio file stream.
void BSP_AUDIO_IN_DeInit (void)
 Deinit the audio IN peripherals.
void HAL_DFSDM_FilterRegConvCpltCallback (DFSDM_Filter_HandleTypeDef *hdfsdm_filter)
 Regular conversion complete callback.
void HAL_DFSDM_FilterRegConvHalfCpltCallback (DFSDM_Filter_HandleTypeDef *hdfsdm_filter)
 Half regular conversion complete callback.
__weak void BSP_AUDIO_IN_TransferComplete_CallBack (void)
 User callback when record buffer is filled.
__weak void BSP_AUDIO_IN_HalfTransfer_CallBack (void)
 Manages the DMA Half Transfer complete event.
__weak void BSP_AUDIO_IN_Error_Callback (void)
 Audio IN Error callback function.
__weak void BSP_AUDIO_IN_MspInit (void)
 Initialize BSP_AUDIO_IN MSP.
__weak void BSP_AUDIO_IN_MspDeInit (void)
 DeInitialize BSP_AUDIO_IN MSP.
__weak void BSP_AUDIO_IN_ClockConfig (DFSDM_Filter_HandleTypeDef *hdfsdm_filter, uint32_t AudioFreq, void *Params)
 Clock Config.
static uint8_t DFSDMx_Init (uint32_t AudioFreq)
 Initialize the Digital Filter for Sigma-Delta Modulators interface (DFSDM).
static uint8_t DFSDMx_DeInit (void)
 De-initialize the Digital Filter for Sigma-Delta Modulators interface (DFSDM).
static void DFSDMx_ChannelMspInit (void)
 Initialize the DFSDM channel MSP.
static void DFSDMx_ChannelMspDeInit (void)
 DeInitialize the DFSDM channel MSP.
static void DFSDMx_FilterMspInit (void)
 Initialize the DFSDM filter MSP.
static void DFSDMx_FilterMspDeInit (void)
 DeInitialize the DFSDM filter MSP.

Function Documentation

uint8_t BSP_AUDIO_IN_AllocScratch ( int32_t *  pScratch,
uint32_t  size 
)

Allocate channel buffer scratch.

Parameters:
pScratch: pointer to scratch tables.
sizeof scratch buffer

Definition at line 1048 of file stm32f769i_eval_audio.c.

References AUDIO_OK, DEFAULT_AUDIO_IN_CHANNEL_NBR, pScratchBuff, and ScratchSize.

__weak void BSP_AUDIO_IN_ClockConfig ( DFSDM_Filter_HandleTypeDef *  hdfsdm_filter,
uint32_t  AudioFreq,
void *  Params 
)

Clock Config.

Parameters:
hdfsdm_filter,:might be required to set audio peripheral predivider if any.
AudioFreq,:Audio frequency used to play the audio stream.
Params
Note:
This API is called by BSP_AUDIO_IN_Init() Being __weak it can be overwritten by the application
Return values:
None

Definition at line 1332 of file stm32f769i_eval_audio.c.

Referenced by BSP_AUDIO_IN_Init().

void BSP_AUDIO_IN_DeInit ( void  )

Deinit the audio IN peripherals.

Return values:
None

Definition at line 1166 of file stm32f769i_eval_audio.c.

References BSP_AUDIO_IN_MspDeInit(), and DFSDMx_DeInit().

__weak void BSP_AUDIO_IN_Error_Callback ( void  )

Audio IN Error callback function.

Return values:
None

Definition at line 1293 of file stm32f769i_eval_audio.c.

__weak void BSP_AUDIO_IN_HalfTransfer_CallBack ( void  )

Manages the DMA Half Transfer complete event.

Return values:
None

Definition at line 1282 of file stm32f769i_eval_audio.c.

Referenced by HAL_DFSDM_FilterRegConvCpltCallback(), and HAL_DFSDM_FilterRegConvHalfCpltCallback().

uint8_t BSP_AUDIO_IN_Init ( uint32_t  AudioFreq,
uint32_t  BitRes,
uint32_t  ChnlNbr 
)

Initialize wave recording.

Parameters:
AudioFreq,:Audio frequency to be configured for the DFSDM peripheral.
BitRes,:Audio frequency to be configured for the DFSDM peripheral.
ChnlNbr,:Audio frequency to be configured for the DFSDM peripheral.
Return values:
AUDIO_OKif correct communication, else wrong communication

Definition at line 1027 of file stm32f769i_eval_audio.c.

References AUDIO_OK, BSP_AUDIO_IN_ClockConfig(), BSP_AUDIO_IN_MspInit(), DFSDMx_Init(), and haudio_in_dfsdm_leftfilter.

__weak void BSP_AUDIO_IN_MspDeInit ( void  )

DeInitialize BSP_AUDIO_IN MSP.

Return values:
None

Definition at line 1315 of file stm32f769i_eval_audio.c.

References DFSDMx_ChannelMspDeInit(), and DFSDMx_FilterMspDeInit().

Referenced by BSP_AUDIO_IN_DeInit().

__weak void BSP_AUDIO_IN_MspInit ( void  )

Initialize BSP_AUDIO_IN MSP.

Return values:
None

Definition at line 1303 of file stm32f769i_eval_audio.c.

References DFSDMx_ChannelMspInit(), and DFSDMx_FilterMspInit().

Referenced by BSP_AUDIO_IN_Init().

uint8_t BSP_AUDIO_IN_Pause ( void  )

Pause the audio file stream.

Return values:
AUDIO_OKif correct communication, else wrong communication

Definition at line 1122 of file stm32f769i_eval_audio.c.

References AUDIO_ERROR, AUDIO_OK, haudio_in_dfsdm_leftfilter, and haudio_in_dfsdm_rightfilter.

uint8_t BSP_AUDIO_IN_Record ( uint16_t *  pbuf,
uint32_t  size 
)

Start audio recording.

Parameters:
pbuf,:Main buffer pointer for the recorded data storing
size,:Current size of the recorded buffer
Return values:
AUDIO_OKif correct communication, else wrong communication

Definition at line 1069 of file stm32f769i_eval_audio.c.

References AppBuffHalf, AppBuffTrigger, AUDIO_ERROR, AUDIO_OK, haudio_in_dfsdm_leftfilter, haudio_in_dfsdm_rightfilter, AUDIOIN_TypeDef::pRecBuf, pScratchBuff, AUDIOIN_TypeDef::RecSize, and ScratchSize.

uint8_t BSP_AUDIO_IN_Resume ( void  )

Resume the audio file stream.

Return values:
AUDIO_OKif correct communication, else wrong communication

Definition at line 1144 of file stm32f769i_eval_audio.c.

References AUDIO_ERROR, AUDIO_OK, haudio_in_dfsdm_leftfilter, haudio_in_dfsdm_rightfilter, pScratchBuff, and ScratchSize.

uint8_t BSP_AUDIO_IN_Stop ( void  )

Stop audio recording.

Return values:
AUDIO_OKif correct communication, else wrong communication

Definition at line 1097 of file stm32f769i_eval_audio.c.

References AppBuffHalf, AppBuffTrigger, AUDIO_ERROR, AUDIO_OK, haudio_in_dfsdm_leftfilter, and haudio_in_dfsdm_rightfilter.

User callback when record buffer is filled.

Return values:
None

Definition at line 1271 of file stm32f769i_eval_audio.c.

Referenced by HAL_DFSDM_FilterRegConvCpltCallback(), and HAL_DFSDM_FilterRegConvHalfCpltCallback().

static void DFSDMx_ChannelMspDeInit ( void  ) [static]

DeInitialize the DFSDM channel MSP.

Return values:
None

Definition at line 1547 of file stm32f769i_eval_audio.c.

References AUDIO_DFSDMx_CKOUT_DMIC_DATIN_GPIO_PORT, AUDIO_DFSDMx_CKOUT_PIN, and AUDIO_DFSDMx_DMIC_DATIN_PIN.

Referenced by BSP_AUDIO_IN_MspDeInit().

static uint8_t DFSDMx_DeInit ( void  ) [static]

De-initialize the Digital Filter for Sigma-Delta Modulators interface (DFSDM).

Return values:
AUDIO_OKif correct communication, else wrong communication

Definition at line 1489 of file stm32f769i_eval_audio.c.

References AUDIO_ERROR, AUDIO_OK, haudio_in_dfsdm_leftchannel, haudio_in_dfsdm_leftfilter, haudio_in_dfsdm_rightchannel, and haudio_in_dfsdm_rightfilter.

Referenced by BSP_AUDIO_IN_DeInit().

static void DFSDMx_FilterMspDeInit ( void  ) [static]

DeInitialize the DFSDM filter MSP.

Return values:
None

Definition at line 1621 of file stm32f769i_eval_audio.c.

References hdma_dfsdm_left, and hdma_dfsdm_right.

Referenced by BSP_AUDIO_IN_MspDeInit().

static uint8_t DFSDMx_Init ( uint32_t  AudioFreq) [static]

Initialize the Digital Filter for Sigma-Delta Modulators interface (DFSDM).

Parameters:
AudioFreq,:Audio frequency to be used to set correctly the DFSDM peripheral.
Note:
Channel output Clock Divider and Filter Oversampling are calculated as follow:
  • Clock_Divider = CLK(input DFSDM)/CLK(micro) with 1MHZ < CLK(micro) < 3.2MHZ (TYP 2.4MHZ for MP34DT01TR)
  • Oversampling = CLK(input DFSDM)/(Clock_Divider * AudioFreq)
Return values:
AUDIO_OKif correct communication, else wrong communication

Definition at line 1385 of file stm32f769i_eval_audio.c.

References AUDIO_DFSDMx_LEFT_FILTER, AUDIO_DFSDMx_RIGHT_FILTER, AUDIO_ERROR, AUDIO_OK, DFSDM_CLOCK_DIVIDER, DFSDM_FILTER_ORDER, DFSDM_OVER_SAMPLING, DFSDM_RIGHT_BIT_SHIFT, haudio_in_dfsdm_leftchannel, haudio_in_dfsdm_leftfilter, haudio_in_dfsdm_rightchannel, and haudio_in_dfsdm_rightfilter.

Referenced by BSP_AUDIO_IN_Init().

void HAL_DFSDM_FilterRegConvCpltCallback ( DFSDM_Filter_HandleTypeDef *  hdfsdm_filter)

Regular conversion complete callback.

Note:
In interrupt mode, user has to read conversion value in this function using HAL_DFSDM_FilterGetRegularValue.
Parameters:
hdfsdm_filter: DFSDM filter handle.
Return values:
None

Definition at line 1180 of file stm32f769i_eval_audio.c.

References AppBuffHalf, AppBuffTrigger, BSP_AUDIO_IN_HalfTransfer_CallBack(), BSP_AUDIO_IN_TransferComplete_CallBack(), DmaLeftRecBuffCplt, DmaRightRecBuffCplt, haudio_in_dfsdm_leftfilter, AUDIOIN_TypeDef::pRecBuf, pScratchBuff, AUDIOIN_TypeDef::RecSize, SaturaLH, and ScratchSize.

void HAL_DFSDM_FilterRegConvHalfCpltCallback ( DFSDM_Filter_HandleTypeDef *  hdfsdm_filter)
Generated on Thu May 25 2017 11:03:12 for STM32769I_EVAL BSP User Manual by   doxygen 1.7.6.1