Post Go back to editing

ADSP21478 SPORT in I2S

failing I2S mode on the SPORT (slave transmit).

PCG B is programmed with 48khz, 64bit - 3.072 mhz clk

Can observe 48khz on DAI8 and 3.072mhz on DAI7

but sport 2 doesn't work at all (no DMA fetches, no interrupts). See code below:

SRU(SPORT2_DA_O, DAI_PB09_I);
SRU(SPORT2_DB_O, DAI_PB10_I);

SRU(PCG_FSB_O, DAI_PB08_I);
SRU(PCG_CLKB_O, DAI_PB07_I);

SRU(PCG_FSB_O, SPORT2_FS_I);

SRU(PCG_CLKB_O, SPORT2_CLK_I);

SRU(HIGH,   DAI_PBEN07_I);
SRU(HIGH,   DAI_PBEN08_I);

SRU(HIGH, DAI_PBEN09_I);
SRU(HIGH, DAI_PBEN10_I);

 

int sptcb_dac1[2][4]={{0,MSEC_OUTSAMPLES*OCHAN_COUNT,1,0},{0,MSEC_OUTSAMPLES*OCHAN_COUNT,1,0}};

 sptcb_dac1[0][0]=(((unsigned int)&sptcb_dac1[1][3])&OFFSET_MASK)|PCI;
sptcb_dac1[1][0]=(((unsigned int)&sptcb_dac1[0][3])&OFFSET_MASK)|PCI;
sptcb_dac1[0][3]=((unsigned int)&data_dac1[0][0])&OFFSET_MASK;
sptcb_dac1[1][3]=((unsigned int)&data_dac1[1][0])&OFFSET_MASK;

 adi_int_InstallHandler(ADI_CID_SP2I, sp2_cb, 0, true);

 *pSPMCTL2=0;
*pSPCTL2=0;
*pDIV2=0; //external

 *pCPSP2A=((unsigned int)&sptcb_dac1[0][3])-OFFSET+PCI;
*pCPSP2B=((unsigned int)&sptcb_dac2[0][3])-OFFSET;

*pSPCTL2=FS_BOTH|SPTRAN|L_FIRST|OPMODE|SLEN32|SCHEN_A|SCHEN_B|SDEN_A|SDEN_B;

 *pSPCTL2|=SPEN_A|SPEN_B;

Parents Reply Children
No Data