ADSP-BF592 Sports MuiltiChannel Operation

Hey Folks,

     One of my customer is using BF592 for an audio application. He plans to use one Sport RX channel to work in TDM8 mode to receive the data from 21489 and use 4 TX channels of Sports to transmit 4 I2S to 4 DAC. Here is the diagram.

       

    I notice that there are 2 sports on BF592. And each sport has 2 rx and 2 tx channel as blow. In the datasheet, it says the tx and rx channel works in full-duplex mode. So I suppose the TX clk and RX clk could be asynchronous. And also the hardware reference give me serval examples to illustrate how the RX and TX works.

     

    However, this section says the RSCLK is used both for transmit and receive functions.

      Does it means that if the SPORT works in the multichannel mode, the RX and TX channels are synchronous with same clock - RSCLK?

     So is that possible to use two SPORT to receive 1 TDM8 and transmit 4 I2S on BF592?

B.R.

Yosen

 

  •   Does it means that if the SPORT works in the multichannel mode, the RX and TX channels are synchronous with same clock - RSCLK?

    Yes, you are right. The RX and TX channels (of a SPORT) have same clock.

         So is that possible to use two SPORT to receive 1 TDM8 and transmit 4 I2S on BF592?

    Yes. It is possibe. One SPORT can work in TDM mode and the other can work in I2S mode.

  • 0
    •  Analog Employees 
    on Mar 12, 2020 7:47 AM 11 months ago in reply to Thanh Nguyen

    I have already recommended the customer use ADAU1450 to replace BF592.

    but I am still confused about this.

    Lets back to the customer case.

        When I set the SPORT0 to TMD8 mode, the RX and TX bit clock are synchronous. it means if I use SPORT0 to transmit the audio data, it will work in the TMD8 mode but not I2S, right?

        Then I set the Sport1 to I2S mode, then I can have 2 I2S channel(The DTPRI and DTSEC of the SPORT1), so how can I get 1 TDM8 input and 4 I2S output?  do I misunderstand something here?

    B.R.

    Yosen

        

  • When I set the SPORT0 to TMD8 mode, the RX and TX bit clock are synchronous. it means if I use SPORT0 to transmit the audio data, it will work in the TMD8 mode but not I2S, right?

    You are right.

    Then I set the Sport1 to I2S mode, then I can have 2 I2S channel(The DTPRI and DTSEC of the SPORT1), so how can I get 1 TDM8 input and 4 I2S output?  do I misunderstand something here?

    You can set SPORT0 work in TDM mode and SPORT1 in I2S, and then transmit audio data between two SPORTs, but you should be carefull about audio data stream. Because in TDM8 mode, you will have 8 audio channel, which are independent, but with 4  I2S output you will have 8 audio channel, which have pairs left, right channel. So you have to confirm that 8 audio channel, which come from SPORT0 are pair left, right channel. You can refer my example code as below:

    volatile int iRxBuffer[8]; // receive buffer, which save data from SPORT0 8 TDM

    volatile int iTxBuffer[8]; // transmit buffer, which save data sent to SPORT1 4 I2S

    int iChannel0LeftIn, iChannel1LeftIn, iChannel2LeftIn, iChannel3LeftIn ; // left input  from codec

    int iChannel0RightIn, iChannel1RightIn, iChannel2RightIn, iChannel3RightIn; // right input data from codec

    int iChannel0LeftOut, iChannel1LeftOut, iChannel2LeftOut, iChannel3LeftOut; //  left output data

    int iChannel0RightOut, iChannel1RightOut, iChannel2RightOut, iChannel3RightOut; // right output data

    void ProcessData (void) // transmit data from SPORT0 to SPORT1

    {

        iChannel0LeftIn = iRxBuffer[0];
        iChannel0RightIn = iRxBuffer[1];
        iChannel1LeftIn = iRxBuffer[2];
        iChannel1RightIn = iRxBuffer[3];

        iChannel2LeftIn = iRxBuffer[4];
        iChannel2RightIn = iRxBuffer[5];
        iChannel3LeftIn = iRxBuffer[6];
        iChannel3RightIn = iRxBuffer[7];

        iChannel0LeftOut = iChannel0LeftIn;
        iChannel0RightOut = iChannel0RightIn;
        iChannel1LeftOut = iChannel1LeftIn;
        iChannel1RightOut = iChannel1RightIn;

        iChannel2LeftOut = iChannel2LeftIn;
        iChannel2RightOut = iChannel2RightIn;
        iChannel3LeftOut = iChannel3LeftIn;
        iChannel3RightOut = iChannel3RightIn;

        iTxBuffer[0] = iChannel0LeftOut;
        iTxBuffer[1] = iChannel0RightOut;

        iTxBuffer[2] = iChannel1LeftOut;
        iTxBuffer[3] = iChannel1RightOut;

        iTxBuffer[4] = iChannel2LeftOut;

        iTxBuffer[5] = iChannel2RightOut;

        iTxBuffer[6] = iChannel3LeftOut;
        iTxBuffer[7] = iChannel3RightOut;

    }

    Hope this helpful !

  • 0
    •  Analog Employees 
    on Mar 13, 2020 1:15 PM 11 months ago

    Hi Yosen,

    1) Yes, you can configure one SPORTx to Receive in TDM mode and the other SPORTx to transmit in I2S mode.

    2) The SPORT is a full duplex device, capable of simultaneous data transfer in both directions.


    Regards,
    Anand Selvaraj.

  • 0
    •  Analog Employees 
    on Mar 30, 2020 8:04 AM 10 months ago in reply to Thanh Nguyen

    Hi ,

      I have read your example codes. Is my understanding correct here?

      a. SPORT0 is receiving TDM8 signals.

      b. SPORT1 is transmitting the 4 I2S signals

      c. SPORT0 transmits the data to the SPORT1 (your codes illustrated)

      d. here comes the question:

             SPORT1 only have two I2S TX data channels, DTPRI and DTSEC. How can I design the hardware Schematic to have another 2 I2S TX data channels?

           

       I am still a little confused....

      

    B.R.

    B.R.