2021-04-12 02:54 AM
I am working with stm32f769 to record using mems sensor and board support package library for stm32f769. But I have problem when using BSP_AUDIO_IN_Record function. I realized that the HAL_DFSDM_FilterRegConvCpltCallback and HAL_DFSDM_FilterRegConvHalfCpltCallback function was not called when execution finished and no sound value was saved, but the application still works fine with the template from ST. Does anybody could help me to how can I fix this
Thank!
My code:
int main(void)
{
/* Enable I-Cache---------------------------------------------------------*/
SCB_EnableICache();
/* Enable D-Cache---------------------------------------------------------*/
SCB_EnableDCache();
/* MCU Configuration--------------------------------------------------------*/
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */ HAL_Init();
/* USER CODE BEGIN Init */
/* USER CODE END Init */
/* Configure the system clock */ SystemClock_Config();
/* USER CODE BEGIN SysInit */
/* USER CODE END SysInit */
/* Initialize all configured peripherals */ MX_GPIO_Init();
/* USER CODE BEGIN 2 */
BSP_AUDIO_IN_Init(BSP_AUDIO_FREQUENCY_16K, DEFAULT_AUDIO_IN_BIT_RESOLUTION, DEFAULT_AUDIO_IN_CHANNEL_NBR);
BSP_AUDIO_IN_AllocScratch (Scratch_, SCRATCH_BUFF_SIZE);
BSP_AUDIO_IN_Record((uint16_t*)&BufferCtl.pcm_buff[0], AUDIO_IN_PCM_BUFFER_SIZE);
BufferCtl.fptr = 1;
BufferCtl.pcm_ptr = 0;
BufferCtl.offset = 0;
BufferCtl.wr_state = BUFFER_EMPTY;
while (1) {
} }
and library: