Skip to main content
Visitor II
January 23, 2021
Solved

Recording audio on STM32H747i-Discovery board using BSP package

  • January 23, 2021
  • 1 reply
  • 1121 views

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,

    This topic has been closed for replies.
    Best answer by KnarfB

    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

    1 reply

    KnarfBAnswer
    Super User
    January 23, 2021

    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