Skip to main content
Explorer II
October 31, 2025
Solved

SAI connection with codec

  • October 31, 2025
  • 2 replies
  • 410 views

Hello,

I want to interface two SAI of STM32L4S7VIT6 with two SGTL5000, which are working as transmitter and receiver at any time as used in telephone. Also interface one Si32287 through PCM. In datasheet SAI1_D1,D2, D3 are given but in reference manual it is not given. Also can we connect for one SGTL5000 with SAI1_FS_A, SAI1_MCLK_A,SAI1_SCK_A,SAI1_SD_A and SAI1_SD_B of same SAI1. And for other SGTL5000, can we connect SAI1_FS_B, SAI1_MCLK_B,SAI1_SCK_B of same SAI1 and for data SDI1_D1 and SDI1_D2. What are the functions of the lines SAI1_D1 and SAI1_D2? 

    This topic has been closed for replies.
    Best answer by AScha.3

    >Is it feasible to connect STM32L4S7VIT6 with two STGL5000 stero codec and one Si32287 ProSLIC- Single chip-Dual FXS solution

    Now 6 channels ?  No.

    With 2 SAI you can connect 2 codecs , not 3.

    You need a bigger cpu/soc , with 3 SAI ; or 2 SAI + 2 I2S .

     

    And no answer to: 4ch IN and 4ch OUT - what is it for ?  surround telephone ? :)

    2 replies

    Super User
    October 31, 2025

    Hi,

    >with two SGTL5000

    So you want 4ch IN and 4ch OUT - what is it for ?  surround telephone ? :)

    +

    >What are the functions of the lines SAI1_D1 and SAI1_D2? 

    The SAI can connect to 4 pdm mics also....so just set it in Cube and you see the D1...lines used.

    +

    >of same SAI1 and for data SDI1_D1 and SDI1_D2

    No.

    +

    You can connect a SGTL5000 (stereo, IN and OUT) to SAIx , A for out, B for input data; (master+slave)

    and the other SAI for the other SGTL5000 , also on its A + B , for in and out.

    S_RAuthor
    Explorer II
    October 31, 2025

     

    S_R_1-1761912457053.png

    Thanks for your response.

    See the attached is the connection. Is it feasible to connect STM32L4S7VIT6 with two STGL5000 stero codec and one Si32287 ProSLIC- Single chip-Dual FXS solution. We don't want to share any pins. Is it correct? Please suggest for the same.

    AScha.3Answer
    Super User
    October 31, 2025

    >Is it feasible to connect STM32L4S7VIT6 with two STGL5000 stero codec and one Si32287 ProSLIC- Single chip-Dual FXS solution

    Now 6 channels ?  No.

    With 2 SAI you can connect 2 codecs , not 3.

    You need a bigger cpu/soc , with 3 SAI ; or 2 SAI + 2 I2S .

     

    And no answer to: 4ch IN and 4ch OUT - what is it for ?  surround telephone ? :)

    Graduate II
    November 3, 2025

    With 2 SAI you can connect 2 codecs , not 3.

    Not sure about this.

    If this L4 has the typical STM32 SAI that I know, then there are 2 SAIs with 2 blocks each, so you can connect 4 stereo codecs -> 8 channels.

    Super User
    November 3, 2025

    No.

    Every subblock can handle one rx or tx line.

    So one SAI can handle one rx+tx codec, 2 or more channels of course in this stream, if the codec has more than 2 ch . Or two DACs or ADCs , if both subblocks only rx or tx doing.

    S_RAuthor
    Explorer II
    November 3, 2025

    Subject: Request for Alternate MCU Suggestion for STM32L4S7VIT6

    Dear Sir/Madam,

    Please help suggest an alternative to the STM32L4S7VIT6.
    In our design, we need to interface two stereo codecs and one Si32287 (FXS/FXO) device, and all interfaces are full duplex.

    The current MCU (STM32L4S7VIT6) provides only two SAI interfaces, which is insufficient for our requirement.
    Kindly recommend a suitable pin-compatible or higher-end STM32 series MCU (or any other compatible alternative) that supports additional SAI/I²S interfaces or equivalent audio peripheral channels for simultaneous full-duplex communication.

    Thank you for your support.