AnsweredAssumed Answered

adsp 21479 and EZ-kit UART DMA interrupt

Question asked by Ezhik452 on Jan 28, 2013
Latest reply on Mar 1, 2013 by Ezhik452

Hi. I'm trying to use chained DMA on UART0 recive. The problem is that when I use UART without DMA, all works fine and interrupt is rises. But when I enable chained DMA, there is no interrupt at all^ not on the TCB block complete and not on whole transfer process complete. At the same time, data has been transferd to DMA buffers normally. May be I've forget to enable or disable something in some registers?

Here is my code of UART initialization:

 

    unsigned int PCI = 0x00080000 ;

    unsigned int OFFSET = 0x80000;

    volatile int temp;

    int picr2 = 0x0;

 

 

    /* maps the UART0 receive interrupt to P14 using the programmable interrupt controller */

 

 

    picr2 = *pPICR2;        /* get PICR2 */

    picr2 &= (~(0x1f<<10)); /* clear P14 bits */

    picr2 |= (0x13<<10);    /* set UART0RX */

    (*pPICR2) = picr2;      /* put it back */

 

 

    sysreg_bit_set(sysreg_MODE1, IRPTEN); /* enable global interrupts */

    sysreg_bit_set(sysreg_IMASK, P14I); /* unmask UART RX interrupt */

 

 

    (*pUART0IER) = UARTRBFIE;      /* enable UART RX interrupt */

 

 

    ADI_INT_STATUS result = adi_int_InstallHandler(ADI_CID_P14I, someIsr, 0, true);

 

 

    SRU2(UART0_TX_O,DPI_PB09_I);    /* UART TX signal is connected to DPI pin 9 */

    SRU2(HIGH,DPI_PBEN09_I);

    SRU2(DPI_PB10_O,UART0_RX_I);    /* connect the pin buffer output signal to the UART0 RX */

    SRU2(LOW,DPI_PB10_I);

    SRU2(LOW,DPI_PBEN10_I);         /* disable DPI pin10 as input */

 

 

    (*pUART0LCR) = UARTDLAB;        /* enables access to divisor register to set baud rate */

 

 

    (*pUART0DLL) = 0xb0;

    (*pUART0DLH) = 0x1;             /* 0x1B0 = 432 for divisor value gives a baud rate of 19200 at 266 Mhz core clock */

 

 

    (*pUART0LCR) = (UARTWLS8);   /* 8 bit word, none parity, 1 stop bits */

 

 

    int TCBRxBlock0[4] = { 0, sizeof(inputBuffer0), 1, 0};

    int TCBRxBlock1[4] = { 0, sizeof(inputBuffer1), 1, 0};

 

 

    TCBRxBlock0[0] = (unsigned int)TCBRxBlock1 + 3 + PCI - OFFSET;

    TCBRxBlock0[3] = (int) inputBuffer0 - OFFSET ;

 

 

    TCBRxBlock1[0] = 0;//(unsigned int)TCBRxBlock0 + 3;

    TCBRxBlock1[3] = (int) inputBuffer1 - OFFSET ;

 

 

    *pCPUART0RX = 0;

    *pCPUART0RX = (unsigned int)TCBRxBlock0 + 3 + PCI - OFFSET;

 

 

    (*pUART0RXCTL) = UARTEN | UARTCHEN | UARTDEN;        /* enable UART0 RX with chaining DMA */

    (*pUART0TXCTL) = UARTEN;        /* enable UART0 TX */

 

Thanks for your attention.

 

Regards,

Dmitriy Lyubov

Attachments

Outcomes