AnsweredAssumed Answered

SPI Full Duplex on

Question asked by CD30 on Dec 17, 2010
Latest reply on Dec 17, 2010 by Mitesh

Hi,

 

 

     I am using ADSP-21364 & i want to make it work in full duplex mode.Problem is:

 

1)

This way i have initialized my SPI_A,i want to core transmit master mode & DMA receieve in master mode.But the thing is first i call INIT DMA in that TIMOD is set as 2 then i call SPI_CORE init there TIMOD is set to 1 all together when i run in SPICTL the TIMOD bit is 3 which is a reserved state,so i am not able to do SPI transmit & receieve.

void SPI_INIT_CORE()

 

{
    *(volatile int *)SPICTL =0;

    *(volatile int *)SPIFLG = DS1EN | SPIFLG1;                           

    *(volatile int *)SPIBAUD = 0x52;                              

    *(volatile int *)SPICTL  =TXFLSH;                         

     *(volatile int *)SPICTL = TIMOD1|WL16|SPIMS|SPIEN|MSBF|CLKPL|CPHASE;   

}

 

void SPI_INIT_DMA()

{

 

    *(volatile int *)SPICTL = 0;
    *(volatile int *)SPIDMAC = 0;
     *(volatile int *)SPIBAUD = 0x52;          
     *(volatile int *)IISPI =(int)dest;
     *(volatile int *)IMSPI = 1;
    *(volatile int *)CSPI = sizeof(dest);
    * (volatile int *)SPICTL |=SPIMS|WL16|MSBF|TIMOD2;
     *(volatile int *)SPICTL |=SPIEN;
     *(volatile int *)SPIFLG =DS1EN | SPIFLG1;  //cs as high
     *(volatile int *)SPIDMAC=SPIRCV|SPIDEN|INTEN;

}

 

 

Plz let me know how the initialization needs to be done?

 

 

Thanks

 

Outcomes