cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H747I-DISCO SAI onboard Microphone DMA error

Patryk_Kucia
Associate II

HI 

I am having an issue with starting measurements using the on-board microphone. Everything has been configured based on the BSP code, but set up from scratch using CubeMX. The problem is that when I start the DMA Receive

 

if (HAL_SAI_Receive_DMA(&hsai_BlockA4, (uint8_t*)PDM_Buffer, PDM_BUF_SIZE) != HAL_OK)

{

printf("SAI RX start error!\r\n");

}

else

{

printf("SAI RX started OK");

}

//callbacks:

void HAL_SAI_RxHalfCpltCallback(SAI_HandleTypeDef *hsai)

{

printf("HAL_SAI_RxHalfCpltCallback\n");

}

 

void HAL_SAI_RxCpltCallback(SAI_HandleTypeDef *hsai)

{

printf("HAL_SAI_RxCpltCallback\n");

}

 

void HAL_SAI_ErrorCallback(SAI_HandleTypeDef *hsai)

{

printf("SAI error: 0x%08lx\n", hsai->ErrorCode);

}

 

I immediately get an interrupt reporting a DMA error (128 eror code in decimal).

I have already tried changing the clock frequencies, tried running it on a different core, and also tested with different data sizes, but none of this helped.

My config below: 

Patryk_Kucia_0-1759444319767.png

Patryk_Kucia_7-1759444919056.png

 

 

Patryk_Kucia_1-1759444362651.png

Patryk_Kucia_2-1759444374961.png

Patryk_Kucia_3-1759444681177.png

Patryk_Kucia_4-1759444688360.png

Patryk_Kucia_5-1759444697031.png

Patryk_Kucia_6-1759444716121.png

 

 

 

 

 

0 REPLIES 0