cancel
Showing results for 
Search instead for 
Did you mean: 

Pulse Density Modulation Interface

polotomino
Associate II

Hi!

I'm trying to enable the PDM interface on a STM32WB55RGV with one microphone. Basically i followed the AN5027 application note, but I'm not able to start the clock on the proper GPIO.

The configuration from CUBE-MX seems ok, and I checked the registers value, so maybe I'm setting up the wrong API to start the streaming.

Any advice?

0690X00000AqXgJQAV.png

0690X00000AqXgOQAV.png

	MX_SAI1_Init();
 
	osDelay(10);
 
	//HAL_SAI_Receive_DMA(&hsai_BlockA1, (uint8_t *)mic_buff, MIC_BUFF_LEN);
	HAL_SAI_Receive(&hsai_BlockA1, (uint8_t *)mic_buff, MIC_BUFF_LEN, 100);
 
 
	/* start application */
	while (1){
		osDelay(1000);
	}

13 REPLIES 13

Hi @Khouloud ZEMMELI​ ,

Sorry, I don't know - I don't use the 'WB55 nor CubeMX, I just tried to help here. It appears that when @polotomino​  changed the input clock from PLLSAI1 to the main PLL's output, PDM started to work, so there might be the possibility that the configuration generated by CubeMX does not configure PLLSAI1 properly.

Jan

Khouloud ZEMMELI
ST Employee

​so @polotomino​  could you please give me more details about your request ?

Thanks,

Khouloud.

Thanks @Community member​. Yes, if I select the PLLSAI1P as the input clock source for the SAI1 Module the peripheral doesn't work, with the PLLP it does.

Of course I configured both PLLs to provide the same freq.

​Please try with the latest CubeMX version (5.4.0)

Thanks,

Khouloud