This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TM4C1290NCPDT: EPI DMA Interrupt

Part Number: TM4C1290NCPDT

Hi,

I'm configuring the DMA for writing from internal RAM to EPI. While this transfers works one time, I fail to clear the interrupt, so that it is constantly re-triggered. I thought EPIIntErrorClear(EPI0_BASE,EPI_INT_ERR_DMAWRIC)

should do the job, but does not. To be clear: I checked, if any other Interrupt occurs, but it is only the EPI_INT_DMA_TX_DONE one.

Any Help is welcome,

regards

Micky

My Code is

    uint16_t auData[512]={1,2,3};
    uint16_t* pDst =(uint16_t*)0x80000400;

    ROM_uDMAChannelAttributeDisable(UDMA_CH21_EPI0TX, UDMA_ATTR_USEBURST);
    ROM_uDMAChannelAttributeEnable(UDMA_CH21_EPI0TX, UDMA_ATTR_USEBURST);
    ROM_uDMAChannelControlSet(UDMA_CH21_EPI0TX| UDMA_PRI_SELECT,
                          UDMA_SIZE_16| UDMA_SRC_INC_16 |
                          UDMA_DST_INC_NONE| UDMA_ARB_8);
    ROM_uDMAChannelTransferSet(UDMA_CH21_EPI0TX | UDMA_PRI_SELECT,
                           UDMA_MODE_AUTO, auData,&pDst,
                           256);
    ROM_uDMAChannelAssign(UDMA_CH21_EPI0TX);
    ROM_uDMAIntClear(UDMA_CH21_EPI0TX);

    ROM_uDMAChannelEnable(UDMA_CH21_EPI0TX);
    ROM_uDMAChannelRequest(UDMA_CH21_EPI0TX);
    EPIDMATxCount(EPI0_BASE,256);

And the Interrupt service handler

void vfnEpi0Handler()
{
    uint32_t uStatus;
    static uint32_t suEpiReady=0;
    uint32_t uInts = ROM_EPIIntStatus(EPI0_BASE,true);
    switch (uInts)
    {
    case EPI_INT_TXREQ:
        suEpiReady++;
        break;
    case EPI_INT_RXREQ:
        suEpiReady++;
        break;
    case EPI_INT_ERR:
        suEpiReady++;
        break;
    case EPI_INT_DMA_TX_DONE:
        suEpiReady++;
        EPIIntErrorClear(EPI0_BASE,EPI_INT_ERR_DMAWRIC);
        break;
    case EPI_INT_DMA_RX_DONE:
        suEpiReady++;        
        break;
    default:
        break;
    }
    uStatus = ROM_uDMAChannelModeGet(UDMA_CH21_EPI0TX);
    if(uStatus == UDMA_MODE_STOP)
    {
        // DMA Ready
        suEpiReady++;
    }


};

  • What are the values in the EPI Masked Interrupt Status register before and after the call to EPIIntErrorClear?

  • Hi Bob,

    I checked, if any other Interrupt occurs, but it is only the EPI_INT_DMA_TX_DONE one. The Value of   uInts

    uint32_t uInts = ROM_EPIIntStatus(EPI0_BASE,true);

    is 16. So in the switch-case in the Service routine is only EPI_INT_DMA_TX_DONE, controlled with the debugger.

    Directly writing to the EPI works without errors and runs perfectly. I only don't get the Interrupt cleared.

    Regards

    Michael

  • Hi Bob,

    I found the problem(s).

    First there was a C-Syntax Error

    ROM_uDMAChannelTransferSet(UDMA_CH21_EPI0TX | UDMA_PRI_SELECT,
                           UDMA_MODE_AUTO, auData,&pDst,
                           256);
    must be
    ROM_uDMAChannelTransferSet(UDMA_CH21_EPI0TX | UDMA_PRI_SELECT,
                           UDMA_MODE_AUTO, auData,pDst,
                           256);
    and secondly I found by try-and-error: It runs perfectly if I remove the line:
    EPIDMATxCount(EPI0_BASE,256);
    Thanks anyway for your attention,
    Regards
    Micky