|
STM32F769I-Discovery BSP User Manual
|
Functions | |
| uint8_t | BSP_AUDIO_IN_Init (uint32_t AudioFreq, uint32_t BitRes, uint32_t ChnlNbr) |
| Initialize wave recording. | |
| uint8_t | BSP_AUDIO_IN_InitEx (uint16_t InputDevice, 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_GetChannelNumber (void) |
| Return audio in channel number. | |
| 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. | |
| void | HAL_SAI_RxHalfCpltCallback (SAI_HandleTypeDef *hsai) |
| Half reception complete callback. | |
| void | HAL_SAI_RxCpltCallback (SAI_HandleTypeDef *hsai) |
| Reception 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. size of scratch buffer
Definition at line 1194 of file stm32f769i_discovery_audio.c.
References AUDIO_OK, AudioIn_ChannelNumber, 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 1680 of file stm32f769i_discovery_audio.c.
Referenced by BSP_AUDIO_IN_InitEx().
| void BSP_AUDIO_IN_DeInit | ( | void | ) |
Deinit the audio IN peripherals.
- Return values:
-
None
Definition at line 1410 of file stm32f769i_discovery_audio.c.
References AudioIn_Device, BSP_AUDIO_IN_MspDeInit(), DFSDMx_DeInit(), INPUT_DEVICE_DIGITAL_MIC, and SAIx_In_DeInit().
| __weak void BSP_AUDIO_IN_Error_CallBack | ( | void | ) |
Audio IN Error callback function.
- Return values:
-
None
Definition at line 1627 of file stm32f769i_discovery_audio.c.
Referenced by HAL_SAI_ErrorCallback().
| uint8_t BSP_AUDIO_IN_GetChannelNumber | ( | void | ) |
Return audio in channel number.
- Return values:
-
Number of channel
Definition at line 1213 of file stm32f769i_discovery_audio.c.
References AudioIn_ChannelNumber.
| __weak void BSP_AUDIO_IN_HalfTransfer_CallBack | ( | void | ) |
Manages the DMA Half Transfer complete event.
- Return values:
-
None
Definition at line 1616 of file stm32f769i_discovery_audio.c.
Referenced by HAL_DFSDM_FilterRegConvCpltCallback(), HAL_DFSDM_FilterRegConvHalfCpltCallback(), and HAL_SAI_RxHalfCpltCallback().
| 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_OK if correct communication, else wrong communication
Definition at line 1117 of file stm32f769i_discovery_audio.c.
References BSP_AUDIO_IN_InitEx(), and INPUT_DEVICE_DIGITAL_MIC.
| uint8_t BSP_AUDIO_IN_InitEx | ( | uint16_t | InputDevice, |
| uint32_t | AudioFreq, | ||
| uint32_t | BitRes, | ||
| uint32_t | ChnlNbr | ||
| ) |
Initialize wave recording.
- Parameters:
-
InputDevice,: INPUT_DEVICE_DIGITAL_MIC or INPUT_DEVICE_ANALOG_MIC. AudioFreq,: Audio frequency to be configured. BitRes,: Audio bit resolution to be configured.. ChnlNbr,: Number of channel to be configured.
- Return values:
-
AUDIO_OK if correct communication, else wrong communication
Definition at line 1130 of file stm32f769i_discovery_audio.c.
References audio_drv, AUDIO_ERROR, AUDIO_I2C_ADDRESS, AUDIO_IN_SAIx, AUDIO_OK, AudioIn_ChannelNumber, AudioIn_Device, BSP_AUDIO_IN_ClockConfig(), BSP_AUDIO_IN_MspInit(), BSP_AUDIO_OUT_ClockConfig(), BSP_AUDIO_OUT_MspInit(), DFSDMx_Init(), haudio_in_sai, hAudioInTopLeftFilter, INPUT_DEVICE_DIGITAL_MIC, SAIx_In_DeInit(), and SAIx_In_Init().
Referenced by BSP_AUDIO_IN_Init().
| __weak void BSP_AUDIO_IN_MspDeInit | ( | void | ) |
DeInitialize BSP_AUDIO_IN MSP.
- Return values:
-
None
Definition at line 1656 of file stm32f769i_discovery_audio.c.
References AudioIn_Device, DFSDMx_ChannelMspDeInit(), DFSDMx_FilterMspDeInit(), haudio_in_sai, INPUT_DEVICE_DIGITAL_MIC, and SAI_AUDIO_IN_MspDeInit().
Referenced by BSP_AUDIO_IN_DeInit().
| __weak void BSP_AUDIO_IN_MspInit | ( | void | ) |
Initialize BSP_AUDIO_IN MSP.
- Return values:
-
None
Definition at line 1637 of file stm32f769i_discovery_audio.c.
References AudioIn_Device, DFSDMx_ChannelMspInit(), DFSDMx_FilterMspInit(), haudio_in_sai, INPUT_DEVICE_DIGITAL_MIC, and SAI_AUDIO_IN_MspInit().
Referenced by BSP_AUDIO_IN_InitEx().
| uint8_t BSP_AUDIO_IN_Pause | ( | void | ) |
Pause the audio file stream.
- Return values:
-
AUDIO_OK if correct communication, else wrong communication
Definition at line 1338 of file stm32f769i_discovery_audio.c.
References AUDIO_ERROR, AUDIO_OK, AudioIn_ChannelNumber, hAudioInButtomLeftFilter, hAudioInButtomRightFilter, hAudioInTopLeftFilter, and hAudioInTopRightFilter.
| 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_OK if correct communication, else wrong communication
Definition at line 1224 of file stm32f769i_discovery_audio.c.
References AppBuffHalf, AppBuffTrigger, AUDIO_ERROR, AUDIO_OK, AudioIn_ChannelNumber, AudioIn_Device, haudio_in_sai, hAudioInButtomLeftFilter, hAudioInButtomRightFilter, hAudioInTopLeftFilter, hAudioInTopRightFilter, INPUT_DEVICE_DIGITAL_MIC, AUDIOIN_TypeDef::pRecBuf, pScratchBuff, AUDIOIN_TypeDef::RecSize, and ScratchSize.
| uint8_t BSP_AUDIO_IN_Resume | ( | void | ) |
Resume the audio file stream.
- Return values:
-
AUDIO_OK if correct communication, else wrong communication
Definition at line 1374 of file stm32f769i_discovery_audio.c.
References AUDIO_ERROR, AUDIO_OK, AudioIn_ChannelNumber, hAudioInButtomLeftFilter, hAudioInButtomRightFilter, hAudioInTopLeftFilter, hAudioInTopRightFilter, pScratchBuff, and ScratchSize.
| uint8_t BSP_AUDIO_IN_Stop | ( | void | ) |
Stop audio recording.
- Return values:
-
AUDIO_OK if correct communication, else wrong communication
Definition at line 1277 of file stm32f769i_discovery_audio.c.
References AppBuffHalf, AppBuffTrigger, audio_drv, AUDIO_ERROR, AUDIO_I2C_ADDRESS, AUDIO_OK, AudioIn_ChannelNumber, AudioIn_Device, haudio_in_sai, hAudioInButtomLeftFilter, hAudioInButtomRightFilter, hAudioInTopLeftFilter, hAudioInTopRightFilter, and INPUT_DEVICE_DIGITAL_MIC.
| __weak void BSP_AUDIO_IN_TransferComplete_CallBack | ( | void | ) |
User callback when record buffer is filled.
- Return values:
-
None
Definition at line 1605 of file stm32f769i_discovery_audio.c.
Referenced by HAL_DFSDM_FilterRegConvCpltCallback(), HAL_DFSDM_FilterRegConvHalfCpltCallback(), and HAL_SAI_RxCpltCallback().
| static void DFSDMx_ChannelMspDeInit | ( | void | ) | [static] |
DeInitialize the DFSDM channel MSP.
- Return values:
-
None
Definition at line 2036 of file stm32f769i_discovery_audio.c.
References AUDIO_DFSDMx_CKOUT_DMIC_GPIO_PORT, AUDIO_DFSDMx_CKOUT_PIN, AUDIO_DFSDMx_DMIC_DATIN1_PIN, AUDIO_DFSDMx_DMIC_DATIN5_PIN, AUDIO_DFSDMx_DMIC_DATIN_GPIO_PORT, and AudioIn_ChannelNumber.
Referenced by BSP_AUDIO_IN_MspDeInit().
| static void DFSDMx_ChannelMspInit | ( | void | ) | [static] |
Initialize the DFSDM channel MSP.
- Return values:
-
None
Definition at line 1999 of file stm32f769i_discovery_audio.c.
References AUDIO_DFSDMx_CKOUT_AF, AUDIO_DFSDMx_CKOUT_DMIC_GPIO_CLK_ENABLE, AUDIO_DFSDMx_CKOUT_DMIC_GPIO_PORT, AUDIO_DFSDMx_CKOUT_PIN, AUDIO_DFSDMx_CLK_ENABLE, AUDIO_DFSDMx_DMIC_DATIN1_PIN, AUDIO_DFSDMx_DMIC_DATIN5_PIN, AUDIO_DFSDMx_DMIC_DATIN_AF, AUDIO_DFSDMx_DMIC_DATIN_GPIO_CLK_ENABLE, AUDIO_DFSDMx_DMIC_DATIN_GPIO_PORT, and AudioIn_ChannelNumber.
Referenced by BSP_AUDIO_IN_MspInit().
| static uint8_t DFSDMx_DeInit | ( | void | ) | [static] |
De-initialize the Digital Filter for Sigma-Delta Modulators interface (DFSDM).
- Return values:
-
AUDIO_OK if correct communication, else wrong communication
Definition at line 1943 of file stm32f769i_discovery_audio.c.
References AUDIO_ERROR, AUDIO_OK, AudioIn_ChannelNumber, hAudioInButtomLeftChannel, hAudioInButtomLeftFilter, hAudioInButtomRightChannel, hAudioInButtomRightFilter, hAudioInTopLeftChannel, hAudioInTopLeftFilter, hAudioInTopRightChannel, and hAudioInTopRightFilter.
Referenced by BSP_AUDIO_IN_DeInit().
| static void DFSDMx_FilterMspDeInit | ( | void | ) | [static] |
DeInitialize the DFSDM filter MSP.
- Return values:
-
None
Definition at line 2174 of file stm32f769i_discovery_audio.c.
References AudioIn_ChannelNumber, hDmaButtomLeft, hDmaButtomRight, hDmaTopLeft, and hDmaTopRight.
Referenced by BSP_AUDIO_IN_MspDeInit().
| static void DFSDMx_FilterMspInit | ( | void | ) | [static] |
Initialize the DFSDM filter MSP.
- Return values:
-
None
Definition at line 2060 of file stm32f769i_discovery_audio.c.
References AUDIO_DFSDMx_CLK_ENABLE, AUDIO_DFSDMx_DMAx_BUTTOM_LEFT_IRQ, AUDIO_DFSDMx_DMAx_BUTTOM_LEFT_STREAM, AUDIO_DFSDMx_DMAx_BUTTOM_RIGHT_IRQ, AUDIO_DFSDMx_DMAx_BUTTOM_RIGHT_STREAM, AUDIO_DFSDMx_DMAx_CHANNEL, AUDIO_DFSDMx_DMAx_CLK_ENABLE, AUDIO_DFSDMx_DMAx_MEM_DATA_SIZE, AUDIO_DFSDMx_DMAx_PERIPH_DATA_SIZE, AUDIO_DFSDMx_DMAx_TOP_LEFT_IRQ, AUDIO_DFSDMx_DMAx_TOP_LEFT_STREAM, AUDIO_DFSDMx_DMAx_TOP_RIGHT_IRQ, AUDIO_DFSDMx_DMAx_TOP_RIGHT_STREAM, AUDIO_OUT_IRQ_PREPRIO, AudioIn_ChannelNumber, hAudioInButtomLeftFilter, hAudioInButtomRightFilter, hAudioInTopLeftFilter, hAudioInTopRightFilter, hDmaButtomLeft, hDmaButtomRight, hDmaTopLeft, and hDmaTopRight.
Referenced by BSP_AUDIO_IN_MspInit().
| 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_OK if correct communication, else wrong communication
Definition at line 1733 of file stm32f769i_discovery_audio.c.
References AUDIO_DFSDMx_BUTTOM_LEFT_CHANNEL, AUDIO_DFSDMx_BUTTOM_LEFT_FILTER, AUDIO_DFSDMx_BUTTOM_RIGHT_CHANNEL, AUDIO_DFSDMx_BUTTOM_RIGHT_FILTER, AUDIO_DFSDMx_TOP_LEFT_CHANNEL, AUDIO_DFSDMx_TOP_LEFT_FILTER, AUDIO_DFSDMx_TOP_RIGHT_CHANNEL, AUDIO_DFSDMx_TOP_RIGHT_FILTER, AUDIO_ERROR, AUDIO_OK, AudioIn_ChannelNumber, DFSDM_CLOCK_DIVIDER, DFSDM_FILTER_ORDER, DFSDM_OVER_SAMPLING, DFSDM_RIGHT_BIT_SHIFT, hAudioInButtomLeftChannel, hAudioInButtomLeftFilter, hAudioInButtomRightChannel, hAudioInButtomRightFilter, hAudioInTopLeftChannel, hAudioInTopLeftFilter, hAudioInTopRightChannel, and hAudioInTopRightFilter.
Referenced by BSP_AUDIO_IN_InitEx().
| 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 1431 of file stm32f769i_discovery_audio.c.
References AppBuffHalf, AppBuffTrigger, AudioIn_ChannelNumber, BSP_AUDIO_IN_HalfTransfer_CallBack(), BSP_AUDIO_IN_TransferComplete_CallBack(), DmaButtomLeftRecCplt, DmaButtomRightRecCplt, DmaTopLeftRecCplt, DmaTopRightRecCplt, hAudioInButtomLeftFilter, hAudioInTopLeftFilter, hAudioInTopRightFilter, AUDIOIN_TypeDef::pRecBuf, pScratchBuff, AUDIOIN_TypeDef::RecSize, SaturaLH, and ScratchSize.
| void HAL_DFSDM_FilterRegConvHalfCpltCallback | ( | DFSDM_Filter_HandleTypeDef * | hdfsdm_filter | ) |
Half regular conversion complete callback.
- Parameters:
-
hdfsdm_filter : DFSDM filter handle.
- Return values:
-
None
Definition at line 1507 of file stm32f769i_discovery_audio.c.
References AppBuffHalf, AppBuffTrigger, AudioIn_ChannelNumber, BSP_AUDIO_IN_HalfTransfer_CallBack(), BSP_AUDIO_IN_TransferComplete_CallBack(), DmaButtomLeftRecHalfCplt, DmaButtomRightRecHalfCplt, DmaTopLeftRecHalfCplt, DmaTopRightRecHalfCplt, hAudioInButtomLeftFilter, hAudioInTopLeftFilter, hAudioInTopRightFilter, AUDIOIN_TypeDef::pRecBuf, pScratchBuff, AUDIOIN_TypeDef::RecSize, SaturaLH, and ScratchSize.
| void HAL_SAI_RxCpltCallback | ( | SAI_HandleTypeDef * | hsai | ) |
Reception complete callback.
- Parameters:
-
hsai : SAI handle.
- Return values:
-
None
Definition at line 1595 of file stm32f769i_discovery_audio.c.
References BSP_AUDIO_IN_TransferComplete_CallBack().
| void HAL_SAI_RxHalfCpltCallback | ( | SAI_HandleTypeDef * | hsai | ) |
Half reception complete callback.
- Parameters:
-
hsai : SAI handle.
- Return values:
-
None
Definition at line 1583 of file stm32f769i_discovery_audio.c.
References BSP_AUDIO_IN_HalfTransfer_CallBack().
Generated on Fri Dec 30 2016 18:30:07 for STM32F769I-Discovery BSP User Manual by
1.7.6.1