AnsweredAssumed Answered

Problems with project in technical note EE-268 (Programming Asynchronous Sample Rate Converters on ADSP-2136x) on ADSP-21369.

Question asked by pol on Sep 27, 2011
Latest reply on Oct 27, 2011 by Mitesh

I started project “SRC SPORT0 to SPORT1” on ADSP-21369 (dspblok™ 21369zx). I have changed code for porting on ADSP21369 only by including files. But I have got output values in the negative and added ‘DTYPE1 bit’ in Sport1Init (). There are noises in output signal like this:

 

 

clip_image002.jpg

View output plot (FsOUT = FsIN)

 

I have no idea about it. Where is the mistake? Code listing below:

 

View code in main():

 

/Function Definitions --------------------------------------------------------------

//-----------------------------------------------------------------------------------

 

//Initialize SRC0

 

void SRC0Init()

{

            *pSRCCTL0 = SRC0_SMODEIN0 | SRC0_SMODEOUT0 | SRC0_ENABLE ;

}

 

 

//-------------------------------------------------------

//-------------------------------------------------------

 

//Initialize SPORT0

void Sport0Init()

{

            *pDIV0 = 0x0018000e;

            *pSPCTL0 |= SPEN_A | SLEN24 | MSTR | OPMODE | SPTRAN;//SPORT0 configuration:

                                                                                                                                                                     //Internal clock and word select

                                                                                                                                                                     //I2S mode

                                                                                                                                                                     //Transmitter

                                                                                                                                                                     //Word length 24

}

//-------------------------------------------------------

//-------------------------------------------------------

 

//Initialize SPORT1

void Sport1Init()

{

            *pDIV1 = 0x0018000e;

            *pSPCTL1 |= SPEN_A | MSTR | SLEN24 | OPMODE | DTYPE1;             //SPORT1 configuration:

                                                                                                                                                                     //Internal clock and word select

                                                                                                                                                                     //I2S mode

                                                                                                                                                                     //Receiver

                                                                                                                                                                     //Word length 24

}

 

View code in SPORT_0_1 and SRC0.c

 

// This function will setup the SRU Registers

void InitSRU()

{

            // Enable pull-up resistors on unused DAI pins

            * (volatile int *)DAI_PIN_PULLUP = 0xfffff;

 

            //Generating Code for connecting : SPORT0_CLK to SRC0_CLK_IP

            SRU (SPORT0_CLK_O, SRC0_CLK_IP_I);

 

            //Generating Code for connecting : SPORT0_FS to SRC0_FS_IP

            SRU (SPORT0_FS_O, SRC0_FS_IP_I);

 

            //Generating Code for connecting : SPORT0_DA to SRC0_DAT_IP

            SRU (SPORT0_DA_O, SRC0_DAT_IP_I);

 

            //Generating Code for connecting : SPORT1_CLK to SRC0_CLK_OP

            SRU (SPORT1_CLK_O, SRC0_CLK_OP_I);

 

            //Generating Code for connecting : SPORT1_FS to SRC0_FS_OP

            SRU (SPORT1_FS_O, SRC0_FS_OP_I);

 

            //Generating Code for connecting : SRC0_DAT_OP to SPORT1_DA

            SRU (SRC0_DAT_OP_O, SPORT1_DA_I);

 

 

}

 

Excuse me for my bad English.

Outcomes