2021-01-22 04:52 PM
Hey folks,
I am trying to use BSP package for recording audio on stm32h747 discovery board. I created a project from scratch and tried to do what ever I saw in the BSP exam for the board. However, "BSP_AUDIO_IN_TransferComplete_CallBack" function is never called really. I am wondering if there is some hidden things that I need to do for the callback. I can also provide my project files if it is necessary.
Thanks,
Solved! Go to Solution.
2021-01-23 08:11 AM
BSP_AUDIO_IN_TransferComplete_CallBack is called from HAL_SAI_RxCpltCallback, the HAL callback. The HAL callback is called from the interrupt handler. The interrupt must be activated and the handler implemented. In my case (F746G-DISCO), the interrupt handler in stm32f7xx_it.c is named AUDIO_IN_SAIx_DMAx_IRQHandler, but this is only a macro. The geniue name is (board dependent!) DMA2_Stream7_IRQHandler.
So, you could set some breakpoints in the BSP project and follow the call stack to get an idea.
Good luck
KnarfB
2021-01-23 08:11 AM
BSP_AUDIO_IN_TransferComplete_CallBack is called from HAL_SAI_RxCpltCallback, the HAL callback. The HAL callback is called from the interrupt handler. The interrupt must be activated and the handler implemented. In my case (F746G-DISCO), the interrupt handler in stm32f7xx_it.c is named AUDIO_IN_SAIx_DMAx_IRQHandler, but this is only a macro. The geniue name is (board dependent!) DMA2_Stream7_IRQHandler.
So, you could set some breakpoints in the BSP project and follow the call stack to get an idea.
Good luck
KnarfB