AnsweredAssumed Answered

Add more than 4 inputs in I2S ADSP-21489

Question asked by toxivirus_jon on Mar 21, 2018
Latest reply on Jun 21, 2018 by sabry

Hi,

 

I working on it since two days without any success, so I'm looking for your help.

Here is my setup :

- 8 I2S stereo inputs

- 4 I2S stereo outputs

- 21489 Sharc DSP

I have external buffer to share the BCLK LRCLK to all the devices. I use the example : "adsp-21489-CCES" in CCES 2.7.0

At the beginning, I change the DAI port inputs to fits with my first config (4 inputs/8 outputs like in the ezkit). I re use the same SPORTS and it works fine, so I can have 4 inputs and share it to the 8 ouputs.

Now I want to add 12 more inputs, so I change in the:

 

- app.h "#define NUM_INPUT_ANALOG_CHANNELS        (16)"

 

- initSRU_21469.c InitDAI_ANALOGInANALOGOut "

    SRU(DAI_PB18_O, SPORT1_CLK_I); 
    SRU(DAI_PB18_O, SPORT5_CLK_I);
    SRU(DAI_PB18_O, SPORT2_CLK_I);
    SRU(DAI_PB18_O, SPORT0_CLK_I);
    SRU(DAI_PB18_O, SPORT3_CLK_I);

 

    SRU(DAI_PB17_O, SPORT1_FS_I);
    SRU(DAI_PB17_O, SPORT5_FS_I);
    SRU(DAI_PB17_O, SPORT2_FS_I);
    SRU(DAI_PB17_O, SPORT0_FS_I);
    SRU(DAI_PB17_O, SPORT3_FS_I);

 

    //INPUT 0-3

        SRU(DAI_PB16_O, SPORT3_DA_I);
        SRU(DAI_PB12_O, SPORT3_DB_I);

    //INPUT 4-7

        SRU(DAI_PB19_O, SPORT1_DA_I);
        SRU(DAI_PB13_O, SPORT1_DB_I);

    //INPUT 8-11

        SRU(DAI_PB01_O, SPORT4_DA_I);
        SRU(DAI_PB09_O, SPORT4_DB_I);

    //INPUT 12-15

        SRU(DAI_PB02_O, SPORT0_DA_I);
        SRU(DAI_PB05_O, SPORT0_DB_I);

//OUTPUT 0-3

    SRU(HIGH, PBEN11_I);
    SRU(SPORT5_DA_O, DAI_PB11_I);
    SRU(HIGH, PBEN15_I);
    SRU(SPORT5_DB_O, DAI_PB15_I);

//OUTPUT 4-7
    SRU(HIGH, PBEN10_I);              
    SRU(SPORT2_DA_O, DAI_PB10_I);
    SRU(HIGH, PBEN03_I);
    SRU(SPORT2_DB_O, DAI_PB03_I);"

 

- initSPORT.c "

void ConfigureSportI2S(tAppInfo *pAppInfo, int SportTCBSize)
{
    tSportBuffInfo *pSportBuffInfo = pAppInfo->pSportBuffInfo;

 

#if defined(__214xx__)
    /* Enabling Chaining */
    /* Configure SPORTs 1 for input from ADCs 1-2 */
    /* Configure SPORTs 3 for input from ADCs */
    *pDIV3 = 0;
    *pDIV1 = 0;

 

    *pDIV4 = 0;
    *pDIV0 = 0;
    *pCPSP3A = (((unsigned int)pSportBuffInfo->pTCBIn[0][0] + (SportTCBSize-1)) & 0x7FFFF) | (1<<19);
    *pCPSP3B = (((unsigned int)pSportBuffInfo->pTCBIn[1][0] + (SportTCBSize-1)) & 0x7FFFF) | (1<<19);
    *pSPCTL3 = (OPMODE | SLEN24 | SPEN_A | SCHEN_A | SDEN_A | SPEN_B | SCHEN_B | SDEN_B | L_FIRST);

 

    /* Configure SPORTs 1 for input from ADCs*/
    *pCPSP1A = (((unsigned int)pSportBuffInfo->pTCBIn[2][0] + (SportTCBSize-1)) & 0x7FFFF) | (1<<19);
    *pCPSP1B = (((unsigned int)pSportBuffInfo->pTCBIn[3][0] + (SportTCBSize-1)) & 0x7FFFF) | (1<<19);
    *pSPCTL1 = (OPMODE | SLEN24 | SPEN_A | SCHEN_A | SDEN_A | SPEN_B | SCHEN_B | SDEN_B | L_FIRST);


    /* Configure SPORTs 4 for input from ADCs */
    *pCPSP4A = (((unsigned int)pSportBuffInfo->pTCBIn[4][0] + (SportTCBSize-1)) & 0x7FFFF) | (1<<19);
    *pCPSP4B = (((unsigned int)pSportBuffInfo->pTCBIn[5][0] + (SportTCBSize-1)) & 0x7FFFF) | (1<<19);
    *pSPCTL4 = (OPMODE | SLEN24 | SPEN_A | SCHEN_A | SDEN_A | SPEN_B | SCHEN_B | SDEN_B | L_FIRST);

 

    /* Configure SPORTs 0 for input from ADCs */
    *pCPSP0A = (((unsigned int)pSportBuffInfo->pTCBIn[6][0] + (SportTCBSize-1)) & 0x7FFFF) | (1<<19);
    *pCPSP0B = (((unsigned int)pSportBuffInfo->pTCBIn[7][0] + (SportTCBSize-1)) & 0x7FFFF) | (1<<19);
    *pSPCTL0 = (OPMODE | SLEN24 | SPEN_A | SCHEN_A | SDEN_A | SPEN_B | SCHEN_B | SDEN_B | L_FIRST);

 

    *pDIV5 = 0;
    *pDIV2 = 0;
    /* Configure SPORTs 5 & 2 for output to DACs 1-4 */
    *pCPSP5A = (((unsigned int)pSportBuffInfo->pTCBOut[0][0] + (SportTCBSize-1)) & 0x7FFFF) | (1<<19);
    *pCPSP5B = (((unsigned int)pSportBuffInfo->pTCBOut[1][0] + (SportTCBSize-1)) & 0x7FFFF) | (1<<19);
    *pSPCTL5 = (SPTRAN | OPMODE | SLEN24 |  SPEN_A | SCHEN_A |SPEN_B | SDEN_A | SCHEN_B | SDEN_B | L_FIRST);


    *pCPSP2A = (((unsigned int)pSportBuffInfo->pTCBOut[2][0] + (SportTCBSize-1)) & 0x7FFFF) | (1<<19);
    *pCPSP2B = (((unsigned int)pSportBuffInfo->pTCBOut[3][0] + (SportTCBSize-1)) & 0x7FFFF) | (1<<19);
    *pSPCTL2 = (SPTRAN | OPMODE | SLEN24 |  SPEN_A | SCHEN_A |SPEN_B | SDEN_A | SCHEN_B | SDEN_B | L_FIRST);

 

"

I also initialized SPORT 0-1-3-4 as input and SPORT 2-5 as output. If I swap all input to pTCBIn[0] & [1] I get an output, so all my ADCs setup is ok. I just cannot add more than 2 stereos I2S flux to the DSP in input.

 

I add my complete project.

 

So I want to get all thoses inputs in the input block of my sigma studio project.

 

Thanks in advance, best regards,

 

John

Outcomes