AnsweredAssumed Answered

ADSP-21369 SPORT in DSP-mode problem

Question asked by immortal13 on Oct 7, 2013
Latest reply on Oct 8, 2013 by MaheshN

Hello!

 

 

I have got a problem with serial port of ADSP-21369. I'm trying to send data with DMA via SPORT interface to communicate with AD9852 DDS.

If I send N bytes, then I can see only (N - 2) bytes on bus.

 

This is my configuration of SPORT:

 

static void InitSPORT (void)
{
    unsigned  CLKDIV = CCLK / 8 * SPCLK - 1;
    *pDIV3    = CLKDIV << 1;

    SRU(SPORT3_DB_O,DAI_PB04_I);    // Connect SPORT to DAI pins
    SRU(SPORT3_CLK_O, DAI_PB06_I);  //
}

void WriteData (unsigned char *source, unsigned bufSize)
{
  *pSPCTL3  = 0;
  
  *pIISP3B   = (unsigned char) source;
  *pIMSP3B   = 1;
  *pCSP3B    = bufSize;

  // enable SPORT  in DSP-mode with frame sync and DMA
  *pSPCTL3  = SDEN_B | SPTRAN | SPEN_B | SLEN8 | FSR | IFS | LFS | LAFS | ICLK;
}

 

 

So, what is wrong with it? Has anyone been dealt with this problem?

 

Any help would be appreciated!

Viacheslav.

Outcomes