AnsweredAssumed Answered

Trouble with ADSP-21363 SPI Slave DMA, Only when SPIRCV = CPHASE = CKPOL = 0

Question asked by BobHiggins on Jan 19, 2010
Latest reply on Jan 20, 2010 by DivyaS

I’m having problems with adsp-21363 spi dma.  To be specific, the problems occurs with the spi in slave mode, spi transmit, cphase = ckpol = 0.  The failure symptom is that the spi port only seems to be getting 1 transfer when the master device is transferring 48 words. 

 

If I put spi in receive mode all 48 words transfer properly.  Also, If I set cphase and ckpol to 1 all 48 words transfer properly.  Also, if I use core driven transfers with cphase and ckpol back to 0, all 48 words transmit and receive wonderfully.  It really seams to be isolated to DMA transmit with cphase and ckpol set to 0.  Note, I can’t test the SPI in master mode because the other device I’m talking to has to be the master.

 

Any suggestions?  Thanks.

 

Here’s my SPI configuration code:

 

/*    Reset SPI port */

*pSPICTL = 0;

*pSPICTL = TXFLSH | RXFLSH;

*pSPIDMAC = 0;

*pSPIDMAC = FIFOFLSH;

*pSPIFLG = 0;

   

/*    Configure SPI interrupt handler. */

SPI_IRQ_Flag = 0;

interrupt(SIG_SPIH, SPI_ISR);

 

/*    Configure DMA controller. */

*pIISPI = (unsigned int)&RF_RxPacket;

*pIMSPI = 0x00000001;

*pCSPI = 48;

     

/*    Enable SPI transfers via DMA. */

*pSPIDMAC = INTEN | SPIRCV ;

*pSPIDMAC |= SPIDEN;

     

/*    Configure SPI port. */

*pSPICTL = MSBF | WL8 | TIMOD2;

*pSPICTL |= SPIEN;

Outcomes