Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] ADSP-2139 SPORT problem

Status
Not open for further replies.

immortal13

Newbie level 6
Joined
Mar 31, 2013
Messages
11
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
1,348
ADSP-21369 SPORT problem

Hello!

I have got a problem with serial port of ADSP-21369. I'm trying to send data with DMA via SPORT interface and except of my data there some extra bit, which I don't need.

This is my configuration of SPORT:

Code:
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;

  *pSPCTL3  = SDEN_B | SPTRAN | SPEN_B | SLEN8 | ICLK;
}

At the beginning of transmitting data I have 3 extra redundant bits and to send for example 3 bytes I need bufSize of 5.

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

Any help would be appreciated!
Viacheslav.

- - - Updated - - -

The problem with first extra bits is solved! Frame sync helped me to deal with it.

Code:
*pSPCTL3  = SDEN_B | SPTRAN | SPEN_B | SLEN8 | FSR | IFS | LFS | LAFS | ICLK;
instead of
Code:
*pSPCTL3  = SDEN_B | SPTRAN | SPEN_B | SLEN8 | ICLK;

But I still can't understand, why do I need to make DMA bufSize larger by 2 bytes.
 
Last edited by a moderator:

The problem has been solved! ISR function was wrong..
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top