Oct 4, 2013 #1 I 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: Oct 4, 2013
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.
Oct 8, 2013 #2 I 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 The problem has been solved! ISR function was wrong..