AnsweredAssumed Answered

21065 Ezkit SPORT Transmitter / Receiver in DMA chaining mode problem

Question asked by Adeel on Dec 28, 2011
Latest reply on Jan 3, 2012 by Harshit.Gaharwar

Hi All,

Thanks for your reply. I am trying to debug a strange problem that relates to transmitting data via SPORT0 using DMA chaining on ADSP21065L Dev Kit and receives data using SPORT via DMA Chaining on Another ADSP21065L kit. On the transmitter side I have setup the DMA chaining as follows:

unsigned int source1[32],source2[32];

unsigned int TCB1_values[8] = {0,0,0,0,0,32,1,(unsigned int)source2};//set PCI bit in CP bit 17
unsigned int TCB_values[8] = {0,0,0,0,(unsigned int)(TCB1_values + 7),32,1,(unsigned int)source1};

void sport0_tx0_isr_c(void)

main

{

*REG_STCTL0=0;
TCB1_values[4]=(unsigned int)(TCB_values+7);
interrupt(SIG_SPT0I,sport_Tx0_isr_C);
TCB_values[4] |= 0x20000;
TCB1_values[4] |= 0x20000;

*REG_TDIV0=0x000F0005;
*REG_STCTL0=0x000CE5F1;/
*REG_CPT0A = (unsigned int)(TCB_values + 7) ;//this will kick it off

while (1)

{

/* insert dummy code */

}

}

void sport_tx0_isr_C(void)

{

printf("\n In the Tx service routine");

}

On the Receiver sid I have setup the DMA chaining as follows

unsigned int destination1[32];
unsigned int destination2[32];
unsigned int TCB1_values[8] = {0,0,0,0,0,32,1,(unsigned int)destination2};//set PCI bit in CP bit 17
unsigned int TCB_values[8] = {0,0,0,0,(unsigned int)(TCB1_values + 7),32,1,(unsigned int)destination1};
void sport_rx0_isr_C();

main()

{

*REG_SRCTL0=0;
TCB1_values[4]=(unsigned int)(TCB_values+7);
interrupt(SIG_SPR0I,sport_Rx0_isr_C);
TCB_values[4] |= 0x20000;
TCB1_values[4] |= 0x20000;

*REG_RDIV0=0x000F0005;
*REG_SRCTL0=0x000ca1f1;//FOR EXTERNAL CLOCK AND FRAME SIGNAL
*REG_CPR0A = (unsigned int)(TCB_values + 7) ;//this will kick it off

while (1)

{

/* dummy code */

}

}

void sport_rx0_isr_C(_INTER)
{

 

printf("\n In the Rx service routine");
}

Moreover I have made following connections from Transmiiter module to Receiver module

1. TXD0 (pin A28 on EMAFE connector) --> RXD0 (pin C28 on EMAFE connector)

2. TCLK (pin A30 on EMAFE connector) --> RCLK (pin C30 on EMAFE connector)

3. TFS (pin A31 on EMAFE connector) --> RFS (pin C31 on EMAFE connector)

Tle length of the wires is less than 6 inches. However I am unable to receive any data via SPORT0 DMA receive channel, while data is being transmitted correctly from the transmitter side. It seems that somehow the receive interrupt is not working in DMA chaining mode.

Also I would like to send/receive data such that the first word/byte of transmit buffer source1 is received in the first word/byte location of destination1 buffer and so on. Could someone suggest how can I do this or is there any problem with my SPORT Receive control register setting.

 

Thanks for your help,

Adeel Malik

Outcomes