2024-03-07 08:41 PM
Does anybody have an example code how to use SAI in STM32U5A5 as PDM interface?
I use STM32U5A5, with LQFP64 package. So, I understand from datasheet: the SAI (I have just SAI1 available om pins), supports PDM interface (for MEMS MICs). My package has just the pins for SAI1_D1, SAI1_CK1 and SAI1_CK2. OK.
And I saw, that the _B part for SAI does not support PDM - OK. All "four pairs" of SAI PDM is not possible with my package - OK.
Question:
Is it important to "group" the signals, e.g. SAI1_D1 with SAI1_CK1 (channel 1 signals)?
Or: is it possible to use SAI1_CK2 (which is SAI1_SCK_A on my board), configure it as PDM CLK (bus as channel 2), but use SAI1_D1 (which is SAI1_SD_A) for the PDM MIC data?
I mean: would be _CK2 synchronous to _CK1, so that I can use _CK2 but together with _D1?
(assume, I would configure _CK1 and CK2, but CK1 does not come out on a pin, just _CK2 will be there).
Or is it "mandatory" to use always the right pair, as _CK1 and _D1 (not _CK2 and _D1)?
Let's see.
Just some remarks/opinions - if you have, appreciated. I will try anyway if it is possible what I want to do (SAI as PDM, _CK2 but with _D1...). Just some experiences, hints - before I am wasting my time. Thank you.
2024-03-07 08:45 PM
I mean: if I configure SAI for PDM and I configure _CK1 and CK2 - is _CK2 synchronous (to _CK1)?, so that I can also sample PDM MIC data on _D1 (but with _CK2 provided on PDM MICs)?