Patched for Audio example - Add status check when DFSDM's filter and channel de-init.
Dependents: DISCO_F413ZH-AUDIO-demo
The base repository is https://os.mbed.com/teams/ST/code/BSP_DISCO_F413ZH/. I've just added workaround patch for Audio-in demo on DISCO_F413ZH board(Microphone U16, U17)
Diff: Drivers/BSP/STM32F413H-Discovery/stm32f413h_discovery_audio.c
- Revision:
- 2:0f07a9ac06f7
- Parent:
- 0:4af3ca173992
- Child:
- 3:42b354f5069c
--- a/Drivers/BSP/STM32F413H-Discovery/stm32f413h_discovery_audio.c Wed May 17 14:00:44 2017 +0200
+++ b/Drivers/BSP/STM32F413H-Discovery/stm32f413h_discovery_audio.c Tue May 23 11:03:57 2017 +0200
@@ -170,7 +170,7 @@
/* Buffers for right and left samples */
int32_t *pScratchBuff[DEFAULT_AUDIO_IN_CHANNEL_NBR];
-int32_t ScratchSize;
+uint32_t ScratchSize;
uint32_t DmaRecHalfBuffCplt[DFSDM_MIC_NUMBER] = {0};
uint32_t DmaRecBuffCplt[DFSDM_MIC_NUMBER] = {0};
@@ -2076,6 +2076,37 @@
}
/**
+ * @brief This function handles DFSDM MIC1 DMA interrupt request.
+ * @param None
+ * @retval None
+ */
+void AUDIO_DFSDM_DMAx_MIC1_IRQHandler(void)
+{
+ HAL_DMA_IRQHandler(hAudioInDfsdmFilter[POS_VAL(INPUT_DEVICE_DIGITAL_MIC1)].hdmaReg);
+
+}
+
+/**
+ * @brief This function handles DFSDM MIC2 DMA interrupt request.
+ * @param None
+ * @retval None
+ */
+void AUDIO_DFSDM_DMAx_MIC2_IRQHandler(void)
+{
+ HAL_DMA_IRQHandler(hAudioInDfsdmFilter[POS_VAL(INPUT_DEVICE_DIGITAL_MIC2)].hdmaReg);
+}
+
+/**
+ * @brief This function handles I2S DMA interrupt request.
+ * @param None
+ * @retval None
+ */
+void AUDIO_OUT_I2Sx_DMAx_IRQHandler(void)
+{
+ HAL_DMA_IRQHandler(haudio_i2s.hdmatx);
+}
+
+/**
* @}
*/
Daniel Lee