2020-03-03 03:00 AM
2020-03-03 05:08 AM
> I2S2_SD and I2S2ext_SD direction
It depends on how you set the SPIx_I2SCFGR.I2SCFG field in the respective modules (SPI2/I2S2 and I2S2Ext): if to transmit, the respective pin is output, if to receive, the pin is input. See the I2S subchapter of SPI chapter in RM.
This allows you flexibility in routing the PCB.
JW
2020-03-03 04:01 AM
Manufacturers of I2S-compatible devices notoriously label the signals in various ways.
The standard says:
3.0 THE I 2 S BUS
As shown in Figure 1, the bus has three lines:
• continuous serial clock (SCK);
• word select (WS);
• serial data (SD);
and the device generating SCK and WS is the master.
ST follows this nomenclature relatively well.
standard ST various manufacturers
SCK (Serial Clock) I2Sx_CK SCLK, BICK (Bit Clock)
WS (Word Select) I2Sx_WS LRCK (Left-Right Clock)
SD (Serial Data) I2Sx_SD SDIN/SDOUT, SDTI/SDTO, RXDAT/TXDAT, DACDAT/ADCDAT
There is an additional nonstandard but often used signal I2Sx_MCK/MCLK.
The SPI/I2S module in STM32 is simplex but the data direction is settable (Rx/Tx) that's why it's not marked at the pin, and it's marked as I2Sx_SD.
There are auxiliary stripped-down I2S-slave-only modules, I2SxExt - as they are slave-only and their WS and SCK clocks are connected internally to their respective "master" module, they have only a single pin brought out, I2SxExt_SD.
Refer to the F4 Disco boards (e.g. https://www.st.com/en/evaluation-tools/stm32f4discovery.html ) for reference, they have an I2S DAC on board. Maybe the EVAL boards have I2S device on board, too.
JW
2020-03-03 04:57 AM
Hi waclawek.jan,
Thanks for your reference. I wanted to know about I2S2_SD and I2S2ext_SD direction I will have a look at it in the discovery board. I hope it should help
Narendra
2020-03-03 05:08 AM
> I2S2_SD and I2S2ext_SD direction
It depends on how you set the SPIx_I2SCFGR.I2SCFG field in the respective modules (SPI2/I2S2 and I2S2Ext): if to transmit, the respective pin is output, if to receive, the pin is input. See the I2S subchapter of SPI chapter in RM.
This allows you flexibility in routing the PCB.
JW
2020-03-03 05:12 AM
Thanks for your clarification.
2020-03-11 11:25 PM
SAI peripheral is much better for I2S and other audio protocols. It should be the first choice.