2019-10-18 03:58 AM
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?
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);
}
Solved! Go to Solution.
2019-10-28 04:27 AM
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
2019-10-28 05:01 AM
so @polotomino could you please give me more details about your request ?
Thanks,
Khouloud.
2019-10-30 07:09 AM
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.
2019-10-30 07:54 AM
Please try with the latest CubeMX version (5.4.0)
Thanks,
Khouloud